]> mj.ucw.cz Git - libucw.git/commitdiff
FB Socket: Fixed tracking of written bytes.
authorPavel Charvat <pchar@ucw.cz>
Thu, 31 Aug 2017 16:58:26 +0000 (18:58 +0200)
committerPavel Charvat <pchar@ucw.cz>
Thu, 31 Aug 2017 16:58:26 +0000 (18:58 +0200)
ucw/fb-socket.c

index 1402f7ba5a4953d8d3f89e68a9d21d17106a8897..19f27bd52130b480a40f4b0418794958d0e14ae4 100644 (file)
@@ -2,6 +2,7 @@
  *     UCW Library -- Fast Buffered I/O on Sockets with Timeouts
  *
  *     (c) 2008 Martin Mares <mj@ucw.cz>
+ *     (c) 2017 Pavel Charvat <pchar@ucw.cz>
  *
  *     This software may be freely distributed and used according to the terms
  *     of the GNU Lesser General Public License.
@@ -73,6 +74,7 @@ fbs_spout(struct fastbuf *f)
 
   int l = f->bptr - f->bstop;
   f->bptr = f->bstop;
+  f->pos += l;
   char *buf = f->bstop;
 
   while (l)