diff options
author | lbsa71 | 2007-03-27 20:45:04 +0000 |
---|---|---|
committer | lbsa71 | 2007-03-27 20:45:04 +0000 |
commit | 7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8 (patch) | |
tree | d8dc563b7fef4ce9dcc34fbcc31c3fcc7d99d49f /OpenSim.RegionServer/SimClient.cs | |
parent | * Config should be loaded before login server startup... (diff) | |
download | opensim-SC_OLD-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.zip opensim-SC_OLD-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.tar.gz opensim-SC_OLD-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.tar.bz2 opensim-SC_OLD-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.tar.xz |
* Reverting todays work. It was worth a try.
Diffstat (limited to 'OpenSim.RegionServer/SimClient.cs')
-rw-r--r-- | OpenSim.RegionServer/SimClient.cs | 99 |
1 files changed, 41 insertions, 58 deletions
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index 698053d..d463c75 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs | |||
@@ -71,13 +71,6 @@ namespace OpenSim | |||
71 | private AgentAssetUpload UploadAssets; | 71 | private AgentAssetUpload UploadAssets; |
72 | private LLUUID newAssetFolder = LLUUID.Zero; | 72 | private LLUUID newAssetFolder = LLUUID.Zero; |
73 | private bool debug = false; | 73 | private bool debug = false; |
74 | private World m_world; | ||
75 | private Dictionary<uint, SimClient> m_clientThreads; | ||
76 | private AssetCache m_assetCache; | ||
77 | private IGridServer m_gridServer; | ||
78 | private OpenSimApplication m_application; | ||
79 | private InventoryCache m_inventoryCache; | ||
80 | private bool m_sandboxMode; | ||
81 | 74 | ||
82 | private void ack_pack(Packet Pack) | 75 | private void ack_pack(Packet Pack) |
83 | { | 76 | { |
@@ -112,15 +105,15 @@ namespace OpenSim | |||
112 | switch (Pack.Type) | 105 | switch (Pack.Type) |
113 | { | 106 | { |
114 | case PacketType.CompleteAgentMovement: | 107 | case PacketType.CompleteAgentMovement: |
115 | ClientAvatar.CompleteMovement(m_world); | 108 | ClientAvatar.CompleteMovement(OpenSimRoot.Instance.LocalWorld); |
116 | ClientAvatar.SendInitialPosition(); | 109 | ClientAvatar.SendInitialPosition(); |
117 | break; | 110 | break; |
118 | case PacketType.RegionHandshakeReply: | 111 | case PacketType.RegionHandshakeReply: |
119 | m_world.SendLayerData(this); | 112 | OpenSimRoot.Instance.LocalWorld.SendLayerData(this); |
120 | break; | 113 | break; |
121 | case PacketType.AgentWearablesRequest: | 114 | case PacketType.AgentWearablesRequest: |
122 | ClientAvatar.SendInitialAppearance(); | 115 | ClientAvatar.SendInitialAppearance(); |
123 | foreach (SimClient client in m_clientThreads.Values) | 116 | foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) |
124 | { | 117 | { |
125 | if (client.AgentID != this.AgentID) | 118 | if (client.AgentID != this.AgentID) |
126 | { | 119 | { |
@@ -129,7 +122,7 @@ namespace OpenSim | |||
129 | client.ClientAvatar.SendAppearanceToOtherAgent(this); | 122 | client.ClientAvatar.SendAppearanceToOtherAgent(this); |
130 | } | 123 | } |
131 | } | 124 | } |
132 | m_world.GetInitialPrims(this); | 125 | OpenSimRoot.Instance.LocalWorld.GetInitialPrims(this); |
133 | break; | 126 | break; |
134 | case PacketType.AgentIsNowWearing: | 127 | case PacketType.AgentIsNowWearing: |
135 | AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack; | 128 | AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack; |
@@ -141,7 +134,7 @@ namespace OpenSim | |||
141 | this.ClientAvatar.SetAppearance(appear); | 134 | this.ClientAvatar.SetAppearance(appear); |
142 | break; | 135 | break; |
143 | case PacketType.ObjectAdd: | 136 | case PacketType.ObjectAdd: |
144 | m_world.AddNewPrim((ObjectAddPacket)Pack, this); | 137 | OpenSimRoot.Instance.LocalWorld.AddNewPrim((ObjectAddPacket)Pack, this); |
145 | break; | 138 | break; |
146 | case PacketType.ObjectLink: | 139 | case PacketType.ObjectLink: |
147 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(Pack.ToString()); | 140 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(Pack.ToString()); |
@@ -153,7 +146,7 @@ namespace OpenSim | |||
153 | ObjectShapePacket shape = (ObjectShapePacket)Pack; | 146 | ObjectShapePacket shape = (ObjectShapePacket)Pack; |
154 | for (int i = 0; i < shape.ObjectData.Length; i++) | 147 | for (int i = 0; i < shape.ObjectData.Length; i++) |
155 | { | 148 | { |
156 | foreach (Entity ent in m_world.Entities.Values) | 149 | foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) |
157 | { | 150 | { |
158 | if (ent.localid == shape.ObjectData[i].ObjectLocalID) | 151 | if (ent.localid == shape.ObjectData[i].ObjectLocalID) |
159 | { | 152 | { |
@@ -170,7 +163,7 @@ namespace OpenSim | |||
170 | if (multipleupdate.ObjectData[i].Type == 9) //change position | 163 | if (multipleupdate.ObjectData[i].Type == 9) //change position |
171 | { | 164 | { |
172 | libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); | 165 | libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); |
173 | foreach (Entity ent in m_world.Entities.Values) | 166 | foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) |
174 | { | 167 | { |
175 | if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) | 168 | if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) |
176 | { | 169 | { |
@@ -184,7 +177,7 @@ namespace OpenSim | |||
184 | else if (multipleupdate.ObjectData[i].Type == 10)//rotation | 177 | else if (multipleupdate.ObjectData[i].Type == 10)//rotation |
185 | { | 178 | { |
186 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); | 179 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); |
187 | foreach (Entity ent in m_world.Entities.Values) | 180 | foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) |
188 | { | 181 | { |
189 | if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) | 182 | if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) |
190 | { | 183 | { |
@@ -197,7 +190,7 @@ namespace OpenSim | |||
197 | { | 190 | { |
198 | 191 | ||
199 | libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); | 192 | libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); |
200 | foreach (Entity ent in m_world.Entities.Values) | 193 | foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) |
201 | { | 194 | { |
202 | if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) | 195 | if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) |
203 | { | 196 | { |
@@ -211,13 +204,13 @@ namespace OpenSim | |||
211 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; | 204 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; |
212 | for (int i = 0; i < imageRequest.RequestImage.Length; i++) | 205 | for (int i = 0; i < imageRequest.RequestImage.Length; i++) |
213 | { | 206 | { |
214 | m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image); | 207 | OpenSimRoot.Instance.AssetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image); |
215 | } | 208 | } |
216 | break; | 209 | break; |
217 | case PacketType.TransferRequest: | 210 | case PacketType.TransferRequest: |
218 | //Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got transfer request"); | 211 | //Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got transfer request"); |
219 | TransferRequestPacket transfer = (TransferRequestPacket)Pack; | 212 | TransferRequestPacket transfer = (TransferRequestPacket)Pack; |
220 | m_assetCache.AddAssetRequest(this, transfer); | 213 | OpenSimRoot.Instance.AssetCache.AddAssetRequest(this, transfer); |
221 | break; | 214 | break; |
222 | case PacketType.AgentUpdate: | 215 | case PacketType.AgentUpdate: |
223 | ClientAvatar.HandleUpdate((AgentUpdatePacket)Pack); | 216 | ClientAvatar.HandleUpdate((AgentUpdatePacket)Pack); |
@@ -237,18 +230,18 @@ namespace OpenSim | |||
237 | kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; | 230 | kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; |
238 | kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock(); | 231 | kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock(); |
239 | kill.ObjectData[0].ID = this.ClientAvatar.localid; | 232 | kill.ObjectData[0].ID = this.ClientAvatar.localid; |
240 | foreach (SimClient client in m_clientThreads.Values) | 233 | foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) |
241 | { | 234 | { |
242 | client.OutPacket(kill); | 235 | client.OutPacket(kill); |
243 | } | 236 | } |
244 | m_gridServer.LogoutSession(this.SessionID, this.AgentID, this.CircuitCode); | 237 | OpenSimRoot.Instance.GridServers.GridServer.LogoutSession(this.SessionID, this.AgentID, this.CircuitCode); |
245 | lock (m_world.Entities) | 238 | lock (OpenSimRoot.Instance.LocalWorld.Entities) |
246 | { | 239 | { |
247 | m_world.Entities.Remove(this.AgentID); | 240 | OpenSimRoot.Instance.LocalWorld.Entities.Remove(this.AgentID); |
248 | } | 241 | } |
249 | //need to do other cleaning up here too | 242 | //need to do other cleaning up here too |
250 | m_clientThreads.Remove(this.CircuitCode); //this.userEP); | 243 | OpenSimRoot.Instance.ClientThreads.Remove(this.CircuitCode); //this.userEP); |
251 | m_application.RemoveClientCircuit(this.CircuitCode); | 244 | OpenSimRoot.Instance.Application.RemoveClientCircuit(this.CircuitCode); |
252 | this.ClientThread.Abort(); | 245 | this.ClientThread.Abort(); |
253 | break; | 246 | break; |
254 | case PacketType.ChatFromViewer: | 247 | case PacketType.ChatFromViewer: |
@@ -265,7 +258,7 @@ namespace OpenSim | |||
265 | reply.ChatData.FromName = _enc.GetBytes(this.ClientAvatar.firstname + " " + this.ClientAvatar.lastname + "\0"); | 258 | reply.ChatData.FromName = _enc.GetBytes(this.ClientAvatar.firstname + " " + this.ClientAvatar.lastname + "\0"); |
266 | reply.ChatData.OwnerID = this.AgentID; | 259 | reply.ChatData.OwnerID = this.AgentID; |
267 | reply.ChatData.SourceID = this.AgentID; | 260 | reply.ChatData.SourceID = this.AgentID; |
268 | foreach (SimClient client in m_clientThreads.Values) | 261 | foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) |
269 | { | 262 | { |
270 | client.OutPacket(reply); | 263 | client.OutPacket(reply); |
271 | } | 264 | } |
@@ -274,7 +267,7 @@ namespace OpenSim | |||
274 | ObjectImagePacket imagePack = (ObjectImagePacket)Pack; | 267 | ObjectImagePacket imagePack = (ObjectImagePacket)Pack; |
275 | for (int i = 0; i < imagePack.ObjectData.Length; i++) | 268 | for (int i = 0; i < imagePack.ObjectData.Length; i++) |
276 | { | 269 | { |
277 | foreach (Entity ent in m_world.Entities.Values) | 270 | foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) |
278 | { | 271 | { |
279 | if (ent.localid == imagePack.ObjectData[i].ObjectLocalID) | 272 | if (ent.localid == imagePack.ObjectData[i].ObjectLocalID) |
280 | { | 273 | { |
@@ -285,7 +278,7 @@ namespace OpenSim | |||
285 | break; | 278 | break; |
286 | case PacketType.ObjectFlagUpdate: | 279 | case PacketType.ObjectFlagUpdate: |
287 | ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; | 280 | ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; |
288 | foreach (Entity ent in m_world.Entities.Values) | 281 | foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) |
289 | { | 282 | { |
290 | if (ent.localid == flags.AgentData.ObjectLocalID) | 283 | if (ent.localid == flags.AgentData.ObjectLocalID) |
291 | { | 284 | { |
@@ -313,7 +306,7 @@ namespace OpenSim | |||
313 | break; | 306 | break; |
314 | case PacketType.CreateInventoryFolder: | 307 | case PacketType.CreateInventoryFolder: |
315 | CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack; | 308 | CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack; |
316 | m_inventoryCache.CreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type); | 309 | OpenSimRoot.Instance.InventoryCache.CreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type); |
317 | Console.WriteLine(Pack.ToString()); | 310 | Console.WriteLine(Pack.ToString()); |
318 | break; | 311 | break; |
319 | case PacketType.CreateInventoryItem: | 312 | case PacketType.CreateInventoryItem: |
@@ -327,11 +320,11 @@ namespace OpenSim | |||
327 | case PacketType.FetchInventory: | 320 | case PacketType.FetchInventory: |
328 | //Console.WriteLine("fetch item packet"); | 321 | //Console.WriteLine("fetch item packet"); |
329 | FetchInventoryPacket FetchInventory = (FetchInventoryPacket)Pack; | 322 | FetchInventoryPacket FetchInventory = (FetchInventoryPacket)Pack; |
330 | m_inventoryCache.FetchInventory(this, FetchInventory); | 323 | OpenSimRoot.Instance.InventoryCache.FetchInventory(this, FetchInventory); |
331 | break; | 324 | break; |
332 | case PacketType.FetchInventoryDescendents: | 325 | case PacketType.FetchInventoryDescendents: |
333 | FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; | 326 | FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; |
334 | m_inventoryCache.FetchInventoryDescendents(this, Fetch); | 327 | OpenSimRoot.Instance.InventoryCache.FetchInventoryDescendents(this, Fetch); |
335 | break; | 328 | break; |
336 | case PacketType.UpdateInventoryItem: | 329 | case PacketType.UpdateInventoryItem: |
337 | UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack; | 330 | UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack; |
@@ -339,17 +332,17 @@ namespace OpenSim | |||
339 | { | 332 | { |
340 | if (update.InventoryData[i].TransactionID != LLUUID.Zero) | 333 | if (update.InventoryData[i].TransactionID != LLUUID.Zero) |
341 | { | 334 | { |
342 | AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID)); | 335 | AssetBase asset = OpenSimRoot.Instance.AssetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID)); |
343 | if (asset != null) | 336 | if (asset != null) |
344 | { | 337 | { |
345 | m_inventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset); | 338 | OpenSimRoot.Instance.InventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset); |
346 | } | 339 | } |
347 | else | 340 | else |
348 | { | 341 | { |
349 | asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID); | 342 | asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID); |
350 | if (asset != null) | 343 | if (asset != null) |
351 | { | 344 | { |
352 | m_inventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset); | 345 | OpenSimRoot.Instance.InventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset); |
353 | } | 346 | } |
354 | } | 347 | } |
355 | } | 348 | } |
@@ -357,7 +350,7 @@ namespace OpenSim | |||
357 | break; | 350 | break; |
358 | case PacketType.ViewerEffect: | 351 | case PacketType.ViewerEffect: |
359 | ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; | 352 | ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; |
360 | foreach (SimClient client in m_clientThreads.Values) | 353 | foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) |
361 | { | 354 | { |
362 | if (client.AgentID != this.AgentID) | 355 | if (client.AgentID != this.AgentID) |
363 | { | 356 | { |
@@ -369,7 +362,7 @@ namespace OpenSim | |||
369 | break; | 362 | break; |
370 | case PacketType.DeRezObject: | 363 | case PacketType.DeRezObject: |
371 | //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Received DeRezObject packet"); | 364 | //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Received DeRezObject packet"); |
372 | m_world.DeRezObject((DeRezObjectPacket)Pack, this); | 365 | OpenSimRoot.Instance.LocalWorld.DeRezObject((DeRezObjectPacket)Pack, this); |
373 | break; | 366 | break; |
374 | } | 367 | } |
375 | } | 368 | } |
@@ -508,11 +501,11 @@ namespace OpenSim | |||
508 | if (Pack.Header.Zerocoded) | 501 | if (Pack.Header.Zerocoded) |
509 | { | 502 | { |
510 | int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); | 503 | int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); |
511 | m_application.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, CircuitCode);//userEP); | 504 | OpenSimRoot.Instance.Application.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, CircuitCode);//userEP); |
512 | } | 505 | } |
513 | else | 506 | else |
514 | { | 507 | { |
515 | m_application.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, CircuitCode); //userEP); | 508 | OpenSimRoot.Instance.Application.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, CircuitCode); //userEP); |
516 | } | 509 | } |
517 | } | 510 | } |
518 | catch (Exception) | 511 | catch (Exception) |
@@ -576,22 +569,14 @@ namespace OpenSim | |||
576 | this.PacketQueue.Enqueue(item); | 569 | this.PacketQueue.Enqueue(item); |
577 | } | 570 | } |
578 | 571 | ||
579 | public SimClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, World world, Dictionary<uint, SimClient> clientThreads, AssetCache assetCache, IGridServer gridServer, OpenSimApplication application, InventoryCache inventoryCache, bool sandboxMode) | 572 | public SimClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack) |
580 | { | 573 | { |
581 | m_world = world; | ||
582 | m_clientThreads = clientThreads; | ||
583 | m_assetCache = assetCache; | ||
584 | m_gridServer = gridServer; | ||
585 | m_application = application; | ||
586 | m_inventoryCache = inventoryCache; | ||
587 | m_sandboxMode = sandboxMode; | ||
588 | |||
589 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs - Started up new client thread to handle incoming request"); | 574 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs - Started up new client thread to handle incoming request"); |
590 | cirpack = initialcirpack; | 575 | cirpack = initialcirpack; |
591 | userEP = remoteEP; | 576 | userEP = remoteEP; |
592 | PacketQueue = new BlockingQueue<QueItem>(); | 577 | PacketQueue = new BlockingQueue<QueItem>(); |
593 | 578 | ||
594 | this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache ); | 579 | this.UploadAssets = new AgentAssetUpload(this); |
595 | AckTimer = new System.Timers.Timer(500); | 580 | AckTimer = new System.Timers.Timer(500); |
596 | AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); | 581 | AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); |
597 | AckTimer.Start(); | 582 | AckTimer.Start(); |
@@ -623,16 +608,14 @@ namespace OpenSim | |||
623 | protected virtual void InitNewClient() | 608 | protected virtual void InitNewClient() |
624 | { | 609 | { |
625 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); | 610 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); |
626 | 611 | OpenSimRoot.Instance.LocalWorld.AddViewerAgent(this); | |
627 | m_world.AddViewerAgent(this); | 612 | world.Entity tempent = OpenSimRoot.Instance.LocalWorld.Entities[this.AgentID]; |
628 | world.Entity tempent = m_world.Entities[this.AgentID]; | ||
629 | |||
630 | this.ClientAvatar = (world.Avatar)tempent; | 613 | this.ClientAvatar = (world.Avatar)tempent; |
631 | } | 614 | } |
632 | 615 | ||
633 | protected virtual void AuthUser() | 616 | protected virtual void AuthUser() |
634 | { | 617 | { |
635 | AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); | 618 | AuthenticateResponse sessionInfo = OpenSimRoot.Instance.GridServers.GridServer.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); |
636 | if (!sessionInfo.Authorised) | 619 | if (!sessionInfo.Authorised) |
637 | { | 620 | { |
638 | //session/circuit not authorised | 621 | //session/circuit not authorised |
@@ -655,23 +638,23 @@ namespace OpenSim | |||
655 | } | 638 | } |
656 | 639 | ||
657 | // Create Inventory, currently only works for sandbox mode | 640 | // Create Inventory, currently only works for sandbox mode |
658 | if (m_sandboxMode) | 641 | if (OpenSimRoot.Instance.Sandbox) |
659 | { | 642 | { |
660 | if (sessionInfo.LoginInfo.InventoryFolder != null) | 643 | if (sessionInfo.LoginInfo.InventoryFolder != null) |
661 | { | 644 | { |
662 | this.CreateInventory(sessionInfo.LoginInfo.InventoryFolder); | 645 | this.CreateInventory(sessionInfo.LoginInfo.InventoryFolder); |
663 | if (sessionInfo.LoginInfo.BaseFolder != null) | 646 | if (sessionInfo.LoginInfo.BaseFolder != null) |
664 | { | 647 | { |
665 | m_inventoryCache.CreateNewInventoryFolder(this, sessionInfo.LoginInfo.BaseFolder); | 648 | OpenSimRoot.Instance.InventoryCache.CreateNewInventoryFolder(this, sessionInfo.LoginInfo.BaseFolder); |
666 | this.newAssetFolder = sessionInfo.LoginInfo.BaseFolder; | 649 | this.newAssetFolder = sessionInfo.LoginInfo.BaseFolder; |
667 | AssetBase[] inventorySet = m_assetCache.CreateNewInventorySet(this.AgentID); | 650 | AssetBase[] inventorySet = OpenSimRoot.Instance.AssetCache.CreateNewInventorySet(this.AgentID); |
668 | if (inventorySet != null) | 651 | if (inventorySet != null) |
669 | { | 652 | { |
670 | for (int i = 0; i < inventorySet.Length; i++) | 653 | for (int i = 0; i < inventorySet.Length; i++) |
671 | { | 654 | { |
672 | if (inventorySet[i] != null) | 655 | if (inventorySet[i] != null) |
673 | { | 656 | { |
674 | m_inventoryCache.AddNewInventoryItem(this, sessionInfo.LoginInfo.BaseFolder, inventorySet[i]); | 657 | OpenSimRoot.Instance.InventoryCache.AddNewInventoryItem(this, sessionInfo.LoginInfo.BaseFolder, inventorySet[i]); |
675 | } | 658 | } |
676 | } | 659 | } |
677 | } | 660 | } |
@@ -687,8 +670,8 @@ namespace OpenSim | |||
687 | { | 670 | { |
688 | AgentInventory inventory = new AgentInventory(); | 671 | AgentInventory inventory = new AgentInventory(); |
689 | inventory.AgentID = this.AgentID; | 672 | inventory.AgentID = this.AgentID; |
690 | m_inventoryCache.AddNewAgentsInventory(inventory); | 673 | OpenSimRoot.Instance.InventoryCache.AddNewAgentsInventory(inventory); |
691 | m_inventoryCache.CreateNewInventoryFolder(this, baseFolder); | 674 | OpenSimRoot.Instance.InventoryCache.CreateNewInventoryFolder(this, baseFolder); |
692 | } | 675 | } |
693 | } | 676 | } |
694 | } | 677 | } |