patch-2.1.42 linux/drivers/isdn/isdn_audio.c
Next file: linux/drivers/isdn/isdn_cards.c
Previous file: linux/drivers/isdn/icn/icn.c
Back to the patch index
Back to the overall index
- Lines: 55
- Date:
Wed May 28 10:49:09 1997
- Orig file:
v2.1.41/linux/drivers/isdn/isdn_audio.c
- Orig date:
Thu Feb 27 10:57:29 1997
diff -u --recursive --new-file v2.1.41/linux/drivers/isdn/isdn_audio.c linux/drivers/isdn/isdn_audio.c
@@ -1,4 +1,4 @@
-/* $Id: isdn_audio.c,v 1.7 1997/02/03 22:44:11 fritz Exp $
+/* $Id: isdn_audio.c,v 1.8 1997/03/02 14:29:16 fritz Exp $
* Linux ISDN subsystem, audio conversion and compression (linklevel).
*
@@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn_audio.c,v $
+ * Revision 1.8 1997/03/02 14:29:16 fritz
+ * More ttyI related cleanup.
+ *
* Revision 1.7 1997/02/03 22:44:11 fritz
* Reformatted according CodingStyle
*
@@ -50,7 +53,7 @@
#include "isdn_audio.h"
#include "isdn_common.h"
-char *isdn_audio_revision = "$Revision: 1.7 $";
+char *isdn_audio_revision = "$Revision: 1.8 $";
/*
* Misc. lookup-tables.
@@ -529,14 +532,7 @@
return;
}
SET_SKB_FREE(skb);
- if (skb_headroom(skb) < sizeof(isdn_audio_skb)) {
- printk(KERN_WARNING
- "isdn_audio: insufficient DTMF skb_headroom, dropping\n");
- dev_kfree_skb(skb, FREE_READ);
- return;
- }
result = (int *) skb_put(skb, sizeof(int) * NCOEFF);
- ISDN_AUDIO_SKB_DLECOUNT(skb) = 0;
for (k = 0; k < NCOEFF; k++) {
sk = sk1 = sk2 = 0;
for (n = 0; n < DTMF_NPOINTS; n++) {
@@ -597,6 +593,14 @@
*p++ = 0x10;
*p = what;
skb_trim(skb, 2);
+ if (skb_headroom(skb) < sizeof(isdn_audio_skb)) {
+ printk(KERN_WARNING
+ "isdn_audio: insufficient skb_headroom, dropping\n");
+ kfree_skb(skb, FREE_READ);
+ return;
+ }
+ ISDN_AUDIO_SKB_DLECOUNT(skb) = 0;
+ ISDN_AUDIO_SKB_LOCK(skb) = 0;
save_flags(flags);
cli();
di = info->isdn_driver;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov