Module: kamailio
Branch: master
Commit: 60ded00a3b574a08457a696334d11d668595cc0b
URL: https://github.com/kamailio/kamailio/commit/60ded00a3b574a08457a696334d11d6…
Author: Stefan-Cristian Mititelu <stefan-cristian.mititelu(a)1and1.ro>
Committer: Stefan-Cristian Mititelu <stefan-cristian.mititelu(a)1and1.ro>
Date: 2024-04-08T11:35:38+03:00
pdb server: allow carrier id 0
---
Modified: utils/pdbt/common.h
---
Diff: https://github.com/kamailio/kamailio/commit/60ded00a3b574a08457a696334d11d6…
Patch: https://github.com/kamailio/kamailio/commit/60ded00a3b574a08457a696334d11d6…
---
diff --git a/utils/pdbt/common.h b/utils/pdbt/common.h
index 2146109a29d..a014e7d97e4 100644
--- a/utils/pdbt/common.h
+++ b/utils/pdbt/common.h
@@ -36,7 +36,7 @@
-1000..-1 used in dtm to indicate a carrier id and that no more nodes will follow (leaf node compression).
-1001 used in dtm to mark a pointer to a child node as NULL.
*/
-#define MIN_PDB_CARRIERID 1
+#define MIN_PDB_CARRIERID 0
#define MAX_PDB_CARRIERID 999
#define OTHER_CARRIERID 1000
#define MAX_CARRIERID 1000
### Description
Kamailio segfaults when KEMI functions are invoked from app_python script
### Troubleshooting
The same code was running ok with the 5.6 branch.
It seems that the function sr_apy_kemi_exec_func_ex has been re-written in 5.7 with the following main changes :
- The long IF/ELSE statement was replace by a FOR loop
- The call to PyArg_ParseTuple function was replaced by the call to PyList_GetItem ==> **This seems to be the cause. The value returned by this function is alway NULL**
#### Reproduction
Any call to KSR.pv.seti function from a PYTHON 2 script would cause this error.
#### Log Messages
```
sbin/kamailio[18449]: ERROR: app_python [apy_kemi.c:280]: sr_apy_kemi_exec_func_ex(): null parameter - func: seti idx: 0 argc:
2
Feb 6 11:34:16 .../sbin/kamailio[18509]: CRITICAL: <core> [core/pass_fd.c:281]: receive_fd(): EOF on 37
Feb 6 11:34:16 .../sbin/kamailio[18380]: ALERT: <core> [main.c:793]: handle_sigs(): child process 18449 exited by a signal 11
Feb 6 11:34:16 .../sbin/kamailio[18380]: ALERT: <core> [main.c:796]: handle_sigs(): core was not generated
Feb 6 11:34:16 .../sbin/kamailio[18380]: INFO: <core> [main.c:818]: handle_sigs(): terminating due to SIGCHLD
Feb 6 11:34:16 .../sbin/kamailio[18509]: INFO: <core> [main.c:874]: sig_usr(): signal 15 received
Feb 6 11:34:16 .../sbin/kamailio[18502]: INFO: <core> [main.c:874]: sig_usr(): signal 15 received
Feb 6 11:34:16 .../sbin/kamailio[18495]: INFO: <core> [main.c:874]: sig_usr(): signal 15 received
Feb 6 11:34:16 .../sbin/kamailio[18482]: INFO: <core> [main.c:874]: sig_usr(): signal 15 received
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3746
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3746(a)github.com>