mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-01-08 22:22:52 +08:00
clean up some debug ifdefs
This commit is contained in:
parent
51b2eb91ce
commit
afe6171cad
@ -5,12 +5,14 @@
|
||||
# include <stdio.h>
|
||||
# define PSTDERR(fmt, args...) do { dprintf(2,fmt, ## args); } while(0)
|
||||
# define PDEBUG(fmt, args...) PSTDERR("DEBUG:"fmt, ## args)
|
||||
# define DEBUGDECL(args...) args
|
||||
|
||||
# include "core.h"
|
||||
void DUMP_PROXY_CHAIN(proxy_data *pchain, unsigned int count);
|
||||
|
||||
#else
|
||||
# define PDEBUG(fmt, args...) do {} while (0)
|
||||
# define DEBUGDECL(args...)
|
||||
# define DUMP_PROXY_CHAIN(args...) do {} while (0)
|
||||
#endif
|
||||
|
||||
|
@ -312,9 +312,8 @@ int connect(int sock, const struct sockaddr *addr, unsigned int len) {
|
||||
int socktype = 0, flags = 0, ret = 0;
|
||||
socklen_t optlen = 0;
|
||||
ip_type dest_ip;
|
||||
#ifdef DEBUG
|
||||
char str[256];
|
||||
#endif
|
||||
DEBUGDECL(char str[256]);
|
||||
|
||||
struct in_addr *p_addr_in;
|
||||
unsigned short port;
|
||||
size_t i;
|
||||
@ -328,12 +327,10 @@ int connect(int sock, const struct sockaddr *addr, unsigned int len) {
|
||||
p_addr_in = &((struct sockaddr_in *) addr)->sin_addr;
|
||||
port = ntohs(((struct sockaddr_in *) addr)->sin_port);
|
||||
|
||||
#ifdef DEBUG
|
||||
// PDEBUG("localnet: %s; ", inet_ntop(AF_INET,&in_addr_localnet, str, sizeof(str)));
|
||||
// PDEBUG("netmask: %s; " , inet_ntop(AF_INET, &in_addr_netmask, str, sizeof(str)));
|
||||
PDEBUG("target: %s\n", inet_ntop(AF_INET, p_addr_in, str, sizeof(str)));
|
||||
PDEBUG("port: %d\n", port);
|
||||
#endif
|
||||
|
||||
// check if connect called from proxydns
|
||||
remote_dns_connect = (ntohl(p_addr_in->s_addr) >> 24 == remote_dns_subnet);
|
||||
|
Loading…
Reference in New Issue
Block a user