[PATCH] monitor: Write btsnoop before processing packet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In case of parser crash packet should still be present in
btsnoop file. This allows to reproduce crash and provide fix.
---
 monitor/control.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor/control.c b/monitor/control.c
index 879e195..451eabe 100644
--- a/monitor/control.c
+++ b/monitor/control.c
@@ -811,11 +811,11 @@ static void data_callback(int fd, uint32_t events, void *user_data)
 			packet_control(tv, index, opcode, data->buf, pktlen);
 			break;
 		case HCI_CHANNEL_MONITOR:
-			packet_monitor(tv, index, opcode, data->buf, pktlen);
 			btsnoop_write_hci(btsnoop_file, tv, index, opcode,
 							data->buf, pktlen);
 			ellisys_inject_hci(tv, index, opcode,
 							data->buf, pktlen);
+			packet_monitor(tv, index, opcode, data->buf, pktlen);
 			break;
 		}
 	}
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux