[OpenSER-Users] call functions with Perl (moduleFunction())

Yazid Hadj Said yazid.hadjsaid at gmail.com
Thu Jun 12 13:56:38 CEST 2008


Hi Bastien,
Thank you for your help. I have an other question please: Can I use
dynamique string ($avp(...)) as parameters in  remove_hf( ) or append_hf( )?
because when I execute for example remove_hf ("$avp(s:headername)") ($avp
(s:headerName) = "Allow" ), I have not error but the header is not removed
also.

Thanks ,
Yazid

On Thu, Jun 12, 2008 at 12:13 PM, Bastian Friedrich <
bastian.friedrich at collax.com> wrote:

> Hi,
>
> On Thursday 12 June 2008, Yazid Hadj Said wrote:
> > Please, i want to know why when i try to use remove_hf() and append_hf()
> > functions with Perl (moduleFunction(func,string1,string2)), I have this
> > message:
> >
> > Jun 12 11:03:53 [12838] ERROR:core:moduleFunc: Module function
> 'remove_hf'
> > is unsafe. Call is refused.
>
> the reason for the error you are seeing is quite technical. Functions
> defined
> in modules can define a so-called "fixup function" for parameter
> preprocessing. Unfortunately, doing so can result in memory leaks and all
> sorts of other problems, so their usage is forbidden.
>
> append_hf as well as remove_hf are such functions.
>
> We have had numerous discussions on that topic, but unfortunately, the
> results
> have yet been limited. A lot of work needs to be invested to create
> matching
> functions for all fixup functions in the code.
>
> You can disable the safety checks in the perl module using a "secret"
> parameter, but append_hf _will_ then result in problems sooner or later.
>
> Sorry!
>
>   Bastian
>
> --
> Collax GmbH . Burkheimer Straße 3 . 79111 Freiburg . Germany
> p: +49 (0) 761-45684-24
> f: +49 (0) 761-45684-10        www.collax.com
>
> Geschäftsführer: William K. Hite / Boris Nalbach
> AG München HRB 158898 . Ust.-IdNr: DE 814464942
> \ Always proofread carefully to see if you any words out.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20080612/8bf8dc39/attachment.htm>


More information about the sr-users mailing list