[asterisk-commits] russell: branch 1.4 r82676 - in /branches/1.4: apps/ main/stdtime/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Sep 17 15:16:25 CDT 2007
Author: russell
Date: Mon Sep 17 15:16:25 2007
New Revision: 82676
URL: http://svn.digium.com/view/asterisk?view=rev&rev=82676
Log:
Put a memset in ast_localtime() instead of a couple places in app_voicemail
to prevent the problem everywhere instead of just a couple of places.
(related to issue #10746)
Modified:
branches/1.4/apps/app_voicemail.c
branches/1.4/main/stdtime/localtime.c
Modified: branches/1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_voicemail.c?view=diff&rev=82676&r1=82675&r2=82676
==============================================================================
--- branches/1.4/apps/app_voicemail.c (original)
+++ branches/1.4/apps/app_voicemail.c Mon Sep 17 15:16:25 2007
@@ -1782,8 +1782,6 @@
#else
#define ENDL "\n"
#endif
-
- memset(&tm, 0, sizeof(tm));
gethostname(host, sizeof(host) - 1);
if (strchr(srcemail, '@'))
@@ -2053,7 +2051,6 @@
time_t t;
time(&t);
- memset(&tm, 0, sizeof(tm));
ast_localtime(&t, &tm, NULL);
Modified: branches/1.4/main/stdtime/localtime.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/stdtime/localtime.c?view=diff&rev=82676&r1=82675&r2=82676
==============================================================================
--- branches/1.4/main/stdtime/localtime.c (original)
+++ branches/1.4/main/stdtime/localtime.c Mon Sep 17 15:16:25 2007
@@ -1142,6 +1142,7 @@
struct tm *ast_localtime(const time_t *timep, struct tm *tmp, const char *zone)
{
const struct state *sp = ast_tzset(zone);
+ memset(tmp, 0, sizeof(*tmp));
return sp ? localsub(timep, 0L, tmp, sp) : NULL;
}
More information about the asterisk-commits
mailing list