From: kupcevic@sourceware.org <kupcevic@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/ricci/common ServerSocket.cpp
Date: 14 Oct 2006 17:51:36 -0000 [thread overview]
Message-ID: <20061014175136.26890.qmail@sourceware.org> (raw)
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);
reply other threads:[~2006-10-14 17:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061014175136.26890.qmail@sourceware.org \
--to=kupcevic@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.