Module: kamailio
Branch: master
Commit: f99b116e876170709ad364ac2b8093969a939d4a
URL:
https://github.com/kamailio/kamailio/commit/f99b116e876170709ad364ac2b80939…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-06-12T15:53:38+02:00
dialplan: restructured condition on input and output params
---
Modified: src/modules/dialplan/dialplan.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f99b116e876170709ad364ac2b80939…
Patch:
https://github.com/kamailio/kamailio/commit/f99b116e876170709ad364ac2b80939…
---
diff --git a/src/modules/dialplan/dialplan.c b/src/modules/dialplan/dialplan.c
index b7372769813..b5286d2b613 100644
--- a/src/modules/dialplan/dialplan.c
+++ b/src/modules/dialplan/dialplan.c
@@ -857,11 +857,14 @@ static int ki_dp_translate(
return -1;
}
- if(input_spv == NULL && output_spv == NULL) {
- pvs_i = pv_cache_get(&dp_default_param_s);
+ if(input_spv == NULL || input_spv->len <= 0) {
pvs_o = pv_cache_get(&dp_default_param_s);
} else {
pvs_i = pv_cache_get(input_spv);
+ }
+ if(output_spv == NULL || output_spv->len <= 0) {
+ pvs_i = pv_cache_get(&dp_default_param_s);
+ } else {
pvs_o = pv_cache_get(output_spv);
}