Remove extra system.hostname property from /api/sysinfo. It is already contained as system.uname.nodename of the very same API endpoint

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-01-14 20:36:49 +01:00
parent 8541346fae
commit 3bb8050cf8
2 changed files with 0 additions and 15 deletions
-5
View File
@@ -302,11 +302,6 @@ components:
description: Device model (if available, `null` otherwise)
example: "Raspberry Pi Model 4B"
nullable: true
hostname:
type: string
nullable: true
description: Hostname of the device
example: "raspberrypi"
dns:
$ref: 'dns.yaml#/components/schemas/blocking'
uname:
-10
View File
@@ -378,16 +378,6 @@ int get_system_obj(struct ftl_conn *api, cJSON *system)
if(f_model)
fclose(f_model);
// Add hostname to system object
char hostname[256] = { 0 };
if(gethostname(hostname, sizeof(hostname)) != 0)
{
log_warn("gethostname() failed: %s", strerror(errno));
JSON_ADD_NULL_TO_OBJECT(system, "hostname");
}
else
JSON_COPY_STR_TO_OBJECT(system, "hostname", hostname);
cJSON *dns = JSON_NEW_OBJECT();
const bool blocking = get_blockingstatus();
JSON_ADD_BOOL_TO_OBJECT(dns, "blocking", blocking); // same reply type as in /api/dns/status