[asterisk-commits] mmichelson: branch mmichelson/pubsub_bodies r406036 - /team/mmichelson/pubsub...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 21 13:15:45 CST 2014


Author: mmichelson
Date: Tue Jan 21 13:15:40 2014
New Revision: 406036

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406036
Log:
Fix crash in solicited MWI notification.

Previously, the pjsip_media_type structure used an initializer,
which zeroed out the parts of the struct that we do did not set.
This change adds the struct initializer back so that the struct
is zeroed out entirely when it is declared.


Modified:
    team/mmichelson/pubsub_bodies/res/res_pjsip_mwi.c

Modified: team/mmichelson/pubsub_bodies/res/res_pjsip_mwi.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pubsub_bodies/res/res_pjsip_mwi.c?view=diff&rev=406036&r1=406035&r2=406036
==============================================================================
--- team/mmichelson/pubsub_bodies/res/res_pjsip_mwi.c (original)
+++ team/mmichelson/pubsub_bodies/res/res_pjsip_mwi.c Tue Jan 21 13:15:40 2014
@@ -379,7 +379,7 @@
 	const char *subtype = sub->is_solicited ?
 		ast_sip_subscription_get_body_subtype(sub->sip_sub) :
 		MWI_SUBTYPE;
-	pjsip_media_type mwi_type;
+	pjsip_media_type mwi_type = { { 0,}, };
 
 	ao2_callback(sub->stasis_subs, OBJ_NODATA, get_message_count, &counter);
 
@@ -397,7 +397,7 @@
 	pj_cstr(&mwi_type.type, type);
 	pj_cstr(&mwi_type.subtype, subtype);
 
-	ast_debug(5, "Sending  %s MWI NOTIFY to endpoint %s, new messages: %d, old messages: %d\n",
+	ast_debug(5, "Sending %s MWI NOTIFY to endpoint %s, new messages: %d, old messages: %d\n",
 			sub->is_solicited ? "solicited" : "unsolicited", sub->id, counter.new_msgs,
 			counter.old_msgs);
 




More information about the asterisk-commits mailing list