[asterisk-commits] mjordan: trunk r374213 - in /trunk: ./ main/astobj2.c main/message.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 2 12:16:24 CDT 2012


Author: mjordan
Date: Tue Oct  2 12:16:20 2012
New Revision: 374213

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=374213
Log:
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

Modified:
    trunk/   (props changed)
    trunk/main/astobj2.c
    trunk/main/message.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/astobj2.c?view=diff&rev=374213&r1=374212&r2=374213
==============================================================================
--- trunk/main/astobj2.c (original)
+++ trunk/main/astobj2.c Tue Oct  2 12:16:20 2012
@@ -1499,11 +1499,7 @@
 	ao2_iterator_restart(iter);
 
 	/* Release the iterated container reference. */
-#if defined(REF_DEBUG)
-	__ao2_ref_debug(iter->c, -1, "ao2_iterator_destroy", __FILE__, __LINE__, __PRETTY_FUNCTION__);
-#else
-	ao2_ref(iter->c, -1);
-#endif
+	ao2_t_ref(iter->c, -1, "Unref iterator in ao2_iterator_destroy");
 	iter->c = NULL;
 
 	/* Free the malloced iterator. */
@@ -2017,12 +2013,7 @@
 	struct hash_bucket_node *node;
 	int i;
 
-#if defined(REF_DEBUG)
-	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
+	node = ao2_t_alloc_options(sizeof(*node), hash_ao2_node_destructor, AO2_ALLOC_OPT_LOCK_NOLOCK, "Create hash node");
 	if (!node) {
 		return NULL;
 	}

Modified: trunk/main/message.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/message.c?view=diff&rev=374213&r1=374212&r2=374213
==============================================================================
--- trunk/main/message.c (original)
+++ trunk/main/message.c Tue Oct  2 12:16:20 2012
@@ -1302,7 +1302,7 @@
 	return 0;
 }
 
-void ast_msg_shutdown()
+void ast_msg_shutdown(void)
 {
 	if (msg_q_tp) {
 		msg_q_tp = ast_taskprocessor_unreference(msg_q_tp);




More information about the asterisk-commits mailing list