[Asterisk-cvs] zaptel wct4xxp.c, 1.51.2.9, 1.51.2.10 zaptel.c,
1.95.2.7, 1.95.2.8
russell
russell
Tue Aug 2 14:09:25 CDT 2005
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv17946
Modified Files:
Tag: v1-0
wct4xxp.c zaptel.c
Log Message:
merge dual-span card fixes from head
Index: wct4xxp.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wct4xxp.c,v
retrieving revision 1.51.2.9
retrieving revision 1.51.2.10
diff -u -d -r1.51.2.9 -r1.51.2.10
--- wct4xxp.c 26 Jul 2005 20:07:44 -0000 1.51.2.9
+++ wct4xxp.c 2 Aug 2005 18:13:11 -0000 1.51.2.10
@@ -2511,7 +2511,7 @@
printk("TE%dXXP: Launching card: %d\n", wc->numspans, wc->order);
/* Setup serial parameters and system interface */
- for (x=0;x<wc->numspans;x++)
+ for (x=0;x<4;x++)
t4_serial_setup(wc, x);
if (zt_register(&wc->tspans[0]->span, 0)) {
@@ -2653,7 +2653,7 @@
#endif
/* Allocate pieces we need here */
- for (x=0;x<wc->numspans;x++) {
+ for (x=0;x<4;x++) {
if (wc->t1e1 & (1 << x)) {
wc->tspans[x] = kmalloc(sizeof(struct t4_span) + sizeof(struct zt_chan) * 31, GFP_KERNEL);
if (wc->tspans[x]) {
Index: zaptel.c
===================================================================
RCS file: /usr/cvsroot/zaptel/zaptel.c,v
retrieving revision 1.95.2.7
retrieving revision 1.95.2.8
diff -u -d -r1.95.2.7 -r1.95.2.8
--- zaptel.c 9 Jul 2005 00:21:25 -0000 1.95.2.7
+++ zaptel.c 2 Aug 2005 18:13:11 -0000 1.95.2.8
@@ -470,9 +470,6 @@
/* In Linux 2.6, this MUST NOT EXECEED 1024 bytes in one read! */
- if (off > 0)
- return 0;
-
span = (long)data;
if (!span)
@@ -552,15 +549,20 @@
if (chans[x]->nextslave && chans[x]->master->channo == x)
len += sprintf(page + len, "Master ");
}
+ }
+ if ((chans[x]->flags & ZT_FLAG_OPEN)) {
+ len += sprintf(page + len, "(In use) ");
+ }
+ len += sprintf(page + len, "\n");
}
- if ((chans[x]->flags & ZT_FLAG_OPEN)) {
- len += sprintf(page + len, "(In use) ");
- }
- len += sprintf(page + len, "\n");
-
+ if ( len <= off ) /* If everything printed so far is before beginning of request */
+ {
+ off -= len;
+ len = 0;
}
}
}
+ *start = page + off;
return len;
}
#endif
@@ -2428,7 +2430,7 @@
next[x] = td.next;
/* Make sure the "next" one is sane */
if ((next[x] >= th.count) || (next[x] < 0)) {
- printk("Invalid 'next' pointer\n");
+ printk("Invalid 'next' pointer: %d\n", next[x]);
kfree(slab);
return -EINVAL;
}
More information about the svn-commits
mailing list