[sr-dev] [kamailio/kamailio] define flag_t as unsigned long (#1288)

Daniel-Constantin Mierla notifications at github.com
Mon Oct 30 13:38:16 CET 2017

I wish that changing a structure is something simple, but is not.

The main constraint is having the config interpreter able to deal only with integer numbers as values (static or via variables), and flags field stay behind a variable.

But there could be also memory alignment problems when fields size changes.

Another way could be adding a new field, extended flags, with a different set of functions to handle them like setflagx()/resetflagx(...)/isflagxset(...), so the current behaviour is not affected at all. At this moment, from extensibility point of view I think using an array (static size) is better than single value field. Initially it can be of uint32_t[2] to give access to 64 more flags, but in the future it can be changed if needed. The functions will take two parameters, bit index and array index.

Just some ideas, it can be another way, but I would prefer not to affect that much existing code...

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20171030/724fb3bc/attachment.html>

More information about the sr-dev mailing list