Module: kamailio
Branch: master
Commit: d4fc8b0168ba3de78e29deb7c7d7ed9b3fd29a36
URL:
https://github.com/kamailio/kamailio/commit/d4fc8b0168ba3de78e29deb7c7d7ed9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-11-22T09:14:32+01:00
systemdops: set core callbacks in mod_register()
---
Modified: src/modules/systemdops/systemdops_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d4fc8b0168ba3de78e29deb7c7d7ed9…
Patch:
https://github.com/kamailio/kamailio/commit/d4fc8b0168ba3de78e29deb7c7d7ed9…
---
diff --git a/src/modules/systemdops/systemdops_mod.c
b/src/modules/systemdops/systemdops_mod.c
index 58d7a2b241..0ac15426d1 100644
--- a/src/modules/systemdops/systemdops_mod.c
+++ b/src/modules/systemdops/systemdops_mod.c
@@ -68,5 +68,11 @@ void ksr_sd_app_shutdown(void)
*/
int mod_register(char *path, int *dlflags, void *p1, void *p2)
{
+ sr_corecb_t *cbp = sr_corecb_get();
+ if(cbp) {
+ return -1;
+ }
+ cbp->app_ready = ksr_sd_app_ready;
+ cbp->app_shutdown = ksr_sd_app_shutdown;
return 0;
}