sdbusplus: avoid deprecated phosphor::Timer
sdbusplus had an older type named `phosphor::Timer` which was
recently renamed to `sdbusplus::Timer`. Update the code to use
the new type alias.
Change-Id: If69434b3a3639b8f97ab16cab5da4d70e3379cb2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/chassishandler.cpp b/chassishandler.cpp
index ea233bf..553bbe0 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -37,7 +37,7 @@
#include <sstream>
#include <string>
-std::unique_ptr<phosphor::Timer> identifyTimer
+std::unique_ptr<sdbusplus::Timer> identifyTimer
__attribute__((init_priority(101)));
static ChassisIDState chassisIDState = ChassisIDState::reserved;
@@ -1474,7 +1474,7 @@
if (!identifyTimer)
{
identifyTimer =
- std::make_unique<phosphor::Timer>(enclosureIdentifyLedOff);
+ std::make_unique<sdbusplus::Timer>(enclosureIdentifyLedOff);
}
}
diff --git a/dbus-sdr/storagecommands.cpp b/dbus-sdr/storagecommands.cpp
index 7439fd3..e587c56 100644
--- a/dbus-sdr/storagecommands.cpp
+++ b/dbus-sdr/storagecommands.cpp
@@ -103,7 +103,7 @@
static uint16_t writeBus = invalidBus;
static uint8_t writeAddr = invalidAddr;
-std::unique_ptr<phosphor::Timer> writeTimer = nullptr;
+std::unique_ptr<sdbusplus::Timer> writeTimer = nullptr;
static std::vector<sdbusplus::bus::match_t> fruMatches;
ManagedObjectType frus;
@@ -148,7 +148,7 @@
void createTimers()
{
- writeTimer = std::make_unique<phosphor::Timer>(writeFruCache);
+ writeTimer = std::make_unique<sdbusplus::Timer>(writeFruCache);
}
void recalculateHashes()
diff --git a/host-cmd-manager.hpp b/host-cmd-manager.hpp
index cd96044..8937e43 100644
--- a/host-cmd-manager.hpp
+++ b/host-cmd-manager.hpp
@@ -102,7 +102,7 @@
std::queue<CommandHandler> workQueue{};
/** @brief Timer for commands to host */
- phosphor::Timer timer;
+ sdbusplus::Timer timer;
/** @brief Match handler for the requested host state */
sdbusplus::bus::match_t hostTransitionMatch;
diff --git a/host-interface.cpp b/host-interface.cpp
index f6ba817..6500174 100644
--- a/host-interface.cpp
+++ b/host-interface.cpp
@@ -97,7 +97,7 @@
ipmid_send_cmd_to_host(std::move(cmd));
// Timer to ensure this function returns something within a reasonable time
- phosphor::Timer hostAckTimer([hostCondition]() {
+ sdbusplus::Timer hostAckTimer([hostCondition]() {
log<level::DEBUG>("currentFirmwareCondition: timer expired!");
*(hostCondition.get()) = Host::FirmwareCondition::Off;
});
diff --git a/ipmid-new.cpp b/ipmid-new.cpp
index 1b123ed..9e12897 100644
--- a/ipmid-new.cpp
+++ b/ipmid-new.cpp
@@ -840,7 +840,7 @@
// TODO: Hack to keep the sdEvents running.... Not sure why the sd_event
// queue stops running if we don't have a timer that keeps re-arming
- phosphor::Timer t2([]() { ; });
+ sdbusplus::Timer t2([]() { ; });
t2.start(std::chrono::microseconds(500000), true);
// TODO: Remove all vestiges of sd_event from phosphor-host-ipmid