From: <api...@us...> - 2006-03-28 17:56:35
|
Update of /cvsroot/aolserver/nsopenssl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15575 Modified Files: nsopenssl.h ssl.c sslcontext.c Log Message: Replace Unix-only gettimeofday() with Tcl_GetTime(), fixes SF bug #1040291, nsopenssl now works on MS Windows. Index: nsopenssl.h =================================================================== RCS file: /cvsroot/aolserver/nsopenssl/nsopenssl.h,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** nsopenssl.h 14 Apr 2004 17:02:53 -0000 1.68 --- nsopenssl.h 28 Mar 2006 17:56:30 -0000 1.69 *************** *** 149,153 **** int recvwait; int type; /* CORE or TCLAPI */ ! struct timeval timer; /* for performance measurement */ struct Ns_Driver *driver; /* the core sock driver this conn belongs to */ struct NsOpenSSLDriver *ssldriver; /* the SSL driver this conn belongs to */ --- 149,153 ---- int recvwait; int type; /* CORE or TCLAPI */ ! struct Tcl_Time timer; /* for performance measurement */ struct Ns_Driver *driver; /* the core sock driver this conn belongs to */ struct NsOpenSSLDriver *ssldriver; /* the SSL driver this conn belongs to */ Index: ssl.c =================================================================== RCS file: /cvsroot/aolserver/nsopenssl/ssl.c,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** ssl.c 17 Feb 2005 16:45:57 -0000 1.69 --- ssl.c 28 Mar 2006 17:56:30 -0000 1.70 *************** *** 41,45 **** --- 41,49 ---- #include "nsopenssl.h" + #ifdef _WIN32 + /* Appear not to need <winsock2.h> here. */ + #else #include <netinet/tcp.h> + #endif /* XXX put into defaults.h */ *************** *** 128,132 **** /* It's GMT, but we use this to do time diffs */ ! gettimeofday(&sslconn->timer, NULL); /* --- 132,136 ---- /* It's GMT, but we use this to do time diffs */ ! Tcl_GetTime(&sslconn->timer); /* Index: sslcontext.c =================================================================== RCS file: /cvsroot/aolserver/nsopenssl/sslcontext.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** sslcontext.c 20 Nov 2004 06:42:54 -0000 1.10 --- sslcontext.c 28 Mar 2006 17:56:30 -0000 1.11 *************** *** 1871,1875 **** char *alertDescPrefix = NULL; char *alertDesc = NULL; ! struct timeval previoustime; unsigned long seconds; unsigned long microseconds; --- 1871,1875 ---- char *alertDescPrefix = NULL; char *alertDesc = NULL; ! struct Tcl_Time previoustime; unsigned long seconds; unsigned long microseconds; *************** *** 1889,1899 **** /* Update the timer */ ! gettimeofday(&sslconn->timer, NULL); /* Find the difference in seconds */ ! seconds = sslconn->timer.tv_sec - previoustime.tv_sec; /* Find the difference in microseconds */ ! microseconds = sslconn->timer.tv_usec - previoustime.tv_usec; /* Convert the difference in seconds to microseconds and add */ --- 1889,1899 ---- /* Update the timer */ ! Tcl_GetTime(&sslconn->timer); /* Find the difference in seconds */ ! seconds = sslconn->timer.sec - previoustime.sec; /* Find the difference in microseconds */ ! microseconds = sslconn->timer.usec - previoustime.usec; /* Convert the difference in seconds to microseconds and add */ |