Changeset cce0450
- Timestamp:
- 2008-06-02T12:49:33Z (17 years ago)
- Branches:
- master
- Children:
- c821e8a
- Parents:
- b5cfc2b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/s5bytestream.c
rb5cfc2b rcce0450 72 72 } __attribute__ ((packed)); 73 73 74 char *socks5_reply_code[] = { 75 "succeeded", 76 "general SOCKS server failure", 77 "connection not allowed by ruleset", 78 "Network unreachable", 79 "Host unreachable", 80 "Connection refused", 81 "TTL expired", 82 "Command not supported", 83 "Address type not supported", 84 "unassigned"}; 85 74 86 /* connect() timeout in seconds. */ 75 87 #define JABBER_BS_CONTIMEOUT 15 … … 477 489 478 490 if( !( socks5_reply.ver == 5 ) || 479 !( socks5_reply.cmdrep.rep == 0 ) ) 480 return jabber_bs_abort( bt, "SOCKS5 CONNECT failed (reply: ver=%d, rep=%d, atyp=%d, addrlen=%d", 491 !( socks5_reply.cmdrep.rep == 0 ) ) { 492 char errstr[128] = ""; 493 if( ( socks5_reply.ver == 5 ) && ( socks5_reply.cmdrep.rep < 494 ( sizeof( socks5_reply_code ) / sizeof( socks5_reply_code[0] ) ) ) ) { 495 sprintf( errstr, "with \"%s\" ", socks5_reply_code[ socks5_reply.cmdrep.rep ] ); 496 } 497 return jabber_bs_abort( bt, "SOCKS5 CONNECT failed %s(reply: ver=%d, rep=%d, atyp=%d, addrlen=%d)", 498 errstr, 481 499 socks5_reply.ver, 482 500 socks5_reply.cmdrep.rep, 483 501 socks5_reply.atyp, 484 502 socks5_reply.addrlen); 503 } 485 504 486 505 /* usually a proxy sends back the 40 bytes address but I encountered at least one (of jabber.cz)
Note: See TracChangeset
for help on using the changeset viewer.