(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
|
||||
for (i = 0; i < (heartbeatInterval/internalInterval); i++)
|
||||
{
|
||||
if (shouldTerminate)
|
||||
if ([self easShouldTerminate])
|
||||
break;
|
||||
|
||||
s = [NSMutableString string];
|
||||
|
@ -1910,7 +1910,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
{
|
||||
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
|
||||
// has just arrived.
|
||||
|
|
|
@ -38,7 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
@class NSURL;
|
||||
@class NSNumber;
|
||||
|
||||
static volatile BOOL shouldTerminate = NO;
|
||||
static volatile BOOL easShouldTerminate = NO;
|
||||
|
||||
@interface SOGoActiveSyncDispatcher : NSObject
|
||||
{
|
||||
|
@ -64,5 +64,6 @@ static volatile BOOL shouldTerminate = NO;
|
|||
|
||||
- (NSURL *) folderTableURL;
|
||||
- (void) ensureFolderTableExists;
|
||||
- (BOOL) easShouldTerminate;
|
||||
|
||||
@end
|
||||
|
|
|
@ -126,7 +126,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
void handle_eas_terminate(int signum)
|
||||
{
|
||||
NSLog(@"Forcing termination of EAS loop.");
|
||||
shouldTerminate = YES;
|
||||
easShouldTerminate = YES;
|
||||
[[WOCoreApplication application] terminateAfterTimeInterval: 1];
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ void handle_eas_terminate(int signum)
|
|||
imapFolderGUIDS = nil;
|
||||
syncRequest = nil;
|
||||
|
||||
shouldTerminate = NO;
|
||||
easShouldTerminate = NO;
|
||||
signal(SIGTERM, handle_eas_terminate);
|
||||
|
||||
return self;
|
||||
|
@ -2141,7 +2141,7 @@ void handle_eas_terminate(int signum)
|
|||
// We enter our loop detection change
|
||||
for (i = 0; i < (heartbeatInterval/internalInterval); i++)
|
||||
{
|
||||
if (shouldTerminate)
|
||||
if (easShouldTerminate)
|
||||
break;
|
||||
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
|
@ -2181,7 +2181,7 @@ void handle_eas_terminate(int signum)
|
|||
{
|
||||
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
|
||||
// has just arrived.
|
||||
|
@ -3457,4 +3457,9 @@ void handle_eas_terminate(int signum)
|
|||
[cm releaseChannel: channel];
|
||||
}
|
||||
|
||||
- (BOOL) easShouldTerminate
|
||||
{
|
||||
return easShouldTerminate;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue