Skip to content

Commit 6544e0c

Browse files
committed
2.1.1.1, should fix #210
1 parent 91cd706 commit 6544e0c

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

InfoPlistPreprocessor.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef InfoPlistPreprocessor_h
1010
#define InfoPlistPreprocessor_h
1111

12-
#define MM_VERSION 2.1.2
12+
#define MM_VERSION 2.1.2.1
1313
#define MM_COPYRIGHT MenuMeters MM_VERSION, by many contributors
1414

1515
#endif /* InfoPlistPreprocessor_h */

MenuExtras/MenuMeterNet/MenuMeterNetConfig.m

+20-8
Original file line numberDiff line numberDiff line change
@@ -617,16 +617,28 @@ - (NSString *)runCommand:(NSString *)commandToRun
617617
}
618618

619619
- (NSNumber *)speedForInterfaceName:(NSString*)bsdInterface{
620-
NSDictionary* airportDict=[self sysconfigValueForKey:[NSString stringWithFormat:@"Setup:/Network/Interface/%@/AirPort",bsdInterface]];
621-
if(airportDict){
622-
return [self speedForAirport];
620+
{
621+
NSDictionary* airportDict=[self sysconfigValueForKey:[NSString stringWithFormat:@"Setup:/Network/Interface/%@/AirPort",bsdInterface]];
622+
if(airportDict){
623+
NSNumber* x = [self speedForAirport];
624+
if(x){
625+
return x;
626+
}
627+
}
623628
}
624-
625-
NSNumber*x=[self speedForInterfaceNameViaIOKit:bsdInterface];
626-
if(!x){
627-
x=[self speedForInterfaceNameViaIfConfig:bsdInterface];
629+
{
630+
NSNumber* x=[self speedForInterfaceNameViaIOKit:bsdInterface];
631+
if(x){
632+
return x;
633+
}
634+
}
635+
{
636+
NSNumber* x=[self speedForInterfaceNameViaIfConfig:bsdInterface];
637+
if(x){
638+
return x;
639+
}
628640
}
629-
return x;
641+
return [NSNumber numberWithLong:kInterfaceDefaultSpeed];
630642
}
631643
- (NSNumber*)speedForAirport
632644
{

0 commit comments

Comments
 (0)