httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@hyperreal.org
Subject cvs commit: apache-2.0/src/main buff.c
Date Tue, 26 Oct 1999 22:42:54 GMT
manoj       99/10/26 15:42:51

  Modified:    src      CHANGES
               src/include buff.h
               src/main buff.c
  Log:
  Error functions recorded with ap_bonerror now take a status code as an
  argument, so errno isn't needed.
  
  Revision  Changes    Path
  1.14      +3 -1      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -d -u -r1.13 -r1.14
  --- CHANGES	1999/10/26 22:25:00	1.13
  +++ CHANGES	1999/10/26 22:42:33	1.14
  @@ -1,7 +1,9 @@
   Changes with Apache 2.0-dev
   
     *) ap_bflush and ap_bclose now return ap_status_t error codes instead
  -     of returning -1 and setting errno. [Manoj Kasichainula]
  +     of returning -1 and setting errno. And error functions recorded
  +     with ap_bonerror now take a status code as an argument. [Manoj
  +     Kasichainula]
   
     *) mod_speling runs in 2.0-dev now: a bug in readdir_r handling and
        interface adaption to APR functions did it. [Martin Kraemer]
  
  
  
  1.5       +5 -4      apache-2.0/src/include/buff.h
  
  Index: buff.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/buff.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -d -u -r1.4 -r1.5
  --- buff.h	1999/10/22 22:08:11	1.4
  +++ buff.h	1999/10/26 22:42:41	1.5
  @@ -128,7 +128,7 @@
   
   struct buff_struct {
       int flags;			/* flags */
  -    int saved_errno;		/* saved errno */
  +    ap_status_t saved_errno;	/* saved errno */
       unsigned char *inptr;	/* pointer to next location to read */
       int incnt;			/* number of bytes left to read from input buffer;
   				 * always 0 if had a read error  */
  @@ -141,7 +141,7 @@
   				 * keep track of the #remaining bytes in the chunk
   				 * here
   				 */
  -    void (*error) (BUFF *fb, int op, void *data);
  +    void (*error) (BUFF *fb, int op, void *data, ap_status_t errnum);
       void *error_data;
       long int bytes_sent;	/* number of bytes actually written */
   
  @@ -177,8 +177,9 @@
   #define ap_bgetflag(fb, flag)	((fb)->flags & (flag))
   
   /* Error handling */
  -API_EXPORT(void) ap_bonerror(BUFF *fb, void (*error) (BUFF *, int, void *),
  -			  void *data);
  +API_EXPORT(void) ap_bonerror(BUFF *fb,
  +                             void (*error) (BUFF *, int, void *, ap_status_t),
  +                             void *data);
   
   /* I/O */
   API_EXPORT(int) ap_bread(BUFF *fb, void *buf, int nbyte);
  
  
  
  1.18      +4 -5      apache-2.0/src/main/buff.c
  
  Index: buff.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/buff.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -d -u -r1.17 -r1.18
  --- buff.c	1999/10/26 22:25:01	1.17
  +++ buff.c	1999/10/26 22:42:46	1.18
  @@ -136,11 +136,9 @@
   
   static void doerror(BUFF *fb, int direction)
   {
  -    /* TODO: doerror should look at fb->saved_errno instead of errno */
  -    errno = fb->saved_errno;
       fb->flags |= (direction == B_RD ? B_RDERR : B_WRERR);
       if (fb->error != NULL)
  -	(*fb->error) (fb, direction, fb->error_data);
  +	(*fb->error) (fb, direction, fb->error_data, fb->saved_errno);
   }
   
   /* Buffering routines */
  @@ -901,8 +899,9 @@
       return k;
   }
   
  -API_EXPORT(void) ap_bonerror(BUFF *fb, void (*error) (BUFF *, int, void *),
  -			  void *data)
  +API_EXPORT(void) ap_bonerror(BUFF *fb,
  +                             void (*error) (BUFF *, int, void *, ap_status_t),
  +                             void *data)
   {
       fb->error = error;
       fb->error_data = data;
  
  
  

Mime
View raw message