httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sameer <sam...@c2.net>
Subject [No Subject]
Date Mon, 04 Nov 1996 20:08:08 GMT
*** buff.c-old	Tue Aug 20 06:00:18 1996
--- buff.c	Mon Nov  4 12:07:21 1996
***************
*** 438,446 ****
  	char chunksize[16];	/* Big enough for practically anything */
  
  	sprintf(chunksize, "%x\015\012", nbyte);
! 	write(fb->fd, chunksize, strlen(chunksize));
      }
!     r = write(fb->fd, buf, nbyte);
      if ((r > 0) && (fb->flags & B_CHUNK))
  	write(fb->fd, "\015\012", 2);
      return r;
--- 438,448 ----
  	char chunksize[16];	/* Big enough for practically anything */
  
  	sprintf(chunksize, "%x\015\012", nbyte);
! 	do r = write(fb->fd, chunksize, strlen(chunksize));
! 	while (r == -1 && errno == EINTR);
      }
!     do r = write(fb->fd, buf, nbyte);
!     while (r == -1 && errno == EINTR);
      if ((r > 0) && (fb->flags & B_CHUNK))
  	write(fb->fd, "\015\012", 2);
      return r;
***************
*** 462,469 ****
      if (!(fb->flags & B_WR))
      {
  /* unbuffered write */
! 	do i = bcwrite(fb, buf, nbyte);
! 	while (i == -1 && errno == EINTR);
  	if (i > 0) fb->bytes_sent += i;
  	if (i == 0)
  	{
--- 464,471 ----
      if (!(fb->flags & B_WR))
      {
  /* unbuffered write */
! 	i = bcwrite(fb, buf, nbyte);
! 
  	if (i > 0) fb->bytes_sent += i;
  	if (i == 0)
  	{
***************
*** 495,502 ****
  	}
  
  /* the buffer must be full */
! 	do i = bcwrite(fb, fb->outbase, fb->bufsiz);
! 	while (i == -1 && errno == EINTR);
  	if (i > 0) fb->bytes_sent += i;
  	if (i == 0)
  	{
--- 497,504 ----
  	}
  
  /* the buffer must be full */
! 	i = bcwrite(fb, fb->outbase, fb->bufsiz);
! 
  	if (i > 0) fb->bytes_sent += i;
  	if (i == 0)
  	{
***************
*** 531,538 ****
   */
      while (nbyte > fb->bufsiz)
      {
! 	do i = bcwrite(fb, buf, nbyte);
! 	while (i == -1 && errno == EINTR);
  	if (i > 0) fb->bytes_sent += i;
  	if (i == 0)
  	{
--- 533,540 ----
   */
      while (nbyte > fb->bufsiz)
      {
! 	i = bcwrite(fb, buf, nbyte);
! 
  	if (i > 0) fb->bytes_sent += i;
  	if (i == 0)
  	{
***************
*** 577,584 ****
      {
  /* the buffer must be full */
  	j = fb->outcnt;
! 	do i = bcwrite(fb, fb->outbase, fb->outcnt);
! 	while (i == -1 && errno == EINTR);
  	if (i > 0) fb->bytes_sent += i;
  	if (i == 0)
  	{
--- 579,586 ----
      {
  /* the buffer must be full */
  	j = fb->outcnt;
! 	i = bcwrite(fb, fb->outbase, fb->outcnt);
! 
  	if (i > 0) fb->bytes_sent += i;
  	if (i == 0)
  	{

Mime
View raw message