Browse code

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

- reported by Juha Heinanen

Daniel-Constantin Mierla authored on 22/08/2013 13:44:05
Showing 1 changed files
... ...
@@ -48,9 +48,11 @@ void sr_core_ert_init(void)
48 48
 	/* 0 - is not a valid index in event_route blocks list */
49 49
 	_sr_core_ert_list.init_parse_error = route_get(&event_rt,
50 50
 											"core:receive-parse-error");
51
-	if(_sr_core_ert_list.init_parse_error>=0
52
-			&& event_rt.rlist[_sr_core_ert_list.init_parse_error]!=NULL) {
51
+	if(_sr_core_ert_list.init_parse_error<=0
52
+				|| event_rt.rlist[_sr_core_ert_list.init_parse_error]==NULL) {
53 53
 		_sr_core_ert_list.init_parse_error = -1;
54
+	} else {
55
+		LM_DBG("event_route[core:receive-parse-error] is defined\n");
54 56
 	}
55 57
 }
56 58