[sr-dev] PARAM_STR vs STR_PARAM

Alekzander Spiridonov alekz at li.ru
Fri Jul 18 10:45:33 CEST 2014


Should I submit patch per module or one for all? Actually there are
numerous cases in kamailio/modules/*


2014-07-17 22:58 GMT+04:00 Daniel-Constantin Mierla <miconda at gmail.com>:

> Hello,
>
>
> On 09/07/14 11:00, Alekzander Spiridonov wrote:
>
>> Hi list,
>>
>> While going through mod_init's and finding things like
>> rtpp_table_name.len = strlen(rtpp_table_name.s);
>>
>> I became curious if using of deprecated STR_PARAM in new modules is done
>> on purpose. Why not using PARAM_STR for string module parameters?
>>
>> Quote from sr_module.h:
>> #define PARAM_STRING     (1U<<0)  /**< String (char *) parameter type */
>> #define PARAM_STR        (1U<<2)  /**< struct str parameter type */
>> #define STR_PARAM PARAM_STRING
>>
>> P.S.: That's not only about curiosity but to avoid any bugs in my
>> kamailio extensions.
>>
> Indeed PARAM_STR should be used if the value of the parameter needs to be
> stored in a str structure.
>
> PARAM_STR was introduced by SER developers before joining back with
> Kamailio source code, so many developers are not aware of it.
>
> We should review and migrate in such cases.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla - http://www.asipto.com
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>



-- 
Best regards,
Alekzander Spiridonov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20140718/72fafd86/attachment.html>


More information about the sr-dev mailing list