The DLE handling in i4l-audio seems to be broken.
It produces spurious DLEs so asterisk 1.2.24 with chan_modem_i4l
gets irritated, the error message is:
"chan_modem_i4l.c:450 i4l_read: Value of escape is ^ (17)".
-> There shouldn't be a DLE-^.
If a spurious DLE-ETX occurs, the audio connection even dies.
I use a "AVM Fritz!PCI" isdn card.
I found two issues that only appear if ISDN_AUDIO_SKB_DLECOUNT(skb) > 0:
- The loop in isdn_tty.c:isdn_tty_try_read() doesn't escape a DLE if it's
the last character.
- The loop in isdn_common.c:isdn_readbchan_tty() doesn't copy its characters,
it only remembers the last one ("last = *p;").
Compare it with the loop in isdn_common.c:isdn_readbchan(), that *does*
copy them ("*cp++ = *p;") correctly.
The special handling of the "last" character made it more difficult.
I compared it to linux-2.4.19: There was no "last"-handling and both loops
did escape and copy all characters correctly.
Signed-off-by: Matthias Goebl <matthias.goebl@goebl.net>
--- linux-2.6.23.12.orig/drivers/isdn/i4l/isdn_common.c 2007-12-22 21:13:49.000000000 +0100
+++ linux-2.6.23.12/drivers/isdn/i4l/isdn_common.c 2007-12-26 11:36:52.000000000 +0100
@@ -914,6 +914,9 @@
dflag = 0;
count_pull = count_put = 0;
while ((count_pull < skb->len) && (len > 0)) {
+ /* push every character but the last to the tty buffer directly */
+ if ( count_put )
+ tty_insert_flip_char(tty, last, TTY_NORMAL);
len--;
if (dev->drv[di]->DLEflag & DLEmask) {
last = DLE;
--- linux-2.6.23.12.orig/drivers/isdn/i4l/isdn_tty.c 2007-12-22 21:13:49.000000000 +0100
+++ linux-2.6.23.12/drivers/isdn/i4l/isdn_tty.c 2007-12-26 11:37:18.000000000 +0100
@@ -85,6 +85,8 @@
tty_insert_flip_char(tty, DLE, 0);
tty_insert_flip_char(tty, *dp++, 0);
}
+ if (*dp == DLE)
+ tty_insert_flip_char(tty, DLE, 0);
last = *dp;
} else {
#endif
--
| Eric Paris | TALPA - a threat model? well sorta. |
| Ingo Molnar | [git pull] scheduler updates |
| Karl Meyer | PROBLEM: 2.6.23-rc "NETDEV WATCHDOG: eth0: transmit timed out" |
| Robert Hancock | Re: 2.6.28-rc2 hates my e1000e |
git: | |
| Tomash Brechko | Re: GIT vs Other: Need argument |
| Shawn O. Pearce | libgit2 - a true git library |
| Aubrey Li | git proxy issue |
| Scott Chacon | [PATCH] add a 'pre-push' hook |
| Jordi Espasa Clofent | Editing C with... |
| Julien TOUCHE | setting up ssh tunnel/vpn |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| debian developer | Doubt about license |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Robert Blum | Re:help again and again |
| Qi Xia | Re: inode limit ? |
| Drew Eckhardt | bootsector.S @X patch |
| Kernel Panic when schedule is called | 10 minutes ago | Linux kernel |
| mmap write protection fail over coldfire 5475 | 1 hour ago | Linux kernel |
| VPN's on NetBSD | 18 hours ago | NetBSD |
| Why does uClinux 2.6.18 bootup block SuperIO UART IRQs that BIOS configured | 19 hours ago | Linux kernel |
| USB statistics | 21 hours ago | Linux kernel |
| Block Sub System query | 1 day ago | Linux kernel |
| kernel module to intercept socket creation | 1 day ago | Linux kernel |
| Image size changing during each build | 1 day ago | Linux kernel |
| Soft lock bug | 1 day ago | Linux kernel |
| sysctl - dynamic registration problem | 1 day ago | Linux kernel |
