martin      98/09/04 09:47:47

  Modified:    src/main buff.c
  Log:
  Move buffer allocation test behind the 'simple' tests
  
  Revision  Changes    Path
  1.82      +7 -6      apache-1.3/src/main/buff.c
  
  Index: buff.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/buff.c,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- buff.c    1998/07/04 18:22:11     1.81
  +++ buff.c    1998/09/04 16:47:46     1.82
  @@ -1193,8 +1193,14 @@
   #ifdef CHARSET_EBCDIC
       static char *cbuf = NULL;
       static int csize = 0;
  +#endif /*CHARSET_EBCDIC*/
  +
  +    if (fb->flags & (B_WRERR | B_EOUT))
  +     return -1;
  +    if (nbyte == 0)
  +     return 0;
   
  -    /* XXX: martin don't you want to do this after the error tests below? */
  +#ifdef CHARSET_EBCDIC
       if (ap_bgetflag(fb, B_EBCDIC2ASCII)) {
           if (nbyte > csize) {
               if (cbuf != NULL)
  @@ -1207,11 +1213,6 @@
           buf = (cbuf) ? cbuf : buf;
       }
   #endif /*CHARSET_EBCDIC*/
  -
  -    if (fb->flags & (B_WRERR | B_EOUT))
  -     return -1;
  -    if (nbyte == 0)
  -     return 0;
   
       if (!(fb->flags & B_WR)) {
   /* unbuffered write -- have to use bcwrite since we aren't taking care
  
  
  

Reply via email to