[asterisk-commits] tilghman: trunk r275172 - in /trunk: apps/app_meetme.c channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 9 13:21:43 CDT 2010


Author: tilghman
Date: Fri Jul  9 13:21:39 2010
New Revision: 275172

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=275172
Log:
Add some diagnostic feedback to our data tests

Modified:
    trunk/apps/app_meetme.c
    trunk/channels/chan_iax2.c

Modified: trunk/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_meetme.c?view=diff&rev=275172&r1=275171&r2=275172
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Fri Jul  9 13:21:39 2010
@@ -6860,23 +6860,27 @@
 
 	chan = ast_channel_alloc(0, AST_STATE_DOWN, NULL, NULL, NULL, NULL, NULL, 0, 0, "MeetMeTest");
 	if (!chan) {
+		ast_test_status_update(test, "Channel allocation failed\n");
 		return AST_TEST_FAIL;
 	}
 
 	cnf = build_conf("9898", "", "1234", 1, 1, 1, chan);
 	if (!cnf) {
+		ast_test_status_update(test, "Build of test conference 9898 failed\n");
 		ast_hangup(chan);
 		return AST_TEST_FAIL;
 	}
 
 	node = ast_data_get(&query);
 	if (!node) {
+		ast_test_status_update(test, "Data query for test conference 9898 failed\n");
 		dispose_conf(cnf);
 		ast_hangup(chan);
 		return AST_TEST_FAIL;
 	}
 
 	if (strcmp(ast_data_retrieve_string(node, "meetme/confno"), "9898")) {
+		ast_test_status_update(test, "Query returned the wrong conference\n");
 		dispose_conf(cnf);
 		ast_hangup(chan);
 		ast_data_free(node);

Modified: trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=275172&r1=275171&r2=275172
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Fri Jul  9 13:21:39 2010
@@ -1959,6 +1959,7 @@
 	 */
 	ast_sched_thread_del(sched, iaxs[callno]->pingid);
 	ast_sched_thread_del(sched, iaxs[callno]->lagid);
+	iaxs[callno]->lagid = iaxs[callno]->pingid = -1;
 	iaxs[x] = iaxs[callno];
 	iaxs[x]->callno = x;
 
@@ -13958,6 +13959,7 @@
 
 	user = build_user("test_user_data_provider", NULL, NULL, 0);
 	if (!user) {
+		ast_test_status_update(test, "Failed to build a test user\n");
 		return AST_TEST_FAIL;
 	}
 	user->amaflags = 1010;
@@ -13965,12 +13967,14 @@
 
 	node = ast_data_get(&query);
 	if (!node) {
+		ast_test_status_update(test, "The data query to find our test user failed\n");
 		ao2_unlink(users, user);
 		user_unref(user);
 		return AST_TEST_FAIL;
 	}
 
 	if (strcmp(ast_data_retrieve_string(node, "user/name"), "test_user_data_provider")) {
+		ast_test_status_update(test, "Our data results did not return the test user created in the previous step.\n");
 		ao2_unlink(users, user);
 		user_unref(user);
 		ast_data_free(node);
@@ -13978,6 +13982,7 @@
 	}
 
 	if (ast_data_retrieve_int(node, "user/amaflags") != 1010) {
+		ast_test_status_update(test, "The amaflags field in our test user was not the expected value\n");
 		ao2_unlink(users, user);
 		user_unref(user);
 		ast_data_free(node);




More information about the asterisk-commits mailing list