diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-07-22 16:53:18 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-07-22 23:53:49 +0000 |
commit | f6ce0cdacd642d31cf198d0bdc4654bbd5afd951 (patch) | |
tree | ea1cabe3d37f686171cb3fb273595eafe04d163a /ui/gtk/main_welcome.c | |
parent | 4261109e1e15ec16b3d38df9e6011d676a558487 (diff) |
Get rid of NO_INTERFACES_FOUND - it's not an error.
It just means "pcap didn't give me any interfaces, and didn't report an
error". Hopefully, in the future, there will be pcap APIs that
distinguish between the (admittedly unlikely, these days) case of "there
really *are* no interfaces on which *anybody* can capture" and "you
don't have sufficient permission to capture", and we can report the
latter as an error. (Given that pcap supports more than just "regular
interfaces", though, there are cases where you don't have permission to
capture on those but you have permission to capture raw USB traffic, for
example, so perhaps what's really needed is per-interface indications of
permissions.)
Change-Id: I7b8abb0829e8502f5259c95e8af31655f79d36a1
Reviewed-on: https://code.wireshark.org/review/3169
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/gtk/main_welcome.c')
-rw-r--r-- | ui/gtk/main_welcome.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/gtk/main_welcome.c b/ui/gtk/main_welcome.c index 95c09dc0ab..1c1cb74c90 100644 --- a/ui/gtk/main_welcome.c +++ b/ui/gtk/main_welcome.c @@ -1076,6 +1076,13 @@ fill_capture_box(void) capture_interface_list(&error, &err_str,main_window_update); switch (error) { + case 0: + label_text = g_strdup("No interface can be used for capturing in " + "this system with the current configuration.\n" + "\n" + "See Capture Help below for details."); + break; + case CANT_GET_INTERFACE_LIST: label_text = g_strdup_printf("No interface can be used for capturing in " "this system with the current configuration.\n\n" @@ -1085,13 +1092,6 @@ fill_capture_box(void) err_str); break; - case NO_INTERFACES_FOUND: - label_text = g_strdup("No interface can be used for capturing in " - "this system with the current configuration.\n" - "\n" - "See Capture Help below for details."); - break; - case DONT_HAVE_PCAP: label_text = g_strdup("WinPcap doesn't appear to be installed. " "In order to capture packets, WinPcap " @@ -1140,7 +1140,7 @@ fill_capture_box(void) g_signal_connect(w, "activate-link", G_CALLBACK(activate_link_cb), NULL); #endif g_object_set_data(G_OBJECT(welcome_hb), CAPTURE_LABEL, w); - if (error == CANT_GET_INTERFACE_LIST || error == NO_INTERFACES_FOUND) { + if (error == CANT_GET_INTERFACE_LIST || error == 0) { item_hb_refresh = welcome_button(GTK_STOCK_REFRESH, "Refresh Interfaces", "Get a new list of the local interfaces.", |