Module: kamailio
Branch: master
Commit: e177266e8f113f1541b31496f9fb0c71ac751f17
URL:
https://github.com/kamailio/kamailio/commit/e177266e8f113f1541b31496f9fb0c7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-24T19:15:42+01:00
app_sqlang: detect if a kemi function was already added in exports list
---
Modified: src/modules/app_sqlang/app_sqlang_kemi_export.c
Modified: src/modules/app_sqlang/utils/app_sqlang_ctl
---
Diff:
https://github.com/kamailio/kamailio/commit/e177266e8f113f1541b31496f9fb0c7…
Patch:
https://github.com/kamailio/kamailio/commit/e177266e8f113f1541b31496f9fb0c7…
---
diff --git a/src/modules/app_sqlang/app_sqlang_kemi_export.c
b/src/modules/app_sqlang/app_sqlang_kemi_export.c
index 52a79df9a3..08d045306c 100644
--- a/src/modules/app_sqlang/app_sqlang_kemi_export.c
+++ b/src/modules/app_sqlang/app_sqlang_kemi_export.c
@@ -9277,6 +9277,9 @@ SQFUNCTION sr_kemi_sqlang_export_associate(sr_kemi_t *ket)
_sr_kemi_sqlang_export_list[i].ket = ket;
return _sr_kemi_sqlang_export_list[i].pfunc;
}
+ if(_sr_kemi_sqlang_export_list[i].ket==ket) {
+ return _sr_kemi_sqlang_export_list[i].pfunc;
+ }
}
LM_ERR("no more indexing slots\n");
return NULL;
diff --git a/src/modules/app_sqlang/utils/app_sqlang_ctl
b/src/modules/app_sqlang/utils/app_sqlang_ctl
index f5a8375d4a..006dc82321 100755
--- a/src/modules/app_sqlang/utils/app_sqlang_ctl
+++ b/src/modules/app_sqlang/utils/app_sqlang_ctl
@@ -136,6 +136,9 @@ SQFUNCTION sr_kemi_sqlang_export_associate(sr_kemi_t *ket)
_sr_kemi_sqlang_export_list[i].ket = ket;
return _sr_kemi_sqlang_export_list[i].pfunc;
}
+ if(_sr_kemi_sqlang_export_list[i].ket==ket) {
+ return _sr_kemi_sqlang_export_list[i].pfunc;
+ }
}
LM_ERR("no more indexing slots\n");
return NULL;