[asterisk-commits] dlee: branch dlee/performance r399285 - /team/dlee/performance/main/stasis.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 17 18:13:39 CDT 2013


Author: dlee
Date: Tue Sep 17 18:13:37 2013
New Revision: 399285

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399285
Log:
This shouldn't be better, but it is

Modified:
    team/dlee/performance/main/stasis.c

Modified: team/dlee/performance/main/stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/performance/main/stasis.c?view=diff&rev=399285&r1=399284&r2=399285
==============================================================================
--- team/dlee/performance/main/stasis.c (original)
+++ team/dlee/performance/main/stasis.c Tue Sep 17 18:13:37 2013
@@ -458,6 +458,7 @@
  * \internal
  * \brief Information needed to dispatch a message to a subscription
  */
+#if 0
 struct dispatch {
 	/*! Topic message was published to */
 	struct stasis_topic *topic;
@@ -514,6 +515,7 @@
 
 	return 0;
 }
+#endif
 
 void stasis_forward_message(struct stasis_topic *_topic, struct stasis_topic *publisher_topic, struct stasis_message *message)
 {
@@ -534,6 +536,7 @@
 		ast_assert(sub != NULL);
 
 		if (sub->mailbox) {
+#if 0
 			RAII_VAR(struct dispatch *, dispatch, NULL, ao2_cleanup);
 
 			dispatch = dispatch_create(publisher_topic, message, sub);
@@ -549,6 +552,10 @@
 				 */
 				dispatch = NULL;
 			}
+#endif
+			ao2_lock(sub);
+			subscription_invoke(sub, publisher_topic, message);
+			ao2_unlock(sub);
 		} else {
 			/* Dispatch directly */
 			subscription_invoke(sub, publisher_topic, message);




More information about the asterisk-commits mailing list