[kismac] [binaervarianz] r135 - in trunk: . Sources/Controller Sources/Core Sources/WaveDrivers
- From: svn@xxxxxxxxxxxxxxxx
- To: kismac@xxxxxxxxxxxxx
- Date: Fri, 21 Apr 2006 11:19:42 +0200
Author: robin
Date: 2006-04-21 11:19:42 +0200 (Fri, 21 Apr 2006)
New Revision: 135
Modified:
trunk/CHANGES
trunk/Sources/Controller/ScanController.m
trunk/Sources/Core/WaveScanner.mm
trunk/Sources/WaveDrivers/WaveDriverUSBIntersil.mm
Log:
* Sleep handling should now be fully functional
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES 2006-04-21 08:00:57 UTC (rev 134)
+++ trunk/CHANGES 2006-04-21 09:19:42 UTC (rev 135)
@@ -1,3 +1,5 @@
+R135: - Now handles going to sleep properly (will resume scanning if scanning
before sleep, and USB Prism2 devices will work immediately after sleep without
a dummy scan).
+
R134: - Patch to receive notifications on sleep and to let drivers know we are
going down in flames
R132: - updates changes and authors files (thanks Elio)
Modified: trunk/Sources/Controller/ScanController.m
===================================================================
--- trunk/Sources/Controller/ScanController.m 2006-04-21 08:00:57 UTC (rev
134)
+++ trunk/Sources/Controller/ScanController.m 2006-04-21 09:19:42 UTC (rev
135)
@@ -179,16 +179,14 @@
// register to receive system sleep notifications
root_port = IORegisterForSystemPower( scanner, ¬ifyPortRef,
NotifySleep, ¬ifierObject );
- if ( root_port == nil )
- {
+ if ( root_port == nil ) {
printf("IORegisterForSystemPower failed\n");
- }
-
- // add the notification port to the application runloop
- CFRunLoopAddSource( CFRunLoopGetCurrent(),
- IONotificationPortGetRunLoopSource(notifyPortRef),
- kCFRunLoopCommonModes );
-
+ } else {
+ // add the notification port to the application runloop
+ CFRunLoopAddSource( CFRunLoopGetCurrent(),
+
IONotificationPortGetRunLoopSource(notifyPortRef),
+ kCFRunLoopCommonModes );
+ }
}
#pragma mark -
Modified: trunk/Sources/Core/WaveScanner.mm
===================================================================
--- trunk/Sources/Core/WaveScanner.mm 2006-04-21 08:00:57 UTC (rev 134)
+++ trunk/Sources/Core/WaveScanner.mm 2006-04-21 09:19:42 UTC (rev 135)
@@ -24,6 +24,7 @@
*/
#import "WaveScanner.h"
#import "ScanController.h"
+#import "ScanControllerScriptable.h"
#import "WaveHelper.h"
#import "Apple80211.h"
#import "WaveDriver.h"
@@ -312,19 +313,20 @@
a = [WaveHelper getWaveDrivers];
[WaveHelper secureReplace:&_drivers withObject:a];
- for (i = 0; i < [_drivers count]; i++) {
- w = [_drivers objectAtIndex:i];
- if (isSleepy) {
+ if (isSleepy) {
+ NSLog(@"Going to sleep...");
+ _shouldResumeScan = _scanning;
+ [aController stopScan];
+ for (i = 0; i < [_drivers count]; i++) {
+ w = [_drivers objectAtIndex:i];
[w sleepDriver];
}
- else {
+ } else {
+ NSLog(@"Waking up...");
+ for (i = 0; i < [_drivers count]; i++) {
+ w = [_drivers objectAtIndex:i];
[w wakeDriver];
- }
- }
- if (isSleepy) {
- _shouldResumeScan = _scanning;
- [aController stopScan];
- }else {
+ }
if (_shouldResumeScan) {
[aController startScan];
}
Modified: trunk/Sources/WaveDrivers/WaveDriverUSBIntersil.mm
===================================================================
--- trunk/Sources/WaveDrivers/WaveDriverUSBIntersil.mm 2006-04-21 08:00:57 UTC
(rev 134)
+++ trunk/Sources/WaveDrivers/WaveDriverUSBIntersil.mm 2006-04-21 09:19:42 UTC
(rev 135)
@@ -122,7 +122,7 @@
}
- (bool) sleepDriver{
- delete _driver;
+ if (_driver) delete _driver;
return YES;
}
Other related posts:
- » [kismac] [binaervarianz] r135 - in trunk: . Sources/Controller Sources/Core Sources/WaveDrivers