Changeset 812
- Timestamp:
- 04/30/2006 02:55:38 PM (3 years ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/misc.cc
r802 r812 329 329 } 330 330 331 #ifdef WIN32 332 string netstringerror() 333 { 334 char buf[512]; 335 int err=WSAGetLastError(); 336 if(FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 337 0, buf, sizeof(buf)-1, NULL)) { 338 return string(buf); 339 } 340 else { 341 return strerror(err); 342 } 343 } 344 #else 345 string netstringerror() 346 { 347 return stringerror(); 348 } 349 #endif 350 331 351 void cleanSlashes(string &str) 332 352 { -
trunk/pdns/pdns/misc.hh
r802 r812 150 150 string U32ToIP(uint32_t); 151 151 string stringerror(); 152 string netstringerror(); 152 153 string itoa(int i); 153 154 string uitoa(unsigned int i); -
trunk/pdns/pdns/pdns_recursor.cc
r810 r812 827 827 828 828 int fd=socket(sin.sin4.sin_family, SOCK_DGRAM,0); 829 if(fd<0) 830 throw AhuException("Making a UDP server socket for resolver: "+stringerror()); 829 if(fd < 0) { 830 throw AhuException("Making a UDP server socket for resolver: "+netstringerror()); 831 } 831 832 832 833 setReceiveBuffer(fd, 200000);