summaryrefslogtreecommitdiff
path: root/drivers/dahdi/dahdi_dynamic.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-07-02 13:31:31 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-07-02 13:31:31 +0000
commit1340abc2e710509a9bbe8ca720c91eff896c3d33 (patch)
tree3d2cffb2090c445da8b3b8e741543c0287a2cc60 /drivers/dahdi/dahdi_dynamic.c
parentef05eedbe6bffbdaaee55f26b0c54a06fd32b6f2 (diff)
break up large memory allocations made by digital span drivers into smaller ones (one allocation for each dahdi_chan structure, separate from any private structures used by the driver)
(closes issue #12657) Reported by: tzafrir git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4513 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/dahdi_dynamic.c')
-rw-r--r--drivers/dahdi/dahdi_dynamic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dahdi/dahdi_dynamic.c b/drivers/dahdi/dahdi_dynamic.c
index f29bbda..00e0a66 100644
--- a/drivers/dahdi/dahdi_dynamic.c
+++ b/drivers/dahdi/dahdi_dynamic.c
@@ -236,7 +236,7 @@ static void __ztdynamic_run(void)
/* Ignore dead spans */
for (y=0;y<z->span.channels;y++) {
/* Echo cancel double buffered data */
- dahdi_ec_chunk(&z->span.chans[y], z->span.chans[y].readchunk, z->span.chans[y].writechunk);
+ dahdi_ec_chunk(z->span.chans[y], z->span.chans[y]->readchunk, z->span.chans[y]->writechunk);
}
dahdi_receive(&z->span);
dahdi_transmit(&z->span);
@@ -368,15 +368,15 @@ void dahdi_dynamic_receive(struct dahdi_span *span, unsigned char *msg, int msgl
sig = (bits >> ((x % 4) << 2)) & 0xff;
/* Update signalling if appropriate */
- if (sig != span->chans[x].rxsig)
- dahdi_rbsbits(&span->chans[x], sig);
+ if (sig != span->chans[x]->rxsig)
+ dahdi_rbsbits(span->chans[x], sig);
}
}
/* Record data for channels */
for (x=0;x<nchans;x++) {
- memcpy(span->chans[x].readchunk, msg, DAHDI_CHUNKSIZE);
+ memcpy(span->chans[x]->readchunk, msg, DAHDI_CHUNKSIZE);
msg += DAHDI_CHUNKSIZE;
}