فهرست منبع

- uses the new run_actions interface

Andrei Pelinescu-Onciul 18 سال پیش
والد
کامیت
54e4ae8a20
1فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 5 2
      receive.c

+ 5 - 2
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");