mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-11 13:04:10 +08:00
gattrib: Fix ignoring the error message when write fails
If an error happens during writing to the socket, we should complain that it failed.
This commit is contained in:
parent
3665ba4403
commit
4c3dec8abf
@ -313,8 +313,14 @@ static gboolean can_write_data(GIOChannel *io, GIOCondition cond,
|
||||
|
||||
iostat = g_io_channel_write_chars(io, (gchar *) cmd->pdu, cmd->len,
|
||||
&len, &gerr);
|
||||
if (iostat != G_IO_STATUS_NORMAL)
|
||||
if (iostat != G_IO_STATUS_NORMAL) {
|
||||
if (gerr) {
|
||||
error("%s", gerr->message);
|
||||
g_error_free(gerr);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (cmd->expected == 0) {
|
||||
g_queue_pop_head(queue);
|
||||
|
Loading…
Reference in New Issue
Block a user