Author: mjordan Date: Sun Aug 17 18:29:34 2014 New Revision: 421276 URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421276 Log: apps/app_meetme: Fix crash when publishing MeetMe messages with no channel
The same function, meetme_stasis_generate_msg, handles creating and publishing Stasis message both when there are channels in the MeetMe conference and when there are no channels in the conference. When the performance improvement was made to use cached snapshots, this created a situation where Asterisk would crash: obtaining a cached snapshot is not NULL tolerant. This patch restores the previous implementation, which used a NULL safe set of routines to produce a blob containing the channel snapshot (if available) and information about the MeetMe conference. ASTERISK-24234 #close Reported by: Shaun Ruffell Tested by: Shaun Ruffell ........ Merged revisions 421270 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 421273 from http://svn.asterisk.org/svn/asterisk/branches/13 Modified: trunk/ (props changed) trunk/apps/app_meetme.c Propchange: trunk/ ------------------------------------------------------------------------------ Binary property 'branch-13-merged' - no diff available. Modified: trunk/apps/app_meetme.c URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_meetme.c?view=diff&rev=421276&r1=421275&r2=421276 ============================================================================== --- trunk/apps/app_meetme.c (original) +++ trunk/apps/app_meetme.c Sun Aug 17 18:29:34 2014 @@ -1380,7 +1380,13 @@ } } - msg = ast_channel_blob_create_from_cache(ast_channel_uniqueid(chan), message_type, json_object); + if (chan) { + ast_channel_lock(chan); + } + msg = ast_channel_blob_create(chan, message_type, json_object); + if (chan) { + ast_channel_unlock(chan); + } if (!msg) { return; -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits