aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MSSQL
diff options
context:
space:
mode:
authorSean Dague2007-12-08 14:27:12 +0000
committerSean Dague2007-12-08 14:27:12 +0000
commit0855066968e30a9965088c14234b2bc93daf0481 (patch)
tree9f2a0c9a520af4bfa53fd3aa1ae651f0130bd5bb /OpenSim/Framework/Data.MSSQL
parentset svn:eol-style (diff)
downloadopensim-SC_OLD-0855066968e30a9965088c14234b2bc93daf0481.zip
opensim-SC_OLD-0855066968e30a9965088c14234b2bc93daf0481.tar.gz
opensim-SC_OLD-0855066968e30a9965088c14234b2bc93daf0481.tar.bz2
opensim-SC_OLD-0855066968e30a9965088c14234b2bc93daf0481.tar.xz
This patch fixes mantis 105. Basically, it stops the index exception when
no root folder is found and it makes the user server wait longer for the inventory server to do its work. From Justin Casey (IBM)
Diffstat (limited to 'OpenSim/Framework/Data.MSSQL')
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
index 364e0f2..cd0470c 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
@@ -201,11 +201,7 @@ namespace OpenSim.Framework.Data.MSSQL
201 } 201 }
202 } 202 }
203 203
204 /// <summary> 204 // see InventoryItemBase.getUserRootFolder
205 /// Returns the users inventory root folder.
206 /// </summary>
207 /// <param name="user"></param>
208 /// <returns></returns>
209 public InventoryFolderBase getUserRootFolder(LLUUID user) 205 public InventoryFolderBase getUserRootFolder(LLUUID user)
210 { 206 {
211 try 207 try
@@ -224,8 +220,14 @@ namespace OpenSim.Framework.Data.MSSQL
224 items.Add(readInventoryFolder(reader)); 220 items.Add(readInventoryFolder(reader));
225 221
226 InventoryFolderBase rootFolder = null; 222 InventoryFolderBase rootFolder = null;
223
224 // There should only ever be one root folder for a user. However, if there's more
225 // than one we'll simply use the first one rather than failing. It would be even
226 // nicer to print some message to this effect, but this feels like it's too low a
227 // to put such a message out, and it's too minor right now to spare the time to
228 // suitably refactor.
227 if (items.Count > 0) { 229 if (items.Count > 0) {
228 rootFolder = items[0]; //should only be one folder with parent set to zero (the root one). 230 rootFolder = items[0];
229 } 231 }
230 232
231 reader.Close(); 233 reader.Close();
@@ -694,4 +696,4 @@ namespace OpenSim.Framework.Data.MSSQL
694 } 696 }
695 } 697 }
696 } 698 }
697} \ No newline at end of file 699}