summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm12
1 files changed, 7 insertions, 5 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 6d697a0..73c639f 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -1040,7 +1040,7 @@ static const char *Machine_ = NULL;
static NSString *System_ = nil;
static NSString *SerialNumber_ = nil;
static NSString *ChipID_ = nil;
-static NSString *Token_ = nil;
+static _H<NSString> Token_;
static NSString *UniqueID_ = nil;
static NSString *PLMN_ = nil;
static NSString *Build_ = nil;
@@ -4215,11 +4215,13 @@ static NSString *Warning_;
}
- (void) _setToken:(NSString *)token {
- if (Token_ != nil)
- [Token_ release];
- Token_ = [token retain];
+ Token_ = token;
+
+ if (token == nil)
+ [Metadata_ removeObjectForKey:@"Token"];
+ else
+ [Metadata_ setObject:Token_ forKey:@"Token"];
- [Metadata_ setObject:Token_ forKey:@"Token"];
Changed_ = true;
}