diff options
author | Michael Mann <mmann78@netscape.net> | 2015-01-07 16:24:17 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-01-08 05:32:32 +0000 |
commit | 22096781499c7159ff504f7baa743d295aad06bc (patch) | |
tree | db03b06970119f83d9b33c2920236d398e3a9ca1 /ui/cli | |
parent | 907d145f86dd4fb219dcb5b2efcac106bc708de7 (diff) |
ep_<protocol>_port_to_display -> <protocol>_port_to_display
Adjust any other ep_ related APIs related to the transition.
Change-Id: I961b371c2c4bda557e0f1817705c27eef0dae66c
Reviewed-on: https://code.wireshark.org/review/6388
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/cli')
-rw-r--r-- | ui/cli/tap-endpoints.c | 8 | ||||
-rw-r--r-- | ui/cli/tap-iousers.c | 12 |
2 files changed, 12 insertions, 8 deletions
diff --git a/ui/cli/tap-endpoints.c b/ui/cli/tap-endpoints.c index 1a6946d2fa..cbdc110f76 100644 --- a/ui/cli/tap-endpoints.c +++ b/ui/cli/tap-endpoints.c @@ -71,7 +71,7 @@ endpoints_draw(void *arg) for (i=0; (iu->hash.conv_array && i < iu->hash.conv_array->len); i++) { guint64 tot_frames; - gchar* conversation_str; + gchar *conversation_str, *port_str; host = &g_array_index(iu->hash.conv_array, hostlist_talker_t, i); tot_frames = host->rx_frames + host->tx_frames; @@ -80,15 +80,17 @@ endpoints_draw(void *arg) /* XXX - TODO: make name resolution configurable (through gbl_resolv_flags?) */ conversation_str = (char*)get_conversation_address(NULL, &host->myaddress, TRUE); if (display_port) { + /* XXX - TODO: make port resolution configurable (through gbl_resolv_flags?) */ + port_str = (char*)get_conversation_port(NULL, host->port, host->ptype, TRUE); printf("%-20s %5s %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 \n", conversation_str, - /* XXX - TODO: make port resolution configurable (through gbl_resolv_flags?) */ - get_conversation_port(host->port, host->ptype, TRUE), + port_str, host->tx_frames+host->rx_frames, host->tx_bytes+host->rx_bytes, host->tx_frames, host->tx_bytes, host->rx_frames, host->rx_bytes); + wmem_free(NULL, port_str); } else { printf("%-20s %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u %6" diff --git a/ui/cli/tap-iousers.c b/ui/cli/tap-iousers.c index c3bc5320df..79c3924729 100644 --- a/ui/cli/tap-iousers.c +++ b/ui/cli/tap-iousers.c @@ -104,11 +104,11 @@ iousers_draw(void *arg) 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; - src = wmem_strconcat(NULL, src_addr, - ":", get_conversation_port(iui->src_port, iui->ptype, TRUE), NULL); - dst = wmem_strconcat(NULL, dst_addr, - ":", get_conversation_port(iui->dst_port, iui->ptype, TRUE), NULL); + char *src, *dst, *src_port, *dst_port; + src_port = (char*)get_conversation_port(NULL, iui->src_port, iui->ptype, TRUE); + dst_port = (char*)get_conversation_port(NULL, iui->dst_port, iui->ptype, TRUE); + src = wmem_strconcat(NULL, src_addr, ":", src_port, NULL); + dst = wmem_strconcat(NULL, dst_addr, ":", dst_port, 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" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u ", @@ -118,6 +118,8 @@ iousers_draw(void *arg) iui->tx_frames+iui->rx_frames, iui->tx_bytes+iui->rx_bytes ); + wmem_free(NULL, src_port); + wmem_free(NULL, dst_port); wmem_free(NULL, src); wmem_free(NULL, dst); } else { |