Showing
1 changed file
with
5 additions
and
5 deletions
@@ -105,7 +105,7 @@ static BOOL isBandwidthThrottled = NO; | @@ -105,7 +105,7 @@ static BOOL isBandwidthThrottled = NO; | ||
105 | 105 | ||
106 | // When YES, bandwidth will be automatically throttled when using WWAN (3G/Edge/GPRS) | 106 | // When YES, bandwidth will be automatically throttled when using WWAN (3G/Edge/GPRS) |
107 | // Wifi will not be throttled | 107 | // Wifi will not be throttled |
108 | -static BOOL shouldThrottleBandwithForWWANOnly = NO; | 108 | +static BOOL shouldThrottleBandwidthForWWANOnly = NO; |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | // Mediates access to the session cookies so requests | 111 | // Mediates access to the session cookies so requests |
@@ -4493,7 +4493,7 @@ static NSOperationQueue *sharedQueue = nil; | @@ -4493,7 +4493,7 @@ static NSOperationQueue *sharedQueue = nil; | ||
4493 | #if TARGET_OS_IPHONE | 4493 | #if TARGET_OS_IPHONE |
4494 | [bandwidthThrottlingLock lock]; | 4494 | [bandwidthThrottlingLock lock]; |
4495 | 4495 | ||
4496 | - BOOL throttle = isBandwidthThrottled || (!shouldThrottleBandwithForWWANOnly && (maxBandwidthPerSecond > 0)); | 4496 | + BOOL throttle = isBandwidthThrottled || (!shouldThrottleBandwidthForWWANOnly && (maxBandwidthPerSecond > 0)); |
4497 | [bandwidthThrottlingLock unlock]; | 4497 | [bandwidthThrottlingLock unlock]; |
4498 | return throttle; | 4498 | return throttle; |
4499 | #else | 4499 | #else |
@@ -4573,7 +4573,7 @@ static NSOperationQueue *sharedQueue = nil; | @@ -4573,7 +4573,7 @@ static NSOperationQueue *sharedQueue = nil; | ||
4573 | // Are we performing bandwidth throttling? | 4573 | // Are we performing bandwidth throttling? |
4574 | if ( | 4574 | if ( |
4575 | #if TARGET_OS_IPHONE | 4575 | #if TARGET_OS_IPHONE |
4576 | - isBandwidthThrottled || (!shouldThrottleBandwithForWWANOnly && (maxBandwidthPerSecond)) | 4576 | + isBandwidthThrottled || (!shouldThrottleBandwidthForWWANOnly && (maxBandwidthPerSecond)) |
4577 | #else | 4577 | #else |
4578 | maxBandwidthPerSecond | 4578 | maxBandwidthPerSecond |
4579 | #endif | 4579 | #endif |
@@ -4625,7 +4625,7 @@ static NSOperationQueue *sharedQueue = nil; | @@ -4625,7 +4625,7 @@ static NSOperationQueue *sharedQueue = nil; | ||
4625 | [ASIHTTPRequest setMaxBandwidthPerSecond:0]; | 4625 | [ASIHTTPRequest setMaxBandwidthPerSecond:0]; |
4626 | [bandwidthThrottlingLock lock]; | 4626 | [bandwidthThrottlingLock lock]; |
4627 | isBandwidthThrottled = NO; | 4627 | isBandwidthThrottled = NO; |
4628 | - shouldThrottleBandwithForWWANOnly = NO; | 4628 | + shouldThrottleBandwidthForWWANOnly = NO; |
4629 | [bandwidthThrottlingLock unlock]; | 4629 | [bandwidthThrottlingLock unlock]; |
4630 | } | 4630 | } |
4631 | } | 4631 | } |
@@ -4633,7 +4633,7 @@ static NSOperationQueue *sharedQueue = nil; | @@ -4633,7 +4633,7 @@ static NSOperationQueue *sharedQueue = nil; | ||
4633 | + (void)throttleBandwidthForWWANUsingLimit:(unsigned long)limit | 4633 | + (void)throttleBandwidthForWWANUsingLimit:(unsigned long)limit |
4634 | { | 4634 | { |
4635 | [bandwidthThrottlingLock lock]; | 4635 | [bandwidthThrottlingLock lock]; |
4636 | - shouldThrottleBandwithForWWANOnly = YES; | 4636 | + shouldThrottleBandwidthForWWANOnly = YES; |
4637 | maxBandwidthPerSecond = limit; | 4637 | maxBandwidthPerSecond = limit; |
4638 | [ASIHTTPRequest registerForNetworkReachabilityNotifications]; | 4638 | [ASIHTTPRequest registerForNetworkReachabilityNotifications]; |
4639 | [bandwidthThrottlingLock unlock]; | 4639 | [bandwidthThrottlingLock unlock]; |
-
Please register or login to post a comment