From 0975bf792a5609157349053385badca1f9c29cd7 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 1 Apr 2020 13:06:00 -0700 Subject: Handle -k better on platforms that don't support it. Have ws80211_init() return an indication that channel setting isn't supported on those platforms. In dumpcap, try to set up ws80211 before checking the channel argument and, if it fails, report the failure, rather than failing because the "convert channel name to channel code" routine fails. See https://ask.wireshark.org/question/15535/dumpcap-k-is-not-accepting-channel-type-values/ for an example of confusion caused by the previous behavior. Change-Id: I303f560704700bbcd4f0ecea041f8632744212f3 Reviewed-on: https://code.wireshark.org/review/36659 Petri-Dish: Guy Harris Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- ui/qt/wireless_frame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/qt/wireless_frame.cpp b/ui/qt/wireless_frame.cpp index 276138fd8b..d812a6eb3e 100644 --- a/ui/qt/wireless_frame.cpp +++ b/ui/qt/wireless_frame.cpp @@ -50,7 +50,7 @@ WirelessFrame::WirelessFrame(QWidget *parent) : ui->helperToolButton->hide(); - if (ws80211_init() == 0) { + if (ws80211_init() == WS80211_INIT_OK) { ui->stackedWidget->setEnabled(true); ui->stackedWidget->setCurrentWidget(ui->interfacePage); -- cgit v1.2.3