From 7592068f0aaa711b9f684351e3c29132d5d9441f Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 28 Feb 2025 15:02:16 -0400 Subject: [PATCH] MT#61625 rename update_init_subscribers to distinguish it from the media-level function Change-Id: Ied359a62040e35bdff934c6be9273f520e58b2e4 --- daemon/call.c | 2 +- daemon/call_interfaces.c | 2 +- daemon/media_player.c | 6 +++--- include/call.h | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index fa890f590..7625c7339 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2662,7 +2662,7 @@ static void __update_init_subscribers(struct call_media *media, struct stream_pa } /* called with call->master_lock held in W */ -void update_init_subscribers(struct call_monologue *ml, enum ng_opmode opmode) { +void update_init_monologue_subscribers(struct call_monologue *ml, enum ng_opmode opmode) { for (unsigned int i = 0; i < ml->medias->len; i++) { struct call_media *media = ml->medias->pdata[i]; diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index 6e045180f..8e8522922 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -3644,7 +3644,7 @@ static const char *call_block_silence_media(ng_command_ctx_t *ctx, bool on_off, return "Media flow not found (to-tag not subscribed)"; } - update_init_subscribers(monologue, OP_BLOCK_SILENCE_MEDIA); + update_init_monologue_subscribers(monologue, OP_BLOCK_SILENCE_MEDIA); } else { /* it seems no to-monologue is given and no "all" flag is given as well. diff --git a/daemon/media_player.c b/daemon/media_player.c index 3cd043697..b9bd5d284 100644 --- a/daemon/media_player.c +++ b/daemon/media_player.c @@ -1621,7 +1621,7 @@ const char * call_play_media_for_ml(struct call_monologue *ml, codec_update_all_source_handlers(ml, flags); /* this starts the audio player if needed */ - update_init_subscribers(ml, OP_PLAY_MEDIA); + update_init_monologue_subscribers(ml, OP_PLAY_MEDIA); /* media_player_new() now knows that audio player is in use * TODO: player options can have changed if already exists */ media_player_new(&ml->player, ml, NULL, &opts); @@ -1652,7 +1652,7 @@ long long call_stop_media_for_ml(struct call_monologue *ml) long long ret = media_player_stop(ml->player); /* restore to non-mixing if needed */ codec_update_all_source_handlers(ml, NULL); - update_init_subscribers(ml, OP_STOP_MEDIA); + update_init_monologue_subscribers(ml, OP_STOP_MEDIA); /* mark MoH as already not used (it can be unset now) */ ml->player->opts.moh = 0; return ret; @@ -1998,7 +1998,7 @@ static void media_player_run(void *ptr) { MEDIA_CLEAR(mp->media, BLOCK_EGRESS); codec_update_all_source_handlers(mp->media->monologue, NULL); - update_init_subscribers(mp->media->monologue, OP_PLAY_MEDIA); + update_init_monologue_subscribers(mp->media->monologue, OP_PLAY_MEDIA); rwlock_unlock_w(&call->master_lock); } diff --git a/include/call.h b/include/call.h index 5182f6d24..14b71eb4c 100644 --- a/include/call.h +++ b/include/call.h @@ -883,7 +883,8 @@ void call_media_unkernelize(struct call_media *media, const char *reason); void dialogue_unconfirm(struct call_monologue *ml, const char *); void __monologue_unconfirm(struct call_monologue *monologue, const char *); void __media_unconfirm(struct call_media *media, const char *); -void update_init_subscribers(struct call_monologue *ml, enum ng_opmode opmode); +__attribute__((nonnull(1))) +void update_init_monologue_subscribers(struct call_monologue *ml, enum ng_opmode opmode); int call_stream_address(GString *, struct packet_stream *ps, enum stream_address_format format, const struct local_intf *ifa, bool keep_unspec);