summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-09-03 13:55:01 +0300
committerAtin Mukherjee <amukherj@redhat.com>2018-09-09 01:53:59 +0000
commit09198e203ece6925791a8a3a6121c5f808e4e873 (patch)
tree152f83348592c21fa697aeb0fc606e824ab7c993 /xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c
parent44e4db05a953a6f231c62225b462470cacb16bd4 (diff)
Some (mgmt) xlators: use dict_{setn|getn|deln|get_int32n|set_int32n|set_strn}
In a previous patch (https://review.gluster.org/20769) we've added the key length to be passed to dict_* funcs, to remove the need to strlen() it. This patch moves some xlators to use it. - It also adds dict_get_int32n which was missing. - It also reduces the size of some key variables. They were set to 1024b or PATH_MAX, where sometimes 64 bytes were really enough. Please review carefully: 1. That I did not reduce some the size of the key variables too much. 2. That I did not mix up some keys. Compile-tested only! Change-Id: Ic729baf179f40e8d02bc2350491d4bb9b6934266 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c
index 607a0655432..a2c12ed5e32 100644
--- a/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c
+++ b/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c
@@ -41,7 +41,9 @@ glusterd_conn_init (glusterd_conn_t *conn, char *sockpath,
if (ret)
goto out;
- ret = dict_set_str (options, "transport.socket.ignore-enoent", "on");
+ ret = dict_set_nstrn (options, "transport.socket.ignore-enoent",
+ SLEN ("transport.socket.ignore-enoent"),
+ "on", SLEN ("on"));
if (ret)
goto out;