From: Zoran V. <vas...@us...> - 2005-04-21 20:26:46
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13613 Modified Files: httptime.c Log Message: Fixed non-mt-safe usage of timegm() call. Index: httptime.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/httptime.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** httptime.c 16 Feb 2005 08:40:29 -0000 1.1.1.1 --- httptime.c 21 Apr 2005 20:26:37 -0000 1.2 *************** *** 57,60 **** --- 57,64 ---- }; + #ifdef HAVE_TIMEGM + static Ns_Mutex lock; + #endif + /* *************** *** 241,245 **** --- 245,251 ---- tm.tm_isdst = 0; #ifdef HAVE_TIMEGM + Ns_MutexLock(&lock); t = timegm(&tm); + Ns_MutexUnlock(&lock); #else t = mktime(&tm) - timezone; |