/*
- * $Id: main.cc,v 1.111 1996/11/13 06:52:24 wessels Exp $
+ * $Id: main.cc,v 1.112 1996/11/14 02:56:38 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
serverConnectionsOpen(void)
{
struct in_addr addr;
+ struct sockaddr_in xaddr;
u_short port;
int len;
int x;
} else {
theOutIcpConnection = theInIcpConnection;
}
+ memset(&theOutICPAddr, '\0', sizeof(struct in_addr));
len = sizeof(struct sockaddr_in);
+ memset(&xaddr, '\0', len);
x = getsockname(theOutIcpConnection,
- (struct sockaddr *) &theOutICPAddr,
- &len);
+ (struct sockaddr *) &xaddr, &len);
if (x < 0)
debug(1, 1, "theOutIcpConnection FD %d: getsockname: %s\n",
theOutIcpConnection, xstrerror());
+ else
+ theOutICPAddr = xaddr.sin_addr;
}
}
clientdbInit();