[Asterisk-code-review] say: Abort play loop if caller hangs up. (asterisk[master])

Kevin Harwell asteriskteam at digium.com
Thu Jun 2 12:58:57 CDT 2022


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

Change subject: say: Abort play loop if caller hangs up.
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

File main/say.c:

https://gerrit.asterisk.org/c/asterisk/+/18575/comment/55c5776d_2bd21fed 
PS2, Line 200: 			if (res > 0) {
Perhaps this should be changed to if (!res)?


https://gerrit.asterisk.org/c/asterisk/+/18575/comment/0bc206c8_12153d60 
PS2, Line 206: 		if (res < 0) {
             : 			break;
             : 		}
This now makes it possible to break out of the loop without stopping the stream if an error occurs in one of the waitstream calls. This should be done after ast_stopstream. If going to move there though I think you can just add an  "&& !res" to the while loop instead.

Or just change if (res > 0) as mentioned above?



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I55e85be28ee90b48c0fe4ce20ac136a7dbb49f14
Gerrit-Change-Number: 18575
Gerrit-PatchSet: 2
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-CC: Sean Bright <sean at seanbright.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Comment-Date: Thu, 02 Jun 2022 17:58:57 +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/20220602/c571efaa/attachment.html>


More information about the asterisk-code-review mailing list