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

Matt Jordan asteriskteam at digium.com
Tue Jun 23 06:54:38 CDT 2015


Matt Jordan has posted comments on this change.

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


Patch Set 1: Code-Review-1

(2 comments)

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

Line 890: 		struct mwi_subscription *sub = aggregate_sub ?:
        : 			mwi_subscription_alloc(endpoint, 0, NULL);
While this already existed, we never check to see if the allocation of 'sub' succeeded before linking it into the unsolicited_mwi container.


Line 899: 		if (!aggregate_sub) {
        : 			ao2_link_flags(unsolicited_mwi, sub, OBJ_NOLOCK);
        : 			ao2_cleanup(sub);
        : 		}
I'd check that sub was allocated correctly here as well, and ao2_ref(sub, -1) instead of ao2_cleanup.


-- 
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: 1
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