From a13372d29d628f2f56f2a111f69ef6c1a7bb10c5 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 20 Sep 2010 20:30:49 +0000 Subject: dahdi_cfg: DAHDI_INDIRECT -> DAHDI_SPECIFY when configuring pciradio channels. While slightly less efficient, this is only used when configuring the channels initially (not the hot path) and allows dahdi-base.c to assume that the open "file" pointer always refers to the channel on which to perform the operation. Signed-off-by: Shaun Ruffell git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9352 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- dahdi_cfg.c | 58 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 26 deletions(-) (limited to 'dahdi_cfg.c') diff --git a/dahdi_cfg.c b/dahdi_cfg.c index 9386e00..f8ae052 100644 --- a/dahdi_cfg.c +++ b/dahdi_cfg.c @@ -176,16 +176,6 @@ static const char *sigtype_to_str(const int sig) } } -int ind_ioctl(int channo, int fd, int op, void *data) -{ - struct dahdi_indirect_data ind; - - ind.chan = channo; - ind.op = op; - ind.data = data; - return ioctl(fd, DAHDI_INDIRECT, &ind); -} - static void clear_fields() { @@ -1091,6 +1081,7 @@ static int rad_chanconfig(char *keyword, char *args) int res = 0; int x,i,n; struct dahdi_radio_param p; + int chanfd; toneindex = 1; bzero(chans, sizeof(chans)); @@ -1099,8 +1090,21 @@ static int rad_chanconfig(char *keyword, char *args) return -1; for (x=1;x