log_services: don't replace res.jsonValue
There were places where res.jsonValue was being replaced by assigning a
new object. This changes those to use res.jsonValue.update() to replace
the contents instead of the entire object.
Tested:
Confirmed that individual event, journal, and crashdump entries can
still be retrieved.
Change-Id: I8a0885530af58393d4b90fe15390db8c3af02994
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 0a16866..6fee6ed 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -1289,7 +1289,7 @@
messages::internalError(asyncResp->res);
return;
}
- asyncResp->res.jsonValue = std::move(bmcLogEntry);
+ asyncResp->res.jsonValue.update(bmcLogEntry);
return;
}
}
@@ -2315,7 +2315,7 @@
messages::internalError(asyncResp->res);
return;
}
- asyncResp->res.jsonValue = std::move(bmcJournalLogEntry);
+ asyncResp->res.jsonValue.update(bmcJournalLogEntry);
});
}
@@ -2801,7 +2801,7 @@
}
else
{
- logEntryJson = logEntry;
+ logEntryJson.update(logEntry);
}
};
crow::connections::systemBus->async_method_call(