[kismac] [binaervarianz] r145 - branches/0.2x/Resources/Nibs/English.lproj/PrefsSounds.nib branches/0.2x/Resources/Nibs/Spanish.lproj/PrefsSounds.nib branches/0.2x/Sources/Controller branches/0.2x/Sources/Core branches/0.2x/Sources/Preferences/PreferencePanes branches/0.2x/Sources/Support branches/0.2x/Sources/Views branches/0.2x/Sources/WaveDrivers trunk/Sources/WaveDrivers

  • From: svn@xxxxxxxxxxxxxxxx
  • To: kismac@xxxxxxxxxxxxx
  • Date: Fri, 28 Apr 2006 07:59:52 +0200

Author: mick
Date: 2006-04-28 07:59:51 +0200 (Fri, 28 Apr 2006)
New Revision: 145

Modified:
   branches/0.2x/Resources/Nibs/English.lproj/PrefsSounds.nib/classes.nib
   branches/0.2x/Resources/Nibs/English.lproj/PrefsSounds.nib/info.nib
   branches/0.2x/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/classes.nib
   branches/0.2x/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/info.nib
   branches/0.2x/Sources/Controller/ScanController.m
   branches/0.2x/Sources/Controller/ScanControllerPrivate.m
   branches/0.2x/Sources/Core/WaveNet.mm
   branches/0.2x/Sources/Preferences/PreferencePanes/PrefsSounds.h
   branches/0.2x/Sources/Preferences/PreferencePanes/PrefsSounds.m
   branches/0.2x/Sources/Support/GPSController.m
   branches/0.2x/Sources/Views/NetView.m
   branches/0.2x/Sources/WaveDrivers/WaveDriverAirportExtreme.m
   trunk/Sources/WaveDrivers/WaveDriverAirportExtreme.m
Log:
* back port of all patches to the 0.2x tree


Modified: branches/0.2x/Resources/Nibs/English.lproj/PrefsSounds.nib/classes.nib
===================================================================
--- branches/0.2x/Resources/Nibs/English.lproj/PrefsSounds.nib/classes.nib      
2006-04-28 04:27:58 UTC (rev 144)
+++ branches/0.2x/Resources/Nibs/English.lproj/PrefsSounds.nib/classes.nib      
2006-04-28 05:59:51 UTC (rev 145)
@@ -18,6 +18,7 @@
                 aNOWEPSounds = id; 
                 aVoices = id; 
                 aWEPSounds = id; 
+                useSounds = id; 
             }; 
             SUPERCLASS = PrefsClient; 
         }

Modified: branches/0.2x/Resources/Nibs/English.lproj/PrefsSounds.nib/info.nib
===================================================================
--- branches/0.2x/Resources/Nibs/English.lproj/PrefsSounds.nib/info.nib 
2006-04-28 04:27:58 UTC (rev 144)
+++ branches/0.2x/Resources/Nibs/English.lproj/PrefsSounds.nib/info.nib 
2006-04-28 05:59:51 UTC (rev 145)
@@ -3,15 +3,19 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>185 -15 356 240 0 0 1280 832 </string>
+       <string>134 -11 356 240 0 0 1024 746 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>109</key>
-               <string>410 477 459 180 0 0 1280 832 </string>
+               <string>538 214 459 265 0 0 1024 746 </string>
        </dict>
        <key>IBFramework Version</key>
-       <string>439.0</string>
+       <string>443.0</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>109</integer>
+       </array>
        <key>IBSystem Version</key>
-       <string>8C46</string>
+       <string>8I127</string>
 </dict>
 </plist>

Modified: branches/0.2x/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/classes.nib
===================================================================
--- branches/0.2x/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/classes.nib      
2006-04-28 04:27:58 UTC (rev 144)
+++ branches/0.2x/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/classes.nib      
2006-04-28 05:59:51 UTC (rev 145)
@@ -18,6 +18,7 @@
                 aNOWEPSounds = id; 
                 aVoices = id; 
                 aWEPSounds = id; 
+                useSounds = id; 
             }; 
             SUPERCLASS = PrefsClient; 
         }

Modified: branches/0.2x/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/info.nib
===================================================================
--- branches/0.2x/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/info.nib 
2006-04-28 04:27:58 UTC (rev 144)
+++ branches/0.2x/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/info.nib 
2006-04-28 05:59:51 UTC (rev 145)
@@ -3,15 +3,19 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>185 -15 356 240 0 0 1280 832 </string>
+       <string>134 -7 356 240 0 0 1024 746 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>109</key>
-               <string>410 477 459 180 0 0 1280 832 </string>
+               <string>282 366 459 265 0 0 1024 746 </string>
        </dict>
        <key>IBFramework Version</key>
-       <string>439.0</string>
+       <string>443.0</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>109</integer>
+       </array>
        <key>IBSystem Version</key>
-       <string>8C46</string>
+       <string>8I127</string>
 </dict>
 </plist>

Modified: branches/0.2x/Sources/Controller/ScanController.m
===================================================================
--- branches/0.2x/Sources/Controller/ScanController.m   2006-04-28 04:27:58 UTC 
(rev 144)
+++ branches/0.2x/Sources/Controller/ScanController.m   2006-04-28 05:59:51 UTC 
(rev 145)
@@ -73,6 +73,7 @@
         @"None", @"WEPSound",
         @"None", @"noWEPSound",
         @"None", @"GeigerSound",
+               [NSNumber numberWithBool:TRUE], @"playCrackSounds",
         @"", @"GPSDevice",
         [NSNumber numberWithInt:2], @"GPSTrace",
         [NSNumber numberWithInt:0], @"GPSNoFix",

Modified: branches/0.2x/Sources/Controller/ScanControllerPrivate.m
===================================================================
--- branches/0.2x/Sources/Controller/ScanControllerPrivate.m    2006-04-28 
04:27:58 UTC (rev 144)
+++ branches/0.2x/Sources/Controller/ScanControllerPrivate.m    2006-04-28 
05:59:51 UTC (rev 145)
@@ -257,6 +257,7 @@
     _importOpen--;
        NSParameterAssert(_importOpen == 0);
        [self menuSetEnabled:YES menu:[NSApp mainMenu]];
+       NSUserDefaults *defs;
 
        [aInfoController reloadData];
     
@@ -264,9 +265,12 @@
     [_importController stopAnimation];
 
     if (returnCode == -1 && ![_importController canceled]) {
-               for (i=0;i<3;i++) {
-                       [[NSSound soundNamed:[[NSUserDefaults 
standardUserDefaults] objectForKey:@"WEPSound"]] play];
-                       sleep(1);
+               defs = [NSUserDefaults standardUserDefaults];
+               if([[defs objectForKey:@"playCrackSounds"] intValue]) {
+                       for (i=0;i<3;i++) {
+                               [[NSSound soundNamed:[[NSUserDefaults 
standardUserDefaults] objectForKey:@"WEPSound"]] play];
+                               sleep(1);
+                       }
                }
                switch(_crackType) {
         case 1:
@@ -313,9 +317,12 @@
             [aInjPacketsMenu setState:NSOnState];
             [aInjPacketsMenu setTitle:[NSLocalizedString(@"Reinjecting into ", 
"menu item") stringByAppendingString:[_curNet BSSID]]];
         } else {
-                       for (i=0;i<3;i++) {
-                               [[NSSound soundNamed:[[NSUserDefaults 
standardUserDefaults] objectForKey:@"noWEPSound"]] play];
-                               sleep(1);
+                       defs = [NSUserDefaults standardUserDefaults];
+                       if([[defs objectForKey:@"playCrackSounds"] intValue]) {
+                               for (i=0;i<3;i++) {
+                                       [[NSSound soundNamed:[[NSUserDefaults 
standardUserDefaults] objectForKey:@"noWEPSound"]] play];
+                                       sleep(1);
+                               }
                        }
                        NSBeginAlertSheet(NSLocalizedString(@"Cracking 
successful", "Crack dialog title"),
                 OK, NULL, NULL, _window, self, NULL, NULL, NULL, 

Modified: branches/0.2x/Sources/Core/WaveNet.mm
===================================================================
--- branches/0.2x/Sources/Core/WaveNet.mm       2006-04-28 04:27:58 UTC (rev 
144)
+++ branches/0.2x/Sources/Core/WaveNet.mm       2006-04-28 05:59:51 UTC (rev 
145)
@@ -65,14 +65,21 @@
 @implementation WaveNet
 
 -(id)initWithID:(int)netID {
+    waypoint cp;
+    GPSController *gpsc;
+
     self = [super init];
     
     if (!self) return nil;
     
     _dataLock = [[NSRecursiveLock alloc] init];
     [_dataLock lock];
-    _netView = [[NetView alloc] initWithNetwork:self];
-    
+       // we should only create a _netView for this network if we have the 
information to see it
+       // check with GPSController if we have a location or not!
+       gpsc = [WaveHelper gpsController];
+       cp = [gpsc currentPoint];    
+       if (cp._lat != 100) _netView = [[NetView alloc] initWithNetwork:self];
+       
     _ID = nil;
        graphData = &zeroGraphData;
        
@@ -210,11 +217,13 @@
     if (_primaryChannel == 0) _primaryChannel = _channel;
     _gotData = NO;
     
-    _netView = [[NetView alloc] initWithNetwork:self];
-    [_netView setWep:_isWep];
-    [_netView setName:_SSID];
-    [_netView setCoord:wp];
-    
+    if (wp._long != 100) {
+               _netView = [[NetView alloc] initWithNetwork:self];
+               [_netView setWep:_isWep];
+               [_netView setName:_SSID];
+               [_netView setCoord:wp];
+       }
+       
     _firstPacket = NO;
     
     [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(updateSettings:) name:KisMACUserDefaultsChanged object:nil];
@@ -281,11 +290,13 @@
     wp._long = ew_coord * (ew_dir == 'E' ? 1.0 : -1.0);
     wp._elevation = 0;
 
-    _netView = [[NetView alloc] initWithNetwork:self];
-    [_netView setWep:_isWep];
-    [_netView setName:_SSID];
-    [_netView setCoord:wp];
-    
+       if (!(wp._long == 100 || (wp._lat == 0 && wp._long == 0))) {
+               _netView = [[NetView alloc] initWithNetwork:self];
+               [_netView setWep:_isWep];
+               [_netView setName:_SSID];
+               [_netView setCoord:wp];
+       }
+               
     _packetsLog = [[NSMutableArray arrayWithCapacity:20] retain];
     _ARPLog  = [[NSMutableArray arrayWithCapacity:20] retain];
     _ACKLog  = [[NSMutableArray arrayWithCapacity:20] retain];
@@ -443,11 +454,13 @@
     if (_primaryChannel == 0) _primaryChannel = _channel;
     _gotData = NO;
     
-    _netView = [[NetView alloc] initWithNetwork:self];
-    [_netView setWep:_isWep];
-    [_netView setName:_SSID];
-    [_netView setCoord:wp];
-    
+       if(wp._long != 100) {
+               _netView = [[NetView alloc] initWithNetwork:self];
+               [_netView setWep:_isWep];
+               [_netView setName:_SSID];
+               [_netView setCoord:wp];
+       }
+       
     _firstPacket = NO;
     
     [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(updateSettings:) name:KisMACUserDefaultsChanged object:nil];
@@ -588,7 +601,7 @@
        } else {
                [WaveHelper secureReplace:&_SSID withObject:newSSID];
        }
-       
+
        [_netView setName:_SSID];
        if (!_firstPacket) [[NSNotificationCenter defaultCenter] 
postNotificationName:KisMACViewItemChanged object:self];
 
@@ -631,14 +644,14 @@
                //after the first packet we should play some sound 
                if (_date == Nil) {
                        if (cp._lat != 100) {
-                               // we have a GPS position and this is the first 
time we've seen the network - initialise _netView
+                               // we have a new network with a GPS position - 
initialise _netView
                                _netView = [[NetView alloc] 
initWithNetwork:self];
                                [_netView setWep:_isWep];
-                               if (_SSID==Nil) [_netView setName:_BSSID]; 
//draw BSSID into the map
+                               if (_SSID==Nil) [_netView setName:_BSSID]; // 
use BSSID for map label
                                else [_netView setName:_SSID];
                                [_netView setCoord:cp];
                        }
-                       
+                                               
                        if (_isWep >= encryptionTypeWEP) [[NSSound 
soundNamed:[[NSUserDefaults standardUserDefaults] objectForKey:@"WEPSound"]] 
play];
                        else [[NSSound soundNamed:[[NSUserDefaults 
standardUserDefaults] objectForKey:@"noWEPSound"]] play];
                        
@@ -669,17 +682,25 @@
             if ((v==Nil) || ([v intValue]<_curSignal))
                 [_coordinates setObject:[NSNumber numberWithInt:_curSignal] 
forKey:pV];
             [pV release];
+                       if(_curSignal>=_maxSignal || ([aLat floatValue] == 0)) {
+                               if(!_netView) {
+                                       // we didn't have a GPS position when 
this was first found, so initialise _netView now
+                                       NSLog(@"First GPS fix for net %@ - 
initialising",_BSSID);
+                                       _netView = [[NetView alloc] 
initWithNetwork:self];
+                                       [_netView setWep:_isWep];
+                                       if (_SSID==Nil) [_netView 
setName:_BSSID]; // use BSSID for map label
+                                       else [_netView setName:_SSID];
+                               }
+                               gpsc = [WaveHelper gpsController];
+                               s = [gpsc NSCoord];
+                               if (s) [WaveHelper secureReplace:&aLat 
withObject:s];
+                               s = [gpsc EWCoord];
+                               if (s) [WaveHelper secureReplace:&aLong 
withObject:s];
+                               s = [gpsc ElevCoord];
+                               if (s) [WaveHelper secureReplace:&aElev 
withObject:s];
+                               [_netView setCoord:cp];
+                       }
         }
-               if(_curSignal>=_maxSignal || ([aLat floatValue] == 0 && [aLong 
floatValue] == 0)) {
-            gpsc = [WaveHelper gpsController];
-            s = [gpsc NSCoord];
-            if (s) [WaveHelper secureReplace:&aLat withObject:s];
-            s = [gpsc EWCoord];
-            if (s) [WaveHelper secureReplace:&aLong withObject:s];
-            s = [gpsc ElevCoord];
-            if (s) [WaveHelper secureReplace:&aElev withObject:s];
-                       [_netView setCoord:cp];
-               }
     }
     
     if(_curSignal>=_maxSignal) _maxSignal=_curSignal;

Modified: branches/0.2x/Sources/Preferences/PreferencePanes/PrefsSounds.h
===================================================================
--- branches/0.2x/Sources/Preferences/PreferencePanes/PrefsSounds.h     
2006-04-28 04:27:58 UTC (rev 144)
+++ branches/0.2x/Sources/Preferences/PreferencePanes/PrefsSounds.h     
2006-04-28 05:59:51 UTC (rev 145)
@@ -18,6 +18,7 @@
     IBOutlet id aVoices;
     IBOutlet id aGeigerSounds;
     IBOutlet id aGeigerSensity;    
+       IBOutlet id useSounds;
 }
 
 - (IBAction)playVoice:(id)sender;

Modified: branches/0.2x/Sources/Preferences/PreferencePanes/PrefsSounds.m
===================================================================
--- branches/0.2x/Sources/Preferences/PreferencePanes/PrefsSounds.m     
2006-04-28 04:27:58 UTC (rev 144)
+++ branches/0.2x/Sources/Preferences/PreferencePanes/PrefsSounds.m     
2006-04-28 05:59:51 UTC (rev 145)
@@ -59,10 +59,12 @@
         [controller setObject:@"None" forKey:@"WEPSound"];
         [controller setObject:@"None" forKey:@"noWEPSound"];
         [controller setObject:@"None" forKey:@"GeigerSound"];
+               [controller setObject:[NSNumber numberWithBool:TRUE] 
forKey:@"playCrackSounds"];
     }
     [aGeigerSounds selectItemWithTitle:[controller 
objectForKey:@"GeigerSound"]];
     [aWEPSounds selectItemWithTitle:[controller objectForKey:@"WEPSound"]];
     [aNOWEPSounds selectItemWithTitle:[controller objectForKey:@"noWEPSound"]];
+       [useSounds setState:[[controller objectForKey:@"playCrackSounds"] 
intValue]];
 
     [aVoices selectItemAtIndex:[[controller objectForKey:@"Voice"] intValue]];
 }
@@ -95,6 +97,9 @@
     else if (sender == aGeigerSensity) {
         [controller setObject:[NSNumber numberWithInt:[sender intValue]] 
forKey:@"GeigerSensity"];
     }
+    else if (sender == useSounds) {
+        [controller setObject:[NSNumber numberWithBool:[sender state]] 
forKey:@"playCrackSounds"];
+    }
     else {
         NSLog(@"Error: Invalid sender(%@) in setValueForSender:",sender);
     }
@@ -113,4 +118,4 @@
         [WaveHelper speakSentence:cSentence withVoice:[sender 
indexOfSelectedItem]];
 }
 
-@end
+@end
\ No newline at end of file

Modified: branches/0.2x/Sources/Support/GPSController.m
===================================================================
--- branches/0.2x/Sources/Support/GPSController.m       2006-04-28 04:27:58 UTC 
(rev 144)
+++ branches/0.2x/Sources/Support/GPSController.m       2006-04-28 05:59:51 UTC 
(rev 145)
@@ -203,22 +203,20 @@
                                                NSLocalizedString(@"Time", "GPS 
status string."), 
                                                [self lastUpdate],[self 
QualData]];
             else
-                return [NSString stringWithFormat:@"%@: %@ %@\n%@: %@\n%@: 
%@%@%@", 
+                return [NSString stringWithFormat:@"%@: %@ %@\n%@: %@\n%@: 
%@%@", 
                         NSLocalizedString(@"Position", "GPS status string."), 
                         [self NSCoord],[self EWCoord],
                         NSLocalizedString(@"Elevation", "GPS status string."), 
                         [self ElevCoord],
                                                NSLocalizedString(@"Time", "GPS 
status string."), 
                                                [self lastUpdate],
-                        _reliable ? @"" : NSLocalizedString(@" -- NO FIX", 
"GPS status string. Needs leading space"),
-                        [self QualData]];
+                        _reliable ? [self QualData] : NSLocalizedString(@" -- 
NO FIX", "GPS status string. Needs leading space")];
         else
-            return [NSString stringWithFormat:@"%@: %@ %@\n%@%@", 
+            return [NSString stringWithFormat:@"%@: %@ %@\n%@", 
                 NSLocalizedString(@"Position", "GPS status string."), 
                 [self NSCoord],[self EWCoord],
                 [self lastUpdate],
-                _reliable ? @"" : NSLocalizedString(@" -- NO FIX", "GPS status 
string. Needs leading space"),
-                               [self QualData]];
+                _reliable ? [self QualData] : NSLocalizedString(@" -- NO FIX", 
"GPS status string. Needs leading space")];
 
     else if ([(NSString*)[[NSUserDefaults standardUserDefaults] 
objectForKey:@"GPSDevice"] length]) {
         if (_gpsThreadUp) return NSLocalizedString(@"GPS subsystem works, but 
there is no data.\nIf you are using gpsd, there may be no GPS 
connected.\nOtherwise, your GPS is probably connected but not yet reporting a 
position.", "GPS status string");
@@ -526,65 +524,63 @@
                
                timeinterval = [date timeIntervalSinceDate:_lastUpdate];
         [WaveHelper secureReplace:&_lastUpdate withObject:date];
+    } else {
+               _reliable = NO;
+    }
 
+       if ((_reliable)||(_onNoFix==0)) {
+               if (ns >= 0) _ns.dir = 'N';
+               else _ns.dir = 'S';
+               
+               if (ew >= 0) _ew.dir = 'E';
+               else _ew.dir = 'W';
+               
+               _ns.coordinates   = fabs(ns);
+               _ew.coordinates   = fabs(ew);
+               _elev.coordinates = elev;
+               if ((velkt > 0) && (_velkt==0)) {
+                       _peakvel = 0;
+                       _sectordist = 0;
+                       _sectortime = 0;
+                       [WaveHelper secureReplace:&_sectorStart 
withObject:date];
+               } else if ((velkt > 0) || (_velkt > 0)) {
+                       // update distances only if we're moving (or just 
stopped)
+                       displacement = (velkt + _velkt)*timeinterval/7200;
+                       _sectordist += displacement;
+                       _sectortime += timeinterval;
+                       _totaldist += displacement;
+               }
+               _velkt = velkt;
+               veldir = (int)fveldir;
+               _veldir = veldir;
+               if (velkt > _peakvel) _peakvel = velkt;
+               if (velkt > _maxvel) _maxvel = velkt;
 
-        if ((_reliable)||(_onNoFix==0)) {
-            if (ns >= 0) _ns.dir = 'N';
-            else _ns.dir = 'S';
-            
-            if (ew >= 0) _ew.dir = 'E';
-            else _ew.dir = 'W';
-            
-            _ns.coordinates   = fabs(ns);
-            _ew.coordinates   = fabs(ew);
-            _elev.coordinates = elev;
-                       if ((velkt > 0) && (_velkt==0)) {
-                               _peakvel = 0;
-                               _sectordist = 0;
-                               _sectortime = 0;
-                               [WaveHelper secureReplace:&_sectorStart 
withObject:date];
-                       } else if ((velkt > 0) || (_velkt > 0)) {
-                               // update distances only if we're moving (or 
just stopped)
-                               displacement = (velkt + 
_velkt)*timeinterval/7200;
-                               _sectordist += displacement;
-                               _sectortime += timeinterval;
-                               _totaldist += displacement;
-                       }
-                       _velkt = velkt;
-                       veldir = (int)fveldir;
-                       _veldir = veldir;
-                       if (velkt > _peakvel) _peakvel = velkt;
-                       if (velkt > _maxvel) _maxvel = velkt;
+               if (numsat > -1) {
+                       _numsat = numsat;
+                       _hdop = hdop;
+               }
+       } else if(_onNoFix==2) {
+               _ns.dir = 'N';
+               _ew.dir = 'E';
+               
+               _elev.coordinates = -10000;
+               _ns.coordinates = 100;
+               _ew.coordinates = 0;
+               _velkt = 0;
+       }
 
-                       if (numsat > -1) {
-                               _numsat = numsat;
-                               _hdop = hdop;
-                       }
-               } else if(_onNoFix==2) {
-            _ns.dir = 'N';
-            _ew.dir = 'E';
-            
-            _elev.coordinates = -10000;
-            _ns.coordinates = 100;
-            _ew.coordinates = 0;
-            _velkt = 0;
-        }
+       if (_reliable) {
+               if (([_lastUpdate 
timeIntervalSinceDate:_lastAdd]>_traceInterval) && (_traceInterval != 100)) {
+                       waypoint w;
+                       w._lat  = _ns.coordinates * ((_ns.dir=='N') ? 1.0 : 
-1.0);
+                       w._long = _ew.coordinates * ((_ew.dir=='E') ? 1.0 : 
-1.0);
+                       if ([[WaveHelper trace] addPoint:w]) [WaveHelper 
secureReplace:&_lastAdd withObject:date];
+               }
+       } else {
+               [[WaveHelper trace] cut];
+       }
 
-               if (_reliable) {
-            if (([_lastUpdate timeIntervalSinceDate:_lastAdd]>_traceInterval) 
&& (_traceInterval != 100)) {
-                waypoint w;
-                w._lat  = _ns.coordinates * ((_ns.dir=='N') ? 1.0 : -1.0);
-                w._long = _ew.coordinates * ((_ew.dir=='E') ? 1.0 : -1.0);
-                if ([[WaveHelper trace] addPoint:w]) [WaveHelper 
secureReplace:&_lastAdd withObject:date];
-            }
-        } else {
-            [[WaveHelper trace] cut];
-        }
-
-    } else {
-// be quiet for now
-//        NSLog(@"GPSd parsing failure - received: %s",gpsbuf);
-    }
     
     [date release];
     [subpool release];

Modified: branches/0.2x/Sources/Views/NetView.m
===================================================================
--- branches/0.2x/Sources/Views/NetView.m       2006-04-28 04:27:58 UTC (rev 
144)
+++ branches/0.2x/Sources/Views/NetView.m       2006-04-28 05:59:51 UTC (rev 
145)
@@ -55,7 +55,7 @@
                _netImg = [_networkUnkEnc retain];
         _netColor = [[NSColor yellowColor] retain];
         _wep = 0;
-        _wp._lat = 0;
+        _wp._lat = 100;
         _wp._long = 0;
                _wp._elevation = 0;
         _network = network;

Modified: branches/0.2x/Sources/WaveDrivers/WaveDriverAirportExtreme.m
===================================================================
--- branches/0.2x/Sources/WaveDrivers/WaveDriverAirportExtreme.m        
2006-04-28 04:27:58 UTC (rev 144)
+++ branches/0.2x/Sources/WaveDrivers/WaveDriverAirportExtreme.m        
2006-04-28 05:59:51 UTC (rev 145)
@@ -103,7 +103,6 @@
        
        if ([[defs objectForKey:@"aeForever"] boolValue]) {
                [[BLAuthentication sharedInstance] executeCommand:@"/bin/rm" 
withArgs:[NSArray arrayWithObject:@"/System/Library/Extensions.kextcache"]];
-               //[[BLAuthentication sharedInstance] 
executeCommand:@"/usr/sbin/kextcache" withArgs:[NSArray arrayWithObjects:@"-k", 
@"/System/Library/Extensions", nil]];
                [[BLAuthentication sharedInstance] executeCommand:@"/bin/rm" 
withArgs:[NSArray arrayWithObject:@"/System/Library/Extensions.mkext"]];
        }
 }
@@ -112,7 +111,8 @@
 + (int) initBackend {
        BOOL ret;
     int x;
-    
+    NSString *kextFile;
+       
     NSUserDefaults *defs;
     
        if([WaveHelper isServiceAvailable:"AirPort_Athr5424"]) {
@@ -133,6 +133,15 @@
                return 2;
        }
        
+       if([[NSFileManager defaultManager] 
fileExistsAtPath:@"/System/Library/Extensions/IO80211Family.kext"]) {
+               NSLog(@"Enabling for new Intel Mac");
+               kextFile = 
@"/System/Library/Extensions/IO80211Family.kext/Contents/PlugIns/AppleAirPortBrcm4311.kext";
+       } else {
+               NSLog(@"Enabling for Mac of the old school");
+               kextFile = @"/System/Library/Extensions/AppleAirPort2.kext";
+       }
+
+       
        defs = [NSUserDefaults standardUserDefaults];
     if ([WaveDriverAirportExtreme deviceAvailable]) return 0;
     if (![[defs objectForKey:@"aeForever"] boolValue]){
@@ -159,14 +168,14 @@
        
         for (x=0; x<5; x++) {
             [NSThread sleep:1.0];
-            [[BLAuthentication sharedInstance] 
executeCommand:@"/sbin/kextload" withArgs:[NSArray 
arrayWithObject:@"/System/Library/Extensions/AppleAirPort2.kext"]];
+            [[BLAuthentication sharedInstance] 
executeCommand:@"/sbin/kextload" withArgs:[NSArray arrayWithObject:kextFile]];
                
             if ([WaveDriverAirportExtreme deviceAvailable]) return 0;
         }
         [[BLAuthentication sharedInstance] executeCommand:@"/sbin/kextunload" 
withArgs:[NSArray arrayWithObjects:@"-b", @"com.apple.iokit.AppleAirPort2", 
nil]];
         for (x=0; x<5; x++) {
             [NSThread sleep:1.0];
-            [[BLAuthentication sharedInstance] 
executeCommand:@"/sbin/kextload" withArgs:[NSArray 
arrayWithObject:@"/System/Library/Extensions/AppleAirPort2.kext"]];
+            [[BLAuthentication sharedInstance] 
executeCommand:@"/sbin/kextload" withArgs:[NSArray arrayWithObject:kextFile]];
     
             if ([WaveDriverAirportExtreme deviceAvailable]) return 0;
         }
@@ -211,14 +220,21 @@
 
 + (bool) unloadBackend {
        BOOL ret;
+       NSString *kextFile;
+       
     if (explicitlyLoadedAirportExtremeDriver) {
                ret = [[BLAuthentication sharedInstance] 
executeCommand:@"/sbin/kextunload" withArgs:[NSArray arrayWithObjects:@"-b", 
@"com.apple.iokit.AppleAirPort2", nil]];
                if (!ret) {
                        NSLog(@"WARNING!!! User canceled password dialog for: 
kextunload");
                        return NO;
                }
+               if([[NSFileManager defaultManager] 
fileExistsAtPath:@"/System/Library/Extensions/IO80211Family.kext"]) {
+                       kextFile = 
@"/System/Library/Extensions/IO80211Family.kext/Contents/PlugIns/AppleAirPortBrcm4311.kext";
+               } else {
+                       kextFile = 
@"/System/Library/Extensions/AppleAirPort2.kext";
+               }
                [WaveDriverAirportExtreme setMonitorMode:NO];
-               [[BLAuthentication sharedInstance] 
executeCommand:@"/sbin/kextload" withArgs:[NSArray 
arrayWithObject:@"/System/Library/Extensions/AppleAirPort2.kext"]];
+               [[BLAuthentication sharedInstance] 
executeCommand:@"/sbin/kextload" withArgs:[NSArray arrayWithObject:kextFile]];
 
                [NSThread sleep:1.0];
        }

Modified: trunk/Sources/WaveDrivers/WaveDriverAirportExtreme.m
===================================================================
--- trunk/Sources/WaveDrivers/WaveDriverAirportExtreme.m        2006-04-28 
04:27:58 UTC (rev 144)
+++ trunk/Sources/WaveDrivers/WaveDriverAirportExtreme.m        2006-04-28 
05:59:51 UTC (rev 145)
@@ -134,8 +134,10 @@
        }
        
        if([[NSFileManager defaultManager] 
fileExistsAtPath:@"/System/Library/Extensions/IO80211Family.kext"]) {
+               NSLog(@"Enabling for new Intel Mac");
                kextFile = 
@"/System/Library/Extensions/IO80211Family.kext/Contents/PlugIns/AppleAirPortBrcm4311.kext";
        } else {
+               NSLog(@"Enabling for Mac of the old school");
                kextFile = @"/System/Library/Extensions/AppleAirPort2.kext";
        }
 


Other related posts:

  • » [kismac] [binaervarianz] r145 - branches/0.2x/Resources/Nibs/English.lproj/PrefsSounds.nib branches/0.2x/Resources/Nibs/Spanish.lproj/PrefsSounds.nib branches/0.2x/Sources/Controller branches/0.2x/Sources/Core branches/0.2x/Sources/Preferences/PreferencePanes branches/0.2x/Sources/Support branches/0.2x/Sources/Views branches/0.2x/Sources/WaveDrivers trunk/Sources/WaveDrivers