[sr-dev] PARAM_STR vs STR_PARAM

Daniel-Constantin Mierla miconda at gmail.com
Fri Jul 18 10:50:15 CEST 2014


I prefer one per module, because it is easier to review and keeps the 
history cleaner for that module.

Thanks,
Daniel

On 18/07/14 10:45, Alekzander Spiridonov wrote:
> 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 
> <mailto: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://twitter.com/#%21/miconda> -
>     http://www.linkedin.com/in/miconda
>
>
>     _______________________________________________
>     sr-dev mailing list
>     sr-dev at lists.sip-router.org <mailto:sr-dev at lists.sip-router.org>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>
>
>
> -- 
> Best regards,
> Alekzander Spiridonov
>
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20140718/5e676975/attachment-0001.html>


More information about the sr-dev mailing list