* Fix iPhone 2.x conditional compilation
* Fix shared request queue max concurrent operations
Showing
1 changed file
with
3 additions
and
3 deletions
| @@ -670,7 +670,7 @@ static BOOL isiPhoneOS2; | @@ -670,7 +670,7 @@ static BOOL isiPhoneOS2; | ||
| 670 | } else { | 670 | } else { |
| 671 | 671 | ||
| 672 | #if TARGET_OS_IPHONE | 672 | #if TARGET_OS_IPHONE |
| 673 | - #if TARGET_IPHONE_SIMULATOR && __IPHONE_OS_VERSION_MIN_REQUIRED < IPHONE_3_0 | 673 | + #if TARGET_IPHONE_SIMULATOR && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_0 |
| 674 | // Can't detect proxies in 2.2.1 Simulator | 674 | // Can't detect proxies in 2.2.1 Simulator |
| 675 | NSDictionary *proxySettings = [NSMutableDictionary dictionary]; | 675 | NSDictionary *proxySettings = [NSMutableDictionary dictionary]; |
| 676 | #else | 676 | #else |
| @@ -2205,7 +2205,7 @@ static BOOL isiPhoneOS2; | @@ -2205,7 +2205,7 @@ static BOOL isiPhoneOS2; | ||
| 2205 | { | 2205 | { |
| 2206 | if (!sharedRequestQueue) { | 2206 | if (!sharedRequestQueue) { |
| 2207 | sharedRequestQueue = [[NSOperationQueue alloc] init]; | 2207 | sharedRequestQueue = [[NSOperationQueue alloc] init]; |
| 2208 | - [sharedRequestQueue setMaxConcurrentOperationCount:YES]; | 2208 | + [sharedRequestQueue setMaxConcurrentOperationCount:4]; |
| 2209 | } | 2209 | } |
| 2210 | return sharedRequestQueue; | 2210 | return sharedRequestQueue; |
| 2211 | } | 2211 | } |
| @@ -2762,7 +2762,7 @@ static BOOL isiPhoneOS2; | @@ -2762,7 +2762,7 @@ static BOOL isiPhoneOS2; | ||
| 2762 | return nil; | 2762 | return nil; |
| 2763 | } | 2763 | } |
| 2764 | // Obtain the list of proxies by running the autoconfiguration script | 2764 | // Obtain the list of proxies by running the autoconfiguration script |
| 2765 | -#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < IPHONE_3_0 | 2765 | +#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_0 |
| 2766 | NSArray *proxies = [(NSArray *)CFNetworkCopyProxiesForAutoConfigurationScript((CFStringRef)script,(CFURLRef)theURL) autorelease]; | 2766 | NSArray *proxies = [(NSArray *)CFNetworkCopyProxiesForAutoConfigurationScript((CFStringRef)script,(CFURLRef)theURL) autorelease]; |
| 2767 | #else | 2767 | #else |
| 2768 | CFErrorRef err2 = NULL; | 2768 | CFErrorRef err2 = NULL; |
-
Please register or login to post a comment