need to use NOT NOT maxBandwidthPerSecond instead of (maxBandwidthPerSecond). Ot…
…herwise value like 1024 will be false
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -4463,12 +4463,12 @@ static NSOperationQueue *sharedQueue = nil; | @@ -4463,12 +4463,12 @@ static NSOperationQueue *sharedQueue = nil; | ||
4463 | #if TARGET_OS_IPHONE | 4463 | #if TARGET_OS_IPHONE |
4464 | [bandwidthThrottlingLock lock]; | 4464 | [bandwidthThrottlingLock lock]; |
4465 | 4465 | ||
4466 | - BOOL throttle = isBandwidthThrottled || (!shouldThrottleBandwithForWWANOnly && (maxBandwidthPerSecond)); | 4466 | + BOOL throttle = isBandwidthThrottled || (!shouldThrottleBandwithForWWANOnly && !!maxBandwidthPerSecond); |
4467 | [bandwidthThrottlingLock unlock]; | 4467 | [bandwidthThrottlingLock unlock]; |
4468 | return throttle; | 4468 | return throttle; |
4469 | #else | 4469 | #else |
4470 | [bandwidthThrottlingLock lock]; | 4470 | [bandwidthThrottlingLock lock]; |
4471 | - BOOL throttle = (maxBandwidthPerSecond); | 4471 | + BOOL throttle = !!maxBandwidthPerSecond; |
4472 | [bandwidthThrottlingLock unlock]; | 4472 | [bandwidthThrottlingLock unlock]; |
4473 | return throttle; | 4473 | return throttle; |
4474 | #endif | 4474 | #endif |
-
Please register or login to post a comment