summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-parser.c
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2018-10-07 17:44:19 +0530
committerAmar Tumballi <amarts@redhat.com>2018-10-24 06:02:07 +0000
commit1be6703b1005bf572cea70f2254d7b5a8ed02351 (patch)
tree0f0c4684e20a57996246dc0eebed90bbfaa9a7bd /cli/src/cli-cmd-parser.c
parent68299b244372b1668c1708bff15a239649226dee (diff)
glusterd: set integer instead of string
dict_get_str_boolean expects a integer, so we need to set all the boolean variables as integers to avoid log messages like below: [2018-09-10 03:55:19.236387] I [dict.c:2838:dict_get_str_boolean] (-->/usr/local/lib/libgfrpc.so.0(rpc_clnt_reconnect+0xc2) [0x7ff7a83d0452] -->/usr/local/lib/glusterfs/4.2dev/rpc-transport/socket.so(+0x65b0) [0x7ff7a06cf5b0] -->/usr/local/lib/libglusterfs.so.0(dict_get_str_boolean+0xcf) [0x7ff7a85fc58f] ) 0-dict: key transport.socket.ignore-enoent, integer type asked, has string type [Invalid argument] This patch addresses all such instances in glusterd. Change-Id: I7e1979fcf381363943f4d09b94c3901c403727da updates: bz#1193929 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r--cli/src/cli-cmd-parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index fe5a763a19e..4c5497ac206 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -2885,7 +2885,7 @@ force_push_pem_no_verify_parse(const char **words, int wordcount, dict_t *dict,
ret = -1;
goto out;
}
- ret = dict_set_uint32(dict, "force", _gf_true);
+ ret = dict_set_int32n(dict, "force", SLEN("force"), 1);
if (ret)
goto out;
(*cmdi)++;
@@ -4524,7 +4524,7 @@ cli_snap_create_parse(dict_t *dict, const char **words, int wordcount)
}
if (strcmp(words[i], "no-timestamp") == 0) {
- ret = dict_set_str(dict, "no-timestamp", "true");
+ ret = dict_set_int32n(dict, "no-timestamp", SLEN("no-timestamp"), 1);
if (ret) {
gf_log("cli", GF_LOG_ERROR,
"Could not save "