From 391023ddc5bcd1c6b8f2782d8b1c41c614f5e200 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Mon, 29 Mar 2010 00:34:20 +0000 Subject: 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 Signed-off-by: Anand V. Avati 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 --- libglusterfs/src/transport.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'libglusterfs/src/transport.c') diff --git a/libglusterfs/src/transport.c b/libglusterfs/src/transport.c index f3175272d12..aee809117b6 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", -- cgit