aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2014-09-21 23:23:20 +0100
committerUbitUmarov2014-09-21 23:23:20 +0100
commitd1ccc6d5cc6488939b8f35d1c84a9c6d5d675b76 (patch)
treeceaf44294024de6096298a7fcf5d78c4993747be /OpenSim/Region/Framework
parentremove LockItemsForRead(false) without previus call with true (diff)
downloadopensim-SC_OLD-d1ccc6d5cc6488939b8f35d1c84a9c6d5d675b76.zip
opensim-SC_OLD-d1ccc6d5cc6488939b8f35d1c84a9c6d5d675b76.tar.gz
opensim-SC_OLD-d1ccc6d5cc6488939b8f35d1c84a9c6d5d675b76.tar.bz2
opensim-SC_OLD-d1ccc6d5cc6488939b8f35d1c84a9c6d5d675b76.tar.xz
release lock a bit sooner when not needed, add a try on more complex db
store call
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 5b167a2..aeec54e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -1133,26 +1133,28 @@ namespace OpenSim.Region.Framework.Scenes
1133 1133
1134 if (m_inventorySerial == 0) // No inventory 1134 if (m_inventorySerial == 0) // No inventory
1135 { 1135 {
1136 client.SendTaskInventory(m_part.UUID, 0, new byte[0]);
1137 Items.LockItemsForRead(false); 1136 Items.LockItemsForRead(false);
1137 client.SendTaskInventory(m_part.UUID, 0, new byte[0]);
1138
1138 return; 1139 return;
1139 } 1140 }
1140 1141
1141 if (m_items.Count == 0) // No inventory 1142 if (m_items.Count == 0) // No inventory
1142 { 1143 {
1143 client.SendTaskInventory(m_part.UUID, 0, new byte[0]);
1144 Items.LockItemsForRead(false); 1144 Items.LockItemsForRead(false);
1145 client.SendTaskInventory(m_part.UUID, 0, new byte[0]);
1145 return; 1146 return;
1146 } 1147 }
1147 1148
1148 if (!changed) 1149 if (!changed)
1149 { 1150 {
1151 Items.LockItemsForRead(false);
1152
1150 xferManager.AddNewFile(filename, 1153 xferManager.AddNewFile(filename,
1151 m_inventoryFileData); 1154 m_inventoryFileData);
1152 client.SendTaskInventory(m_part.UUID, (short)m_inventoryFileNameSerial, 1155 client.SendTaskInventory(m_part.UUID, (short)m_inventoryFileNameSerial,
1153 Util.StringToBytes256(filename)); 1156 Util.StringToBytes256(filename));
1154 1157
1155 Items.LockItemsForRead(false);
1156 return; 1158 return;
1157 } 1159 }
1158 1160
@@ -1238,7 +1240,12 @@ namespace OpenSim.Region.Framework.Scenes
1238// if (HasInventoryChanged) 1240// if (HasInventoryChanged)
1239// { 1241// {
1240 Items.LockItemsForRead(true); 1242 Items.LockItemsForRead(true);
1241 datastore.StorePrimInventory(m_part.UUID, Items.Values); 1243 try
1244 {
1245 datastore.StorePrimInventory(m_part.UUID, Items.Values);
1246 }
1247 catch(){}
1248
1242 Items.LockItemsForRead(false); 1249 Items.LockItemsForRead(false);
1243 1250
1244 HasInventoryChanged = false; 1251 HasInventoryChanged = false;