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

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



commit 3d8c166b19c1150c5c0b69bf567f1c771f766957
Author: Robert Hogan <robert@xxxxxxxxxxxxxxx>
Date:   Mon Oct 24 19:44:11 2011 +0100

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

diff --git a/src/socks.c b/src/socks.c
index 41c19a9..8497728 100644
--- a/src/socks.c
+++ b/src/socks.c
@@ -84,6 +84,7 @@ static int send_socksv4a_request(struct connreq *conn, const char *onion_host);
 
 
 dead_pool *pool = NULL;
+struct connreq *requests = NULL;
 
 struct connreq *new_socks_request(int sockid, struct sockaddr_in *connaddr,
                                          struct sockaddr_in *serveraddr,
diff --git a/src/socks.h b/src/socks.h
index 3a4b0cd..6dd497f 100644
--- a/src/socks.h
+++ b/src/socks.h
@@ -104,7 +104,7 @@ struct connreq {
 
 /* Global Declarations */
 extern dead_pool *pool;
-static struct connreq *requests = NULL;
+extern struct connreq *requests;
 
 struct connreq *new_socks_request(int sockid, struct sockaddr_in *connaddr,
                                          struct sockaddr_in *serveraddr,

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