From 99197c4bc292188d25b7ccda5328546dc899648e Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Fri, 16 Jun 1995 10:30:38 +0000 Subject: [PATCH] Added REUSEADDR. --- comstack/xmosi.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/comstack/xmosi.c b/comstack/xmosi.c index c15263c..f9dd6ab 100644 --- a/comstack/xmosi.c +++ b/comstack/xmosi.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: xmosi.c,v $ - * Revision 1.2 1995-06-15 12:30:07 quinn + * Revision 1.3 1995-06-16 10:30:38 quinn + * Added REUSEADDR. + * + * Revision 1.2 1995/06/15 12:30:07 quinn * Added @ as hostname alias for INADDR ANY. * * Revision 1.1 1995/06/14 09:58:20 quinn @@ -323,7 +326,13 @@ int mosi_bind(COMSTACK h, void *address, int mode) { int res; struct t_bind bnd; + int one = 1; + if (setsockopt(h->iofile, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) + { + h->errno = CSYSERR; + return -1; + } if (mode == CS_SERVER) bnd.qlen = 3; else -- 1.7.10.4