summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-09-10 17:04:30 +0300
committerAtin Mukherjee <amukherj@redhat.com>2018-09-11 07:10:48 +0000
commit8ac8f359b24c8583eb1a15b9926929770b869db8 (patch)
treebc903225e4d77c9501f001f6f8be5181eb1cd30f /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parent170e848b940615eb9f366211d7a79cc3033902cb (diff)
mgmt xlators: store boolean fields using integer
Surprisingly, there is not set_boolean() as there is a get_boolean() In fact, it is stored as an INT dictionary type. In some occasions it was stored using a string, and this caused errors such as: key gfproxy-server, integer type asked, has string type [Invalid argument] I've fixed what I saw in some logs, I'm sure there are more. The CORRECT fix is to create a boolean set and use it, but this requires a bit more work. I'll see if I can do it later on. Only compile-tested! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I45fd0c7a0824b2f42b8ce510296c9dfa4f32ad66
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index f8e30d060a4..d7b1446204d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1555,8 +1555,8 @@ cont:
* TODO: Remove this and the other places this is referred once
* 3.3.x compatibility is not required
*/
- ret = dict_set_uint32 (dict, "check-op-version",
- _gf_true);
+ ret = dict_set_int32n (dict, "check-op-version",
+ SLEN ("check-op-version"), 1);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0,
GD_MSG_DICT_SET_FAILED,