]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/resolve.c
include <arpa/inet.h> inside tool.h
[ngircd-alex.git] / src / ngircd / resolve.c
index ec993037cb6c6badf96b54395edfee9bd605aa35..dbf28736ab8c2329705be524c5d893be5266e230 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: resolve.c,v 1.25 2006/08/12 11:54:23 fw Exp $";
+static char UNUSED id[] = "$Id: resolve.c,v 1.27 2007/11/25 18:42:37 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -24,7 +24,6 @@ static char UNUSED id[] = "$Id: resolve.c,v 1.25 2006/08/12 11:54:23 fw Exp $";
 #include <unistd.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
-#include <arpa/inet.h>
 #include <netdb.h>
 
 #ifdef IDENTAUTH
@@ -36,6 +35,7 @@ static char UNUSED id[] = "$Id: resolve.c,v 1.25 2006/08/12 11:54:23 fw Exp $";
 #include "conn.h"
 #include "defines.h"
 #include "log.h"
+#include "tool.h"
 
 #include "exp.h"
 #include "resolve.h"
@@ -313,7 +313,8 @@ register_callback( RES_STAT *s, void (*cbfunc)(int, short))
                        return true;
 
        Log( LOG_CRIT, "Resolver: Could not register callback function: %s!", strerror(errno));
-       Resolve_Shutdown(s);
+       close(s->resolver_fd);
+       Resolve_Init(s);
        return false;
 }
 
@@ -333,7 +334,7 @@ Resolve_Shutdown( RES_STAT *s)
        return ret;
 }
 
-                
+
 /**
  * Read result of resolver sub-process from pipe
  */