The mk_action() call used the old openser format instead of the
sip_router one.
... | ... |
@@ -192,7 +192,6 @@ msg_call_function(msgobject *self, PyObject *args) |
192 | 192 |
char *fname, *arg1, *arg2; |
193 | 193 |
union cmd_export_u* fexport; |
194 | 194 |
struct action *act; |
195 |
- action_u_t elems[MAX_ACTIONS]; |
|
196 | 195 |
struct run_act_ctx ra_ctx; |
197 | 196 |
unsigned mod_ver; |
198 | 197 |
|
... | ... |
@@ -220,13 +219,12 @@ msg_call_function(msgobject *self, PyObject *args) |
220 | 219 |
return Py_None; |
221 | 220 |
} |
222 | 221 |
|
223 |
- elems[0].type = MODEXP_ST; |
|
224 |
- elems[0].u.data = fexport; |
|
225 |
- elems[1].type = STRING_ST; |
|
226 |
- elems[1].u.data = arg1; |
|
227 |
- elems[2].type = STRING_ST; |
|
228 |
- elems[2].u.data = arg2; |
|
229 |
- act = mk_action(MODULE_T, 3, elems, 0); |
|
222 |
+ act = mk_action(MODULE_T, 4 /* number of (type, value) pairs */, |
|
223 |
+ MODEXP_ST, fexport, /* function */ |
|
224 |
+ NUMBER_ST, 2, /* parameter number */ |
|
225 |
+ STRING_ST, arg1, /* param. 1 */ |
|
226 |
+ STRING_ST, arg2 /* param. 2 */ |
|
227 |
+ ); |
|
230 | 228 |
|
231 | 229 |
if (act == NULL) { |
232 | 230 |
PyErr_SetString(PyExc_RuntimeError, |