[svn-commits] russell: trunk r69360 - in /trunk: ./ main/say.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Jun 14 14:09:22 MST 2007


Author: russell
Date: Thu Jun 14 16:09:22 2007
New Revision: 69360

URL: http://svn.digium.com/view/asterisk?view=rev&rev=69360
Log:
Merged revisions 69358 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r69358 | russell | 2007-06-14 16:08:23 -0500 (Thu, 14 Jun 2007) | 3 lines

Fix some problems with saying dates and times for the "tw" langauge
(issue #9964, ljmid)

........

Modified:
    trunk/   (props changed)
    trunk/main/say.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/say.c
URL: http://svn.digium.com/view/asterisk/trunk/main/say.c?view=diff&rev=69360&r1=69359&r2=69360
==============================================================================
--- trunk/main/say.c (original)
+++ trunk/main/say.c Thu Jun 14 16:09:22 2007
@@ -5336,7 +5336,7 @@
 	char sndfile[256], nextmsg[256];
 
 	if (format == NULL)
-		format = "YBdA 'digits/at' HM";
+		format = "YBdAkM";
 
 	ast_localtime(&time,&tm,timezone);
 
@@ -5375,16 +5375,17 @@
 			case 'e':
 				/* First - Thirtyfirst */
 				if (!(tm.tm_mday % 10) || (tm.tm_mday < 10)) {
-					snprintf(nextmsg,sizeof(nextmsg), "digits/h-%d", tm.tm_mday);
+					snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_mday);
 					res = wait_file(chan,ints,nextmsg,lang);
 				} else {
-					snprintf(nextmsg,sizeof(nextmsg), "digits/h-%dh", tm.tm_mday - (tm.tm_mday % 10));
+					snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_mday - (tm.tm_mday % 10));
 					res = wait_file(chan,ints,nextmsg,lang);
 					if (!res) {
-						snprintf(nextmsg,sizeof(nextmsg), "digits/h-%d", tm.tm_mday % 10);
+						snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_mday % 10);
 						res = wait_file(chan,ints,nextmsg,lang);
 					}
 				}
+                if(!res) res = wait_file(chan,ints,"ri",lang);
 				break;
 			case 'Y':
 				/* Year */
@@ -5454,12 +5455,12 @@
 				}
 				break;
 			case 'H':
+                if (tm.tm_hour < 10) {
+                    res = wait_file(chan, ints, "digits/0", lang);
+                }
 			case 'k':
 				/* 24-Hour */
 				if (!(tm.tm_hour % 10) || tm.tm_hour < 10) {
-					if (tm.tm_hour < 10) {
-						res = wait_file(chan, ints, "digits/0", lang);
-					}
 					snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour);
 					res = wait_file(chan,ints,nextmsg,lang);
 				} else {
@@ -5560,7 +5561,7 @@
 				}
 				break;
 			case 'R':
-				res = ast_say_date_with_format_tw(chan, time, ints, lang, "HM", timezone);
+				res = ast_say_date_with_format_tw(chan, time, ints, lang, "kM", timezone);
 				break;
 			case 'S':
 				/* Seconds */



More information about the svn-commits mailing list