From 44386a9aabfb4c471148813805999549d5d15851 Mon Sep 17 00:00:00 2001 From: Leptos Date: Tue, 2 Apr 2019 15:58:00 -0700 Subject: [PATCH] [springboard] Use LMResponseConsumePropertyList in IPC recieve function --- springboard/SpringBoard.x | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/springboard/SpringBoard.x b/springboard/SpringBoard.x index d7c1342..8b9f359 100644 --- a/springboard/SpringBoard.x +++ b/springboard/SpringBoard.x @@ -6,20 +6,14 @@ HBTSIMessageProvider *provider = nil; #pragma mark - IPC -void ReceivedRelayedNotification(CFMachPortRef port, LMMessage *request, CFIndex size, void *info) { +void ReceivedRelayedNotification(CFMachPortRef port, LMResponseBuffer *response, CFIndex size, void *info) { // check that we aren’t being given a message that’s too short if ((size_t)size < sizeof(LMMessage)) { HBLogError(@"received a bad message? size = %li", size); return; } - // get the raw data sent - const void *rawData = LMMessageGetData(request); - size_t length = LMMessageGetDataLength(request); - - // translate to NSData, then NSDictionary - CFDataRef data = CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, (const UInt8 *)rawData, length, kCFAllocatorNull); - NSDictionary *userInfo = LMPropertyListForData((__bridge NSData *)data); + NSDictionary *userInfo = LMResponseConsumePropertyList(response); // forward to the main controller if (!provider) {