diff options
author | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-16 22:20:33 +0000 |
---|---|---|
committer | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-16 22:20:33 +0000 |
commit | 5d4575582cca3f4f541489a72bda33419a13a2a9 (patch) | |
tree | 4216f6f25ded730c57cf38f402437a52fba3cd5d | |
parent | 8f082904ca03c42918ec38856cd30189fd5b6f57 (diff) |
Merged revisions 2167 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.4
................
r2167 | mattf | 2007-02-16 16:18:41 -0600 (Fri, 16 Feb 2007) | 10 lines
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/trunk@2168 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | wctdm24xxp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wctdm24xxp.c b/wctdm24xxp.c index 260bbfd..a330bb5 100644 --- a/wctdm24xxp.c +++ b/wctdm24xxp.c @@ -696,11 +696,12 @@ static inline void wctdm_transmitprep(struct wctdm *wc, int dbl) for (x=0;x<ZT_CHUNKSIZE;x++) { /* Send a sample, as a 32-bit word */ - for (y=0;y < wc->type;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 |