Changeset 619 for trunk/pdns/pdns/lwres.cc
- Timestamp:
- 03/25/06 18:54:12 (4 years ago)
- Files:
-
- 1 modified
-
trunk/pdns/pdns/lwres.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/lwres.cc
r598 r619 58 58 //! returns -1 for permanent error, 0 for timeout, 1 for success 59 59 /** Never throws! */ 60 int LWRes::asyncresolve( const string &ip, const char *domain, int type, bool doTCP, struct timeval* now)60 int LWRes::asyncresolve(uint32_t ip, const char *domain, int type, bool doTCP, struct timeval* now) 61 61 { 62 62 vector<uint8_t> vpacket; … … 71 71 72 72 struct sockaddr_in toaddr; 73 struct in_addr inp;74 73 Utility::socklen_t addrlen=sizeof(toaddr); 75 Utility::inet_aton(ip.c_str(),&inp); 76 toaddr.sin_addr.s_addr=inp.s_addr; 74 toaddr.sin_addr.s_addr=htonl(ip); 77 75 78 76 toaddr.sin_port=htons(53); … … 95 93 else { 96 94 Socket s(InterNetwork, Stream); 97 IPEndpoint ie( ip, 53);95 IPEndpoint ie(U32ToIP(ip), 53); 98 96 s.setNonBlocking(); 99 97 s.connect(ie);