X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftcpip.c;h=50c0622cde5973244f54bca7f7e46e7cda725b5d;hb=5f15a8d9071bf901861d332e7d512109df57bea3;hp=3fa26defb4e4971ce5e8f4c5ad313b90f5a6725b;hpb=5ba0bc49a8588ea1df229f4f1d60a8629acf71cf;p=yaz-moved-to-github.git diff --git a/src/tcpip.c b/src/tcpip.c index 3fa26de..50c0622 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -513,10 +513,6 @@ int tcpip_connect(COMSTACK h, void *address) struct sockaddr_in *add = (struct sockaddr_in *) address; #endif int r; -#ifdef __sun__ - int recbuflen; - YAZ_SOCKLEN_T rbufsize = sizeof(recbuflen); -#endif TRC(fprintf(stderr, "tcpip_connect\n")); h->io_pending = 0; if (h->state != CS_ST_UNBND) @@ -524,33 +520,6 @@ int tcpip_connect(COMSTACK h, void *address) h->cerrno = CSOUTSTATE; return -1; } -#ifdef __sun__ - /* On Suns, you must set a bigger Receive Buffer BEFORE a call to connect - * This gives the connect a chance to negotiate with the other side - * (see 'man tcp') - */ - if (getsockopt(h->iofile, SOL_SOCKET, SO_RCVBUF, (void *)&recbuflen, &rbufsize ) < 0 ) - { - h->cerrno = CSYSERR; - return -1; - } - TRC(fprintf( stderr, "Current Size of TCP Receive Buffer= %d\n", - recbuflen )); - recbuflen *= 10; /* lets be optimistic */ - if (setsockopt(h->iofile, SOL_SOCKET, SO_RCVBUF, (void *)&recbuflen, rbufsize ) < 0 ) - { - h->cerrno = CSYSERR; - return -1; - } - if (getsockopt(h->iofile, SOL_SOCKET, SO_RCVBUF, (void *)&recbuflen, &rbufsize ) ) - { - h->cerrno = CSYSERR; - return -1; - } - TRC(fprintf(stderr, "New Size of TCP Receive Buffer = %d\n", - recbuflen )); -#endif - #if HAVE_GETADDRINFO r = connect(h->iofile, ai->ai_addr, ai->ai_addrlen); freeaddrinfo(sp->ai);