mirror of git://git.sysmocom.de/ofono
hfp_hf_bluez5: Be more pedantic in get_version
If no 'Version' key is found we might be assigning an uninitialized value. Return an error in this case as the 'Version' key is required.
This commit is contained in:
parent
c49ed15a8f
commit
2158249069
|
@ -449,13 +449,14 @@ static int get_version(DBusMessageIter *iter, uint16_t *version)
|
|||
|
||||
dbus_message_iter_recurse(&entry, &valiter);
|
||||
dbus_message_iter_get_basic(&valiter, &value);
|
||||
break;
|
||||
|
||||
if (version)
|
||||
*version = value;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (version)
|
||||
*version = value;
|
||||
|
||||
return 0;
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static DBusMessage *profile_new_connection(DBusConnection *conn,
|
||||
|
|
Loading…
Reference in New Issue