diff options
author | V.Krishn <vkrishn4@gmail.com> | 2015-03-12 22:32:22 +0530 |
---|---|---|
committer | V.Krishn <vkrishn4@gmail.com> | 2015-03-12 22:32:22 +0530 |
commit | 0ec649e584687e3ef4491051746cb52907d58209 (patch) | |
tree | b7b48a3fe73ba4fe285bd84293d1477f89e2b46a | |
parent | 2e75f767d64a72b00db5f1080e520f2b0737007e (diff) | |
download | mqtt-dirpub-0ec649e584687e3ef4491051746cb52907d58209.tar.bz2 |
minor clean, bugfix
-rw-r--r-- | client_shared.c | 5 | ||||
-rw-r--r-- | client_shared.h | 2 | ||||
-rw-r--r-- | sub_client.c | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/client_shared.c b/client_shared.c index 945b2fb..8862208 100644 --- a/client_shared.c +++ b/client_shared.c @@ -94,6 +94,11 @@ void client_config_cleanup(struct mosq_config *cfg) if(cfg->socks5_username) free(cfg->socks5_username); if(cfg->socks5_password) free(cfg->socks5_password); #endif + + if(cfg->ffmask) free(cfg->ffmask); + if(cfg->ftoken) free(cfg->ftoken); + if(cfg->fmask_topic) free(cfg->fmask_topic); + } int client_config_load(struct mosq_config *cfg, int pub_or_sub, int argc, char *argv[]) diff --git a/client_shared.h b/client_shared.h index 3f8b14b..8fdaa8b 100644 --- a/client_shared.h +++ b/client_shared.h @@ -1,5 +1,6 @@ /* Copyright (c) 2014 Roger Light <roger@atchoo.org> +Copyright (c) 2015 V.Krishn <vkrishn@insteps.net> All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 @@ -12,6 +13,7 @@ and the Eclipse Distribution License is available at Contributors: Roger Light - initial implementation and documentation. + V Krishn - implement dirpub. */ #ifndef _CLIENT_CONFIG_H diff --git a/sub_client.c b/sub_client.c index 2a44f3a..95d6580 100644 --- a/sub_client.c +++ b/sub_client.c @@ -168,7 +168,7 @@ const char *datetime(int fmt) /* Expand/resolve fmask token string. */ /* ------------------------------------------------------------- */ -void *_setfmask(char *token, void *obj) +void _setfmask(char *token, void *obj) { struct mosq_config *cfg; @@ -238,13 +238,12 @@ void *_setfmask(char *token, void *obj) } to[strlen(to)-1] = '\0'; - return 0; } /* Expand --fmask string options for output filename. */ /* ------------------------------------------------------------- */ -void *_fmask(char *fmask, void *obj) +void _fmask(char *fmask, void *obj) { struct mosq_config *cfg; @@ -271,7 +270,6 @@ void *_fmask(char *fmask, void *obj) } to[strlen(to)-1] = '\0'; - return 0; } |