* file_ops.c: fixed bug in cmd_read() which could cause server to report
authorMichael Hampton <io_error@uncensored.citadel.org>
Sun, 27 Jan 2002 06:39:45 +0000 (06:39 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Sun, 27 Jan 2002 06:39:45 +0000 (06:39 +0000)
  the wrong number of bytes for the client to download

citadel/ChangeLog
citadel/file_ops.c

index 5f1cf4d7e069d615cbfa31291d73f6a735359329..81f25561e1bf7a65e1c74d7ae378b4933e70cf9b 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 590.94  2002/01/27 06:39:45  error
+ * file_ops.c: fixed bug in cmd_read() which could cause server to report
+   the wrong number of bytes for the client to download
+
  Revision 590.93  2002/01/26 21:33:38  ajc
  * More internet addressing and global directory stuff.  I think it's all working now
    except for the purging of old entries.
@@ -3263,3 +3267,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
+
index 1d1e8705d87ff42274370e38bbed7eed37bb0fe7..5d8a787280dae9dc08dde7789a68fdfe744de743 100644 (file)
@@ -699,7 +699,7 @@ void cmd_read(char *cmdbuf)
        }
 
        fseek(CC->download_fp, start_pos, 0);
-       fread(buf, bytes, 1, CC->download_fp);
+       bytes = fread(buf, bytes, 1, CC->download_fp);
        cprintf("%d %d\n", BINARY_FOLLOWS, bytes);
        client_write(buf, bytes);
 }