config: fix resolve of device type

This commit is contained in:
Matthias Schiffer 2019-05-31 20:40:13 +02:00
parent bcef77a7fb
commit 7745aa34ad
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C

View file

@ -22,7 +22,7 @@ static device_t * config_process_device(const char *name, struct json_object *ob
const char *typename = NULL; const char *typename = NULL;
struct json_object *device = neco_json_get_value(obj, "device", json_type_object); struct json_object *device = neco_json_get_value(obj, "device", json_type_object);
if (device) if (device)
typename = neco_json_get_string(obj, "type"); typename = neco_json_get_string(device, "type");
const device_type_t *type = get_device_type(typename ?: "interface"); const device_type_t *type = get_device_type(typename ?: "interface");
if (!type) if (!type)