TT#14008 allow passing flags obj to play_media_select_party

With this we can access the parsed fields from the calling function

Change-Id: Ie05986e912fc94ebe9e29df5a39aa6ba76b3619b
pull/1487/head
Richard Fuchs 4 years ago
parent 71c91ae54f
commit eb683149c2

@ -2699,17 +2699,18 @@ const char *call_unsilence_media_ng(bencode_item_t *input, bencode_item_t *outpu
#ifdef WITH_TRANSCODING
static const char *play_media_select_party(struct call **call, GQueue *monologues,
bencode_item_t *input)
bencode_item_t *input, struct sdp_ng_flags *flags_up)
{
struct call_monologue *monologue;
AUTO_CLEANUP(struct sdp_ng_flags flags, call_ng_free_flags);
AUTO_CLEANUP(struct sdp_ng_flags flags, call_ng_free_flags) = {0,};
struct sdp_ng_flags *flags_ptr = flags_up ?: &flags;
g_queue_init(monologues);
const char *err = media_block_match(call, &monologue, &flags, input, OP_OTHER);
const char *err = media_block_match(call, &monologue, flags_ptr, input, OP_OTHER);
if (err)
return err;
if (flags.all)
if (flags_ptr->all)
g_queue_append(monologues, &(*call)->monologues);
else if (!monologue)
return "No participant party specified";
@ -2729,7 +2730,7 @@ const char *call_play_media_ng(bencode_item_t *input, bencode_item_t *output) {
long long db_id;
long long repeat_times = 1;
err = play_media_select_party(&call, &monologues, input);
err = play_media_select_party(&call, &monologues, input, NULL);
if (err)
return err;
@ -2771,7 +2772,7 @@ const char *call_stop_media_ng(bencode_item_t *input, bencode_item_t *output) {
AUTO_CLEANUP(GQueue monologues, g_queue_clear);
const char *err = NULL;
err = play_media_select_party(&call, &monologues, input);
err = play_media_select_party(&call, &monologues, input, NULL);
if (err)
return err;
@ -2798,7 +2799,7 @@ const char *call_play_dtmf_ng(bencode_item_t *input, bencode_item_t *output) {
str str;
const char *err = NULL;
err = play_media_select_party(&call, &monologues, input);
err = play_media_select_party(&call, &monologues, input, NULL);
if (err)
return err;

Loading…
Cancel
Save