diff options
author | V.Krishn <vkrishn4@gmail.com> | 2018-09-05 11:47:34 +0530 |
---|---|---|
committer | V.Krishn <vkrishn4@gmail.com> | 2018-09-05 11:47:34 +0530 |
commit | ef1a79b93c2bb99e45238cf63343793953656cb5 (patch) | |
tree | 69ac5b3d61298767d58820cc2001d41aa8f5f70b | |
parent | 0aaee76b698f354a7b90dc316131f5c6c9257dfc (diff) | |
download | mqtt-dirpub-ef1a79b93c2bb99e45238cf63343793953656cb5.tar.bz2 |
update to mosquitto-v1.5.1
-rw-r--r-- | client_shared.c | 22 | ||||
-rw-r--r-- | sub_client.c | 3 |
2 files changed, 13 insertions, 12 deletions
diff --git a/client_shared.c b/client_shared.c index b3ab691..ba4ab5f 100644 --- a/client_shared.c +++ b/client_shared.c @@ -16,7 +16,7 @@ Contributors: V Krishn - implement dirpub. */ -#define _POSIX_C_SOURCE 200809L +#include "config.h" #include <errno.h> #include <fcntl.h> @@ -128,8 +128,8 @@ void init_config(struct mosq_config *cfg) cfg->keepalive = 60; cfg->clean_session = true; cfg->eol = true; - cfg->protocol_version = MQTT_PROTOCOL_V31; - + cfg->protocol_version = MQTT_PROTOCOL_V311; + cfg->isfmask = false; cfg->overwrite = false; @@ -189,7 +189,7 @@ void client_config_cleanup(struct mosq_config *cfg) //free(cfg->ffmask); //free(cfg->ftoken); free(cfg->fmask_topic); - + } int client_config_load(struct mosq_config *cfg, int pub_or_sub, int argc, char *argv[]) @@ -1010,20 +1010,20 @@ int client_connect(struct mosquitto *mosq, struct mosq_config *cfg) int rc; int port; -#ifdef WITH_TLS if(cfg->port < 0){ +#ifdef WITH_TLS if(cfg->cafile || cfg->capath -#ifdef WITH_TLS_PSK +# ifdef WITH_TLS_PSK || cfg->psk -#endif +# endif ){ port = 8883; - }else{ + }else +#endif + { port = 1883; } - }else -#endif - { + }else{ port = cfg->port; } diff --git a/sub_client.c b/sub_client.c index 2d9ce5b..57c4329 100644 --- a/sub_client.c +++ b/sub_client.c @@ -16,7 +16,7 @@ Contributors: V Krishn - implement dirpub. */ -#define _POSIX_C_SOURCE 200809L +#include "config.h" #include <assert.h> #include <errno.h> @@ -557,6 +557,7 @@ void print_usage(void) printf(" allowed masks are:\n"); printf(" @[epoch|date|year|month|day|datetime|hour|min|sec|id|topic[1-9]] \n"); printf(" eg. --fmask='@id@-@date@-@topic' for file id-20101221-topicname\n"); + printf(" NOTE: option -F (new in v1.5.0) does have any effect when used with --fmask\n"); printf(" --nodesuffix : suffix for leaf/text node, when --fmask is provided\n"); printf(" --overwrite : overwrite the existing output file, can be used with --fmask only.\n"); printf(" --will-payload : payload for the client Will, which is sent by the broker in case of\n"); |