Hi all,

I've to develop a module that uses cdp to contact an HSS. To understand how to use cdp API I'm looking into other modules that already use it. Of course, I read also the module documentation.

Looking into ims-registrar-scscf  I found something that triggers my curiosity. My question is about this https://github.com/kamailio/kamailio/blob/master/src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c#L571-L576

The effect of that part is that the callback is going to be added only once. In that case, why bother with the lock and the shared variable when the initialisation could be done in mod_init()?

If someone can answer it I would be really grateful.

Cheers,
Alfonso.