Module: kamailio
Branch: master
Commit: 1d0b7f22b3321cf9b2a4866b0a8a6001538aba42
URL:
https://github.com/kamailio/kamailio/commit/1d0b7f22b3321cf9b2a4866b0a8a600…
Author: Bastian Triller <bastian.triller(a)gmail.com>
Committer: Bastian Triller <bastian.triller(a)gmail.com>
Date: 2021-12-13T13:11:26+01:00
dialog: fix missing else
---
Modified: src/modules/dialog/dialog.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1d0b7f22b3321cf9b2a4866b0a8a600…
Patch:
https://github.com/kamailio/kamailio/commit/1d0b7f22b3321cf9b2a4866b0a8a600…
---
diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
index 16abec9e88..da3ce7cbfd 100644
--- a/src/modules/dialog/dialog.c
+++ b/src/modules/dialog/dialog.c
@@ -2330,9 +2330,9 @@ static inline void internal_rpc_print_dlg(rpc_t *rpc, void *c,
dlg_cell_t *dlg,
if (rpc->add(c, "{", &h) < 0) goto error;
tnow = time(NULL);
- if(dlg->end_ts) {
+ if (dlg->end_ts) {
tdur = (int)(dlg->end_ts - dlg->start_ts);
- } if(dlg->start_ts) {
+ } else if (dlg->start_ts) {
tdur = (int)(tnow - dlg->start_ts);
} else {
tdur = 0;