[Asterisk-code-review] res pjsip mwi: Set up unsolicited MWI upon registration. (asterisk[13])

Matt Jordan asteriskteam at digium.com
Tue Jun 23 08:11:56 CDT 2015


Matt Jordan has posted comments on this change.

Change subject: res_pjsip_mwi: Set up unsolicited MWI upon registration.
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/676/2/res/res_pjsip_mwi.c
File res/res_pjsip_mwi.c:

Line 894: 		if (!sub) {
        : 			return 0;
        : 		}
I don't think this will work. sub is only allocated if aggregate_sub is non-zero; otherwise, it points to garbage. I'm surprised a bit that a compiler warning didn't get emitted.

I'd set this to NULL, and only check it on line 903:

if (!aggregate_sub && sub) {
    ...
}

As we should only allocate sub if we don't have an aggregate subscription.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id847b47de4b8b3ab8858455ccc2f07b0f915f252
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list