aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-09-19 00:45:20 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-09-19 00:45:20 +0000
commit65b7674a758892ccef2aadb1af838f58e520d124 (patch)
tree2b9d73a30bb086adaeb5c36ddfb2766eb76f0470
parent6ef4e21ab40420080e72b7c9b0851e2b1731ad46 (diff)
Time zone patch
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1530 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xapps/app_voicemail2.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/apps/app_voicemail2.c b/apps/app_voicemail2.c
index 0ee22fb14..186f26e7e 100755
--- a/apps/app_voicemail2.c
+++ b/apps/app_voicemail2.c
@@ -164,7 +164,7 @@ static void apply_options(struct ast_vm_user *vmu, char *options)
char *s;
char *var, *value;
while((s = strsep(&stringp, "|"))) {
- value = stringp;
+ value = s;
if ((var = strsep(&value, "=")) && value) {
if (!strcasecmp(var, "attach")) {
if (ast_true(value))
@@ -1937,13 +1937,6 @@ static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *v
}
}
- /* If no zone, use a default */
- if (!the_zone) {
- the_zone = alloca(sizeof(struct vm_zone));
- memset(the_zone,0,sizeof(struct vm_zone));
- strncpy(the_zone->msg_format, "'vm-received' q 'digits/at' IMp", sizeof(the_zone->msg_format) - 1);
- }
-
/* No internal variable parsing for now, so we'll comment it out for the time being */
#if 0
/* Set the DIFF_* variables */
@@ -1961,7 +1954,10 @@ static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *v
/* Can't think of how other diffs might be helpful, but I'm sure somebody will think of something. */
#endif
- res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, the_zone->msg_format, the_zone->timezone);
+ if (! the_zone)
+ res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, the_zone->msg_format, the_zone->timezone);
+ else
+ res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' q 'digits/at' IMp", NULL);
#if 0
pbx_builtin_setvar_helper(chan, "DIFF_DAY", NULL);
#endif