Browse Source

- bugfix SER-111
-When (drop/function returning 0) appears in onreply route then post reply script callbacks are skiped
-Empty route block causes drop

Tomas Mandys 19 years ago
parent
commit
f9ac51fb6d
2 changed files with 3 additions and 3 deletions
  1. 1 1
      action.c
  2. 2 2
      receive.c

+ 1 - 1
action.c

@@ -915,7 +915,7 @@ int run_actions(struct action* a, struct sip_msg* msg)
 	if (a==0){
 		DBG("DEBUG: run_actions: null action list (rec_level=%d)\n",
 			rec_lev);
-		ret=0;
+		ret=1;
 	}
 
 	for (t=a; t!=0; t=t->next){

+ 2 - 2
receive.c

@@ -208,11 +208,11 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
 				LOG(L_WARN, "WARNING: receive_msg: "
 						"error while trying onreply script\n");
 				goto error_rpl;
-			}else if (ret==0) goto end; /* drop the message, no error */
+			}else if (ret==0) goto skip_send_reply; /* drop the message, no error */
 		}
 		/* send the msg */
 		forward_reply(msg);
-
+	skip_send_reply:
 #ifdef STATS
 		gettimeofday( & tve, &tz );
 		diff = (tve.tv_sec-tvb.tv_sec)*1000000+(tve.tv_usec-tvb.tv_usec);