Permalink
Browse files

Add gitignore

  • Loading branch information...
1 parent a320494 commit 82b690d1e8a92988d37c947ebb24af71b2973e58 @GreySyntax GreySyntax committed Mar 22, 2011
Showing with 8 additions and 9 deletions.
  1. +2 −0 .gitignore
  2. +6 −9 mGrab.m
View
@@ -0,0 +1,2 @@
+/*.o
+/.DS_Store
View
15 mGrab.m
@@ -155,18 +155,15 @@ - (NSString*)md5:(NSString*)chunk
- (BOOL)network
{
- - (BOOL)checkNetwork {
+ const char *host = "tinygrab.com";
+ SCNetworkReachabilityRef reach = SCNetworkReachabilityCreateWithName(NULL, host);
- const char *host = "tinygrab.com";
- SCNetworkReachabilityRef reach = SCNetworkReachabilityCreateWithName(NULL, host);
+ SCNetworkReachabilityFlags flag;
- SCNetworkReachabilityFlags flag;
+ Boolean conn = SCNetworkReachabilityGetFlags(reach, &flag);
- Boolean conn = SCNetworkReachabilityGetFlags(reach, &flag);
-
- //Can we reach tinygrab.com?
- return (conn && (flag & kSCNetworkFlagsReachable) && !(flag & kSCNetworkFlagsConnectionRequired));
- }
+ //Can we reach tinygrab.com?
+ return (conn && (flag & kSCNetworkFlagsReachable) && !(flag & kSCNetworkFlagsConnectionRequired));
}
#pragma mark -
@end

0 comments on commit 82b690d

Please sign in to comment.