Fixed collision error with threaded access.
parent
042d69edaa
commit
9dfdd7d406
|
@ -41,13 +41,16 @@ namespace OpenGrid.Framework.Data.DB4o
|
||||||
|
|
||||||
public DataResponse AddProfile(SimProfileData profile)
|
public DataResponse AddProfile(SimProfileData profile)
|
||||||
{
|
{
|
||||||
if (manager.AddRow(profile))
|
lock (manager.profiles)
|
||||||
{
|
{
|
||||||
return DataResponse.RESPONSE_OK;
|
if (manager.AddRow(profile))
|
||||||
}
|
{
|
||||||
else
|
return DataResponse.RESPONSE_OK;
|
||||||
{
|
}
|
||||||
return DataResponse.RESPONSE_ERROR;
|
else
|
||||||
|
{
|
||||||
|
return DataResponse.RESPONSE_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue