[asterisk-commits] elguero: trunk r383632 - in /trunk: ./ apps/app_mixmonitor.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 22 15:43:28 CDT 2013


Author: elguero
Date: Fri Mar 22 15:43:24 2013
New Revision: 383632

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383632
Log:
Fix StopMixMonitor Hanging Up When Unable To Stop MixMonitor On A Channel

A regression was accidentally introduced when allowing an optional ID to be used
when calling StopMixMonitor.  When we are unable to stop MixMonitor on a
channel, -1 is being returned which triggers the hangup of the channel.

This patch restores the prior behavior by returning 0 whether we were successful
or not.  It also allows the call from the manager to use the return code when
the action fails.

(closes issue ASTERISK-2294)
Reported by: daroz
Tested by: daroz
Patches:
  asterisk-21294-stop_mixmonitor_hangingup.diff Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2404/
........

Merged revisions 383631 from http://svn.asterisk.org/svn/asterisk/branches/11

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

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

Modified: trunk/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_mixmonitor.c?view=diff&rev=383632&r1=383631&r2=383632
==============================================================================
--- trunk/apps/app_mixmonitor.c (original)
+++ trunk/apps/app_mixmonitor.c Fri Mar 22 15:43:24 2013
@@ -1042,7 +1042,7 @@
 	return 0;
 }
 
-static int stop_mixmonitor_exec(struct ast_channel *chan, const char *data)
+static int stop_mixmonitor_full(struct ast_channel *chan, const char *data)
 {
 	struct ast_datastore *datastore = NULL;
 	char *parse = "";
@@ -1093,6 +1093,12 @@
 	}
 	ast_channel_unlock(chan);
 
+	return 0;
+}
+
+static int stop_mixmonitor_exec(struct ast_channel *chan, const char *data)
+{
+	stop_mixmonitor_full(chan, data);
 	return 0;
 }
 
@@ -1315,7 +1321,7 @@
 		return AMI_SUCCESS;
 	}
 
-	res = stop_mixmonitor_exec(c, mixmonitor_id);
+	res = stop_mixmonitor_full(c, mixmonitor_id);
 
 	if (res) {
 		astman_send_error(s, m, "Could not stop monitoring channel");




More information about the asterisk-commits mailing list