[svn-commits] tilghman: trunk r275312 - in /trunk: apps/app_meetme.c channels/chan_iax2.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Jul 9 15:01:05 CDT 2010
Author: tilghman
Date: Fri Jul 9 15:01:01 2010
New Revision: 275312
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=275312
Log:
Get more information about the Bamboo test failures
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=275312&r1=275311&r2=275312
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Fri Jul 9 15:01:01 2010
@@ -1149,7 +1149,7 @@
*/
static struct ast_conference *build_conf(const char *confno, const char *pin,
const char *pinadmin, int make, int dynamic, int refcount,
- const struct ast_channel *chan)
+ const struct ast_channel *chan, struct ast_test *test)
{
struct ast_conference *cnf;
struct dahdi_confinfo dahdic = { 0, };
@@ -1185,6 +1185,9 @@
dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
cnf->fd = open("/dev/dahdi/pseudo", O_RDWR);
if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &dahdic)) {
+ if (test) {
+ ast_test_status_update(test, "Unable to open pseudo device\n");
+ }
ast_log(LOG_WARNING, "Unable to open pseudo device\n");
if (cnf->fd >= 0)
close(cnf->fd);
@@ -1204,6 +1207,9 @@
dahdic.confno = cnf->dahdiconf;
dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
if (ioctl(cnf->chan->fds[0], DAHDI_SETCONF, &dahdic)) {
+ if (test) {
+ ast_test_status_update(test, "Error setting conference on pseudo channel\n");
+ }
ast_log(LOG_WARNING, "Error setting conference\n");
if (cnf->chan)
ast_hangup(cnf->chan);
@@ -3772,7 +3778,7 @@
ast_variables_destroy(origvar);
- cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount, chan);
+ cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount, chan, NULL);
if (cnf) {
cnf->maxusers = maxusers;
@@ -3871,9 +3877,9 @@
if (ast_app_getdata(chan, "conf-getpin", dynamic_pin, pin_buf_len - 1, 0) < 0)
return NULL;
}
- cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount, chan);
+ cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount, chan, NULL);
} else {
- cnf = build_conf(confno, "", "", make, dynamic, refcount, chan);
+ cnf = build_conf(confno, "", "", make, dynamic, refcount, chan, NULL);
}
} else {
/* Check the config */
@@ -3901,7 +3907,7 @@
cnf = build_conf(args.confno,
S_OR(args.pin, ""),
S_OR(args.pinadmin, ""),
- make, dynamic, refcount, chan);
+ make, dynamic, refcount, chan, NULL);
break;
}
}
@@ -4987,7 +4993,7 @@
ast_set_flag64(&conf_flags,
CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
answer_trunk_chan(trunk_ref->chan);
- conf = build_conf(ast_str_buffer(conf_name), "", "", 0, 0, 1, trunk_ref->chan);
+ conf = build_conf(ast_str_buffer(conf_name), "", "", 0, 0, 1, trunk_ref->chan, NULL);
if (conf) {
conf_run(trunk_ref->chan, conf, &conf_flags, NULL);
dispose_conf(conf);
@@ -5868,7 +5874,7 @@
ast_set_flag64(&conf_flags,
CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_MARKEDUSER |
CONFFLAG_PASS_DTMF | CONFFLAG_SLA_TRUNK);
- conf = build_conf(conf_name, "", "", 1, 1, 1, trunk_ref->trunk->chan);
+ conf = build_conf(conf_name, "", "", 1, 1, 1, trunk_ref->trunk->chan, NULL);
ast_mutex_lock(args->cond_lock);
ast_cond_signal(args->cond);
@@ -6044,7 +6050,7 @@
ast_set_flag64(&conf_flags,
CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
ast_answer(chan);
- conf = build_conf(conf_name, "", "", 0, 0, 1, chan);
+ conf = build_conf(conf_name, "", "", 0, 0, 1, chan, NULL);
if (conf) {
conf_run(chan, conf, &conf_flags, NULL);
dispose_conf(conf);
@@ -6175,7 +6181,7 @@
}
snprintf(conf_name, sizeof(conf_name), "SLA_%s", args.trunk_name);
- conf = build_conf(conf_name, "", "", 1, 1, 1, chan);
+ conf = build_conf(conf_name, "", "", 1, 1, 1, chan, NULL);
if (!conf) {
pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "FAILURE");
ast_atomic_fetchadd_int((int *) &trunk->ref_count, -1);
@@ -6864,7 +6870,7 @@
return AST_TEST_FAIL;
}
- cnf = build_conf("9898", "", "1234", 1, 1, 1, chan);
+ cnf = build_conf("9898", "", "1234", 1, 1, 1, chan, test);
if (!cnf) {
ast_test_status_update(test, "Build of test conference 9898 failed\n");
ast_hangup(chan);
@@ -6891,7 +6897,6 @@
dispose_conf(cnf);
ast_hangup(chan);
- ast_test_status_update(test, "If this message prints and a failure is still recorded, then something is really wrong with the test framework\n");
return AST_TEST_PASS;
}
#endif
Modified: trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=275312&r1=275311&r2=275312
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Fri Jul 9 15:01:01 2010
@@ -13981,8 +13981,8 @@
return AST_TEST_FAIL;
}
- 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");
+ if (ast_data_retrieve_int(node, "user/amaflags/value") != 1010) {
+ ast_test_status_update(test, "The amaflags field in our test user was '%d' not the expected value '1010'\n", ast_data_retrieve_int(node, "user/amaflags/value"));
ao2_unlink(users, user);
user_unref(user);
ast_data_free(node);
@@ -13994,7 +13994,6 @@
ao2_unlink(users, user);
user_unref(user);
- ast_test_status_update(test, "If this message prints and a failure is still recorded, then something is really wrong with the test framework\n");
return AST_TEST_PASS;
}
#endif
More information about the svn-commits
mailing list