Add wpa_msg_ctrl() for ctrl_interface-only messages

This is like wpa_msg(), but the output is directed only to
ctrl_interface listeners. In other words, the output will not be
shown on stdout or in syslog.

Change scan result reporting to use wpa_msg_ctrl() for
CTRL-EVENT-SCAN-RESULTS message at info level and wpa_printf() at
debug level to avoid showing scan result events in syslog in the
common configuration used with NetworkManager.
This commit is contained in:
Jouni Malinen 2009-11-10 15:59:41 +02:00 committed by Jouni Malinen
parent c2e3f9df6f
commit 69856fadf7
3 changed files with 41 additions and 1 deletions

View file

@ -760,7 +760,8 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s)
wpa_msg(wpa_s, MSG_DEBUG, "Cached scan results are "
"empty - not posting");
} else {
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS);
wpa_printf(MSG_DEBUG, "New scan results available");
wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS);
wpas_notify_scan_results(wpa_s);
}