[Asterisk-cvs] zaptel zaptel.c,1.110,1.111
markster at lists.digium.com
markster at lists.digium.com
Sun Jul 31 17:12:42 CDT 2005
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv4092
Modified Files:
zaptel.c
Log Message:
Fix cat /proc/zaptel/foo bug (bug #4103)
Index: zaptel.c
===================================================================
RCS file: /usr/cvsroot/zaptel/zaptel.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- zaptel.c 9 Jul 2005 00:19:13 -0000 1.110
+++ zaptel.c 31 Jul 2005 21:18:45 -0000 1.111
@@ -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
More information about the svn-commits
mailing list