summaryrefslogtreecommitdiff
path: root/apps/app_dahdibarge.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-03-01 22:09:18 +0000
committerTerry Wilson <twilson@digium.com>2012-03-01 22:09:18 +0000
commit0e5c761c28a4ea091d760cfabc2ed3512ee2689a (patch)
treea9d5d359a27a013ac9e3cdf4162c2f32eea90324 /apps/app_dahdibarge.c
parente291318df2c7ed5ebbaec059d73271976c792091 (diff)
Opaquify ast_channel typedefs, fd arrays, and softhangup flag
Review: https://reviewboard.asterisk.org/r/1784/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_dahdibarge.c')
-rw-r--r--apps/app_dahdibarge.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/app_dahdibarge.c b/apps/app_dahdibarge.c
index 4fde46687..cc05a63f8 100644
--- a/apps/app_dahdibarge.c
+++ b/apps/app_dahdibarge.c
@@ -129,7 +129,7 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
ast_indicate(chan, -1);
retrydahdi = strcasecmp(ast_channel_tech(chan)->type, "DAHDI");
dahdiretry:
- origfd = chan->fds[0];
+ origfd = ast_channel_fd(chan, 0);
if (retrydahdi) {
fd = open("/dev/dahdi/pseudo", O_RDWR);
if (fd < 0) {
@@ -162,7 +162,7 @@ dahdiretry:
nfds = 1;
} else {
/* XXX Make sure we're not running on a pseudo channel XXX */
- fd = chan->fds[0];
+ fd = ast_channel_fd(chan, 0);
nfds = 0;
}
memset(&dahdic, 0, sizeof(dahdic));
@@ -199,7 +199,7 @@ dahdiretry:
ms = -1;
c = ast_waitfor_nandfds(&chan, 1, &fd, nfds, NULL, &outfd, &ms);
if (c) {
- if (c->fds[0] != origfd) {
+ if (ast_channel_fd(c, 0) != origfd) {
if (retrydahdi) {
/* Kill old pseudo */
close(fd);
@@ -215,7 +215,7 @@ dahdiretry:
ret = 0;
ast_frfree(f);
break;
- } else if (fd != chan->fds[0]) {
+ } else if (fd != ast_channel_fd(chan, 0)) {
if (f->frametype == AST_FRAME_VOICE) {
if (f->subclass.format.id == AST_FORMAT_ULAW) {
/* Carefully write */
@@ -243,7 +243,7 @@ dahdiretry:
ast_log(LOG_WARNING, "Failed to read frame: %s\n", strerror(errno));
}
}
- if (fd != chan->fds[0])
+ if (fd != ast_channel_fd(chan, 0))
close(fd);
else {
/* Take out of conference */