(fix) rename the start var to avoid potential SOPE confusion
parent
5d26175d56
commit
aa6a102132
|
@ -1868,7 +1868,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
// We enter our loop detection change
|
// We enter our loop detection change
|
||||||
for (i = 0; i < (heartbeatInterval/internalInterval); i++)
|
for (i = 0; i < (heartbeatInterval/internalInterval); i++)
|
||||||
{
|
{
|
||||||
if (shouldTerminate)
|
if ([self easShouldTerminate])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
s = [NSMutableString string];
|
s = [NSMutableString string];
|
||||||
|
@ -1910,7 +1910,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
{
|
{
|
||||||
total_sleep = 0;
|
total_sleep = 0;
|
||||||
|
|
||||||
while (!shouldTerminate && total_sleep < internalInterval)
|
while (![self easShouldTerminate] && total_sleep < internalInterval)
|
||||||
{
|
{
|
||||||
// We check if we must break the current synchronization since an other Sync
|
// We check if we must break the current synchronization since an other Sync
|
||||||
// has just arrived.
|
// has just arrived.
|
||||||
|
|
|
@ -38,7 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
@class NSURL;
|
@class NSURL;
|
||||||
@class NSNumber;
|
@class NSNumber;
|
||||||
|
|
||||||
static volatile BOOL shouldTerminate = NO;
|
static volatile BOOL easShouldTerminate = NO;
|
||||||
|
|
||||||
@interface SOGoActiveSyncDispatcher : NSObject
|
@interface SOGoActiveSyncDispatcher : NSObject
|
||||||
{
|
{
|
||||||
|
@ -64,5 +64,6 @@ static volatile BOOL shouldTerminate = NO;
|
||||||
|
|
||||||
- (NSURL *) folderTableURL;
|
- (NSURL *) folderTableURL;
|
||||||
- (void) ensureFolderTableExists;
|
- (void) ensureFolderTableExists;
|
||||||
|
- (BOOL) easShouldTerminate;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -126,7 +126,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
void handle_eas_terminate(int signum)
|
void handle_eas_terminate(int signum)
|
||||||
{
|
{
|
||||||
NSLog(@"Forcing termination of EAS loop.");
|
NSLog(@"Forcing termination of EAS loop.");
|
||||||
shouldTerminate = YES;
|
easShouldTerminate = YES;
|
||||||
[[WOCoreApplication application] terminateAfterTimeInterval: 1];
|
[[WOCoreApplication application] terminateAfterTimeInterval: 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ void handle_eas_terminate(int signum)
|
||||||
imapFolderGUIDS = nil;
|
imapFolderGUIDS = nil;
|
||||||
syncRequest = nil;
|
syncRequest = nil;
|
||||||
|
|
||||||
shouldTerminate = NO;
|
easShouldTerminate = NO;
|
||||||
signal(SIGTERM, handle_eas_terminate);
|
signal(SIGTERM, handle_eas_terminate);
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
@ -2141,7 +2141,7 @@ void handle_eas_terminate(int signum)
|
||||||
// We enter our loop detection change
|
// We enter our loop detection change
|
||||||
for (i = 0; i < (heartbeatInterval/internalInterval); i++)
|
for (i = 0; i < (heartbeatInterval/internalInterval); i++)
|
||||||
{
|
{
|
||||||
if (shouldTerminate)
|
if (easShouldTerminate)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
pool = [[NSAutoreleasePool alloc] init];
|
pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
@ -2181,7 +2181,7 @@ void handle_eas_terminate(int signum)
|
||||||
{
|
{
|
||||||
total_sleep = 0;
|
total_sleep = 0;
|
||||||
|
|
||||||
while (!shouldTerminate && total_sleep < internalInterval)
|
while (!easShouldTerminate && total_sleep < internalInterval)
|
||||||
{
|
{
|
||||||
// We check if we must break the current ping request since an other ping request
|
// We check if we must break the current ping request since an other ping request
|
||||||
// has just arrived.
|
// has just arrived.
|
||||||
|
@ -3457,4 +3457,9 @@ void handle_eas_terminate(int signum)
|
||||||
[cm releaseChannel: channel];
|
[cm releaseChannel: channel];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL) easShouldTerminate
|
||||||
|
{
|
||||||
|
return easShouldTerminate;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue