httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: svn commit: r742992 - in /httpd/httpd/trunk: include/ap_slotmem.h modules/mem/mod_plainmem.c modules/mem/mod_sharedmem.c server/slotmem.c
Date Tue, 10 Feb 2009 19:50:39 GMT


On 02/10/2009 04:16 PM, jim@apache.org wrote:
> Author: jim
> Date: Tue Feb 10 15:16:24 2009
> New Revision: 742992
> 
> URL: http://svn.apache.org/viewvc?rev=742992&view=rev
> Log:
> Add getter/setter functions to the slotmem API. Also,
> reset the id vars to unsigned ints universally.
> 
> Modified:
>     httpd/httpd/trunk/include/ap_slotmem.h
>     httpd/httpd/trunk/modules/mem/mod_plainmem.c
>     httpd/httpd/trunk/modules/mem/mod_sharedmem.c
>     httpd/httpd/trunk/server/slotmem.c
> 
> Modified: httpd/httpd/trunk/include/ap_slotmem.h
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_slotmem.h?rev=742992&r1=742991&r2=742992&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/include/ap_slotmem.h (original)
> +++ httpd/httpd/trunk/include/ap_slotmem.h Tue Feb 10 15:16:24 2009

> @@ -150,6 +150,34 @@
>      return APR_SUCCESS;
>  }
>  
> +static apr_status_t slotmem_get(ap_slotmem_t *slot, unsigned int id, unsigned char *dest,
apr_size_t dest_len)
> +{
> +
> +    void *ptr;
> +    apr_status_t ret;
> +
> +    ret = slotmem_mem(slot, id, &ptr);
> +    if (ret != APR_SUCCESS) {
> +        return ret;
> +    }
> +    memcpy(dest, ptr, dest_len); /* bounds check? */
> +    return APR_SUCCESS;
> +}
> +
> +static apr_status_t slotmem_put(ap_slotmem_t *slot, unsigned int id, unsigned char *src,
apr_size_t src_len)
> +{
> +
> +    void *ptr;
> +    apr_status_t ret;
> +
> +    ret = slotmem_mem(slot, id, &ptr);
> +    if (ret != APR_SUCCESS) {
> +        return ret;
> +    }
> +    memcpy(ptr, src, src_len); /* bounds check? */
> +    return APR_SUCCESS;
> +}
> +
>  static const ap_slotmem_storage_method storage = {
>      "plainmem",
>      &slotmem_do,

Why are put and get not added to storage?

Regards

RĂ¼diger


Mime
View raw message