[Asterisk-code-review] res pjsip pubsub: Fix assertion when UAS dialog creation fails. (asterisk[13])
Joshua Colp
asteriskteam at digium.com
Thu Oct 29 08:32:57 CDT 2015
Joshua Colp has uploaded a new change for review.
https://gerrit.asterisk.org/1540
Change subject: res_pjsip_pubsub: Fix assertion when UAS dialog creation fails.
......................................................................
res_pjsip_pubsub: Fix assertion when UAS dialog creation fails.
When compiled with assertions enabled one will occur when destroying
the subscription tree when UAS dialog creation fails. This is because
the code assumes that a dialog will always exist on a subscription
tree when in reality during this specific scenario it won't.
This change makes it so a dialog is not removed from the subscription
tree if it is not present.
ASTERISK-25505 #close
Change-Id: Id5c182b055aacc5e66c80546c64804ce19218dee
---
M res/res_pjsip_pubsub.c
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/40/1540/1
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index cbedaf2..99376b1 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -1208,7 +1208,10 @@
destroy_subscriptions(sub_tree->root);
- ast_sip_push_task_synchronous(sub_tree->serializer, subscription_unreference_dialog, sub_tree);
+ if (sub_tree->dlg) {
+ ast_sip_push_task_synchronous(sub_tree->serializer, subscription_unreference_dialog, sub_tree);
+ }
+
ast_taskprocessor_unreference(sub_tree->serializer);
ast_module_unref(ast_module_info->self);
}
--
To view, visit https://gerrit.asterisk.org/1540
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5c182b055aacc5e66c80546c64804ce19218dee
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
More information about the asterisk-code-review
mailing list