[asterisk-commits] dlee: branch dlee/ASTERISK-22243 r396550 - in /team/dlee/ASTERISK-22243: incl...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 12 11:46:32 CDT 2013


Author: dlee
Date: Mon Aug 12 11:46:30 2013
New Revision: 396550

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396550
Log:
Addressed review feedback.

* Changed ao2_ref1 to ao2_refbump
* Fixed a single char variable name

Modified:
    team/dlee/ASTERISK-22243/include/asterisk/astobj2.h
    team/dlee/ASTERISK-22243/main/stasis.c

Modified: team/dlee/ASTERISK-22243/include/asterisk/astobj2.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-22243/include/asterisk/astobj2.h?view=diff&rev=396550&r1=396549&r2=396550
==============================================================================
--- team/dlee/ASTERISK-22243/include/asterisk/astobj2.h (original)
+++ team/dlee/ASTERISK-22243/include/asterisk/astobj2.h Mon Aug 12 11:46:30 2013
@@ -520,7 +520,7 @@
  * \param obj AO2 object to bump the refcount on.
  * \retval The given \a obj pointer.
  */
-#define ao2_ref1(obj)					\
+#define ao2_refbump(obj)				\
 	({						\
 		typeof(obj) __obj_ ## __LINE__ = (obj);	\
 		ao2_ref(__obj_ ## __LINE__, +1);	\

Modified: team/dlee/ASTERISK-22243/main/stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-22243/main/stasis.c?view=diff&rev=396550&r1=396549&r2=396550
==============================================================================
--- team/dlee/ASTERISK-22243/main/stasis.c (original)
+++ team/dlee/ASTERISK-22243/main/stasis.c Mon Aug 12 11:46:30 2013
@@ -322,7 +322,7 @@
 		size_t i;
 		/* The subscription may be the last ref to this topic. Hold
 		 * the topic ref open until after the unlock. */
-		RAII_VAR(struct stasis_topic *, topic, ao2_ref1(sub->topic),
+		RAII_VAR(struct stasis_topic *, topic, ao2_refbump(sub->topic),
 			ao2_cleanup);
 		SCOPED_AO2LOCK(lock_topic, topic);
 
@@ -515,12 +515,13 @@
 	return 0;
 }
 
-void stasis_forward_message(struct stasis_topic *t, struct stasis_topic *publisher_topic, struct stasis_message *message)
+void stasis_forward_message(struct stasis_topic *_topic, struct stasis_topic *publisher_topic, struct stasis_message *message)
 {
 	size_t i;
 	/* The topic may be unref'ed by the subscription invocation.
 	 * Make sure we hold onto a reference while dispatching. */
-	RAII_VAR(struct stasis_topic *, topic, ao2_ref1(t), ao2_cleanup);
+	RAII_VAR(struct stasis_topic *, topic, ao2_refbump(_topic),
+		ao2_cleanup);
 	SCOPED_AO2LOCK(lock, topic);
 
 	ast_assert(topic != NULL);




More information about the asterisk-commits mailing list