Changeset 534 for trunk/src/ocatsocks.c
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/garlicat (added) merged: 524-531
- Property svn:mergeinfo changed
-
trunk/src
- Property svn:mergeinfo changed
/branches/garlicat/src (added) merged: 525-529
- Property svn:mergeinfo changed
-
trunk/src/ocatsocks.c
r508 r534 26 26 27 27 #include "ocat.h" 28 #include "ocat_netdesc.h" 28 29 29 30 … … 31 32 static SocksQueue_t *socks_queue_ = NULL; 32 33 33 #define SOCKS_BUFLEN (sizeof(SocksHdr_t) + ONION_NAME_SIZE+ strlen(CNF(usrname)) + 2)34 #define SOCKS_BUFLEN (sizeof(SocksHdr_t) + NDESC(name_size) + strlen(CNF(usrname)) + 2) 34 35 35 36 … … 37 38 { 38 39 int len, ret; 39 char buf[SOCKS_BUFLEN], onion[ ONION_NAME_SIZE];40 char buf[SOCKS_BUFLEN], onion[NDESC(name_size)]; 40 41 SocksHdr_t *shdr = (SocksHdr_t*) buf; 41 42 42 43 ipv6tonion(&sq->addr, onion); 43 strlcat(onion, ".onion", sizeof(onion));44 strlcat(onion, NDESC(domain), sizeof(onion)); 44 45 log_msg(LOG_INFO, "trying to connect to \"%s\" [%s]", onion, inet_ntop(AF_INET6, &sq->addr, buf, SOCKS_BUFLEN)); 45 46 … … 246 247 { 247 248 int i; 248 char addrstr[INET6_ADDRSTRLEN], onstr[ ONION_NAME_LEN], buf[SIZE_1K];249 char addrstr[INET6_ADDRSTRLEN], onstr[NDESC(name_size)], buf[SIZE_1K]; 249 250 SocksQueue_t *squeue; 250 251 … … 257 258 } 258 259 259 snprintf(buf, SIZE_1K, "%d: %39s, %s .onion, state = %d, %s(%d), retry = %d, connect_time = %d, restart_time = %d",260 snprintf(buf, SIZE_1K, "%d: %39s, %s%s, state = %d, %s(%d), retry = %d, connect_time = %d, restart_time = %d", 260 261 i, 261 262 addrstr, 262 263 ipv6tonion(&squeue->addr, onstr), 264 NDESC(domain), 263 265 squeue->state, 264 266 squeue->perm ? "PERMANENT" : "TEMPORARY",
Note: See TracChangeset
for help on using the changeset viewer.
