projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0960a1
)
Avoid EADDRINUSE for s_server.
author
Bodo Möller
<bodo@openssl.org>
Fri, 2 Apr 1999 23:35:43 +0000
(23:35 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Fri, 2 Apr 1999 23:35:43 +0000
(23:35 +0000)
Submitted by:
Reviewed by:
PR:
apps/s_socket.c
patch
|
blob
|
history
diff --git
a/apps/s_socket.c
b/apps/s_socket.c
index 6274acf53b6db15f623bb6b815b3c6dc00958be2..0030b57936d524d961e84b671c8ee15c2c9f1cf9 100644
(file)
--- a/
apps/s_socket.c
+++ b/
apps/s_socket.c
@@
-342,6
+342,12
@@
char *ip;
s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
if (s == INVALID_SOCKET) goto err;
+#if defined SOL_SOCKET && defined SO_REUSEADDR
+ {
+ int i = 1;
+ setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &i, sizeof i);
+ }
+#endif
if (bind(s,(struct sockaddr *)&server,sizeof(server)) == -1)
{
#ifndef WINDOWS