aboutsummaryrefslogtreecommitdiffstats
path: root/ui/recent.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-12-28 12:34:20 -0500
committerAnders Broman <a.broman58@gmail.com>2017-12-29 07:44:37 +0000
commitead32b56281f2f33b4b9bdc69df79516e515860b (patch)
treea0d10d1b8653bd2ca2c545e5745beb1ef6ea2a77 /ui/recent.c
parentc693522e3312d4b7c4e4f68409e39f1000644631 (diff)
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 <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/recent.c')
-rw-r--r--ui/recent.c7
1 files changed, 6 insertions, 1 deletions
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 */