aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authoreliel <eliel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-10 20:49:30 +0000
committereliel <eliel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-10 20:49:30 +0000
commit74360b0fee8abee46187a41515b30501931a8458 (patch)
tree6bacc34cc904e6145648015d3ecc9995bf136eff /apps
parentf9574fef71ecc80c14507d38e7b0ef819385e7b7 (diff)
When creating a conference for a unit test, it is not mandatory to open a
dahdi pseudo channel, so if we fail doing it, continue creating the conference. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275509 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_meetme.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index eb9aabead..a81287079 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -1186,14 +1186,18 @@ static struct ast_conference *build_conf(const char *confno, const char *pin,
cnf->fd = open("/dev/dahdi/pseudo", O_RDWR);
if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &dahdic)) {
if (test) {
+ /* if we are creating a conference for a unit test, it is not neccesary
+ * to open a pseudo channel, so, if we fail continue creating
+ * the conference. */
ast_test_status_update(test, "Unable to open pseudo device\n");
+ } else {
+ ast_log(LOG_WARNING, "Unable to open pseudo device\n");
+ if (cnf->fd >= 0)
+ close(cnf->fd);
+ ast_free(cnf);
+ cnf = NULL;
+ goto cnfout;
}
- ast_log(LOG_WARNING, "Unable to open pseudo device\n");
- if (cnf->fd >= 0)
- close(cnf->fd);
- ast_free(cnf);
- cnf = NULL;
- goto cnfout;
}
cnf->dahdiconf = dahdic.confno;