[sr-dev] git:master:7de21e14: secsipid: check version of loaded module in child init callback

Daniel-Constantin Mierla miconda at gmail.com
Tue Feb 16 16:29:44 CET 2021


Module: kamailio
Branch: master
Commit: 7de21e14662e560cda0a9426f2d3bb6cd1412686
URL: https://github.com/kamailio/kamailio/commit/7de21e14662e560cda0a9426f2d3bb6cd1412686

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-02-16T16:28:31+01:00

secsipid: check version of loaded module in child init callback

---

Modified: src/modules/secsipid/secsipid_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/7de21e14662e560cda0a9426f2d3bb6cd1412686.diff
Patch: https://github.com/kamailio/kamailio/commit/7de21e14662e560cda0a9426f2d3bb6cd1412686.patch

---

diff --git a/src/modules/secsipid/secsipid_mod.c b/src/modules/secsipid/secsipid_mod.c
index d5968fde30..c8b19ca6d3 100644
--- a/src/modules/secsipid/secsipid_mod.c
+++ b/src/modules/secsipid/secsipid_mod.c
@@ -134,6 +134,10 @@ static int child_init(int rank)
 	/* launch register */
 	bind_f = (secsipid_proc_bind_f)dlsym(handle, "secsipid_proc_bind");
 	if (((errstr=(char*)dlerror())==NULL) && bind_f!=NULL) {
+		/* version control */
+		if (!ksr_version_control(handle, modpath)) {
+			goto error;
+		}
 		/* no error - call it */
 		if(bind_f(&_secsipid_papi)<0) {
 			LM_ERR("filed to bind the api of proc module: %s\n", modpath);




More information about the sr-dev mailing list