.XmlRpc: double formatting changed to %.12g, PGSQL: Reconnect if error message contains connect

git-svn-id: svn://ultimatepp.org/upp/trunk@2694 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-09-15 15:43:15 +00:00
parent 99b83d0eb5
commit ce0f8adf42
2 changed files with 3 additions and 2 deletions

View file

@ -303,7 +303,8 @@ void PostgreSQLSession::ExecTrans(const char * statement)
return;
}
}
while(level == 0 && !ConnectionOK() && WhenReconnect(itry++));
while(level == 0 && (!ConnectionOK() || ErrorMessage().Find("connection") >= 0 && itry == 0)
&& WhenReconnect(itry++));
if(trace)
*trace << statement << " failed: " << ErrorMessage() << "\n";

View file

@ -107,7 +107,7 @@ String FormatXmlRpcValue(const Value& v)
r = XmlTag("boolean")(AsString((int)(bool)v));
else
if(IsNumber(v))
r = XmlTag("double")(Format("%g", (double)v));
r = XmlTag("double")(Format("%.12g", (double)v));
else
if(IsDateTime(v)) {
Time t = v;