From d14ad1374d39693d8a44c75f4d95607a45b260d2 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Thu, 30 Jan 2014 13:38:01 -0600 Subject: [PATCH] libafscp: Remove comment with dead code You're not supposed to write the length of the submitted data on the split rx stream for a StoreData operation; the fileserver knows how much data to read from the "Length" parameter of the StoreData RPC. For a FetchData, putting the data length over the split rx stream is required, since we can't get the "OUT" arguments before reading the file data. But for a StoreData, this is unnecessary, since the length is right there in the arguments. So just get rid of this commented-out code; it's clearly wrong and this commit explains why. Change-Id: Idde0f9079e90da75d71a142f4a9f36a84ce79776 Reviewed-on: http://gerrit.openafs.org/10786 Reviewed-by: Daria Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/libafscp/afscp_file.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/libafscp/afscp_file.c b/src/libafscp/afscp_file.c index b887c5ac4..8bc3ed45e 100644 --- a/src/libafscp/afscp_file.c +++ b/src/libafscp/afscp_file.c @@ -161,18 +161,6 @@ afscp_PWrite(const struct afscp_venusfid * fid, const void *buffer, code = rx_EndCall(c, code); continue; } - /* - * seems to write file length to beginning of file -- why? - */ - /* - * bytesremaining = htonl(count); - * bytes = rx_Write(c, (char *)&bytesremaining, - * sizeof(afs_int32)); - * if (bytes != sizeof(afs_int32)) { - * code = rx_EndCall(c, bytes); - * continue; - * } - */ bytesremaining = count; totalbytes = 0; while (bytesremaining > 0) { -- 2.39.5