config: fix resolve of device type
This commit is contained in:
parent
bcef77a7fb
commit
7745aa34ad
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Reference in a new issue