[Asterisk-code-review] func_sayfiles: Retrieve say file names (asterisk[master])

N A asteriskteam at digium.com
Tue Aug 24 09:37:53 CDT 2021


Attention is currently required from: Joshua Colp, Kevin Harwell.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16226 )

Change subject: func_sayfiles: Retrieve say file names
......................................................................


Patch Set 14:

(3 comments)

File main/pbx_builtins.c:

https://gerrit.asterisk.org/c/asterisk/+/16226/comment/2f264eff_8abdf087 
PS13, Line 1397: 	if (sscanf(tmp, "%d", &number_val) != 1) {
               : 		ast_log(LOG_WARNING, "argument '%s' to SayOrdinal could not be parsed as a number.\n", tmp);
               : 		return 0;
               : 	}
> Looks like this one got missed. Use the ast_str_to_int here too.
Done


File main/say.c:

https://gerrit.asterisk.org/c/asterisk/+/16226/comment/21d06bca_06ba5033 
PS12, Line 385: fnrecurse = ast_get_number_str((amt / 100), lang);
> This appears to still be a problem
Done


https://gerrit.asterisk.org/c/asterisk/+/16226/comment/448a133d_3a5164b4 
PS12, Line 597: 					fnrecurse = get_number_str_en((num / 1000), lang);
              : 					fnr = ast_str_buffer(fnrecurse);
              : 					ast_str_append(&filenames, 0, (loops == 0 ? "%s" : "&%s"), fnr);
              : 					num %= 1000;
              : 					snprintf(fn, sizeof(fn), (num % 1000 == 0) ? "&digits/h-thousand" : "&digits/thousand");
              : 				} else {
              : 					if (num < 1000000000) {	/* 1,000,000,000 */
              : 						fnrecurse = get_number_str_en((num / 1000000), lang);
              : 						fnr = ast_str_buffer(fnrecurse);
              : 						ast_str_append(&filenames, 0, (loops == 0 ? "%s" : "&%s"), fnr);
              : 						num %= 1000000;
              : 						ast_copy_string(fn, (num % 1000000 == 0) ? "&digits/h-million" : "&digits/million", sizeof(fn));
              : 					} else {
              : 						if (num < INT_MAX) {
              : 							fnrecurse = get_number_str_en((num / 1000000000), lang);
              : 							fnr = ast_str_buffer(fnrecurse);
              : 							ast_str_append(&filenames, 0, (loops == 0 ? "%s" : "&%s"), fnr);
              : 							num %= 1000000000;
              : 							ast_copy_string(fn, (num % 1000000000 == 0) ? "&digits/h-billion" : "&digits/billion", 
> Still need to check if fnrecurse is NULL after retrieving.
Done



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16226
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: If9718c89353b8e153d84add3cc4637b79585db19
Gerrit-Change-Number: 16226
Gerrit-PatchSet: 14
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-CC: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Tue, 24 Aug 2021 14:37:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210824/489add4c/attachment.html>


More information about the asterisk-code-review mailing list