From: bdemsky Date: Sat, 26 Sep 2009 09:07:50 +0000 (+0000) Subject: fix accounting of bytes received X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=39ad70fdf66bb8a0605b737d2daf27fe40a082be;p=IRC.git fix accounting of bytes received --- diff --git a/Robust/src/Runtime/DSTM/interface/trans.c b/Robust/src/Runtime/DSTM/interface/trans.c index 8843d829..81cd2081 100644 --- a/Robust/src/Runtime/DSTM/interface/trans.c +++ b/Robust/src/Runtime/DSTM/interface/trans.c @@ -170,6 +170,7 @@ void recv_data_buf(int fd, struct readstruct * readbuffer, void *buffer, int buf perror("recv"); exit(0); } + bytesRecv+=numbytes; buflen-=numbytes; readbuffer->head+=numbytes; maxbuf-=numbytes; @@ -210,6 +211,7 @@ int recv_data_errorcode_buf(int fd, struct readstruct * readbuffer, void *buffer perror("recvbuf"); return -1; } + bytesRecv+=numbytes; buflen-=numbytes; readbuffer->head+=numbytes; maxbuf-=numbytes; @@ -248,6 +250,7 @@ int recv_data_errorcode(int fd, void *buf, int buflen) { perror("recv"); return -1; } + bytesRecv+=numbytes; buffer += numbytes; size -= numbytes; }