diff --git a/modules/dialplan/dp_repl.c b/modules/dialplan/dp_repl.c index 1a5dc2cca37..6ff94dd03f2 100644 --- a/modules/dialplan/dp_repl.c +++ b/modules/dialplan/dp_repl.c @@ -304,7 +304,7 @@ int translate(struct sip_msg *msg, str input, str * output, dpl_id_p idp, str * if(rulep->parsed_timerec) { LM_DBG("Timerec exists for rule checking: %.*s\n", rulep->timerec.len, rulep->timerec.s); // Doesn't matches time period continue with next rule - if(!tmrec_expr_check(rulep->parsed_timerec)) { + if(tmrec_expr_check(rulep->parsed_timerec) < 0) { LM_DBG("Time rule doesn't match: skip next!\n"); continue; } @@ -328,7 +328,7 @@ int translate(struct sip_msg *msg, str input, str * output, dpl_id_p idp, str * if(rrulep->parsed_timerec) { LM_DBG("Timerec exists for rule checking: %.*s\n", rrulep->timerec.len, rrulep->timerec.s); // Doesn't matches time period continue with next rule - if(!tmrec_expr_check(rrulep->parsed_timerec)) { + if(tmrec_expr_check(rrulep->parsed_timerec) < 0) { LM_DBG("Time rule doesn't match: skip next!\n"); continue; } diff --git a/modules/drouting/prefix_tree.c b/modules/drouting/prefix_tree.c index 656138609be..acc149445db 100644 --- a/modules/drouting/prefix_tree.c +++ b/modules/drouting/prefix_tree.c @@ -104,7 +104,7 @@ internal_check_rt( j = 0; while(rtlw!=NULL) { if ( j++ >= *rgidx) { - if (!rtlw->rtl->time_rec || tmrec_expr_check(rtlw->rtl->time_rec)) + if (!rtlw->rtl->time_rec || tmrec_expr_check(rtlw->rtl->time_rec) == 1) goto ok_exit; } rtlw=rtlw->next;