mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-26 13:44:23 +08:00
Fix error check from write in channel_write
This commit is contained in:
parent
31079f3b1b
commit
2c68908c11
@ -212,7 +212,7 @@ static int channel_write(GIOChannel *chan, char *buf, size_t size)
|
||||
while (wbytes < size) {
|
||||
written = write(fd, buf + wbytes, size - wbytes);
|
||||
|
||||
if (written)
|
||||
if (written < 0)
|
||||
return -errno;
|
||||
|
||||
wbytes += written;
|
||||
|
Loading…
Reference in New Issue
Block a user