|
@@ -67,16 +67,10 @@ static RMConfiguration *RMConfigurationSharedInstance = nil; |
|
@@ -67,16 +67,10 @@ static RMConfiguration *RMConfigurationSharedInstance = nil; |
67
|
|
67
|
|
68
|
[request setValue:[[RMConfiguration configuration] userAgent] forHTTPHeaderField:@"User-Agent"];
|
68
|
[request setValue:[[RMConfiguration configuration] userAgent] forHTTPHeaderField:@"User-Agent"];
|
69
|
|
69
|
|
70
|
- NSError *internalError = nil;
|
|
|
71
|
-
|
|
|
72
|
- NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:&internalError];
|
70
|
+ NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:error];
|
73
|
|
71
|
|
74
|
if ( ! returnData)
|
72
|
if ( ! returnData)
|
75
|
- {
|
|
|
76
|
- *error = internalError;
|
|
|
77
|
-
|
|
|
78
|
return nil;
|
73
|
return nil;
|
79
|
- }
|
|
|
80
|
|
74
|
|
81
|
return [[[self class] alloc] initWithData:returnData encoding:enc];
|
75
|
return [[[self class] alloc] initWithData:returnData encoding:enc];
|
82
|
}
|
76
|
}
|
|
@@ -117,13 +111,13 @@ static RMConfiguration *RMConfigurationSharedInstance = nil; |
|
@@ -117,13 +111,13 @@ static RMConfiguration *RMConfigurationSharedInstance = nil; |
117
|
|
111
|
|
118
|
RMLog(@"reading route-me configuration from %@", path);
|
112
|
RMLog(@"reading route-me configuration from %@", path);
|
119
|
|
113
|
|
120
|
- NSString *error = nil;
|
114
|
+ NSError *error = nil;
|
121
|
NSData *plistData = [NSData dataWithContentsOfFile:path];
|
115
|
NSData *plistData = [NSData dataWithContentsOfFile:path];
|
122
|
|
116
|
|
123
|
- _propertyList = [NSPropertyListSerialization propertyListFromData:plistData
|
|
|
124
|
- mutabilityOption:NSPropertyListImmutable
|
117
|
+ _propertyList = [NSPropertyListSerialization propertyListWithData:plistData
|
|
|
118
|
+ options:NSPropertyListImmutable
|
125
|
format:NULL
|
119
|
format:NULL
|
126
|
- errorDescription:&error];
|
120
|
+ error:&error];
|
127
|
|
121
|
|
128
|
if ( ! _propertyList)
|
122
|
if ( ! _propertyList)
|
129
|
{
|
123
|
{
|