httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@hyperreal.org
Subject cvs commit: apache-2.0/src/modules/standard mod_auth.c mod_autoindex.c
Date Tue, 14 Sep 1999 13:37:46 GMT
rbb         99/09/14 06:37:46

  Modified:    src/ap   ap_hooks.c
               src/lib/apr/file_io/unix fileacc.c
               src/lib/apr/include apr_file_io.h apr_general.h apr_lock.h
                        apr_network_io.h apr_thread_proc.h apr_time.h
               src/lib/apr/locks/unix locks.c
               src/lib/apr/misc/unix misc.h start.c
               src/lib/apr/network_io/unix poll.c sockets.c
               src/lib/apr/test Makefile.in ab_apr.c abc.c client.c
                        htdigest.c server.c testargs.c testfile.c
                        testproc.c testsig.c testsock.c testthread.c
                        testtime.c
               src/lib/apr/threadproc/beos thread.c
               src/lib/apr/threadproc/os2 thread.c
               src/lib/apr/threadproc/unix procsup.c thread.c threadpriv.c
               src/lib/apr/threadproc/win32 thread.c
               src/lib/apr/time/unix access.c
               src/main http_core.c http_main.c http_protocol.c
                        http_request.c
               src/modules/mpm/dexter dexter.c
               src/modules/mpm/mpmt_pthread mpmt_pthread.c
               src/modules/mpm/prefork prefork.c
               src/modules/standard mod_auth.c mod_autoindex.c
  Added:       src/lib/apr/test testcontext.c
  Log:
  A change to how APR uses user data.  Now, user data is a linked list that
  is retreivable using a char string.  Basically, you provide a string that
  will be used as a key when you store the data.  If the key was used before,
  we will overwrite the old data.  When you want to retreive your data, pass
  in the same key, and we will find the data you care about.  This also makes
  it harder to put user data in when creating a context, so that option has
  disappeared.  It is also impossible to inherit user data from parent contexts.
  This option may be added in later.  I will be documenting this VERY soon.
  
  Revision  Changes    Path
  1.6       +1 -1      apache-2.0/src/ap/ap_hooks.c
  
  Index: ap_hooks.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_hooks.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ap_hooks.c	1999/08/31 05:32:08	1.5
  +++ ap_hooks.c	1999/09/14 13:37:19	1.6
  @@ -118,7 +118,7 @@
       ap_array_header_t *pNew;
       int n;
   
  -    ap_create_context(g_pHookPool, NULL, &p);
  +    ap_create_context(g_pHookPool, &p);
       pSort=prepare(p,(TSortData *)pHooks->elts,pHooks->nelts);
       tsort(pSort,pHooks->nelts);
       pNew=ap_make_array(g_pHookPool,pHooks->nelts,sizeof(TSortData));
  
  
  
  1.3       +8 -6      apache-2.0/src/lib/apr/file_io/unix/fileacc.c
  
  Index: fileacc.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/fileacc.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- fileacc.c	1999/09/01 19:01:51	1.2
  +++ fileacc.c	1999/09/14 13:37:20	1.3
  @@ -249,15 +249,15 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_get_filedata(ap_file_t *, void *)
  + * ap_status_t ap_get_filedata(ap_file_t *, char *key, void *)
    *    Return the data associated with the current file.
    * arg 1) The currently open file.
    * arg 2) The user data associated with the file.  
    */                     
  -ap_status_t ap_get_filedata(struct file_t *file, void *data)
  +ap_status_t ap_get_filedata(struct file_t *file, char *key, void *data)
   {    
       if (file != NULL) {
  -        return ap_get_userdata(file->cntxt, &data);
  +        return ap_get_userdata(file->cntxt, key, &data);
       }
       else {
           data = NULL;
  @@ -266,15 +266,17 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_set_filedata(ap_file_t *, void *)
  + * ap_status_t ap_set_filedata(ap_file_t *, void *, char *key,
  +                               ap_status (*cleanup) (void *))
    *    Set the data associated with the current file.
    * arg 1) The currently open file.
    * arg 2) The user data to associate with the file.  
    */                     
  -ap_status_t ap_set_filedata(struct file_t *file, void *data)
  +ap_status_t ap_set_filedata(struct file_t *file, void *data, char *key,
  +                            ap_status_t (*cleanup) (void *))
   {    
       if (file != NULL) {
  -        return ap_set_userdata(file->cntxt, data);
  +        return ap_set_userdata(file->cntxt, data, key, cleanup);
       }
       else {
           data = NULL;
  
  
  
  1.5       +3 -2      apache-2.0/src/lib/apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_file_io.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apr_file_io.h	1999/09/07 12:36:24	1.4
  +++ apr_file_io.h	1999/09/14 13:37:20	1.5
  @@ -141,8 +141,9 @@
   /*accessor and general file_io functions. */
   ap_status_t ap_get_filename(ap_file_t *, char **);
   ap_status_t ap_get_dir_filename(ap_dir_t *, char **);
  -ap_status_t ap_get_filedata(ap_file_t *, void *);
  -ap_status_t ap_set_filedata(ap_file_t *, void *);
  +ap_status_t ap_get_filedata(ap_file_t *, char *, void *);
  +ap_status_t ap_set_filedata(ap_file_t *, void *, char *,
  +                            ap_status_t (*cleanup) (void *));
   
   ap_status_t ap_dir_entry_size(ap_dir_t *, ap_ssize_t *);
   ap_status_t ap_dir_entry_mtime(ap_dir_t *, time_t *);
  
  
  
  1.3       +4 -5      apache-2.0/src/lib/apr/include/apr_general.h
  
  Index: apr_general.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- apr_general.h	1999/09/13 16:47:45	1.2
  +++ apr_general.h	1999/09/14 13:37:21	1.3
  @@ -222,12 +222,11 @@
   #endif
   
   /* Context functions */
  -ap_status_t ap_create_context(ap_context_t *, void *, ap_context_t **);
  -ap_status_t ap_set_signal_safe(ap_context_t *, ap_int16_t);
  -ap_status_t ap_set_cancel_safe(ap_context_t *, ap_int16_t); 
  +ap_status_t ap_create_context(ap_context_t *, ap_context_t **);
   ap_status_t ap_exit(ap_context_t *);
  -ap_status_t ap_set_userdata(ap_context_t *, void *);
  -ap_status_t ap_get_userdata(ap_context_t *, void **);
  +ap_status_t ap_set_userdata(ap_context_t *, void *, char *, 
  +                            ap_status_t (*cleanup) (void *));
  +ap_status_t ap_get_userdata(ap_context_t *, char *, void **);
   ap_status_t ap_initialize(void);
   
   ap_status_t ap_create_signal(ap_context_t *, ap_signum_t);
  
  
  
  1.2       +3 -2      apache-2.0/src/lib/apr/include/apr_lock.h
  
  Index: apr_lock.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_lock.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_lock.h	1999/08/17 15:59:37	1.1
  +++ apr_lock.h	1999/09/14 13:37:21	1.2
  @@ -74,8 +74,9 @@
   ap_status_t ap_destroy_lock(ap_lock_t *);
   ap_status_t ap_child_init_lock(ap_context_t *, char *, ap_lock_t **);
   
  -ap_status_t ap_get_lockdata(ap_lock_t *, void *);
  -ap_status_t ap_set_lockdata(ap_lock_t *, void *);
  +ap_status_t ap_get_lockdata(ap_lock_t *, char *, void *);
  +ap_status_t ap_set_lockdata(ap_lock_t *, void *, char *,
  +                            ap_status_t (*cleanup) (void *));
   
   #ifdef __cplusplus
   }
  
  
  
  1.5       +6 -4      apache-2.0/src/lib/apr/include/apr_network_io.h
  
  Index: apr_network_io.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_network_io.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apr_network_io.h	1999/09/04 00:21:15	1.4
  +++ apr_network_io.h	1999/09/14 13:37:21	1.5
  @@ -115,8 +115,9 @@
   
   ap_status_t ap_get_remote_hostname(ap_socket_t *, char **);
   ap_status_t ap_gethostname(ap_context_t *, char *, int);
  -ap_status_t ap_get_socketdata(ap_socket_t *, void *);
  -ap_status_t ap_set_socketdata(ap_socket_t *, void *);
  +ap_status_t ap_get_socketdata(ap_socket_t *, char *, void *);
  +ap_status_t ap_set_socketdata(ap_socket_t *, void *, char *,
  +                              ap_status_t (*cleanup) (void*));
   
   ap_status_t ap_send(ap_socket_t *, const char *, ap_ssize_t *);
   ap_status_t ap_recv(ap_socket_t *, char *, ap_ssize_t *);
  @@ -133,8 +134,9 @@
   ap_status_t ap_remove_poll_socket(ap_pollfd_t *, ap_socket_t *, ap_int16_t);
   ap_status_t ap_clear_poll_sockets(ap_pollfd_t *, ap_int16_t);
   ap_status_t ap_get_revents(ap_pollfd_t *, ap_socket_t *, ap_int16_t *);
  -ap_status_t ap_get_polldata(ap_pollfd_t *, void *);
  -ap_status_t ap_set_polldata(ap_pollfd_t *, void *);
  +ap_status_t ap_get_polldata(ap_pollfd_t *, char *, void *);
  +ap_status_t ap_set_polldata(ap_pollfd_t *, void *, char *,
  +                            ap_status_t (*cleanup) (void *));
   
   /*  accessor functions   */
   
  
  
  
  1.2       +9 -6      apache-2.0/src/lib/apr/include/apr_thread_proc.h
  
  Index: apr_thread_proc.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_thread_proc.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_thread_proc.h	1999/08/17 15:59:37	1.1
  +++ apr_thread_proc.h	1999/09/14 13:37:21	1.2
  @@ -95,16 +95,18 @@
   ap_status_t ap_cancel_thread(ap_thread_t *);
   ap_status_t ap_setcanceltype(ap_context_t *, ap_int32_t);
   ap_status_t ap_setcancelstate(ap_context_t *, ap_int32_t);
  -ap_status_t ap_get_threaddata(ap_thread_t *, void *);
  -ap_status_t ap_set_threaddata(ap_thread_t *, void *);
  +ap_status_t ap_get_threaddata(ap_thread_t *, char *, void *);
  +ap_status_t ap_set_threaddata(ap_thread_t *, void *, char *,
  +                              ap_status_t (*cleanup) (void *));
   
   ap_status_t ap_create_thread_private(ap_context_t *, void (*dest)(void *), 
                                        ap_key_t **);
   ap_status_t ap_get_thread_private(ap_key_t *, void **);
   ap_status_t ap_set_thread_private(ap_key_t *, void *);
   ap_status_t ap_delete_thread_private(ap_key_t *);
  -ap_status_t ap_get_threadkeydata(ap_key_t *, void *);
  -ap_status_t ap_set_threadkeydata(ap_key_t *, void *);
  +ap_status_t ap_get_threadkeydata(ap_key_t *, char *, void *);
  +ap_status_t ap_set_threadkeydata(ap_key_t *, void *, char *,
  +                                 ap_status_t (*cleanup) (void *));
   
   /* Process Function definitions */
   ap_status_t ap_createprocattr_init(ap_context_t *, ap_procattr_t **);
  @@ -113,8 +115,9 @@
   ap_status_t ap_setprocattr_dir(ap_procattr_t *, char *);
   ap_status_t ap_setprocattr_cmdtype(ap_procattr_t *, ap_cmdtype_e);
   ap_status_t ap_setprocattr_detach(ap_procattr_t *, ap_int32_t);
  -ap_status_t ap_get_procdata(ap_proc_t *, void *);
  -ap_status_t ap_set_procdata(ap_proc_t *, void *);
  +ap_status_t ap_get_procdata(ap_proc_t *, char *, void *);
  +ap_status_t ap_set_procdata(ap_proc_t *, void *, char *,
  +                            ap_status_t (*cleanup) (void *));
   
   ap_status_t ap_get_childin(ap_proc_t *, ap_file_t **);
   ap_status_t ap_get_childout(ap_proc_t *, ap_file_t **);
  
  
  
  1.2       +3 -2      apache-2.0/src/lib/apr/include/apr_time.h
  
  Index: apr_time.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_time.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_time.h	1999/08/17 15:59:37	1.1
  +++ apr_time.h	1999/09/14 13:37:21	1.2
  @@ -93,8 +93,9 @@
   ap_status_t ap_set_year(ap_time_t *, ap_int32_t);
   ap_status_t ap_set_wday(ap_time_t *, ap_int32_t);
   
  -ap_status_t ap_get_timedata(ap_time_t *, void *);
  -ap_status_t ap_set_timedata(ap_time_t *, void *);
  +ap_status_t ap_get_timedata(ap_time_t *, char *, void *);
  +ap_status_t ap_set_timedata(ap_time_t *, void *, char *,
  +                            ap_status_t (*cleanup) (void *));
    
   #ifdef __cplusplus
   }
  
  
  
  1.3       +8 -6      apache-2.0/src/lib/apr/locks/unix/locks.c
  
  Index: locks.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/locks.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- locks.c	1999/09/12 11:06:25	1.2
  +++ locks.c	1999/09/14 13:37:23	1.3
  @@ -193,15 +193,15 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_get_lockdata(ap_lock_t *, void *)
  + * ap_status_t ap_get_lockdata(ap_lock_t *, char *key, void *)
    *    Return the context associated with the current lock.
    * arg 1) The currently open lock.
    * arg 2) The user data associated with the lock.
    */
  -ap_status_t ap_get_lockdata(struct lock_t *lock, void *data)
  +ap_status_t ap_get_lockdata(struct lock_t *lock, char *key, void *data)
   {
       if (lock != NULL) {
  -        return ap_get_userdata(lock->cntxt, &data);
  +        return ap_get_userdata(lock->cntxt, key, &data);
       }
       else {
           data = NULL;
  @@ -210,15 +210,17 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_set_lockdata(ap_lock_t *, void *)
  + * ap_status_t ap_set_lockdata(ap_lock_t *, void *, char *,
  +                               ap_status_t (*cleanup) (void *))
    *    Return the context associated with the current lock.
    * arg 1) The currently open lock.
    * arg 2) The user data to associate with the lock.
    */
  -ap_status_t ap_set_lockdata(struct lock_t *lock, void *data)
  +ap_status_t ap_set_lockdata(struct lock_t *lock, void *data, char *key,
  +                            ap_status_t (*cleanup) (void *))
   {
       if (lock != NULL) {
  -        return ap_set_userdata(lock->cntxt, data);
  +        return ap_set_userdata(lock->cntxt, data, key, cleanup);
       }
       else {
           data = NULL;
  
  
  
  1.3       +8 -1      apache-2.0/src/lib/apr/misc/unix/misc.h
  
  Index: misc.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/misc.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- misc.h	1999/08/27 16:25:57	1.2
  +++ misc.h	1999/09/14 13:37:23	1.3
  @@ -60,9 +60,16 @@
   #include "apr_file_io.h"
   #include "apr_errno.h"
   
  +typedef struct datastruct {
  +    void *data;
  +    char *key;
  +    struct datastruct *next;
  +    struct datastruct *prev;
  +} datastruct;
  +
   struct context_t {
       struct ap_pool_t *pool;
  -    void *prog_data;
  +    datastruct *prog_data;
   };
   
   #endif  /* ! MISC_H */
  
  
  
  1.6       +45 -13    apache-2.0/src/lib/apr/misc/unix/start.c
  
  Index: start.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/start.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- start.c	1999/09/12 12:12:03	1.5
  +++ start.c	1999/09/14 13:37:23	1.6
  @@ -77,8 +77,7 @@
    *        inherit the data from it's parent.
    * arg 3) The context we have just created.
    */
  -ap_status_t ap_create_context(struct context_t *cont, void *data, 
  -                              struct context_t **newcont)
  +ap_status_t ap_create_context(struct context_t *cont, struct context_t **newcont)
   {
       struct context_t *new;
       ap_pool_t *pool;
  @@ -102,12 +101,7 @@
       }
   
       new->pool = pool;
  -    if (data == NULL && cont) {
  -        new->prog_data = cont->prog_data;
  -    }
  -    else {
  -        new->prog_data = data;
  -    }
  +    new->prog_data = NULL;
    
       *newcont = new;
       return APR_SUCCESS;
  @@ -129,11 +123,35 @@
    *    Set the data associated with the current context.
    * arg 1) The current context.
    * arg 2) The user data associated with the context.
  + * arg 3) The key to use for association
  + * arg 4) The cleanup program to use to cleanup the data;
    */
  -ap_status_t ap_set_userdata(struct context_t *cont, void *data)
  +ap_status_t ap_set_userdata(struct context_t *cont, void *data, char *key,
  +                            ap_status_t (*cleanup) (void *))
   {
  +    datastruct *dptr = NULL, *dptr2 = NULL;
       if (cont) { 
  -        cont->prog_data = data;
  +        dptr = cont->prog_data;
  +        while (dptr) {
  +            if (!strcmp(dptr->key, key))
  +                break;
  +            dptr2 = dptr;
  +            dptr = dptr->next;
  +        }
  +        if (dptr == NULL) {
  +            dptr = ap_palloc(cont, sizeof(datastruct));
  +            dptr->next = dptr->prev = NULL;
  +            dptr->key = strdup(key);
  +            if (dptr2) {
  +                dptr2->next = dptr;
  +                dptr->prev = dptr2;
  +            }
  +            else {
  +                cont->prog_data = dptr;
  +            }
  +        }
  +        dptr->data = data;
  +        ap_register_cleanup(cont, dptr->data, cleanup, cleanup);
           return APR_SUCCESS;
       }
       return APR_ENOCONT;
  @@ -143,12 +161,26 @@
    * ap_status_t ap_get_userdata(ap_context_t *, void **)
    *    Return the data associated with the current context.
    * arg 1) The current context.
  - * arg 2) The user data associated with the context.
  + * arg 2) The key for the data to retrieve
  + * arg 3) The user data associated with the context.
    */
  -ap_status_t ap_get_userdata(struct context_t *cont, void **data)
  +ap_status_t ap_get_userdata(struct context_t *cont, char *key, void **data)
   {
  +    datastruct *dptr = NULL;
       if (cont) { 
  -        (*data) = cont->prog_data;
  +        dptr = cont->prog_data;
  +        while (dptr) {
  +            if (!strcmp(dptr->key, key)) {
  +                break;
  +            }
  +            dptr = dptr->next;
  +        }
  +        if (dptr) {
  +            (*data) = dptr->data;
  +        }
  +        else {
  +            (*data) = NULL;
  +        }
           return APR_SUCCESS;
       }
       return APR_ENOCONT;
  
  
  
  1.4       +8 -6      apache-2.0/src/lib/apr/network_io/unix/poll.c
  
  Index: poll.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/poll.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- poll.c	1999/08/18 15:54:18	1.3
  +++ poll.c	1999/09/14 13:37:24	1.4
  @@ -429,15 +429,15 @@
   #endif 
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_get_polldata(ap_pollfd_t *, void *)
  + * ap_status_t ap_get_polldata(ap_pollfd_t *, char *, void *)
    *    Return the context associated with the current poll.
    * arg 1) The currently open pollfd.
    * arg 2) The user data associated with the pollfd.
    */
  -ap_status_t ap_get_polldata(struct pollfd_t *pollfd, void *data)
  +ap_status_t ap_get_polldata(struct pollfd_t *pollfd, char *key, void *data)
   {
       if (pollfd != NULL) {
  -        return ap_get_userdata(pollfd->cntxt, &data);
  +        return ap_get_userdata(pollfd->cntxt, key, &data);
       }
       else {
           data = NULL;
  @@ -446,15 +446,17 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_set_polldata(ap_pollfd_t *, void *)
  + * ap_status_t ap_set_polldata(ap_pollfd_t *, void *, char *,
  +                               ap_status_t (*cleanup) (void *))
    *    Return the context associated with the current poll.
    * arg 1) The currently open pollfd.
    * arg 2) The user data to associate with the pollfd.
    */
  -ap_status_t ap_set_polldata(struct pollfd_t *pollfd, void *data)
  +ap_status_t ap_set_polldata(struct pollfd_t *pollfd, void *data, char *key,
  +                            ap_status_t (*cleanup) (void *))
   {
       if (pollfd != NULL) {
  -        return ap_set_userdata(pollfd->cntxt, data);
  +        return ap_set_userdata(pollfd->cntxt, data, key, cleanup);
       }
       else {
           data = NULL;
  
  
  
  1.7       +8 -6      apache-2.0/src/lib/apr/network_io/unix/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/sockets.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- sockets.c	1999/09/12 11:19:30	1.6
  +++ sockets.c	1999/09/14 13:37:24	1.7
  @@ -320,15 +320,15 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_get_socketdata(ap_socket_t *, void *)
  + * ap_status_t ap_get_socketdata(ap_socket_t *, char *, void *)
    *    Return the context associated with the current socket.
    * arg 1) The currently open socket.
    * arg 2) The user data associated with the socket.
    */
  -ap_status_t ap_get_socketdata(struct socket_t *socket, void *data)
  +ap_status_t ap_get_socketdata(struct socket_t *socket, char *key, void *data)
   {
       if (socket != NULL) {
  -        return ap_get_userdata(socket->cntxt, &data);
  +        return ap_get_userdata(socket->cntxt, key, &data);
       }
       else {
           data = NULL;
  @@ -337,15 +337,17 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_set_socketdata(ap_socket_t *, void *)
  + * ap_status_t ap_set_socketdata(ap_socket_t *, void *, char *,
  +                                 ap_status_t (*cleanup) (void *))
    *    Set the context associated with the current socket.
    * arg 1) The currently open socket.
    * arg 2) The user data to associate with the socket.
    */
  -ap_status_t ap_set_socketdata(struct socket_t *socket, void *data)
  +ap_status_t ap_set_socketdata(struct socket_t *socket, void *data, char *key,
  +                              ap_status_t (*cleanup) (void *))
   {
       if (socket != NULL) {
  -        return ap_set_userdata(socket->cntxt, data);
  +        return ap_set_userdata(socket->cntxt, data, key, cleanup);
       }
       else {
           data = NULL;
  
  
  
  1.4       +5 -0      apache-2.0/src/lib/apr/test/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in	1999/09/03 14:33:11	1.3
  +++ Makefile.in	1999/09/14 13:37:25	1.4
  @@ -21,6 +21,7 @@
   	testtime@EXEEXT@ \
   	testsig@EXEEXT@ \
   	testargs@EXEEXT@ \
  +	testcontext@EXEEXT@ \
   	ab@EXEEXT@ \
   	htdigest@EXEEXT@ 
   
  @@ -31,6 +32,7 @@
   	testtime.o \
   	testsig.o \
           testargs.o \
  +        testcontext.o \
   	ab_apr.o \
   	htdigest.o
   
  @@ -44,6 +46,9 @@
   
   testargs@EXEEXT@: testargs.o
   	$(CC) $(CFLAGS) testargs.o -o testargs@EXEEXT@ $(LDFLAGS) 
  +
  +testcontext@EXEEXT@: testcontext.o
  +	$(CC) $(CFLAGS) testcontext.o -o testcontext@EXEEXT@ $(LDFLAGS) 
   
   ab@EXEEXT@: ab_apr.o
   	$(CC) $(CFLAGS) ab_apr.o -o ab@EXEEXT@ $(LDFLAGS)
  
  
  
  1.4       +1 -1      apache-2.0/src/lib/apr/test/ab_apr.c
  
  Index: ab_apr.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/ab_apr.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ab_apr.c	1999/09/03 14:33:12	1.3
  +++ ab_apr.c	1999/09/14 13:37:25	1.4
  @@ -893,7 +893,7 @@
       trstring = "";
       tdstring = "bgcolor=white";
   
  -    ap_create_context(NULL, NULL, &cntxt);
  +    ap_create_context(NULL, &cntxt);
   
       ap_make_time(cntxt, &start);
       ap_make_time(cntxt, &endtime);
  
  
  
  1.2       +1 -1      apache-2.0/src/lib/apr/test/abc.c
  
  Index: abc.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/abc.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- abc.c	1999/08/17 15:59:48	1.1
  +++ abc.c	1999/09/14 13:37:25	1.2
  @@ -11,7 +11,7 @@
       int status = 0;
       ap_context_t *context;
   
  -    ap_create_context(NULL, NULL, &context); 
  +    ap_create_context(NULL, &context); 
   
       ap_open(context, argv[1], APR_READ, -1, &fd);
       
  
  
  
  1.3       +1 -1      apache-2.0/src/lib/apr/test/client.c
  
  Index: client.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/client.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- client.c	1999/09/03 14:33:12	1.2
  +++ client.c	1999/09/14 13:37:26	1.3
  @@ -70,7 +70,7 @@
       char datarecv[STRLEN];
   
       fprintf(stdout, "Creating context.......");
  -    if (ap_create_context(NULL, NULL, &context) != APR_SUCCESS) {
  +    if (ap_create_context(NULL, &context) != APR_SUCCESS) {
           fprintf(stderr, "Something went wrong\n");
           exit(-1);
       }
  
  
  
  1.4       +1 -1      apache-2.0/src/lib/apr/test/htdigest.c
  
  Index: htdigest.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/htdigest.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- htdigest.c	1999/09/10 14:00:46	1.3
  +++ htdigest.c	1999/09/14 13:37:26	1.4
  @@ -208,7 +208,7 @@
       char command[MAX_STRING_LEN];
       int found;
       
  -    ap_create_context(NULL, NULL, &cntxt);
  +    ap_create_context(NULL, &cntxt);
   
       tn = NULL;
       signal(SIGINT, (void (*)(int)) interrupted);
  
  
  
  1.3       +1 -1      apache-2.0/src/lib/apr/test/server.c
  
  Index: server.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/server.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- server.c	1999/09/03 14:33:12	1.2
  +++ server.c	1999/09/14 13:37:26	1.3
  @@ -71,7 +71,7 @@
       char datarecv[STRLEN] = "Recv data test";
   
       fprintf(stdout, "Creating context.......");
  -    if (ap_create_context(NULL, NULL, &context) != APR_SUCCESS) {
  +    if (ap_create_context(NULL, &context) != APR_SUCCESS) {
           fprintf(stderr, "Could not create a context\n");
           exit(-1);
       }
  
  
  
  1.2       +1 -1      apache-2.0/src/lib/apr/test/testargs.c
  
  Index: testargs.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testargs.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- testargs.c	1999/08/17 15:59:48	1.1
  +++ testargs.c	1999/09/14 13:37:26	1.2
  @@ -69,7 +69,7 @@
       ap_context_t *context;
       ap_int32_t data;
   
  -    ap_create_context(NULL, NULL, &context);
  +    ap_create_context(NULL, &context);
   
       while (ap_getopt(context, argc, argv, "abc:d::", &data) == APR_SUCCESS) {
           switch(data) {
  
  
  
  1.3       +2 -2      apache-2.0/src/lib/apr/test/testfile.c
  
  Index: testfile.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testfile.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- testfile.c	1999/08/31 05:32:51	1.2
  +++ testfile.c	1999/09/14 13:37:26	1.3
  @@ -77,11 +77,11 @@
       char *buf;
       char *str;
       char *filename = "test.fil";
  -    if (ap_create_context(NULL, NULL, &context) != APR_SUCCESS) {
  +    if (ap_create_context(NULL, &context) != APR_SUCCESS) {
           fprintf(stderr, "Couldn't allocate context.");
           exit(-1);
       }
  -    if (ap_create_context(context, NULL, &cont2) != APR_SUCCESS) {
  +    if (ap_create_context(context, &cont2) != APR_SUCCESS) {
           fprintf(stderr, "Couldn't allocate context.");
           exit(-1);
       }
  
  
  
  1.2       +1 -1      apache-2.0/src/lib/apr/test/testproc.c
  
  Index: testproc.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testproc.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- testproc.c	1999/08/17 15:59:46	1.1
  +++ testproc.c	1999/09/14 13:37:26	1.2
  @@ -79,7 +79,7 @@
       char *args[3];
       char *teststr;
   
  -    ap_create_context(NULL, NULL, &context);
  +    ap_create_context(NULL, &context);
   
       teststr = ap_pstrdup(context, "Whooo Hoooo\0");
   
  
  
  
  1.2       +1 -1      apache-2.0/src/lib/apr/test/testsig.c
  
  Index: testsig.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testsig.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- testsig.c	1999/08/17 15:59:47	1.1
  +++ testsig.c	1999/09/14 13:37:26	1.2
  @@ -82,7 +82,7 @@
   
       ap_initialize();
   
  -    ap_create_context(NULL, NULL, &context);
  +    ap_create_context(NULL, &context);
   
       if (argc > 1) {
   
  
  
  
  1.2       +1 -1      apache-2.0/src/lib/apr/test/testsock.c
  
  Index: testsock.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testsock.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- testsock.c	1999/08/17 15:59:46	1.1
  +++ testsock.c	1999/09/14 13:37:27	1.2
  @@ -75,7 +75,7 @@
       char *args[2];
   
       fprintf(stdout, "Creating context.......");
  -    if (ap_create_context(NULL, NULL, &context) != APR_SUCCESS) {
  +    if (ap_create_context(NULL, &context) != APR_SUCCESS) {
           fprintf(stderr, "Could not create context\n");
           exit(-1);
       }
  
  
  
  1.2       +1 -1      apache-2.0/src/lib/apr/test/testthread.c
  
  Index: testthread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testthread.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- testthread.c	1999/08/17 15:59:46	1.1
  +++ testthread.c	1999/09/14 13:37:27	1.2
  @@ -129,7 +129,7 @@
       ap_status_t s4;
   
       fprintf(stdout, "Initializing the context......."); 
  -    if (ap_create_context(NULL, NULL, &context) != APR_SUCCESS) {
  +    if (ap_create_context(NULL, &context) != APR_SUCCESS) {
           fprintf(stderr, "could not initialize\n");
           exit(-1);
       }
  
  
  
  1.2       +1 -1      apache-2.0/src/lib/apr/test/testtime.c
  
  Index: testtime.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testtime.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- testtime.c	1999/08/17 15:59:46	1.1
  +++ testtime.c	1999/09/14 13:37:27	1.2
  @@ -70,7 +70,7 @@
       ap_int64_t t1, t2;
   
       fprintf(stdout, "Creating context.......");
  -    if (ap_create_context(NULL, NULL, &context) != APR_SUCCESS) {
  +    if (ap_create_context(NULL, &context) != APR_SUCCESS) {
           fprintf(stderr, "could not create context\n");
           exit(-1);
       }
  
  
  
  1.1                  apache-2.0/src/lib/apr/test/testcontext.c
  
  Index: testcontext.c
  ===================================================================
  /* ====================================================================
   * Copyright (c) 1999 The Apache Group.  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. All advertising materials mentioning features or use of this
   *    software must display the following acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * 4. The names "Apache Server" and "Apache Group" must not be used to
   *    endorse or promote products derived from this software without
   *    prior written permission. For written permission, please contact
   *    apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *    acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
   * OF THE POSSIBILITY OF SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Group.
   * For more information on the Apache Group and the Apache HTTP server
   * project, please see <http://www.apache.org/>.
   *
   */
  #include <stdio.h>
  #include "apr_file_io.h"
  #include "apr_errno.h"
  #include "apr_general.h"
  #include "apr_lib.h"
  #ifdef BEOS
  #include <unistd.h>
  #endif
  
  ap_status_t string_cleanup(void *data)
  {
      return APR_SUCCESS;
  }
  
  int main()
  {
      ap_context_t *context;
      char *testdata;
      char *retdata;
  
      if (ap_create_context(NULL, &context) != APR_SUCCESS) {
          fprintf(stderr, "Couldn't allocate context.");
          exit(-1);
      }
  
      testdata = ap_pstrdup(context, "This is a test\n");
  
      ap_set_userdata(context, testdata, "TEST", string_cleanup);    
  
      ap_get_userdata(context, "TEST", (void **)&retdata);
  
      if (!strcmp(testdata, retdata)) {
          fprintf(stdout, "User data is working ok\n");
      }
      else {
          fprintf(stdout, "User data is not working\n");
      } 
  }
  
  
  
  1.2       +1 -1      apache-2.0/src/lib/apr/threadproc/beos/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/thread.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- thread.c	1999/08/17 15:59:49	1.1
  +++ thread.c	1999/09/14 13:37:29	1.2
  @@ -120,7 +120,7 @@
   	else
   	    temp = B_NORMAL_PRIORITY;
   
  -    stat = ap_create_context(cont, NULL, &(*new)->cntxt);
  +    stat = ap_create_context(cont, &(*new)->cntxt);
       if (stat != APR_SUCCESS) {
           return stat;
       }
  
  
  
  1.2       +1 -1      apache-2.0/src/lib/apr/threadproc/os2/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/thread.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- thread.c	1999/08/17 15:59:50	1.1
  +++ thread.c	1999/09/14 13:37:30	1.2
  @@ -117,7 +117,7 @@
       thread->attr = attr;
       thread->func = func;
       thread->data = data;
  -    stat = ap_create_context(cont, NULL, &thread->cntxt);
  +    stat = ap_create_context(cont, &thread->cntxt);
       
       if (stat != APR_SUCCESS) {
           return stat;
  
  
  
  1.3       +8 -6      apache-2.0/src/lib/apr/threadproc/unix/procsup.c
  
  Index: procsup.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/procsup.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- procsup.c	1999/09/12 11:06:26	1.2
  +++ procsup.c	1999/09/14 13:37:31	1.3
  @@ -133,15 +133,15 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_get_procdata(ap_proc_t *, void *)
  + * ap_status_t ap_get_procdata(ap_proc_t *, char *, void *)
    *    Return the context associated with the current proc.
    * arg 1) The currently open proc.
    * arg 2) The user data associated with the proc.
    */
  -ap_status_t ap_get_procdata(struct proc_t *proc, void *data)
  +ap_status_t ap_get_procdata(struct proc_t *proc, char *key, void *data)
   {
       if (proc != NULL) {
  -        return ap_get_userdata(proc->cntxt, &data);
  +        return ap_get_userdata(proc->cntxt, key, &data);
       }
       else {
           data = NULL;
  @@ -150,15 +150,17 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_set_procdata(ap_proc_t *, void *)
  + * ap_status_t ap_set_procdata(ap_proc_t *, void *, char *key,
  +                               ap_status_t (*cleanup) (void *))
    *    Return the context associated with the current proc.
    * arg 1) The currently open proc.
    * arg 2) The user data to associate with the proc.
   */
  -ap_status_t ap_set_procdata(struct proc_t *proc, void *data)
  +ap_status_t ap_set_procdata(struct proc_t *proc, void *data, char *key, 
  +                            ap_status_t (*cleanup) (void *))
   {
       if (proc != NULL) {
  -        return ap_set_userdata(proc->cntxt, data);
  +        return ap_set_userdata(proc->cntxt, data, key, cleanup);
       }
       else {
           data = NULL;
  
  
  
  1.3       +15 -11    apache-2.0/src/lib/apr/threadproc/unix/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/thread.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- thread.c	1999/09/12 11:06:26	1.2
  +++ thread.c	1999/09/14 13:37:31	1.3
  @@ -157,7 +157,7 @@
       else
           temp = NULL;
       
  -    stat = ap_create_context(cont, NULL, &(*new)->cntxt);
  +    stat = ap_create_context(cont, &(*new)->cntxt);
       if (stat != APR_SUCCESS) {
           return stat;
       }
  @@ -219,15 +219,15 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_get_threaddata(ap_thread_t *, void *)
  + * ap_status_t ap_get_threaddata(ap_thread_t *, char *, void *)
    *    Return the context associated with the current thread.
    * arg 1) The currently open thread.
    * arg 2) The user data associated with the thread.
    */
  -ap_status_t ap_get_threaddata(struct thread_t *thread, void *data)
  +ap_status_t ap_get_threaddata(struct thread_t *thread, char *key, void *data)
   {
       if (thread != NULL) {
  -        return ap_get_userdata(thread->cntxt, &data);
  +        return ap_get_userdata(thread->cntxt, key, &data);
       }
       else {
           data = NULL;
  @@ -236,15 +236,17 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_set_threaddata(ap_thread_t *, void *)
  + * ap_status_t ap_set_threaddata(ap_thread_t *, void *, char *key,
  +                                 ap_status_t (*cleanup) (void *))
    *    Return the context associated with the current thread.
    * arg 1) The currently open thread.
    * arg 2) The user data to associate with the thread.
    */
  -ap_status_t ap_set_threaddata(struct thread_t *thread, void *data)
  +ap_status_t ap_set_threaddata(struct thread_t *thread, void *data, char *key,
  +                              ap_status_t (*cleanup) (void *))
   {
       if (thread != NULL) {
  -        return ap_set_userdata(thread->cntxt, data);
  +        return ap_set_userdata(thread->cntxt, data, key, cleanup);
       }
       else {
           data = NULL;
  @@ -329,24 +331,26 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_get_threaddata(ap_thread_t *, void *)
  + * ap_status_t ap_get_threaddata(ap_thread_t *, char *, void *)
    *    Return the context associated with the current thread.
    * arg 1) The currently open thread.
    * arg 2) The user data associated with the thread.
    */
  -ap_status_t ap_get_threaddata(struct thread_t *thread, void *data)
  +ap_status_t ap_get_threaddata(struct thread_t *thread, char *key, void *data)
   {
       data = NULL;
       return APR_ENOTHREAD;
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_set_threaddata(ap_thread_t *, void *)
  + * ap_status_t ap_set_threaddata(ap_thread_t *, void *, char *,
  +                                 ap_status_t (*cleanup) (void *))
    *    Return the context associated with the current thread.
    * arg 1) The currently open thread.
    * arg 2) The user data to associate with the thread.
    */
  -ap_status_t ap_set_threaddata(struct thread_t *thread, void *data)
  +ap_status_t ap_set_threaddata(struct thread_t *thread, void *data, char *key,
  +                              ap_status_t (*cleanup) (void *))
   {
       return APR_ENOTHREAD;
   }
  
  
  
  1.3       +8 -6      apache-2.0/src/lib/apr/threadproc/unix/threadpriv.c
  
  Index: threadpriv.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/threadpriv.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- threadpriv.c	1999/09/12 11:06:27	1.2
  +++ threadpriv.c	1999/09/14 13:37:34	1.3
  @@ -131,15 +131,15 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_get_threadkeydata(ap_threadkey_t *, void *)
  + * ap_status_t ap_get_threadkeydata(ap_threadkey_t *, char *, void *)
    *    Return the context associated with the current threadkey.
    * arg 1) The currently open threadkey.
    * arg 2) The user data associated with the threadkey.
    */
  -ap_status_t ap_get_threadkeydata(struct threadkey_t *threadkey, void *data)
  +ap_status_t ap_get_threadkeydata(struct threadkey_t *threadkey, char *key, void *data)
   {
       if (threadkey != NULL) {
  -        return ap_get_userdata(threadkey->cntxt, &data);
  +        return ap_get_userdata(threadkey->cntxt, key, &data);
       }
       else {
           data = NULL;
  @@ -148,15 +148,17 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_set_threadkeydata(ap_threadkey_t *, void *)
  + * ap_status_t ap_set_threadkeydata(ap_threadkey_t *, void *, char *key,
  +                                    ap_status_t (*cleanup) (void *))
    *    Return the context associated with the current threadkey.
    * arg 1) The currently open threadkey.
    * arg 2) The user data to associate with the threadkey.
    */
  -ap_status_t ap_set_threadkeydata(struct threadkey_t *threadkey, void *data)
  +ap_status_t ap_set_threadkeydata(struct threadkey_t *threadkey, void *data,
  +                                 char *key, ap_status_t (*cleanup) (void *))
   {
       if (threadkey != NULL) {
  -        return ap_set_userdata(threadkey->cntxt, data);
  +        return ap_set_userdata(threadkey->cntxt, data, key, cleanup);
       }
       else {
           data = NULL;
  
  
  
  1.2       +1 -1      apache-2.0/src/lib/apr/threadproc/win32/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/win32/thread.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- thread.c	1999/08/17 15:59:51	1.1
  +++ thread.c	1999/09/14 13:37:36	1.2
  @@ -103,7 +103,7 @@
   
       (*new)->cntxt = cont;
       
  -    stat = ap_create_context(cont, NULL, &(*new)->cntxt);
  +    stat = ap_create_context(cont, &(*new)->cntxt);
       if (stat != APR_SUCCESS) {
           return stat;
       }
  
  
  
  1.2       +8 -6      apache-2.0/src/lib/apr/time/unix/access.c
  
  Index: access.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/access.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- access.c	1999/08/17 15:59:53	1.1
  +++ access.c	1999/09/14 13:37:37	1.2
  @@ -335,15 +335,15 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_get_timedata(ap_time_t *, void *)
  + * ap_status_t ap_get_timedata(ap_time_t *, char *, void *)
    *    Return the context associated with the current atime.
    * arg 1) The currently open atime.
    * arg 2) The user data associated with the atime.
    */
  -ap_status_t ap_get_timedata(struct atime_t *atime, void *data)
  +ap_status_t ap_get_timedata(struct atime_t *atime, char *key, void *data)
   {
       if (atime != NULL) {
  -        return ap_get_userdata(atime->cntxt, &data);
  +        return ap_get_userdata(atime->cntxt, key, &data);
       }
       else {
           data = NULL;
  @@ -352,15 +352,17 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_set_timedata(ap_time_t *, void *)
  + * ap_status_t ap_set_timedata(ap_time_t *, void *, char *,
  +                               ap_status_t (*cleanup) (void *))
    *    Set the context associated with the current atime.
    * arg 1) The currently open atime.
    * arg 2) The user data to associate with the atime.
    */
  -ap_status_t ap_set_timedata(struct atime_t *atime, void *data)
  +ap_status_t ap_set_timedata(struct atime_t *atime, void *data, char *key,
  +                            ap_status_t (*cleanup) (void *))
   {
       if (atime != NULL) {
  -        return ap_set_userdata(atime->cntxt, data);
  +        return ap_set_userdata(atime->cntxt, data, key, cleanup);
       }
       else {
           data = NULL;
  
  
  
  1.13      +1 -1      apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- http_core.c	1999/09/11 22:14:36	1.12
  +++ http_core.c	1999/09/14 13:37:38	1.13
  @@ -399,7 +399,7 @@
       elts = (void **)sec->elts;
   
       /* we have to allocate tmp space to do a stable sort */
  -    ap_create_context(p, NULL, &tmp);
  +    ap_create_context(p, &tmp);
       sortbin = ap_palloc(tmp, sec->nelts * sizeof(*sortbin));
       for (i = 0; i < nelts; ++i) {
   	sortbin[i].orig_index = i;
  
  
  
  1.7       +6 -6      apache-2.0/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_main.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- http_main.c	1999/09/11 19:52:27	1.6
  +++ http_main.c	1999/09/14 13:37:38	1.7
  @@ -267,10 +267,10 @@
       ap_util_init();
       ap_util_uri_init();
   
  -    ap_create_context(NULL, NULL, &pglobal);
  +    ap_create_context(NULL, &pglobal);
       g_pHookPool=pglobal;
   
  -    ap_create_context(pglobal, NULL, &pcommands);
  +    ap_create_context(pglobal, &pcommands);
       ap_server_pre_read_config  = ap_make_array(pcommands, 1, sizeof(char *));
       ap_server_post_read_config = ap_make_array(pcommands, 1, sizeof(char *));
       ap_server_config_defines   = ap_make_array(pcommands, 1, sizeof(char *));
  @@ -317,9 +317,9 @@
   	}
       }
   
  -    ap_create_context(pglobal, NULL, &pconf);
  -    ap_create_context(pglobal, NULL, &plog);
  -    ap_create_context(pconf, NULL, &ptemp);
  +    ap_create_context(pglobal, &pconf);
  +    ap_create_context(pglobal, &plog);
  +    ap_create_context(pconf, &ptemp);
   
       /* for legacy reasons, we read the configuration twice before
   	we actually serve any requests */
  @@ -340,7 +340,7 @@
   
       for (;;) {
   	ap_clear_pool(pconf);
  -	ap_create_context(pconf, NULL, &ptemp);
  +	ap_create_context(pconf, &ptemp);
   	ap_server_root = def_server_root;
   	ap_run_pre_config(pconf, plog, ptemp);
   	server_conf = ap_read_config(pconf, ptemp, confname);
  
  
  
  1.16      +1 -1      apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- http_protocol.c	1999/09/11 22:14:37	1.15
  +++ http_protocol.c	1999/09/14 13:37:38	1.16
  @@ -927,7 +927,7 @@
       const char *expect;
       int access_status;
   
  -    ap_create_context(conn->pool, NULL, &p);
  +    ap_create_context(conn->pool, &p);
       r = ap_pcalloc(p, sizeof(request_rec));
       r->pool            = p;
       r->connection      = conn;
  
  
  
  1.5       +1 -1      apache-2.0/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_request.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- http_request.c	1999/08/31 05:32:59	1.4
  +++ http_request.c	1999/09/14 13:37:39	1.5
  @@ -740,7 +740,7 @@
       ap_context_t *rrp;
       request_rec *rr;
       
  -    ap_create_context(r->pool, NULL, &rrp);
  +    ap_create_context(r->pool, &rrp);
       rr = ap_pcalloc(rrp, sizeof(request_rec));
       rr->pool = rrp;
       return rr;
  
  
  
  1.37      +4 -4      apache-2.0/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- dexter.c	1999/09/08 18:58:46	1.36
  +++ dexter.c	1999/09/14 13:37:41	1.37
  @@ -858,9 +858,9 @@
       int native_socket;
   
       pthread_mutex_lock(&thread_pool_create_mutex);
  -    ap_create_context(thread_pool_parent, NULL, &tpool);
  +    ap_create_context(thread_pool_parent, &tpool);
       pthread_mutex_unlock(&thread_pool_create_mutex);
  -    ap_create_context(tpool, NULL, &ptrans);
  +    ap_create_context(tpool, &ptrans);
   
       while (!workers_may_exit) {
           workers_may_exit |= (max_requests_per_child != 0) && (requests_this_child <= 0);
  @@ -981,7 +981,7 @@
   
       my_pid = getpid();
       child_num = child_num_arg;
  -    ap_create_context(pconf, NULL, &pchild);
  +    ap_create_context(pconf, &pchild);
   
       /*stuff to do before we switch id's, so we have permissions.*/
   
  @@ -1026,7 +1026,7 @@
       for (i = 0; i < max_threads; i++) {
           worker_thread_free_ids[i] = i;
       }
  -    ap_create_context(pchild, NULL, &thread_pool_parent);
  +    ap_create_context(pchild, &thread_pool_parent);
       pthread_mutex_init(&thread_pool_create_mutex, NULL);
       pthread_mutex_init(&idle_thread_count_mutex, NULL);
       pthread_mutex_init(&worker_thread_count_mutex, NULL);
  
  
  
  1.32      +3 -3      apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- mpmt_pthread.c	1999/09/08 14:15:47	1.31
  +++ mpmt_pthread.c	1999/09/14 13:37:42	1.32
  @@ -809,7 +809,7 @@
   
       free(ti);
   
  -    ap_create_context(tpool, NULL, &ptrans);
  +    ap_create_context(tpool, &ptrans);
   
       pthread_mutex_lock(&worker_thread_count_mutex);
       worker_thread_count++;
  @@ -918,7 +918,7 @@
       ap_listen_rec *lr;
   
       my_pid = getpid();
  -    ap_create_context(pconf, NULL, &pchild);
  +    ap_create_context(pconf, &pchild);
   
       /*stuff to do before we switch id's, so we have permissions.*/
       reopen_scoreboard(pchild);
  @@ -972,7 +972,7 @@
   	my_info->pid = my_child_num;
           my_info->tid = i;
   	my_info->sd = 0;
  -	ap_create_context(pchild, NULL, &my_info->tpool);
  +	ap_create_context(pchild, &my_info->tpool);
   	
   	/* We are creating threads right now */
   	(void) ap_update_child_status(my_child_num, i, SERVER_STARTING, 
  
  
  
  1.35      +2 -2      apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- prefork.c	1999/09/11 10:25:59	1.34
  +++ prefork.c	1999/09/14 13:37:43	1.35
  @@ -1957,9 +1957,9 @@
       /* Get a sub ap_context_t for global allocations in this child, so that
        * we can have cleanups occur when the child exits.
        */
  -    ap_create_context(pconf, NULL, &pchild);
  +    ap_create_context(pconf, &pchild);
   
  -    ap_create_context(pchild, NULL, &ptrans);
  +    ap_create_context(pchild, &ptrans);
   
       /* needs to be done before we switch UIDs so we have permissions */
       reopen_scoreboard(pchild);
  
  
  
  1.6       +1 -1      apache-2.0/src/modules/standard/mod_auth.c
  
  Index: mod_auth.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_auth.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_auth.c	1999/08/31 05:33:43	1.5
  +++ mod_auth.c	1999/09/14 13:37:45	1.6
  @@ -157,7 +157,7 @@
   	return NULL;
       }
   
  -    ap_create_context(p, NULL, &sp);
  +    ap_create_context(p, &sp);
   
       while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) {
   	if ((l[0] == '#') || (!l[0]))
  
  
  
  1.6       +1 -1      apache-2.0/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_autoindex.c	1999/09/08 14:15:54	1.5
  +++ mod_autoindex.c	1999/09/14 13:37:45	1.6
  @@ -1280,7 +1280,7 @@
       char *name_scratch;
       char *pad_scratch;
   
  -    ap_create_context(r->pool, NULL, &scratch);
  +    ap_create_context(r->pool, &scratch);
       if (name[0] == '\0') {
   	name = "/";
       }
  
  
  

Mime
View raw message