Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions springboard/SpringBoard.x
Original file line number Diff line number Diff line change
Expand Up @@ -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 <NSString *, id> *userInfo = LMPropertyListForData((__bridge NSData *)data);
NSDictionary <NSString *, id> *userInfo = LMResponseConsumePropertyList(response);

// forward to the main controller
if (!provider) {
Expand Down