aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-06-15 14:58:05 +0200
committerSven Gothel <[email protected]>2021-06-15 14:58:05 +0200
commit8fd5e62090df664f2519293b21ccc99b7e495af8 (patch)
tree4bb248da754895ceae7bd2342ce87ad8ff61383e
parent3c1aa61438d2631776c6f3652d4eefc4bf8fec75 (diff)
[D]BTAdapter.printDeviceList[s](..): Also print device name in debug output.
-rw-r--r--java/jau/direct_bt/DBTAdapter.java3
-rw-r--r--src/direct_bt/BTAdapter.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/java/jau/direct_bt/DBTAdapter.java b/java/jau/direct_bt/DBTAdapter.java
index 09aec7e1..8d8ae441 100644
--- a/java/jau/direct_bt/DBTAdapter.java
+++ b/java/jau/direct_bt/DBTAdapter.java
@@ -548,7 +548,8 @@ public class DBTAdapter extends DBTObject implements BTAdapter
if( null == d ) {
BTUtils.fprintf_td(System.err, " - %d / %d: nil%s", (idx+1), sz, System.lineSeparator());
} else {
- BTUtils.fprintf_td(System.err, " - %d / %d: %s%s", (idx+1), sz, d.getAddressAndType().toString(), System.lineSeparator());
+ BTUtils.fprintf_td(System.err, " - %d / %d: %s, name '%s'%s", (idx+1), sz,
+ d.getAddressAndType().toString(), d.getName(), System.lineSeparator());
}
}
}
diff --git a/src/direct_bt/BTAdapter.cpp b/src/direct_bt/BTAdapter.cpp
index 01a11724..82c6c7c1 100644
--- a/src/direct_bt/BTAdapter.cpp
+++ b/src/direct_bt/BTAdapter.cpp
@@ -296,7 +296,9 @@ void BTAdapter::printDeviceList(const std::string& prefix, const BTAdapter::devi
jau::PLAIN_PRINT(true, "- BTAdapter::%s: %zu elements", prefix.c_str(), sz);
int idx = 0;
for (auto it = list.begin(); it != list.end(); ++idx, ++it) {
- jau::PLAIN_PRINT(true, " - %d / %zu: %s", (idx+1), sz, (*it)->getAddressAndType().toString().c_str());
+ jau::PLAIN_PRINT(true, " - %d / %zu: %s, name '%s'", (idx+1), sz,
+ (*it)->getAddressAndType().toString().c_str(),
+ (*it)->getName().c_str() );
}
}
void BTAdapter::printDeviceLists() noexcept {