mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-08 21:16:39 +09:00
Merge branch 'feature-1095'
Conflicts: src/pool/PoolObjectSQL.cc
This commit is contained in:
commit
f736af49e4
9 files changed
+68
-64
No files matched your search
@@ -169,7 +169,6 @@ void PoolObjectSQL::set_template_error_message(const string& message)
|
||||
int PoolObjectSQL::replace_template(const string& tmpl_str, string& error)
|
||||
{
|
||||
Template * new_tmpl = get_new_template();
|
||||
char * error_msg = 0;
|
||||
|
||||
if ( new_tmpl == 0 )
|
||||
{
|
||||
@@ -177,21 +176,8 @@ int PoolObjectSQL::replace_template(const string& tmpl_str, string& error)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( new_tmpl->parse(tmpl_str, &error_msg) != 0 )
|
||||
if ( new_tmpl->parse_str_or_xml(tmpl_str, error) != 0 )
|
||||
{
|
||||
ostringstream oss;
|
||||
|
||||
oss << "Parse error";
|
||||
|
||||
if (error_msg != 0)
|
||||
{
|
||||
oss << ": " << error_msg;
|
||||
|
||||
free(error_msg);
|
||||
}
|
||||
|
||||
error = oss.str();
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user