[OpenSIPS-Users] function with 6 parameters

rad bogdan bogdan_rad2004 at yahoo.com
Wed Apr 6 13:44:30 CEST 2011


Hi everyone,

I implemented an OpenSIPS custom module that communicates with an external application. From the routing script I call a function with 6 parameters:

test_function('$fU', '$tU', '$ci', '$avp(s:name1)', '$avp(s:name2)', '$var(name3)')

The problem is that when the corresponding function is called in C, the first parameter gets the value of the last one.

This doesn't happen when the function is made to take 5 parameters.

The fixup function that I use is this:

static int pvn_fixup_spve_spve_6(void** param, int param_no)
{
    if (!(param_no >= 1 && param_no <= 6))
    {
        LM_ERR("invalid parameter number %d\n", param_no);
        return E_UNSPEC;
    }
    
    return fixup_spve(param);
}

Is there something wrong with it or the problem is elsewhere ?

Thanks,
Bogdan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110406/126ad934/attachment.htm>


More information about the Users mailing list