Module: sip-router Branch: master Commit: 9a5418799e219da911cb06a45edfd7cdb752e1c6 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9a541879...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Sun Mar 14 17:15:32 2010 +0100
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 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/modules/app_python/python_msgobj.c b/modules/app_python/python_msgobj.c index 3b54ade..0299228 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,