added some error handling for downloading core files. app will display a message if an error has occurred while downloading and then retry the download after user dismisses the alert.
TODO; replace string literals with constants or static NSString objects.
This commit is contained in:
@@ -364,6 +364,25 @@ static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReach
|
||||
} // reachabilityWithAddress
|
||||
|
||||
|
||||
#define INADDR_GOOGLE_DNS (u_int32_t)0x08080808 /* 8.8.8.8 */
|
||||
|
||||
|
||||
+ (Reachability *) reachabilityForGoogleDNS {
|
||||
|
||||
struct sockaddr_in googleDnsAddress;
|
||||
bzero(&googleDnsAddress, sizeof(googleDnsAddress));
|
||||
googleDnsAddress.sin_len = sizeof(googleDnsAddress);
|
||||
googleDnsAddress.sin_family = AF_INET;
|
||||
googleDnsAddress.sin_addr.s_addr = htonl(INADDR_GOOGLE_DNS);
|
||||
|
||||
Reachability *r = [self reachabilityWithAddress: &googleDnsAddress];
|
||||
|
||||
r.key = kInternetConnection;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
+ (Reachability *) reachabilityForInternetConnection {
|
||||
|
||||
struct sockaddr_in zeroAddress;
|
||||
|
||||
Reference in New Issue
Block a user