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 /callerid.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 'callerid.c')
-rwxr-xr-x | callerid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/callerid.c b/callerid.c index f1827b76b..d1a8545f4 100755 --- a/callerid.c +++ b/callerid.c @@ -324,19 +324,19 @@ void callerid_free(struct callerid_state *cid) static int callerid_genmsg(char *msg, int size, char *number, char *name, int flags) { time_t t; - struct tm *tm; + struct tm tm; char *ptr; int res; int i,x; /* Get the time */ time(&t); - tm = localtime(&t); + localtime_r(&t,&tm); ptr = msg; /* Format time and message header */ - res = snprintf(ptr, size, "\001\010%02d%02d%02d%02d", tm->tm_mon + 1, - tm->tm_mday, tm->tm_hour, tm->tm_min); + res = snprintf(ptr, size, "\001\010%02d%02d%02d%02d", tm.tm_mon + 1, + tm.tm_mday, tm.tm_hour, tm.tm_min); size -= res; ptr += res; if (!number || !strlen(number) || (flags & CID_UNKNOWN_NUMBER)) { |