]> git.saurik.com Git - cydia.git/commitdiff
Support compound user-agents using CyteInitialize.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 11 Mar 2017 06:34:52 +0000 (22:34 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 11 Mar 2017 06:34:52 +0000 (22:34 -0800)
CyteKit/extern.h
CyteKit/extern.mm
MobileCydia.mm

index 562fb2635bda4dd61cfebb06a27253b1c221f09d..e019227b7c36e60c1cc351038e2d1defb51f61d8 100644 (file)
@@ -33,7 +33,7 @@ extern const char *System_;
 
 bool CyteIsReachable(const char *name);
 
-void CyteInitialize(NSString *app, NSString *version);
+void CyteInitialize(NSString *agent);
 
 static inline double Retina(double value) {
     value *= ScreenScale_;
index aad36267d39aab4ca3088eea8df317d95556f88d..42317e1aad60196f0c9bce0a65a3d75d6b8129a1 100644 (file)
@@ -58,7 +58,7 @@ bool CyteIsReachable(const char *name) {
     ;
 }
 
-void CyteInitialize(NSString *app, NSString *version) {
+void CyteInitialize(NSString *agent) {
     UIScreen *screen([UIScreen mainScreen]);
     if ([screen respondsToSelector:@selector(scale)])
         ScreenScale_ = [screen scale];
@@ -96,7 +96,7 @@ void CyteInitialize(NSString *app, NSString *version) {
         safari = [info objectForKey:@"CFBundleVersion"];
     }
 
-    NSString *agent([NSString stringWithFormat:@"%@/%@ CyF/%.2f", app, version, kCFCoreFoundationVersionNumber]);
+    agent = [NSString stringWithFormat:@"%@ CyF/%.2f", agent, kCFCoreFoundationVersionNumber];
 
     if (RegEx match = RegEx("([0-9]+(\\.[0-9]+)+).*", safari))
         agent = [NSString stringWithFormat:@"Safari/%@ %@", match[1], agent];
index 4be6750c71ad2defd07378cbb52f6e6b703ad67e..76a3a3f1e71d0d7f4b0b5d2eebc8d5093100b9b0 100644 (file)
@@ -9211,7 +9211,7 @@ int main(int argc, char *argv[]) {
 
     _trace();
 
-    CyteInitialize(@"Cydia", Cydia_);
+    CyteInitialize([NSString stringWithFormat:@"Cydia/%@", Cydia_]);
     UpdateExternalStatus(0);
 
     SessionData_ = [NSMutableDictionary dictionaryWithCapacity:4];