aboutsummaryrefslogtreecommitdiff
path: root/src/HciAdapter.cpp
diff options
context:
space:
mode:
authorPaul Nettle <nettle.paul@gmail.com>2017-09-01 13:23:34 -0500
committerPaul Nettle <nettle.paul@gmail.com>2017-09-01 13:23:34 -0500
commit322aeccbe9065863246078da3a945e8f9983d2c5 (patch)
tree5288c9f4a338e80e6e9ac4ed9e682536b3e6871d /src/HciAdapter.cpp
parentRemoved null-terminators from strings being built into Variants as byte arrays. (diff)
downloadgobbledegook-322aeccbe9065863246078da3a945e8f9983d2c5.tar.gz
gobbledegook-322aeccbe9065863246078da3a945e8f9983d2c5.tar.bz2
gobbledegook-322aeccbe9065863246078da3a945e8f9983d2c5.zip
Cleaned up the logging a bit, improved server termination status returned from ggkWait.
Diffstat (limited to 'src/HciAdapter.cpp')
-rw-r--r--src/HciAdapter.cpp8
1 files changed, 6 insertions, 2 deletions
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::vector<uint8
std::string eventTypeName = kEventTypeNames[pEvent->header.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<uint8
buffer = lastGoodEvent;
return true;
}
+
+}; // namespace ggk \ No newline at end of file