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:
2704b4c
)
attrib: Add missing g_error_free()
author
Anderson Lizardo
<anderson.lizardo@openbossa.org>
Sat, 11 Jan 2014 04:47:18 +0000
(
00:47
-0400)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Sat, 11 Jan 2014 16:56:03 +0000
(18:56 +0200)
Also print error message.
src/attrib-server.c
patch
|
blob
|
history
diff --git
a/src/attrib-server.c
b/src/attrib-server.c
index
a7ee55d
..
fcc6601
100644
(file)
--- a/
src/attrib-server.c
+++ b/
src/attrib-server.c
@@
-944,10
+944,12
@@
static uint16_t mtu_exchange(struct gatt_channel *channel, uint16_t mtu,
io = g_attrib_get_channel(channel->attrib);
bt_io_get(io, &gerr, BT_IO_OPT_IMTU, &imtu, BT_IO_OPT_INVALID);
-
- if (gerr)
- return enc_error_resp(ATT_OP_MTU_REQ, 0,
- ATT_ECODE_UNLIKELY, pdu, len);
+ if (gerr) {
+ error("bt_io_get: %s", gerr->message);
+ g_error_free(gerr);
+ return enc_error_resp(ATT_OP_MTU_REQ, 0, ATT_ECODE_UNLIKELY,
+ pdu, len);
+ }
channel->mtu = MIN(mtu, imtu);
g_attrib_set_mtu(channel->attrib, channel->mtu);