Diff between 10a0350126bb517c36ac1d0d95e4995b6e303d8f and 9c7a6a48f25577f8621dd3cbe4103d481eb14214
Changed Files
| File | Additions | Deletions | Status |
| btio/btio.c | +4 | -2 | modified |
Full Patch
diff --git a/btio/btio.c b/btio/btio.c
index a3cf38a..918eea8 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -1133,8 +1133,10 @@ gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, gpointer user_data,
}
if (!(pfd.revents & POLLOUT)) {
- int ret;
- ret = read(sock, &c, 1);
+ if (read(sock, &c, 1) < 0) {
+ ERROR_FAILED(err, "read", errno);
+ return FALSE;
+ }
}
accept_add(io, connect, user_data, destroy);