projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c49ed15
)
hfp_hf_bluez5: Be more pedantic in get_version
author
Denis Kenzior
<denkenz@gmail.com>
Tue, 1 Oct 2013 16:35:27 +0000
(11:35 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Tue, 1 Oct 2013 16:35:27 +0000
(11:35 -0500)
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.
plugins/hfp_hf_bluez5.c
patch
|
blob
|
history
diff --git
a/plugins/hfp_hf_bluez5.c
b/plugins/hfp_hf_bluez5.c
index
cd8f75e
..
18ed348
100644
(file)
--- a/
plugins/hfp_hf_bluez5.c
+++ b/
plugins/hfp_hf_bluez5.c
@@
-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;
+
if (version)
+
*version = value;
- return 0;
+ return 0;
+ }
+
+ return -ENOENT;
}
static DBusMessage *profile_new_connection(DBusConnection *conn,