X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=comstack%2Fxmosi.c;h=f9dd6ab1b88e4acf9b6e9506eccd6fdd68cb4041;hp=c15263c5732574e419d904034355ef5a3776283a;hb=99197c4bc292188d25b7ccda5328546dc899648e;hpb=bee632cc3a4d22b61dd7dc1a196253be5782cf0c 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