* Rex merge, OGS1 Merged fairly cleanly.
parent
fe50f2e6b9
commit
d6e571517f
|
@ -13,7 +13,7 @@
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
@ -47,15 +47,18 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
public class OGS1GridServices : IGridServices, IInterRegionCommunications
|
public class OGS1GridServices : IGridServices, IInterRegionCommunications
|
||||||
{
|
{
|
||||||
|
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private LocalBackEndServices m_localBackend = new LocalBackEndServices();
|
private LocalBackEndServices m_localBackend = new LocalBackEndServices();
|
||||||
private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>();
|
private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>();
|
||||||
private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>();
|
private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>();
|
||||||
|
private Dictionary<ulong, int> m_deadRegionCache = new Dictionary<ulong, int>();
|
||||||
private Dictionary<string, string> m_queuedGridSettings = new Dictionary<string, string>();
|
private Dictionary<string, string> m_queuedGridSettings = new Dictionary<string, string>();
|
||||||
|
|
||||||
public BaseHttpServer httpListener;
|
public BaseHttpServer httpListener;
|
||||||
public NetworkServersInfo serversInfo;
|
public NetworkServersInfo serversInfo;
|
||||||
public BaseHttpServer httpServer;
|
public BaseHttpServer httpServer;
|
||||||
public string _gdebugRegionName = "";
|
public string _gdebugRegionName = String.Empty;
|
||||||
|
|
||||||
public string gdebugRegionName
|
public string gdebugRegionName
|
||||||
{
|
{
|
||||||
|
@ -63,7 +66,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
set { _gdebugRegionName = value; }
|
set { _gdebugRegionName = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string _rdebugRegionName = "";
|
public string _rdebugRegionName = String.Empty;
|
||||||
|
|
||||||
public string rdebugRegionName
|
public string rdebugRegionName
|
||||||
{
|
{
|
||||||
|
@ -72,7 +75,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// Contructor. Adds "expect_user" and "check" xmlrpc method handlers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="servers_info"></param>
|
/// <param name="servers_info"></param>
|
||||||
/// <param name="httpServe"></param>
|
/// <param name="httpServe"></param>
|
||||||
|
@ -98,6 +101,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
// Login / Authentication
|
// Login / Authentication
|
||||||
|
|
||||||
GridParams["authkey"] = serversInfo.GridSendKey;
|
GridParams["authkey"] = serversInfo.GridSendKey;
|
||||||
|
GridParams["recvkey"] = serversInfo.GridRecvKey;
|
||||||
GridParams["UUID"] = regionInfo.RegionID.ToString();
|
GridParams["UUID"] = regionInfo.RegionID.ToString();
|
||||||
GridParams["sim_ip"] = regionInfo.ExternalHostName;
|
GridParams["sim_ip"] = regionInfo.ExternalHostName;
|
||||||
GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString();
|
GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString();
|
||||||
|
@ -108,6 +112,16 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString();
|
GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString();
|
||||||
GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString();
|
GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString();
|
||||||
|
|
||||||
|
// part of an initial brutish effort to provide accurate information (as per the xml region spec)
|
||||||
|
// wrt the ownership of a given region
|
||||||
|
// the (very bad) assumption is that this value is being read and handled inconsistently or
|
||||||
|
// not at all. Current strategy is to put the code in place to support the validity of this information
|
||||||
|
// and to roll forward debugging any issues from that point
|
||||||
|
//
|
||||||
|
// this particular section of the mod attempts to supply a value from the region's xml file to the grid
|
||||||
|
// server for the UUID of the region's owner (master avatar)
|
||||||
|
GridParams["master_avatar_uuid"] = regionInfo.MasterAvatarAssignedUUID.ToString();
|
||||||
|
|
||||||
// Package into an XMLRPC Request
|
// Package into an XMLRPC Request
|
||||||
ArrayList SendParams = new ArrayList();
|
ArrayList SendParams = new ArrayList();
|
||||||
SendParams.Add(GridParams);
|
SendParams.Add(GridParams);
|
||||||
|
@ -118,10 +132,10 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GridReq = new XmlRpcRequest("simulator_login", SendParams);
|
GridReq = new XmlRpcRequest("simulator_login", SendParams);
|
||||||
GridResp = GridReq.Send(serversInfo.GridURL, 10000);
|
GridResp = GridReq.Send(serversInfo.GridURL, 16000);
|
||||||
} catch (Exception ex)
|
} catch (Exception ex)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Unable to connect to grid. Grid server not running?");
|
m_log.Error("Unable to connect to grid. Grid server not running?");
|
||||||
throw(ex);
|
throw(ex);
|
||||||
}
|
}
|
||||||
Hashtable GridRespData = (Hashtable)GridResp.Value;
|
Hashtable GridRespData = (Hashtable)GridResp.Value;
|
||||||
|
@ -131,7 +145,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
if (GridRespData.ContainsKey("error"))
|
if (GridRespData.ContainsKey("error"))
|
||||||
{
|
{
|
||||||
string errorstring = (string) GridRespData["error"];
|
string errorstring = (string) GridRespData["error"];
|
||||||
MainLog.Instance.Error("Unable to connect to grid: " + errorstring);
|
m_log.Error("Unable to connect to grid: " + errorstring);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -313,7 +327,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (WebException)
|
catch (WebException)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("GRID",
|
m_log.Error("[GRID]: " +
|
||||||
"Region lookup failed for: " + regionHandle.ToString() +
|
"Region lookup failed for: " + regionHandle.ToString() +
|
||||||
" - Is the GridServer down?");
|
" - Is the GridServer down?");
|
||||||
return null;
|
return null;
|
||||||
|
@ -374,6 +388,9 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return neighbours;
|
return neighbours;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates
|
/// Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -401,7 +418,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("MapBlockQuery XMLRPC failure: " + e.ToString());
|
m_log.Error("MapBlockQuery XMLRPC failure: " + e.ToString());
|
||||||
return new Hashtable();
|
return new Hashtable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -428,13 +445,15 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
// Grid Request Processing
|
// Grid Request Processing
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// Received from the user server when a user starts logging in. This call allows
|
||||||
|
/// the region to prepare for direct communication from the client. Sends back an empty
|
||||||
|
/// xmlrpc response on completion.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public XmlRpcResponse ExpectUser(XmlRpcRequest request)
|
public XmlRpcResponse ExpectUser(XmlRpcRequest request)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Expecting User...");
|
m_log.Debug("[CONNECTION DEBUGGING]: Expect User called, starting agent setup ... ");
|
||||||
Hashtable requestData = (Hashtable) request.Params[0];
|
Hashtable requestData = (Hashtable) request.Params[0];
|
||||||
AgentCircuitData agentData = new AgentCircuitData();
|
AgentCircuitData agentData = new AgentCircuitData();
|
||||||
agentData.SessionID = new LLUUID((string) requestData["session_id"]);
|
agentData.SessionID = new LLUUID((string) requestData["session_id"]);
|
||||||
|
@ -455,10 +474,12 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1"))
|
if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1"))
|
||||||
{
|
{
|
||||||
|
m_log.Debug("[CONNECTION DEBUGGING]: Child agent detected");
|
||||||
agentData.child = true;
|
agentData.child = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
m_log.Debug("[CONNECTION DEBUGGING]: Main agent detected");
|
||||||
agentData.startpos =
|
agentData.startpos =
|
||||||
new LLVector3(Convert.ToUInt32(requestData["startpos_x"]),
|
new LLVector3(Convert.ToUInt32(requestData["startpos_x"]),
|
||||||
Convert.ToUInt32(requestData["startpos_y"]),
|
Convert.ToUInt32(requestData["startpos_y"]),
|
||||||
|
@ -468,9 +489,10 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
ulong regionHandle = Convert.ToUInt64((string) requestData["regionhandle"]);
|
ulong regionHandle = Convert.ToUInt64((string) requestData["regionhandle"]);
|
||||||
|
|
||||||
|
m_log.Debug("[CONNECTION DEBUGGING]: Triggering welcome for " + agentData.AgentID.ToString() + " into " + regionHandle.ToString());
|
||||||
m_localBackend.TriggerExpectUser(regionHandle, agentData);
|
m_localBackend.TriggerExpectUser(regionHandle, agentData);
|
||||||
|
|
||||||
MainLog.Instance.Verbose("GRID", "Welcoming new user...");
|
m_log.Info("[GRID]: Welcoming new user...");
|
||||||
|
|
||||||
return new XmlRpcResponse();
|
return new XmlRpcResponse();
|
||||||
}
|
}
|
||||||
|
@ -482,8 +504,17 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void StartRemoting()
|
private void StartRemoting()
|
||||||
{
|
{
|
||||||
TcpChannel ch = new TcpChannel((int) NetworkServersInfo.RemotingListenerPort);
|
TcpChannel ch;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ch = new TcpChannel((int)NetworkServersInfo.RemotingListenerPort);
|
||||||
ChannelServices.RegisterChannel(ch, false); // Disabled security as Mono doesnt support this.
|
ChannelServices.RegisterChannel(ch, false); // Disabled security as Mono doesnt support this.
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
m_log.Error("Exception while attempting to listen on TCP port " + (int)NetworkServersInfo.RemotingListenerPort + ".");
|
||||||
|
throw (ex);
|
||||||
|
}
|
||||||
|
|
||||||
WellKnownServiceTypeEntry wellType =
|
WellKnownServiceTypeEntry wellType =
|
||||||
new WellKnownServiceTypeEntry(typeof (OGS1InterRegionRemoting), "InterRegions",
|
new WellKnownServiceTypeEntry(typeof (OGS1InterRegionRemoting), "InterRegions",
|
||||||
|
@ -495,12 +526,23 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
InterRegionSingleton.Instance.OnPrimGroupNear += TriggerExpectPrimCrossing;
|
InterRegionSingleton.Instance.OnPrimGroupNear += TriggerExpectPrimCrossing;
|
||||||
InterRegionSingleton.Instance.OnRegionUp += TriggerRegionUp;
|
InterRegionSingleton.Instance.OnRegionUp += TriggerRegionUp;
|
||||||
InterRegionSingleton.Instance.OnChildAgentUpdate += TriggerChildAgentUpdate;
|
InterRegionSingleton.Instance.OnChildAgentUpdate += TriggerChildAgentUpdate;
|
||||||
//InterRegionSingleton.Instance.OnRegionUp += RegionUp;
|
InterRegionSingleton.Instance.OnTellRegionToCloseChildConnection += TriggerTellRegionToCloseChildConnection;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Methods called by regions in this instance
|
#region Methods called by regions in this instance
|
||||||
|
|
||||||
public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
|
public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
|
||||||
|
{
|
||||||
|
int failures = 0;
|
||||||
|
lock (m_deadRegionCache)
|
||||||
|
{
|
||||||
|
if (m_deadRegionCache.ContainsKey(regionHandle))
|
||||||
|
{
|
||||||
|
failures = m_deadRegionCache[regionHandle];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (failures <= 3)
|
||||||
{
|
{
|
||||||
RegionInfo regInfo = null;
|
RegionInfo regInfo = null;
|
||||||
try
|
try
|
||||||
|
@ -517,8 +559,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
bool retValue = false;
|
bool retValue = false;
|
||||||
|
|
||||||
|
|
||||||
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject(
|
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
|
||||||
typeof (OGS1InterRegionRemoting),
|
typeof(OGS1InterRegionRemoting),
|
||||||
"tcp://" + regInfo.RemotingAddress +
|
"tcp://" + regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions");
|
"/InterRegions");
|
||||||
|
@ -532,49 +574,59 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
Console.WriteLine("remoting object not found");
|
Console.WriteLine("remoting object not found");
|
||||||
}
|
}
|
||||||
remObject = null;
|
remObject = null;
|
||||||
MainLog.Instance.Verbose("INTER",
|
//m_log.Info("[INTER]: " +
|
||||||
gdebugRegionName +
|
//gdebugRegionName +
|
||||||
": OGS1 tried to Update Child Agent data on outside region and got " +
|
//": OGS1 tried to Update Child Agent data on outside region and got " +
|
||||||
retValue.ToString());
|
//retValue.ToString());
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " +
|
||||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (SocketException e)
|
catch (SocketException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Socket Error: Unable to connect to adjacent region: " + " " +
|
||||||
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (InvalidCredentialException e)
|
catch (InvalidCredentialException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Invalid Credentials: Unable to connect to adjacent region: " +
|
||||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (AuthenticationException e)
|
catch (AuthenticationException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
NoteDeadRegion(regionHandle);
|
||||||
regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
m_log.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
||||||
MainLog.Instance.Debug(e.ToString());
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
|
NoteDeadRegion(regionHandle);
|
||||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
m_log.Debug(e.ToString());
|
||||||
MainLog.Instance.Debug(e.ToString());
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//m_log.Info("[INTERREGION]: Skipped Sending Child Update to a region because it failed too many times:" + regionHandle.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -602,8 +654,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
bool retValue = false;
|
bool retValue = false;
|
||||||
|
|
||||||
|
|
||||||
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject(
|
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
|
||||||
typeof (OGS1InterRegionRemoting),
|
typeof(OGS1InterRegionRemoting),
|
||||||
"tcp://" + regInfo.RemotingAddress +
|
"tcp://" + regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions");
|
"/InterRegions");
|
||||||
|
@ -617,49 +669,55 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
Console.WriteLine("remoting object not found");
|
Console.WriteLine("remoting object not found");
|
||||||
}
|
}
|
||||||
remObject = null;
|
remObject = null;
|
||||||
MainLog.Instance.Verbose("INTER",
|
m_log.Info("[INTER]: " +
|
||||||
gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " +
|
gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " +
|
||||||
agentData.firstname + " " + agentData.lastname + " and got " +
|
agentData.firstname + " " + agentData.lastname + " and got " +
|
||||||
retValue.ToString());
|
retValue.ToString());
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (SocketException e)
|
catch (SocketException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
|
||||||
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (InvalidCredentialException e)
|
catch (InvalidCredentialException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (AuthenticationException e)
|
catch (AuthenticationException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
||||||
regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -709,7 +767,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
Console.WriteLine("remoting object not found");
|
Console.WriteLine("remoting object not found");
|
||||||
}
|
}
|
||||||
remObject = null;
|
remObject = null;
|
||||||
MainLog.Instance.Verbose("INTER", gdebugRegionName + ": OGS1 tried to inform region I'm up");
|
m_log.Info("[INTER]: " + gdebugRegionName + ": OGS1 tried to inform region I'm up");
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
@ -726,49 +784,49 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" +
|
m_log.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" +
|
||||||
regInfo.RemotingAddress +
|
regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
||||||
" - Is this neighbor up?");
|
" - Is this neighbor up?");
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (SocketException e)
|
catch (SocketException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region using tcp://" +
|
m_log.Warn("Socket Error: Unable to connect to adjacent region using tcp://" +
|
||||||
regInfo.RemotingAddress +
|
regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
||||||
" - Is this neighbor up?");
|
" - Is this neighbor up?");
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (InvalidCredentialException e)
|
catch (InvalidCredentialException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" +
|
m_log.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" +
|
||||||
regInfo.RemotingAddress +
|
regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (AuthenticationException e)
|
catch (AuthenticationException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" +
|
m_log.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" +
|
||||||
regInfo.RemotingAddress +
|
regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// This line errors with a Null Reference Exception.. Why? @.@
|
// This line errors with a Null Reference Exception.. Why? @.@
|
||||||
//MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress +
|
//m_log.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress +
|
||||||
// ":" + regInfo.RemotingPort +
|
// ":" + regInfo.RemotingPort +
|
||||||
//"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one");
|
//"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one");
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -780,6 +838,16 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
/// <param name="agentData"></param>
|
/// <param name="agentData"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData)
|
public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData)
|
||||||
|
{
|
||||||
|
int failures = 0;
|
||||||
|
lock (m_deadRegionCache)
|
||||||
|
{
|
||||||
|
if (m_deadRegionCache.ContainsKey(regionHandle))
|
||||||
|
{
|
||||||
|
failures = m_deadRegionCache[regionHandle];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (failures <= 1)
|
||||||
{
|
{
|
||||||
RegionInfo regInfo = null;
|
RegionInfo regInfo = null;
|
||||||
try
|
try
|
||||||
|
@ -796,8 +864,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
bool retValue = false;
|
bool retValue = false;
|
||||||
|
|
||||||
|
|
||||||
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject(
|
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
|
||||||
typeof (OGS1InterRegionRemoting),
|
typeof(OGS1InterRegionRemoting),
|
||||||
"tcp://" + regInfo.RemotingAddress +
|
"tcp://" + regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions");
|
"/InterRegions");
|
||||||
|
@ -815,42 +883,48 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
NoteDeadRegion(regionHandle);
|
||||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regionHandle);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (SocketException e)
|
catch (SocketException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
|
NoteDeadRegion(regionHandle);
|
||||||
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regionHandle);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (InvalidCredentialException e)
|
catch (InvalidCredentialException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
|
NoteDeadRegion(regionHandle);
|
||||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
m_log.Warn("Invalid Credential Exception: Invalid Credentials : " + regionHandle);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (AuthenticationException e)
|
catch (AuthenticationException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
NoteDeadRegion(regionHandle);
|
||||||
regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
m_log.Warn("Authentication exception: Unable to connect to adjacent region: " + regionHandle);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
|
||||||
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
|
NoteDeadRegion(regionHandle);
|
||||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
m_log.Warn("Unknown exception: Unable to connect to adjacent region: " + regionHandle);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -897,17 +971,20 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
//TODO need to see if we know about where this region is and use .net remoting
|
//TODO need to see if we know about where this region is and use .net remoting
|
||||||
// to inform it.
|
// to inform it.
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -947,23 +1024,144 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
//TODO need to see if we know about where this region is and use .net remoting
|
//TODO need to see if we know about where this region is and use .net remoting
|
||||||
// to inform it.
|
// to inform it.
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
NoteDeadRegion(regionHandle);
|
||||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regionHandle);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch
|
catch (SocketException e)
|
||||||
{
|
{
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regionHandle);
|
||||||
|
m_log.Debug(e.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (InvalidCredentialException e)
|
||||||
|
{
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Invalid Credential Exception: Invalid Credentials : " + regionHandle);
|
||||||
|
m_log.Debug(e.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (AuthenticationException e)
|
||||||
|
{
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Authentication exception: Unable to connect to adjacent region: " + regionHandle);
|
||||||
|
|
||||||
|
m_log.Debug(e.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Unknown exception: Unable to connect to adjacent region: " + regionHandle);
|
||||||
|
m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID)
|
public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID)
|
||||||
{
|
{
|
||||||
|
RegionInfo regInfo = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (m_localBackend.TriggerTellRegionToCloseChildConnection(regionHandle, agentID))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
regInfo = 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.TellRegionToCloseChildConnection(regionHandle, agentID.UUID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("remoting object not found");
|
||||||
|
}
|
||||||
|
remObject = null;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
//TODO need to see if we know about where this region is and use .net remoting
|
||||||
|
// to inform it.
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (RemotingException)
|
||||||
|
{
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
|
//m_log.Debug(e.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
catch (SocketException e)
|
||||||
|
{
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Socket Error: Unable to connect to adjacent region using tcp://" +
|
||||||
|
regInfo.RemotingAddress +
|
||||||
|
":" + regInfo.RemotingPort +
|
||||||
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
||||||
|
" - Is this neighbor up?");
|
||||||
|
m_log.Debug(e.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (InvalidCredentialException e)
|
||||||
|
{
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" +
|
||||||
|
regInfo.RemotingAddress +
|
||||||
|
":" + regInfo.RemotingPort +
|
||||||
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
|
m_log.Debug(e.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (AuthenticationException e)
|
||||||
|
{
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" +
|
||||||
|
regInfo.RemotingAddress +
|
||||||
|
":" + regInfo.RemotingPort +
|
||||||
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
|
m_log.Debug(e.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (WebException e)
|
||||||
|
{
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
m_log.Warn("WebException exception: Unable to connect to adjacent region using tcp://" +
|
||||||
|
regInfo.RemotingAddress +
|
||||||
|
":" + regInfo.RemotingPort +
|
||||||
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
|
m_log.Debug(e.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
NoteDeadRegion(regionHandle);
|
||||||
|
// This line errors with a Null Reference Exception.. Why? @.@
|
||||||
|
//m_log.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress +
|
||||||
|
// ":" + regInfo.RemotingPort +
|
||||||
|
//"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one");
|
||||||
|
m_log.Debug(e.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId)
|
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId)
|
||||||
|
@ -988,7 +1186,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
||||||
{
|
{
|
||||||
//MainLog.Instance.Verbose("INTER", gdebugRegionName + ": Incoming OGS1 Agent " + agentData.firstname + " " + agentData.lastname);
|
//m_log.Info("[INTER]: " + gdebugRegionName + ": Incoming OGS1 Agent " + agentData.firstname + " " + agentData.lastname);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -996,32 +1194,42 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (RemotingException)
|
catch (RemotingException)
|
||||||
{
|
{
|
||||||
//MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
//m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle)
|
public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("INTER",
|
m_log.Info("[INTER]: " +
|
||||||
gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX +
|
gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX +
|
||||||
"," + regionData.RegionLocY + ")");
|
"," + regionData.RegionLocY + "). Giving this region a fresh set of 'dead' tries");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
lock (m_deadRegionCache)
|
||||||
|
{
|
||||||
|
if (m_deadRegionCache.ContainsKey(regionData.RegionHandle))
|
||||||
|
{
|
||||||
|
|
||||||
|
m_deadRegionCache.Remove(regionData.RegionHandle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return m_localBackend.TriggerRegionUp(new RegionInfo(regionData), regionhandle);
|
return m_localBackend.TriggerRegionUp(new RegionInfo(regionData), regionhandle);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TriggerChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
|
public bool TriggerChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("INTER", "Incoming OGS1 Child Agent Data Update");
|
//m_log.Info("[INTER]: Incoming OGS1 Child Agent Data Update");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1029,7 +1237,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1045,15 +1253,17 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
// Is this necessary?
|
// Is this necessary?
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//return m_localBackend.TriggerExpectPrim(regionHandle,primID, objData);
|
m_localBackend.TriggerExpectPrim(regionHandle, primID, objData);
|
||||||
|
return true;
|
||||||
//m_localBackend.
|
//m_localBackend.
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1071,7 +1281,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1084,13 +1294,77 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool TriggerTellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return m_localBackend.TriggerTellRegionToCloseChildConnection(regionHandle, agentID);
|
||||||
|
}
|
||||||
|
catch (RemotingException)
|
||||||
|
{
|
||||||
|
m_log.Info("[INTERREGION]: Remoting Error: Unable to connect to neighbour to tell it to close a child connection");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
// helper to see if remote region is up
|
||||||
|
bool m_bAvailable = false;
|
||||||
|
int timeOut = 10; //10 seconds
|
||||||
|
|
||||||
|
public void CheckRegion(string address, uint port)
|
||||||
|
{
|
||||||
|
m_bAvailable = false;
|
||||||
|
IPAddress ia = null;
|
||||||
|
IPAddress.TryParse(address, out ia);
|
||||||
|
IPEndPoint m_EndPoint = new IPEndPoint(ia, (int)port);
|
||||||
|
AsyncCallback ConnectedMethodCallback = new AsyncCallback(ConnectedMethod);
|
||||||
|
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||||
|
IAsyncResult ar = socket.BeginConnect(m_EndPoint, ConnectedMethodCallback, socket);
|
||||||
|
ar.AsyncWaitHandle.WaitOne(timeOut*1000, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool Available
|
||||||
|
{
|
||||||
|
get { return m_bAvailable; }
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConnectedMethod(IAsyncResult ar)
|
||||||
|
{
|
||||||
|
Socket socket = (Socket)ar.AsyncState;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
socket.EndConnect(ar);
|
||||||
|
m_bAvailable = true;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
socket.Close();
|
||||||
|
}
|
||||||
|
public void NoteDeadRegion(ulong regionhandle)
|
||||||
|
{
|
||||||
|
lock (m_deadRegionCache)
|
||||||
|
{
|
||||||
|
if (m_deadRegionCache.ContainsKey(regionhandle))
|
||||||
|
{
|
||||||
|
m_deadRegionCache[regionhandle] = m_deadRegionCache[regionhandle] + 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_deadRegionCache.Add(regionhandle, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -13,7 +13,7 @@
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
@ -45,6 +45,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate childUpdate);
|
public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate childUpdate);
|
||||||
|
|
||||||
|
public delegate bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID);
|
||||||
|
|
||||||
public sealed class InterRegionSingleton
|
public sealed class InterRegionSingleton
|
||||||
{
|
{
|
||||||
private static readonly InterRegionSingleton instance = new InterRegionSingleton();
|
private static readonly InterRegionSingleton instance = new InterRegionSingleton();
|
||||||
|
@ -55,6 +57,15 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
public event PrimGroupArrival OnPrimGroupArrival;
|
public event PrimGroupArrival OnPrimGroupArrival;
|
||||||
public event RegionUp OnRegionUp;
|
public event RegionUp OnRegionUp;
|
||||||
public event ChildAgentUpdate OnChildAgentUpdate;
|
public event ChildAgentUpdate OnChildAgentUpdate;
|
||||||
|
public event TellRegionToCloseChildConnection OnTellRegionToCloseChildConnection;
|
||||||
|
|
||||||
|
private InformRegionChild handler001 = null; // OnChildAgent;
|
||||||
|
private ExpectArrival handler002 = null; // OnArrival;
|
||||||
|
private InformRegionPrimGroup handler003 = null; // OnPrimGroupNear;
|
||||||
|
private PrimGroupArrival handler004 = null; // OnPrimGroupArrival;
|
||||||
|
private RegionUp handler005 = null; // OnRegionUp;
|
||||||
|
private ChildAgentUpdate handler006 = null; // OnChildAgentUpdate;
|
||||||
|
private TellRegionToCloseChildConnection handler007 = null; // OnTellRegionToCloseChildConnection;
|
||||||
|
|
||||||
|
|
||||||
static InterRegionSingleton()
|
static InterRegionSingleton()
|
||||||
|
@ -72,54 +83,70 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
||||||
{
|
{
|
||||||
if (OnChildAgent != null)
|
handler001 = OnChildAgent;
|
||||||
|
if (handler001 != null)
|
||||||
{
|
{
|
||||||
return OnChildAgent(regionHandle, agentData);
|
return handler001(regionHandle, agentData);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle)
|
public bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle)
|
||||||
{
|
{
|
||||||
if (OnRegionUp != null)
|
handler005 = OnRegionUp;
|
||||||
|
if (handler005 != null)
|
||||||
{
|
{
|
||||||
return OnRegionUp(sregion, regionhandle);
|
return handler005(sregion, regionhandle);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentUpdate)
|
public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentUpdate)
|
||||||
{
|
{
|
||||||
if (OnChildAgentUpdate != null)
|
handler006 = OnChildAgentUpdate;
|
||||||
|
if (handler006 != null)
|
||||||
{
|
{
|
||||||
return OnChildAgentUpdate(regionHandle, cAgentUpdate);
|
return handler006(regionHandle, cAgentUpdate);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
|
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
|
||||||
{
|
{
|
||||||
if (OnArrival != null)
|
handler002 = OnArrival;
|
||||||
|
if (handler002 != null)
|
||||||
{
|
{
|
||||||
return OnArrival(regionHandle, agentID, position, isFlying);
|
return handler002(regionHandle, agentID, position, isFlying);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool InformRegionPrim(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical)
|
public bool InformRegionPrim(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical)
|
||||||
{
|
{
|
||||||
if (OnPrimGroupNear != null)
|
handler003 = OnPrimGroupNear;
|
||||||
|
if (handler003 != null)
|
||||||
{
|
{
|
||||||
return OnPrimGroupNear(regionHandle, primID, position, isPhysical);
|
return handler003(regionHandle, primID, position, isPhysical);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, string objData)
|
public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, string objData)
|
||||||
{
|
{
|
||||||
if (OnPrimGroupArrival != null)
|
handler004 = OnPrimGroupArrival;
|
||||||
|
if (handler004 != null)
|
||||||
{
|
{
|
||||||
return OnPrimGroupArrival(regionHandle, primID, objData);
|
return handler004(regionHandle, primID, objData);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID)
|
||||||
|
{
|
||||||
|
handler007 = OnTellRegionToCloseChildConnection;
|
||||||
|
if (handler007 != null)
|
||||||
|
{
|
||||||
|
return handler007(regionHandle, agentID);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -127,6 +154,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
public class OGS1InterRegionRemoting : MarshalByRefObject
|
public class OGS1InterRegionRemoting : MarshalByRefObject
|
||||||
{
|
{
|
||||||
|
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
public OGS1InterRegionRemoting()
|
public OGS1InterRegionRemoting()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -171,6 +200,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public bool ExpectAvatarCrossing(ulong regionHandle, Guid agentID, sLLVector3 position, bool isFlying)
|
public bool ExpectAvatarCrossing(ulong regionHandle, Guid agentID, sLLVector3 position, bool isFlying)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -215,5 +245,18 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool TellRegionToCloseChildConnection(ulong regionHandle, Guid agentID)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return InterRegionSingleton.Instance.TellRegionToCloseChildConnection(regionHandle, new LLUUID(agentID));
|
||||||
|
}
|
||||||
|
catch (RemotingException)
|
||||||
|
{
|
||||||
|
m_log.Info("[INTERREGION]: Remoting Error: Unable to connect to remote region: " + regionHandle.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -13,7 +13,7 @@
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
@ -38,6 +38,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
public class OGS1InventoryService : IInventoryServices
|
public class OGS1InventoryService : IInventoryServices
|
||||||
{
|
{
|
||||||
|
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private string _inventoryServerUrl;
|
private string _inventoryServerUrl;
|
||||||
private Dictionary<LLUUID, InventoryRequest> m_RequestingInventory = new Dictionary<LLUUID, InventoryRequest>();
|
private Dictionary<LLUUID, InventoryRequest> m_RequestingInventory = new Dictionary<LLUUID, InventoryRequest>();
|
||||||
|
|
||||||
|
@ -71,8 +73,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose(
|
m_log.InfoFormat(
|
||||||
"INVENTORY", "Requesting inventory from {0}/GetInventory/ for user {1}",
|
"[INVENTORY]: Requesting inventory from {0}/GetInventory/ for user {1}",
|
||||||
_inventoryServerUrl, userID);
|
_inventoryServerUrl, userID);
|
||||||
|
|
||||||
RestObjectPosterResponse<InventoryCollection> requester
|
RestObjectPosterResponse<InventoryCollection> requester
|
||||||
|
@ -83,7 +85,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("INVENTORY", e.ToString());
|
m_log.Error("[INVENTORY]: " + e.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +98,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
LLUUID userID = response.UserID;
|
LLUUID userID = response.UserID;
|
||||||
if (m_RequestingInventory.ContainsKey(userID))
|
if (m_RequestingInventory.ContainsKey(userID))
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("INVENTORY",
|
m_log.InfoFormat("[INVENTORY]: " +
|
||||||
"Received inventory response for user {0} containing {1} folders and {2} items",
|
"Received inventory response for user {0} containing {1} folders and {2} items",
|
||||||
userID, response.Folders.Count, response.AllItems.Count);
|
userID, response.Folders.Count, response.AllItems.Count);
|
||||||
|
|
||||||
|
@ -132,8 +134,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn(
|
m_log.WarnFormat(
|
||||||
"INVENTORY",
|
"[INVENTORY]: " +
|
||||||
"Received inventory response for {0} for which we do not have a record of requesting!",
|
"Received inventory response for {0} for which we do not have a record of requesting!",
|
||||||
userID);
|
userID);
|
||||||
}
|
}
|
||||||
|
@ -163,6 +165,21 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
"POST", _inventoryServerUrl + "/DeleteItem/", item);
|
"POST", _inventoryServerUrl + "/DeleteItem/", item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool HasInventoryForUser(LLUUID userID)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InventoryFolderBase RequestRootFolder(LLUUID userID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual InventoryFolderBase RequestNamedFolder(LLUUID userID, string folderName)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public void CreateNewUserInventory(LLUUID user)
|
public void CreateNewUserInventory(LLUUID user)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
@ -40,6 +40,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
public class OGS1UserServices : IUserService
|
public class OGS1UserServices : IUserService
|
||||||
{
|
{
|
||||||
|
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private CommunicationsOGS1 m_parent;
|
private CommunicationsOGS1 m_parent;
|
||||||
|
|
||||||
public OGS1UserServices(CommunicationsOGS1 parent)
|
public OGS1UserServices(CommunicationsOGS1 parent)
|
||||||
|
@ -83,7 +85,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
if (data.Contains("error_type"))
|
if (data.Contains("error_type"))
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID",
|
m_log.Warn("[GRID]: " +
|
||||||
"Error sent by user server when trying to get user profile: (" +
|
"Error sent by user server when trying to get user profile: (" +
|
||||||
data["error_type"] +
|
data["error_type"] +
|
||||||
"): " + data["error_desc"]);
|
"): " + data["error_desc"]);
|
||||||
|
@ -136,7 +138,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("INTERGRID", "Got invalid queryID from userServer");
|
m_log.Warn("[INTERGRID]: Got invalid queryID from userServer");
|
||||||
}
|
}
|
||||||
return pickerlist;
|
return pickerlist;
|
||||||
}
|
}
|
||||||
|
@ -163,7 +165,39 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return buddylist;
|
return buddylist;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserProfileData GetUserProfile(string firstName, string lastName, string authAddr)
|
/// <summary>
|
||||||
|
/// Logs off a user on the user server
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="UserID">UUID of the user</param>
|
||||||
|
/// <param name="regionData">UUID of the Region</param>
|
||||||
|
/// <param name="posx">final position x</param>
|
||||||
|
/// <param name="posy">final position y</param>
|
||||||
|
/// <param name="posz">final position z</param>
|
||||||
|
public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz)
|
||||||
|
{
|
||||||
|
Hashtable param = new Hashtable();
|
||||||
|
param["avatar_uuid"] = userid.UUID.ToString();
|
||||||
|
param["region_uuid"] = regionid.UUID.ToString();
|
||||||
|
param["region_handle"] = regionhandle.ToString();
|
||||||
|
param["region_pos_x"] = posx.ToString();
|
||||||
|
param["region_pos_y"] = posy.ToString();
|
||||||
|
param["region_pos_z"] = posz.ToString();
|
||||||
|
|
||||||
|
IList parameters = new ArrayList();
|
||||||
|
parameters.Add(param);
|
||||||
|
XmlRpcRequest req = new XmlRpcRequest("logout_of_simulator", parameters);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000);
|
||||||
|
}
|
||||||
|
catch (System.Net.WebException)
|
||||||
|
{
|
||||||
|
m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
public UserProfileData GetUserProfile(string firstName, string lastName)
|
||||||
{
|
{
|
||||||
return GetUserProfile(firstName + " " + lastName, authAddr);
|
return GetUserProfile(firstName + " " + lastName, authAddr);
|
||||||
}
|
}
|
||||||
|
@ -200,7 +234,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
Hashtable param = new Hashtable();
|
Hashtable param = new Hashtable();
|
||||||
param["queryid"] = (string) queryID.ToString();
|
param["queryid"] = (string) queryID.ToString();
|
||||||
param["avquery"] = objAlphaNumericPattern.Replace(query, "");
|
param["avquery"] = objAlphaNumericPattern.Replace(query, String.Empty);
|
||||||
IList parameters = new ArrayList();
|
IList parameters = new ArrayList();
|
||||||
parameters.Add(param);
|
parameters.Add(param);
|
||||||
XmlRpcRequest req = new XmlRpcRequest("get_avatar_picker_avatar", parameters);
|
XmlRpcRequest req = new XmlRpcRequest("get_avatar_picker_avatar", parameters);
|
||||||
|
@ -210,7 +244,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (WebException e)
|
catch (WebException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Error when trying to fetch Avatar Picker Response: " +
|
m_log.Warn("Error when trying to fetch Avatar Picker Response: " +
|
||||||
e.Message);
|
e.Message);
|
||||||
// Return Empty picker list (no results)
|
// Return Empty picker list (no results)
|
||||||
}
|
}
|
||||||
|
@ -235,7 +269,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Error when trying to fetch profile data by uuid from remote user server: " +
|
m_log.Warn("Error when trying to fetch profile data by name from remote user server: " +
|
||||||
e.Message);
|
e.Message);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -274,7 +308,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
public UserProfileData SetupMasterUser(string firstName, string lastName)
|
public UserProfileData SetupMasterUser(string firstName, string lastName)
|
||||||
{
|
{
|
||||||
return SetupMasterUser(firstName, lastName, "");
|
return SetupMasterUser(firstName, lastName, String.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
|
public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
|
||||||
|
@ -329,23 +363,23 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Unable to add new friend, User Server Reported an issue");
|
m_log.Warn("[GRID]: Unable to add new friend, User Server Reported an issue");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Unable to add new friend, UserServer didn't understand me!");
|
m_log.Warn("[GRID]: Unable to add new friend, UserServer didn't understand me!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Unable to add new friend, UserServer didn't understand me!");
|
m_log.Warn("[GRID]: Unable to add new friend, UserServer didn't understand me!");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (WebException e)
|
catch (WebException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID","Error when trying to AddNewUserFriend: " +
|
m_log.Warn("[GRID]: Error when trying to AddNewUserFriend: " +
|
||||||
e.Message);
|
e.Message);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -382,23 +416,23 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Unable to remove friend, User Server Reported an issue");
|
m_log.Warn("[GRID]: Unable to remove friend, User Server Reported an issue");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Unable to remove friend, UserServer didn't understand me!");
|
m_log.Warn("[GRID]: Unable to remove friend, UserServer didn't understand me!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Unable to remove friend, UserServer didn't understand me!");
|
m_log.Warn("[GRID]: Unable to remove friend, UserServer didn't understand me!");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (WebException e)
|
catch (WebException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Error when trying to RemoveUserFriend: " +
|
m_log.Warn("[GRID]: Error when trying to RemoveUserFriend: " +
|
||||||
e.Message);
|
e.Message);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -434,25 +468,24 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, User Server Reported an issue");
|
m_log.Warn("[GRID]: Unable to update_user_friend_perms, User Server Reported an issue");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, UserServer didn't understand me!");
|
m_log.Warn("[GRID]: Unable to update_user_friend_perms, UserServer didn't understand me!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, UserServer didn't understand me!");
|
m_log.Warn("[GRID]: Unable to update_user_friend_perms, UserServer didn't understand me!");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (WebException e)
|
catch (WebException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Error when trying to update_user_friend_perms: " +
|
m_log.Warn("[GRID]: Error when trying to update_user_friend_perms: " +
|
||||||
e.Message);
|
e.Message);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -482,12 +515,11 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (WebException e)
|
catch (WebException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Error when trying to fetch Avatar's friends list: " +
|
m_log.Warn("Error when trying to fetch Avatar's friends list: " +
|
||||||
e.Message);
|
e.Message);
|
||||||
// Return Empty list (no friends)
|
// Return Empty list (no friends)
|
||||||
}
|
}
|
||||||
return buddylist;
|
return buddylist;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -1,3 +1,31 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSim Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
@ -10,7 +38,7 @@ using System.Runtime.InteropServices;
|
||||||
[assembly : AssemblyConfiguration("")]
|
[assembly : AssemblyConfiguration("")]
|
||||||
[assembly : AssemblyCompany("")]
|
[assembly : AssemblyCompany("")]
|
||||||
[assembly : AssemblyProduct("OpenGrid.Framework.Communications.OGS1")]
|
[assembly : AssemblyProduct("OpenGrid.Framework.Communications.OGS1")]
|
||||||
[assembly : AssemblyCopyright("Copyright © 2007")]
|
[assembly : AssemblyCopyright("Copyright © OpenSimulator.org Developers 2007-2008")]
|
||||||
[assembly : AssemblyTrademark("")]
|
[assembly : AssemblyTrademark("")]
|
||||||
[assembly : AssemblyCulture("")]
|
[assembly : AssemblyCulture("")]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue