mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
log ip address of incoming connection in dotted-quad notation.
This commit is contained in:
parent
8821815fb5
commit
9c23a5c65e
1 changed files with 6 additions and 2 deletions
|
@ -382,6 +382,10 @@ int main( int argc, char** argv )
|
|||
int nWorkerThreads = 0;
|
||||
char* conffile = NULL;
|
||||
|
||||
/* Verify sizes here... */
|
||||
assert( sizeof(CookieID) == 4 );
|
||||
|
||||
|
||||
/* Read options. Options trump config file values when they conflict, but
|
||||
the name of the config file is an option so we have to get that
|
||||
first. */
|
||||
|
@ -468,8 +472,8 @@ int main( int argc, char** argv )
|
|||
socklen_t siz = sizeof(newaddr);
|
||||
int newSock = accept( listener, (sockaddr*)&newaddr, &siz );
|
||||
|
||||
unsigned long remoteIP = newaddr.sin_addr.s_addr;
|
||||
logf( "accepting connection from 0x%lx", ntohl( remoteIP ) );
|
||||
logf( "accepting connection from %s",
|
||||
inet_ntoa(newaddr.sin_addr) );
|
||||
|
||||
tPool->AddSocket( newSock );
|
||||
--retval;
|
||||
|
|
Loading…
Add table
Reference in a new issue