Module: kamailio
Branch: master
Commit: 48d55652fa36cb2b20540d1ebc7665476dfb1b1e
URL:
https://github.com/kamailio/kamailio/commit/48d55652fa36cb2b20540d1ebc76654…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-24T19:11:44+01:00
app_jsdt: detect if a kemi function is already in exported list
---
Modified: src/modules/app_jsdt/app_jsdt_kemi_export.c
Modified: src/modules/app_jsdt/utils/app_jsdt_ctl
---
Diff:
https://github.com/kamailio/kamailio/commit/48d55652fa36cb2b20540d1ebc76654…
Patch:
https://github.com/kamailio/kamailio/commit/48d55652fa36cb2b20540d1ebc76654…
---
diff --git a/src/modules/app_jsdt/app_jsdt_kemi_export.c
b/src/modules/app_jsdt/app_jsdt_kemi_export.c
index a1f398f022..2150ab3dcc 100644
--- a/src/modules/app_jsdt/app_jsdt_kemi_export.c
+++ b/src/modules/app_jsdt/app_jsdt_kemi_export.c
@@ -9277,6 +9277,9 @@ duk_c_function sr_kemi_jsdt_export_associate(sr_kemi_t *ket)
_sr_kemi_jsdt_export_list[i].ket = ket;
return _sr_kemi_jsdt_export_list[i].pfunc;
}
+ if(_sr_kemi_jsdt_export_list[i].ket==ket) {
+ return _sr_kemi_jsdt_export_list[i].pfunc;
+ }
}
LM_ERR("no more indexing slots\n");
return NULL;
diff --git a/src/modules/app_jsdt/utils/app_jsdt_ctl
b/src/modules/app_jsdt/utils/app_jsdt_ctl
index eb1bd4c682..26e37aa4ca 100755
--- a/src/modules/app_jsdt/utils/app_jsdt_ctl
+++ b/src/modules/app_jsdt/utils/app_jsdt_ctl
@@ -136,6 +136,9 @@ duk_c_function sr_kemi_jsdt_export_associate(sr_kemi_t *ket)
_sr_kemi_jsdt_export_list[i].ket = ket;
return _sr_kemi_jsdt_export_list[i].pfunc;
}
+ if(_sr_kemi_jsdt_export_list[i].ket==ket) {
+ return _sr_kemi_jsdt_export_list[i].pfunc;
+ }
}
LM_ERR("no more indexing slots\n");
return NULL;