]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
rx-multiple-packets-20050118
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 19 Jan 2005 05:14:11 +0000 (05:14 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 19 Jan 2005 05:14:11 +0000 (05:14 +0000)
Doug Engert reports that large tokens are corrupted when being sent
using RX.  This patch fixes two bugs which prevent the transmission
and receipt of multiple packet exchanges.

src/rx/rx_packet.c

index 6d811901fd1872641501df95c22dd3332d192c5f..c5382a4a675eb6c74e491818577b9d15a62b5cda 100644 (file)
@@ -191,7 +191,8 @@ rx_SlowReadPacket(struct rx_packet * packet, unsigned int offset, int resid,
        j = MIN(resid, packet->wirevec[i].iov_len - (offset - l));
        memcpy(out, (char *)(packet->wirevec[i].iov_base) + (offset - l), j);
        resid -= j;
-       l += packet->wirevec[i].iov_len;
+        out += j;
+       l += packet->wirevec[i].iov_len;
        i++;
     }
 
@@ -231,6 +232,7 @@ rx_SlowWritePacket(struct rx_packet * packet, int offset, int resid, char *in)
        j = MIN(resid, packet->wirevec[i].iov_len - (offset - l));
        memcpy(b, in, j);
        resid -= j;
+        in += j;
        l += packet->wirevec[i].iov_len;
        i++;
     }