mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-23 04:34:27 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f50dde6a50 | ||
|
|
efe2a7db68 | ||
|
|
bd365be8b2 |
No files matched your search
@@ -49,7 +49,6 @@
|
||||
- (void)installWithToolAndRelaunch:(BOOL)relaunch;
|
||||
- (void)installerForHost:(SUHost *)host failedWithError:(NSError *)error;
|
||||
|
||||
- (void)installWithToolAndRelaunch:(BOOL)relaunch;
|
||||
- (void)cleanUpDownload;
|
||||
|
||||
- (void)abortUpdate;
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
|
||||
- (BOOL)updateInProgress;
|
||||
|
||||
-(void) checkForUpdatesInBgReachabilityCheckWithDriver: (SUUpdateDriver*)inDriver;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
+6
-5
@@ -239,7 +239,7 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault
|
||||
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
SCNetworkConnectionFlags flags = 0;
|
||||
BOOL isNetworkReachable = YES;
|
||||
BOOL isNetworkReachable = NO;
|
||||
|
||||
// Don't perform automatic checks on unconnected laptops or dial-up connections that aren't online:
|
||||
NSMutableDictionary* theDict = [NSMutableDictionary dictionary];
|
||||
@@ -250,20 +250,21 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault
|
||||
Boolean reachabilityResult = NO;
|
||||
// If the feed's using a file:// URL, we won't be able to use reachability.
|
||||
if (reachability != NULL) {
|
||||
reachabilityResult = YES;
|
||||
SCNetworkReachabilityGetFlags(reachability, &flags);
|
||||
CFRelease(reachability);
|
||||
}
|
||||
|
||||
if( reachabilityResult )
|
||||
{
|
||||
BOOL needsConnection = ((flags & kSCNetworkFlagsConnectionRequired) != 0);
|
||||
BOOL reachable = (flags & kSCNetworkFlagsReachable) == kSCNetworkFlagsReachable;
|
||||
BOOL automatic = (flags & kSCNetworkFlagsConnectionAutomatic) == kSCNetworkFlagsConnectionAutomatic;
|
||||
BOOL local = (flags & kSCNetworkFlagsIsLocalAddress) == kSCNetworkFlagsIsLocalAddress;
|
||||
|
||||
//NSLog(@"reachable = %s, automatic = %s, local = %s", (reachable?"YES":"NO"), (automatic?"YES":"NO"), (local?"YES":"NO"));
|
||||
// NSLog(@"reachable = %s, needsConnection = %s, local = %s", (reachable?"YES":"NO"), (needsConnection?"YES":"NO"), (local?"YES":"NO"));
|
||||
|
||||
if( !(reachable || automatic || local) )
|
||||
isNetworkReachable = NO;
|
||||
if (local || (reachable && !needsConnection))
|
||||
isNetworkReachable = YES;
|
||||
}
|
||||
|
||||
// If the network's not reachable, we pass a nil driver into checkForUpdatesWithDriver, which will then reschedule the next update so we try again later.
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
// Copyright 2009 Elgato Systems GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#ifndef SUVERSIONDISPLAYPROTOCOL_H
|
||||
#define SUVERSIONDISPLAYPROTOCOL_H
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
/*!
|
||||
@protocol
|
||||
@@ -25,3 +27,5 @@
|
||||
-(void) formatVersion: (NSString**)inOutVersionA andVersion: (NSString**)inOutVersionB;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user