Diff between 7a964f0bfa0c11cf8a838e89879f0b4ffb00b531 and cc91d165c566e1e296bcb50c4430b9b1c6a1129a
Changed Files
| File | Additions | Deletions | Status |
| emulator/hciemu.c | +7 | -0 | modified |
Full Patch
diff --git a/emulator/hciemu.c b/emulator/hciemu.c
index 50285e4..fcaeb70 100644
--- a/emulator/hciemu.c
+++ b/emulator/hciemu.c
@@ -179,6 +179,13 @@ static gboolean receive_btdev(GIOChannel *channel, GIOCondition condition,
fd = g_io_channel_unix_get_fd(channel);
len = read(fd, buf, sizeof(buf));
+ if (len < 0) {
+ if (errno == EAGAIN || errno == EINTR)
+ return TRUE;
+
+ return FALSE;
+ }
+
if (len < 1)
return FALSE;