]> git.saurik.com Git - cydia.git/commitdiff
Split PipelinedHosts_ from BridgedHosts_.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 26 Feb 2011 16:11:00 +0000 (08:11 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 7 Mar 2011 10:41:24 +0000 (02:41 -0800)
MobileCydia.mm

index 1ac856edc490e5515d34215dce8935a7864d4760..af616c4c193c748aeae38bbfa88603db7a678045 100644 (file)
@@ -1087,6 +1087,7 @@ static CGFloat ScreenScale_;
 static NSString *Idiom_;
 
 static NSMutableSet *BridgedHosts_;
+static NSMutableSet *PipelinedHosts_;
 
 static NSString *kCydiaProgressEventTypeError = @"Error";
 static NSString *kCydiaProgressEventTypeInformation = @"Information";
@@ -4209,6 +4210,8 @@ static NSMutableSet *Diversions_;
     if (false);
     else if (selector == @selector(addBridgedHost:))
         return @"addBridgedHost";
+    else if (selector == @selector(addPipelinedHost:))
+        return @"addPipelinedHost";
     else if (selector == @selector(addTrivialSource:))
         return @"addTrivialSource";
     else if (selector == @selector(close))
@@ -4321,6 +4324,10 @@ static NSMutableSet *Diversions_;
     [BridgedHosts_ performSelectorOnMainThread:@selector(addObject:) withObject:host waitUntilDone:NO];
 }
 
+- (void) addPipelinedHost:(NSString *)host {
+    [PipelinedHosts_ performSelectorOnMainThread:@selector(addObject:) withObject:host waitUntilDone:NO];
+}
+
 - (void) popViewController:(NSNumber *)value {
     if (value == (id) [WebUndefined undefined])
         value = [NSNumber numberWithBool:YES];
@@ -10027,7 +10034,7 @@ MSHook(id, NSURLConnection$init$, NSURLConnection *self, SEL _cmd, NSURLRequest
     NSString *host([url host]);
 
     if ([copy respondsToSelector:@selector(setHTTPShouldUsePipelining:)])
-        if ([BridgedHosts_ containsObject:host])
+        if ([PipelinedHosts_ containsObject:host])
             [copy setHTTPShouldUsePipelining:YES];
 
     if ((self = _NSURLConnection$init$(self, _cmd, copy, delegate, usesCache, maxContentLength, startImmediately, connectionProperties)) != nil) {
@@ -10065,6 +10072,7 @@ int main(int argc, char *argv[]) { _pooled
     }
 
     BridgedHosts_ = [NSMutableSet setWithCapacity:2];
+    PipelinedHosts_ = [NSMutableSet setWithCapacity:2];
 
     UI_ = CydiaURL([NSString stringWithFormat:@"ui/ios~%@", Idiom_]);