Skip to content

Commit

Permalink
Error output
Browse files Browse the repository at this point in the history
  • Loading branch information
T1t4m1un committed Apr 19, 2024
1 parent 5289bc2 commit 67fc4f3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,22 @@ list_users(char* users_path, char output_format)

if (json)
{
do
{
cJSON *command = cJSON_GetObjectItemCaseSensitive(json, "command");
if (command == NULL)
{
break;
}

cJSON *error = cJSON_GetObjectItemCaseSensitive(json, JSON_TAG_COMMAND_ERROR);
if (error == NULL)
{
break;
}
cJSON_SetIntValue(error, 1);
} while(0);

cJSON_Delete(json);
}

Expand Down

0 comments on commit 67fc4f3

Please sign in to comment.