From 1340abc2e710509a9bbe8ca720c91eff896c3d33 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Wed, 2 Jul 2008 13:31:31 +0000 Subject: 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 --- drivers/dahdi/dahdi_dynamic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/dahdi/dahdi_dynamic.c') 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;yspan.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;xchans[x].readchunk, msg, DAHDI_CHUNKSIZE); + memcpy(span->chans[x]->readchunk, msg, DAHDI_CHUNKSIZE); msg += DAHDI_CHUNKSIZE; } -- cgit v1.2.3