Module: sip-router
Branch: master
Commit: a14aaf3f2fe11cdc0d56e1a12cb60ae0cd53b8f5
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a14aaf3f2fe11cdc0d56e1a12cb60ae0cd53b8f5

Author: Andrei Pelinescu-Onciul <[email protected]>
Committer: Andrei Pelinescu-Onciul <[email protected]>
Date:   Sun Mar 14 17:13:40 2010 +0100

perl(k): fix mk_action call

The mk_action() call used the old openser format, instead of the
sip_router one.

---

 modules_k/perl/openserxs.xs |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/modules_k/perl/openserxs.xs b/modules_k/perl/openserxs.xs
index 418f1e3..4ee86b6 100644
--- a/modules_k/perl/openserxs.xs
+++ b/modules_k/perl/openserxs.xs
@@ -220,7 +220,6 @@ int moduleFunc(struct sip_msg *m, char *func,
        unsigned mod_ver;
        char *argv[2];
        int argc = 0;
-       action_u_t elems[MAX_ACTIONS];
        struct run_act_ctx ra_ctx;
 
        if (!func) {
@@ -260,16 +259,12 @@ int moduleFunc(struct sip_msg *m, char *func,
                return -1;
        }
 
-       elems[0].type = MODULE_T;
-       elems[0].u.data = exp_func_struct;
-       elems[1].type = STRING_ST;
-       elems[1].u.data = argv[0];
-       elems[2].type = STRING_ST;
-       elems[2].u.data = argv[1];
-       act = mk_action(        MODULE_T,
-                               3,
-                               elems,
-                               0);
+       act = mk_action(MODULE_T, 4 /* number of (type, value) pairs */,
+                                       MODEXP_ST, exp_func_struct, /* function 
*/
+                                       NUMBER_ST, 2,  /* parameter number */
+                                       STRING_ST, argv[0], /* param. 1 */
+                                       STRING_ST, argv[1]  /* param. 2 */
+                       );
 
 
        if (!act) {


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to