- uses the new run_actions interface
authorAndrei Pelinescu-Onciul <andrei@iptel.org>
Thu, 14 Jun 2007 23:17:57 +0000 (23:17 +0000)
committerAndrei Pelinescu-Onciul <andrei@iptel.org>
Thu, 14 Jun 2007 23:17:57 +0000 (23:17 +0000)
receive.c

index 9fb17f2..2cd1e35 100644 (file)
--- a/receive.c
+++ b/receive.c
@@ -84,6 +84,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
 {
        struct sip_msg* msg;
        int ret;
+       struct run_act_ctx ra_ctx;
 #ifdef STATS
        int skipped = 1;
        struct timeval tvb, tve;        
@@ -168,7 +169,8 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
                        goto end; /* drop the request */
 
                /* exec the routing script */
-               if (run_actions(main_rt.rlist[DEFAULT_RT], msg)<0){
+               init_run_actions_ctx(&ra_ctx);
+               if (run_actions(&ra_ctx, main_rt.rlist[DEFAULT_RT], msg)<0){
                        LOG(L_WARN, "WARNING: receive_msg: "
                                        "error while trying script\n");
                        goto error_req;
@@ -209,7 +211,8 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
                        goto end; /* drop the request */
                /* exec the onreply routing script */
                if (onreply_rt.rlist[DEFAULT_RT]){
-                       ret=run_actions(onreply_rt.rlist[DEFAULT_RT], msg);
+                       init_run_actions_ctx(&ra_ctx);
+                       ret=run_actions(&ra_ctx, onreply_rt.rlist[DEFAULT_RT], msg);
                        if (ret<0){
                                LOG(L_WARN, "WARNING: receive_msg: "
                                                "error while trying onreply script\n");