kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit cb0f5a4137affc9c4fd2779c2e8443687ef0259b
parent d10ee4438ddd1d5157442d2e74818d261b2c99a1
Author: Joris Vink <joris@coders.se>
Date:   Fri, 18 Dec 2020 19:48:17 +0100

Make sure koreapp.onmsg can log errors from Python.

Diffstat:
src/python.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/python.c b/src/python.c @@ -2285,7 +2285,7 @@ python_kore_recvobj(struct kore_msg *msg, const void *data) if ((bytes = PyBytes_FromStringAndSize(data, msg->length)) == NULL) { Py_DECREF(onmsg); - kore_python_log_error("kore.recvobj"); + kore_python_log_error("koreapp.onmsg"); return; } @@ -2294,11 +2294,12 @@ python_kore_recvobj(struct kore_msg *msg, const void *data) if (obj == NULL) { Py_DECREF(onmsg); - kore_python_log_error("kore.recvobj"); + kore_python_log_error("koreapp.onmsg"); return; } ret = PyObject_CallFunctionObjArgs(onmsg, obj, NULL); + kore_python_log_error("koreapp.onmsg"); Py_DECREF(obj); Py_DECREF(onmsg);