setsockopt() will return -1 on error, not 0.

Pointy hat to:	Jeremie Le Hen
This commit is contained in:
Olivier Houchard 2005-09-28 16:14:43 +00:00
parent 20c0b2d3c3
commit c825862e6c

View File

@ -2568,7 +2568,7 @@ socksetup(int af, const char *bindhostname)
}
}
if (setsockopt(*s, SOL_SOCKET, SO_REUSEADDR,
(char *)&on, sizeof (on)) < 1) {
(char *)&on, sizeof (on)) < 0) {
logerror("setsockopt");
close(*s);
continue;