commit - a29308802730068270e5032831ea56e2a4fac74b
commit + 4b2f966b7e9215760318ab863202ffb2ac88b345
blob - e2b90a23f6c96f7392706931486d8f366abe46db
blob + 8f0675ceacc4ccd696b36f082071c9069b1edf14
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
#include "portab.h"
#include "io.h"
-static char UNUSED id[] = "$Id: conn.c,v 1.185 2005/11/21 15:06:37 alex Exp $";
+static char UNUSED id[] = "$Id: conn.c,v 1.186 2005/12/09 09:26:55 fw Exp $";
#include "imp.h"
#include <assert.h>
/* Read result from pipe */
len = Resolve_Read(&My_Connections[i].res_stat, readbuf, sizeof readbuf -1);
- if (len == 0)
- return;
+ if (len == 0)
+ goto out;
readbuf[len] = '\0';
identptr = strchr(readbuf, '\n');
assert(identptr != NULL);
if (!identptr) {
Log( LOG_CRIT, "Resolver: Got malformed result!");
- return;
+ goto out;
}
*identptr = '\0';
/* Reset penalty time */
Conn_ResetPenalty( i );
+ return;
+out:
+ if (My_Connections[i].sock == SERVER_WAIT) {
+ n = Conf_GetServer( i );
+ assert(n > NONE );
+ if (n > NONE) {
+ Conf_Server[n].conn_id = NONE;
+ Init_Conn_Struct(i);
+ }
+ }
} /* cb_Read_Resolver_Result */