[asterisk-commits] file: trunk r93188 - /trunk/channels/chan_unistim.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Dec 17 07:39:54 CST 2007
Author: file
Date: Mon Dec 17 07:39:53 2007
New Revision: 93188
URL: http://svn.digium.com/view/asterisk?view=rev&rev=93188
Log:
If no timezone is available use the default message.
(closes issue #11576)
Reported by: junky
Modified:
trunk/channels/chan_unistim.c
Modified: trunk/channels/chan_unistim.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=93188&r1=93187&r2=93188
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Mon Dec 17 07:39:53 2007
@@ -5269,10 +5269,10 @@
if (ast_strlen_zero(d->maintext1))
strcpy(d->maintext1, d->name);
if (ast_strlen_zero(d->titledefault)) {
- struct ast_tm tm;
+ struct ast_tm tm = { 0, };
struct timeval cur_time = ast_tvnow();
- if ((ast_localtime(&cur_time, &tm, 0)) == 0) {
+ if ((ast_localtime(&cur_time, &tm, 0)) == 0 || ast_strlen_zero(tm.tm_zone)) {
display_last_error("Error in ast_localtime()");
ast_copy_string(d->titledefault, "UNISTIM for*", 12);
} else {
More information about the asterisk-commits
mailing list