diff --git a/Classes/Power.m b/Classes/Power.m index 8a7a8c5..6427ad0 100644 --- a/Classes/Power.m +++ b/Classes/Power.m @@ -56,7 +56,9 @@ static void powerSourceChanged(void * refCon) } - (id)init{ - [super init]; + if (self = [super init]) { + + } return self; } diff --git a/Classes/smcWrapper.m b/Classes/smcWrapper.m index 2d7fd31..5ffa2c6 100755 --- a/Classes/smcWrapper.m +++ b/Classes/smcWrapper.m @@ -24,8 +24,8 @@ #import "smcWrapper.h" #import -//TODO: This is the smcFanControl 2.4 checksum, it needs to be updated for the next release. -NSString * const smc_checksum=@"2ea544babe8a58dccc1364c920d473c8"; +//TODO: This is the smcFanControl 2.5ß checksum, it needs to be updated for the next release. +NSString * const smc_checksum=@"03548c5634bd01315b19c46bf329cceb"; static NSArray *allSensors = nil; @@ -54,6 +54,7 @@ static NSArray *allSensors = nil; c_temp= ((val.bytes[0] * 256 + val.bytes[1]) >> 2)/64; if (c_temp>0) { [[NSUserDefaults standardUserDefaults] setObject:sensor forKey:@"TSensor"]; + [[NSUserDefaults standardUserDefaults] synchronize]; break; } } @@ -168,13 +169,13 @@ static NSArray *allSensors = nil; // The smc binary is given root permissions in FanControl.m with the setRights method. +(void)setKey_external:(NSString *)key value:(NSString *)value{ NSString *launchPath = [[NSBundle mainBundle] pathForResource:@"smc" ofType:@""]; - //first check if it's the right binary (security) + NSString *checksum=[smcWrapper createCheckSum:launchPath]; + //first check if it's the right binary (security) // MW: Disabled smc binary checksum. This should be re-enabled in an official release. - /*NSString *checksum=[smcWrapper createCheckSum:launchPath]; if (![checksum isEqualToString:smc_checksum]) { NSLog(@"smcFanControl: Security Error: smc-binary is not the distributed one"); return; - }*/ + } NSArray *argsArray = [NSArray arrayWithObjects: @"-k",key,@"-w",value,nil]; NSTask *task; task = [[NSTask alloc] init]; diff --git a/Info.plist b/Info.plist index 49a16df..4854fbd 100644 --- a/Info.plist +++ b/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable smcFanControl CFBundleGetInfoString - smcFanControl 2.5, Hendrik Holtmann (GPL) + smcFanControl 2.5ß, Hendrik Holtmann (GPL) CFBundleIconFile smcfancontrol_v2 CFBundleIdentifier @@ -19,11 +19,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.5 + 2.5ß CFBundleSignature ???? CFBundleVersion - 2.5 + 2.5ß LSUIElement 1 NSHumanReadableCopyright diff --git a/smcFanControl.xcodeproj/project.xcworkspace/xcuserdata/hendrikh.xcuserdatad/UserInterfaceState.xcuserstate b/smcFanControl.xcodeproj/project.xcworkspace/xcuserdata/hendrikh.xcuserdatad/UserInterfaceState.xcuserstate index 3d67100..2002a81 100644 Binary files a/smcFanControl.xcodeproj/project.xcworkspace/xcuserdata/hendrikh.xcuserdatad/UserInterfaceState.xcuserstate and b/smcFanControl.xcodeproj/project.xcworkspace/xcuserdata/hendrikh.xcuserdatad/UserInterfaceState.xcuserstate differ