[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 511cd026a896609f851ee355791f2c1e008d8f9b
Author: Robert Hogan <robert@xxxxxxxxxxxxxxx>
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..@xxxxxxxxx
---
 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,

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits