bmc: move from data section objs to owned
Move from objects created ahead of purpose to owned objects. This is a
step towards integrating with the json support.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I738a5edd40724f17245911af1080c350f029fef1
diff --git a/bmc/firmware_handler.cpp b/bmc/firmware_handler.cpp
index d193a4d..fede302 100644
--- a/bmc/firmware_handler.cpp
+++ b/bmc/firmware_handler.cpp
@@ -39,7 +39,7 @@
std::unique_ptr<blobs::GenericBlobInterface>
FirmwareBlobHandler::CreateFirmwareBlobHandler(
- const std::vector<HandlerPack>& firmwares,
+ std::vector<HandlerPack>&& firmwares,
const std::vector<DataHandlerPack>& transports, ActionMap&& actionPacks)
{
/* There must be at least one. */
@@ -71,8 +71,9 @@
bitmask |= item.bitmask;
}
- return std::make_unique<FirmwareBlobHandler>(
- firmwares, blobs, transports, bitmask, std::move(actionPacks));
+ return std::make_unique<FirmwareBlobHandler>(std::move(firmwares), blobs,
+ transports, bitmask,
+ std::move(actionPacks));
}
/* Check if the path is in our supported list (or active list). */
@@ -507,7 +508,7 @@
curr->flags = flags;
curr->dataHandler = d->handler;
- curr->imageHandler = h->handler;
+ curr->imageHandler = h->handler.get();
lookup[session] = curr;