summaryrefslogtreecommitdiff
path: root/apps/app_dahdiras.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_dahdiras.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_dahdiras.c')
-rw-r--r--apps/app_dahdiras.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/app_dahdiras.c b/apps/app_dahdiras.c
index e6b080f81..3724f0375 100644
--- a/apps/app_dahdiras.c
+++ b/apps/app_dahdiras.c
@@ -95,7 +95,7 @@ static pid_t spawn_ras(struct ast_channel *chan, char *args)
}
/* Execute RAS on File handles */
- dup2(chan->fds[0], STDIN_FILENO);
+ dup2(ast_channel_fd(chan, 0), STDIN_FILENO);
/* Drop high priority */
if (ast_opt_high_priority)
@@ -139,7 +139,7 @@ static void run_ras(struct ast_channel *chan, char *args)
struct dahdi_bufferinfo savebi;
int x;
- res = ioctl(chan->fds[0], DAHDI_GET_BUFINFO, &savebi);
+ res = ioctl(ast_channel_fd(chan, 0), DAHDI_GET_BUFINFO, &savebi);
if(res) {
ast_log(LOG_WARNING, "Unable to check buffer policy on channel %s\n", ast_channel_name(chan));
return;
@@ -175,10 +175,10 @@ static void run_ras(struct ast_channel *chan, char *args)
}
/* Throw back into audio mode */
x = 1;
- ioctl(chan->fds[0], DAHDI_AUDIOMODE, &x);
+ ioctl(ast_channel_fd(chan, 0), DAHDI_AUDIOMODE, &x);
/* Restore saved values */
- res = ioctl(chan->fds[0], DAHDI_SET_BUFINFO, &savebi);
+ res = ioctl(ast_channel_fd(chan, 0), DAHDI_SET_BUFINFO, &savebi);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set buffer policy on channel %s\n", ast_channel_name(chan));
}
@@ -209,7 +209,7 @@ static int dahdiras_exec(struct ast_channel *chan, const char *data)
sleep(2);
} else {
memset(&dahdip, 0, sizeof(dahdip));
- if (ioctl(chan->fds[0], DAHDI_GET_PARAMS, &dahdip)) {
+ if (ioctl(ast_channel_fd(chan, 0), DAHDI_GET_PARAMS, &dahdip)) {
ast_log(LOG_WARNING, "Unable to get DAHDI parameters\n");
} else if (dahdip.sigtype != DAHDI_SIG_CLEAR) {
ast_verb(2, "Channel %s is not a clear channel\n", ast_channel_name(chan));