aboutsummaryrefslogtreecommitdiffstats
path: root/ui/cli/tap-iousers.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-01-04 21:40:05 -0500
committerMichael Mann <mmann78@netscape.net>2015-01-05 13:55:04 +0000
commit22b4ec91c006fec65e655ccbb0dbbc32438f820b (patch)
tree033dc9de28b8a79550a4dd769fcfb249df4be38c /ui/cli/tap-iousers.c
parent9a7318a184e25e08d1c8449e3f826e0a5c66ca3b (diff)
Replace ep_display_to_address with wmem equivalent display_to_address.
Almost all instances require using "manual" memory management, but it gets some ep_ calls out of the GUI. Change-Id: Ifa7303766b08d09442ccf3d7063cbe061578ecd9 Reviewed-on: https://code.wireshark.org/review/6318 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/cli/tap-iousers.c')
-rw-r--r--ui/cli/tap-iousers.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/ui/cli/tap-iousers.c b/ui/cli/tap-iousers.c
index 1100c0d6dc..c3bc5320df 100644
--- a/ui/cli/tap-iousers.c
+++ b/ui/cli/tap-iousers.c
@@ -94,18 +94,20 @@ iousers_draw(void *arg)
for (i=0; (iu->hash.conv_array && i < iu->hash.conv_array->len); i++) {
guint64 tot_frames;
+ char *src_addr, *dst_addr;
iui = &g_array_index(iu->hash.conv_array, conv_item_t, i);
tot_frames = iui->rx_frames + iui->tx_frames;
if (tot_frames == last_frames) {
+ /* XXX - TODO: make name / port resolution configurable (through gbl_resolv_flags?) */
+ src_addr = (char*)get_conversation_address(NULL, &iui->src_address, TRUE);
+ dst_addr = (char*)get_conversation_address(NULL, &iui->dst_address, TRUE);
if (display_ports) {
char *src, *dst;
-
- /* XXX - TODO: make name / port resolution configurable (through gbl_resolv_flags?) */
- src = wmem_strconcat(NULL, get_conversation_address(&iui->src_address, TRUE),
+ src = wmem_strconcat(NULL, src_addr,
":", get_conversation_port(iui->src_port, iui->ptype, TRUE), NULL);
- dst = wmem_strconcat(NULL, get_conversation_address(&iui->dst_address, TRUE),
+ dst = wmem_strconcat(NULL, dst_addr,
":", get_conversation_port(iui->dst_port, iui->ptype, TRUE), NULL);
printf("%-26s <-> %-26s %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER
"u %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u %6"
@@ -122,8 +124,7 @@ iousers_draw(void *arg)
printf("%-20s <-> %-20s %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER
"u %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u %6"
G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u ",
- /* XXX - TODO: make name resolution configurable (through gbl_resolv_flags?) */
- get_conversation_address(&iui->src_address, TRUE), get_conversation_address(&iui->dst_address, TRUE),
+ src_addr, dst_addr,
iui->tx_frames, iui->tx_bytes,
iui->rx_frames, iui->rx_bytes,
iui->tx_frames+iui->rx_frames,
@@ -131,6 +132,9 @@ iousers_draw(void *arg)
);
}
+ wmem_free(NULL, src_addr);
+ wmem_free(NULL, dst_addr);
+
switch (timestamp_get_type()) {
case TS_ABSOLUTE:
tm_time = localtime(&iui->start_abs_time.secs);