[sr-dev] [kamailio] Is cross module function call a good practice? (#50)
Ovidiu Sas
osas at voipembedded.com
Thu Jan 22 19:34:46 CET 2015
If you make a function call to auth_db, then you create an unnecessary
dependency on that module.
Copying code is not good.
The right solution here would be to create a library that will hold common
code for both auth_db and auth_jwt. The library will be automatically
loaded by both modules.
Take a look at the db_* modules that are using srdb1 and srdb2 libraries.
Regards,
Ovidiu Sas
On Thu, Jan 22, 2015 at 11:11 AM, mading087 <notifications at github.com>
wrote:
> Started creating a new module auth_jwt, which supports JSON Web Token for
> auth. Need to access the database to validate some claims in the token.
> Wonder if I should just make a function call to auth_db or copy the code
> from auth_db? Which approach is a better approach? Thanks.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/kamailio/kamailio/issues/50>.
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>
--
VoIP Embedded, Inc.
http://www.voipembedded.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150122/9680ac75/attachment.html>
More information about the sr-dev
mailing list