[Asterisk-code-review] app_waitforcond: New application (asterisk[16])

Richard Mudgett asteriskteam at digium.com
Wed May 26 15:55:38 CDT 2021


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/15928 )

Change subject: app_waitforcond: New application
......................................................................


Patch Set 4: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/c/asterisk/+/15928/4/apps/app_waitforcond.c 
File apps/app_waitforcond.c:

https://gerrit.asterisk.org/c/asterisk/+/15928/4/apps/app_waitforcond.c@101 
PS4, Line 101: 	char *tmp, *open_bracket, *expression, *optargs = NULL;
tmp is always a lousy variable name.  All variables are temporary.
I usually use the abbreviation 'pos' for position as the name for how you are using this variable.


https://gerrit.asterisk.org/c/asterisk/+/15928/4/apps/app_waitforcond.c@205 
PS4, Line 205: 	while (1) {
It has occurred to me that there is no exit from this loop if chan itself hangs up while it is waiting for the condition to become true.

You need to check the return value of ast_safe_sleep() to determine if chan has hung up while sleeping.



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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I08adf2824b8bc63405778cf355963b5005612f41
Gerrit-Change-Number: 15928
Gerrit-PatchSet: 4
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-CC: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Wed, 26 May 2021 20:55:38 +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/20210526/9633308c/attachment.html>


More information about the asterisk-code-review mailing list