[Asterisk-code-review] app_read: Allow reading # as a digit (asterisk[master])
George Joseph
asteriskteam at digium.com
Wed Aug 25 09:30:24 CDT 2021
Attention is currently required from: N A.
George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16352 )
Change subject: app_read: Allow reading # as a digit
......................................................................
Patch Set 1: Code-Review-1
(3 comments)
Patchset:
PS1:
Rather than changing the prototype of ast_app_getdata() (which you can only do in 19 and master anyway), you should rename the changed function to ast_app_getdata_terminator() and have ast_app_getdata() just be a wrapper that calls ast_app_getdata_terminator() with a NULL or "#" as the last parameter. Besides letting you make this change in 16 and 18, it also removes the need to change the other source files that call ast_app_getdata().
File apps/app_read.c:
https://gerrit.asterisk.org/c/asterisk/+/16352/comment/4b362616_30fec9b3
PS1, Line 78: <option name="p">
You could have this take an argument to specify the terminators to use.
p(*) would terminate on the '*' and p() wouldn't terminate on any digit and let the timeout or maxdigits do the termination. The default would be p(#) of course. Up to you.
File main/app.c:
https://gerrit.asterisk.org/c/asterisk/+/16352/comment/ece16a61_df6ce7cc
PS1, Line 196: * \param terminator A string of characters that may be used as terminators to end input. Typically "#"
This should be below the continuation line for "timeout".
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16352
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I3033432adb9d296ad227e76b540b8b4a2417665b
Gerrit-Change-Number: 16352
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Comment-Date: Wed, 25 Aug 2021 14:30:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210825/8f24fd43/attachment.html>
More information about the asterisk-code-review
mailing list