auto-pts: add log message length field

This commit is contained in:
Matthias Ringwald 2019-12-16 18:09:48 +01:00
parent d91d7ea51f
commit 8ebd173655

View File

@ -475,8 +475,8 @@ static void btp_core_handler(uint8_t opcode, uint8_t controller_index, uint16_t
break;
case BTP_CORE_OP_LOG_MESSAGE:
if (controller_index == BTP_INDEX_NON_CONTROLLER){
uint16_t len = btstack_min(sizeof(message_buffer)-1,length);
memcpy(message_buffer, data, len);
uint16_t len = btstack_min(sizeof(message_buffer)-1,length-2);
memcpy(message_buffer, &data[2], len);
message_buffer[len] = 0;
MESSAGE("BTP_CORE_LOG_MESSAGE %s", message_buffer);
btp_send(BTP_SERVICE_ID_CORE, opcode, controller_index, 0, NULL);