4:19pm, Wednesday 8 November 2006
What's the point of providing debug output if it doesn't contain useful information? This afternoon I have done:
and similar, because Cyrus says "ooh yes, new connection" without bothering to tell you where the data is coming from...#define DH3HACK 1 #ifdef DH3HACK { struct sockaddr_in sin; socklen_t len = sizeof(sin); if (getpeername(fd, (struct sockaddr *) &sin, &len) == 0) { syslog(LOG_DEBUG, "accepted connection from %s", inet_ntoa(sin.sin_addr)); } else { syslog(LOG_DEBUG, "accepted connection"); } } #else syslog(LOG_DEBUG, "accepted connection"); #endif