From e878bc06dc41583ecc9df1dd8c3b0e9ca735f585 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 20 Sep 2010 20:30:49 +0000 Subject: [PATCH] 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.astersk.org/svn/dahdi/tools/trunk@9352 17933a7a-c749-41c5-a318-cba88f637d49 --- dahdi_cfg.c | 58 +++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 26 deletions(-) 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