From 07ff56fbb44de5a9208f56a191985eb8bfdc9e82 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 31 Jan 2005 04:18:32 +0000 Subject: [PATCH] STABLE14-rx-multiple-packets-20050118 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. (cherry picked from commit f42701022203605f8509b106fe8ca1677666aaa9) --- src/rx/rx_packet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rx/rx_packet.c b/src/rx/rx_packet.c index 6d811901f..c5382a4a6 100644 --- a/src/rx/rx_packet.c +++ b/src/rx/rx_packet.c @@ -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++; } -- 2.39.5