]> andersk Git - moira.git/commitdiff
don't need to open file again for checksum
authormar <mar>
Tue, 23 Aug 1988 11:48:38 +0000 (11:48 +0000)
committermar <mar>
Tue, 23 Aug 1988 11:48:38 +0000 (11:48 +0000)
update/get_file.c

index a1e19787d52da07603f0ee0e760b9b171accb436..65edce85381f7a9a38cfbee014709aa102971249 100644 (file)
@@ -129,12 +129,6 @@ get_file(pathname, file_size, checksum)
     fsync(fd);
     close(fd);
     /* validate checksum */
-    fd = open(pathname, O_RDONLY, 0);
-    if (fd == -1) {
-       code = errno;
-       report_error("re-opening file for checksum verification");
-       return(1);
-    }
     found_checksum = checksum_file(pathname);
     if (checksum != found_checksum) {
        code = SMS_MISSINGFILE;
@@ -143,7 +137,6 @@ get_file(pathname, file_size, checksum)
        report_error("checksum error");
        return(1);
     }
-    close(fd);
     /* send ack or nack */
     have_file = 1;
     if (send_ok()) {
This page took 2.092399 seconds and 5 git commands to generate.