aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_meetme.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 84ba182d1..f1406d49a 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -1639,7 +1639,6 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
int ms;
int nfds;
int res;
- int flags;
int retrydahdi;
int origfd;
int musiconhold = 0;
@@ -1998,24 +1997,13 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
dahdiretry:
origfd = chan->fds[0];
if (retrydahdi) {
- fd = open("/dev/dahdi/pseudo", O_RDWR);
+ /* open pseudo in non-blocking mode */
+ fd = open("/dev/dahdi/pseudo", O_RDWR | O_NONBLOCK);
if (fd < 0) {
ast_log(LOG_WARNING, "Unable to open pseudo channel: %s\n", strerror(errno));
goto outrun;
}
using_pseudo = 1;
- /* Make non-blocking */
- flags = fcntl(fd, F_GETFL);
- if (flags < 0) {
- ast_log(LOG_WARNING, "Unable to get flags: %s\n", strerror(errno));
- close(fd);
- goto outrun;
- }
- if (fcntl(fd, F_SETFL, flags | O_NONBLOCK)) {
- ast_log(LOG_WARNING, "Unable to set flags: %s\n", strerror(errno));
- close(fd);
- goto outrun;
- }
/* Setup buffering information */
memset(&bi, 0, sizeof(bi));
bi.bufsize = CONF_SIZE / 2;