Skip to content

Commit 0c79508

Browse files
committed
move initialization of quiet variable to do_init
fixes #511 - DLL init line is always printed even with -q. regression from recent changes to init code.
1 parent 42d2d95 commit 0c79508

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/libproxychains.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,15 @@ static unsigned get_rand_seed(void) {
133133
}
134134

135135
static void do_init(void) {
136+
char *env;
137+
136138
srand(get_rand_seed());
137139
core_initialize();
138140

141+
env = getenv(PROXYCHAINS_QUIET_MODE_ENV_VAR);
142+
if(env && *env == '1')
143+
proxychains_quiet_mode = 1;
144+
139145
proxychains_write_log(LOG_PREFIX "DLL init: proxychains-ng %s\n", proxychains_get_version());
140146

141147
setup_hooks();
@@ -307,10 +313,6 @@ static void get_chain_data(proxy_data * pd, unsigned int *proxy_count, chain_typ
307313
exit(1);
308314
}
309315

310-
env = getenv(PROXYCHAINS_QUIET_MODE_ENV_VAR);
311-
if(env && *env == '1')
312-
proxychains_quiet_mode = 1;
313-
314316
while(fgets(buf, sizeof(buf), file)) {
315317
buff = buf;
316318
/* remove leading whitespace */

0 commit comments

Comments
 (0)