From: Andrew Deason Date: Thu, 30 Jan 2014 19:38:01 +0000 (-0600) Subject: libafscp: Remove comment with dead code X-Git-Tag: upstream/1.8.0_pre1^2~357 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d14ad1374d39693d8a44c75f4d95607a45b260d2;p=packages%2Fo%2Fopenafs.git 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 --- 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) {