Fixed up merge conflicts from master due to changes in sending IMs

between DSG regions
dsg
Dan Lake 2011-06-15 15:05:17 -07:00
parent 327f30e6d1
commit 66f905b09c
5 changed files with 20 additions and 35 deletions

View File

@ -49,7 +49,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private bool m_Enabled = false;
protected List<Scene> m_Scenes = new List<Scene>();
protected Dictionary<UUID, UUID> m_UserRegionMap = new Dictionary<UUID, UUID>();
protected Dictionary<UUID, GridRegion> m_RegionInfoMap = new Dictionary<UUID, GridRegion>();
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)
@ -574,13 +561,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);
}
else

View File

@ -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);
}
}

View File

@ -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["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;
}
}

View File

@ -4070,7 +4070,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
PrimitiveBaseShape shapeValue;
try
{
shapeValue = SceneObjectSerializer.ReadShape(reader, "Shape");
bool errors = false;
shapeValue = SceneObjectSerializer.ReadShape(reader, "Shape", out errors);
}
catch (Exception e)
{

View File

@ -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);
}
}