dumpcap: use the display name in error messages.

That adds the description, if present, on UN*X, and replaces the ugly
GUID-based name with a friendly name on Windows.
This commit is contained in:
Guy Harris 2021-02-08 15:16:33 -08:00
parent 37f5e0f7fd
commit 9b771d2c14
1 changed files with 4 additions and 4 deletions

View File

@ -4176,7 +4176,7 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct
primary_msg = g_strdup_printf("The network adapter \"%s\" "
"is no longer running; the "
"capture has stopped.",
interface_opts->name);
interface_opts->display_name);
secondary_msg = g_strdup("");
} else if (strcmp(cap_err_str, "The interface disappeared") == 0 ||
strcmp(cap_err_str, "read: Device not configured") == 0 ||
@ -4185,7 +4185,7 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct
primary_msg = g_strdup_printf("The network adapter \"%s\" "
"is no longer attached; the "
"capture has stopped.",
interface_opts->name);
interface_opts->display_name);
secondary_msg = g_strdup("");
} else if (g_str_has_prefix(cap_err_str, "The interface disappeared ")) {
/*
@ -4199,7 +4199,7 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct
primary_msg = g_strdup_printf("The network adapter \"%s\" "
"is no longer attached; the "
"capture has stopped.",
interface_opts->name);
interface_opts->display_name);
secondary_msg = g_strdup_printf("If you have not removed that "
"adapter, this may be a bug "
"in Npcap: please report it "
@ -4243,7 +4243,7 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct
primary_msg = g_strdup_printf("The network adapter \"%s\" "
"is no longer attached; the "
"capture has stopped.",
interface_opts->name);
interface_opts->display_name);
secondary_msg = g_strdup_printf("If you have not removed that "
"adapter, this may be a bug "
"in Npcap: please report it "