aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid
diff options
context:
space:
mode:
authorlbsa712007-12-27 21:41:48 +0000
committerlbsa712007-12-27 21:41:48 +0000
commitefd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch)
treebf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Grid
parent* removed always true if (diff)
downloadopensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz
* Optimized usings
* shortened references * Removed redundant 'this' * Normalized EOF
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs2
-rw-r--r--OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Grid/AssetServer/RestService.cs4
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs17
-rw-r--r--OpenSim/Grid/GridServer/Main.cs4
-rw-r--r--OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Grid/InventoryServer/GridInventoryService.cs45
-rw-r--r--OpenSim/Grid/InventoryServer/InventoryManager.cs43
-rw-r--r--OpenSim/Grid/InventoryServer/Main.cs34
-rw-r--r--OpenSim/Grid/ScriptServer/Application.cs2
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs2
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineInterface.cs2
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs2
-rw-r--r--OpenSim/Grid/UserServer/Main.cs21
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs65
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs32
16 files changed, 142 insertions, 137 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index c4e8e64..5d3d265 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -242,4 +242,4 @@ namespace OpenSim.Grid.AssetServer
242 { 242 {
243 } 243 }
244 } 244 }
245} 245} \ No newline at end of file
diff --git a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs
index 6608bd0..d598094 100644
--- a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs
+++ b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs
@@ -60,4 +60,4 @@ using System.Runtime.InteropServices;
60// 60//
61 61
62[assembly : AssemblyVersion("1.0.0.0")] 62[assembly : AssemblyVersion("1.0.0.0")]
63[assembly : AssemblyFileVersion("1.0.0.0")] 63[assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file
diff --git a/OpenSim/Grid/AssetServer/RestService.cs b/OpenSim/Grid/AssetServer/RestService.cs
index 1f44686..ee44108 100644
--- a/OpenSim/Grid/AssetServer/RestService.cs
+++ b/OpenSim/Grid/AssetServer/RestService.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Grid.AssetServer
45 45
46 public override byte[] Handle(string path, Stream request) 46 public override byte[] Handle(string path, Stream request)
47 { 47 {
48 MainLog.Instance.Verbose("REST", "In Handle"); 48 MainLog.Instance.Verbose("REST", "In Handle");
49 string param = GetParam(path); 49 string param = GetParam(path);
50 byte[] result = new byte[] {}; 50 byte[] result = new byte[] {};
51 try 51 try
@@ -129,4 +129,4 @@ namespace OpenSim.Grid.AssetServer
129 m_assetProvider = assetProvider; 129 m_assetProvider = assetProvider;
130 } 130 }
131 } 131 }
132} 132} \ No newline at end of file
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index cb9f979..65df708 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -434,8 +434,8 @@ namespace OpenSim.Grid.GridServer
434 } 434 }
435 else 435 else
436 { 436 {
437 MainLog.Instance.Verbose("DATA", "found " + (string)simData.regionName + " regionHandle = " + 437 MainLog.Instance.Verbose("DATA", "found " + (string) simData.regionName + " regionHandle = " +
438 (string)requestData["region_handle"]); 438 (string) requestData["region_handle"]);
439 responseData["sim_ip"] = Util.GetHostFromDNS(simData.serverIP).ToString(); 439 responseData["sim_ip"] = Util.GetHostFromDNS(simData.serverIP).ToString();
440 responseData["sim_port"] = simData.serverPort.ToString(); 440 responseData["sim_port"] = simData.serverPort.ToString();
441 responseData["http_port"] = simData.httpPort.ToString(); 441 responseData["http_port"] = simData.httpPort.ToString();
@@ -513,7 +513,7 @@ namespace OpenSim.Grid.GridServer
513 simProfileList.Add(simProfileBlock); 513 simProfileList.Add(simProfileBlock);
514 } 514 }
515 MainLog.Instance.Verbose("MAP", "Fast map " + simProfileList.Count.ToString() + 515 MainLog.Instance.Verbose("MAP", "Fast map " + simProfileList.Count.ToString() +
516 " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")" ); 516 " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")");
517 } 517 }
518 else 518 else
519 { 519 {
@@ -548,7 +548,7 @@ namespace OpenSim.Grid.GridServer
548 } 548 }
549 } 549 }
550 MainLog.Instance.Verbose("MAP", "Std map " + simProfileList.Count.ToString() + 550 MainLog.Instance.Verbose("MAP", "Std map " + simProfileList.Count.ToString() +
551 " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")"); 551 " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")");
552 } 552 }
553 553
554 responseData["sim-profiles"] = simProfileList; 554 responseData["sim-profiles"] = simProfileList;
@@ -713,7 +713,8 @@ namespace OpenSim.Grid.GridServer
713 713
714 try 714 try
715 { 715 {
716 MainLog.Instance.Verbose("DATA", "Updating / adding via " + _plugins.Count + " storage provider(s) registered."); 716 MainLog.Instance.Verbose("DATA",
717 "Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
717 foreach (KeyValuePair<string, IGridData> kvp in _plugins) 718 foreach (KeyValuePair<string, IGridData> kvp in _plugins)
718 { 719 {
719 try 720 try
@@ -733,14 +734,14 @@ namespace OpenSim.Grid.GridServer
733 { 734 {
734 MainLog.Instance.Warn("grid", 735 MainLog.Instance.Warn("grid",
735 "Unable to update region (RestSetSimMethod): Incorrect reservation auth key."); 736 "Unable to update region (RestSetSimMethod): Incorrect reservation auth key.");
736 // Wanted: " + reserveData.gridRecvKey + ", Got: " + TheSim.regionRecvKey + "."); 737 // Wanted: " + reserveData.gridRecvKey + ", Got: " + TheSim.regionRecvKey + ".");
737 return "Unable to update region (RestSetSimMethod): Incorrect auth key."; 738 return "Unable to update region (RestSetSimMethod): Incorrect auth key.";
738 } 739 }
739 } 740 }
740 catch (Exception e) 741 catch (Exception e)
741 { 742 {
742 MainLog.Instance.Warn("GRID", "getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + 743 MainLog.Instance.Warn("GRID", "getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " +
743 e.ToString()); 744 e.ToString());
744 } 745 }
745 } 746 }
746 return "OK"; 747 return "OK";
@@ -751,4 +752,4 @@ namespace OpenSim.Grid.GridServer
751 } 752 }
752 } 753 }
753 } 754 }
754} 755} \ No newline at end of file
diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs
index 5bae6a6..cdd37c4 100644
--- a/OpenSim/Grid/GridServer/Main.cs
+++ b/OpenSim/Grid/GridServer/Main.cs
@@ -103,7 +103,7 @@ namespace OpenSim.Grid.GridServer
103 public void Startup() 103 public void Startup()
104 { 104 {
105 Cfg = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml"))); 105 Cfg = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml")));
106 //Yeah srsly, that's it. 106 //Yeah srsly, that's it.
107 if (setuponly) Environment.Exit(0); 107 if (setuponly) Environment.Exit(0);
108 108
109 m_console.Verbose("GRID", "Connecting to Storage Server"); 109 m_console.Verbose("GRID", "Connecting to Storage Server");
@@ -218,4 +218,4 @@ namespace OpenSim.Grid.GridServer
218 } 218 }
219 }*/ 219 }*/
220 } 220 }
221} 221} \ No newline at end of file
diff --git a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs
index 0399b3b..6f837e6 100644
--- a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs
+++ b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs
@@ -60,4 +60,4 @@ using System.Runtime.InteropServices;
60// 60//
61 61
62[assembly : AssemblyVersion("1.0.0.0")] 62[assembly : AssemblyVersion("1.0.0.0")]
63[assembly : AssemblyFileVersion("1.0.0.0")] 63[assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index ca2e526..d36a915 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -1,4 +1,4 @@
1/* 1/*
2* Copyright (c) Contributors, http://opensimulator.org/ 2* Copyright (c) Contributors, http://opensimulator.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
@@ -28,23 +28,22 @@
28 28
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text; 31using libsecondlife;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Framework.Communications; 33using OpenSim.Framework.Communications;
34using OpenSim.Framework.Console; 34using OpenSim.Framework.Console;
35using libsecondlife;
36 35
37namespace OpenSim.Grid.InventoryServer 36namespace OpenSim.Grid.InventoryServer
38{ 37{
39 public class GridInventoryService : InventoryServiceBase 38 public class GridInventoryService : InventoryServiceBase
40 { 39 {
41 public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, 40 public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack,
42 InventoryItemInfo itemCallBack) 41 InventoryItemInfo itemCallBack)
43 { 42 {
44
45 } 43 }
46 44
47 private bool TryGetUsersInventory(LLUUID userID, out List<InventoryFolderBase> folderList, out List<InventoryItemBase> itemsList) 45 private bool TryGetUsersInventory(LLUUID userID, out List<InventoryFolderBase> folderList,
46 out List<InventoryItemBase> itemsList)
48 { 47 {
49 List<InventoryFolderBase> rootFolders = RequestFirstLevelFolders(userID); 48 List<InventoryFolderBase> rootFolders = RequestFirstLevelFolders(userID);
50 List<InventoryItemBase> allItems = new List<InventoryItemBase>(); 49 List<InventoryItemBase> allItems = new List<InventoryItemBase>();
@@ -107,10 +106,10 @@ namespace OpenSim.Grid.InventoryServer
107 public InventoryCollection GetUserInventory(Guid rawUserID) 106 public InventoryCollection GetUserInventory(Guid rawUserID)
108 { 107 {
109 LLUUID userID = new LLUUID(rawUserID); 108 LLUUID userID = new LLUUID(rawUserID);
110 109
111 // We get enough verbose messages later on for diagnostics 110 // We get enough verbose messages later on for diagnostics
112 //MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToString()); 111 //MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToString());
113 112
114 InventoryCollection invCollection = new InventoryCollection(); 113 InventoryCollection invCollection = new InventoryCollection();
115 List<InventoryFolderBase> folders; 114 List<InventoryFolderBase> folders;
116 List<InventoryItemBase> allItems; 115 List<InventoryItemBase> allItems;
@@ -126,14 +125,14 @@ namespace OpenSim.Grid.InventoryServer
126 public bool CreateUsersInventory(Guid rawUserID) 125 public bool CreateUsersInventory(Guid rawUserID)
127 { 126 {
128 LLUUID userID = new LLUUID(rawUserID); 127 LLUUID userID = new LLUUID(rawUserID);
129 128
130 MainLog.Instance.Verbose( 129 MainLog.Instance.Verbose(
131 "INVENTORY", "Creating new set of inventory folders for " + userID.ToString()); 130 "INVENTORY", "Creating new set of inventory folders for " + userID.ToString());
132 131
133 CreateNewUserInventory(userID); 132 CreateNewUserInventory(userID);
134 return true; 133 return true;
135 } 134 }
136 135
137 136
138 public override void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder) 137 public override void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder)
139 { 138 {
@@ -156,30 +155,30 @@ namespace OpenSim.Grid.InventoryServer
156 MainLog.Instance.Verbose( 155 MainLog.Instance.Verbose(
157 "INVENTORY", 156 "INVENTORY",
158 "Updating in " + folder.parentID.ToString() 157 "Updating in " + folder.parentID.ToString()
159 + ", folder " + folder.name); 158 + ", folder " + folder.name);
160 159
161 AddNewInventoryFolder(folder.agentID, folder); 160 AddNewInventoryFolder(folder.agentID, folder);
162 return true; 161 return true;
163 } 162 }
164 163
165 public bool MoveInventoryFolder(InventoryFolderBase folder) 164 public bool MoveInventoryFolder(InventoryFolderBase folder)
166 { 165 {
167 MainLog.Instance.Verbose( 166 MainLog.Instance.Verbose(
168 "INVENTORY", 167 "INVENTORY",
169 "Moving folder " + folder.folderID 168 "Moving folder " + folder.folderID
170 + " to " + folder.parentID.ToString()); 169 + " to " + folder.parentID.ToString());
171 170
172 MoveExistingInventoryFolder(folder); 171 MoveExistingInventoryFolder(folder);
173 return true; 172 return true;
174 } 173 }
175 174
176 public bool AddInventoryItem( InventoryItemBase item) 175 public bool AddInventoryItem(InventoryItemBase item)
177 { 176 {
178 // Right now, this actions act more like an update/insert combination than a simple create. 177 // Right now, this actions act more like an update/insert combination than a simple create.
179 MainLog.Instance.Verbose( 178 MainLog.Instance.Verbose(
180 "INVENTORY", 179 "INVENTORY",
181 "Updating in " + item.parentFolderID.ToString() 180 "Updating in " + item.parentFolderID.ToString()
182 + ", item " + item.inventoryName); 181 + ", item " + item.inventoryName);
183 182
184 AddNewInventoryItem(item.avatarID, item); 183 AddNewInventoryItem(item.avatarID, item);
185 return true; 184 return true;
@@ -191,15 +190,15 @@ namespace OpenSim.Grid.InventoryServer
191 MainLog.Instance.Verbose( 190 MainLog.Instance.Verbose(
192 "INVENTORY", 191 "INVENTORY",
193 "Deleting in " + item.parentFolderID.ToString() 192 "Deleting in " + item.parentFolderID.ToString()
194 + ", item " + item.inventoryName); 193 + ", item " + item.inventoryName);
195 194
196 DeleteItem(item); 195 DeleteItem(item);
197 } 196 }
198 197
199 public bool DeleteInvItem( InventoryItemBase item) 198 public bool DeleteInvItem(InventoryItemBase item)
200 { 199 {
201 DeleteInventoryItem(item.avatarID, item); 200 DeleteInventoryItem(item.avatarID, item);
202 return true; 201 return true;
203 } 202 }
204 } 203 }
205} 204} \ No newline at end of file
diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs
index 1070bcf..a003ce3 100644
--- a/OpenSim/Grid/InventoryServer/InventoryManager.cs
+++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs
@@ -25,26 +25,23 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28
28using System; 29using System;
29using System.IO; 30using System.IO;
30using System.Text;
31using System.Reflection; 31using System.Reflection;
32using System.Collections; 32using System.Text;
33using System.Collections.Generic;
34using System.Xml; 33using System.Xml;
35using System.Xml.Serialization; 34using System.Xml.Serialization;
36using libsecondlife; 35using libsecondlife;
37
38using OpenSim.Framework; 36using OpenSim.Framework;
39using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
40using OpenSim.Framework.Servers; 38using OpenSim.Framework.Servers;
41 39
42namespace OpenSim.Grid.InventoryServer 40namespace OpenSim.Grid.InventoryServer
43{ 41{
44
45 public class InventoryManager 42 public class InventoryManager
46 { 43 {
47 IInventoryData _databasePlugin; 44 private IInventoryData _databasePlugin;
48 45
49 /// <summary> 46 /// <summary>
50 /// Adds a new inventory server plugin - user servers will be requested in the order they were loaded. 47 /// Adds a new inventory server plugin - user servers will be requested in the order they were loaded.
@@ -55,7 +52,8 @@ namespace OpenSim.Grid.InventoryServer
55 MainLog.Instance.Verbose(OpenInventory_Main.LogName, "Invenstorage: Attempting to load " + FileName); 52 MainLog.Instance.Verbose(OpenInventory_Main.LogName, "Invenstorage: Attempting to load " + FileName);
56 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 53 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
57 54
58 MainLog.Instance.Verbose(OpenInventory_Main.LogName, "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); 55 MainLog.Instance.Verbose(OpenInventory_Main.LogName,
56 "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
59 foreach (Type pluginType in pluginAssembly.GetTypes()) 57 foreach (Type pluginType in pluginAssembly.GetTypes())
60 { 58 {
61 if (!pluginType.IsAbstract) 59 if (!pluginType.IsAbstract)
@@ -64,10 +62,12 @@ namespace OpenSim.Grid.InventoryServer
64 62
65 if (typeInterface != null) 63 if (typeInterface != null)
66 { 64 {
67 IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 65 IInventoryData plug =
66 (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
68 plug.Initialise(); 67 plug.Initialise();
69 _databasePlugin = plug; 68 _databasePlugin = plug;
70 MainLog.Instance.Verbose(OpenInventory_Main.LogName, "Invenstorage: Added IInventoryData Interface"); 69 MainLog.Instance.Verbose(OpenInventory_Main.LogName,
70 "Invenstorage: Added IInventoryData Interface");
71 break; 71 break;
72 } 72 }
73 73
@@ -82,8 +82,8 @@ namespace OpenSim.Grid.InventoryServer
82 { 82 {
83 FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); 83 FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
84 XmlReader reader = new XmlTextReader(fs); 84 XmlReader reader = new XmlTextReader(fs);
85 XmlSerializer x = new XmlSerializer(typeof(SerializableInventory)); 85 XmlSerializer x = new XmlSerializer(typeof (SerializableInventory));
86 SerializableInventory inventory = (SerializableInventory)x.Deserialize(reader); 86 SerializableInventory inventory = (SerializableInventory) x.Deserialize(reader);
87 fs.Close(); 87 fs.Close();
88 fs.Dispose(); 88 fs.Dispose();
89 return inventory; 89 return inventory;
@@ -93,11 +93,12 @@ namespace OpenSim.Grid.InventoryServer
93 { 93 {
94 XmlTextWriter writer = new XmlTextWriter(s, Encoding.UTF8); 94 XmlTextWriter writer = new XmlTextWriter(s, Encoding.UTF8);
95 writer.Formatting = Formatting.Indented; 95 writer.Formatting = Formatting.Indented;
96 XmlSerializer x = new XmlSerializer(typeof(SerializableInventory)); 96 XmlSerializer x = new XmlSerializer(typeof (SerializableInventory));
97 x.Serialize(writer, inventory); 97 x.Serialize(writer, inventory);
98 } 98 }
99 99
100 protected static bool fixupFolder(SerializableInventory.SerializableFolder f, SerializableInventory.SerializableFolder parent) 100 protected static bool fixupFolder(SerializableInventory.SerializableFolder f,
101 SerializableInventory.SerializableFolder parent)
101 { 102 {
102 bool modified = false; 103 bool modified = false;
103 104
@@ -142,6 +143,7 @@ namespace OpenSim.Grid.InventoryServer
142 { 143 {
143 private SerializableInventory _inventory; 144 private SerializableInventory _inventory;
144 private InventoryManager _manager; 145 private InventoryManager _manager;
146
145 public GetInventory(InventoryManager manager) 147 public GetInventory(InventoryManager manager)
146 : base("GET", "/inventory") 148 : base("GET", "/inventory")
147 { 149 {
@@ -165,23 +167,24 @@ namespace OpenSim.Grid.InventoryServer
165 private byte[] GetUserInventory(LLUUID userID) 167 private byte[] GetUserInventory(LLUUID userID)
166 { 168 {
167 MainLog.Instance.Notice(OpenInventory_Main.LogName, "Getting Inventory for user {0}", userID.ToString()); 169 MainLog.Instance.Notice(OpenInventory_Main.LogName, "Getting Inventory for user {0}", userID.ToString());
168 byte[] result = new byte[] { }; 170 byte[] result = new byte[] {};
169 171
170 InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID); 172 InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID);
171 if (fb == null) 173 if (fb == null)
172 { 174 {
173 MainLog.Instance.Notice(OpenInventory_Main.LogName, "Inventory not found for user {0}, creating new", userID.ToString()); 175 MainLog.Instance.Notice(OpenInventory_Main.LogName, "Inventory not found for user {0}, creating new",
176 userID.ToString());
174 CreateDefaultInventory(userID); 177 CreateDefaultInventory(userID);
175 } 178 }
176 179
177 return result; 180 return result;
178 } 181 }
179 182
180 override public byte[] Handle(string path, Stream request) 183 public override byte[] Handle(string path, Stream request)
181 { 184 {
182 byte[] result = new byte[] { }; 185 byte[] result = new byte[] {};
183 186
184 string[] parms = path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); 187 string[] parms = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
185 if (parms.Length > 1) 188 if (parms.Length > 1)
186 { 189 {
187 if (string.Compare(parms[1], "library", true) == 0) 190 if (string.Compare(parms[1], "library", true) == 0)
@@ -190,7 +193,7 @@ namespace OpenSim.Grid.InventoryServer
190 saveInventoryToStream(_inventory, ms); 193 saveInventoryToStream(_inventory, ms);
191 194
192 result = ms.GetBuffer(); 195 result = ms.GetBuffer();
193 Array.Resize<byte>(ref result, (int)ms.Length); 196 Array.Resize<byte>(ref result, (int) ms.Length);
194 } 197 }
195 else if (string.Compare(parms[1], "user", true) == 0) 198 else if (string.Compare(parms[1], "user", true) == 0)
196 { 199 {
@@ -204,4 +207,4 @@ namespace OpenSim.Grid.InventoryServer
204 } 207 }
205 } 208 }
206 } 209 }
207} 210} \ No newline at end of file
diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs
index df854f9..ce371bf 100644
--- a/OpenSim/Grid/InventoryServer/Main.cs
+++ b/OpenSim/Grid/InventoryServer/Main.cs
@@ -25,29 +25,23 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28
28using System; 29using System;
29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection;
32using System.IO; 31using System.IO;
33using System.Text;
34
35using libsecondlife; 32using libsecondlife;
36
37using OpenSim.Framework; 33using OpenSim.Framework;
38using OpenSim.Framework.Console; 34using OpenSim.Framework.Console;
39using OpenSim.Framework.Servers; 35using OpenSim.Framework.Servers;
40 36
41using InventoryManager = OpenSim.Grid.InventoryServer.InventoryManager;
42
43namespace OpenSim.Grid.InventoryServer 37namespace OpenSim.Grid.InventoryServer
44{ 38{
45 public class OpenInventory_Main : conscmd_callback 39 public class OpenInventory_Main : conscmd_callback
46 { 40 {
47 LogBase m_console; 41 private LogBase m_console;
48 InventoryManager m_inventoryManager; 42 private InventoryManager m_inventoryManager;
49 InventoryConfig m_config; 43 private InventoryConfig m_config;
50 GridInventoryService m_inventoryService; 44 private GridInventoryService m_inventoryService;
51 45
52 public const string LogName = "INVENTORY"; 46 public const string LogName = "INVENTORY";
53 47
@@ -72,20 +66,20 @@ namespace OpenSim.Grid.InventoryServer
72 m_config = new InventoryConfig(LogName, (Path.Combine(Util.configDir(), "InventoryServer_Config.xml"))); 66 m_config = new InventoryConfig(LogName, (Path.Combine(Util.configDir(), "InventoryServer_Config.xml")));
73 67
74 m_inventoryService = new GridInventoryService(); 68 m_inventoryService = new GridInventoryService();
75 // m_inventoryManager = new InventoryManager(); 69 // m_inventoryManager = new InventoryManager();
76 m_inventoryService.AddPlugin(m_config.DatabaseProvider); 70 m_inventoryService.AddPlugin(m_config.DatabaseProvider);
77 71
78 MainLog.Instance.Notice(LogName, "Starting HTTP server ..."); 72 MainLog.Instance.Notice(LogName, "Starting HTTP server ...");
79 BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); 73 BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort);
80 httpServer.AddStreamHandler( 74 httpServer.AddStreamHandler(
81 new RestDeserialisehandler<Guid, InventoryCollection>("POST", "/GetInventory/", 75 new RestDeserialisehandler<Guid, InventoryCollection>("POST", "/GetInventory/",
82 m_inventoryService.GetUserInventory)); 76 m_inventoryService.GetUserInventory));
83 httpServer.AddStreamHandler( 77 httpServer.AddStreamHandler(
84 new RestDeserialisehandler<Guid, bool>("POST", "/CreateInventory/", 78 new RestDeserialisehandler<Guid, bool>("POST", "/CreateInventory/",
85 m_inventoryService.CreateUsersInventory)); 79 m_inventoryService.CreateUsersInventory));
86 httpServer.AddStreamHandler( 80 httpServer.AddStreamHandler(
87 new RestDeserialisehandler<InventoryFolderBase, bool>("POST", "/NewFolder/", 81 new RestDeserialisehandler<InventoryFolderBase, bool>("POST", "/NewFolder/",
88 m_inventoryService.AddInventoryFolder)); 82 m_inventoryService.AddInventoryFolder));
89 83
90 httpServer.AddStreamHandler( 84 httpServer.AddStreamHandler(
91 new RestDeserialisehandler<InventoryFolderBase, bool>("POST", "/MoveFolder/", 85 new RestDeserialisehandler<InventoryFolderBase, bool>("POST", "/MoveFolder/",
@@ -93,16 +87,16 @@ namespace OpenSim.Grid.InventoryServer
93 87
94 httpServer.AddStreamHandler( 88 httpServer.AddStreamHandler(
95 new RestDeserialisehandler<InventoryItemBase, bool>("POST", "/NewItem/", 89 new RestDeserialisehandler<InventoryItemBase, bool>("POST", "/NewItem/",
96 m_inventoryService.AddInventoryItem)); 90 m_inventoryService.AddInventoryItem));
97 httpServer.AddStreamHandler( 91 httpServer.AddStreamHandler(
98 new RestDeserialisehandler<InventoryItemBase, bool>("POST", "/DeleteItem/", 92 new RestDeserialisehandler<InventoryItemBase, bool>("POST", "/DeleteItem/",
99 m_inventoryService.DeleteInvItem)); 93 m_inventoryService.DeleteInvItem));
100 94
101 httpServer.AddStreamHandler( 95 httpServer.AddStreamHandler(
102 new RestDeserialisehandler<Guid, List<InventoryFolderBase>>("POST", "/RootFolders/", 96 new RestDeserialisehandler<Guid, List<InventoryFolderBase>>("POST", "/RootFolders/",
103 m_inventoryService.RequestFirstLevelFolders)); 97 m_inventoryService.RequestFirstLevelFolders));
104 98
105 // httpServer.AddStreamHandler(new InventoryManager.GetInventory(m_inventoryManager)); 99 // httpServer.AddStreamHandler(new InventoryManager.GetInventory(m_inventoryManager));
106 100
107 httpServer.Start(); 101 httpServer.Start();
108 MainLog.Instance.Notice(LogName, "Started HTTP server"); 102 MainLog.Instance.Notice(LogName, "Started HTTP server");
@@ -137,4 +131,4 @@ namespace OpenSim.Grid.InventoryServer
137 { 131 {
138 } 132 }
139 } 133 }
140} 134} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/Application.cs b/OpenSim/Grid/ScriptServer/Application.cs
index dd1da66..5076618 100644
--- a/OpenSim/Grid/ScriptServer/Application.cs
+++ b/OpenSim/Grid/ScriptServer/Application.cs
@@ -52,4 +52,4 @@ namespace OpenSim.Grid.ScriptServer
52 Console.WriteLine(e.ExceptionObject.ToString()); 52 Console.WriteLine(e.ExceptionObject.ToString());
53 } 53 }
54 } 54 }
55} 55} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs
index 87198d1..7d29129 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs
@@ -101,4 +101,4 @@ namespace OpenSim.Grid.ScriptServer
101 Regions.Add(new RegionConnectionManager(m_ScriptServerMain, m_log, null)); 101 Regions.Add(new RegionConnectionManager(m_ScriptServerMain, m_log, null));
102 } 102 }
103 } 103 }
104} 104} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineInterface.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineInterface.cs
index fc6939c..518c198 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineInterface.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineInterface.cs
@@ -35,4 +35,4 @@ namespace OpenSim.Grid.ScriptServer
35 void Shutdown(); 35 void Shutdown();
36// void StartScript(string ScriptID, IScriptHost ObjectID); 36// void StartScript(string ScriptID, IScriptHost ObjectID);
37 } 37 }
38} 38} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs
index d02955e..7f39931 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs
@@ -121,4 +121,4 @@ namespace OpenSim.Grid.ScriptServer
121 return ret; 121 return ret;
122 } 122 }
123 } 123 }
124} 124} \ No newline at end of file
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 4806e52..6e3ccb7 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -129,7 +129,8 @@ namespace OpenSim.Grid.UserServer
129 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); 129 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
130 130
131 LLUUID userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); 131 LLUUID userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
132 RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID); 132 RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/",
133 userID.UUID);
133 m_lastCreatedUser = userID; 134 m_lastCreatedUser = userID;
134 break; 135 break;
135 } 136 }
@@ -154,17 +155,23 @@ namespace OpenSim.Grid.UserServer
154 break; 155 break;
155 156
156 case "test-inventory": 157 case "test-inventory":
157 // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>(); 158 // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>();
158 // requester.ReturnResponseVal = TestResponse; 159 // requester.ReturnResponseVal = TestResponse;
159 // requester.BeginPostObject<LLUUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser); 160 // requester.BeginPostObject<LLUUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser);
160 List<InventoryFolderBase> folders = SynchronousRestObjectPoster.BeginPostObject< LLUUID, List<InventoryFolderBase>>("POST",m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser); 161 List<InventoryFolderBase> folders =
162 SynchronousRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>("POST",
163 m_userManager.
164 _config.
165 InventoryUrl +
166 "RootFolders/",
167 m_lastCreatedUser);
161 break; 168 break;
162 } 169 }
163 } 170 }
164 171
165 public void TestResponse(List<InventoryFolderBase> resp) 172 public void TestResponse(List<InventoryFolderBase> resp)
166 { 173 {
167 System.Console.WriteLine("response got"); 174 Console.WriteLine("response got");
168 } 175 }
169 176
170 /*private void ConfigDB(IGenericConfig configData) 177 /*private void ConfigDB(IGenericConfig configData)
@@ -194,4 +201,4 @@ namespace OpenSim.Grid.UserServer
194 { 201 {
195 } 202 }
196 } 203 }
197} 204} \ No newline at end of file
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index 9b9360d..0eb2db1 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -29,16 +29,15 @@
29using System; 29using System;
30using System.Collections; 30using System.Collections;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Net;
33using System.Threading; 32using System.Threading;
34using Nwc.XmlRpc;
35using libsecondlife; 33using libsecondlife;
34using Nwc.XmlRpc;
36using OpenSim.Framework; 35using OpenSim.Framework;
37using OpenSim.Framework.Console; 36using OpenSim.Framework.Console;
38using OpenSim.Framework.Servers;
39using OpenSim.Framework.Data; 37using OpenSim.Framework.Data;
38using OpenSim.Framework.Servers;
40using OpenSim.Framework.UserManagement; 39using OpenSim.Framework.UserManagement;
41using InventoryFolder = OpenSim.Framework.InventoryFolder; 40using InventoryFolder=OpenSim.Framework.InventoryFolder;
42 41
43namespace OpenSim.Grid.UserServer 42namespace OpenSim.Grid.UserServer
44{ 43{
@@ -72,8 +71,8 @@ namespace OpenSim.Grid.UserServer
72 // Customise the response 71 // Customise the response
73 //CFK: This is redundant and the next message should always appear. 72 //CFK: This is redundant and the next message should always appear.
74 //CFK: MainLog.Instance.Verbose("LOGIN", "Home Location"); 73 //CFK: MainLog.Instance.Verbose("LOGIN", "Home Location");
75 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + 74 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" +
76 (SimInfo.regionLocY * 256).ToString() + "], " + 75 (SimInfo.regionLocY*256).ToString() + "], " +
77 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + 76 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" +
78 theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + 77 theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
79 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + 78 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" +
@@ -106,7 +105,7 @@ namespace OpenSim.Grid.UserServer
106 SimParams["firstname"] = theUser.username; 105 SimParams["firstname"] = theUser.username;
107 SimParams["lastname"] = theUser.surname; 106 SimParams["lastname"] = theUser.surname;
108 SimParams["agent_id"] = theUser.UUID.ToString(); 107 SimParams["agent_id"] = theUser.UUID.ToString();
109 SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode); 108 SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode);
110 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); 109 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
111 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); 110 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
112 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); 111 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
@@ -119,9 +118,9 @@ namespace OpenSim.Grid.UserServer
119 theUser.currentAgent.currentRegion = SimInfo.UUID; 118 theUser.currentAgent.currentRegion = SimInfo.UUID;
120 theUser.currentAgent.currentHandle = SimInfo.regionHandle; 119 theUser.currentAgent.currentHandle = SimInfo.regionHandle;
121 120
122 MainLog.Instance.Verbose("LOGIN", SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " + 121 MainLog.Instance.Verbose("LOGIN", SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " +
123 SimInfo.regionLocX + "," + SimInfo.regionLocY); 122 SimInfo.regionLocX + "," + SimInfo.regionLocY);
124 123
125 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); 124 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
126 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); 125 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000);
127 } 126 }
@@ -129,17 +128,17 @@ namespace OpenSim.Grid.UserServer
129 { 128 {
130 tryDefault = true; 129 tryDefault = true;
131 } 130 }
132 if(tryDefault) 131 if (tryDefault)
133 { 132 {
134 // Send him to default region instead 133 // Send him to default region instead
135 // Load information from the gridserver 134 // Load information from the gridserver
136 135
137 ulong defaultHandle = (((ulong)m_config.DefaultX * 256) << 32) | ((ulong) m_config.DefaultY * 256); 136 ulong defaultHandle = (((ulong) m_config.DefaultX*256) << 32) | ((ulong) m_config.DefaultY*256);
138 137
139 MainLog.Instance.Warn( 138 MainLog.Instance.Warn(
140 "LOGIN", 139 "LOGIN",
141 "Home region not available: sending to default " + defaultHandle.ToString()); 140 "Home region not available: sending to default " + defaultHandle.ToString());
142 141
143 SimInfo = new RegionProfileData(); 142 SimInfo = new RegionProfileData();
144 try 143 try
145 { 144 {
@@ -149,15 +148,16 @@ namespace OpenSim.Grid.UserServer
149 148
150 // Customise the response 149 // Customise the response
151 MainLog.Instance.Verbose("LOGIN", "Home Location"); 150 MainLog.Instance.Verbose("LOGIN", "Home Location");
152 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + 151 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" +
153 (SimInfo.regionLocY * 256).ToString() + "], " + 152 (SimInfo.regionLocY*256).ToString() + "], " +
154 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + 153 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" +
155 theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + 154 theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
156 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + 155 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" +
157 theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; 156 theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
158 157
159 // Destination 158 // Destination
160 MainLog.Instance.Verbose("LOGIN", "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + 159 MainLog.Instance.Verbose("LOGIN",
160 "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " +
161 SimInfo.regionLocY); 161 SimInfo.regionLocY);
162 response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString(); 162 response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString();
163 response.SimPort = (uint) SimInfo.serverPort; 163 response.SimPort = (uint) SimInfo.serverPort;
@@ -182,7 +182,7 @@ namespace OpenSim.Grid.UserServer
182 SimParams["firstname"] = theUser.username; 182 SimParams["firstname"] = theUser.username;
183 SimParams["lastname"] = theUser.surname; 183 SimParams["lastname"] = theUser.surname;
184 SimParams["agent_id"] = theUser.UUID.ToString(); 184 SimParams["agent_id"] = theUser.UUID.ToString();
185 SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode); 185 SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode);
186 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); 186 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
187 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); 187 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
188 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); 188 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
@@ -202,35 +202,34 @@ namespace OpenSim.Grid.UserServer
202 MainLog.Instance.Warn("LOGIN", "Default region also not available"); 202 MainLog.Instance.Warn("LOGIN", "Default region also not available");
203 MainLog.Instance.Warn("LOGIN", e.ToString()); 203 MainLog.Instance.Warn("LOGIN", e.ToString());
204 } 204 }
205
206 } 205 }
207 } 206 }
208 207
209 protected override InventoryData CreateInventoryData(LLUUID userID) 208 protected override InventoryData CreateInventoryData(LLUUID userID)
210 { 209 {
211 List<InventoryFolderBase> folders 210 List<InventoryFolderBase> folders
212 = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( 211 = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>(
213 "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); 212 "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID);
214 213
215 // In theory, the user will only ever be missing a root folder in situations where a grid 214 // In theory, the user will only ever be missing a root folder in situations where a grid
216 // which didn't previously run a grid wide inventory server is being transitioned to one 215 // which didn't previously run a grid wide inventory server is being transitioned to one
217 // which does. 216 // which does.
218 if (null == folders | folders.Count == 0) 217 if (null == folders | folders.Count == 0)
219 { 218 {
220 MainLog.Instance.Warn( 219 MainLog.Instance.Warn(
221 "LOGIN", 220 "LOGIN",
222 "A root inventory folder for user ID " + userID + " was not found. A new set" 221 "A root inventory folder for user ID " + userID + " was not found. A new set"
223 + " of empty inventory folders is being created."); 222 + " of empty inventory folders is being created.");
224 223
225 RestObjectPoster.BeginPostObject<Guid>( 224 RestObjectPoster.BeginPostObject<Guid>(
226 m_config.InventoryUrl + "CreateInventory/", userID.UUID); 225 m_config.InventoryUrl + "CreateInventory/", userID.UUID);
227 226
228 // A big delay should be okay here since the recreation of the user's root folders should 227 // A big delay should be okay here since the recreation of the user's root folders should
229 // only ever happen once. We need to sleep to let the inventory server do its work - 228 // only ever happen once. We need to sleep to let the inventory server do its work -
230 // previously 1000ms has been found to be too short. 229 // previously 1000ms has been found to be too short.
231 Thread.Sleep(10000); 230 Thread.Sleep(10000);
232 folders = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( 231 folders = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>(
233 "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); 232 "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID);
234 } 233 }
235 234
236 if (folders.Count > 0) 235 if (folders.Count > 0)
@@ -247,8 +246,8 @@ namespace OpenSim.Grid.UserServer
247 TempHash = new Hashtable(); 246 TempHash = new Hashtable();
248 TempHash["name"] = InvFolder.name; 247 TempHash["name"] = InvFolder.name;
249 TempHash["parent_id"] = InvFolder.parentID.ToString(); 248 TempHash["parent_id"] = InvFolder.parentID.ToString();
250 TempHash["version"] = (Int32)InvFolder.version; 249 TempHash["version"] = (Int32) InvFolder.version;
251 TempHash["type_default"] = (Int32)InvFolder.type; 250 TempHash["type_default"] = (Int32) InvFolder.type;
252 TempHash["folder_id"] = InvFolder.folderID.ToString(); 251 TempHash["folder_id"] = InvFolder.folderID.ToString();
253 AgentInventoryArray.Add(TempHash); 252 AgentInventoryArray.Add(TempHash);
254 } 253 }
@@ -257,8 +256,8 @@ namespace OpenSim.Grid.UserServer
257 else 256 else
258 { 257 {
259 MainLog.Instance.Warn("LOGIN", "The root inventory folder could still not be retrieved" + 258 MainLog.Instance.Warn("LOGIN", "The root inventory folder could still not be retrieved" +
260 " for user ID " + userID); 259 " for user ID " + userID);
261 260
262 AgentInventory userInventory = new AgentInventory(); 261 AgentInventory userInventory = new AgentInventory();
263 userInventory.CreateRootFolder(userID, false); 262 userInventory.CreateRootFolder(userID, false);
264 263
@@ -269,8 +268,8 @@ namespace OpenSim.Grid.UserServer
269 TempHash = new Hashtable(); 268 TempHash = new Hashtable();
270 TempHash["name"] = InvFolder.FolderName; 269 TempHash["name"] = InvFolder.FolderName;
271 TempHash["parent_id"] = InvFolder.ParentID.ToString(); 270 TempHash["parent_id"] = InvFolder.ParentID.ToString();
272 TempHash["version"] = (Int32)InvFolder.Version; 271 TempHash["version"] = (Int32) InvFolder.Version;
273 TempHash["type_default"] = (Int32)InvFolder.DefaultType; 272 TempHash["type_default"] = (Int32) InvFolder.DefaultType;
274 TempHash["folder_id"] = InvFolder.FolderID.ToString(); 273 TempHash["folder_id"] = InvFolder.FolderID.ToString();
275 AgentInventoryArray.Add(TempHash); 274 AgentInventoryArray.Add(TempHash);
276 } 275 }
@@ -279,4 +278,4 @@ namespace OpenSim.Grid.UserServer
279 } 278 }
280 } 279 }
281 } 280 }
282} 281} \ No newline at end of file
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index be9e6f1..a50419e 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text.RegularExpressions;
31using libsecondlife; 32using libsecondlife;
32using Nwc.XmlRpc; 33using Nwc.XmlRpc;
33using OpenSim.Framework; 34using OpenSim.Framework;
@@ -76,8 +77,8 @@ namespace OpenSim.Grid.UserServer
76 XmlRpcResponse response = new XmlRpcResponse(); 77 XmlRpcResponse response = new XmlRpcResponse();
77 Hashtable responseData = new Hashtable(); 78 Hashtable responseData = new Hashtable();
78 // Query Result Information 79 // Query Result Information
79 responseData["queryid"] = (string)queryID.ToString(); 80 responseData["queryid"] = (string) queryID.ToString();
80 responseData["avcount"] = (string)returnUsers.Count.ToString(); 81 responseData["avcount"] = (string) returnUsers.Count.ToString();
81 82
82 for (int i = 0; i < returnUsers.Count; i++) 83 for (int i = 0; i < returnUsers.Count; i++)
83 { 84 {
@@ -86,9 +87,10 @@ namespace OpenSim.Grid.UserServer
86 responseData["lastname" + i.ToString()] = returnUsers[i].lastName; 87 responseData["lastname" + i.ToString()] = returnUsers[i].lastName;
87 } 88 }
88 response.Value = responseData; 89 response.Value = responseData;
89 90
90 return response; 91 return response;
91 } 92 }
93
92 /// <summary> 94 /// <summary>
93 /// Converts a user profile to an XML element which can be returned 95 /// Converts a user profile to an XML element which can be returned
94 /// </summary> 96 /// </summary>
@@ -135,18 +137,18 @@ namespace OpenSim.Grid.UserServer
135 public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request) 137 public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request)
136 { 138 {
137 XmlRpcResponse response = new XmlRpcResponse(); 139 XmlRpcResponse response = new XmlRpcResponse();
138 Hashtable requestData = (Hashtable)request.Params[0]; 140 Hashtable requestData = (Hashtable) request.Params[0];
139 List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>(); 141 List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>();
140 LLUUID queryID = new LLUUID(LLUUID.Zero.ToString()); 142 LLUUID queryID = new LLUUID(LLUUID.Zero.ToString());
141 143
142 if (requestData.Contains("avquery") && requestData.Contains("queryid")) 144 if (requestData.Contains("avquery") && requestData.Contains("queryid"))
143 { 145 {
144 queryID = new LLUUID((string)requestData["queryid"]); 146 queryID = new LLUUID((string) requestData["queryid"]);
145 returnAvatar = GenerateAgentPickerRequestResponse(queryID,(string)requestData["avquery"]); 147 returnAvatar = GenerateAgentPickerRequestResponse(queryID, (string) requestData["avquery"]);
146 } 148 }
147 149
148 Console.WriteLine("[AVATARINFO]: Servicing Avatar Query: " + (string)requestData["avquery"]); 150 Console.WriteLine("[AVATARINFO]: Servicing Avatar Query: " + (string) requestData["avquery"]);
149 return AvatarPickerListtoXmlRPCResponse(queryID,returnAvatar); 151 return AvatarPickerListtoXmlRPCResponse(queryID, returnAvatar);
150 } 152 }
151 153
152 public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request) 154 public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request)
@@ -156,16 +158,16 @@ namespace OpenSim.Grid.UserServer
156 UserProfileData userProfile; 158 UserProfileData userProfile;
157 if (requestData.Contains("avatar_name")) 159 if (requestData.Contains("avatar_name"))
158 { 160 {
159 string query = (string)requestData["avatar_name"]; 161 string query = (string) requestData["avatar_name"];
160 162
161 System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]"); 163 Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]");
162 164
163 string[] querysplit; 165 string[] querysplit;
164 querysplit = query.Split(' '); 166 querysplit = query.Split(' ');
165 167
166 if (querysplit.Length == 2) 168 if (querysplit.Length == 2)
167 { 169 {
168 userProfile = GetUserProfile(querysplit[0],querysplit[1]); 170 userProfile = GetUserProfile(querysplit[0], querysplit[1]);
169 if (userProfile == null) 171 if (userProfile == null)
170 { 172 {
171 return CreateUnknownUserErrorResponse(); 173 return CreateUnknownUserErrorResponse();
@@ -196,11 +198,11 @@ namespace OpenSim.Grid.UserServer
196 LLUUID guess = new LLUUID(); 198 LLUUID guess = new LLUUID();
197 try 199 try
198 { 200 {
199 guess = new LLUUID((string)requestData["avatar_uuid"]); 201 guess = new LLUUID((string) requestData["avatar_uuid"]);
200 202
201 userProfile = GetUserProfile(guess); 203 userProfile = GetUserProfile(guess);
202 } 204 }
203 catch (System.FormatException) 205 catch (FormatException)
204 { 206 {
205 return CreateUnknownUserErrorResponse(); 207 return CreateUnknownUserErrorResponse();
206 } 208 }
@@ -231,9 +233,9 @@ namespace OpenSim.Grid.UserServer
231 throw new Exception("The method or operation is not implemented."); 233 throw new Exception("The method or operation is not implemented.");
232 } 234 }
233 235
234 public override UserProfileData SetupMasterUser(libsecondlife.LLUUID uuid) 236 public override UserProfileData SetupMasterUser(LLUUID uuid)
235 { 237 {
236 throw new Exception("The method or operation is not implemented."); 238 throw new Exception("The method or operation is not implemented.");
237 } 239 }
238 } 240 }
239} 241} \ No newline at end of file