diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-31 03:19:34 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-31 03:19:34 +0000 |
commit | d53be73ebe9f97b545594f1c2db16926aaddf524 (patch) | |
tree | 06b9e7ecdef28acd64e8fe5614020f23b743687f /channels/chan_mgcp.c | |
parent | e0c466aa42beff5788490914ece124091e8a7da7 (diff) |
Eliminate localtime calls, various cleanups
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@723 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_mgcp.c')
-rwxr-xr-x | channels/chan_mgcp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index fdf6e1dba..09cdfabb0 100755 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -1223,10 +1223,10 @@ static int transmit_notify_request_with_callerid(struct mgcp_endpoint *p, char * char tone2[256]; char *l, *n; time_t t; - struct tm *tm; + struct tm tm; time(&t); - tm = localtime(&t); + localtime_r(&t,&tm); if (callerid) strncpy(cid, callerid, sizeof(cid) - 1); else @@ -1244,7 +1244,7 @@ static int transmit_notify_request_with_callerid(struct mgcp_endpoint *p, char * if (!l) l = ""; snprintf(tone2, sizeof(tone2), "%s,L/ci(%02d/%02d/%02d/%02d,%s,%s)", tone, - tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, l, n); + tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, l, n); strncpy(p->curtone, tone, sizeof(p->curtone) - 1); reqprep(&resp, p, "RQNT"); add_header(&resp, "X", p->txident); |