[asterisk-commits] twilson: trunk r319530 - in /trunk: ./ apps/app_dial.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 18 15:07:12 CDT 2011


Author: twilson
Date: Wed May 18 15:07:07 2011
New Revision: 319530

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=319530
Log:
Merged revisions 319529 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r319529 | twilson | 2011-05-18 13:05:34 -0700 (Wed, 18 May 2011) | 24 lines
  
  Merged revisions 319528 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r319528 | twilson | 2011-05-18 13:02:06 -0700 (Wed, 18 May 2011) | 17 lines
    
    Merged revisions 319527 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r319527 | twilson | 2011-05-18 12:56:08 -0700 (Wed, 18 May 2011) | 10 lines
      
      Fix app_dial ring groups
      
      Revert part of r315643. We need to remove the datastore here as well.
      The code in bridging code will catch anything that app_dial might miss.
      
      (closes issue #19311)
      Reported by: mspuhler
      Patches: 
            issue_19311_no_answer.diff uploaded by elguero (license 37)
    ........
  ................
................

Modified:
    trunk/   (props changed)
    trunk/apps/app_dial.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dial.c?view=diff&rev=319530&r1=319529&r2=319530
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Wed May 18 15:07:07 2011
@@ -2395,6 +2395,17 @@
 	peer = wait_for_answer(chan, outgoing, &to, peerflags, opt_args, &pa, &num, &result,
 		dtmf_progress, ignore_cc, &forced_clid, &stored_clid);
 
+	/* The ast_channel_datastore_remove() function could fail here if the
+	 * datastore was moved to another channel during a masquerade. If this is
+	 * the case, don't free the datastore here because later, when the channel
+	 * to which the datastore was moved hangs up, it will attempt to free this
+	 * datastore again, causing a crash
+	 */
+	ast_channel_lock(chan);
+	if (!ast_channel_datastore_remove(chan, datastore)) {
+		ast_datastore_free(datastore);
+	}
+	ast_channel_unlock(chan);
 	if (!peer) {
 		if (result) {
 			res = result;




More information about the asterisk-commits mailing list