Revision d8426ffb pithos-macos/PithosUtilities.m

b/pithos-macos/PithosUtilities.m
36 36
// or implied, of GRNET S.A.
37 37

  
38 38
#import "PithosUtilities.h"
39
#import "ASINetworkQueue.h"
39 40
#import "ASIPithos.h"
40 41
#import "ASIPithosContainerRequest.h"
41 42
#import "ASIPithosObjectRequest.h"
......
908 909
                                                                                         objectName:objectName];
909 910
    if (sharingAccount)
910 911
        [objectRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
911
    [[PithosUtilities prepareRequest:objectRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
912
    while (![objectRequest isFinished]) {
913
        usleep(1);
914
    }
912
    ASINetworkQueue *networkQueue = [ASINetworkQueue queue];
913
    [networkQueue go];
914
    [networkQueue addOperations:[NSArray arrayWithObject:[PithosUtilities prepareRequest:objectRequest]] waitUntilFinished:YES];
915 915
    *error = [objectRequest error];
916 916
    if (*error) {
917 917
        [self httpRequestErrorAlertWithRequest:objectRequest];
......
975 975
                                                                                                        until:nil];
976 976
        if (sharingAccount)
977 977
            [containerRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
978
        [[PithosUtilities prepareRequest:containerRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
979
        while (![containerRequest isFinished]) {
980
            usleep(1);
981
        }
978
        ASINetworkQueue *networkQueue = [ASINetworkQueue queue];
979
        [networkQueue go];
980
        [networkQueue addOperations:[NSArray arrayWithObject:[PithosUtilities prepareRequest:containerRequest]] waitUntilFinished:YES];
982 981
        if ([containerRequest error]) {
983 982
            [self httpRequestErrorAlertWithRequest:containerRequest];
984 983
            return nil;

Also available in: Unified diff