Module: kamailio Branch: 5.5 Commit: c79393c96f5934c4a405a78d10a645b2b11a6bdb URL: https://github.com/kamailio/kamailio/commit/c79393c96f5934c4a405a78d10a645b2...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2023-05-08T15:48:13+02:00
app_python3: proper check of PY_VERSION_HEX for python 3.11
(cherry picked from commit 8546fb87e3277b675bd47eba9435f739cf3bb69d) (cherry picked from commit 82caa486216930ff634e4b9eeee8184eabaf504c)
---
Modified: src/modules/app_python3/apy_kemi.c
---
Diff: https://github.com/kamailio/kamailio/commit/c79393c96f5934c4a405a78d10a645b2... Patch: https://github.com/kamailio/kamailio/commit/c79393c96f5934c4a405a78d10a645b2...
---
diff --git a/src/modules/app_python3/apy_kemi.c b/src/modules/app_python3/apy_kemi.c index 48e8233f3c7..6adad91da1e 100644 --- a/src/modules/app_python3/apy_kemi.c +++ b/src/modules/app_python3/apy_kemi.c @@ -1791,7 +1791,7 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int idx) PyObject *ret = NULL; PyThreadState *pstate = NULL; PyFrameObject *pframe = NULL; -#if PY_VERSION_HEX >= 0x03100000 +#if PY_VERSION_HEX >= 0x030B0000 PyCodeObject *pcode = NULL; #endif struct timeval tvb = {0}, tve = {0}; @@ -1817,7 +1817,7 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int idx) if(tdiff >= cfg_get(core, core_cfg, latency_limit_action)) { pstate = PyThreadState_GET(); if (pstate != NULL) { -#if PY_VERSION_HEX >= 0x03100000 +#if PY_VERSION_HEX >= 0x030B0000 pframe = PyThreadState_GetFrame(pstate); if(pframe != NULL) { pcode = PyFrame_GetCode(pframe); @@ -1827,7 +1827,7 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int idx) #endif }
-#if PY_VERSION_HEX >= 0x03100000 +#if PY_VERSION_HEX >= 0x030B0000 LOG(cfg_get(core, core_cfg, latency_log), "alert - action KSR.%s%s%s(...)" " took too long [%u ms] (file:%s func:%s line:%d)\n",