if (SSL_WantWrite(&My_Connections[i]))
continue; /* TLS/SSL layer needs to write data; deal with this first */
#endif
- if (Proc_InProgress(&My_Connections[i].res_stat)) {
- /* Wait for completion of resolver sub-process ... */
+ if (Proc_InProgress(&My_Connections[i].proc_stat)) {
+ /* Wait for completion of forked subprocess
+ * and ignore the socket in the meantime ... */
io_event_del(My_Connections[i].sock,
IO_WANTREAD);
continue;
IO_WANTREAD);
continue;
}
+
io_event_add(My_Connections[i].sock, IO_WANTREAD);
}
in_k, out_k);
}
- /* cancel running resolver */
- if (Proc_InProgress(&My_Connections[Idx].res_stat))
- Proc_Kill(&My_Connections[Idx].res_stat);
+ /* Kill possibly running subprocess */
+ if (Proc_InProgress(&My_Connections[Idx].proc_stat))
+ Proc_Kill(&My_Connections[Idx].proc_stat);
/* Servers: Modify time of next connect attempt? */
Conf_UnsetServer( Idx );
identsock = -1;
#endif
if (!Conf_NoDNS)
- Resolve_Addr(&My_Connections[new_sock].res_stat, &new_addr,
+ Resolve_Addr(&My_Connections[new_sock].proc_stat, &new_addr,
identsock, cb_Read_Resolver_Result);
/* ngIRCd waits up to 4 seconds for the result of the asynchronous
My_Connections[Idx].signon = now;
My_Connections[Idx].lastdata = now;
My_Connections[Idx].lastprivmsg = now;
- Proc_InitStruct(&My_Connections[Idx].res_stat);
+ Proc_InitStruct(&My_Connections[Idx].proc_stat);
} /* Init_Conn_Struct */
/* Search associated connection ... */
for( i = 0; i < Pool_Size; i++ ) {
if(( My_Connections[i].sock != NONE )
- && (Proc_GetPipeFd(&My_Connections[i].res_stat) == r_fd))
+ && (Proc_GetPipeFd(&My_Connections[i].proc_stat) == r_fd))
break;
}
if( i >= Pool_Size ) {
}
/* Read result from pipe */
- len = Resolve_Read(&My_Connections[i].res_stat, readbuf, sizeof readbuf -1);
+ len = Resolve_Read(&My_Connections[i].proc_stat, readbuf, sizeof readbuf -1);
if (len == 0)
return;