[asterisk-commits] sruffell: branch sruffell/asterisk-1.4-transcoder r114901 - /team/sruffell/as...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Apr 30 13:14:45 CDT 2008
Author: sruffell
Date: Wed Apr 30 13:14:44 2008
New Revision: 114901
URL: http://svn.digium.com/view/asterisk?view=rev&rev=114901
Log:
And now adding back in the O_NONBLOCK flag.
Modified:
team/sruffell/asterisk-1.4-transcoder/codecs/codec_zap.c
Modified: team/sruffell/asterisk-1.4-transcoder/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/team/sruffell/asterisk-1.4-transcoder/codecs/codec_zap.c?view=diff&rev=114901&r1=114900&r2=114901
==============================================================================
--- team/sruffell/asterisk-1.4-transcoder/codecs/codec_zap.c (original)
+++ team/sruffell/asterisk-1.4-transcoder/codecs/codec_zap.c Wed Apr 30 13:14:44 2008
@@ -3,7 +3,7 @@
*
* Zaptel native transcoding support
*
- * Copyright (C) 1999 - 2006, Digium, Inc.
+ * Copyright (C) 1999 - 2008, Digium, Inc.
*
* Mark Spencer <markster at digium.com>
* Kevin P. Fleming <kpfleming at digium.com>
@@ -232,6 +232,7 @@
/* Request translation through zap if possible */
int fd;
struct pvt *ztp = pvt->pvt;
+ int flags;
if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0)
return -1;
@@ -246,6 +247,12 @@
close(fd);
return -1;
+ }
+
+ flags = fcntl(fd, F_GETFL);
+ if (flags > - 1) {
+ if (fcntl(fd, F_SETFL, flags | O_NONBLOCK))
+ ast_log(LOG_WARNING, "Could not set non-block mode!\n");
}
ztp->fd = fd;
More information about the asterisk-commits
mailing list