TT#79400 dialplan: don't stop loading rules on error

Change-Id: I8342c5d304708fd53f0884c09bd9ed58bd9f614c
changes/07/39607/2
Victor Seva 6 years ago
parent 873255c538
commit c9cf5bacf8

@ -80,6 +80,7 @@ upstream/pv-fix-for-new-PV_IDX_NONE-value.patch
#
sipwise/pua_dialoginfo-refresh_pubruri_avps_flag.patch
sipwise/pua_dialoginfo-local_identity_dlg_var.patch
sipwise/dialplan-don-t-stop-loading-rules-on-error.patch
### active development
#
### Don't just put stuff in any order

@ -0,0 +1,25 @@
From: Victor Seva <vseva@sipwise.com>
Date: Fri, 24 Apr 2020 12:02:48 +0200
Subject: dialplan: don't stop loading rules on error
---
src/modules/dialplan/dp_db.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/modules/dialplan/dp_db.c b/src/modules/dialplan/dp_db.c
index f50c0d0..fb24f35 100644
--- a/src/modules/dialplan/dp_db.c
+++ b/src/modules/dialplan/dp_db.c
@@ -299,8 +299,10 @@ int dp_load_db(void)
values = ROW_VALUES(rows+i);
- if((rule = build_rule(values)) ==0 )
- goto err2;
+ if((rule = build_rule(values)) ==0 ) {
+ LM_ERR("skip rule id:%d", VAL_INT(values));
+ continue;
+ }
if(add_rule2hash(rule , *next_idx) != 0)
goto err2;
Loading…
Cancel
Save