<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,5 @@
 &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
-&lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
+&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
 &lt;plist version=&quot;1.0&quot;&gt;
 &lt;dict&gt;
 	&lt;key&gt;CFBundleDevelopmentRegion&lt;/key&gt;
@@ -24,7 +24,7 @@
 	&lt;string&gt;MainMenu&lt;/string&gt;
 	&lt;key&gt;NSPrincipalClass&lt;/key&gt;
 	&lt;string&gt;NSApplication&lt;/string&gt;
-    &lt;key&gt;JRFeedbackURL&lt;/key&gt;
-    &lt;string&gt;http://localhost/~wolf/jrfeedback.php&lt;/string&gt;
+	&lt;key&gt;JRFeedbackURL&lt;/key&gt;
+	&lt;string&gt;http://localhost/~wolf/jrfeedback.php&lt;/string&gt;
 &lt;/dict&gt;
 &lt;/plist&gt;</diff>
      <filename>demo/Info.plist</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@
 		795A7F92099D0E3600450061 /* AppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 795A7F91099D0E3600450061 /* AppController.m */; };
 		796F33960DAE7686005201F5 /* JRFeedbackController.m in Sources */ = {isa = PBXBuildFile; fileRef = 796F33950DAE7686005201F5 /* JRFeedbackController.m */; };
 		797DF7F10DCA61E0006A6500 /* JRFeedbackProvider.xib in Resources */ = {isa = PBXBuildFile; fileRef = 797DF7F00DCA61E0006A6500 /* JRFeedbackProvider.xib */; };
+		79E889440FAE38A100EFE883 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79E889430FAE38A100EFE883 /* SystemConfiguration.framework */; };
 		8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
 		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
 		8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
@@ -35,6 +36,7 @@
 		796F33940DAE7686005201F5 /* JRFeedbackController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JRFeedbackController.h; path = ../lib/JRFeedbackController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		796F33950DAE7686005201F5 /* JRFeedbackController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JRFeedbackController.m; path = ../lib/JRFeedbackController.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		797DF7F00DCA61E0006A6500 /* JRFeedbackProvider.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = JRFeedbackProvider.xib; path = ../lib/JRFeedbackProvider.xib; sourceTree = &quot;&lt;group&gt;&quot;; };
+		79E889430FAE38A100EFE883 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = &quot;&lt;absolute&gt;&quot;; };
 		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = &quot;&lt;group&gt;&quot;; };
 		8D1107320486CEB800E47090 /* JRFeedbackProvider.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JRFeedbackProvider.app; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
@@ -46,6 +48,7 @@
 			files = (
 				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
 				793C54BF0DC1281400E810BB /* AddressBook.framework in Frameworks */,
+				79E889440FAE38A100EFE883 /* SystemConfiguration.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -68,6 +71,7 @@
 		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
 			isa = PBXGroup;
 			children = (
+				79E889430FAE38A100EFE883 /* SystemConfiguration.framework */,
 				793C54BE0DC1281400E810BB /* AddressBook.framework */,
 				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
 			);</diff>
      <filename>demo/JRFeedbackProvider.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -8,8 +8,7 @@
 #import &quot;JRFeedbackController.h&quot;
 #import &lt;AddressBook/AddressBook.h&gt;
 #import &quot;NSURLRequest+postForm.h&quot;
-
-// TODO Sys Config network presensce
+#import &lt;SystemConfiguration/SCNetwork.h&gt;
 
 JRFeedbackController *gFeedbackController = nil;
 
@@ -19,22 +18,49 @@ NSString *JRFeedbackType[JRFeedbackController_SectionCount] = {
     @&quot;SUPPORT&quot; // JRFeedbackController_SupportRequest
 };
 
+@interface JRFeedbackController ()
++ (NSURL*)postURL;
+@end
+
 @implementation JRFeedbackController
 
 + (void)showFeedback {
-    if (!gFeedbackController) {
-        gFeedbackController = [[JRFeedbackController alloc] init];
-    }
-    [gFeedbackController showWindow:self];
+    [self showFeedbackWithBugDetails:nil];
 }
 
+#define kMyIgnorableSCNetworkFlags  (kSCNetworkFlagsReachable|kSCNetworkFlagsIsLocalAddress|kSCNetworkFlagsIsDirect)
+
 + (void)showFeedbackWithBugDetails:(NSString *)details {
-    if (!gFeedbackController) {
-        gFeedbackController = [[JRFeedbackController alloc] init];
+    SCNetworkConnectionFlags reachabilityFlags;
+    Boolean reachabilityResult = SCNetworkCheckReachabilityByName([[[JRFeedbackController postURL] host] UTF8String], &amp;reachabilityFlags);
+    
+    //NSLog(@&quot;reachabilityFlags: %lx&quot;, reachabilityFlags);
+    reachabilityFlags &amp;= ~kMyIgnorableSCNetworkFlags;
+    //NSLog(@&quot;reachabilityFlags masked: %lx&quot;, reachabilityFlags);
+    BOOL showFeedbackWindow = reachabilityResult &amp;&amp; (reachabilityFlags == 0L);
+    
+    if (!showFeedbackWindow) {
+        int alertResult = [[NSAlert alertWithMessageText:@&quot;Feedback Host Not Reachable&quot;
+                                           defaultButton:@&quot;Proceed Anyway&quot;
+                                         alternateButton:@&quot;Cancel&quot;
+                                             otherButton:nil
+                               informativeTextWithFormat:@&quot;You may not be able to send feedback because %@ isn't reachable.\n\nPlease ensure you have a network connection before proceeding.\n&quot;, [[JRFeedbackController postURL] host]] runModal];
+        if (NSAlertDefaultReturn == alertResult) {
+            showFeedbackWindow = YES;
+        }
+    }
+    
+    if (showFeedbackWindow) {
+        if (!gFeedbackController) {
+            gFeedbackController = [[JRFeedbackController alloc] init];
+        }
+        [gFeedbackController showWindow:self];
+        
+        // There is an assumption here that bug report is the first and default view of the window.
+        if (details) {
+            [gFeedbackController setTextViewStringTo:details];
+        }
     }
-    [gFeedbackController showWindow:self];
-    // There is an assumption here that bug report is the first and default view of the window.
-    [gFeedbackController setTextViewStringTo:details];
 }
 
 - (id)init {
@@ -146,10 +172,6 @@ NSString *JRFeedbackType[JRFeedbackController_SectionCount] = {
 }
 
 - (void)postFeedback:(NSString*)systemProfile {
-    NSString *postURL = [[[NSBundle bundleForClass:[self class]] infoDictionary] objectForKey:@&quot;JRFeedbackURL&quot;];
-    if ([[NSUserDefaults standardUserDefaults] stringForKey:@&quot;JRFeedbackURL&quot;]) {
-        postURL = [[NSUserDefaults standardUserDefaults] stringForKey:@&quot;JRFeedbackURL&quot;];
-    }
     
     NSMutableDictionary *form = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                  JRFeedbackType[currentSection], @&quot;feedbackType&quot;,
@@ -170,7 +192,7 @@ NSString *JRFeedbackType[JRFeedbackController_SectionCount] = {
         }
     }
     
-    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:postURL] postForm:form];
+    NSURLRequest *request = [NSURLRequest requestWithURL:[JRFeedbackController postURL] postForm:form];
     [NSURLConnection connectionWithRequest:request delegate:self];
 }
 
@@ -208,9 +230,13 @@ NSString *JRFeedbackType[JRFeedbackController_SectionCount] = {
     [textView setString:details];
 }
 
-@end
++ (NSURL*)postURL {
+    NSString *postURLString = [[[NSBundle bundleForClass:[self class]] infoDictionary] objectForKey:@&quot;JRFeedbackURL&quot;];
+    if ([[NSUserDefaults standardUserDefaults] stringForKey:@&quot;JRFeedbackURL&quot;]) {
+        postURLString = [[NSUserDefaults standardUserDefaults] stringForKey:@&quot;JRFeedbackURL&quot;];
+    }
+    NSAssert(postURLString, @&quot;JRFeedbackURL not defined&quot;);
+    return [NSURL URLWithString:postURLString];
+}
 
-#if 0
-#import &lt;SystemConfiguration/SCNetwork.h&gt;
-SCNetworkCheckReachabilityByName
-#endif
\ No newline at end of file
+@end</diff>
      <filename>lib/JRFeedbackController.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f2146b0fba06c2c9d04c4de29bf5197f85b20e97</id>
    </parent>
  </parents>
  <author>
    <name>rentzsch</name>
    <email>jwr.git@redshed.net</email>
  </author>
  <url>http://github.com/rentzsch/jrfeedbackprovider/commit/be2d30aa06ed4cb99bbe73d1fda866d5a7c565b6</url>
  <id>be2d30aa06ed4cb99bbe73d1fda866d5a7c565b6</id>
  <committed-date>2009-05-03T16:13:17-07:00</committed-date>
  <authored-date>2009-05-03T16:13:17-07:00</authored-date>
  <message>[NEW] Use SystemConfiguration.framework to ensure feedback host reachablity before presenting panel.</message>
  <tree>0a9bd3f22947c7126151cd39d80a988a505d5036</tree>
  <committer>
    <name>rentzsch</name>
    <email>jwr.git@redshed.net</email>
  </committer>
</commit>
