[svn-commits] qwell: branch qwell/ari_channel_mute r394090 - in /team/qwell/ari_channel_mut...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 11 11:15:06 CDT 2013


Author: qwell
Date: Thu Jul 11 11:15:05 2013
New Revision: 394090

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394090
Log:
Address review feedback.

Modified:
    team/qwell/ari_channel_mute/include/asterisk/channel.h
    team/qwell/ari_channel_mute/main/channel.c
    team/qwell/ari_channel_mute/res/stasis/control.c

Modified: team/qwell/ari_channel_mute/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/team/qwell/ari_channel_mute/include/asterisk/channel.h?view=diff&rev=394090&r1=394089&r2=394090
==============================================================================
--- team/qwell/ari_channel_mute/include/asterisk/channel.h (original)
+++ team/qwell/ari_channel_mute/include/asterisk/channel.h Thu Jul 11 11:15:05 2013
@@ -4379,14 +4379,18 @@
  */
 void ast_channel_name_to_dial_string(char *channel_name);
 
-#define AST_MUTE_DIRECTION_READ (1 << 0)
-#define AST_MUTE_DIRECTION_WRITE (1 << 1)
-
-/*!
- * \brief Suppress a stream on a channel
+enum ast_mute_direction {
+	AST_MUTE_DIRECTION_READ = (1 << 0),
+	AST_MUTE_DIRECTION_WRITE = (1 << 1),
+};
+
+/*!
+ * \brief Suppress passing of a frame type on a channel
+ *
+ * \note The channel should be locked before calling this function.
  *
  * \param chan The channel to suppress
- * \param direction The direction of the stream to suppress
+ * \param direction The direction in which to suppress
  * \param frametype The type of frame (AST_FRAME_VOICE, etc) to suppress
  *
  * \retval 0 Success
@@ -4395,10 +4399,12 @@
 int ast_channel_suppress(struct ast_channel *chan, unsigned int direction, enum ast_frame_type frametype);
 
 /*!
- * \brief Stop suppressing a stream on a channel
+ * \brief Stop suppressing of a frame type on a channel
+ *
+ * \note The channel should be locked before calling this function.
  *
  * \param chan The channel to stop suppressing
- * \param direction The direction of the stream to stop suppressing
+ * \param direction The direction in which to stop suppressing
  * \param frametype The type of frame (AST_FRAME_VOICE, etc) to stop suppressing
  *
  * \retval 0 Success

Modified: team/qwell/ari_channel_mute/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/ari_channel_mute/main/channel.c?view=diff&rev=394090&r1=394089&r2=394090
==============================================================================
--- team/qwell/ari_channel_mute/main/channel.c (original)
+++ team/qwell/ari_channel_mute/main/channel.c Thu Jul 11 11:15:05 2013
@@ -10501,8 +10501,6 @@
 
 int ast_channel_suppress(struct ast_channel *chan, unsigned int direction, enum ast_frame_type frametype)
 {
-	SCOPED_CHANNELLOCK(lockvar, chan);
-
 	RAII_VAR(struct suppress_data *, suppress, NULL, ao2_cleanup);
 	const struct ast_datastore_info *datastore_info = NULL;
 	struct ast_datastore *datastore = NULL;

Modified: team/qwell/ari_channel_mute/res/stasis/control.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/ari_channel_mute/res/stasis/control.c?view=diff&rev=394090&r1=394089&r2=394090
==============================================================================
--- team/qwell/ari_channel_mute/res/stasis/control.c (original)
+++ team/qwell/ari_channel_mute/res/stasis/control.c Thu Jul 11 11:15:05 2013
@@ -217,6 +217,7 @@
 	struct ast_channel *chan, void *data)
 {
 	RAII_VAR(struct stasis_app_control_mute_data *, mute_data, data, ast_free);
+	SCOPED_CHANNELLOCK(lockvar, chan);
 
 	ast_channel_suppress(control->channel, mute_data->direction, mute_data->frametype);
 
@@ -243,6 +244,7 @@
 	struct ast_channel *chan, void *data)
 {
 	RAII_VAR(struct stasis_app_control_mute_data *, mute_data, data, ast_free);
+	SCOPED_CHANNELLOCK(lockvar, chan);
 
 	ast_channel_unsuppress(control->channel, mute_data->direction, mute_data->frametype);
 




More information about the svn-commits mailing list