From c9cf5bacf8fa13492b7d4501d91b11d472877845 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Wed, 10 Jun 2020 13:11:36 +0200 Subject: [PATCH] TT#79400 dialplan: don't stop loading rules on error Change-Id: I8342c5d304708fd53f0884c09bd9ed58bd9f614c --- debian/patches/series | 1 + ...an-don-t-stop-loading-rules-on-error.patch | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 debian/patches/sipwise/dialplan-don-t-stop-loading-rules-on-error.patch diff --git a/debian/patches/series b/debian/patches/series index 997b4e819..1b062bafb 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 diff --git a/debian/patches/sipwise/dialplan-don-t-stop-loading-rules-on-error.patch b/debian/patches/sipwise/dialplan-don-t-stop-loading-rules-on-error.patch new file mode 100644 index 000000000..6693a9905 --- /dev/null +++ b/debian/patches/sipwise/dialplan-don-t-stop-loading-rules-on-error.patch @@ -0,0 +1,25 @@ +From: Victor Seva +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;