cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] conga/ricci/common ServerSocket.cpp
@ 2006-10-14 17:51 kupcevic
  0 siblings, 0 replies; only message in thread
From: kupcevic @ 2006-10-14 17:51 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	kupcevic at sourceware.org	2006-10-14 17:51:35

Modified files:
	ricci/common   : ServerSocket.cpp 

Log message:
	ricci: set SO_REUSEADDR on all server sockets

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/common/ServerSocket.cpp.diff?cvsroot=cluster&r1=1.3&r2=1.4

--- conga/ricci/common/ServerSocket.cpp	2006/08/10 22:53:07	1.3
+++ conga/ricci/common/ServerSocket.cpp	2006/10/14 17:51:35	1.4
@@ -45,6 +45,12 @@
     throw m;
   }
   
+  int dummy_true = 1;
+  if (setsockopt(_sock, SOL_SOCKET, SO_REUSEADDR, &dummy_true, sizeof(dummy_true))) {
+    String m = String("ServerSocket(sock_path=") + sock_path + "): set SO_REUSEADDR, failed, errno=" + errno;
+    throw m;
+  }
+  
   struct sockaddr_un {
     sa_family_t  sun_family;
     char         sun_path[100];
@@ -78,6 +84,12 @@
     throw m;
   }
   
+  int dummy_true = 1;
+  if (setsockopt(_sock, SOL_SOCKET, SO_REUSEADDR, &dummy_true, sizeof(dummy_true))) {
+    String m = String("ServerSocket(port=") + port + "): set SO_REUSEADDR, failed, errno=" + errno;
+    throw m;
+  }
+  
   struct sockaddr_in addr;
   addr.sin_family = AF_INET;
   addr.sin_port = htons(port);



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-14 17:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-14 17:51 [Cluster-devel] conga/ricci/common ServerSocket.cpp kupcevic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).