Browse code

- 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 authored on 16/06/2006 14:15:51
Showing 2 changed files
... ...
@@ -915,7 +915,7 @@ int run_actions(struct action* a, struct sip_msg* msg)
915 915
 	if (a==0){
916 916
 		DBG("DEBUG: run_actions: null action list (rec_level=%d)\n",
917 917
 			rec_lev);
918
-		ret=0;
918
+		ret=1;
919 919
 	}
920 920
 
921 921
 	for (t=a; t!=0; t=t->next){
... ...
@@ -208,11 +208,11 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
208 208
 				LOG(L_WARN, "WARNING: receive_msg: "
209 209
 						"error while trying onreply script\n");
210 210
 				goto error_rpl;
211
-			}else if (ret==0) goto end; /* drop the message, no error */
211
+			}else if (ret==0) goto skip_send_reply; /* drop the message, no error */
212 212
 		}
213 213
 		/* send the msg */
214 214
 		forward_reply(msg);
215
-
215
+	skip_send_reply:
216 216
 #ifdef STATS
217 217
 		gettimeofday( & tve, &tz );
218 218
 		diff = (tve.tv_sec-tvb.tv_sec)*1000000+(tve.tv_usec-tvb.tv_usec);