From a9fdee48103c8e23486852c71ba86d86fa95a4eb Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Tue, 18 Jul 2017 13:44:58 +0200 Subject: [PATCH] B : Load vm_info from history records --- src/vm/History.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/vm/History.cc b/src/vm/History.cc index a987eceb29..eb7eeb0d25 100644 --- a/src/vm/History.cc +++ b/src/vm/History.cc @@ -343,6 +343,8 @@ string& History::to_xml(string& xml, bool database) const int History::rebuild_attributes() { + vector content; + int int_action; int rc = 0; @@ -375,6 +377,26 @@ int History::rebuild_attributes() action = static_cast(int_action); + // ------------------------------------------------------------------------- + ObjectXML::get_nodes("/HISTORY/VM", content); + + if (content.empty()) + { + return -1; + } + + ObjectXML vm_info_xml(content[0]); + + ostringstream oss; + + oss << vm_info_xml; + + vm_info = oss.str(); + + ObjectXML::free_nodes(content); + + content.clear(); + non_persistent_data(); if (rc != 0)