aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_unistim.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-17 13:39:53 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-17 13:39:53 +0000
commit0090b3950d42a727338cb4dbb5269b674757e469 (patch)
tree5bc8fbc64dd055b3b61a28e561e183ee9008f0a3 /channels/chan_unistim.c
parent602260a0ef5451b118d994e3fd85d717bfb6496a (diff)
If no timezone is available use the default message.
(closes issue #11576) Reported by: junky git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93188 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_unistim.c')
-rw-r--r--channels/chan_unistim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index a6742b5f4..53dff56ef 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -5269,10 +5269,10 @@ static struct unistim_device *build_device(const char *cat, const struct ast_var
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 {