Skip to content

Commit

Permalink
clear error from the very beginning just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
PMheart committed Sep 25, 2017
1 parent 803d754 commit 59a3bc5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CPUFriend/kern_cpuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ void CPUFriendPlugin::myConfigResourceCallback(uint32_t requestTag, kern_return_
} else {
SYSLOG("myConfigResourceCallback", "failed to feed cpu data (%u, %d)", sz, data != nullptr);
}

callbackCpuf->orgConfigLoadCallback(requestTag, result, resourceData, resourceDataLength, context);
} else {
SYSLOG("myConfigResourceCallback", "config callback arrived at nowhere");
Expand All @@ -109,7 +108,8 @@ void CPUFriendPlugin::processKext(KernelPatcher &patcher, size_t index, mach_vm_
for (size_t i = 0; i < kextListSize; i++) {
if (kextList[i].loadIndex == index) {
DBGLOG("processKext", "current kext is %s progressState %d", kextList[i].id, progressState);

// clear error from the very beginning just in case
patcher.clearError();
if (!strcmp(kextList[i].id, idList[0])) {
auto callback = patcher.solveSymbol(index, symbolList[0]);
if (callback) {
Expand All @@ -122,7 +122,6 @@ void CPUFriendPlugin::processKext(KernelPatcher &patcher, size_t index, mach_vm_
} else {
SYSLOG("processKext", "failed to find %s", symbolList[0]);
}

progressState |= cpufessingState::CallbackRouted;
}

Expand Down

0 comments on commit 59a3bc5

Please sign in to comment.