Showing
1 changed file
with
5 additions
and
1 deletions
@@ -2283,12 +2283,16 @@ static NSLock *sessionCookiesLock = nil; | @@ -2283,12 +2283,16 @@ static NSLock *sessionCookiesLock = nil; | ||
2283 | if (err) { | 2283 | if (err) { |
2284 | return nil; | 2284 | return nil; |
2285 | } | 2285 | } |
2286 | - CFErrorRef err2 = NULL; | ||
2287 | // Obtain the list of proxies by running the autoconfiguration script | 2286 | // Obtain the list of proxies by running the autoconfiguration script |
2287 | +#if !TARGET_OS_IPHONE || __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_2_2 | ||
2288 | + CFErrorRef err2 = NULL; | ||
2288 | NSArray *proxies = [(NSArray *)CFNetworkCopyProxiesForAutoConfigurationScript((CFStringRef)script,(CFURLRef)theURL, &err2) autorelease]; | 2289 | NSArray *proxies = [(NSArray *)CFNetworkCopyProxiesForAutoConfigurationScript((CFStringRef)script,(CFURLRef)theURL, &err2) autorelease]; |
2289 | if (err2) { | 2290 | if (err2) { |
2290 | return nil; | 2291 | return nil; |
2291 | } | 2292 | } |
2293 | +#else | ||
2294 | + NSArray *proxies = [(NSArray *)CFNetworkCopyProxiesForAutoConfigurationScript((CFStringRef)script,(CFURLRef)theURL) autorelease]; | ||
2295 | +#endif | ||
2292 | return proxies; | 2296 | return proxies; |
2293 | } | 2297 | } |
2294 | 2298 |
-
Please register or login to post a comment