* One hopefully-final attempt at fixing this remoting issue.
parent
be11cddc00
commit
c52f9c04e2
|
@ -335,37 +335,45 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
||||||
{
|
{
|
||||||
if (this.listeners.ContainsKey(regionHandle))
|
try
|
||||||
{
|
{
|
||||||
this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData);
|
if (this.listeners.ContainsKey(regionHandle))
|
||||||
return true;
|
{
|
||||||
|
this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle);
|
||||||
|
if (regInfo != null)
|
||||||
|
{
|
||||||
|
//don't want to be creating a new link to the remote instance every time like we are here
|
||||||
|
bool retValue = false;
|
||||||
|
|
||||||
|
|
||||||
|
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
|
||||||
|
typeof(OGS1InterRegionRemoting),
|
||||||
|
"tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions");
|
||||||
|
if (remObject != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
retValue = remObject.InformRegionOfChildAgent(regionHandle, agentData);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("remoting object not found");
|
||||||
|
}
|
||||||
|
remObject = null;
|
||||||
|
|
||||||
|
|
||||||
|
return retValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle);
|
catch (System.Runtime.Remoting.RemotingException e)
|
||||||
if (regInfo != null)
|
|
||||||
{
|
{
|
||||||
//don't want to be creating a new link to the remote instance every time like we are here
|
MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString());
|
||||||
bool retValue = false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
|
|
||||||
typeof(OGS1InterRegionRemoting),
|
|
||||||
"tcp://"+ regInfo.RemotingAddress+":"+regInfo.RemotingPort+"/InterRegions");
|
|
||||||
if (remObject != null)
|
|
||||||
{
|
|
||||||
|
|
||||||
retValue = remObject.InformRegionOfChildAgent(regionHandle, agentData);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Console.WriteLine("remoting object not found");
|
|
||||||
}
|
|
||||||
remObject = null;
|
|
||||||
|
|
||||||
|
|
||||||
return retValue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -377,37 +385,45 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
|
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
|
||||||
{
|
{
|
||||||
if (this.listeners.ContainsKey(regionHandle))
|
try
|
||||||
{
|
{
|
||||||
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
|
if (this.listeners.ContainsKey(regionHandle))
|
||||||
return true;
|
{
|
||||||
|
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle);
|
||||||
|
if (regInfo != null)
|
||||||
|
{
|
||||||
|
bool retValue = false;
|
||||||
|
|
||||||
|
|
||||||
|
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
|
||||||
|
typeof(OGS1InterRegionRemoting),
|
||||||
|
"tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions");
|
||||||
|
if (remObject != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID, position);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("remoting object not found");
|
||||||
|
}
|
||||||
|
remObject = null;
|
||||||
|
|
||||||
|
|
||||||
|
return retValue;
|
||||||
|
}
|
||||||
|
//TODO need to see if we know about where this region is and use .net remoting
|
||||||
|
// to inform it.
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle);
|
catch (System.Runtime.Remoting.RemotingException e)
|
||||||
if (regInfo != null)
|
|
||||||
{
|
{
|
||||||
bool retValue = false;
|
MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString());
|
||||||
|
return false;
|
||||||
|
|
||||||
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
|
|
||||||
typeof(OGS1InterRegionRemoting),
|
|
||||||
"tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions");
|
|
||||||
if (remObject != null)
|
|
||||||
{
|
|
||||||
|
|
||||||
retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID, position);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Console.WriteLine("remoting object not found");
|
|
||||||
}
|
|
||||||
remObject = null;
|
|
||||||
|
|
||||||
|
|
||||||
return retValue;
|
|
||||||
}
|
}
|
||||||
//TODO need to see if we know about where this region is and use .net remoting
|
|
||||||
// to inform it.
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue