[asterisk-commits] elguero: branch 11 r383631 - /branches/11/apps/app_mixmonitor.c

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


Author: elguero
Date: Fri Mar 22 15:41:40 2013
New Revision: 383631

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383631
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/

Modified:
    branches/11/apps/app_mixmonitor.c

Modified: branches/11/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/app_mixmonitor.c?view=diff&rev=383631&r1=383630&r2=383631
==============================================================================
--- branches/11/apps/app_mixmonitor.c (original)
+++ branches/11/apps/app_mixmonitor.c Fri Mar 22 15:41:40 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