bug #1807: Adds a new ERROR_MONITOR message. Fix monitor timers when monitor fails.

This commit is contained in:
Ruben S. Montero committed 2013-03-15 17:37:47 +01:00
1 parent 15ff8b16e9
commit 9af900cd35
7 files changed
+94 -25

No files matched your search

+11 -8
View File
@@ -134,29 +134,32 @@ int PoolObjectSQL::drop(SqlDB *db)
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
const char * PoolObjectSQL::error_attribute_name = "ERROR";
void PoolObjectSQL::set_template_error_message(const string& message)
{
set_template_error_message("ERROR", message);
}
/* -------------------------------------------------------------------------- */
void PoolObjectSQL::set_template_error_message(const string& name,
const string& message)
{
SingleAttribute * attr;
ostringstream error_value;
error_value << one_util::log_time() << " : " << message;
//Replace previous error message and insert the new one
attr = new SingleAttribute(name, error_value.str());
attr = new SingleAttribute(error_attribute_name, error_value.str());
obj_template->erase(error_attribute_name);
obj_template->erase(name);
obj_template->set(attr);
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
void PoolObjectSQL::clear_template_error_message()
{
remove_template_attribute(error_attribute_name);
remove_template_attribute("ERROR");
}
/* -------------------------------------------------------------------------- */