From: Zoran V. <vas...@us...> - 2006-01-04 14:08:25
|
Update of /cvsroot/naviserver/naviserver/nsthread In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15762/nsthread Modified Files: reentrant.c Log Message: * configure.in: added test for inet_ntop. * nsthread/reentrant.c: use inet_ntop when available which fixes a bug on 64 bit ppc, at least under linux. * nsd/conn.c: added option to [ns_conn] to set/query contentsentlength for getting the correct length into the logfile, when files are delivered via event driven I/O. Thanks to Gustaf Neumann for providing above fixes. Index: reentrant.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsthread/reentrant.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** reentrant.c 10 Jun 2005 17:58:59 -0000 1.2 --- reentrant.c 4 Jan 2006 14:08:03 -0000 1.3 *************** *** 73,76 **** --- 73,79 ---- { Tls *tlsPtr = GetTls(); + #if defined(HAVE_INET_NTOP) + inet_ntop(AF_INET, &addr, tlsPtr->nabuf, sizeof(tlsPtr->nabuf)); + #else union { unsigned long l; *************** *** 80,83 **** --- 83,87 ---- u.l = (unsigned long) addr.s_addr; sprintf(tlsPtr->nabuf, "%u.%u.%u.%u", u.b[0], u.b[1], u.b[2], u.b[3]); + #endif return tlsPtr->nabuf; } |