[Asterisk-code-review] funcs/func holdintercept: Actually add the HOLD INTERCEPT fu... (asterisk[master])

Matt Jordan asteriskteam at digium.com
Tue Oct 20 19:03:40 CDT 2015


Matt Jordan has posted comments on this change.

Change subject: funcs/func_holdintercept: Actually add the HOLD_INTERCEPT function
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.asterisk.org/#/c/1454/2/funcs/func_holdintercept.c
File funcs/func_holdintercept.c:

Line 120: 	if (frame_type != AST_CONTROL_HOLD && frame_type != AST_CONTROL_UNHOLD) {
> You should be checking that f->frametype != AST_FRAME_CONTROL before checki
Actually, looking at the code again, while I'll do this, it isn't necessary.

This isn't a union any longer. As such, if frame_type is not AST_FRAME_CONTROL, then the frame should be 0.

I suppose in an incredibly rare, extreme case, the frame could be uninitialized, *and* that uninitialized value is the same as the values for HOLD or UNHOLD, but that should never happen due to frames being inevitably dup'd and calloc'd (or memset'd) before they ever get into a framehook.


-- 
To view, visit https://gerrit.asterisk.org/1454
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ida38278f259dd07c334a36f9b7d5475b5db72396
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list