|
|
|
@ -185,7 +185,8 @@ class SyncEngine {
|
|
|
|
|
this(ApplicationConfig appConfig, ItemDatabase itemDB, ClientSideFiltering selectiveSync) {
|
|
|
|
|
|
|
|
|
|
// Create the specific task pool to process items in parallel
|
|
|
|
|
this.processPool = taskPool();
|
|
|
|
|
this.processPool = new TaskPool(to!int(appConfig.getValueLong("threads")));
|
|
|
|
|
addLogEntry("PROCESS POOL WORKER THREADS: " ~ to!string(processPool.size), ["debug"]);
|
|
|
|
|
|
|
|
|
|
// Configure the class varaible to consume the application configuration
|
|
|
|
|
this.appConfig = appConfig;
|
|
|
|
@ -484,8 +485,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
getDefaultDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(getDefaultDriveApiInstance);
|
|
|
|
|
//getDefaultDriveApiInstance = null;
|
|
|
|
|
object.destroy(getDefaultDriveApiInstance);
|
|
|
|
|
getDefaultDriveApiInstance = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Get Default Root Details for this Account
|
|
|
|
@ -533,8 +534,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
getDefaultRootApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(getDefaultRootApiInstance);
|
|
|
|
|
//getDefaultRootApiInstance = null;
|
|
|
|
|
object.destroy(getDefaultRootApiInstance);
|
|
|
|
|
getDefaultRootApiInstance = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Reset syncFailures to false based on file activity
|
|
|
|
@ -946,8 +947,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
getDeltaQueryOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(getDeltaQueryOneDriveApiInstance);
|
|
|
|
|
//getDeltaQueryOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(getDeltaQueryOneDriveApiInstance);
|
|
|
|
|
getDeltaQueryOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// Log that we have finished querying the /delta API
|
|
|
|
|
if (appConfig.verbosityCount == 0) {
|
|
|
|
@ -2250,8 +2251,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
downloadFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(downloadFileOneDriveApiInstance);
|
|
|
|
|
//downloadFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(downloadFileOneDriveApiInstance);
|
|
|
|
|
downloadFileOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
} catch (OneDriveException exception) {
|
|
|
|
|
addLogEntry("downloadFileOneDriveApiInstance.downloadById(downloadDriveId, downloadItemId, newItemPath, jsonFileSize); generated a OneDriveException", ["debug"]);
|
|
|
|
@ -2731,8 +2732,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
uploadLastModifiedTimeApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(uploadLastModifiedTimeApiInstance);
|
|
|
|
|
//uploadLastModifiedTimeApiInstance = null;
|
|
|
|
|
object.destroy(uploadLastModifiedTimeApiInstance);
|
|
|
|
|
uploadLastModifiedTimeApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// Do we actually save the response?
|
|
|
|
|
// Special case here .. if the DB record item (originItem) is a remote object, thus, if we save the 'response' we will have a DB FOREIGN KEY constraint failed problem
|
|
|
|
@ -2767,8 +2768,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
uploadLastModifiedTimeApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(uploadLastModifiedTimeApiInstance);
|
|
|
|
|
//uploadLastModifiedTimeApiInstance = null;
|
|
|
|
|
object.destroy(uploadLastModifiedTimeApiInstance);
|
|
|
|
|
uploadLastModifiedTimeApiInstance = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3994,8 +3995,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
uploadFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
//uploadFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
uploadFileOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// Return JSON
|
|
|
|
|
return uploadResponse;
|
|
|
|
@ -4027,8 +4028,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
getCurrentDriveQuotaApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(getCurrentDriveQuotaApiInstance);
|
|
|
|
|
//getCurrentDriveQuotaApiInstance = null;
|
|
|
|
|
object.destroy(getCurrentDriveQuotaApiInstance);
|
|
|
|
|
getCurrentDriveQuotaApiInstance = null;
|
|
|
|
|
|
|
|
|
|
} catch (OneDriveException e) {
|
|
|
|
|
addLogEntry("currentDriveQuota = onedrive.getDriveQuota(driveId) generated a OneDriveException", ["debug"]);
|
|
|
|
@ -4784,8 +4785,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
createDirectoryOnlineOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(createDirectoryOnlineOneDriveApiInstance);
|
|
|
|
|
//createDirectoryOnlineOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(createDirectoryOnlineOneDriveApiInstance);
|
|
|
|
|
createDirectoryOnlineOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
@ -4810,8 +4811,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
createDirectoryOnlineOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(createDirectoryOnlineOneDriveApiInstance);
|
|
|
|
|
//createDirectoryOnlineOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(createDirectoryOnlineOneDriveApiInstance);
|
|
|
|
|
createDirectoryOnlineOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
@ -4826,8 +4827,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
createDirectoryOnlineOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(createDirectoryOnlineOneDriveApiInstance);
|
|
|
|
|
//createDirectoryOnlineOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(createDirectoryOnlineOneDriveApiInstance);
|
|
|
|
|
createDirectoryOnlineOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -4838,8 +4839,8 @@ class SyncEngine {
|
|
|
|
|
addLogEntry("Skipping: " ~ buildNormalizedPath(absolutePath(thisNewPathToCreate)));
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
createDirectoryOnlineOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(createDirectoryOnlineOneDriveApiInstance);
|
|
|
|
|
//createDirectoryOnlineOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(createDirectoryOnlineOneDriveApiInstance);
|
|
|
|
|
createDirectoryOnlineOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -5061,8 +5062,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
checkFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
//checkFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
checkFileOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// Portable Operating System Interface (POSIX) testing of JSON response from OneDrive API
|
|
|
|
|
if (hasName(fileDetailsFromOneDrive)) {
|
|
|
|
@ -5127,8 +5128,8 @@ class SyncEngine {
|
|
|
|
|
} catch (OneDriveException exception) {
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
checkFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
//checkFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
checkFileOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// If we get a 404 .. the file is not online .. this is what we want .. file does not exist online
|
|
|
|
|
if (exception.httpStatusCode == 404) {
|
|
|
|
@ -5146,8 +5147,8 @@ class SyncEngine {
|
|
|
|
|
} catch (posixException e) {
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
checkFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
//checkFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
checkFileOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// Display POSIX error message
|
|
|
|
|
displayPosixErrorMessage(e.msg);
|
|
|
|
@ -5155,8 +5156,8 @@ class SyncEngine {
|
|
|
|
|
} catch (jsonResponseException e) {
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
checkFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
//checkFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
checkFileOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// Display JSON error message
|
|
|
|
|
addLogEntry(e.msg, ["debug"]);
|
|
|
|
@ -5245,8 +5246,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
uploadFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
//uploadFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
uploadFileOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
} catch (OneDriveException exception) {
|
|
|
|
|
// An error was responded with - what was it
|
|
|
|
@ -5260,8 +5261,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
uploadFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
//uploadFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
uploadFileOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
} catch (FileException e) {
|
|
|
|
|
// display the error message
|
|
|
|
@ -5270,8 +5271,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
uploadFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
//uploadFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
uploadFileOneDriveApiInstance = null;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// Initialise API for session upload
|
|
|
|
@ -5362,8 +5363,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
uploadFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
//uploadFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
uploadFileOneDriveApiInstance = null;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// We are in a --dry-run scenario
|
|
|
|
@ -5689,8 +5690,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
uploadDeletedItemOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(uploadDeletedItemOneDriveApiInstance);
|
|
|
|
|
//uploadDeletedItemOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(uploadDeletedItemOneDriveApiInstance);
|
|
|
|
|
uploadDeletedItemOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
} catch (OneDriveException e) {
|
|
|
|
|
if (e.httpStatusCode == 404) {
|
|
|
|
@ -5700,8 +5701,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
uploadDeletedItemOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(uploadDeletedItemOneDriveApiInstance);
|
|
|
|
|
//uploadDeletedItemOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(uploadDeletedItemOneDriveApiInstance);
|
|
|
|
|
uploadDeletedItemOneDriveApiInstance = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Delete the reference in the local database
|
|
|
|
@ -5763,8 +5764,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
performReverseDeletionOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(performReverseDeletionOneDriveApiInstance);
|
|
|
|
|
//performReverseDeletionOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(performReverseDeletionOneDriveApiInstance);
|
|
|
|
|
performReverseDeletionOneDriveApiInstance = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Create a fake OneDrive response suitable for use with saveItem
|
|
|
|
@ -6097,8 +6098,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
generateDeltaResponseOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(generateDeltaResponseOneDriveApiInstance);
|
|
|
|
|
//generateDeltaResponseOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(generateDeltaResponseOneDriveApiInstance);
|
|
|
|
|
generateDeltaResponseOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// Must force exit here, allow logging to be done
|
|
|
|
|
forceExit();
|
|
|
|
@ -6267,8 +6268,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
generateDeltaResponseOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(generateDeltaResponseOneDriveApiInstance);
|
|
|
|
|
//generateDeltaResponseOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(generateDeltaResponseOneDriveApiInstance);
|
|
|
|
|
generateDeltaResponseOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// Return the generated JSON response
|
|
|
|
|
return selfGeneratedDeltaResponse;
|
|
|
|
@ -6361,8 +6362,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
queryChildrenOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(queryChildrenOneDriveApiInstance);
|
|
|
|
|
//queryChildrenOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(queryChildrenOneDriveApiInstance);
|
|
|
|
|
queryChildrenOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// return response
|
|
|
|
|
return thisLevelChildrenData;
|
|
|
|
@ -6627,8 +6628,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
queryOneDriveForSpecificPath.releaseCurlEngine();
|
|
|
|
|
//object.destroy(queryOneDriveForSpecificPath);
|
|
|
|
|
//queryOneDriveForSpecificPath = null;
|
|
|
|
|
object.destroy(queryOneDriveForSpecificPath);
|
|
|
|
|
queryOneDriveForSpecificPath = null;
|
|
|
|
|
|
|
|
|
|
// Output our search results
|
|
|
|
|
addLogEntry("queryOneDriveForSpecificPathAndCreateIfMissing.getPathDetailsAPIResponse = " ~ to!string(getPathDetailsAPIResponse), ["debug"]);
|
|
|
|
@ -6834,8 +6835,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
movePathOnlineApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(movePathOnlineApiInstance);
|
|
|
|
|
//movePathOnlineApiInstance = null;
|
|
|
|
|
object.destroy(movePathOnlineApiInstance);
|
|
|
|
|
movePathOnlineApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// save the move response from OneDrive in the database
|
|
|
|
|
// Is the response a valid JSON object - validation checking done in saveItem
|
|
|
|
@ -6948,8 +6949,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
querySharePointLibraryNameApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
//querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -6968,8 +6969,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
querySharePointLibraryNameApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
//querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -6981,8 +6982,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
querySharePointLibraryNameApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
//querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -7012,8 +7013,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
querySharePointLibraryNameApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
//querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -7040,8 +7041,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
querySharePointLibraryNameApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
//querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -7095,8 +7096,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
querySharePointLibraryNameApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
//querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -7129,8 +7130,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
querySharePointLibraryNameApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
//querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
object.destroy(querySharePointLibraryNameApiInstance);
|
|
|
|
|
querySharePointLibraryNameApiInstance = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Query the sync status of the client and the local system
|
|
|
|
@ -7241,8 +7242,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
getDeltaQueryOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(getDeltaQueryOneDriveApiInstance);
|
|
|
|
|
//getDeltaQueryOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(getDeltaQueryOneDriveApiInstance);
|
|
|
|
|
getDeltaQueryOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// Needed after printing out '....' when fetching changes from OneDrive API
|
|
|
|
|
if (appConfig.verbosityCount == 0)
|
|
|
|
@ -7346,8 +7347,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
queryOneDriveForFileDetailsApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(queryOneDriveForFileDetailsApiInstance);
|
|
|
|
|
//queryOneDriveForFileDetailsApiInstance = null;
|
|
|
|
|
object.destroy(queryOneDriveForFileDetailsApiInstance);
|
|
|
|
|
queryOneDriveForFileDetailsApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -7430,8 +7431,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
queryOneDriveForFileDetailsApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(queryOneDriveForFileDetailsApiInstance);
|
|
|
|
|
//queryOneDriveForFileDetailsApiInstance = null;
|
|
|
|
|
object.destroy(queryOneDriveForFileDetailsApiInstance);
|
|
|
|
|
queryOneDriveForFileDetailsApiInstance = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -7468,15 +7469,15 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
getCurrentDriveQuotaApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(getCurrentDriveQuotaApiInstance);
|
|
|
|
|
//getCurrentDriveQuotaApiInstance = null;
|
|
|
|
|
object.destroy(getCurrentDriveQuotaApiInstance);
|
|
|
|
|
getCurrentDriveQuotaApiInstance = null;
|
|
|
|
|
|
|
|
|
|
} catch (OneDriveException e) {
|
|
|
|
|
addLogEntry("currentDriveQuota = onedrive.getDriveQuota(driveId) generated a OneDriveException", ["debug"]);
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
getCurrentDriveQuotaApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(getCurrentDriveQuotaApiInstance);
|
|
|
|
|
//getCurrentDriveQuotaApiInstance = null;
|
|
|
|
|
object.destroy(getCurrentDriveQuotaApiInstance);
|
|
|
|
|
getCurrentDriveQuotaApiInstance = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// validate that currentDriveQuota is a JSON value
|
|
|
|
@ -7666,8 +7667,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
validateUploadSessionFileDataApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(validateUploadSessionFileDataApiInstance);
|
|
|
|
|
//validateUploadSessionFileDataApiInstance = null;
|
|
|
|
|
object.destroy(validateUploadSessionFileDataApiInstance);
|
|
|
|
|
validateUploadSessionFileDataApiInstance = null;
|
|
|
|
|
|
|
|
|
|
} catch (OneDriveException e) {
|
|
|
|
|
// handle any onedrive error response as invalid
|
|
|
|
@ -7675,8 +7676,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
validateUploadSessionFileDataApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(validateUploadSessionFileDataApiInstance);
|
|
|
|
|
//validateUploadSessionFileDataApiInstance = null;
|
|
|
|
|
object.destroy(validateUploadSessionFileDataApiInstance);
|
|
|
|
|
validateUploadSessionFileDataApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -7741,8 +7742,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
uploadFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
//uploadFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(uploadFileOneDriveApiInstance);
|
|
|
|
|
uploadFileOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// Was the response from the OneDrive API a valid JSON item?
|
|
|
|
|
if (uploadResponse.type() == JSONType.object) {
|
|
|
|
@ -7870,8 +7871,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
checkFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
//checkFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
checkFileOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// Return child
|
|
|
|
|
return child;
|
|
|
|
@ -7889,8 +7890,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
checkFileOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
//checkFileOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(checkFileOneDriveApiInstance);
|
|
|
|
|
checkFileOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
// return an empty JSON item
|
|
|
|
|
return onedriveJSONItem;
|
|
|
|
@ -8019,8 +8020,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
sharedWithMeOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(sharedWithMeOneDriveApiInstance);
|
|
|
|
|
//sharedWithMeOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(sharedWithMeOneDriveApiInstance);
|
|
|
|
|
sharedWithMeOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
} catch (OneDriveException e) {
|
|
|
|
|
// Display error message
|
|
|
|
@ -8028,8 +8029,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
sharedWithMeOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(sharedWithMeOneDriveApiInstance);
|
|
|
|
|
//sharedWithMeOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(sharedWithMeOneDriveApiInstance);
|
|
|
|
|
sharedWithMeOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -8123,8 +8124,8 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
sharedWithMeOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(sharedWithMeOneDriveApiInstance);
|
|
|
|
|
//sharedWithMeOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(sharedWithMeOneDriveApiInstance);
|
|
|
|
|
sharedWithMeOneDriveApiInstance = null;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -8329,7 +8330,7 @@ class SyncEngine {
|
|
|
|
|
|
|
|
|
|
// OneDrive API Instance Cleanup - Shutdown API, free curl object and memory
|
|
|
|
|
sharedWithMeOneDriveApiInstance.releaseCurlEngine();
|
|
|
|
|
//object.destroy(sharedWithMeOneDriveApiInstance);
|
|
|
|
|
//sharedWithMeOneDriveApiInstance = null;
|
|
|
|
|
object.destroy(sharedWithMeOneDriveApiInstance);
|
|
|
|
|
sharedWithMeOneDriveApiInstance = null;
|
|
|
|
|
}
|
|
|
|
|
}
|