[asterisk-commits] app confbridge.c: Replace inlined code with existing function. (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Feb 5 11:49:39 CST 2016
Joshua Colp has submitted this change and it was merged.
Change subject: app_confbridge.c: Replace inlined code with existing function.
......................................................................
app_confbridge.c: Replace inlined code with existing function.
Change-Id: Ida5594e9f8d7c1fc18eeb733a11f8fb96326da51
---
M apps/app_confbridge.c
1 file changed, 26 insertions(+), 40 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Mark Michelson: Looks good to me, approved
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index ad2a511..c00fef8 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -1086,6 +1086,31 @@
ast_channel_name(user->chan));
}
+/*
+ * \internal
+ * \brief Mute/unmute a single user.
+ */
+static void generic_mute_unmute_user(struct confbridge_conference *conference, struct confbridge_user *user, int mute)
+{
+ /* Set user level mute request. */
+ user->muted = mute ? 1 : 0;
+
+ conf_update_user_mute(user);
+ ast_test_suite_event_notify("CONF_MUTE",
+ "Message: participant %s %s\r\n"
+ "Conference: %s\r\n"
+ "Channel: %s",
+ ast_channel_name(user->chan),
+ mute ? "muted" : "unmuted",
+ conference->b_profile.name,
+ ast_channel_name(user->chan));
+ if (mute) {
+ send_mute_event(user, conference);
+ } else {
+ send_unmute_event(user, conference);
+ }
+}
+
void conf_moh_stop(struct confbridge_user *user)
{
user->playing_moh = 0;
@@ -1922,22 +1947,7 @@
/* Toggle user level mute request. */
mute = !user->muted;
- user->muted = mute;
-
- conf_update_user_mute(user);
- ast_test_suite_event_notify("CONF_MUTE",
- "Message: participant %s %s\r\n"
- "Conference: %s\r\n"
- "Channel: %s",
- ast_channel_name(user->chan),
- mute ? "muted" : "unmuted",
- user->b_profile.name,
- ast_channel_name(user->chan));
- if (mute) {
- send_mute_event(user, conference);
- } else {
- send_unmute_event(user, conference);
- }
+ generic_mute_unmute_user(conference, user, mute);
return play_file(bridge_channel, NULL, (mute ?
conf_get_sound(CONF_SOUND_MUTED, user->b_profile.sounds) :
@@ -2549,30 +2559,6 @@
ao2_ref(conference, -1);
return res;
-}
-
-/* \internal
- * \brief Mute/unmute a single user.
- */
-static void generic_mute_unmute_user(struct confbridge_conference *conference, struct confbridge_user *user, int mute)
-{
- /* Set user level mute request. */
- user->muted = mute ? 1 : 0;
-
- conf_update_user_mute(user);
- ast_test_suite_event_notify("CONF_MUTE",
- "Message: participant %s %s\r\n"
- "Conference: %s\r\n"
- "Channel: %s",
- ast_channel_name(user->chan),
- mute ? "muted" : "unmuted",
- conference->b_profile.name,
- ast_channel_name(user->chan));
- if (mute) {
- send_mute_event(user, conference);
- } else {
- send_unmute_event(user, conference);
- }
}
/* \internal
--
To view, visit https://gerrit.asterisk.org/2110
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ida5594e9f8d7c1fc18eeb733a11f8fb96326da51
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list