Module: kamailio
Branch: master
Commit: f4c6365f2678e5c30d4a1fc287206b82a7eee459
URL:
https://github.com/kamailio/kamailio/commit/f4c6365f2678e5c30d4a1fc287206b8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-24T19:04:13+01:00
app_python: updated the ctl tool to generate the exports
---
Modified: src/modules/app_python/apy_kemi_export.c
Modified: src/modules/app_python/utils/app_python_ctl
---
Diff:
https://github.com/kamailio/kamailio/commit/f4c6365f2678e5c30d4a1fc287206b8…
Patch:
https://github.com/kamailio/kamailio/commit/f4c6365f2678e5c30d4a1fc287206b8…
---
diff --git a/src/modules/app_python/apy_kemi_export.c
b/src/modules/app_python/apy_kemi_export.c
index 07cc901abd..fab078b68e 100644
--- a/src/modules/app_python/apy_kemi_export.c
+++ b/src/modules/app_python/apy_kemi_export.c
@@ -9279,6 +9279,9 @@ PyCFunction sr_apy_kemi_export_associate(sr_kemi_t *ket)
_sr_apy_kemi_export_list[i].ket = ket;
return _sr_apy_kemi_export_list[i].pfunc;
}
+ if(_sr_apy_kemi_export_list[i].ket==ket) {
+ return _sr_apy_kemi_export_list[i].pfunc;
+ }
}
LM_ERR("no more indexing slots\n");
return NULL;
diff --git a/src/modules/app_python/utils/app_python_ctl
b/src/modules/app_python/utils/app_python_ctl
index 273d5ca2c4..7fff1c7f2d 100755
--- a/src/modules/app_python/utils/app_python_ctl
+++ b/src/modules/app_python/utils/app_python_ctl
@@ -34,7 +34,7 @@ cat > ../apy_kemi_export.h <<EOF
#define __APY_KEMI_FLIB_H__
#include <Python.h>
-#include "../../kemi.h"
+#include "../../core/kemi.h"
#define SR_APY_KEMI_EXPORT_SIZE ${KEMI_MAX_SIZE}
@@ -83,7 +83,7 @@ cat > ../apy_kemi_export.c <<EOF
#include <Python.h>
-#include "../../dprint.h"
+#include "../../core/dprint.h"
#include "apy_kemi.h"
#include "apy_kemi_export.h"
@@ -138,6 +138,9 @@ PyCFunction sr_apy_kemi_export_associate(sr_kemi_t *ket)
_sr_apy_kemi_export_list[i].ket = ket;
return _sr_apy_kemi_export_list[i].pfunc;
}
+ if(_sr_apy_kemi_export_list[i].ket==ket) {
+ return _sr_apy_kemi_export_list[i].pfunc;
+ }
}
LM_ERR("no more indexing slots\n");
return NULL;