&wiphy_features_)) {
LOG(ERROR) << "Failed to get wiphy info from kernel";
}
+ LOG(INFO) << "create scanner for interface with index: "
+ << (int)interface_index_;
scanner_ = new ScannerImpl(interface_index_,
band_info_,
scan_capabilities_,
auto handler = on_scan_result_ready_handler_.find(if_index);
if (handler == on_scan_result_ready_handler_.end()) {
- LOG(DEBUG) << "No handler for scan result notification from interface"
- << " with index: " << if_index;
+ LOG(WARNING) << "No handler for scan result notification from interface"
+ << " with index: " << if_index;
return;
}
scan_utils_(scan_utils),
scan_event_handler_(nullptr) {
// Subscribe one-shot scan result notification from kernel.
+ LOG(INFO) << "subscribe scan result for interface with index: "
+ << (int)interface_index_;
scan_utils_->SubscribeScanResultNotification(
interface_index_,
std::bind(&ScannerImpl::OnScanResultsReady,
}
ScannerImpl::~ScannerImpl() {
+ LOG(INFO) << "Unsubscribe scan result for interface with index: "
+ << (int)interface_index_;
scan_utils_->UnsubscribeScanResultNotification(interface_index_);
scan_utils_->UnsubscribeSchedScanResultNotification(interface_index_);
}
bool aborted,
vector<vector<uint8_t>>& ssids,
vector<uint32_t>& frequencies) {
+ LOG(INFO) << "Received scan result notification from kernel.";
scan_started_ = false;
if (scan_event_handler_ != nullptr) {
// TODO: Pass other parameters back once we find framework needs them.
if (aborted) {
+ LOG(WARNING) << "Scan aborted";
scan_event_handler_->OnScanFailed();
} else {
scan_event_handler_->OnScanResultReady();
}
+ } else {
+ LOG(WARNING) << "No scan event handler found.";
}
}