[asterisk-commits] file: branch file/pjsip-subscription-persistence r415337 - /team/file/pjsip-s...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 6 11:15:48 CDT 2014


Author: file
Date: Fri Jun  6 11:15:42 2014
New Revision: 415337

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=415337
Log:
Fix a bug where parsing a packet into rdata could crash, and allow the location for
persistence to be configured in sorcery.

Modified:
    team/file/pjsip-subscription-persistence/res/res_pjsip_pubsub.c

Modified: team/file/pjsip-subscription-persistence/res/res_pjsip_pubsub.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pjsip-subscription-persistence/res/res_pjsip_pubsub.c?view=diff&rev=415337&r1=415336&r2=415337
==============================================================================
--- team/file/pjsip-subscription-persistence/res/res_pjsip_pubsub.c (original)
+++ team/file/pjsip-subscription-persistence/res/res_pjsip_pubsub.c Fri Jun  6 11:15:42 2014
@@ -409,7 +409,7 @@
 	ast_copy_string(rdata.pkt_info.src_name, persistence->src_name, sizeof(rdata.pkt_info.src_name));
 	rdata.pkt_info.src_port = persistence->src_port;
 
-	pjsip_parse_rdata(persistence->packet, sizeof(persistence->packet), &rdata);
+	pjsip_parse_rdata(persistence->packet, strlen(persistence->packet), &rdata);
 	if (!rdata.msg_info.msg) {
 		return 0;
 	}
@@ -1862,7 +1862,7 @@
 		return AST_MODULE_LOAD_FAILURE;
 	}
 
-
+	ast_sorcery_apply_config(sorcery, "res_pjsip_pubsub");
 	ast_sorcery_apply_default(sorcery, "subscription_persistence", "astdb", "subscription_persistence");
 	if (ast_sorcery_object_register(sorcery, "subscription_persistence", subscription_persistence_alloc,
 		NULL, NULL)) {




More information about the asterisk-commits mailing list