[PATCH 2/3]: wpa_gui-qt4: update scan results on WPA_EVENT_SCAN_RESULTS

Kel Modderman kel
Wed Jan 30 10:22:13 PST 2008


Update scanresults when WPA_EVENT_SCAN_RESULTS event is received. No longer
set a timer to update it on intervals.

Signed-off-by: Kel Modderman <kel at otaku42.de>
---
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -708,6 +708,8 @@
 
 	if (str_match(pos, WPA_CTRL_REQ))
 		processCtrlReq(pos + strlen(WPA_CTRL_REQ));
+	else if (str_match(pos, WPA_EVENT_SCAN_RESULTS) && scanres)
+		scanres->updateResults();
 }
 
 
--- a/wpa_supplicant/wpa_gui-qt4/scanresults.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/scanresults.cpp
@@ -38,7 +38,6 @@
 
 ScanResults::~ScanResults()
 {
-	delete timer;
 }
 
 
@@ -52,11 +51,6 @@
 {
 	wpagui = _wpagui;
 	updateResults();
-    
-	timer = new QTimer(this);
-	connect(timer, SIGNAL(timeout()), SLOT(getResults()));
-	timer->setSingleShot(FALSE);
-	timer->start(10000);
 }
 
 
--- a/wpa_supplicant/wpa_gui-qt4/scanresults.h
+++ b/wpa_supplicant/wpa_gui-qt4/scanresults.h
@@ -41,7 +41,6 @@
 
 private:
 	WpaGui *wpagui;
-	QTimer *timer;
 };
 
 #endif /* SCANRESULTS_H */
---



More information about the Hostap mailing list