apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject cvs commit: apr/dso/beos dso.c
Date Sun, 23 Nov 2003 20:33:09 GMT
dreid       2003/11/23 12:33:09

  Modified:    include/arch/beos apr_arch_dso.h
               dso/beos dso.c
  Log:
  Modify the beos dso code to always return a structure, adding the errormsg
  field as this seems to be the raison'd'etre for returning the structure.
  
  Revision  Changes    Path
  1.2       +3 -0      apr/include/arch/beos/apr_arch_dso.h
  
  Index: apr_arch_dso.h
  ===================================================================
  RCS file: /home/cvs/apr/include/arch/beos/apr_arch_dso.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_arch_dso.h	6 Jan 2003 23:44:22 -0000	1.1
  +++ apr_arch_dso.h	23 Nov 2003 20:33:09 -0000	1.2
  @@ -69,6 +69,9 @@
   struct apr_dso_handle_t {
       image_id      handle;    /* Handle to the DSO loaded */
       apr_pool_t   *pool;
  +    const char   *errormsg;  /* if the load fails, we have an error
  +                              * message here :)
  +                              */
   };
   
   #endif
  
  
  
  1.25      +8 -5      apr/dso/beos/dso.c
  
  Index: dso.c
  ===================================================================
  RCS file: /home/cvs/apr/dso/beos/dso.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- dso.c	6 Jan 2003 23:44:16 -0000	1.24
  +++ dso.c	23 Nov 2003 20:33:09 -0000	1.25
  @@ -71,14 +71,17 @@
   APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, 
                                          const char *path, apr_pool_t *pool)
   {
  -    image_id newid;
  -
  -    if((newid = load_add_on(path)) < B_NO_ERROR)
  -        return APR_EDSOOPEN;
  +    image_id newid = -1;
   
       *res_handle = apr_pcalloc(pool, sizeof(*res_handle));
  -    (*res_handle)->handle = newid;
  +
  +    if((newid = load_add_on(path)) < B_NO_ERROR) {
  +        (*res_handle)->errormsg = strerror(newid);
  +        return APR_EDSOOPEN;
  +	}
  +	
       (*res_handle)->pool = pool;
  +    (*res_handle)->handle = newid;
   
       apr_pool_cleanup_register(pool, *res_handle, dso_cleanup, apr_pool_cleanup_null);
   
  
  
  

Mime
View raw message