diff options
author | V.Krishn <vkrishn4@gmail.com> | 2020-02-19 03:51:47 +0530 |
---|---|---|
committer | V.Krishn <vkrishn4@gmail.com> | 2020-02-19 03:51:47 +0530 |
commit | bc08f8fc5d8867f300e5d2c358a595ceafec3ac4 (patch) | |
tree | cb358f643c8fda8f18aa555af95b0e20ea984900 | |
parent | 0551fb1a950ab26e48c6b85ec1acb935884551bc (diff) | |
download | mqtt-dirpub-bc08f8fc5d8867f300e5d2c358a595ceafec3ac4.tar.bz2 |
fix/check empty --fmask
-rw-r--r-- | sub_client_output.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sub_client_output.c b/sub_client_output.c index 0c4951e..8d6034a 100644 --- a/sub_client_output.c +++ b/sub_client_output.c @@ -629,6 +629,11 @@ void print_message_file(struct mosq_config *cfg, const struct mosquitto_message if(cfg->format && strlen(cfg->fmask) == 0) { _fmask(cfg->format, cfg, message); /* experimental */ } else { + if(strlen(cfg->fmask) == 0) { + fprintf(stderr, "Error: fmask is empty, try an absolute path string.\n"); + fflush(stdout); + return; + } _fmask(cfg->fmask, cfg, message); } |