#include "imp.h"
#include <assert.h>
#ifdef PROTOTYPES
-# include <stdarg.h>
+# include <stdarg.h>
#else
-# include <varargs.h>
+# include <varargs.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include "array.h"
#include "defines.h"
-#include "resolve.h"
#include "exp.h"
#include "conn.h"
#include "imp.h"
#include "ngircd.h"
+#include "array.h"
#include "client.h"
#include "conf.h"
#include "conn-ssl.h"
#include "conn-zip.h"
#include "conn-func.h"
#include "log.h"
+#include "ng_ipaddr.h"
#include "parse.h"
+#include "proc.h"
+#include "resolve.h"
#include "tool.h"
#ifdef ZEROCONF
if (SSL_WantWrite(&My_Connections[i]))
continue; /* TLS/SSL layer needs to write data; deal with this first */
#endif
- if (Resolve_INPROGRESS(&My_Connections[i].res_stat)) {
+ if (Proc_InProgress(&My_Connections[i].res_stat)) {
/* Wait for completion of resolver sub-process ... */
io_event_del(My_Connections[i].sock,
IO_WANTREAD);
}
/* cancel running resolver */
- if (Resolve_INPROGRESS(&My_Connections[Idx].res_stat))
- Resolve_Shutdown(&My_Connections[Idx].res_stat);
+ if (Proc_InProgress(&My_Connections[Idx].res_stat))
+ Proc_Kill(&My_Connections[Idx].res_stat);
/* Servers: Modify time of next connect attempt? */
Conf_UnsetServer( Idx );
/* Okay, try to connect now */
Conf_Server[i].lasttry = time_now;
Conf_Server[i].conn_id = SERVER_WAIT;
- assert(Resolve_Getfd(&Conf_Server[i].res_stat) < 0);
+ assert(Proc_GetPipeFd(&Conf_Server[i].res_stat) < 0);
Resolve_Name(&Conf_Server[i].res_stat, Conf_Server[i].host, cb_Connect_to_Server);
}
} /* Check_Servers */
My_Connections[Idx].signon = now;
My_Connections[Idx].lastdata = now;
My_Connections[Idx].lastprivmsg = now;
- Resolve_Init(&My_Connections[Idx].res_stat);
+ Proc_InitStruct(&My_Connections[Idx].res_stat);
} /* Init_Conn_Struct */
LogDebug("Resolver: Got forward lookup callback on fd %d, events %d", fd, events);
for (i=0; i < MAX_SERVERS; i++) {
- if (Resolve_Getfd(&Conf_Server[i].res_stat) == fd )
+ if (Proc_GetPipeFd(&Conf_Server[i].res_stat) == fd )
break;
}
/* Search associated connection ... */
for( i = 0; i < Pool_Size; i++ ) {
if(( My_Connections[i].sock != NONE )
- && ( Resolve_Getfd(&My_Connections[i].res_stat) == r_fd ))
+ && (Proc_GetPipeFd(&My_Connections[i].res_stat) == r_fd))
break;
}
if( i >= Pool_Size ) {