summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-handshake.c
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@fb.com>2017-10-31 09:56:11 -0700
committerAmar Tumballi <amarts@redhat.com>2017-11-03 05:04:11 +0000
commit8e973d3ab96d290a32ae3fdbdd1cf867b7060483 (patch)
treedc20dca53f16dba3489d65837007e87bb4c84650 /xlators/protocol/client/src/client-handshake.c
parent917f84b01ff4c485ce548f0daa3d3d51dc81c195 (diff)
core: make gf_boolean_t a C99 bool instead of an enum
This reduces the space used from four bytes to one, and allows new code to use familiar C99 types/values interoperably with our old cruft. It does *not* change current declarations or code; that will be left for a separate - much larger - patch. Updates: #80 Change-Id: I5baedd17d3fb05b38f0d8b8bb9dd62824475842e Signed-off-by: Jeff Darcy <jdarcy@fb.com>
Diffstat (limited to 'xlators/protocol/client/src/client-handshake.c')
-rw-r--r--xlators/protocol/client/src/client-handshake.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 3cf2b06..6fdea91 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -1179,7 +1179,8 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m
goto out;
}
- ret = dict_get_uint32 (reply, "child_up", &conf->child_up);
+ uint32_t child_up_int;
+ ret = dict_get_uint32 (reply, "child_up", &child_up_int);
if (ret) {
/*
* This would happen in cases where the server trying to *
@@ -1189,6 +1190,8 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m
gf_msg (this->name, GF_LOG_WARNING, 0, PC_MSG_DICT_GET_FAILED,
"failed to find key 'child_up' in the options");
conf->child_up = _gf_true;
+ } else {
+ conf->child_up = (child_up_int != 0);
}
ret = dict_get_uint32 (reply, "clnt-lk-version", &lk_ver);