[asterisk-commits] file: branch file/fds r57033 -
/team/file/fds/main/channel.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Feb 27 18:15:06 MST 2007
Author: file
Date: Tue Feb 27 19:15:06 2007
New Revision: 57033
URL: http://svn.digium.com/view/asterisk?view=rev&rev=57033
Log:
Can't forget to use the new API call in the core as well.
Modified:
team/file/fds/main/channel.c
Modified: team/file/fds/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/file/fds/main/channel.c?view=diff&rev=57033&r1=57032&r2=57033
==============================================================================
--- team/file/fds/main/channel.c (original)
+++ team/file/fds/main/channel.c Tue Feb 27 19:15:06 2007
@@ -645,10 +645,7 @@
ast_string_field_init(tmp, 128);
- /* Don't bother initializing the last two FD here, because they
- will *always* be set just a few lines down (AST_TIMING_FD,
- AST_ALERT_FD). */
- for (x = 0; x < AST_MAX_FDS - 2; x++)
+ for (x = 0; x < AST_MAX_FDS; x++)
tmp->fds[x] = -1;
#ifdef HAVE_ZAPTEL
@@ -680,9 +677,9 @@
tmp->alertpipe[0] = tmp->alertpipe[1] = -1;
/* Always watch the alertpipe */
- tmp->fds[AST_ALERT_FD] = tmp->alertpipe[0];
+ ast_channel_set_fd(tmp, AST_ALERT_FD, tmp->alertpipe[0]);
/* And timing pipe */
- tmp->fds[AST_TIMING_FD] = tmp->timingfd;
+ ast_channel_set_fd(tmp, AST_TIMING_FD, tmp->timingfd);
ast_string_field_set(tmp, name, "**Unknown**");
/* Initial state */
@@ -1686,7 +1683,7 @@
chan->generator->release(chan, chan->generatordata);
chan->generatordata = NULL;
chan->generator = NULL;
- chan->fds[AST_GENERATOR_FD] = -1;
+ ast_channel_set_fd(chan, AST_GENERATOR_FD, -1);
ast_clear_flag(chan, AST_FLAG_WRITE_INT);
ast_settimeout(chan, 0, NULL, NULL);
}
@@ -3445,7 +3442,7 @@
/* Copy the FD's other than the generator fd */
for (x = 0; x < AST_MAX_FDS; x++) {
if (x != AST_GENERATOR_FD)
- original->fds[x] = clone->fds[x];
+ ast_channel_set_fd(original, x, clone->fds[x]);
}
/* move any whisperer over */
@@ -3484,7 +3481,7 @@
clone->cid = tmpcid;
/* Restore original timing file descriptor */
- original->fds[AST_TIMING_FD] = original->timingfd;
+ ast_channel_set_fd(original, AST_TIMING_FD, original->timingfd);
/* Our native formats are different now */
original->nativeformats = clone->nativeformats;
More information about the asterisk-commits
mailing list