Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions VNCController.m
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,17 @@ - (void) dedicatedUpdateHostInfoThread {
[ipString replaceCharactersInRange:NSMakeRange(ipString.length,0) withString:@"\tInternal"];
}

if (controller && !limitToLocalConnections.state) { // Colorize and add tooltip

__block BOOL isLimitToLocalConnectionsEnabled;
__block int runningPortNum;
dispatch_sync(dispatch_get_main_queue(), ^{
isLimitToLocalConnectionsEnabled = limitToLocalConnections.state;
runningPortNum = self.runningPortNum;
});

if (controller && !isLimitToLocalConnectionsEnabled) { // Colorize and add tooltip

NSURL *testURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@:%d",
anIP, self.runningPortNum]];
anIP, runningPortNum]];
NSData *testData = [NSData dataWithContentsOfURL:testURL];
NSString *testString = (testData.length
? [NSString stringWithUTF8String: testData.bytes] : @"");
Expand Down