Skip to content

Commit

Permalink
MD-74
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/osirix/code/osirix@10853 4e9e6e3d-4551-47eb-9dbe-a6127f9400a1
  • Loading branch information
rossetantoine committed Jan 22, 2013
1 parent e555a46 commit 4d46446
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
23 changes: 22 additions & 1 deletion QueryController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,27 @@ + (BOOL) echoServer:(NSDictionary*)serverParameters

[theTask setArguments:args];
[theTask launch];

WaitRendering *wait = nil;

if( [NSThread isMainThread])
wait = [[[WaitRendering alloc] init: [NSString stringWithFormat: NSLocalizedString( @"DICOM Echo %@...", nil), [serverParameters objectForKey: @"Description"]]] autorelease];

[wait setCancel: YES];
[wait showWindow:self];
[wait start];

while( [theTask isRunning])
{
[NSThread sleepForTimeInterval: 0.1];


[wait run];
if( [wait aborted])
break;
}

[wait end];

if([[serverParameters objectForKey:@"TLSEnabled"] boolValue])
{
//[DDKeychain unlockTmpFiles];
Expand All @@ -622,6 +640,9 @@ + (BOOL) echoServer:(NSDictionary*)serverParameters
[[NSFileManager defaultManager] removeFileAtPath:[NSString stringWithFormat:@"%@%@", TLS_TRUSTED_CERTIFICATES_DIR, uniqueStringID] handler:nil];
}

if( [wait aborted])
return NO;

if( [theTask terminationStatus] == 0) return YES;
else return NO;
}
Expand Down
1 change: 1 addition & 0 deletions ThreadModalForWindowController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ -(ThreadModalForWindowController*)modalForWindowController {
{
return [self.threadDictionary objectForKey:NSThreadModalForWindowControllerKey];
}
return nil;
}

@end
Expand Down

0 comments on commit 4d46446

Please sign in to comment.