OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb9bc1d
)
gatt: Fix btd_device_get_storage_path failure handling
author
Johan Hedberg
<johan.hedberg@intel.com>
Mon, 29 Apr 2013 13:27:38 +0000
(16:27 +0300)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Mon, 29 Apr 2013 13:27:38 +0000
(16:27 +0300)
profiles/gatt/gas.c
patch
|
blob
|
history
diff --git
a/profiles/gatt/gas.c
b/profiles/gatt/gas.c
index
33a680f
..
39e9421
100644
(file)
--- a/
profiles/gatt/gas.c
+++ b/
profiles/gatt/gas.c
@@
-88,6
+88,10
@@
static void write_ctp_handle(struct btd_device *device, uint16_t uuid,
gsize length = 0;
filename = btd_device_get_storage_path(device, "gatt");
+ if (!filename) {
+ warn("Unable to get gatt storage path for device");
+ return;
+ }
key_file = g_key_file_new();
g_key_file_load_from_file(key_file, filename, 0, NULL);
@@
-116,6
+120,10
@@
static int read_ctp_handle(struct btd_device *device, uint16_t uuid,
int err = 0;
filename = btd_device_get_storage_path(device, "gatt");
+ if (!filename) {
+ warn("Unable to get gatt storage path for device");
+ return -ENOENT;
+ }
snprintf(group, sizeof(group), "%hu", uuid);