]> git.saurik.com Git - apt-legacy.git/commitdiff
Forgotten update to use MGCopyAnswer for X-Unique-ID.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 10 Jun 2014 09:20:15 +0000 (09:20 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 10 Jun 2014 09:20:15 +0000 (09:20 +0000)
M cfnetwork.diff

git-svn-id: http://svn.telesphoreo.org/trunk@786 514c082c-b64e-11dc-b46d-3d985efe055d

methods/http.cc

index 08504218ab089f987793eb35f1988772038dda7e..6de79fa15617066a7d36185dfc5a9665d590901b 100644 (file)
@@ -50,6 +50,7 @@
 #include <netdb.h>
 #include <arpa/inet.h>
 
+#include <dlfcn.h>
 #include <lockdown.h>
 #include <CoreFoundation/CoreFoundation.h>
 #include <CoreServices/CoreServices.h>
@@ -1554,6 +1555,12 @@ int main()
         CFRelease(plist);
     }
 
+    if (UniqueID_ == NULL)
+    if (void *libMobileGestalt = dlopen("/usr/lib/libMobileGestalt.dylib", RTLD_GLOBAL | RTLD_LAZY))
+    if (CFStringRef (*$MGCopyAnswer)(CFStringRef) = (CFStringRef (*)(CFStringRef)) dlsym(libMobileGestalt, "MGCopyAnswer"))
+        UniqueID_ = $MGCopyAnswer(CFSTR("UniqueDeviceID"));
+
+    if (UniqueID_ == NULL)
     if (void *lockdown = lockdown_connect()) {
         UniqueID_ = lockdown_copy_value(lockdown, NULL, kLockdownUniqueDeviceIDKey);
         lockdown_disconnect(lockdown);