Skip to content

Commit dc02743

Browse files
committed
Call Flow: Fix arrow directions in compress mode
1 parent c3910af commit dc02743

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ui_call_flow.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ call_flow_draw_message(PANEL *panel, call_flow_arrow_t *arrow, int cline)
334334
vector_iter_t medias;
335335
int color = 0;
336336
int msglen;
337+
int arrow_dir = 0; /* 0: right, 1: left */
337338

338339
// Get panel information
339340
info = call_flow_info(panel);
@@ -422,6 +423,7 @@ call_flow_draw_message(PANEL *panel, call_flow_arrow_t *arrow, int cline)
422423
tmp = column1;
423424
column1 = column2;
424425
column2 = tmp;
426+
arrow_dir = 1; /* swap arrow direction */
425427
}
426428

427429
int startpos = 20 + 30 * column1->colpos;
@@ -484,7 +486,7 @@ call_flow_draw_message(PANEL *panel, call_flow_arrow_t *arrow, int cline)
484486
}
485487

486488
// Write the arrow at the end of the message (two arros if this is a retrans)
487-
if (!strcasecmp(msg_src, column1->addr)) {
489+
if (arrow_dir == 0 /* right */) {
488490
mvwaddch(win, cline, endpos - 2, '>');
489491
if (call_msg_is_retrans(msg)) {
490492
mvwaddch(win, cline, endpos - 3, '>');
@@ -1387,7 +1389,6 @@ call_flow_column_get(PANEL *panel, const char *callid, const char *address)
13871389
strcpy(addr, get_alias_value(addr));
13881390
}
13891391

1390-
13911392
// Look for address or address:port ?
13921393
match_port = (strchr(addr, ':') != NULL);
13931394

0 commit comments

Comments
 (0)