rx-packetreadwrite-adjust-offset-20050119
authorDouglas Engert <deengert@anl.gov>
Fri, 21 Jan 2005 17:44:36 +0000 (17:44 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 21 Jan 2005 17:44:36 +0000 (17:44 +0000)
offset - l must be zero in the second loop pass to avoid overwrites

src/rx/rx_packet.c

index c5382a4..c1f879e 100644 (file)
@@ -193,6 +193,7 @@ rx_SlowReadPacket(struct rx_packet * packet, unsigned int offset, int resid,
        resid -= j;
         out += j;
        l += packet->wirevec[i].iov_len;
+       offset = l;
        i++;
     }
 
@@ -234,6 +235,7 @@ rx_SlowWritePacket(struct rx_packet * packet, int offset, int resid, char *in)
        resid -= j;
         in += j;
        l += packet->wirevec[i].iov_len;
+       offset = l;
        i++;
     }