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;
report_error("checksum error");
return(1);
}
- close(fd);
/* send ack or nack */
have_file = 1;
if (send_ok()) {