Fixed collision error with threaded access.

0.1-prestable
Adam Frisby 2007-05-06 01:43:12 +00:00
parent 042d69edaa
commit 9dfdd7d406
1 changed files with 9 additions and 6 deletions

View File

@ -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;
}
} }
} }