diff options
author | Roger Dingledine <arma@torproject.org> | 2004-08-04 01:08:10 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-08-04 01:08:10 +0000 |
commit | 8b55f73bbee6b282a451e87820cd8f38f13046ac (patch) | |
tree | 7c3f7e208952b43e37ca5fd6932394ca004fef31 /src | |
parent | 5b61dd04570c93ec6663f5893951c312b95f58f9 (diff) | |
download | tor-8b55f73bbee6b282a451e87820cd8f38f13046ac.tar.gz tor-8b55f73bbee6b282a451e87820cd8f38f13046ac.zip |
put the have_warned_about_unsafe_socks static var inside the function
svn:r2128
Diffstat (limited to 'src')
-rw-r--r-- | src/or/buffers.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 222140e47a..1d4ea50427 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -409,10 +409,6 @@ int fetch_from_buf_http(buf_t *buf, return 1; } -/** If the user connects with socks4 or the wrong variant of socks5, - * then log one warning to let him know that it might be unwise. */ -static int have_warned_about_unsafe_socks = 0; - /** There is a (possibly incomplete) socks handshake on <b>buf</b>, of one * of the forms * - socks4: "socksheader username\\0" @@ -440,6 +436,10 @@ int fetch_from_buf_socks(buf_t *buf, socks_request_t *req) { char *next, *startaddr; struct in_addr in; + /* If the user connects with socks4 or the wrong variant of socks5, + * then log a warning to let him know that it might be unwise. */ + static int have_warned_about_unsafe_socks = 0; + if(buf->datalen < 2) /* version and another byte */ return 0; switch(*(buf->mem)) { /* which version of socks? */ |