[asterisk-commits] mjordan: branch group/asterisk-13-sipit r424092 - /team/group/asterisk-13-sip...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 29 03:30:20 CDT 2014


Author: mjordan
Date: Mon Sep 29 03:30:15 2014
New Revision: 424092

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=424092
Log:
res/res_pjsip_pubsub: Try to bail gracefully on persistence error

Modified:
    team/group/asterisk-13-sipit/res/res_pjsip_pubsub.c

Modified: team/group/asterisk-13-sipit/res/res_pjsip_pubsub.c
URL: http://svnview.digium.com/svn/asterisk/team/group/asterisk-13-sipit/res/res_pjsip_pubsub.c?view=diff&rev=424092&r1=424091&r2=424092
==============================================================================
--- team/group/asterisk-13-sipit/res/res_pjsip_pubsub.c (original)
+++ team/group/asterisk-13-sipit/res/res_pjsip_pubsub.c Mon Sep 29 03:30:15 2014
@@ -1361,6 +1361,11 @@
 		ast_sip_pubsub_has_eventlist_support(&rdata));
 	if (PJSIP_IS_STATUS_IN_CLASS(resp, 200)) {
 		sub_tree = create_subscription_tree(handler, endpoint, &rdata, resource, generator, &tree);
+		if (!sub_tree) {
+			ast_sorcery_delete(ast_sip_get_sorcery(), persistence);
+			ast_log(LOG_ERROR, "FAILED to re-create subscription\n");
+			return 0;
+		}
 		sub_tree->persistence = ao2_bump(persistence);
 		subscription_persistence_update(sub_tree, &rdata);
 	} else {




More information about the asterisk-commits mailing list