From abc2a6b0b91a82bb59327cd2a4ca72b8954e1425 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 16 Mar 2011 09:39:21 +0000 Subject: glusterfsd: log enhancement Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346 --- rpc/rpc-lib/src/rpc-transport.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'rpc') diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index b3bf4c93b..10c835cc8 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -1094,7 +1094,6 @@ rpc_transport_inet_options_build (dict_t **options, const char *hostname, int po if (!dict) goto out; - host = gf_strdup ((char*)hostname); if (!hostname) { ret = -1; @@ -1102,20 +1101,31 @@ rpc_transport_inet_options_build (dict_t **options, const char *hostname, int po } ret = dict_set_dynstr (dict, "remote-host", host); - if (ret) + if (ret) { + gf_log ("", GF_LOG_WARNING, "failed to set remote-host with %s", + host); goto out; + } ret = dict_set_int32 (dict, "remote-port", port); - if (ret) + if (ret) { + gf_log ("", GF_LOG_WARNING, "failed to set remote-port with %d", + port); goto out; - + } ret = dict_set_str (dict, "transport.address-family", "inet"); - if (ret) + if (ret) { + gf_log ("", GF_LOG_WARNING, + "failed to set addr-family with inet"); goto out; + } ret = dict_set_str (dict, "transport-type", "socket"); - if (ret) + if (ret) { + gf_log ("", GF_LOG_WARNING, + "failed to set trans-type with socket"); goto out; + } *options = dict; out: -- cgit