[svn-commits] kharwell: branch kharwell/pimp_sip_state r391920 - in /team/kharwell/pimp_sip...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jun 14 17:53:03 CDT 2013


Author: kharwell
Date: Fri Jun 14 17:53:01 2013
New Revision: 391920

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=391920
Log:
on pbx shutdown do a cleanup instead of atexit - causing problems with deactivation of hints in the res_sip_exten_state module

Modified:
    team/kharwell/pimp_sip_state/main/pbx.c
    team/kharwell/pimp_sip_state/res/res_sip_exten_state.c

Modified: team/kharwell/pimp_sip_state/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_state/main/pbx.c?view=diff&rev=391920&r1=391919&r2=391920
==============================================================================
--- team/kharwell/pimp_sip_state/main/pbx.c (original)
+++ team/kharwell/pimp_sip_state/main/pbx.c Fri Jun 14 17:53:01 2013
@@ -11875,7 +11875,7 @@
 	hintdevices = ao2_container_alloc(HASH_EXTENHINT_SIZE, hintdevice_hash_cb, hintdevice_cmp_multiple);
 	statecbs = ao2_container_alloc(1, NULL, statecbs_cmp);
 
-	ast_register_atexit(pbx_shutdown);
+	ast_register_cleanup(pbx_shutdown);
 
 	return (hints && hintdevices && statecbs) ? 0 : -1;
 }

Modified: team/kharwell/pimp_sip_state/res/res_sip_exten_state.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_state/res/res_sip_exten_state.c?view=diff&rev=391920&r1=391919&r2=391920
==============================================================================
--- team/kharwell/pimp_sip_state/res/res_sip_exten_state.c (original)
+++ team/kharwell/pimp_sip_state/res/res_sip_exten_state.c Fri Jun 14 17:53:01 2013
@@ -129,11 +129,11 @@
 		pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_ACCEPT, NULL);
 
 	exten_state_sub->body_types_count = hdr->count;
-	exten_state_sub->body_types = ast_malloc(hdr->count * sizeof(char));
+	exten_state_sub->body_types = ast_malloc(hdr->count * sizeof(char*));
 
 	for (i = 0; i < hdr->count; ++i) {
 		exten_state_sub->body_types[i] =
-			ast_malloc(hdr->values[i].slen * sizeof(char) + 1);
+			ast_malloc(hdr->values[i].slen * sizeof(char*) + 1);
 
 		ast_copy_string(exten_state_sub->body_types[i],
 				pj_strbuf(&hdr->values[i]), hdr->values[i].slen + 1);




More information about the svn-commits mailing list