summaryrefslogtreecommitdiff
path: root/apps/app_confbridge.c
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2013-05-31 12:41:10 +0000
committerKinsey Moore <kmoore@digium.com>2013-05-31 12:41:10 +0000
commit39d5e40cd58c25f80759d1be9e5df945cf4e1da1 (patch)
treea342e9e8edf3816b4f2ca40fed09cb7b7cde9082 /apps/app_confbridge.c
parente1bff7958adbf7780a70fd6e687e344edf11fdcc (diff)
Remove remnant of snapshot blob JSON types
Remove usage of the once-mandatory snapshot blob type field, refactor confbridge stasis messages accordingly, and remove ast_bridge_blob_json_type(). Review: https://reviewboard.asterisk.org/r/2575/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_confbridge.c')
-rw-r--r--apps/app_confbridge.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index d52c88295..96ef12460 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -415,13 +415,12 @@ const char *conf_get_sound(enum conf_sounds sound, struct bridge_profile_sounds
return "";
}
-static void send_conf_stasis(struct confbridge_conference *conference, struct ast_channel *chan, const char *type, struct ast_json *extras, int channel_topic)
+static void send_conf_stasis(struct confbridge_conference *conference, struct ast_channel *chan, struct stasis_message_type *type, struct ast_json *extras, int channel_topic)
{
RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
RAII_VAR(struct ast_json *, json_object, NULL, ast_json_unref);
- json_object = ast_json_pack("{s: s, s: s}",
- "type", type,
+ json_object = ast_json_pack("{s: s}",
"conference", conference->name);
if (!json_object) {
@@ -432,10 +431,10 @@ static void send_conf_stasis(struct confbridge_conference *conference, struct as
ast_json_object_update(json_object, extras);
}
- msg = ast_bridge_blob_create(confbridge_message_type(),
- conference->bridge,
- chan,
- json_object);
+ msg = ast_bridge_blob_create(type,
+ conference->bridge,
+ chan,
+ json_object);
if (!msg) {
return;
}
@@ -450,42 +449,42 @@ static void send_conf_stasis(struct confbridge_conference *conference, struct as
static void send_conf_start_event(struct confbridge_conference *conference)
{
- send_conf_stasis(conference, NULL, "confbridge_start", NULL, 0);
+ send_conf_stasis(conference, NULL, confbridge_start_type(), NULL, 0);
}
static void send_conf_end_event(struct confbridge_conference *conference)
{
- send_conf_stasis(conference, NULL, "confbridge_end", NULL, 0);
+ send_conf_stasis(conference, NULL, confbridge_end_type(), NULL, 0);
}
static void send_join_event(struct ast_channel *chan, struct confbridge_conference *conference)
{
- send_conf_stasis(conference, chan, "confbridge_join", NULL, 0);
+ send_conf_stasis(conference, chan, confbridge_join_type(), NULL, 0);
}
static void send_leave_event(struct ast_channel *chan, struct confbridge_conference *conference)
{
- send_conf_stasis(conference, chan, "confbridge_leave", NULL, 0);
+ send_conf_stasis(conference, chan, confbridge_leave_type(), NULL, 0);
}
static void send_start_record_event(struct confbridge_conference *conference)
{
- send_conf_stasis(conference, NULL, "confbridge_record", NULL, 0);
+ send_conf_stasis(conference, NULL, confbridge_start_record_type(), NULL, 0);
}
static void send_stop_record_event(struct confbridge_conference *conference)
{
- send_conf_stasis(conference, NULL, "confbridge_stop_record", NULL, 0);
+ send_conf_stasis(conference, NULL, confbridge_stop_record_type(), NULL, 0);
}
static void send_mute_event(struct ast_channel *chan, struct confbridge_conference *conference)
{
- send_conf_stasis(conference, chan, "confbridge_mute", NULL, 1);
+ send_conf_stasis(conference, chan, confbridge_mute_type(), NULL, 1);
}
static void send_unmute_event(struct ast_channel *chan, struct confbridge_conference *conference)
{
- send_conf_stasis(conference, chan, "confbridge_unmute", NULL, 1);
+ send_conf_stasis(conference, chan, confbridge_unmute_type(), NULL, 1);
}
static void set_rec_filename(struct confbridge_conference *conference, struct ast_str **filename, int is_new)
@@ -1420,7 +1419,7 @@ static void conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, voi
return;
}
- send_conf_stasis(conference, bridge_channel->chan, "confbridge_talking", talking_extras, 0);
+ send_conf_stasis(conference, bridge_channel->chan, confbridge_talking_type(), talking_extras, 0);
ast_json_unref(talking_extras);
}