[svn-commits] file: branch file/bridging r79083 - /team/file/bridging/bridges/bridge_zaptel.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Aug 10 14:00:47 CDT 2007
Author: file
Date: Fri Aug 10 14:00:46 2007
New Revision: 79083
URL: http://svn.digium.com/view/asterisk?view=rev&rev=79083
Log:
Cleanup careful_write. It will never be called with blocking so why even support it.
Modified:
team/file/bridging/bridges/bridge_zaptel.c
Modified: team/file/bridging/bridges/bridge_zaptel.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/bridges/bridge_zaptel.c?view=diff&rev=79083&r1=79082&r2=79083
==============================================================================
--- team/file/bridging/bridges/bridge_zaptel.c (original)
+++ team/file/bridging/bridges/bridge_zaptel.c Fri Aug 10 14:00:46 2007
@@ -63,20 +63,11 @@
AST_LIST_ENTRY(zaptel_mixer_channel) list;
};
-static int careful_write(int fd, unsigned char *data, int len, int block)
-{
- int res;
- int x;
-
+static int careful_write(int fd, unsigned char *data, int len)
+{
while (len) {
- if (block) {
- x = ZT_IOMUX_WRITE | ZT_IOMUX_SIGEVENT;
- res = ioctl(fd, ZT_IOMUX, &x);
- } else
- res = 0;
- if (res >= 0)
- res = write(fd, data, len);
- if (res < 1) {
+ int res;
+ if ((res = write(fd, data, len)) < 1) {
if (errno != EAGAIN) {
ast_log(LOG_WARNING, "Failed to write audio data to conference: %s\n", strerror(errno));
return -1;
@@ -225,7 +216,7 @@
struct zaptel_mixer_channel *zmc = bridge_channel->bridge_pvt;
/* Write audio into zaptel conference */
- careful_write(zmc->fd, frame->data, frame->datalen, 0);
+ careful_write(zmc->fd, frame->data, frame->datalen);
return 0;
}
More information about the svn-commits
mailing list