rbb         2002/10/21 19:23:20

  Modified:    include  apr_errno.h
               memory/unix apr_pools.c
  Log:
  Allow people who use userdata to distinguish between a successful retrieval
  from the pool userdata, and not being able to retrieve.  We could also
  separate out when the hash doesn't exist, but I have left that for somebody
  else.
  
  Revision  Changes    Path
  1.99      +2 -0      apr/include/apr_errno.h
  
  Index: apr_errno.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_errno.h,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- apr_errno.h       16 Oct 2002 15:51:30 -0000      1.98
  +++ apr_errno.h       22 Oct 2002 02:23:20 -0000      1.99
  @@ -421,6 +421,8 @@
   #define APR_EMISMATCH      (APR_OS_START_STATUS + 24)
   /** @see APR_STATUS_IS_EBUSY */
   #define APR_EBUSY          (APR_OS_START_STATUS + 25)
  +/[EMAIL PROTECTED] APR_STATUS_IS_KEYNOTFOUND */
  +#define APR_KEYNOTFOUND    (APR_OS_START_STATUS + 26)
   
   /**
    * @defgroup aprerr_status Status Value Tests 
  
  
  
  1.187     +8 -2      apr/memory/unix/apr_pools.c
  
  Index: apr_pools.c
  ===================================================================
  RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v
  retrieving revision 1.186
  retrieving revision 1.187
  diff -u -r1.186 -r1.187
  --- apr_pools.c       5 Oct 2002 12:14:03 -0000       1.186
  +++ apr_pools.c       22 Oct 2002 02:23:20 -0000      1.187
  @@ -1860,10 +1860,16 @@
       apr_pool_check_integrity(pool);
   #endif /* APR_POOL_DEBUG */
   
  -    if (pool->user_data == NULL)
  +    if (pool->user_data == NULL) {
           *data = NULL;
  -    else
  +    }
  +    else {
           *data = apr_hash_get(pool->user_data, key, APR_HASH_KEY_STRING);
  +    }
  +
  +    if (*data == NULL) {
  +        return APR_KEYNOTFOUND;
  +    }
   
       return APR_SUCCESS;
   }
  
  
  

Reply via email to