diff options
author | Raghavendra G <raghavendra@gluster.com> | 2010-03-29 00:35:52 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-03-31 01:40:53 -0700 |
commit | a79d50fc723ffa4d93fa8f567676b18591fac5fe (patch) | |
tree | f69dc2cd8d3da1fe7f6de5baa42fa4a3e7b7fc83 /libglusterfs | |
parent | d99804c05fe6302f638c6d748c1613a595390cd5 (diff) |
libglusterfs/transport: no need to set address-family if one is not set in the configuration family.
- if not set, address family defaults to AF_UNSPEC and getaddrinfo will fill
appropriate address family for transport types tcp/socket.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 693 (glusterfs 3.0.2 will not listen on IPv6 address)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=693
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/transport.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/libglusterfs/src/transport.c b/libglusterfs/src/transport.c index f3175272d..aee809117 100644 --- a/libglusterfs/src/transport.c +++ b/libglusterfs/src/transport.c @@ -41,7 +41,6 @@ transport_load (dict_t *options, xlator_t *xl) { struct transport *trans = NULL, *return_trans = NULL; - char *addr_family = NULL; char *name = NULL; void *handle = NULL; char *type = NULL; @@ -66,26 +65,9 @@ transport_load (dict_t *options, if (ret < 0) gf_log ("dict", GF_LOG_DEBUG, "setting transport-type failed"); - ret = dict_get_str (options, "transport.address-family", - &addr_family); - if (ret < 0) { - ret = dict_get_str (options, "address-family", - &addr_family); - } - - if (ret < 0) { - ret = dict_set_str (options, - "transport.address-family", - "inet"); - if (ret < 0) { - gf_log ("dict", GF_LOG_ERROR, - "setting address-family failed"); - } - } - gf_log ("transport", GF_LOG_WARNING, "missing 'option transport-type'. defaulting to " - "\"socket\" (%s)", addr_family?addr_family:"inet"); + "\"socket\""); } else { { /* Backword compatibility to handle * /client, @@ -102,10 +84,6 @@ transport_load (dict_t *options, if ((is_tcp == 0) || (is_unix == 0) || (is_ibsdp == 0)) { - if (is_tcp == 0) - ret = dict_set_str (options, - "transport.address-family", - "inet"); if (is_unix == 0) ret = dict_set_str (options, "transport.address-family", |