From 893a1824d075a6edfd40ac1ef2a7e4fc2fec968c Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 27 Mar 2007 18:27:11 +0000 Subject: * Introduced BaseHttpServer (doing nothing at the moment) * Removed OpenSimRoot dependencies from SimClient and AgentAssetUpload. 2 down, 7 left to go. --- OpenSim.RegionServer/AgentAssetUpload.cs | 17 ++-- OpenSim.RegionServer/CAPS/SimHttp.cs | 41 +++++---- OpenSim.RegionServer/OpenSim.RegionServer.csproj | 18 ++-- .../OpenSim.RegionServer.dll.build | 3 +- OpenSim.RegionServer/OpenSimMain.cs | 4 +- OpenSim.RegionServer/SimClient.cs | 99 +++++++++++++--------- 6 files changed, 108 insertions(+), 74 deletions(-) (limited to 'OpenSim.RegionServer') diff --git a/OpenSim.RegionServer/AgentAssetUpload.cs b/OpenSim.RegionServer/AgentAssetUpload.cs index a482e80..9f85598 100644 --- a/OpenSim.RegionServer/AgentAssetUpload.cs +++ b/OpenSim.RegionServer/AgentAssetUpload.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Text; +using OpenSim.Assets; using OpenSim.Framework.Assets; using OpenSim.Framework.Utilities; using libsecondlife; @@ -12,10 +13,14 @@ namespace OpenSim { private Dictionary transactions = new Dictionary(); private SimClient ourClient; + private AssetCache m_assetCache; + private InventoryCache m_inventoryCache; - public AgentAssetUpload(SimClient client) + public AgentAssetUpload(SimClient client, AssetCache assetCache, InventoryCache inventoryCache) { this.ourClient = client; + m_assetCache = assetCache; + m_inventoryCache = inventoryCache; } public void AddUpload(LLUUID transactionID, AssetBase asset) @@ -148,8 +153,8 @@ namespace OpenSim //check if we should add it to inventory if (trans.AddToInventory) { - OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); - OpenSimRoot.Instance.InventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset); + m_assetCache.AddAsset(trans.Asset); + m_inventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset); } @@ -176,7 +181,7 @@ namespace OpenSim AssetTransaction trans = this.transactions[transactionID]; if (trans.UploadComplete) { - OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); + m_assetCache.AddAsset(trans.Asset); asset = trans.Asset; } } @@ -195,8 +200,8 @@ namespace OpenSim if (trans.UploadComplete) { //already complete so we can add it to the inventory - OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); - Console.WriteLine( "ITem created is " +OpenSimRoot.Instance.InventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated()); + m_assetCache.AddAsset(trans.Asset); + Console.WriteLine( "ITem created is " +m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated()); } else { diff --git a/OpenSim.RegionServer/CAPS/SimHttp.cs b/OpenSim.RegionServer/CAPS/SimHttp.cs index a1073f0..92bbc6f 100644 --- a/OpenSim.RegionServer/CAPS/SimHttp.cs +++ b/OpenSim.RegionServer/CAPS/SimHttp.cs @@ -39,22 +39,27 @@ using System.Collections.Generic; using libsecondlife; using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; +using OpenSim.Servers; namespace OpenSim.CAPS { // Dummy HTTP server, does nothing useful for now - public class SimCAPSHTTPServer + public class SimCAPSHTTPServer : BaseHttpServer { - public Thread HTTPD; - public HttpListener Listener; - private Dictionary restHandlers = new Dictionary(); + private Thread m_workerThread; + private HttpListener m_httpListener; + private Dictionary m_restHandlers = new Dictionary(); + private IGridServer m_gridServer; + private int m_port; - public SimCAPSHTTPServer() + public SimCAPSHTTPServer(IGridServer gridServer, int port) { OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Starting up HTTP Server"); - HTTPD = new Thread(new ThreadStart(StartHTTP)); - HTTPD.Start(); + m_workerThread = new Thread(new ThreadStart(StartHTTP)); + m_workerThread.Start(); + m_gridServer = gridServer; + m_port = port; } public void StartHTTP() @@ -62,15 +67,15 @@ namespace OpenSim.CAPS try { OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SimHttp.cs:StartHTTP() - Spawned main thread OK"); - Listener = new HttpListener(); + m_httpListener = new HttpListener(); - Listener.Prefixes.Add("http://+:" + OpenSimRoot.Instance.Cfg.IPListenPort + "/"); - Listener.Start(); + m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); + m_httpListener.Start(); HttpListenerContext context; while (true) { - context = Listener.GetContext(); + context = m_httpListener.GetContext(); ThreadPool.QueueUserWorkItem(new WaitCallback(HandleRequest), context); } } @@ -82,9 +87,9 @@ namespace OpenSim.CAPS public bool AddRestHandler(string path, IRestHandler handler) { - if (!this.restHandlers.ContainsKey(path)) + if (!this.m_restHandlers.ContainsKey(path)) { - this.restHandlers.Add(path, handler); + this.m_restHandlers.Add(path, handler); return true; } @@ -108,12 +113,12 @@ namespace OpenSim.CAPS agent_data.lastname = (string)requestData["lastname"]; agent_data.AgentID = new LLUUID((string)requestData["agent_id"]); agent_data.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); - if (OpenSimRoot.Instance.GridServers.GridServer.GetName() == "Remote") + if (m_gridServer.GetName() == "Remote") { - ((RemoteGridBase)OpenSimRoot.Instance.GridServers.GridServer).agentcircuits.Add((uint)agent_data.circuitcode, agent_data); + + ((RemoteGridBase)m_gridServer).agentcircuits.Add((uint)agent_data.circuitcode, agent_data); } return ""; - break; } } catch (Exception e) @@ -135,9 +140,9 @@ namespace OpenSim.CAPS //path[0] should be empty so we are interested in path[1] if (path.Length > 1) { - if ((path[1] != "") && (this.restHandlers.ContainsKey(path[1]))) + if ((path[1] != "") && (this.m_restHandlers.ContainsKey(path[1]))) { - responseString = this.restHandlers[path[1]].HandleREST(requestBody, requestURL, requestMethod); + responseString = this.m_restHandlers[path[1]].HandleREST(requestBody, requestURL, requestMethod); } } diff --git a/OpenSim.RegionServer/OpenSim.RegionServer.csproj b/OpenSim.RegionServer/OpenSim.RegionServer.csproj index 797a3ec..086e287 100644 --- a/OpenSim.RegionServer/OpenSim.RegionServer.csproj +++ b/OpenSim.RegionServer/OpenSim.RegionServer.csproj @@ -3,7 +3,7 @@ Local 8.0.50727 2.0 - {90F935D0-00A6-4A5D-82F0-BB7FB8AFC99D} + {D385B640-E037-419A-AC83-5CB6E66D9FF3} Debug AnyCPU @@ -80,21 +80,27 @@ + + OpenSim.Framework + {1817C154-9111-4C45-A19A-609A5717C1FA} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + OpenSim.Framework.Console - {4E3D1135-5AD9-4C23-BB9A-E4FCCA4B0BC7} + {023EA61E-BBAE-4FCC-BCDD-43A50FD95D54} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} False OpenSim.Physics.Manager - {7D98B8F9-1409-40DD-8A8F-9B7669761B6C} + {D9A7F5B1-0F86-4463-BA4C-9F15D3981E5C} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} False - - OpenSim.Framework - {6CE3530E-1D8E-47D8-9B6D-82A86E71D657} + + OpenSim.Servers + {570A9C4C-950E-4F9D-9FB1-1A77E1A5C4C2} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} False diff --git a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build index 4e44c4b..d77e896 100644 --- a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build +++ b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build @@ -49,9 +49,10 @@ + - + diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index 7425fca..a24d1fb 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs @@ -113,7 +113,7 @@ namespace OpenSim } OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting CAPS HTTP server"); - OpenSimRoot.Instance.HttpServer = new SimCAPSHTTPServer(); + OpenSimRoot.Instance.HttpServer = new SimCAPSHTTPServer(OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Cfg.IPListenPort); OpenSimRoot.Instance.HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin")); timer1.Enabled = true; @@ -172,7 +172,7 @@ namespace OpenSim { // new client UseCircuitCodePacket useCircuit = (UseCircuitCodePacket)packet; this.clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); - SimClient newuser = new SimClient(epSender, useCircuit); + SimClient newuser = new SimClient(epSender, useCircuit, OpenSimRoot.Instance.LocalWorld, OpenSimRoot.Instance.ClientThreads, OpenSimRoot.Instance.AssetCache, OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Application, OpenSimRoot.Instance.InventoryCache, OpenSimRoot.Instance.Sandbox); //OpenSimRoot.Instance.ClientThreads.Add(epSender, newuser); OpenSimRoot.Instance.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); } diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index d463c75..698053d 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs @@ -71,6 +71,13 @@ namespace OpenSim private AgentAssetUpload UploadAssets; private LLUUID newAssetFolder = LLUUID.Zero; private bool debug = false; + private World m_world; + private Dictionary m_clientThreads; + private AssetCache m_assetCache; + private IGridServer m_gridServer; + private OpenSimApplication m_application; + private InventoryCache m_inventoryCache; + private bool m_sandboxMode; private void ack_pack(Packet Pack) { @@ -105,15 +112,15 @@ namespace OpenSim switch (Pack.Type) { case PacketType.CompleteAgentMovement: - ClientAvatar.CompleteMovement(OpenSimRoot.Instance.LocalWorld); + ClientAvatar.CompleteMovement(m_world); ClientAvatar.SendInitialPosition(); break; case PacketType.RegionHandshakeReply: - OpenSimRoot.Instance.LocalWorld.SendLayerData(this); + m_world.SendLayerData(this); break; case PacketType.AgentWearablesRequest: ClientAvatar.SendInitialAppearance(); - foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) + foreach (SimClient client in m_clientThreads.Values) { if (client.AgentID != this.AgentID) { @@ -122,7 +129,7 @@ namespace OpenSim client.ClientAvatar.SendAppearanceToOtherAgent(this); } } - OpenSimRoot.Instance.LocalWorld.GetInitialPrims(this); + m_world.GetInitialPrims(this); break; case PacketType.AgentIsNowWearing: AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack; @@ -134,7 +141,7 @@ namespace OpenSim this.ClientAvatar.SetAppearance(appear); break; case PacketType.ObjectAdd: - OpenSimRoot.Instance.LocalWorld.AddNewPrim((ObjectAddPacket)Pack, this); + m_world.AddNewPrim((ObjectAddPacket)Pack, this); break; case PacketType.ObjectLink: OpenSim.Framework.Console.MainConsole.Instance.WriteLine(Pack.ToString()); @@ -146,7 +153,7 @@ namespace OpenSim ObjectShapePacket shape = (ObjectShapePacket)Pack; for (int i = 0; i < shape.ObjectData.Length; i++) { - foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in m_world.Entities.Values) { if (ent.localid == shape.ObjectData[i].ObjectLocalID) { @@ -163,7 +170,7 @@ namespace OpenSim if (multipleupdate.ObjectData[i].Type == 9) //change position { libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); - foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in m_world.Entities.Values) { if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) { @@ -177,7 +184,7 @@ namespace OpenSim else if (multipleupdate.ObjectData[i].Type == 10)//rotation { libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); - foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in m_world.Entities.Values) { if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) { @@ -190,7 +197,7 @@ namespace OpenSim { libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); - foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in m_world.Entities.Values) { if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) { @@ -204,13 +211,13 @@ namespace OpenSim RequestImagePacket imageRequest = (RequestImagePacket)Pack; for (int i = 0; i < imageRequest.RequestImage.Length; i++) { - OpenSimRoot.Instance.AssetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image); + m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image); } break; case PacketType.TransferRequest: //Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got transfer request"); TransferRequestPacket transfer = (TransferRequestPacket)Pack; - OpenSimRoot.Instance.AssetCache.AddAssetRequest(this, transfer); + m_assetCache.AddAssetRequest(this, transfer); break; case PacketType.AgentUpdate: ClientAvatar.HandleUpdate((AgentUpdatePacket)Pack); @@ -230,18 +237,18 @@ namespace OpenSim kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock(); kill.ObjectData[0].ID = this.ClientAvatar.localid; - foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) + foreach (SimClient client in m_clientThreads.Values) { client.OutPacket(kill); } - OpenSimRoot.Instance.GridServers.GridServer.LogoutSession(this.SessionID, this.AgentID, this.CircuitCode); - lock (OpenSimRoot.Instance.LocalWorld.Entities) + m_gridServer.LogoutSession(this.SessionID, this.AgentID, this.CircuitCode); + lock (m_world.Entities) { - OpenSimRoot.Instance.LocalWorld.Entities.Remove(this.AgentID); + m_world.Entities.Remove(this.AgentID); } //need to do other cleaning up here too - OpenSimRoot.Instance.ClientThreads.Remove(this.CircuitCode); //this.userEP); - OpenSimRoot.Instance.Application.RemoveClientCircuit(this.CircuitCode); + m_clientThreads.Remove(this.CircuitCode); //this.userEP); + m_application.RemoveClientCircuit(this.CircuitCode); this.ClientThread.Abort(); break; case PacketType.ChatFromViewer: @@ -258,7 +265,7 @@ namespace OpenSim reply.ChatData.FromName = _enc.GetBytes(this.ClientAvatar.firstname + " " + this.ClientAvatar.lastname + "\0"); reply.ChatData.OwnerID = this.AgentID; reply.ChatData.SourceID = this.AgentID; - foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) + foreach (SimClient client in m_clientThreads.Values) { client.OutPacket(reply); } @@ -267,7 +274,7 @@ namespace OpenSim ObjectImagePacket imagePack = (ObjectImagePacket)Pack; for (int i = 0; i < imagePack.ObjectData.Length; i++) { - foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in m_world.Entities.Values) { if (ent.localid == imagePack.ObjectData[i].ObjectLocalID) { @@ -278,7 +285,7 @@ namespace OpenSim break; case PacketType.ObjectFlagUpdate: ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; - foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in m_world.Entities.Values) { if (ent.localid == flags.AgentData.ObjectLocalID) { @@ -306,7 +313,7 @@ namespace OpenSim break; case PacketType.CreateInventoryFolder: CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack; - OpenSimRoot.Instance.InventoryCache.CreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type); + m_inventoryCache.CreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type); Console.WriteLine(Pack.ToString()); break; case PacketType.CreateInventoryItem: @@ -320,11 +327,11 @@ namespace OpenSim case PacketType.FetchInventory: //Console.WriteLine("fetch item packet"); FetchInventoryPacket FetchInventory = (FetchInventoryPacket)Pack; - OpenSimRoot.Instance.InventoryCache.FetchInventory(this, FetchInventory); + m_inventoryCache.FetchInventory(this, FetchInventory); break; case PacketType.FetchInventoryDescendents: FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; - OpenSimRoot.Instance.InventoryCache.FetchInventoryDescendents(this, Fetch); + m_inventoryCache.FetchInventoryDescendents(this, Fetch); break; case PacketType.UpdateInventoryItem: UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack; @@ -332,17 +339,17 @@ namespace OpenSim { if (update.InventoryData[i].TransactionID != LLUUID.Zero) { - AssetBase asset = OpenSimRoot.Instance.AssetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID)); + AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID)); if (asset != null) { - OpenSimRoot.Instance.InventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset); + m_inventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset); } else { asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID); if (asset != null) { - OpenSimRoot.Instance.InventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset); + m_inventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset); } } } @@ -350,7 +357,7 @@ namespace OpenSim break; case PacketType.ViewerEffect: ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; - foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) + foreach (SimClient client in m_clientThreads.Values) { if (client.AgentID != this.AgentID) { @@ -362,7 +369,7 @@ namespace OpenSim break; case PacketType.DeRezObject: //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Received DeRezObject packet"); - OpenSimRoot.Instance.LocalWorld.DeRezObject((DeRezObjectPacket)Pack, this); + m_world.DeRezObject((DeRezObjectPacket)Pack, this); break; } } @@ -501,11 +508,11 @@ namespace OpenSim if (Pack.Header.Zerocoded) { int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); - OpenSimRoot.Instance.Application.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, CircuitCode);//userEP); + m_application.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, CircuitCode);//userEP); } else { - OpenSimRoot.Instance.Application.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, CircuitCode); //userEP); + m_application.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, CircuitCode); //userEP); } } catch (Exception) @@ -569,14 +576,22 @@ namespace OpenSim this.PacketQueue.Enqueue(item); } - public SimClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack) + public SimClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, World world, Dictionary clientThreads, AssetCache assetCache, IGridServer gridServer, OpenSimApplication application, InventoryCache inventoryCache, bool sandboxMode) { + m_world = world; + m_clientThreads = clientThreads; + m_assetCache = assetCache; + m_gridServer = gridServer; + m_application = application; + m_inventoryCache = inventoryCache; + m_sandboxMode = sandboxMode; + OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs - Started up new client thread to handle incoming request"); cirpack = initialcirpack; userEP = remoteEP; PacketQueue = new BlockingQueue(); - this.UploadAssets = new AgentAssetUpload(this); + this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache ); AckTimer = new System.Timers.Timer(500); AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); AckTimer.Start(); @@ -608,14 +623,16 @@ namespace OpenSim protected virtual void InitNewClient() { OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); - OpenSimRoot.Instance.LocalWorld.AddViewerAgent(this); - world.Entity tempent = OpenSimRoot.Instance.LocalWorld.Entities[this.AgentID]; + + m_world.AddViewerAgent(this); + world.Entity tempent = m_world.Entities[this.AgentID]; + this.ClientAvatar = (world.Avatar)tempent; } protected virtual void AuthUser() { - AuthenticateResponse sessionInfo = OpenSimRoot.Instance.GridServers.GridServer.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); + AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); if (!sessionInfo.Authorised) { //session/circuit not authorised @@ -638,23 +655,23 @@ namespace OpenSim } // Create Inventory, currently only works for sandbox mode - if (OpenSimRoot.Instance.Sandbox) + if (m_sandboxMode) { if (sessionInfo.LoginInfo.InventoryFolder != null) { this.CreateInventory(sessionInfo.LoginInfo.InventoryFolder); if (sessionInfo.LoginInfo.BaseFolder != null) { - OpenSimRoot.Instance.InventoryCache.CreateNewInventoryFolder(this, sessionInfo.LoginInfo.BaseFolder); + m_inventoryCache.CreateNewInventoryFolder(this, sessionInfo.LoginInfo.BaseFolder); this.newAssetFolder = sessionInfo.LoginInfo.BaseFolder; - AssetBase[] inventorySet = OpenSimRoot.Instance.AssetCache.CreateNewInventorySet(this.AgentID); + AssetBase[] inventorySet = m_assetCache.CreateNewInventorySet(this.AgentID); if (inventorySet != null) { for (int i = 0; i < inventorySet.Length; i++) { if (inventorySet[i] != null) { - OpenSimRoot.Instance.InventoryCache.AddNewInventoryItem(this, sessionInfo.LoginInfo.BaseFolder, inventorySet[i]); + m_inventoryCache.AddNewInventoryItem(this, sessionInfo.LoginInfo.BaseFolder, inventorySet[i]); } } } @@ -670,8 +687,8 @@ namespace OpenSim { AgentInventory inventory = new AgentInventory(); inventory.AgentID = this.AgentID; - OpenSimRoot.Instance.InventoryCache.AddNewAgentsInventory(inventory); - OpenSimRoot.Instance.InventoryCache.CreateNewInventoryFolder(this, baseFolder); + m_inventoryCache.AddNewAgentsInventory(inventory); + m_inventoryCache.CreateNewInventoryFolder(this, baseFolder); } } } -- cgit v1.1