From 9a5418799e219da911cb06a45edfd7cdb752e1c6 Mon Sep 17 00:00:00 2001 From: Andrei Pelinescu-Onciul Date: Sun, 14 Mar 2010 17:15:32 +0100 Subject: [PATCH] app_python: fix mk_action() call The mk_action() call used the old openser format instead of the sip_router one. --- modules/app_python/python_msgobj.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/app_python/python_msgobj.c b/modules/app_python/python_msgobj.c index 3b54ade33d..0299228637 100644 --- a/modules/app_python/python_msgobj.c +++ b/modules/app_python/python_msgobj.c @@ -192,7 +192,6 @@ msg_call_function(msgobject *self, PyObject *args) char *fname, *arg1, *arg2; union cmd_export_u* fexport; struct action *act; - action_u_t elems[MAX_ACTIONS]; struct run_act_ctx ra_ctx; unsigned mod_ver; @@ -220,13 +219,12 @@ msg_call_function(msgobject *self, PyObject *args) return Py_None; } - elems[0].type = MODEXP_ST; - elems[0].u.data = fexport; - elems[1].type = STRING_ST; - elems[1].u.data = arg1; - elems[2].type = STRING_ST; - elems[2].u.data = arg2; - act = mk_action(MODULE_T, 3, elems, 0); + act = mk_action(MODULE_T, 4 /* number of (type, value) pairs */, + MODEXP_ST, fexport, /* function */ + NUMBER_ST, 2, /* parameter number */ + STRING_ST, arg1, /* param. 1 */ + STRING_ST, arg2 /* param. 2 */ + ); if (act == NULL) { PyErr_SetString(PyExc_RuntimeError, -- 2.20.1