[Asterisk-code-review] res pjsip pubsub: Correctly implement persisted subscriptions (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Wed Feb 15 12:39:47 CST 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/4916 )

Change subject: res_pjsip_pubsub:  Correctly implement persisted subscriptions
......................................................................


Patch Set 8: Code-Review-1

(4 comments)

https://gerrit.asterisk.org/#/c/4916/8/res/res_pjsip_pubsub.c
File res/res_pjsip_pubsub.c:

PS8, Line 1254: 	ast_debug(3, "Destroying subscription tree %p '%s->%s'\n",
              : 		sub_tree, ast_sorcery_object_get_id(sub_tree->endpoint), sub_tree->root->resource);
A destructor needs to be tolerant of a partially constructed object.  You may not have a sub_tree->endpoint or sub_tree->root set.


Line 1527: 				ao2_ref(sub_tree, -1);
I think this unref should not be here.  It certainly wasn't part of the push_task success or failure before.


Line 3636: 		ao2_cleanup(sub_tree);
Alternate exit needs to not cleanup sub_tree.

i.e., left over ao2_cleanup


PS8, Line 3660: 	ast_debug(3, "sub_tree %p sub_tree state %s\n", sub_tree,
              : 		(sub_tree ? sub_tree_state_description[sub_tree->state] : "UNKNOWN"));
This is redundant with the same message in pubsub_on_refresh_timeout().


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8c605fc1e3923f466a74db087d5ab6f90abce68e
Gerrit-PatchSet: 8
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list