diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 21:50:40 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 21:50:40 +0000 |
commit | a45f0ce8a0fded7acff845122856b8b92e8a1e00 (patch) | |
tree | 970b4536445781a1e3046fb0f2fc3c1d10eab080 /channels | |
parent | eaff648d9b225be366870aade0617c6d8ca2a121 (diff) |
use ast_localtime() in every place localtime_r() was being used
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69392 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_iax2.c | 3 | ||||
-rw-r--r-- | channels/chan_mgcp.c | 2 | ||||
-rw-r--r-- | channels/chan_phone.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 64a43df98..d3e0a7e70 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -2761,9 +2761,10 @@ static unsigned int iax2_datetime(const char *tz) struct tm tm; unsigned int tmp; time(&t); - localtime_r(&t, &tm); if (!ast_strlen_zero(tz)) ast_localtime(&t, &tm, tz); + else + ast_localtime(&t, &tm, NULL); tmp = (tm.tm_sec >> 1) & 0x1f; /* 5 bits of seconds */ tmp |= (tm.tm_min & 0x3f) << 5; /* 6 bits of minutes */ tmp |= (tm.tm_hour & 0x1f) << 11; /* 5 bits of hours */ diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 079c6b56e..bda08d7a3 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -2214,7 +2214,7 @@ static int transmit_notify_request_with_callerid(struct mgcp_subchannel *sub, ch struct mgcp_endpoint *p = sub->parent; time(&t); - localtime_r(&t,&tm); + ast_localtime(&t, &tm, NULL); n = callername; l = callernum; if (!n) diff --git a/channels/chan_phone.c b/channels/chan_phone.c index 961ec78b3..d5b4500a9 100644 --- a/channels/chan_phone.c +++ b/channels/chan_phone.c @@ -295,7 +295,7 @@ static int phone_call(struct ast_channel *ast, char *dest, int timeout) int start; time(&UtcTime); - localtime_r(&UtcTime,&tm); + ast_localtime(&UtcTime, &tm, NULL); memset(&cid, 0, sizeof(PHONE_CID)); if(&tm != NULL) { |