summaryrefslogtreecommitdiffstats
path: root/transport/socket/src/socket.c
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-01-27 07:19:43 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-01-28 06:11:33 -0800
commit15b3f715ac6c7dc127723908f269f0418b61de71 (patch)
tree8ea40582f5cc79db685668d85b98eb5e2cf3b60d /transport/socket/src/socket.c
parente5a43ac65f60b7c4163eba6d7e15b60c54879813 (diff)
transport/socket: guess an appropriate address family when it is not specified in configuration.
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 561 (with address family set to 'inet-sdp', transport/socket doesn't work correctly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=561
Diffstat (limited to 'transport/socket/src/socket.c')
-rw-r--r--transport/socket/src/socket.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/transport/socket/src/socket.c b/transport/socket/src/socket.c
index 151ce3c9350..15a69c1b7e8 100644
--- a/transport/socket/src/socket.c
+++ b/transport/socket/src/socket.c
@@ -995,13 +995,8 @@ socket_connect (transport_t *this)
goto err;
}
- ret = client_fill_address_family (this, &sa_family);
- if (ret == -1) {
- goto err;
- }
-
ret = socket_client_get_remote_sockaddr (this, SA (&sockaddr),
- &sockaddr_len);
+ &sockaddr_len, &sa_family);
if (ret == -1) {
/* logged inside client_get_remote_sockaddr */
goto err;
@@ -1140,13 +1135,8 @@ socket_listen (transport_t *this)
return ret;
}
- ret = server_fill_address_family (this, &sa_family);
- if (ret == -1) {
- return ret;
- }
-
ret = socket_server_get_local_sockaddr (this, SA (&sockaddr),
- &sockaddr_len);
+ &sockaddr_len, &sa_family);
if (ret == -1) {
return ret;
}