[Asterisk-code-review] res pjsip pubsub: Hold module reference for publications. (asterisk[13])
Joshua Colp
asteriskteam at digium.com
Mon Jul 2 05:56:26 CDT 2018
Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/9318
Change subject: res_pjsip_pubsub: Hold module reference for publications.
......................................................................
res_pjsip_pubsub: Hold module reference for publications.
Incoming publications need to ensure that the module remains
loaded for the lifetime of them. This is now done by holding
a reference to the module while the publication exists. This
mirrors that of inbound subscriptions.
ASTERISK-27783
Change-Id: Ia98c95a15e11af25728d5fb3e56e12cda0cfc7c0
---
M res/res_pjsip_pubsub.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/18/9318/1
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index 4526e02..fd83a39 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -3161,6 +3161,8 @@
ao2_cleanup(publication->datastores);
ao2_cleanup(publication->endpoint);
+
+ ast_module_unref(ast_module_info->self);
}
static struct ast_sip_publication *sip_create_publication(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata,
@@ -3192,6 +3194,8 @@
dst += resource_len;
publication->event_configuration_name = strcpy(dst, event_configuration_name);
+ ast_module_ref(ast_module_info->self);
+
return publication;
}
--
To view, visit https://gerrit.asterisk.org/9318
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia98c95a15e11af25728d5fb3e56e12cda0cfc7c0
Gerrit-Change-Number: 9318
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180702/9d3a25bc/attachment-0001.html>
More information about the asterisk-code-review
mailing list