aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-16 21:50:31 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-16 21:50:31 +0000
commit277dc910f516ad3e1c45ded89ea66f782ca04b81 (patch)
tree40667564919cf19ee7a3585712d502b492c70124 /apps
parentd9d3fd731edd42e99e7dfc0fe82a13fb0f5edd46 (diff)
Merged revisions 176253 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r176253 | mmichelson | 2009-02-16 15:40:40 -0600 (Mon, 16 Feb 2009) | 24 lines Merged revisions 176249,176252 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r176249 | mmichelson | 2009-02-16 15:34:27 -0600 (Mon, 16 Feb 2009) | 14 lines Open the DAHDI pseudo device and set it to be nonblocking atomically Apparently on FreeBSD, attempting to set the O_NONBLOCKING flag separately from opening the file was causing an "inappropriate ioctl for device" error. While I cannot fathom why this would be happening, I certainly am not opposed to making the code a bit more compact/efficient if it also fixes a bug. (closes issue #14482) Reported by: ys Patches: meetme.patch uploaded by ys (license 281) Tested by: ys ........ r176252 | mmichelson | 2009-02-16 15:39:21 -0600 (Mon, 16 Feb 2009) | 3 lines Remove unused variable and make dev-mode compilation happy ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@176257 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-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;