dahdi_dynamic: Call dahdi_receive in rx packet handler.
Currently dahdi_receive is called on all channels in the context of the master dynamic span. If one span (not the master) receive two packets before the master span received a packet, the older packet on the dynamic span would end up lost because the "readchunk" for the channels would be overwritten by the new packet. DAHLIN-245 Signed-off-by: Wagner Gegler <wagner@aligera.com.br> (License #6268) Changed dahdi_ec_chunk to dahdi_ec_span. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10110 Conflicts: drivers/dahdi/dahdi_dynamic.c git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10113 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
committed by
Shaun Ruffell
parent
39bc4ef672
commit
8fcc88893c
@@ -222,16 +222,10 @@ static void __ztdynamic_run(void)
|
||||
{
|
||||
struct dahdi_dynamic *z;
|
||||
struct dahdi_dynamic_driver *drv;
|
||||
int y;
|
||||
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(z, &dspan_list, list) {
|
||||
if (!z->dead) {
|
||||
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_receive(&z->span);
|
||||
dahdi_transmit(&z->span);
|
||||
/* Handle all transmissions now */
|
||||
ztd_sendmessage(z);
|
||||
@@ -397,6 +391,9 @@ void dahdi_dynamic_receive(struct dahdi_span *span, unsigned char *msg, int msgl
|
||||
if (unlikely(rxpos != rxcnt))
|
||||
printk(KERN_NOTICE "Span %s: Expected seq no %d, but received %d instead\n", span->name, rxcnt, rxpos);
|
||||
|
||||
dahdi_ec_span(span);
|
||||
dahdi_receive(span);
|
||||
|
||||
/* If this is our master span, then run everything */
|
||||
if (master)
|
||||
ztdynamic_run();
|
||||
|
||||
Reference in New Issue
Block a user