summaryrefslogtreecommitdiff
path: root/cpp/test/ios/controller
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2017-06-30 11:04:32 -0400
committerBernard Normier <bernard@zeroc.com>2017-06-30 11:04:32 -0400
commit0c6bfc1ce065895f8131f86c6c0f4c5ffd98cb05 (patch)
treedac2320427d701f9cb20733c1db4a047daef8b26 /cpp/test/ios/controller
parentFixed documentation files to use 80 columns (diff)
downloadice-0c6bfc1ce065895f8131f86c6c0f4c5ffd98cb05.tar.bz2
ice-0c6bfc1ce065895f8131f86c6c0f4c5ffd98cb05.tar.xz
ice-0c6bfc1ce065895f8131f86c6c0f4c5ffd98cb05.zip
Another fix for the loading of bundles
Diffstat (limited to 'cpp/test/ios/controller')
-rw-r--r--cpp/test/ios/controller/Bundle/ControllerI.mm10
1 files changed, 6 insertions, 4 deletions
diff --git a/cpp/test/ios/controller/Bundle/ControllerI.mm b/cpp/test/ios/controller/Bundle/ControllerI.mm
index 5c0dc77e7c9..f7742af4a1e 100644
--- a/cpp/test/ios/controller/Bundle/ControllerI.mm
+++ b/cpp/test/ios/controller/Bundle/ControllerI.mm
@@ -129,6 +129,7 @@ MainHelperI::~MainHelperI()
if(_handle)
{
CFBundleUnloadExecutable(_handle);
+ CFRelease(_handle);
}
}
@@ -194,13 +195,14 @@ MainHelperI::run()
}
//
- // The first CFBundleGetFunction... does not always succeed, so we make up to 3 attempts
+ // The first CFBundleGetFunction... does not always succeed, so we make up to 5 attempts
//
void* sym = 0;
int attempts = 0;
- while((sym = CFBundleGetFunctionPointerForName(_handle, CFSTR("dllTestShutdown"))) == 0 && attempts < 3)
+ while((sym = CFBundleGetFunctionPointerForName(_handle, CFSTR("dllTestShutdown"))) == 0 && attempts < 5)
{
attempts++;
+ [NSThread sleepForTimeInterval:0.2];
}
if(sym == 0)
@@ -212,9 +214,9 @@ MainHelperI::run()
return;
}
/*
- else
+ else if(attempts > 0)
{
- print([[NSString stringWithFormat:@"*** found dllTestShutdown after %d failed attempt(s)", attempts] UTF8String]);
+ print([[NSString stringWithFormat:@"************ found dllTestShutdown after %d failed attempt(s)", attempts] UTF8String]);
}
*/