Module: sip-router
Branch: master
Commit: 86bdfaa3efe7804bcfde3da4f63b252c74e417b7
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=86bdfaa3efe7804bcfde3da4f63b252c74e417b7

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Thu Aug 22 15:44:05 2013 +0200

core: fix condition to lookup envet_route[core:receive-parse-error]

- reported by Juha Heinanen

---

 events.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/events.c b/events.c
index 2518486..ae4fead 100644
--- a/events.c
+++ b/events.c
@@ -48,9 +48,11 @@ void sr_core_ert_init(void)
        /* 0 - is not a valid index in event_route blocks list */
        _sr_core_ert_list.init_parse_error = route_get(&event_rt,
                                                                                
        "core:receive-parse-error");
-       if(_sr_core_ert_list.init_parse_error>=0
-                       && 
event_rt.rlist[_sr_core_ert_list.init_parse_error]!=NULL) {
+       if(_sr_core_ert_list.init_parse_error<=0
+                               || 
event_rt.rlist[_sr_core_ert_list.init_parse_error]==NULL) {
                _sr_core_ert_list.init_parse_error = -1;
+       } else {
+               LM_DBG("event_route[core:receive-parse-error] is defined\n");
        }
 }
 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to