[asterisk-commits] mjordan: branch 13 r427927 - /branches/13/tests/test_cel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 14 12:54:25 CST 2014


Author: mjordan
Date: Fri Nov 14 12:54:20 2014
New Revision: 427927

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=427927
Log:
tests/test_cel: Unlock bridge on off nominal paths

If the test fails due to memory allocation errors, we may as well attempt to
unlock the bridge on the way out.

Modified:
    branches/13/tests/test_cel.c

Modified: branches/13/tests/test_cel.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/tests/test_cel.c?view=diff&rev=427927&r1=427926&r2=427927
==============================================================================
--- branches/13/tests/test_cel.c (original)
+++ branches/13/tests/test_cel.c Fri Nov 14 12:54:20 2014
@@ -1275,11 +1275,13 @@
 	transfer_msg = ast_blind_transfer_message_create(1, chan_alice,
 			"transfer_extension", "transfer_context");
 	if (!transfer_msg) {
+		ast_bridge_unlock(bridge);
 		ast_test_status_update(test, "Failed to create transfer Stasis message\n");
 		return AST_TEST_FAIL;
 	}
 	transfer_msg->bridge = ast_bridge_snapshot_create(bridge);
 	if (!transfer_msg->bridge) {
+		ast_bridge_unlock(bridge);
 		ast_test_status_update(test, "Failed to create bridge snapshot\n");
 		return AST_TEST_FAIL;
 	}




More information about the asterisk-commits mailing list