Module: kamailio
Branch: master
Commit: 8f23548c4d201445e29e73cd0f2efab6a7dc5c04
URL:
https://github.com/kamailio/kamailio/commit/8f23548c4d201445e29e73cd0f2efab…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2021-12-13T13:27:36+01:00
Merge pull request #2973 from btriller/dialog-fix-missing-else
dialog: fix missing else
---
Modified: src/modules/dialog/dialog.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8f23548c4d201445e29e73cd0f2efab…
Patch:
https://github.com/kamailio/kamailio/commit/8f23548c4d201445e29e73cd0f2efab…
---
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;