You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2009/02/10 20:50:39 UTC

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


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


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

Posted by Jim Jagielski <ji...@jaguNET.com>.
On Feb 10, 2009, at 2:50 PM, Ruediger Pluem wrote:

>
> Why are put and get not added to storage?
>

Stupidity :)