diff options
author | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-16 22:18:41 +0000 |
---|---|---|
committer | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-16 22:18:41 +0000 |
commit | a58fe8d90bfead71748616c11f19280d092f306f (patch) | |
tree | 9fb9091557306d7211f48ec6148ca6b644692710 | |
parent | 988cc8af97bafce0dde5b840b41f241cb4c990e1 (diff) |
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
-rw-r--r-- | wctdm24xxp.c | 10 |
1 files 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;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 |