diff options
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 c89ead79f..2092dfd64 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -2874,9 +2874,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 9c3161b77..c55f38976 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -2237,7 +2237,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 e33d1a1d2..781431ce2 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) { |