mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 07:48:14 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@275509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1186,8 +1186,11 @@ static struct ast_conference *build_conf(const char *confno, const char *pin,
|
|||||||
cnf->fd = open("/dev/dahdi/pseudo", O_RDWR);
|
cnf->fd = open("/dev/dahdi/pseudo", O_RDWR);
|
||||||
if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &dahdic)) {
|
if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &dahdic)) {
|
||||||
if (test) {
|
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");
|
ast_test_status_update(test, "Unable to open pseudo device\n");
|
||||||
}
|
} else {
|
||||||
ast_log(LOG_WARNING, "Unable to open pseudo device\n");
|
ast_log(LOG_WARNING, "Unable to open pseudo device\n");
|
||||||
if (cnf->fd >= 0)
|
if (cnf->fd >= 0)
|
||||||
close(cnf->fd);
|
close(cnf->fd);
|
||||||
@@ -1195,6 +1198,7 @@ static struct ast_conference *build_conf(const char *confno, const char *pin,
|
|||||||
cnf = NULL;
|
cnf = NULL;
|
||||||
goto cnfout;
|
goto cnfout;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cnf->dahdiconf = dahdic.confno;
|
cnf->dahdiconf = dahdic.confno;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user