const char *error_msg;
int opt, result, opcode;
IF_FEATURE_TFTP_BLOCKSIZE(int blksize = TFTP_BLKSIZE_DEFAULT;)
- IF_FEATURE_TFTP_BLOCKSIZE(int want_transfer_size = 0;)
+ IF_FEATURE_TFTP_BLOCKSIZE(int want_transfer_size;)
INIT_G();
goto err;
}
# if ENABLE_FEATURE_TFTP_BLOCKSIZE
+ want_transfer_size = 0;
{
char *res;
char *opt_str = mode + sizeof("octet");
goto do_proto;
}
}
+ if (opcode != TFTP_WRQ /* download? */
/* did client ask us about file size? */
- if (tftp_get_option("tsize", opt_str, opt_len)) {
+ && tftp_get_option("tsize", opt_str, opt_len)
+ ) {
want_transfer_size = 1;
}
}
goto err;
}
IF_GETPUT(option_mask32 |= TFTP_OPT_GET;) /* will receive file's data */
- want_transfer_size = 0; /* do not send file size, it's meaningless */
} else {
IF_GETPUT(option_mask32 |= TFTP_OPT_PUT;) /* will send file's data */
}