From ead32b56281f2f33b4b9bdc69df79516e515860b Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Thu, 28 Dec 2017 12:34:20 -0500 Subject: Populate Remote Interfaces with data from recent file Remote Interfaces have been saved in the recent_common file however they were never populated by the GUI. Bug: 8557 Change-Id: Ib68a75ce02f5b5e2c115b72d58c3e781a5122f9f Reviewed-on: https://code.wireshark.org/review/25039 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- ui/recent.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ui/recent.c') diff --git a/ui/recent.c b/ui/recent.c index 93e15715df..35ec2785f6 100644 --- a/ui/recent.c +++ b/ui/recent.c @@ -490,7 +490,12 @@ capture_remote_combo_add_recent(const gchar *s) if (valp) { /* Found value 2, this is the port number */ - rh->remote_port = (gchar *)g_strdup ((const gchar *)valp->data); + if (!strcmp((const char*)valp->data, "0")) { + /* Port 0 isn't valid, so leave port blank */ + rh->remote_port = (gchar *)g_strdup (""); + } else { + rh->remote_port = (gchar *)g_strdup ((const gchar *)valp->data); + } valp = valp->next; } else { /* Did not find a port number */ -- cgit v1.2.3