summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/lib/src/rpc-socket.c
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-11-08 06:25:16 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-11-09 02:11:55 -0800
commit0f9ec3dec9d51ac5a8f692896d0724b3e87e9ae2 (patch)
tree9efaf5e5148a03158701699adec0a02bb84e6978 /xlators/nfs/lib/src/rpc-socket.c
parent13c4f8d0f9114a9f8324d0dec8bd926c04a5dfc5 (diff)
nfsrpc: Decouple TCP connections from programs
..so that multiple programs can be served from the same connection or multiple ports can be bound to the same port number. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1743 (XenServer is not compatible with GlusterNFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1743
Diffstat (limited to 'xlators/nfs/lib/src/rpc-socket.c')
-rw-r--r--xlators/nfs/lib/src/rpc-socket.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/xlators/nfs/lib/src/rpc-socket.c b/xlators/nfs/lib/src/rpc-socket.c
index 9d6aca33b38..6c399d90416 100644
--- a/xlators/nfs/lib/src/rpc-socket.c
+++ b/xlators/nfs/lib/src/rpc-socket.c
@@ -123,12 +123,11 @@ nfs_rpcsvc_socket_listen (int addrfam, char *listenhost, uint16_t listenport)
ret = bind (sock, (struct sockaddr *)&sockaddr, sockaddr_len);
if (ret == -1) {
- gf_log (GF_RPCSVC_SOCK, GF_LOG_ERROR, "binding socket failed:"
- " %s", strerror (errno));
- if (errno == EADDRINUSE)
- gf_log (GF_RPCSVC_SOCK, GF_LOG_ERROR, "Port is already"
- " in use");
- goto close_err;
+ if (errno != EADDRINUSE) {
+ gf_log (GF_RPCSVC_SOCK, GF_LOG_ERROR, "binding socket "
+ "failed: %s", strerror (errno));
+ goto close_err;
+ }
}
ret = listen (sock, 10);