[asterisk-commits] dlee: branch dlee/stasis-core r382488 - /team/dlee/stasis-core/tests/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 6 08:53:17 CST 2013


Author: dlee
Date: Wed Mar  6 08:53:13 2013
New Revision: 382488

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382488
Log:
Removed debug printf; fixed locking scope for ao2_cleanup

Modified:
    team/dlee/stasis-core/tests/test_stasis.c

Modified: team/dlee/stasis-core/tests/test_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-core/tests/test_stasis.c?view=diff&rev=382488&r1=382487&r2=382488
==============================================================================
--- team/dlee/stasis-core/tests/test_stasis.c (original)
+++ team/dlee/stasis-core/tests/test_stasis.c Wed Mar  6 08:53:13 2013
@@ -171,11 +171,13 @@
 	}
 
 	if (stasis_subscription_final_message(sub, message)) {
-		SCOPED_MUTEX(lock, &consumer->lock);
+		ast_mutex_lock(&consumer->lock);
 		consumer->complete = 1;
 		ast_cond_signal(&consumer->out);
+		ast_mutex_unlock(&consumer->lock);
 		ao2_cleanup(consumer);
 	}
+
 }
 
 static int consumer_wait_for(struct consumer *consumer, size_t expected_len)
@@ -281,7 +283,6 @@
 	complete = consumer_wait_for_completion(consumer);
 	ast_test_validate(test, 1 == complete);
 
-	printf("%zd\n", consumer->messages_rxed_len);
 	ast_test_validate(test, 2 == consumer->messages_rxed_len);
 	ast_test_validate(test, stasis_subscription_change() == stasis_message_type(consumer->messages_rxed[0]));
 	ast_test_validate(test, stasis_subscription_change() == stasis_message_type(consumer->messages_rxed[1]));




More information about the asterisk-commits mailing list