aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid
diff options
context:
space:
mode:
authorJustin Clarke Casey2007-12-15 19:42:23 +0000
committerJustin Clarke Casey2007-12-15 19:42:23 +0000
commitc63369017f0ac8e204f79978f20d5c2abdf5bef2 (patch)
tree97b26f9efc262bdf0d691e84bf19f2175124984b /OpenSim/Grid
parent* Added support for multiple terrain blocks to be edited at the same time (diff)
downloadopensim-SC-c63369017f0ac8e204f79978f20d5c2abdf5bef2.zip
opensim-SC-c63369017f0ac8e204f79978f20d5c2abdf5bef2.tar.gz
opensim-SC-c63369017f0ac8e204f79978f20d5c2abdf5bef2.tar.bz2
opensim-SC-c63369017f0ac8e204f79978f20d5c2abdf5bef2.tar.xz
* Make inventory operations sync rather than async. This is to alleviate race conditions such as that in mantis #190
* Make inventory messages more verbose. Hopefully they aren't now too verbose * This may resolve some grid instability but it's likely there's much more out there.
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r--OpenSim/Grid/InventoryServer/GridInventoryService.cs36
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs14
2 files changed, 40 insertions, 10 deletions
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index 6ae1d82..150a262 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -31,6 +31,7 @@ using System.Collections.Generic;
31using System.Text; 31using System.Text;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Framework.Communications; 33using OpenSim.Framework.Communications;
34using OpenSim.Framework.Console;
34using libsecondlife; 35using libsecondlife;
35 36
36namespace OpenSim.Grid.InventoryServer 37namespace OpenSim.Grid.InventoryServer
@@ -105,9 +106,10 @@ namespace OpenSim.Grid.InventoryServer
105 106
106 public InventoryCollection GetUserInventory(Guid rawUserID) 107 public InventoryCollection GetUserInventory(Guid rawUserID)
107 { 108 {
108 Console.WriteLine("Request for Inventory for " + rawUserID.ToString());
109 LLUUID userID = new LLUUID(rawUserID); 109 LLUUID userID = new LLUUID(rawUserID);
110 110
111 MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToStringHyphenated());
112
111 InventoryCollection invCollection = new InventoryCollection(); 113 InventoryCollection invCollection = new InventoryCollection();
112 List<InventoryFolderBase> folders; 114 List<InventoryFolderBase> folders;
113 List<InventoryItemBase> allItems; 115 List<InventoryItemBase> allItems;
@@ -124,7 +126,9 @@ namespace OpenSim.Grid.InventoryServer
124 { 126 {
125 LLUUID userID = new LLUUID(rawUserID); 127 LLUUID userID = new LLUUID(rawUserID);
126 128
127 Console.WriteLine("Creating New Set of Inventory Folders for " + userID.ToStringHyphenated()); 129 MainLog.Instance.Verbose(
130 "INVENTORY", "Creating new set of inventory folders for " + userID.ToStringHyphenated());
131
128 CreateNewUserInventory(userID); 132 CreateNewUserInventory(userID);
129 return true; 133 return true;
130 } 134 }
@@ -145,27 +149,49 @@ namespace OpenSim.Grid.InventoryServer
145 AddItem(item); 149 AddItem(item);
146 } 150 }
147 151
148 public bool AddInventoryFolder( InventoryFolderBase folder) 152 public bool AddInventoryFolder(InventoryFolderBase folder)
149 { 153 {
154 // Right now, this actions act more like an update/insert combination than a simple create.
155 MainLog.Instance.Verbose(
156 "INVENTORY",
157 "Updating in " + folder.parentID.ToStringHyphenated()
158 + ", folder " + folder.name);
159
150 AddNewInventoryFolder(folder.agentID, folder); 160 AddNewInventoryFolder(folder.agentID, folder);
151 return true; 161 return true;
152 } 162 }
153 163
154 public bool MoveInventoryFolder(InventoryFolderBase folder) 164 public bool MoveInventoryFolder(InventoryFolderBase folder)
155 { 165 {
166 MainLog.Instance.Verbose(
167 "INVENTORY",
168 "Moving folder " + folder.folderID
169 + " to " + folder.parentID.ToStringHyphenated());
170
156 MoveExistingInventoryFolder(folder); 171 MoveExistingInventoryFolder(folder);
157 return true; 172 return true;
158 } 173 }
159 174
160 public bool AddInventoryItem( InventoryItemBase item) 175 public bool AddInventoryItem( InventoryItemBase item)
161 { 176 {
162 Console.WriteLine("creating new item for " + item.avatarID.ToString()); 177 // Right now, this actions act more like an update/insert combination than a simple create.
178 MainLog.Instance.Verbose(
179 "INVENTORY",
180 "Updating in " + item.parentFolderID.ToStringHyphenated()
181 + ", item " + item.inventoryName);
182
163 AddNewInventoryItem(item.avatarID, item); 183 AddNewInventoryItem(item.avatarID, item);
164 return true; 184 return true;
165 } 185 }
166 186
167 public override void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) 187 public override void DeleteInventoryItem(LLUUID userID, InventoryItemBase item)
168 { 188 {
189 // extra spaces to align with other inventory messages
190 MainLog.Instance.Verbose(
191 "INVENTORY",
192 "Deleting in " + item.parentFolderID.ToStringHyphenated()
193 + ", item " + item.inventoryName);
194
169 DeleteItem(item); 195 DeleteItem(item);
170 } 196 }
171 197
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index 02db6d0..ccba1de 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Grid.UserServer
60 public override void CustomiseResponse(LoginResponse response, UserProfileData theUser) 60 public override void CustomiseResponse(LoginResponse response, UserProfileData theUser)
61 { 61 {
62 bool tryDefault = false; 62 bool tryDefault = false;
63 System.Console.WriteLine("Load information from the gridserver"); 63 MainLog.Instance.Verbose("LOGIN", "Load information from the gridserver");
64 RegionProfileData SimInfo = new RegionProfileData(); 64 RegionProfileData SimInfo = new RegionProfileData();
65 try 65 try
66 { 66 {
@@ -69,7 +69,7 @@ namespace OpenSim.Grid.UserServer
69 m_config.GridSendKey, m_config.GridRecvKey); 69 m_config.GridSendKey, m_config.GridRecvKey);
70 70
71 // Customise the response 71 // Customise the response
72 System.Console.WriteLine("Home Location"); 72 MainLog.Instance.Verbose("LOGIN", "Home Location");
73 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + 73 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" +
74 (SimInfo.regionLocY * 256).ToString() + "], " + 74 (SimInfo.regionLocY * 256).ToString() + "], " +
75 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + 75 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" +
@@ -128,7 +128,11 @@ namespace OpenSim.Grid.UserServer
128 // Load information from the gridserver 128 // Load information from the gridserver
129 129
130 ulong defaultHandle = (((ulong)m_config.DefaultX * 256) << 32) | ((ulong) m_config.DefaultY * 256); 130 ulong defaultHandle = (((ulong)m_config.DefaultX * 256) << 32) | ((ulong) m_config.DefaultY * 256);
131 MainLog.Instance.Warn("Home region not available: sending to default region " + defaultHandle.ToString()); 131
132 MainLog.Instance.Warn(
133 "LOGIN",
134 "Home region not available: sending to default region " + defaultHandle.ToString());
135
132 SimInfo = new RegionProfileData(); 136 SimInfo = new RegionProfileData();
133 try 137 try
134 { 138 {
@@ -137,7 +141,7 @@ namespace OpenSim.Grid.UserServer
137 m_config.GridSendKey, m_config.GridRecvKey); 141 m_config.GridSendKey, m_config.GridRecvKey);
138 142
139 // Customise the response 143 // Customise the response
140 System.Console.WriteLine("Home Location"); 144 MainLog.Instance.Verbose("LOGIN", "Home Location");
141 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + 145 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" +
142 (SimInfo.regionLocY * 256).ToString() + "], " + 146 (SimInfo.regionLocY * 256).ToString() + "], " +
143 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + 147 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" +
@@ -189,7 +193,7 @@ namespace OpenSim.Grid.UserServer
189 catch (Exception e) 193 catch (Exception e)
190 { 194 {
191 MainLog.Instance.Warn("LOGIN", "Default region also not available"); 195 MainLog.Instance.Warn("LOGIN", "Default region also not available");
192 MainLog.Instance.Verbose("LOGIN", e.ToString()); 196 MainLog.Instance.Warn("LOGIN", e.ToString());
193 } 197 }
194 198
195 } 199 }