oops closed too soon

httptests
UbitUmarov 2017-05-06 22:12:45 +01:00
parent c57215687f
commit de55ad9545
1 changed files with 87 additions and 82 deletions

View File

@ -878,7 +878,8 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("?regionID", regionUUID.ToString());
IDataReader result = ExecuteReader(cmd);
using(IDataReader result = ExecuteReader(cmd))
{
if(!result.Read())
{
//No result, so store our default windlight profile and return it
@ -954,6 +955,7 @@ namespace OpenSim.Data.MySQL
nWP.valid = true;
}
}
}
dbcon.Close();
}
@ -1141,7 +1143,8 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("?region_id", regionUUID.ToString());
IDataReader result = ExecuteReader(cmd);
using(IDataReader result = ExecuteReader(cmd))
{
if(!result.Read())
{
dbcon.Close();
@ -1149,8 +1152,10 @@ namespace OpenSim.Data.MySQL
}
else
{
string ret = Convert.ToString(result["llsd_settings"]);
dbcon.Close();
return Convert.ToString(result["llsd_settings"]);
return ret;
}
}
}
}