summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6d9d5dc)
For requests that use a URL from the service catalog,
if they return status code 401 or 404 or unknown,
retry after you update the service catalog and the request URL.
Update version.
}
- (void)setPithos:(ASIPithos *)aPithos {
}
- (void)setPithos:(ASIPithos *)aPithos {
+ if (!aPithos) {
+ return;
+ } else if (!pithos) {
pithos = [ASIPithos pithos];
pithos = [ASIPithos pithos];
- pithos.authToken = [aPithos.authToken copy];
- pithos.authUser = [aPithos.authUser copy];
- pithos.ignoreSSLErrors = aPithos.ignoreSSLErrors;
- pithos.tokensURL = [aPithos.tokensURL copy];
- pithos.storageURLPrefix = [aPithos.storageURLPrefix copy];
- pithos.publicURLPrefix = [aPithos.publicURLPrefix copy];
- pithos.userCatalogURL = [aPithos.userCatalogURL copy];
- }
- if (aPithos &&
- (![aPithos.authUser isEqualToString:pithos.authUser] ||
- ![aPithos.authToken isEqualToString:pithos.authToken] ||
- ![aPithos.storageURLPrefix isEqual:pithos.storageURLPrefix])) {
+ } else if (![aPithos.tokensURL isEqualToString:pithos.tokensURL] || ![aPithos.authUser isEqualToString:pithos.authUser]) {
+ // If the authURL or the authUser actually changed, reset daemon and local state.
- if (![aPithos.authUser isEqualToString:pithos.authUser] ||
- ![aPithos.storageURLPrefix isEqual:pithos.storageURLPrefix])
- [self resetLocalStateWithAll:YES];
- pithos.authToken = [aPithos.authToken copy];
- pithos.authUser = [aPithos.authUser copy];
- pithos.ignoreSSLErrors = aPithos.ignoreSSLErrors;
- pithos.tokensURL = [aPithos.tokensURL copy];
- pithos.storageURLPrefix = [aPithos.storageURLPrefix copy];
- pithos.publicURLPrefix = [aPithos.publicURLPrefix copy];
- pithos.userCatalogURL = [aPithos.userCatalogURL copy];
+ [self resetLocalStateWithAll:YES];
+ pithos.authToken = [aPithos.authToken copy];
+ pithos.authUser = [aPithos.authUser copy];
+ pithos.ignoreSSLErrors = aPithos.ignoreSSLErrors;
+ pithos.tokensURL = [aPithos.tokensURL copy];
+ pithos.storageURLPrefix = [aPithos.storageURLPrefix copy];
+ pithos.publicURLPrefix = [aPithos.publicURLPrefix copy];
+ pithos.userCatalogURL = [aPithos.userCatalogURL copy];
// If the server listing fails, the sync should start over, so just retrying is enough
NSUInteger retries = [[containerRequest.userInfo objectForKey:@"retries"] unsignedIntegerValue];
if (retries > 0) {
// If the server listing fails, the sync should start over, so just retrying is enough
NSUInteger retries = [[containerRequest.userInfo objectForKey:@"retries"] unsignedIntegerValue];
if (retries > 0) {
- ASIPithosContainerRequest *newContainerRequest = (ASIPithosContainerRequest *)[PithosUtilities copyRequest:containerRequest];
+ ASIPithosContainerRequest *newContainerRequest = (ASIPithosContainerRequest *)[PithosUtilities retryWithUpdatedURLRequest:containerRequest
+ andPithosAccountManager:pithosAccount];
[(NSMutableDictionary *)(newContainerRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
[networkQueue addOperation:[PithosUtilities prepareRequest:newContainerRequest priority:[[newContainerRequest.userInfo objectForKey:@"priority"] integerValue]]];
} else {
[(NSMutableDictionary *)(newContainerRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
[networkQueue addOperation:[PithosUtilities prepareRequest:newContainerRequest priority:[[newContainerRequest.userInfo objectForKey:@"priority"] integerValue]]];
} else {
}
NSUInteger retries = [[request.userInfo objectForKey:@"retries"] unsignedIntegerValue];
if (retries > 0) {
}
NSUInteger retries = [[request.userInfo objectForKey:@"retries"] unsignedIntegerValue];
if (retries > 0) {
- ASIPithosRequest *newRequest = (ASIPithosRequest *)[PithosUtilities copyRequest:request];
+ ASIPithosRequest *newRequest = (ASIPithosRequest *)[PithosUtilities retryWithUpdatedURLRequest:request
+ andPithosAccountManager:pithosAccount];
[(NSMutableDictionary *)(newRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
[networkQueue addOperation:[PithosUtilities prepareRequest:newRequest priority:[[newRequest.userInfo objectForKey:@"priority"] integerValue]]];
} else {
[(NSMutableDictionary *)(newRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
[networkQueue addOperation:[PithosUtilities prepareRequest:newRequest priority:[[newRequest.userInfo objectForKey:@"priority"] integerValue]]];
} else {
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
</dict>
</array>
<key>CFBundleVersion</key>
</dict>
</array>
<key>CFBundleVersion</key>
- <string>20130319.1</string>
+ <string>20130707.0</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSMainNibFile</key>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSMainNibFile</key>