Re: [exim] Returning static strings from dlfunc?

Top Page
Delete this message
Reply to this message
Author: Janne Snabb
Date:  
To: exim-users
Subject: Re: [exim] Returning static strings from dlfunc?
On 05/07/2012 07:04 PM, Phil Pennock wrote:
> src/acl.c :
>
> ----------------------------8< cut here >8------------------------------
>     /* Connection variables must persist forever */

>
>     case ACLC_SET:
>       {
>       int old_pool = store_pool;
>       if (cb->u.varname[0] == 'c') store_pool = POOL_PERM;
>       acl_var_create(cb->u.varname)->data.ptr = string_copy(arg);
>       store_pool = old_pool;
>       }
>     break;
> ----------------------------8< cut here >8------------------------------


Excellent! I was just trying to find this bit of code in Exim source
tree to see what happens to the variable when I set it.

> So I'd continue to return in POOL_MAIN and let it be copied to
> POOL_PERM.


Yes. Looks like this is the correct solution because Exim makes another
copy of the acl_c_* variable contents and stores it in the correct pool.

Thanks a lot for your help!

--
Janne Snabb / EPIPE Communications
snabb@??? - http://epipe.com/