[tor-commits] [torsocks/master] Issue 29: tordns no worky?

hoganrobert at torproject.org hoganrobert at torproject.org
Sun Oct 23 18:27:11 UTC 2011


commit 511cd026a896609f851ee355791f2c1e008d8f9b
Author: Robert Hogan <robert at roberthogan.net>
Date:   Sun Oct 23 19:14:16 2011 +0100

    Issue 29: tordns no worky?
    
    This was a regression caused by splitting tsocks.c into socks.c and
    torsocks.c. The 'pool' variable was declared static in the socks.h
    header file with the result that the value was no longer shared between
    source files.
    
    Define pool in socks.c and declare it extern in socks.h.
    
    Based on patch from foobi.. at gmail.com
---
 src/socks.c |    3 +++
 src/socks.h |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/socks.c b/src/socks.c
index dd3a229..41c19a9 100644
--- a/src/socks.c
+++ b/src/socks.c
@@ -82,6 +82,9 @@ static int read_socksv5_connect(struct connreq *conn);
 static int read_socksv5_auth(struct connreq *conn);
 static int send_socksv4a_request(struct connreq *conn, const char *onion_host);
 
+
+dead_pool *pool = NULL;
+
 struct connreq *new_socks_request(int sockid, struct sockaddr_in *connaddr,
                                          struct sockaddr_in *serveraddr,
                                          struct serverent *path)
diff --git a/src/socks.h b/src/socks.h
index af26fa6..3a4b0cd 100644
--- a/src/socks.h
+++ b/src/socks.h
@@ -103,7 +103,7 @@ struct connreq {
 #define READWRITEEXCEPT (READ|WRITE|EXCEPT)
 
 /* Global Declarations */
-static dead_pool *pool = NULL;
+extern dead_pool *pool;
 static struct connreq *requests = NULL;
 
 struct connreq *new_socks_request(int sockid, struct sockaddr_in *connaddr,



More information about the tor-commits mailing list