mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-25 22:18:07 +00:00
Fix findings from check-in on r374177
Richard pointed out two problems with the check-in from r374177: * The ast_msg_shutdown function declaration doesn't match the prototype in main/message.c. * The ref/alloc function usage in astobj2 (in trunk) can use the ao2_t_* variants of the functions to allow the REF_DEBUG flag to enable/disable their debug counterparts. ........ Merged revisions 374210 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374211 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1499,11 +1499,7 @@ void ao2_iterator_destroy(struct ao2_iterator *iter)
|
|||||||
ao2_iterator_restart(iter);
|
ao2_iterator_restart(iter);
|
||||||
|
|
||||||
/* Release the iterated container reference. */
|
/* Release the iterated container reference. */
|
||||||
#if defined(REF_DEBUG)
|
ao2_t_ref(iter->c, -1, "Unref iterator in ao2_iterator_destroy");
|
||||||
__ao2_ref_debug(iter->c, -1, "ao2_iterator_destroy", __FILE__, __LINE__, __PRETTY_FUNCTION__);
|
|
||||||
#else
|
|
||||||
ao2_ref(iter->c, -1);
|
|
||||||
#endif
|
|
||||||
iter->c = NULL;
|
iter->c = NULL;
|
||||||
|
|
||||||
/* Free the malloced iterator. */
|
/* Free the malloced iterator. */
|
||||||
@@ -2017,12 +2013,7 @@ static struct hash_bucket_node *hash_ao2_new_node(struct ao2_container_hash *sel
|
|||||||
struct hash_bucket_node *node;
|
struct hash_bucket_node *node;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#if defined(REF_DEBUG)
|
node = ao2_t_alloc_options(sizeof(*node), hash_ao2_node_destructor, AO2_ALLOC_OPT_LOCK_NOLOCK, "Create hash node");
|
||||||
node = __ao2_alloc_debug(sizeof(*node), hash_ao2_node_destructor, AO2_ALLOC_OPT_LOCK_NOLOCK,
|
|
||||||
"hash_ao2_new_node", __FILE__, __LINE__, __PRETTY_FUNCTION__, 1);
|
|
||||||
#else
|
|
||||||
node = __ao2_alloc(sizeof(*node), hash_ao2_node_destructor, AO2_ALLOC_OPT_LOCK_NOLOCK);
|
|
||||||
#endif
|
|
||||||
if (!node) {
|
if (!node) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1302,7 +1302,7 @@ int ast_msg_tech_unregister(const struct ast_msg_tech *tech)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ast_msg_shutdown()
|
void ast_msg_shutdown(void)
|
||||||
{
|
{
|
||||||
if (msg_q_tp) {
|
if (msg_q_tp) {
|
||||||
msg_q_tp = ast_taskprocessor_unreference(msg_q_tp);
|
msg_q_tp = ast_taskprocessor_unreference(msg_q_tp);
|
||||||
|
|||||||
Reference in New Issue
Block a user