mosquitto_pub now sends 0 length files without an error when using `-f`.

pull/1753/head
Roger A. Light 5 years ago
parent f46187d5e5
commit f846711ea2

@ -53,6 +53,7 @@ Clients:
- Add `--random-filter` to mosquitto_sub, to allow only a certain proportion
of received messages to be printed.
- mosquitto_sub %j and %J timestamps are now in a ISO 8601 compatible format.
- mosquitto_pub now sends 0 length files without an error when using `-f`.
1.6.9 - 20200227

@ -99,8 +99,9 @@ int load_file(const char *filename)
return 1;
}else if(cfg.msglen == 0){
fclose(fptr);
err_printf(&cfg, "Error: File \"%s\" is empty.\n", filename);
return 1;
cfg.message = NULL;
cfg.msglen = 0;
return 0;
}else if(cfg.msglen < 0){
fclose(fptr);
err_printf(&cfg, "Error: Unable to determine size of file \"%s\".\n", filename);

Loading…
Cancel
Save