mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
channel: Deprecate ast_moh_cleanup(...)
.
We don't want anyone calling it but the channel destructor.
This commit is contained in:
committed by
github-actions[bot]
parent
4620e76012
commit
9fdf8597cb
@@ -51,7 +51,15 @@ void ast_install_music_functions(int (*start_ptr)(struct ast_channel *, const ch
|
||||
|
||||
void ast_uninstall_music_functions(void);
|
||||
|
||||
void ast_moh_cleanup(struct ast_channel *chan);
|
||||
/*!
|
||||
* \brief Clean up music on hold state on a given channel
|
||||
*
|
||||
* \param chan The channel where music on hold was configured.
|
||||
*
|
||||
* \deprecated This function no longer does anything but is kept for
|
||||
* backwards compatibility.
|
||||
*/
|
||||
void ast_moh_cleanup(struct ast_channel *chan) attribute_deprecated;
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
|
@@ -2207,6 +2207,8 @@ void ast_party_redirecting_free(struct ast_party_redirecting *doomed)
|
||||
ast_party_redirecting_reason_free(&doomed->orig_reason);
|
||||
}
|
||||
|
||||
static void moh_cleanup(struct ast_channel *chan);
|
||||
|
||||
/*! \brief Free a channel structure */
|
||||
static void ast_channel_destructor(void *obj)
|
||||
{
|
||||
@@ -2222,7 +2224,7 @@ static void ast_channel_destructor(void *obj)
|
||||
|
||||
/* If there is native format music-on-hold state, free it */
|
||||
if (ast_channel_music_state(chan)) {
|
||||
ast_moh_cleanup(chan);
|
||||
moh_cleanup(chan);
|
||||
}
|
||||
|
||||
ast_pbx_hangup_handler_destroy(chan);
|
||||
@@ -7791,6 +7793,11 @@ void ast_moh_stop(struct ast_channel *chan)
|
||||
}
|
||||
|
||||
void ast_moh_cleanup(struct ast_channel *chan)
|
||||
{
|
||||
/* A nop but needed for API compat */
|
||||
}
|
||||
|
||||
static void moh_cleanup(struct ast_channel *chan)
|
||||
{
|
||||
if (ast_moh_cleanup_ptr)
|
||||
ast_moh_cleanup_ptr(chan);
|
||||
|
Reference in New Issue
Block a user