httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@hyperreal.com>
Subject cvs commit: apache/src buff.c
Date Mon, 16 Jun 1997 19:45:13 GMT
dgaudet     97/06/16 12:45:13

  Modified:    src       buff.c
  Log:
  A tiny bit more cleanup.  Also check B_SOCKET when closing the fds.
  
  Revision  Changes    Path
  1.29      +24 -11    apache/src/buff.c
  
  Index: buff.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/buff.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -C3 -r1.28 -r1.29
  *** buff.c	1997/06/16 19:32:49	1.28
  --- buff.c	1997/06/16 19:45:12	1.29
  ***************
  *** 759,766 ****
    
        while (nbyte > 0) {
    	i = buff_write( fb, buf, nbyte );
  ! 	if( i < 0 ) {
  ! 	    if( errno != EAGAIN && errno != EINTR ) {
    		return -1;
    	    }
    	}
  --- 759,766 ----
    
        while (nbyte > 0) {
    	i = buff_write( fb, buf, nbyte );
  ! 	if (i < 0) {
  ! 	    if (errno != EAGAIN && errno != EINTR) {
    		return -1;
    	    }
    	}
  ***************
  *** 785,803 ****
    bcwrite(BUFF *fb, const void *buf, int nbyte)
    {
        char chunksize[16];	/* Big enough for practically anything */
  -     int i;
    #ifndef NO_WRITEV
        struct iovec vec[3];
  !     int rv;
    #endif
    
        if (fb->flags & (B_WRERR|B_EOUT))
    	return -1;
    
  !     if (!(fb->flags & B_CHUNK))
  !     {
  ! 	i = buff_write(fb, buf, nbyte);
  !         return(i);
        }
    
    #ifdef NO_WRITEV
  --- 785,800 ----
    bcwrite(BUFF *fb, const void *buf, int nbyte)
    {
        char chunksize[16];	/* Big enough for practically anything */
    #ifndef NO_WRITEV
        struct iovec vec[3];
  !     int i, rv;
    #endif
    
        if (fb->flags & (B_WRERR|B_EOUT))
    	return -1;
    
  !     if (!(fb->flags & B_CHUNK)) {
  ! 	return buff_write(fb, buf, nbyte);
        }
    
    #ifdef NO_WRITEV
  ***************
  *** 1050,1058 ****
    
        if (fb->flags & B_WR) rc1 = bflush(fb);
        else rc1 = 0;
  !     rc2 = closesocket(fb->fd);
  !     if (fb->fd_in != fb->fd) rc3 = closesocket(fb->fd_in);
  !     else rc3 = 0;
    
        fb->inptr = fb->inbase;
        fb->incnt = 0;
  --- 1047,1071 ----
    
        if (fb->flags & B_WR) rc1 = bflush(fb);
        else rc1 = 0;
  ! #ifdef WIN32
  !     if (fb->flags & B_SOCKET) {
  ! 	rc2 = closesocket(fb->fd);
  ! 	if (fb->fd_in != fb->fd) {
  ! 	    rc3 = closesocket(fb->fd_in);
  ! 	} else {
  ! 	    rc3 = 0;
  ! 	}
  !     } else {
  ! #endif
  ! 	rc2 = close(fb->fd);
  ! 	if (fb->fd_in != fb->fd) {
  ! 	    rc3 = close(fb->fd_in);
  ! 	} else {
  ! 	    rc3 = 0;
  ! 	}
  ! #ifdef WIN32
  !     }
  ! #endif
    
        fb->inptr = fb->inbase;
        fb->incnt = 0;
  
  
  

Mime
View raw message