MT#62272 moh: media_player_opts_t, make `moh` a flag

Instead of being bool, let it be an unsigned int flag
on the same manner as block_egress.

Change-Id: Ie54e9e303c055beb75a585582fe76aa944d829dd
coverity_scan
Donat Zenichev 9 months ago
parent 50129099ef
commit 7d16141a6a

@ -1586,13 +1586,13 @@ const char * call_check_moh(struct call_monologue *from_ml, struct call_monologu
.file = from_ml->moh_file,
.blob = from_ml->moh_blob,
.db_id = from_ml->moh_db_id,
.moh = true, /* mark as moh enabled */
.moh = 1, /* mark as moh enabled */
);
/* whom to play the moh audio */
errstr = call_play_media_for_ml(to_ml, opts, NULL);
if (errstr) {
to_ml->player->opts.moh = false; /* initialization failed, mark accordingly */
to_ml->player->opts.moh = 0; /* initialization failed, mark accordingly */
return errstr;
}
@ -1654,7 +1654,7 @@ long long call_stop_media_for_ml(struct call_monologue *ml)
codec_update_all_source_handlers(ml, NULL);
update_init_subscribers(ml, OP_STOP_MEDIA);
/* mark MoH as already not used (it can be unset now) */
ml->player->opts.moh = false;
ml->player->opts.moh = 0;
return ret;
#else
return 0;

@ -23,10 +23,10 @@ typedef struct {
int repeat;
long long duration_spent; /* in milliseconds */
str_case_value_ht codec_set;
unsigned int block_egress:1;
unsigned int block_egress:1,
moh:1;
str file, blob;
long long db_id;
bool moh;
} media_player_opts_t;

Loading…
Cancel
Save