From a58fe8d90bfead71748616c11f19280d092f306f Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 16 Feb 2007 22:18:41 +0000 Subject: Merged revisions 2166 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r2166 | mattf | 2007-02-16 16:14:48 -0600 (Fri, 16 Feb 2007) | 2 lines Fix detection of second single port modules so it actually works now. ........ git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@2167 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wctdm24xxp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wctdm24xxp.c b/wctdm24xxp.c index d0430ea..0fb7d70 100644 --- a/wctdm24xxp.c +++ b/wctdm24xxp.c @@ -696,11 +696,12 @@ static inline void wctdm_transmitprep(struct wctdm *wc, int dbl) for (x=0;xtype;y++) { + for (y=0;y < wc->cards;y++) { if (!x) cmd_checkisr(wc, y); - writechunk[y] = wc->chans[y].writechunk[x]; + if (y < wc->type) + writechunk[y] = wc->chans[y].writechunk[x]; cmd_dequeue(wc, writechunk, y, x); } #ifdef VPM_SUPPORT @@ -962,8 +963,9 @@ static inline void wctdm_receiveprep(struct wctdm *wc, int dbl) cmd_retransmit(wc); } } - for (y=0;y < wc->type;y++) { - wc->chans[y].readchunk[x] = readchunk[y]; + for (y=0;y < wc->cards;y++) { + if (y < wc->type) + wc->chans[y].readchunk[x] = readchunk[y]; cmd_decifer(wc, readchunk, y); } #ifdef VPM_SUPPORT -- cgit v1.2.3