#include "portab.h"
#include "io.h"
-static char UNUSED id[] = "$Id: conn.c,v 1.201 2006/12/25 01:11:12 fw Exp $";
+static char UNUSED id[] = "$Id: conn.c,v 1.203 2007/02/21 11:06:06 fw Exp $";
#include "imp.h"
#include <assert.h>
{
int res, err;
socklen_t sock_len;
- CLIENT *c;
CONN_ID idx = Socket2Index( sock );
if (idx <= NONE) {
LogDebug("cb_connserver wants to write on unknown socket?!");
Conf_Server[Conf_GetServer(idx)].port,
idx, strerror(err));
- /* Clean up the CLIENT structure (to avoid silly log
- * messages) and call Conn_Close() to do the rest. */
- c = Conn_GetClient(idx);
- if (c)
- Client_DestroyNow(c);
-
- Conn_Close(idx, "Can't connect!", NULL, false);
-
+ Conn_Close(idx, "Can't connect!", NULL, false);
return;
}
if( ! Init_Socket( sock )) return -1;
if (bind(sock, (struct sockaddr *)&addr, (socklen_t)sizeof(addr)) != 0) {
- Log( LOG_CRIT, "Can't bind socket: %s!", strerror( errno ));
+ Log( LOG_CRIT, "Can't bind socket (port %d) : %s!", Port, strerror( errno ));
close( sock );
return -1;
}