diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IPresenceModule.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 34 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 37 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneBase.cs | 11 |
5 files changed, 75 insertions, 29 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs b/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs index 630c6a3..d44c1e1 100644 --- a/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs | |||
@@ -31,13 +31,13 @@ namespace OpenSim.Region.Framework.Interfaces | |||
31 | { | 31 | { |
32 | public struct PresenceInfo | 32 | public struct PresenceInfo |
33 | { | 33 | { |
34 | public UUID userID; | 34 | public string UserID; |
35 | public UUID regionID; | 35 | public UUID RegionID; |
36 | 36 | ||
37 | public PresenceInfo(UUID userID, UUID regionID) | 37 | public PresenceInfo(string userID, UUID regionID) |
38 | { | 38 | { |
39 | this.userID = userID; | 39 | UserID = userID; |
40 | this.regionID = regionID; | 40 | RegionID = regionID; |
41 | } | 41 | } |
42 | } | 42 | } |
43 | 43 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 3044017..a14c853 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -573,7 +573,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
573 | "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}", | 573 | "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}", |
574 | remoteClient.AgentId, oldAgentID, oldItemID, newFolderID, newName); | 574 | remoteClient.AgentId, oldAgentID, oldItemID, newFolderID, newName); |
575 | 575 | ||
576 | InventoryItemBase item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(oldItemID); | 576 | InventoryItemBase item = null; |
577 | if (LibraryService != null && LibraryService.LibraryRootFolder != null) | ||
578 | item = LibraryService.LibraryRootFolder.FindItem(oldItemID); | ||
577 | 579 | ||
578 | if (item == null) | 580 | if (item == null) |
579 | { | 581 | { |
@@ -1211,9 +1213,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1211 | item = InventoryService.GetItem(item); | 1213 | item = InventoryService.GetItem(item); |
1212 | 1214 | ||
1213 | // Try library | 1215 | // Try library |
1214 | if (null == item) | 1216 | if (null == item && LibraryService != null && LibraryService.LibraryRootFolder != null) |
1215 | { | 1217 | { |
1216 | item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); | 1218 | item = LibraryService.LibraryRootFolder.FindItem(itemID); |
1217 | } | 1219 | } |
1218 | 1220 | ||
1219 | if (item != null) | 1221 | if (item != null) |
@@ -1280,9 +1282,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1280 | 1282 | ||
1281 | // Try library | 1283 | // Try library |
1282 | // XXX clumsy, possibly should be one call | 1284 | // XXX clumsy, possibly should be one call |
1283 | if (null == item) | 1285 | if (null == item && LibraryService != null && LibraryService.LibraryRootFolder != null) |
1284 | { | 1286 | { |
1285 | item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); | 1287 | item = LibraryService.LibraryRootFolder.FindItem(itemID); |
1286 | } | 1288 | } |
1287 | 1289 | ||
1288 | if (item != null) | 1290 | if (item != null) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 47fbeb4..022d79d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -424,7 +424,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
424 | /// <param name="ownerID"></param> | 424 | /// <param name="ownerID"></param> |
425 | public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID) | 425 | public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID) |
426 | { | 426 | { |
427 | if (ownerID == CommsManager.UserProfileCacheService.LibraryRoot.Owner) | 427 | if (LibraryService != null && LibraryService.LibraryRootFolder != null && ownerID == LibraryService.LibraryRootFolder.Owner) |
428 | { | 428 | { |
429 | //m_log.Debug("request info for library item"); | 429 | //m_log.Debug("request info for library item"); |
430 | return; | 430 | return; |
@@ -458,13 +458,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
458 | // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc. | 458 | // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc. |
459 | // can be handled transparently). | 459 | // can be handled transparently). |
460 | InventoryFolderImpl fold = null; | 460 | InventoryFolderImpl fold = null; |
461 | if ((fold = CommsManager.UserProfileCacheService.LibraryRoot.FindFolder(folderID)) != null) | 461 | if (LibraryService != null && LibraryService.LibraryRootFolder != null) |
462 | { | 462 | if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) |
463 | remoteClient.SendInventoryFolderDetails( | 463 | { |
464 | fold.Owner, folderID, fold.RequestListOfItems(), | 464 | remoteClient.SendInventoryFolderDetails( |
465 | fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); | 465 | fold.Owner, folderID, fold.RequestListOfItems(), |
466 | return; | 466 | fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); |
467 | } | 467 | return; |
468 | } | ||
468 | 469 | ||
469 | // We're going to send the reply async, because there may be | 470 | // We're going to send the reply async, because there may be |
470 | // an enormous quantity of packets -- basically the entire inventory! | 471 | // an enormous quantity of packets -- basically the entire inventory! |
@@ -512,15 +513,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
512 | // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc. | 513 | // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc. |
513 | // can be handled transparently). | 514 | // can be handled transparently). |
514 | InventoryFolderImpl fold; | 515 | InventoryFolderImpl fold; |
515 | if ((fold = CommsManager.UserProfileCacheService.LibraryRoot.FindFolder(folderID)) != null) | 516 | if (LibraryService != null && LibraryService.LibraryRootFolder != null) |
516 | { | 517 | if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) |
517 | version = 0; | 518 | { |
518 | InventoryCollection ret = new InventoryCollection(); | 519 | version = 0; |
519 | ret.Folders = new List<InventoryFolderBase>(); | 520 | InventoryCollection ret = new InventoryCollection(); |
520 | ret.Items = fold.RequestListOfItems(); | 521 | ret.Folders = new List<InventoryFolderBase>(); |
522 | ret.Items = fold.RequestListOfItems(); | ||
521 | 523 | ||
522 | return ret; | 524 | return ret; |
523 | } | 525 | } |
524 | 526 | ||
525 | InventoryCollection contents = new InventoryCollection(); | 527 | InventoryCollection contents = new InventoryCollection(); |
526 | 528 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 764ac60..20c0622 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -240,6 +240,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
240 | } | 240 | } |
241 | } | 241 | } |
242 | 242 | ||
243 | protected ILibraryService m_LibraryService; | ||
244 | |||
245 | public ILibraryService LibraryService | ||
246 | { | ||
247 | get | ||
248 | { | ||
249 | if (m_LibraryService == null) | ||
250 | m_LibraryService = RequestModuleInterface<ILibraryService>(); | ||
251 | |||
252 | return m_LibraryService; | ||
253 | } | ||
254 | } | ||
255 | |||
243 | protected IXMLRPC m_xmlrpcModule; | 256 | protected IXMLRPC m_xmlrpcModule; |
244 | protected IWorldComm m_worldCommModule; | 257 | protected IWorldComm m_worldCommModule; |
245 | protected IAvatarFactory m_AvatarFactory; | 258 | protected IAvatarFactory m_AvatarFactory; |
@@ -3483,10 +3496,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
3483 | { | 3496 | { |
3484 | reason = String.Empty; | 3497 | reason = String.Empty; |
3485 | 3498 | ||
3486 | bool result = CommsManager.UserService.VerifySession(agent.AgentID, agent.SessionID); | 3499 | IAuthenticationService auth = RequestModuleInterface<IAuthenticationService>(); |
3487 | m_log.Debug("[CONNECTION BEGIN]: User authentication returned " + result); | 3500 | if (auth == null) |
3501 | { | ||
3502 | reason = String.Format("Failed to authenticate user {0} {1} in region {2}. Authentication service does not exist.", agent.firstname, agent.lastname, RegionInfo.RegionName); | ||
3503 | return false; | ||
3504 | } | ||
3505 | |||
3506 | bool result = auth.Verify(agent.AgentID, agent.SecureSessionID.ToString(), 30); | ||
3507 | |||
3508 | m_log.Debug("[CONNECTION BEGIN]: Session authentication returned " + result); | ||
3488 | if (!result) | 3509 | if (!result) |
3489 | reason = String.Format("Failed to authenticate user {0} {1}, access denied.", agent.firstname, agent.lastname); | 3510 | reason = String.Format("Failed to authenticate user {0} {1}, access denied to region {2}.", agent.firstname, agent.lastname, RegionInfo.RegionName); |
3490 | 3511 | ||
3491 | return result; | 3512 | return result; |
3492 | } | 3513 | } |
@@ -4889,5 +4910,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
4889 | if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 2000) | 4910 | if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 2000) |
4890 | StartTimer(); | 4911 | StartTimer(); |
4891 | } | 4912 | } |
4913 | |||
4914 | public override ISceneObject DeserializeObject(string representation) | ||
4915 | { | ||
4916 | return SceneObjectSerializer.FromXml2Format(representation); | ||
4917 | } | ||
4918 | |||
4919 | public override bool AllowScriptCrossings | ||
4920 | { | ||
4921 | get { return m_allowScriptCrossings; } | ||
4922 | } | ||
4892 | } | 4923 | } |
4893 | } | 4924 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index 1547f9a..19eea1e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs | |||
@@ -510,5 +510,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
510 | 510 | ||
511 | MainConsole.Instance.Commands.AddCommand(modulename, shared, command, shorthelp, longhelp, callback); | 511 | MainConsole.Instance.Commands.AddCommand(modulename, shared, command, shorthelp, longhelp, callback); |
512 | } | 512 | } |
513 | |||
514 | public virtual ISceneObject DeserializeObject(string representation) | ||
515 | { | ||
516 | return null; | ||
517 | } | ||
518 | |||
519 | public virtual bool AllowScriptCrossings | ||
520 | { | ||
521 | get { return false; } | ||
522 | } | ||
523 | |||
513 | } | 524 | } |
514 | } | 525 | } |