From 322aeccbe9065863246078da3a945e8f9983d2c5 Mon Sep 17 00:00:00 2001 From: Paul Nettle Date: Fri, 1 Sep 2017 13:23:34 -0500 Subject: Cleaned up the logging a bit, improved server termination status returned from ggkWait. --- src/HciAdapter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/HciAdapter.cpp') diff --git a/src/HciAdapter.cpp b/src/HciAdapter.cpp index 8e906e6..6d99d69 100644 --- a/src/HciAdapter.cpp +++ b/src/HciAdapter.cpp @@ -59,6 +59,8 @@ #include "Utils.h" #include "Logger.h" +namespace ggk { + static const int kMinCommandCode = 0x0001; static const int kMaxCommandCode = 0x0043; static const char *kCommandCodeNames[kMaxCommandCode] = @@ -356,12 +358,12 @@ bool HciAdapter::filterAndValidateEvents(uint16_t commandCode, std::vectorheader.code - kMinEventType]; std::string commandCodeName = pEvent->commandCode < kMinCommandCode || pEvent->commandCode > kMaxCommandCode ? "Unknown" : kCommandCodeNames[pEvent->commandCode - kMinCommandCode]; - Logger::info(SSTR << " + Received event type " << Utils::hex(pEvent->header.code) << " (" << eventTypeName << ")"); + Logger::debug(SSTR << " + Received event type " << Utils::hex(pEvent->header.code) << " (" << eventTypeName << ")"); // Success event for our command? if (pEvent->header.code != 1 && pEvent->commandCode != commandCode) { - Logger::warn(SSTR << " + Skipping event type " << Utils::hex(pEvent->header.code) << " (" << eventTypeName << ")"); + Logger::debug(SSTR << " + Skipping event type " << Utils::hex(pEvent->header.code) << " (" << eventTypeName << ")"); } else { @@ -382,3 +384,5 @@ bool HciAdapter::filterAndValidateEvents(uint16_t commandCode, std::vector