diff options
author | Amar Tumballi <amar@gluster.com> | 2011-03-16 09:39:21 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-17 11:57:39 -0700 |
commit | abc2a6b0b91a82bb59327cd2a4ca72b8954e1425 (patch) | |
tree | 5c2e73211332d2ba431d17600fdc936f434da15c /rpc/rpc-lib/src/rpc-transport.c | |
parent | ca6528592eed88ff1598b25f1aaa1c99c14a2e32 (diff) |
glusterfsd: log enhancement
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'rpc/rpc-lib/src/rpc-transport.c')
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index b3bf4c93b66..10c835cc8eb 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: |