- bugfix SER-111
authorTomas Mandys <tomas.mandys@iptel.org>
Fri, 16 Jun 2006 14:15:51 +0000 (14:15 +0000)
committerTomas Mandys <tomas.mandys@iptel.org>
Fri, 16 Jun 2006 14:15:51 +0000 (14:15 +0000)
-When (drop/function returning 0) appears in onreply route then post reply script callbacks are skiped
-Empty route block causes drop

action.c
receive.c

index 3cf7385..bccc1f2 100644 (file)
--- a/action.c
+++ b/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){
index 11f895c..8c78cdd 100644 (file)
--- a/receive.c
+++ b/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);