Marino Faggiana hace 6 años
padre
commit
6505aed9e8
Se han modificado 2 ficheros con 1 adiciones y 33 borrados
  1. 0 32
      iOSClient/AppDelegate.m
  2. 1 1
      iOSClient/Networking/CCNetworking.m

+ 0 - 32
iOSClient/AppDelegate.m

@@ -272,9 +272,6 @@
     if (self.activeAccount.length == 0 || self.maintenanceMode)
         return;
     
-    // verify Upload
-//    [self verifyUploadInErrorOrWait];
-    
     // middelware ping
     if ([[NCBrandOptions sharedInstance] use_middlewarePing]) {
         NSLog(@"[LOG] Middleware Ping");
@@ -1224,9 +1221,6 @@
 {
     NSLog(@"[LOG] Start perform Fetch With Completion Handler");
     
-    // verify Upload
-    [self verifyUploadInErrorOrWait];
-    
     // Verify new photo
     [[NCAutoUpload sharedInstance] initStateAutoUpload];
     
@@ -1506,32 +1500,6 @@
     _timerProcessAutoDownloadUpload = [NSTimer scheduledTimerWithTimeInterval:k_timerProcessAutoDownloadUpload target:self selector:@selector(processAutoDownloadUpload) userInfo:nil repeats:YES];
 }
 
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark ===== Process Verify =====
-#pragma --------------------------------------------------------------------------------------------
-
-- (void)verifyUploadInErrorOrWait
-{
-    // Test Maintenance
-    if (self.maintenanceMode || self.activeAccount.length == 0)
-        return;
-    
-    NSMutableSet *directoryIDs = [NSMutableSet new];
-    
-    NSArray *metadatas = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND session CONTAINS 'upload' AND (sessionTaskIdentifier = %i OR sessionTaskIdentifier = %i)", _activeAccount, k_taskIdentifierError, k_taskIdentifierWaitStart] sorted:nil ascending:NO];
-    
-    NSLog(@"[LOG] Verify re upload in error n. %lu", (unsigned long)[metadatas count]);
-    
-    for (tableMetadata *metadata in metadatas) {
-        
-//        [[CCNetworking sharedNetworking] uploadFileMetadata:metadata taskStatus: k_taskStatusResume delegate:nil];
-        
-        [directoryIDs addObject:metadata.directoryID];
-        
-        NSLog(@"[LOG] Re upload file : %@", metadata.fileName);
-    }
-}
-
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Open CCUploadFromOtherUpp  =====
 #pragma --------------------------------------------------------------------------------------------

+ 1 - 1
iOSClient/Networking/CCNetworking.m

@@ -1103,7 +1103,7 @@
         // Mark error only if not Cancelled Task
         if (errorCode != kCFURLErrorCancelled)  {
 
-            [[NCManageDatabase sharedInstance] setMetadataSession:nil sessionError:[CCError manageErrorKCF:errorCode withNumberError:NO] sessionSelector:nil sessionSelectorPost:nil sessionTaskIdentifier:k_taskIdentifierError status:k_metadataStatusNULL predicate:[NSPredicate predicateWithFormat:@"fileID = %@ AND account = %@", tempFileID, _activeAccount]];
+            [[NCManageDatabase sharedInstance] setMetadataSession:nil sessionError:[CCError manageErrorKCF:errorCode withNumberError:NO] sessionSelector:nil sessionSelectorPost:nil sessionTaskIdentifier:k_taskIdentifierError status:k_metadataStatusWaitUpload predicate:[NSPredicate predicateWithFormat:@"fileID = %@ AND account = %@", tempFileID, _activeAccount]];
         }
         
         errorMessage = [CCError manageErrorKCF:errorCode withNumberError:YES];