You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2006/09/11 14:33:36 UTC
svn commit: r442195 - /webservices/axis2/trunk/c/util/src/date_time.c
Author: samisa
Date: Mon Sep 11 05:33:36 2006
New Revision: 442195
URL: http://svn.apache.org/viewvc?view=rev&rev=442195
Log:
Replaced gmtime, which is not thread safe, with gmtime_r, the thread safe counterpart.
Fix for AXIS2C-277
Modified:
webservices/axis2/trunk/c/util/src/date_time.c
Modified: webservices/axis2/trunk/c/util/src/date_time.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/date_time.c?view=diff&rev=442195&r1=442194&r2=442195
==============================================================================
--- webservices/axis2/trunk/c/util/src/date_time.c (original)
+++ webservices/axis2/trunk/c/util/src/date_time.c Mon Sep 11 05:33:36 2006
@@ -111,6 +111,7 @@
axis2_date_time_impl_t *date_time_impl = NULL;
time_t t;
struct tm* utc_time = NULL;
+ struct tm* utc_time_ret = NULL;
AXIS2_ENV_CHECK(env, NULL);
@@ -124,7 +125,7 @@
}
t = time (NULL ) + offset;
- utc_time = gmtime( &t);
+ utc_time_ret = gmtime_r(&t, utc_time);
date_time_impl-> year= utc_time-> tm_year;
date_time_impl-> mon= utc_time-> tm_mon;
date_time_impl-> day= utc_time-> tm_mday;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org