summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2015-06-01 15:05:01 -0500
committerBrad Leege <bleege@gmail.com>2015-06-01 15:05:01 -0500
commitebe1e2158cac8f6f6c8698722eac7008ded9203b (patch)
treeafa7502aaed1cc579d4aff2efb32900a596c47cd /platform
parentd2f710564994e902cab400caffbd46a0cddb57c2 (diff)
downloadqtlocation-mapboxgl-ebe1e2158cac8f6f6c8698722eac7008ded9203b.tar.gz
#1659 - Converting usingTestServer to atomic property
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/MGLMapboxEvents.m9
1 files changed, 6 insertions, 3 deletions
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m
index 3211a60395..6b3d33f049 100644
--- a/platform/ios/MGLMapboxEvents.m
+++ b/platform/ios/MGLMapboxEvents.m
@@ -16,7 +16,6 @@
static const NSUInteger version = 1;
static NSString *const MGLMapboxEventsUserAgent = @"MapboxEventsiOS/1.0";
static NSString *MGLMapboxEventsAPIBase = @"https://api.tiles.mapbox.com";
-static BOOL usingTestServer = NO;
NSString *const MGLEventTypeAppUserTurnstile = @"appUserTurnstile";
NSString *const MGLEventTypeMapLoad = @"map.load";
@@ -150,6 +149,7 @@ const NSTimeInterval MGLFlushInterval = 60;
@property (atomic) NSData *digicertCert;
@property (atomic) NSData *geoTrustCert;
@property (atomic) NSData *testServerCert;
+@property (atomic) BOOL usesTestServer;
// Main thread only
@property (nonatomic) CLLocationManager *locationManager;
@@ -241,7 +241,10 @@ const NSTimeInterval MGLFlushInterval = 60;
NSString *testURL = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLMetricsTestServerURL"];
if (testURL != nil) {
MGLMapboxEventsAPIBase = testURL;
- usingTestServer = YES;
+ _usesTestServer = YES;
+ } else {
+ // Explicitly Set For Clarity
+ _usesTestServer = NO;
}
_paused = YES;
@@ -885,7 +888,7 @@ const NSTimeInterval MGLFlushInterval = 60;
}
}
- if (!found && usingTestServer) {
+ if (!found && _usesTestServer) {
// See if this is test server
for (int lc = 0; lc < numKeys; lc++) {
SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, lc);