nuke get option

This commit is contained in:
Ernesto Cruz 2026-06-20 12:58:45 +01:00
parent fa4f144b9d
commit 94292e02fb
5 changed files with 1 additions and 260 deletions

View file

@ -351,16 +351,6 @@ static void handle_command(int client_fd, const char *cmd_raw) {
return;
}
resp = build_monitor_tags_response(m);
} else if (strncmp(cmd, "get option ", 11) == 0) {
cJSON *val = read_option(&config, cmd + 11);
if (!val) {
send_static_json(client_fd,
"{\"error\":\"unknown or unreadable option\"}\n");
return;
}
resp = cJSON_CreateObject();
cJSON_AddStringToObject(resp, "option", cmd + 11);
cJSON_AddItemToObject(resp, "value", val);
} else if (strncmp(cmd, "dispatch ", 9) == 0) {
char *dispatch_copy = strdup(cmd_raw + 9);
char *out = dispatch_copy, *ptr = dispatch_copy;