X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=comstack%2Funix.c;h=22087ead5a08b4859402c264c6b5471b7740ba46;hb=c39a893dfdae5f792139177132e7e7a70e010aa7;hp=235c9b14f8de1cdbeb2f8d9ab425ffab1e2fb2f0;hpb=7d4006fb1914018d99ea9764aa45b8edc86ebd5d;p=yaz-moved-to-github.git diff --git a/comstack/unix.c b/comstack/unix.c index 235c9b1..22087ea 100644 --- a/comstack/unix.c +++ b/comstack/unix.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 1995-2002, Index Data + * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: unix.c,v 1.8 2002-12-15 21:22:58 adam Exp $ + * $Id: unix.c,v 1.12 2003-05-14 13:49:02 adam Exp $ * UNIX socket COMSTACK. By Morten Bøgeskov. */ #ifndef WIN32 @@ -22,9 +22,7 @@ #include #include #include - -/* Chas added the following, so we get the definition of completeBER */ -#include +#include #ifndef YAZ_SOCKLEN_T #define YAZ_SOCKLEN_T int @@ -140,7 +138,7 @@ COMSTACK unix_type(int s, int blocking, int protocol, void *vp) if (protocol == PROTO_WAIS) state->complete = completeWAIS; else - state->complete = completeBER; + state->complete = cs_complete_auto; p->timeout = COMSTACK_DEFAULT_TIMEOUT; TRC(fprintf(stderr, "Created new UNIX comstack\n")); @@ -294,6 +292,7 @@ static int unix_bind(COMSTACK h, void *address, int mode) h->cerrno = CSYSERR; return -1; } + chmod(path, 0777); if (mode == CS_SERVER && listen(h->iofile, 3) < 0) { h->cerrno = CSYSERR;