Skip to content

Commit

Permalink
Fix driver threads not showing type due to an if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzSwirlz committed May 8, 2024
1 parent 58cc761 commit 388f8b7
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,22 @@ WUPSConfigAPICallbackStatus ConfigMenuOpenedCallback(WUPSConfigCategoryHandle ro
}

char typeText[30];
if (threads[i]->type) {
switch (threads[i]->type) {
case OS_THREAD_TYPE_DRIVER:
snprintf(typeText, 30, "Type: Driver");
break;
case OS_THREAD_TYPE_IO:
snprintf(typeText, 30, "Type: I/O");
break;
case OS_THREAD_TYPE_APP:
snprintf(typeText, 30, "Type: App");
break;
default:
snprintf(typeText, 30, "Type Undefined: %d", threads[i]->type);
break;
}
if (WUPSConfigItemStub_AddToCategory(catHandle, typeText) != WUPSCONFIG_API_RESULT_SUCCESS) {
DEBUG_FUNCTION_LINE_ERR("Failed to add type of thread %d to its category", threads[i]->type);
}
switch (threads[i]->type) {
case OS_THREAD_TYPE_DRIVER:
snprintf(typeText, 30, "Type: Driver");
break;
case OS_THREAD_TYPE_IO:
snprintf(typeText, 30, "Type: I/O");
break;
case OS_THREAD_TYPE_APP:
snprintf(typeText, 30, "Type: App");
break;
default:
snprintf(typeText, 30, "Type Undefined: %d", threads[i]->type);
break;
}
if (WUPSConfigItemStub_AddToCategory(catHandle, typeText) != WUPSCONFIG_API_RESULT_SUCCESS) {
DEBUG_FUNCTION_LINE_ERR("Failed to add type of thread %d to its category", threads[i]->type);
}


Expand Down

0 comments on commit 388f8b7

Please sign in to comment.