[Pdns-dev]
Patch for --enable-verbose-logging compile time failure in
pdns_server .
Augie Schwer
augie.schwer at gmail.com
Tue Jan 2 11:46:41 CET 2007
http://wiki.powerdns.com/cgi-bin/trac.fcgi/ticket/119
Index: packethandler.cc
===================================================================
--- packethandler.cc (revision 939)
+++ packethandler.cc (working copy)
@@ -564,7 +564,7 @@
DNSPacket *r=0;
try {
- DLOG(L << Logger::Notice<<"Remote "<<inet_ntoa( reinterpret_cast<
struct sockaddr_in * >( &( p->remote ))->sin_addr )<<" wants a type "
<< p->qtype.getName() << " ("<<p->qtype.getCode()<<") about
'"<<p->qdomain << "'" << endl);
+ DLOG(L << Logger::Notice<<"Remote "<< p->remote.toString() <<"
wants a type " << p->qtype.getName() << " ("<<p->qtype.getCode()<<")
about '"<<p->qdomain << "'" << endl);
// XXX FIXME Find out why this isn't working!
#ifndef WIN32
Index: nameserver.cc
===================================================================
--- nameserver.cc (revision 939)
+++ nameserver.cc (working copy)
@@ -191,7 +191,7 @@
void UDPNameserver::send(DNSPacket *p)
{
const char *buffer=p->getData();
- DLOG(L<<Logger::Notice<<"Sending a packet to "<<inet_ntoa(
reinterpret_cast< sockaddr_in * >(( p->remote ))->sin_addr)<<"
("<<p->len<<" octets)"<<endl);
+ DLOG(L<<Logger::Notice<<"Sending a packet to "<<
p->remote.toString() <<" ("<<p->len<<" octets)"<<endl);
if(p->len>512) {
p=new DNSPacket(*p);
p->truncate(512);
Index: dnspacket.cc
===================================================================
--- dnspacket.cc (revision 939)
+++ dnspacket.cc (working copy)
@@ -1127,7 +1127,7 @@
if(new_length>len || !d_wrapped)
return;
- DLOG(L<<Logger::Warning<<"Truncating a packet to "<<inet_ntoa(
reinterpret_cast< sockaddr_in * >( remote )->sin_addr )<<endl);
+ DLOG(L<<Logger::Warning<<"Truncating a packet to "<<
remote.toString() <<endl);
len=new_length;
stringbuffer[2]|=2; // set TC
--
Augie Schwer - Augie at Schwer.us - http://schwer.us
Key fingerprint = 9815 AE19 AFD1 1FE7 5DEE 2AC3 CB99 2784 27B0 C072
More information about the Pdns-dev
mailing list