aboutsummaryrefslogtreecommitdiffstats
path: root/src/direct_bt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-05-05 10:10:18 +0200
committerSven Gothel <[email protected]>2022-05-05 10:10:18 +0200
commit9c4c81350696f0eb16dc5c04930669d24aaf279c (patch)
tree6fd4efe3d306cde5d3e4583050b76f0f210c1da0 /src/direct_bt
parentbcb69a16ba25efbe0212a556e7f9d59dffc4b9c2 (diff)
Use fraction_i64::to_ms() w/ PRIi64 in printf
Diffstat (limited to 'src/direct_bt')
-rw-r--r--src/direct_bt/BTDevice.cpp2
-rw-r--r--src/direct_bt/BTGattHandler.cpp2
-rw-r--r--src/direct_bt/HCIHandler.cpp20
3 files changed, 12 insertions, 12 deletions
diff --git a/src/direct_bt/BTDevice.cpp b/src/direct_bt/BTDevice.cpp
index b4a4a1c2..e7d7a92c 100644
--- a/src/direct_bt/BTDevice.cpp
+++ b/src/direct_bt/BTDevice.cpp
@@ -468,7 +468,7 @@ HCIStatusCode BTDevice::connectLE(const uint16_t le_scan_interval, const uint16_
}
if( hci.env.HCI_COMMAND_COMPLETE_REPLY_TIMEOUT <= td_disconnect ) {
// timeout
- ERR_PRINT("SEC AUTO.%d.4 Timeout Disconnect td_pairing %d ms: %s",
+ ERR_PRINT("SEC AUTO.%d.4 Timeout Disconnect td_pairing %" PRIi64 " ms: %s",
smp_auto_count, td_disconnect.to_ms(), toString().c_str());
pairing_data.ioCap_auto = SMPIOCapability::UNSET;
statusConnect = HCIStatusCode::INTERNAL_TIMEOUT;
diff --git a/src/direct_bt/BTGattHandler.cpp b/src/direct_bt/BTGattHandler.cpp
index 2ff53048..156e1dde 100644
--- a/src/direct_bt/BTGattHandler.cpp
+++ b/src/direct_bt/BTGattHandler.cpp
@@ -750,7 +750,7 @@ std::unique_ptr<const AttPDUMsg> BTGattHandler::sendWithReply(const AttPDUMsg &
std::unique_ptr<const AttPDUMsg> res;
if( !attPDURing.getBlocking(res, timeout) || nullptr == res ) {
errno = ETIMEDOUT;
- ERR_PRINT("GATTHandler::sendWithReply: nullptr result (timeout %d): req %s to %s", timeout.to_ms(), msg.toString().c_str(), toString().c_str());
+ ERR_PRINT("GATTHandler::sendWithReply: nullptr result (timeout %" PRIi64 " ms): req %s to %s", timeout.to_ms(), msg.toString().c_str(), toString().c_str());
has_ioerror = true;
disconnect(true /* disconnect_device */, true /* ioerr_cause */);
return nullptr;
diff --git a/src/direct_bt/HCIHandler.cpp b/src/direct_bt/HCIHandler.cpp
index 9e1aca74..6b29a656 100644
--- a/src/direct_bt/HCIHandler.cpp
+++ b/src/direct_bt/HCIHandler.cpp
@@ -607,8 +607,8 @@ std::unique_ptr<HCIEvent> HCIHandler::getNextReply(HCICommand &req, int32_t & re
std::unique_ptr<HCIEvent> ev;
if( !hciEventRing.getBlocking(ev, replyTimeout) || nullptr == ev ) {
errno = ETIMEDOUT;
- ERR_PRINT("HCIHandler<%u>::getNextReply: nullptr result (timeout %s -> abort): req %s - %s",
- dev_id, replyTimeout.to_string(), req.toString().c_str(), toString().c_str());
+ ERR_PRINT("HCIHandler<%u>::getNextReply: nullptr result (timeout %" PRIi64 " ms -> abort): req %s - %s",
+ dev_id, replyTimeout.to_ms(), req.toString().c_str(), toString().c_str());
return nullptr;
} else if( !ev->validate(req) ) {
// This could occur due to an earlier timeout w/ a nullptr == res (see above),
@@ -1259,9 +1259,9 @@ HCIStatusCode HCIHandler::le_create_conn(const EUI48 &peer_bdaddr,
pendingConnections = countPendingTrackerConnections();
}
if( 0 < pendingConnections ) {
- WARN_PRINT("HCIHandler::le_create_conn: %d connections pending after %d ms - %s", pendingConnections, td.to_ms(), toString().c_str());
+ WARN_PRINT("HCIHandler::le_create_conn: %d connections pending after %" PRIi64 " ms - %s", pendingConnections, td.to_ms(), toString().c_str());
} else {
- DBG_PRINT("HCIHandler::le_create_conn: pending connections resolved after %d ms - %s", td.to_ms(), toString().c_str());
+ DBG_PRINT("HCIHandler::le_create_conn: pending connections resolved after %" PRIi64 " ms - %s", td.to_ms(), toString().c_str());
}
}
const BDAddressAndType addressAndType(peer_bdaddr, to_BDAddressType(peer_mac_type));
@@ -1276,10 +1276,10 @@ HCIStatusCode HCIHandler::le_create_conn(const EUI48 &peer_bdaddr,
disconn = findDisconnectCmd(addressAndType);
}
if( nullptr != disconn ) {
- WARN_PRINT("HCIHandler::le_create_conn: disconnect persisting after %d ms: %s - %s",
+ WARN_PRINT("HCIHandler::le_create_conn: disconnect persisting after %" PRIi64 " ms: %s - %s",
td.to_ms(), disconn->toString().c_str(), toString().c_str());
} else {
- DBG_PRINT("HCIHandler::le_create_conn: disconnect resolved after %d ms - %s", td.to_ms(), toString().c_str());
+ DBG_PRINT("HCIHandler::le_create_conn: disconnect resolved after %" PRIi64 " ms - %s", td.to_ms(), toString().c_str());
}
}
HCIConnectionRef conn = addOrUpdateTrackerConnection(addressAndType, 0);
@@ -1388,9 +1388,9 @@ HCIStatusCode HCIHandler::create_conn(const EUI48 &bdaddr,
pendingConnections = countPendingTrackerConnections();
}
if( 0 < pendingConnections ) {
- WARN_PRINT("HCIHandler::create_conn: %d connections pending after %d ms - %s", pendingConnections, td.to_ms(), toString().c_str());
+ WARN_PRINT("HCIHandler::create_conn: %d connections pending after %" PRIi64 " ms - %s", pendingConnections, td.to_ms(), toString().c_str());
} else {
- DBG_PRINT("HCIHandler::create_conn: pending connections resolved after %d ms - %s", td.to_ms(), toString().c_str());
+ DBG_PRINT("HCIHandler::create_conn: pending connections resolved after %" PRIi64 " ms - %s", td.to_ms(), toString().c_str());
}
}
const BDAddressAndType addressAndType(bdaddr, BDAddressType::BDADDR_BREDR);
@@ -1405,10 +1405,10 @@ HCIStatusCode HCIHandler::create_conn(const EUI48 &bdaddr,
disconn = findDisconnectCmd(addressAndType);
}
if( nullptr != disconn ) {
- WARN_PRINT("HCIHandler::create_conn: disconnect persisting after %s ms: %s - %s",
+ WARN_PRINT("HCIHandler::create_conn: disconnect persisting after %" PRIi64 " ms: %s - %s",
td.to_ms(), disconn->toString().c_str(), toString().c_str());
} else {
- DBG_PRINT("HCIHandler::create_conn: disconnect resolved after %d ms - %s", td.to_ms(), toString().c_str());
+ DBG_PRINT("HCIHandler::create_conn: disconnect resolved after %" PRIi64 " ms - %s", td.to_ms(), toString().c_str());
}
}
HCIConnectionRef conn = addOrUpdateTrackerConnection(addressAndType, 0);