diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index b88bdbb2b7..2778b5c5c1 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs @@ -48,8 +48,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage private bool m_Enabled = false; protected List m_Scenes = new List(); - protected Dictionary m_UserRegionMap = new Dictionary(); - protected Dictionary m_RegionInfoMap = new Dictionary(); + protected Dictionary m_UserRegionMap = new Dictionary(); public event UndeliveredMessage OnUndeliveredMessage; @@ -537,19 +536,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage if (upd != null) { - GridRegion reginfo = null; - // Try to pull reginfo from our cache - lock (m_RegionInfoMap) - { - if (!m_RegionInfoMap.TryGetValue(upd.RegionID, out reginfo)) - reginfo = null; - } - - // If it wasn't there, then look it up from grid. - if (reginfo == null) - { - reginfo = m_Scenes[0].GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, upd.RegionID); - } + GridRegion reginfo = m_Scenes[0].GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, upd.RegionID); // If we found the reginfo, send the IM to the region if (reginfo != null) @@ -573,13 +560,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { m_UserRegionMap.Add(toAgentID, upd.RegionID); } - } - lock (m_RegionInfoMap) - { - // Since we never look it up again, we don't need to update it - // but if it's not in the map yet, add it now. - if (!m_RegionInfoMap.ContainsKey(upd.RegionID)) - m_RegionInfoMap.Add(upd.RegionID, reginfo); } result(true); } diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncAvatar.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncAvatar.cs index 03498ec202..cfd48fc544 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncAvatar.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncAvatar.cs @@ -621,7 +621,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule if (gridDialogModule != null) { - gridDialogModule.SendGridDialogViaXMLRPC(this.AgentId, objectname, objectID, ownerFirstName, ownerLastName, + gridDialogModule.SendGridDialogViaXMLRPC(this.AgentId, objectname, objectID, ownerID, ownerFirstName, ownerLastName, msg, textureID, ch, buttonlabels, UUID.Zero); } } diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/GridDialogModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/GridDialogModule.cs index 149831bf6c..b355393f5a 100755 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/GridDialogModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/GridDialogModule.cs @@ -126,7 +126,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule #region GridCommunication - public delegate void GridDialogDelegate(UUID avatarID, string objectName, UUID objectID, string ownerFirstName, + public delegate void GridDialogDelegate(UUID avatarID, string objectName, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string message, UUID textureID, int ch, string[] buttonlabels, UUID prevRegionID); protected virtual void GridDialogCompleted(IAsyncResult iar) @@ -136,17 +136,17 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule icon.EndInvoke(iar); } - public void SendGridDialogViaXMLRPC(UUID avatarID, string objectName, UUID objectID, string ownerFirstName, + public void SendGridDialogViaXMLRPC(UUID avatarID, string objectName, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string message, UUID textureID, int ch, string[] buttonlabels, UUID prevRegionID) { GridDialogDelegate d = SendGridDialogViaXMLRPCAsync; - d.BeginInvoke(avatarID, objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels, prevRegionID, + d.BeginInvoke(avatarID, objectName, objectID, ownerID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels, prevRegionID, GridDialogCompleted, d); } - private void SendGridDialogViaXMLRPCAsync(UUID avatarID, string objectName, UUID objectID, string ownerFirstName, + private void SendGridDialogViaXMLRPCAsync(UUID avatarID, string objectName, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string message, UUID textureID, int ch, string[] buttonlabels, UUID prevRegionID) { PresenceInfo upd = null; @@ -190,7 +190,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule upd.RegionID); if (reginfo != null) { - Hashtable msgdata = ConvertGridDialogToXMLRPC(avatarID, objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels); + Hashtable msgdata = ConvertGridDialogToXMLRPC(avatarID, objectName, objectID, ownerID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels); //= ConvertGridInstantMessageToXMLRPC(im); // Not actually used anymore, left in for compatibility // Remove at next interface change @@ -200,19 +200,20 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule bool imresult = doDialogSending(reginfo, msgdata); if (!imresult) { - SendGridDialogViaXMLRPCAsync(avatarID, objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels, prevRegionID); + SendGridDialogViaXMLRPCAsync(avatarID, objectName, objectID, ownerID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels, prevRegionID); } } } } - private Hashtable ConvertGridDialogToXMLRPC(UUID avatarID, string objectName, UUID objectID, string ownerFirstName, string ownerLastName, + private Hashtable ConvertGridDialogToXMLRPC(UUID avatarID, string objectName, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string message, UUID textureID, int ch, string[] buttonlabels) { Hashtable msgdata = new Hashtable(); msgdata["avatarID"] = avatarID.ToString(); msgdata["objectName"] = objectName; - msgdata["objectID"] = objectID.ToString(); + msgdata["objectID"] = objectID.ToString(); + msgdata["ownerID"] = ownerID.ToString(); msgdata["ownerFirstName"] = ownerFirstName; msgdata["ownerLastName"] = ownerLastName; msgdata["message"] = message; @@ -285,6 +286,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule UUID avatarID = UUID.Zero; UUID objectID = UUID.Zero; UUID textureID = UUID.Zero; + UUID ownerID = UUID.Zero; string objectName="", ownerFirstName="", ownerLastName=""; string message=""; int ch=0; @@ -295,6 +297,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule // Check if it's got all the data if (requestData.ContainsKey("avatarID") && requestData.ContainsKey("objectName") && requestData.ContainsKey("objectID") + && requestData.ContainsKey("ownerID") && requestData.ContainsKey("ownerFirstName") && requestData.ContainsKey("ownerLastName") && requestData.ContainsKey("message") && requestData.ContainsKey("textureID") && requestData.ContainsKey("ch") @@ -306,6 +309,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule UUID.TryParse((string)requestData["avatarID"], out avatarID); UUID.TryParse((string)requestData["objectID"], out objectID); UUID.TryParse((string)requestData["textureID"], out textureID); + UUID.TryParse((string)requestData["ownerID"], out ownerID); objectName = (string)requestData["objectName"]; ownerFirstName = (string)requestData["ownerFirstName"]; @@ -349,7 +353,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule if (!user.IsChildAgent) { - user.ControllingClient.SendDialog(objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels); + user.ControllingClient.SendDialog(objectName, objectID, ownerID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels); deliverSuccessful = true; } } diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs index 4e279dae47..c952f813e7 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs @@ -4069,8 +4069,9 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule XmlTextReader reader = new XmlTextReader(sr); PrimitiveBaseShape shapeValue; try - { - shapeValue = SceneObjectSerializer.ReadShape(reader, "Shape"); + { + bool errors = false; + shapeValue = SceneObjectSerializer.ReadShape(reader, "Shape", out errors); } catch (Exception e) { diff --git a/OpenSim/Region/Framework/Interfaces/IGridDialogModule.cs b/OpenSim/Region/Framework/Interfaces/IGridDialogModule.cs index 55f7876273..102dea44a4 100755 --- a/OpenSim/Region/Framework/Interfaces/IGridDialogModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IGridDialogModule.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.Framework.Interfaces { public interface IGridDialogModule { - void SendGridDialogViaXMLRPC(UUID avatarID, string objectName, UUID objectID, string ownerFirstName, string ownerLastName, + void SendGridDialogViaXMLRPC(UUID avatarID, string objectName, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string message, UUID textureID, int ch, string[] buttonlabels, UUID prevRegionID); } }