summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-03-04 22:04:17 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-03-04 22:04:17 -0800
commit87d58a906a7660760a9f2b2321fb99e72cdf551b (patch)
tree0744e424c548c19fda8c502f66580eff667835be /MobileCydia.mm
parentf4f6714a329bf399840b3f9991b310bd17f7bed6 (diff)
Remove HostConfig_ (for some finer-grained locks).
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm21
1 files changed, 8 insertions, 13 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index e927ab3..eed6edd 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -716,7 +716,6 @@ static _H<NSString> Firmware_;
static NSString *Major_;
static _H<NSMutableDictionary> SessionData_;
-static _H<NSObject> HostConfig_;
static _H<NSMutableSet> BridgedHosts_;
static _H<NSMutableSet> InsecureHosts_;
@@ -4627,12 +4626,12 @@ class CydiaLogCleaner :
} }
- (void) addBridgedHost:(NSString *)host {
-@synchronized (HostConfig_) {
+@synchronized (BridgedHosts_) {
[BridgedHosts_ addObject:host];
} }
- (void) addInsecureHost:(NSString *)host {
-@synchronized (HostConfig_) {
+@synchronized (InsecureHosts_) {
[InsecureHosts_ addObject:host];
} }
@@ -4853,7 +4852,7 @@ class CydiaLogCleaner :
if ([[[self scheme] lowercaseString] isEqualToString:@"https"])
return true;
- @synchronized (HostConfig_) {
+ @synchronized (InsecureHosts_) {
if ([InsecureHosts_ containsObject:[self host]])
return true;
}
@@ -4886,7 +4885,7 @@ class CydiaLogCleaner :
bool bridged(false);
- @synchronized (HostConfig_) {
+ @synchronized (BridgedHosts_) {
if ([scheme isEqualToString:@"file"])
bridged = true;
else if ([scheme isEqualToString:@"https"])
@@ -4938,7 +4937,7 @@ class CydiaLogCleaner :
if (Machine_ != NULL && [copy valueForHTTPHeaderField:@"X-Machine"] == nil)
[copy setValue:[NSString stringWithUTF8String:Machine_] forHTTPHeaderField:@"X-Machine"];
- bool bridged; @synchronized (HostConfig_) {
+ bool bridged; @synchronized (BridgedHosts_) {
bridged = [BridgedHosts_ containsObject:host];
}
@@ -9579,7 +9578,7 @@ _end
[super applicationDidFinishLaunching:unused];
_trace();
- @synchronized (HostConfig_) {
+ @synchronized (BridgedHosts_) {
[BridgedHosts_ addObject:[[NSURL URLWithString:CydiaURL(@"")] host]];
}
@@ -9857,12 +9856,8 @@ int main(int argc, char *argv[]) {
Major_ = pattern[1];
SessionData_ = [NSMutableDictionary dictionaryWithCapacity:4];
-
- HostConfig_ = [[[NSObject alloc] init] autorelease];
- @synchronized (HostConfig_) {
- BridgedHosts_ = [NSMutableSet setWithCapacity:4];
- InsecureHosts_ = [NSMutableSet setWithCapacity:4];
- }
+ BridgedHosts_ = [NSMutableSet setWithCapacity:4];
+ InsecureHosts_ = [NSMutableSet setWithCapacity:4];
NSString *ui(@"ui/ios");
if (Idiom_ != nil)