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

Joshua Colp asteriskteam at digium.com
Tue Jun 8 09:26:07 CDT 2021


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

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


Patch Set 6:

(2 comments)

File apps/app_waitforcond.c:

https://gerrit.asterisk.org/c/asterisk/+/15928/comment/eb927d36_63ca48dd 
PS6, Line 212: 		buffer = ast_malloc(strlen(condition) + 1);
> I was told to avoid ast_strdupa since that would blow the stack. […]
I'm not sure why you would use ast_strdupa here anyway. The result goes into condition. You're not modifying or touching condition after this. As it is you take the contents and copy them to a malloced buffer, just to then const * it to pass to pbx_checkcondition.


https://gerrit.asterisk.org/c/asterisk/+/15928/comment/f46405d8_d8fc0322 
PS6, Line 215: 		if (pbx_checkcondition(cond)) {
> Yeah, got a warning that pbx_checkcondition needed a constant argument.
I just made the change to pass condition in here (removing buffer and cond) and did not get such a message.



-- 
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: 6
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Attention: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Tue, 08 Jun 2021 14:26:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210608/53cacda6/attachment-0001.html>


More information about the asterisk-code-review mailing list