[svn-commits] mattf: branch 1.4 r1637 - /branches/1.4/zaptel.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Wed Nov 22 16:30:19 MST 2006
Author: mattf
Date: Wed Nov 22 17:30:19 2006
New Revision: 1637
URL: http://svn.digium.com/view/zaptel?view=rev&rev=1637
Log:
Update for #8403
Modified:
branches/1.4/zaptel.c
Modified: branches/1.4/zaptel.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/zaptel.c?view=diff&rev=1637&r1=1636&r2=1637
==============================================================================
--- branches/1.4/zaptel.c (original)
+++ branches/1.4/zaptel.c Wed Nov 22 17:30:19 2006
@@ -620,19 +620,21 @@
}
len += sprintf(page + len, "\n");
}
- if ( len <= off ) /* If everything printed so far is before beginning of request */
- {
+ if (len <= off) { /* If everything printed so far is before beginning of request */
off -= len;
len = 0;
}
- }
- }
- if ( len <= off ) /* If everything printed so far is before beginning of request */
- {
+ if (len > off+count) /* stop if we've already generated enough */
+ break;
+ }
+ }
+ if (len <= off) { /* If everything printed so far is before beginning of request */
off -= len;
len = 0;
}
*start = page + off;
+ len -= off; /* un-count any remaining offset */
+ if (len > count) len = count; /* don't return bytes not asked for */
return len;
}
#endif
More information about the svn-commits
mailing list