Diff between 1cbb3e88bed13a2ea5e2cfb1ba136d959a1208fb and 0b24507b8a3e0e003b57af0849c74d8d06b2e5b0

Changed Files

File Additions Deletions Status
emulator/amp.c +2 -1 modified

Full Patch

diff --git a/emulator/amp.c b/emulator/amp.c
index e80d9a8..714854b 100644
--- a/emulator/amp.c
+++ b/emulator/amp.c
@@ -169,7 +169,8 @@ static void reset_defaults(struct bt_amp *amp)
 
 static void send_packet(struct bt_amp *amp, const void *data, uint16_t len)
 {
-	write(amp->vhci_fd, data, len);
+	if (write(amp->vhci_fd, data, len) < 0)
+		fprintf(stderr, "Write to /dev/vhci failed\n");
 }
 
 static void send_event(struct bt_amp *amp, uint8_t event,