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)
}
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)
{
/* 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);
}
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);