From 98dabcebca16065177503b9788e67483cafbde41 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 1 Dec 2009 10:46:57 +0100 Subject: [PATCH] Remove TCP optim. for Solaris. Bug #3116. Conflicts: src/tcpip.c --- src/tcpip.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/tcpip.c b/src/tcpip.c index 8ffdfe8..72f66ad 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -394,10 +394,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) @@ -412,33 +408,6 @@ int tcpip_connect(COMSTACK h, void *address) return -1; } #endif -#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, sp->ai->ai_addr, sp->ai->ai_addrlen); freeaddrinfo(sp->ai); -- 1.7.10.4