[Asterisk-cvs] asterisk/apps app_voicemail2.c,1.48,1.49

markster at lists.digium.com markster at lists.digium.com
Thu Sep 18 19:44:11 CDT 2003


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv26150/apps

Modified Files:
	app_voicemail2.c 
Log Message:
Time zone patch


Index: app_voicemail2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail2.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- app_voicemail2.c	13 Sep 2003 20:51:48 -0000	1.48
+++ app_voicemail2.c	19 Sep 2003 00:45:20 -0000	1.49
@@ -164,7 +164,7 @@
 	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 @@
 		}
 	}
 
-	/* 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 @@
 
 	/* 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




More information about the svn-commits mailing list