summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b538a4f)
raw | patch | inline | side by side (parent: b538a4f)
author | Pavel Shramov <shramov@mexmat.net> | |
Tue, 4 Dec 2007 14:43:35 +0000 (17:43 +0300) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Sat, 8 Dec 2007 11:57:24 +0000 (12:57 +0100) |
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/network.c | patch | blob | history |
diff --git a/src/network.c b/src/network.c
index ab04f4c13bd349117b1f3dd324b638ef2e4edb1a..a659189f3e7960d312d0d608f9f8af55d1e3c5bb 100644 (file)
--- a/src/network.c
+++ b/src/network.c
static int network_bind_socket (const sockent_t *se, const struct addrinfo *ai)
{
int loop = 0;
+ int yes = 1;
/* allow multiple sockets to use the same PORT number */
if (setsockopt(se->fd, SOL_SOCKET, SO_REUSEADDR,
- &loop, sizeof(loop)) == -1) {
+ &yes, sizeof(yes)) == -1) {
char errbuf[1024];
ERROR ("setsockopt: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));