Formatting cleanup. Minor refactoring.
parent
9c428d9935
commit
bf8b5844f2
|
@ -170,7 +170,6 @@ namespace OpenSim.Framework.UserManagement
|
||||||
AddClassifiedCategory((Int32) 8, "Service");
|
AddClassifiedCategory((Int32) 8, "Service");
|
||||||
AddClassifiedCategory((Int32) 9, "Personal");
|
AddClassifiedCategory((Int32) 9, "Personal");
|
||||||
|
|
||||||
|
|
||||||
SessionID = LLUUID.Random();
|
SessionID = LLUUID.Random();
|
||||||
SecureSessionID = LLUUID.Random();
|
SecureSessionID = LLUUID.Random();
|
||||||
AgentID = LLUUID.Random();
|
AgentID = LLUUID.Random();
|
||||||
|
@ -244,7 +243,10 @@ namespace OpenSim.Framework.UserManagement
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
(GenerateFailureResponse("presence",
|
(GenerateFailureResponse("presence",
|
||||||
"You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner. Please wait 5 minutes if you are going to connect to a region nearby to the region you were at previously.",
|
"You appear to be already logged in. " +
|
||||||
|
"If this is not the case please wait for your session to timeout. " +
|
||||||
|
"If this takes longer than a few minutes please contact the grid owner. " +
|
||||||
|
"Please wait 5 minutes if you are going to connect to a region nearby to the region you were at previously.",
|
||||||
"false"));
|
"false"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +254,9 @@ namespace OpenSim.Framework.UserManagement
|
||||||
{
|
{
|
||||||
return GenerateFailureResponseLLSD(
|
return GenerateFailureResponseLLSD(
|
||||||
"presence",
|
"presence",
|
||||||
"You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner",
|
"You appear to be already logged in. " +
|
||||||
|
"If this is not the case please wait for your session to timeout. " +
|
||||||
|
"If this takes longer than a few minutes please contact the grid owner",
|
||||||
"false");
|
"false");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,7 @@ namespace OpenSim.Framework.UserManagement
|
||||||
|
|
||||||
return logResponse.CreateLoginFailedResponse();
|
return logResponse.CreateLoginFailedResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (requestData.Contains("passwd"))
|
if (requestData.Contains("passwd"))
|
||||||
{
|
{
|
||||||
string passwd = (string)requestData["passwd"];
|
string passwd = (string)requestData["passwd"];
|
||||||
|
@ -494,8 +495,8 @@ namespace OpenSim.Framework.UserManagement
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetLoginForm(string firstname, string lastname, string location, string region,
|
public string GetLoginForm(string firstname, string lastname, string location, string region,
|
||||||
string grid, string channel, string version, string lang,
|
string grid, string channel, string version, string lang,
|
||||||
string password, string errormessages)
|
string password, string errormessages)
|
||||||
{
|
{
|
||||||
// inject our values in the form at the markers
|
// inject our values in the form at the markers
|
||||||
|
|
||||||
|
@ -522,6 +523,7 @@ namespace OpenSim.Framework.UserManagement
|
||||||
loginform = loginform.Replace("[$lang]", lang);
|
loginform = loginform.Replace("[$lang]", lang);
|
||||||
loginform = loginform.Replace("[$password]", password);
|
loginform = loginform.Replace("[$password]", password);
|
||||||
loginform = loginform.Replace("[$errors]", errormessages);
|
loginform = loginform.Replace("[$errors]", errormessages);
|
||||||
|
|
||||||
return loginform;
|
return loginform;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -588,6 +590,7 @@ namespace OpenSim.Framework.UserManagement
|
||||||
responseString += "</div>";
|
responseString += "</div>";
|
||||||
responseString += "</body>";
|
responseString += "</body>";
|
||||||
responseString += "</html>";
|
responseString += "</html>";
|
||||||
|
|
||||||
return responseString;
|
return responseString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,7 @@ namespace OpenSim.Framework.Data.DB4o
|
||||||
throw new Exception("GetProfileByString Not supported in DB4oGridData");
|
throw new Exception("GetProfileByString Not supported in DB4oGridData");
|
||||||
//return null;
|
//return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a new specified region to the database
|
/// Adds a new specified region to the database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -180,7 +180,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a sim profile from it's Region name string
|
/// Returns a sim profile from it's Region name string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -222,7 +221,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a new specified region to the database
|
/// Adds a new specified region to the database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -242,7 +240,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
System.Console.WriteLine("No regions found. Create new one.");
|
System.Console.WriteLine("No regions found. Create new one.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( insertRegionRow(profile))
|
if (insertRegionRow(profile))
|
||||||
{
|
{
|
||||||
return DataResponse.RESPONSE_OK;
|
return DataResponse.RESPONSE_OK;
|
||||||
}
|
}
|
||||||
|
@ -252,7 +250,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new region in the database
|
/// Creates a new region in the database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -324,7 +321,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
|
/// DEPRECATED. Attempts to authenticate a region by comparing a shared secret.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uuid">The UUID of the challenger</param>
|
/// <param name="uuid">The UUID of the challenger</param>
|
||||||
/// <param name="handle">The attempted regionHandle of the challenger</param>
|
/// <param name="handle">The attempted regionHandle of the challenger</param>
|
||||||
|
|
|
@ -331,7 +331,7 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
|
/// DEPRECATED. Attempts to authenticate a region by comparing a shared secret.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uuid">The UUID of the challenger</param>
|
/// <param name="uuid">The UUID of the challenger</param>
|
||||||
/// <param name="handle">The attempted regionHandle of the challenger</param>
|
/// <param name="handle">The attempted regionHandle of the challenger</param>
|
||||||
|
|
|
@ -114,13 +114,12 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a sim profile from it's Region name string
|
/// Returns a sim profile from it's Region name string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uuid">The region name search query</param>
|
/// <param name="regionName">The region name search query</param>
|
||||||
/// <returns>The sim profile</returns>
|
/// <returns>The sim profile</returns>
|
||||||
public RegionProfileData GetProfileByString(string regionName)
|
public RegionProfileData GetProfileByString(string regionName)
|
||||||
{
|
{
|
||||||
if (regionName.Length > 2)
|
if (regionName.Length > 2)
|
||||||
{
|
{
|
||||||
|
|
||||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
// Add % because this is a like query.
|
// Add % because this is a like query.
|
||||||
param["?regionName"] = regionName + "%";
|
param["?regionName"] = regionName + "%";
|
||||||
|
@ -133,7 +132,6 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
|
||||||
return row;
|
return row;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -142,7 +140,6 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a sim profile from it's UUID
|
/// Returns a sim profile from it's UUID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -191,7 +188,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
|
/// DEPRECATED. Attempts to authenticate a region by comparing a shared secret.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uuid">The UUID of the challenger</param>
|
/// <param name="uuid">The UUID of the challenger</param>
|
||||||
/// <param name="handle">The attempted regionHandle of the challenger</param>
|
/// <param name="handle">The attempted regionHandle of the challenger</param>
|
||||||
|
|
|
@ -56,7 +56,6 @@ namespace OpenSim.Framework.Data
|
||||||
/// Coordinates of the region
|
/// Coordinates of the region
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint regionLocX;
|
public uint regionLocX;
|
||||||
|
|
||||||
public uint regionLocY;
|
public uint regionLocY;
|
||||||
public uint regionLocZ; // Reserved (round-robin, layers, etc)
|
public uint regionLocZ; // Reserved (round-robin, layers, etc)
|
||||||
|
|
||||||
|
@ -65,7 +64,6 @@ namespace OpenSim.Framework.Data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Not very secure, needs improvement.</remarks>
|
/// <remarks>Not very secure, needs improvement.</remarks>
|
||||||
public string regionSendKey = String.Empty;
|
public string regionSendKey = String.Empty;
|
||||||
|
|
||||||
public string regionRecvKey = String.Empty;
|
public string regionRecvKey = String.Empty;
|
||||||
public string regionSecret = String.Empty;
|
public string regionSecret = String.Empty;
|
||||||
|
|
||||||
|
@ -78,7 +76,6 @@ namespace OpenSim.Framework.Data
|
||||||
/// Information about the server that the region is currently hosted on
|
/// Information about the server that the region is currently hosted on
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string serverIP = String.Empty;
|
public string serverIP = String.Empty;
|
||||||
|
|
||||||
public uint serverPort;
|
public uint serverPort;
|
||||||
public string serverURI = String.Empty;
|
public string serverURI = String.Empty;
|
||||||
|
|
||||||
|
@ -90,7 +87,6 @@ namespace OpenSim.Framework.Data
|
||||||
/// Set of optional overrides. Can be used to create non-eulicidean spaces.
|
/// Set of optional overrides. Can be used to create non-eulicidean spaces.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ulong regionNorthOverrideHandle;
|
public ulong regionNorthOverrideHandle;
|
||||||
|
|
||||||
public ulong regionSouthOverrideHandle;
|
public ulong regionSouthOverrideHandle;
|
||||||
public ulong regionEastOverrideHandle;
|
public ulong regionEastOverrideHandle;
|
||||||
public ulong regionWestOverrideHandle;
|
public ulong regionWestOverrideHandle;
|
||||||
|
@ -133,7 +129,6 @@ namespace OpenSim.Framework.Data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LLUUID originUUID;
|
public LLUUID originUUID;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Sim profile data from grid server when in grid mode
|
/// Get Sim profile data from grid server when in grid mode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -184,7 +179,7 @@ namespace OpenSim.Framework.Data
|
||||||
/// <param name="gridserver_recvkey"></param>
|
/// <param name="gridserver_recvkey"></param>
|
||||||
/// <returns>The sim profile. Null if there was a request failure</returns>
|
/// <returns>The sim profile. Null if there was a request failure</returns>
|
||||||
public static RegionProfileData RequestSimProfileData(ulong region_handle, string gridserver_url,
|
public static RegionProfileData RequestSimProfileData(ulong region_handle, string gridserver_url,
|
||||||
string gridserver_sendkey, string gridserver_recvkey)
|
string gridserver_sendkey, string gridserver_recvkey)
|
||||||
{
|
{
|
||||||
Hashtable requestData = new Hashtable();
|
Hashtable requestData = new Hashtable();
|
||||||
requestData["region_handle"] = region_handle.ToString();
|
requestData["region_handle"] = region_handle.ToString();
|
||||||
|
@ -226,7 +221,7 @@ namespace OpenSim.Framework.Data
|
||||||
/// <param name="gridserver_recvkey"></param>
|
/// <param name="gridserver_recvkey"></param>
|
||||||
/// <returns>The sim profile. Null if there was a request failure</returns>
|
/// <returns>The sim profile. Null if there was a request failure</returns>
|
||||||
public static RegionProfileData RequestSimProfileData(string regionName, string gridserver_url,
|
public static RegionProfileData RequestSimProfileData(string regionName, string gridserver_url,
|
||||||
string gridserver_sendkey, string gridserver_recvkey)
|
string gridserver_sendkey, string gridserver_recvkey)
|
||||||
{
|
{
|
||||||
Hashtable requestData = new Hashtable();
|
Hashtable requestData = new Hashtable();
|
||||||
requestData["region_name_search"] = regionName;
|
requestData["region_name_search"] = regionName;
|
||||||
|
|
|
@ -52,7 +52,6 @@ namespace OpenSim.Framework
|
||||||
// Get a list of invalid file characters (OS dependent)
|
// Get a list of invalid file characters (OS dependent)
|
||||||
private static string regexInvalidFileChars = "[" + new String(Path.GetInvalidFileNameChars()) + "]";
|
private static string regexInvalidFileChars = "[" + new String(Path.GetInvalidFileNameChars()) + "]";
|
||||||
|
|
||||||
|
|
||||||
#region Vector Equasions
|
#region Vector Equasions
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the distance between two 3d vectors
|
/// Get the distance between two 3d vectors
|
||||||
|
@ -106,6 +105,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
public static ulong UIntsToLong(uint X, uint Y)
|
public static ulong UIntsToLong(uint X, uint Y)
|
||||||
|
@ -384,8 +384,6 @@ namespace OpenSim.Framework
|
||||||
return System.Text.RegularExpressions.Regex.Replace(filename, @regexInvalidFileChars, string.Empty); ;
|
return System.Text.RegularExpressions.Regex.Replace(filename, @regexInvalidFileChars, string.Empty); ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// directory locations
|
// directory locations
|
||||||
//
|
//
|
||||||
|
@ -411,23 +409,17 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public static string configDir()
|
public static string configDir()
|
||||||
{
|
{
|
||||||
string temp;
|
return ".";
|
||||||
temp = ".";
|
|
||||||
return temp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string dataDir()
|
public static string dataDir()
|
||||||
{
|
{
|
||||||
string temp;
|
return ".";
|
||||||
temp = ".";
|
|
||||||
return temp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string logDir()
|
public static string logDir()
|
||||||
{
|
{
|
||||||
string temp;
|
return ".";
|
||||||
temp = ".";
|
|
||||||
return temp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetCapsURL(LLUUID userID)
|
public static string GetCapsURL(LLUUID userID)
|
||||||
|
@ -549,8 +541,8 @@ namespace OpenSim.Framework
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
stream = new FileStream(
|
stream = new FileStream(
|
||||||
filename, FileMode.Create,
|
filename, FileMode.Create,
|
||||||
FileAccess.Write, FileShare.None);
|
FileAccess.Write, FileShare.None);
|
||||||
|
|
||||||
formatter.Serialize(stream, obj);
|
formatter.Serialize(stream, obj);
|
||||||
}
|
}
|
||||||
|
@ -577,8 +569,8 @@ namespace OpenSim.Framework
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
stream = new FileStream(
|
stream = new FileStream(
|
||||||
filename, FileMode.Open,
|
filename, FileMode.Open,
|
||||||
FileAccess.Read, FileShare.None);
|
FileAccess.Read, FileShare.None);
|
||||||
|
|
||||||
ret = formatter.Deserialize(stream);
|
ret = formatter.Deserialize(stream);
|
||||||
}
|
}
|
||||||
|
@ -597,6 +589,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string[] ParseStartLocationRequest(string startLocationRequest)
|
public static string[] ParseStartLocationRequest(string startLocationRequest)
|
||||||
{
|
{
|
||||||
string[] returnstring = new string[4];
|
string[] returnstring = new string[4];
|
||||||
|
@ -617,33 +610,22 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
if (splitstr.GetLength(0) == 2)
|
if (splitstr.GetLength(0) == 2)
|
||||||
{
|
{
|
||||||
|
|
||||||
string[] splitstr2 = splitstr[1].Split('&');//, 4, StringSplitOptions.RemoveEmptyEntries);
|
string[] splitstr2 = splitstr[1].Split('&');//, 4, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
//System.Console.WriteLine("Found " + splitstr2.GetLength(0) + " elements in 2nd split result");
|
//System.Console.WriteLine("Found " + splitstr2.GetLength(0) + " elements in 2nd split result");
|
||||||
|
|
||||||
if (splitstr2.GetLength(0) >= 1)
|
int len = Math.Min(splitstr2.GetLength(0), 4);
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
returnstring[0] = splitstr2[0];
|
if (len > i)
|
||||||
}
|
{
|
||||||
if (splitstr2.GetLength(0) >= 2)
|
returnstring[i] = splitstr2[i];
|
||||||
{
|
}
|
||||||
returnstring[1] = splitstr2[1];
|
|
||||||
}
|
|
||||||
if (splitstr2.GetLength(0) >= 3)
|
|
||||||
{
|
|
||||||
returnstring[2] = splitstr2[2];
|
|
||||||
}
|
|
||||||
if (splitstr2.GetLength(0) >= 4)
|
|
||||||
{
|
|
||||||
returnstring[3] = splitstr2[3];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return returnstring;
|
return returnstring;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -219,6 +219,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
RegionProfileData central_region = getRegion(reqhandle);
|
RegionProfileData central_region = getRegion(reqhandle);
|
||||||
RegionProfileData neighbour;
|
RegionProfileData neighbour;
|
||||||
for (int x = -1; x < 2; x++)
|
for (int x = -1; x < 2; x++)
|
||||||
|
{
|
||||||
for (int y = -1; y < 2; y++)
|
for (int y = -1; y < 2; y++)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
|
@ -230,6 +231,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
getRegion(
|
getRegion(
|
||||||
Util.UIntsToLong((uint)((central_region.regionLocX + x) * Constants.RegionSize),
|
Util.UIntsToLong((uint)((central_region.regionLocX + x) * Constants.RegionSize),
|
||||||
(uint)(central_region.regionLocY + y) * Constants.RegionSize));
|
(uint)(central_region.regionLocY + y) * Constants.RegionSize));
|
||||||
|
|
||||||
response += "<neighbour>";
|
response += "<neighbour>";
|
||||||
response += "<sim_ip>" + neighbour.serverIP + "</sim_ip>";
|
response += "<sim_ip>" + neighbour.serverIP + "</sim_ip>";
|
||||||
response += "<sim_port>" + neighbour.serverPort.ToString() + "</sim_port>";
|
response += "<sim_port>" + neighbour.serverPort.ToString() + "</sim_port>";
|
||||||
|
@ -239,23 +241,20 @@ namespace OpenSim.Grid.GridServer
|
||||||
response += "</neighbour>";
|
response += "</neighbour>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual bool ValidateOverwrite(RegionProfileData sim, RegionProfileData existingSim)
|
protected virtual bool ValidateOverwrite(RegionProfileData sim, RegionProfileData existingSim)
|
||||||
{
|
{
|
||||||
bool validated;
|
return (existingSim.regionRecvKey == sim.regionRecvKey &&
|
||||||
validated = (existingSim.regionRecvKey == sim.regionRecvKey &&
|
existingSim.regionSendKey == sim.regionSendKey);
|
||||||
existingSim.regionSendKey == sim.regionSendKey);
|
|
||||||
return validated;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual bool ValidateNewRegion(RegionProfileData sim)
|
protected virtual bool ValidateNewRegion(RegionProfileData sim)
|
||||||
{
|
{
|
||||||
bool validated;
|
return (sim.regionRecvKey == Config.SimSendKey &&
|
||||||
validated = (sim.regionRecvKey == Config.SimSendKey &&
|
sim.regionSendKey == Config.SimRecvKey);
|
||||||
sim.regionSendKey == Config.SimRecvKey);
|
|
||||||
return validated;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private XmlRpcResponse ErrorResponse(string error)
|
private XmlRpcResponse ErrorResponse(string error)
|
||||||
|
@ -274,17 +273,13 @@ namespace OpenSim.Grid.GridServer
|
||||||
/// <returns>Startup parameters</returns>
|
/// <returns>Startup parameters</returns>
|
||||||
public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request)
|
public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request)
|
||||||
{
|
{
|
||||||
|
|
||||||
RegionProfileData sim;
|
RegionProfileData sim;
|
||||||
RegionProfileData existingSim;
|
RegionProfileData existingSim;
|
||||||
|
|
||||||
Hashtable requestData = (Hashtable)request.Params[0];
|
Hashtable requestData = (Hashtable)request.Params[0];
|
||||||
LLUUID uuid;
|
LLUUID uuid;
|
||||||
|
|
||||||
if (requestData.ContainsKey("UUID") && LLUUID.TryParse((string)requestData["UUID"], out uuid))
|
if (!requestData.ContainsKey("UUID") || !LLUUID.TryParse((string)requestData["UUID"], out uuid))
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
m_log.Info("[GRID]: Region connected without a UUID, ignoring.");
|
m_log.Info("[GRID]: Region connected without a UUID, ignoring.");
|
||||||
return ErrorResponse("No UUID passed to grid server - unable to connect you");
|
return ErrorResponse("No UUID passed to grid server - unable to connect you");
|
||||||
|
@ -459,6 +454,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int x = -1; x < 2; x++)
|
for (int x = -1; x < 2; x++)
|
||||||
|
{
|
||||||
for (int y = -1; y < 2; y++)
|
for (int y = -1; y < 2; y++)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
|
@ -482,6 +478,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
if (neighbour.UUID != sim.UUID) SimNeighboursData.Add(NeighbourBlock);
|
if (neighbour.UUID != sim.UUID) SimNeighboursData.Add(NeighbourBlock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return SimNeighboursData;
|
return SimNeighboursData;
|
||||||
}
|
}
|
||||||
|
@ -505,7 +502,6 @@ namespace OpenSim.Grid.GridServer
|
||||||
sim.regionUserSendKey = Config.UserSendKey;
|
sim.regionUserSendKey = Config.UserSendKey;
|
||||||
sim.regionUserRecvKey = Config.UserRecvKey;
|
sim.regionUserRecvKey = Config.UserRecvKey;
|
||||||
|
|
||||||
|
|
||||||
sim.serverIP = (string)requestData["sim_ip"];
|
sim.serverIP = (string)requestData["sim_ip"];
|
||||||
sim.serverPort = Convert.ToUInt32((string)requestData["sim_port"]);
|
sim.serverPort = Convert.ToUInt32((string)requestData["sim_port"]);
|
||||||
sim.httpPort = Convert.ToUInt32((string)requestData["http_port"]);
|
sim.httpPort = Convert.ToUInt32((string)requestData["http_port"]);
|
||||||
|
@ -514,7 +510,6 @@ namespace OpenSim.Grid.GridServer
|
||||||
sim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]);
|
sim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]);
|
||||||
sim.regionLocZ = 0;
|
sim.regionLocZ = 0;
|
||||||
|
|
||||||
|
|
||||||
LLUUID textureID;
|
LLUUID textureID;
|
||||||
if (LLUUID.TryParse((string)requestData["map-image-id"], out textureID))
|
if (LLUUID.TryParse((string)requestData["map-image-id"], out textureID))
|
||||||
{
|
{
|
||||||
|
@ -650,7 +645,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.Info("[DATA]: found " + (string)simData.regionName + " regionHandle = " +
|
m_log.Info("[DATA]: found " + (string)simData.regionName + " regionHandle = " +
|
||||||
(string)requestData["region_handle"]);
|
(string)requestData["region_handle"]);
|
||||||
responseData["sim_ip"] = Util.GetHostFromDNS(simData.serverIP).ToString();
|
responseData["sim_ip"] = Util.GetHostFromDNS(simData.serverIP).ToString();
|
||||||
responseData["sim_port"] = simData.serverPort.ToString();
|
responseData["sim_port"] = simData.serverPort.ToString();
|
||||||
responseData["server_uri"] = simData.serverURI;
|
responseData["server_uri"] = simData.serverURI;
|
||||||
|
@ -730,7 +725,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
simProfileList.Add(simProfileBlock);
|
simProfileList.Add(simProfileBlock);
|
||||||
}
|
}
|
||||||
m_log.Info("[MAP]: Fast map " + simProfileList.Count.ToString() +
|
m_log.Info("[MAP]: Fast map " + simProfileList.Count.ToString() +
|
||||||
" regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")");
|
" regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -765,7 +760,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_log.Info("[MAP]: Std map " + simProfileList.Count.ToString() +
|
m_log.Info("[MAP]: Std map " + simProfileList.Count.ToString() +
|
||||||
" regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")");
|
" regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
responseData["sim-profiles"] = simProfileList;
|
responseData["sim-profiles"] = simProfileList;
|
||||||
|
@ -852,14 +847,14 @@ namespace OpenSim.Grid.GridServer
|
||||||
public string RestSetSimMethod(string request, string path, string param)
|
public string RestSetSimMethod(string request, string path, string param)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Processing region update via REST method");
|
Console.WriteLine("Processing region update via REST method");
|
||||||
RegionProfileData TheSim;
|
RegionProfileData theSim;
|
||||||
TheSim = getRegion(new LLUUID(param));
|
theSim = getRegion(new LLUUID(param));
|
||||||
if ((TheSim) == null)
|
if (theSim == null)
|
||||||
{
|
{
|
||||||
TheSim = new RegionProfileData();
|
theSim = new RegionProfileData();
|
||||||
LLUUID UUID = new LLUUID(param);
|
LLUUID UUID = new LLUUID(param);
|
||||||
TheSim.UUID = UUID;
|
theSim.UUID = UUID;
|
||||||
TheSim.regionRecvKey = Config.SimRecvKey;
|
theSim.regionRecvKey = Config.SimRecvKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
|
@ -877,59 +872,59 @@ namespace OpenSim.Grid.GridServer
|
||||||
return "ERROR! bad XML - expected sim tag";
|
return "ERROR! bad XML - expected sim tag";
|
||||||
}
|
}
|
||||||
|
|
||||||
//TheSim.regionSendKey = Cfg;
|
//theSim.regionSendKey = Cfg;
|
||||||
TheSim.regionRecvKey = Config.SimRecvKey;
|
theSim.regionRecvKey = Config.SimRecvKey;
|
||||||
TheSim.regionSendKey = Config.SimSendKey;
|
theSim.regionSendKey = Config.SimSendKey;
|
||||||
TheSim.regionSecret = Config.SimRecvKey;
|
theSim.regionSecret = Config.SimRecvKey;
|
||||||
TheSim.regionDataURI = String.Empty;
|
theSim.regionDataURI = String.Empty;
|
||||||
TheSim.regionAssetURI = Config.DefaultAssetServer;
|
theSim.regionAssetURI = Config.DefaultAssetServer;
|
||||||
TheSim.regionAssetRecvKey = Config.AssetRecvKey;
|
theSim.regionAssetRecvKey = Config.AssetRecvKey;
|
||||||
TheSim.regionAssetSendKey = Config.AssetSendKey;
|
theSim.regionAssetSendKey = Config.AssetSendKey;
|
||||||
TheSim.regionUserURI = Config.DefaultUserServer;
|
theSim.regionUserURI = Config.DefaultUserServer;
|
||||||
TheSim.regionUserSendKey = Config.UserSendKey;
|
theSim.regionUserSendKey = Config.UserSendKey;
|
||||||
TheSim.regionUserRecvKey = Config.UserRecvKey;
|
theSim.regionUserRecvKey = Config.UserRecvKey;
|
||||||
|
|
||||||
for (int i = 0; i < simnode.ChildNodes.Count; i++)
|
for (int i = 0; i < simnode.ChildNodes.Count; i++)
|
||||||
{
|
{
|
||||||
switch (simnode.ChildNodes[i].Name)
|
switch (simnode.ChildNodes[i].Name)
|
||||||
{
|
{
|
||||||
case "regionname":
|
case "regionname":
|
||||||
TheSim.regionName = simnode.ChildNodes[i].InnerText;
|
theSim.regionName = simnode.ChildNodes[i].InnerText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "sim_ip":
|
case "sim_ip":
|
||||||
TheSim.serverIP = simnode.ChildNodes[i].InnerText;
|
theSim.serverIP = simnode.ChildNodes[i].InnerText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "sim_port":
|
case "sim_port":
|
||||||
TheSim.serverPort = Convert.ToUInt32(simnode.ChildNodes[i].InnerText);
|
theSim.serverPort = Convert.ToUInt32(simnode.ChildNodes[i].InnerText);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "region_locx":
|
case "region_locx":
|
||||||
TheSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
|
theSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
|
||||||
TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * Constants.RegionSize), (TheSim.regionLocY * Constants.RegionSize));
|
theSim.regionHandle = Helpers.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "region_locy":
|
case "region_locy":
|
||||||
TheSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
|
theSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
|
||||||
TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * Constants.RegionSize), (TheSim.regionLocY * Constants.RegionSize));
|
theSim.regionHandle = Helpers.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/";
|
theSim.serverURI = "http://" + theSim.serverIP + ":" + theSim.serverPort + "/";
|
||||||
bool requirePublic = false;
|
bool requirePublic = false;
|
||||||
bool requireValid = true;
|
bool requireValid = true;
|
||||||
|
|
||||||
if (requirePublic &&
|
if (requirePublic &&
|
||||||
(TheSim.serverIP.StartsWith("172.16") || TheSim.serverIP.StartsWith("192.168") ||
|
(theSim.serverIP.StartsWith("172.16") || theSim.serverIP.StartsWith("192.168") ||
|
||||||
TheSim.serverIP.StartsWith("10.") || TheSim.serverIP.StartsWith("0.") ||
|
theSim.serverIP.StartsWith("10.") || theSim.serverIP.StartsWith("0.") ||
|
||||||
TheSim.serverIP.StartsWith("255.")))
|
theSim.serverIP.StartsWith("255.")))
|
||||||
{
|
{
|
||||||
return "ERROR! Servers must register with public addresses.";
|
return "ERROR! Servers must register with public addresses.";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (requireValid && (TheSim.serverIP.StartsWith("0.") || TheSim.serverIP.StartsWith("255.")))
|
if (requireValid && (theSim.serverIP.StartsWith("0.") || theSim.serverIP.StartsWith("255.")))
|
||||||
{
|
{
|
||||||
return "ERROR! 0.*.*.* / 255.*.*.* Addresses are invalid, please check your server config and try again";
|
return "ERROR! 0.*.*.* / 255.*.*.* Addresses are invalid, please check your server config and try again";
|
||||||
}
|
}
|
||||||
|
@ -937,27 +932,28 @@ namespace OpenSim.Grid.GridServer
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_log.Info("[DATA]: " +
|
m_log.Info("[DATA]: " +
|
||||||
"Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
|
"Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
|
||||||
|
|
||||||
foreach (KeyValuePair<string, IGridData> kvp in _plugins)
|
foreach (KeyValuePair<string, IGridData> kvp in _plugins)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//Check reservations
|
//Check reservations
|
||||||
ReservationData reserveData =
|
ReservationData reserveData =
|
||||||
kvp.Value.GetReservationAtPoint(TheSim.regionLocX, TheSim.regionLocY);
|
kvp.Value.GetReservationAtPoint(theSim.regionLocX, theSim.regionLocY);
|
||||||
if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) ||
|
if ((reserveData != null && reserveData.gridRecvKey == theSim.regionRecvKey) ||
|
||||||
(reserveData == null && authkeynode.InnerText != TheSim.regionRecvKey))
|
(reserveData == null && authkeynode.InnerText != theSim.regionRecvKey))
|
||||||
{
|
{
|
||||||
kvp.Value.AddProfile(TheSim);
|
kvp.Value.AddProfile(theSim);
|
||||||
m_log.Info("[grid]: New sim added to grid (" + TheSim.regionName + ")");
|
m_log.Info("[grid]: New sim added to grid (" + theSim.regionName + ")");
|
||||||
logToDB(TheSim.UUID.ToString(), "RestSetSimMethod", String.Empty, 5,
|
logToDB(theSim.UUID.ToString(), "RestSetSimMethod", String.Empty, 5,
|
||||||
"Region successfully updated and connected to grid.");
|
"Region successfully updated and connected to grid.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.Warn("[grid]: " +
|
m_log.Warn("[grid]: " +
|
||||||
"Unable to update region (RestSetSimMethod): Incorrect reservation auth key.");
|
"Unable to update region (RestSetSimMethod): Incorrect reservation auth key.");
|
||||||
// Wanted: " + reserveData.gridRecvKey + ", Got: " + TheSim.regionRecvKey + ".");
|
// Wanted: " + reserveData.gridRecvKey + ", Got: " + theSim.regionRecvKey + ".");
|
||||||
return "Unable to update region (RestSetSimMethod): Incorrect auth key.";
|
return "Unable to update region (RestSetSimMethod): Incorrect auth key.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,6 @@ namespace OpenSim.Grid.UserServer
|
||||||
m_config = config;
|
m_config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Customises the login response and fills in missing values.
|
/// Customises the login response and fills in missing values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -93,7 +91,6 @@ namespace OpenSim.Grid.UserServer
|
||||||
RegionProfileData.RequestSimProfileData(
|
RegionProfileData.RequestSimProfileData(
|
||||||
theUser.homeRegion, m_config.GridServerURL,
|
theUser.homeRegion, m_config.GridServerURL,
|
||||||
m_config.GridSendKey, m_config.GridRecvKey);
|
m_config.GridSendKey, m_config.GridRecvKey);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -123,7 +120,6 @@ namespace OpenSim.Grid.UserServer
|
||||||
theUser.homeRegion, m_config.GridServerURL,
|
theUser.homeRegion, m_config.GridServerURL,
|
||||||
m_config.GridSendKey, m_config.GridRecvKey);
|
m_config.GridSendKey, m_config.GridRecvKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +174,6 @@ namespace OpenSim.Grid.UserServer
|
||||||
|
|
||||||
// Update agent with target sim
|
// Update agent with target sim
|
||||||
|
|
||||||
|
|
||||||
m_log.Info("[LOGIN]: Telling "
|
m_log.Info("[LOGIN]: Telling "
|
||||||
+ SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " +
|
+ SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " +
|
||||||
SimInfo.regionLocX + "," + SimInfo.regionLocY + " to expect user connection");
|
SimInfo.regionLocX + "," + SimInfo.regionLocY + " to expect user connection");
|
||||||
|
|
|
@ -212,6 +212,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
}
|
}
|
||||||
return mapBlocks;
|
return mapBlocks;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID)
|
public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID)
|
||||||
{
|
{
|
||||||
if (m_regionListeners.ContainsKey(regionHandle))
|
if (m_regionListeners.ContainsKey(regionHandle))
|
||||||
|
@ -245,7 +246,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function Is only here to keep this class in line with the Grid Interface.
|
// This function is only here to keep this class in line with the Grid Interface.
|
||||||
// It never gets called.
|
// It never gets called.
|
||||||
public virtual Dictionary<string, string> GetGridSettings()
|
public virtual Dictionary<string, string> GetGridSettings()
|
||||||
{
|
{
|
||||||
|
@ -291,14 +292,15 @@ namespace OpenSim.Region.Communications.Local
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="regionHandle"></param>
|
/// <param name="regionHandle"></param>
|
||||||
/// <param name="agentData"></param>
|
/// <param name="agentData"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
///
|
|
||||||
public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
||||||
//should change from agentCircuitData
|
// TODO: should change from agentCircuitData
|
||||||
{
|
{
|
||||||
//Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent");
|
//Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent");
|
||||||
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname);
|
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname);
|
||||||
|
@ -352,8 +354,6 @@ namespace OpenSim.Region.Communications.Local
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId)
|
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId)
|
||||||
{
|
{
|
||||||
if (m_regionListeners.ContainsKey(regionHandle))
|
if (m_regionListeners.ContainsKey(regionHandle))
|
||||||
|
|
|
@ -68,7 +68,6 @@ namespace OpenSim.Region.Communications.Local
|
||||||
authUsers = authenticate;
|
authUsers = authenticate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override UserProfileData GetTheUser(string firstname, string lastname)
|
public override UserProfileData GetTheUser(string firstname, string lastname)
|
||||||
{
|
{
|
||||||
UserProfileData profile = m_userManager.GetUserProfile(firstname, lastname);
|
UserProfileData profile = m_userManager.GetUserProfile(firstname, lastname);
|
||||||
|
@ -189,6 +188,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
m_log.Warn("[LOGIN]: Not found region " + currentRegion);
|
m_log.Warn("[LOGIN]: Not found region " + currentRegion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL)
|
private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL)
|
||||||
{
|
{
|
||||||
LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList();
|
LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList();
|
||||||
|
@ -199,10 +199,10 @@ namespace OpenSim.Region.Communications.Local
|
||||||
buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms;
|
buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms;
|
||||||
buddyitem.BuddyRightsGiven = (int)fl.FriendPerms;
|
buddyitem.BuddyRightsGiven = (int)fl.FriendPerms;
|
||||||
buddylistreturn.AddNewBuddy(buddyitem);
|
buddylistreturn.AddNewBuddy(buddyitem);
|
||||||
|
|
||||||
}
|
}
|
||||||
return buddylistreturn;
|
return buddylistreturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override InventoryData CreateInventoryData(LLUUID userID)
|
protected override InventoryData CreateInventoryData(LLUUID userID)
|
||||||
{
|
{
|
||||||
List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID);
|
List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID);
|
||||||
|
|
|
@ -134,7 +134,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
GridReq = new XmlRpcRequest("simulator_login", SendParams);
|
GridReq = new XmlRpcRequest("simulator_login", SendParams);
|
||||||
GridResp = GridReq.Send(serversInfo.GridURL, 16000);
|
GridResp = GridReq.Send(serversInfo.GridURL, 16000);
|
||||||
} catch (Exception ex)
|
}
|
||||||
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
m_log.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);
|
||||||
|
@ -182,7 +183,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
Hashtable griddatahash = GridRespData;
|
Hashtable griddatahash = GridRespData;
|
||||||
|
|
||||||
// Process Response
|
// Process Response
|
||||||
if (GridRespData.ContainsKey("error")) {
|
if (GridRespData.ContainsKey("error"))
|
||||||
|
{
|
||||||
string errorstring = (string)GridRespData["error"];
|
string errorstring = (string)GridRespData["error"];
|
||||||
m_log.Error("Unable to connect to grid: " + errorstring);
|
m_log.Error("Unable to connect to grid: " + errorstring);
|
||||||
return false;
|
return false;
|
||||||
|
@ -202,7 +204,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]);
|
returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_queuedGridSettings.Clear();
|
m_queuedGridSettings.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,10 +309,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return regionInfo;
|
return regionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo))
|
if (!m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo))
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -366,54 +364,51 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
// Don't use this method. It's only for SLURLS and Logins
|
// Don't use this method. It's only for SLURLS and Logins
|
||||||
RegionInfo regionInfo = null;
|
RegionInfo regionInfo = null;
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
Hashtable requestData = new Hashtable();
|
||||||
|
requestData["region_name_search"] = regionName;
|
||||||
|
requestData["authkey"] = serversInfo.GridSendKey;
|
||||||
|
ArrayList SendParams = new ArrayList();
|
||||||
|
SendParams.Add(requestData);
|
||||||
|
XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
|
||||||
|
XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000);
|
||||||
|
|
||||||
|
Hashtable responseData = (Hashtable) GridResp.Value;
|
||||||
|
|
||||||
|
if (responseData.ContainsKey("error"))
|
||||||
{
|
{
|
||||||
Hashtable requestData = new Hashtable();
|
m_log.Error("[OGS1 GRID SERVICES]: Error received from grid server" + responseData["error"]);
|
||||||
requestData["region_name_search"] = regionName;
|
return null;
|
||||||
requestData["authkey"] = serversInfo.GridSendKey;
|
|
||||||
ArrayList SendParams = new ArrayList();
|
|
||||||
SendParams.Add(requestData);
|
|
||||||
XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
|
|
||||||
XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000);
|
|
||||||
|
|
||||||
Hashtable responseData = (Hashtable) GridResp.Value;
|
|
||||||
|
|
||||||
if (responseData.ContainsKey("error"))
|
|
||||||
{
|
|
||||||
m_log.Error("[OGS1 GRID SERVICES]: Error received from grid server" + responseData["error"]);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint regX = Convert.ToUInt32((string) responseData["region_locx"]);
|
|
||||||
uint regY = Convert.ToUInt32((string) responseData["region_locy"]);
|
|
||||||
string internalIpStr = (string) responseData["sim_ip"];
|
|
||||||
uint port = Convert.ToUInt32(responseData["sim_port"]);
|
|
||||||
string externalUri = (string) responseData["sim_uri"];
|
|
||||||
|
|
||||||
IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port);
|
|
||||||
string neighbourExternalUri = externalUri;
|
|
||||||
regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr);
|
|
||||||
|
|
||||||
regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
|
|
||||||
regionInfo.RemotingAddress = internalIpStr;
|
|
||||||
|
|
||||||
regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]);
|
|
||||||
regionInfo.RegionName = (string) responseData["region_name"];
|
|
||||||
|
|
||||||
m_remoteRegionInfoCache.Add(regionInfo.RegionHandle, regionInfo);
|
|
||||||
}
|
}
|
||||||
catch (WebException)
|
|
||||||
{
|
uint regX = Convert.ToUInt32((string) responseData["region_locx"]);
|
||||||
m_log.Error("[OGS1 GRID SERVICES]: " +
|
uint regY = Convert.ToUInt32((string) responseData["region_locy"]);
|
||||||
"Region lookup failed for: " + regionName +
|
string internalIpStr = (string) responseData["sim_ip"];
|
||||||
" - Is the GridServer down?");
|
uint port = Convert.ToUInt32(responseData["sim_port"]);
|
||||||
}
|
string externalUri = (string) responseData["sim_uri"];
|
||||||
|
|
||||||
|
IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port);
|
||||||
|
string neighbourExternalUri = externalUri;
|
||||||
|
regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr);
|
||||||
|
|
||||||
|
regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
|
||||||
|
regionInfo.RemotingAddress = internalIpStr;
|
||||||
|
|
||||||
|
regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]);
|
||||||
|
regionInfo.RegionName = (string) responseData["region_name"];
|
||||||
|
|
||||||
|
m_remoteRegionInfoCache.Add(regionInfo.RegionHandle, regionInfo);
|
||||||
|
}
|
||||||
|
catch (WebException)
|
||||||
|
{
|
||||||
|
m_log.Error("[OGS1 GRID SERVICES]: " +
|
||||||
|
"Region lookup failed for: " + regionName +
|
||||||
|
" - Is the GridServer down?");
|
||||||
|
}
|
||||||
|
|
||||||
return regionInfo;
|
return regionInfo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -465,9 +460,6 @@ 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>
|
||||||
|
@ -519,7 +511,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Grid Request Processing
|
// Grid Request Processing
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Received from the user server when a user starts logging in. This call allows
|
/// Received from the user server when a user starts logging in. This call allows
|
||||||
|
@ -596,7 +587,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
InterRegionSingleton.Instance.OnRegionUp += TriggerRegionUp;
|
InterRegionSingleton.Instance.OnRegionUp += TriggerRegionUp;
|
||||||
InterRegionSingleton.Instance.OnChildAgentUpdate += TriggerChildAgentUpdate;
|
InterRegionSingleton.Instance.OnChildAgentUpdate += TriggerChildAgentUpdate;
|
||||||
InterRegionSingleton.Instance.OnTellRegionToCloseChildConnection += TriggerTellRegionToCloseChildConnection;
|
InterRegionSingleton.Instance.OnTellRegionToCloseChildConnection += TriggerTellRegionToCloseChildConnection;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Methods called by regions in this instance
|
#region Methods called by regions in this instance
|
||||||
|
@ -629,10 +619,10 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
|
|
||||||
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");
|
||||||
|
|
||||||
if (remObject != null)
|
if (remObject != null)
|
||||||
{
|
{
|
||||||
|
@ -738,29 +728,27 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
//don't want to be creating a new link to the remote instance every time like we are here
|
//don't want to be creating a new link to the remote instance every time like we are here
|
||||||
bool retValue = false;
|
bool retValue = false;
|
||||||
|
|
||||||
|
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
|
||||||
|
typeof(OGS1InterRegionRemoting),
|
||||||
|
"tcp://" + regInfo.RemotingAddress +
|
||||||
|
":" + regInfo.RemotingPort +
|
||||||
|
"/InterRegions");
|
||||||
|
|
||||||
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
|
if (remObject != null)
|
||||||
typeof(OGS1InterRegionRemoting),
|
{
|
||||||
"tcp://" + regInfo.RemotingAddress +
|
retValue = remObject.InformRegionOfChildAgent(regionHandle, new sAgentCircuitData(agentData));
|
||||||
":" + regInfo.RemotingPort +
|
}
|
||||||
"/InterRegions");
|
else
|
||||||
|
{
|
||||||
if (remObject != null)
|
m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found");
|
||||||
{
|
}
|
||||||
retValue = remObject.InformRegionOfChildAgent(regionHandle, new sAgentCircuitData(agentData));
|
remObject = null;
|
||||||
}
|
m_log.Info("[OGS1 GRID SERVICES]: " +
|
||||||
else
|
gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " +
|
||||||
{
|
agentData.firstname + " " + agentData.lastname + " and got " +
|
||||||
m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found");
|
retValue.ToString());
|
||||||
}
|
|
||||||
remObject = null;
|
|
||||||
m_log.Info("[OGS1 GRID SERVICES]: " +
|
|
||||||
gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " +
|
|
||||||
agentData.firstname + " " + agentData.lastname + " and got " +
|
|
||||||
retValue.ToString());
|
|
||||||
|
|
||||||
return retValue;
|
|
||||||
|
|
||||||
|
return retValue;
|
||||||
}
|
}
|
||||||
NoteDeadRegion(regionHandle);
|
NoteDeadRegion(regionHandle);
|
||||||
return false;
|
return false;
|
||||||
|
@ -849,14 +837,12 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
//don't want to be creating a new link to the remote instance every time like we are here
|
//don't want to be creating a new link to the remote instance every time like we are here
|
||||||
bool retValue = false;
|
bool retValue = false;
|
||||||
|
|
||||||
|
|
||||||
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject(
|
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject(
|
||||||
typeof (
|
typeof(OGS1InterRegionRemoting),
|
||||||
OGS1InterRegionRemoting),
|
"tcp://" +
|
||||||
"tcp://" +
|
regInfo.RemotingAddress +
|
||||||
regInfo.RemotingAddress +
|
":" + regInfo.RemotingPort +
|
||||||
":" + regInfo.RemotingPort +
|
"/InterRegions");
|
||||||
"/InterRegions");
|
|
||||||
|
|
||||||
if (remObject != null)
|
if (remObject != null)
|
||||||
{
|
{
|
||||||
|
@ -939,7 +925,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
/// <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;
|
int failures = 0;
|
||||||
lock (m_deadRegionCache)
|
lock (m_deadRegionCache)
|
||||||
{
|
{
|
||||||
if (m_deadRegionCache.ContainsKey(regionHandle))
|
if (m_deadRegionCache.ContainsKey(regionHandle))
|
||||||
|
@ -963,12 +949,11 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
//don't want to be creating a new link to the remote instance every time like we are here
|
//don't want to be creating a new link to the remote instance every time like we are here
|
||||||
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");
|
||||||
|
|
||||||
if (remObject != null)
|
if (remObject != null)
|
||||||
{
|
{
|
||||||
|
@ -980,7 +965,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
remObject = null;
|
remObject = null;
|
||||||
|
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
NoteDeadRegion(regionHandle);
|
NoteDeadRegion(regionHandle);
|
||||||
|
@ -1050,10 +1034,11 @@ 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");
|
||||||
|
|
||||||
if (remObject != null)
|
if (remObject != null)
|
||||||
{
|
{
|
||||||
retValue =
|
retValue =
|
||||||
|
@ -1106,10 +1091,11 @@ 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");
|
||||||
|
|
||||||
if (remObject != null)
|
if (remObject != null)
|
||||||
{
|
{
|
||||||
retValue =
|
retValue =
|
||||||
|
@ -1181,10 +1167,11 @@ 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");
|
||||||
|
|
||||||
if (remObject != null)
|
if (remObject != null)
|
||||||
{
|
{
|
||||||
retValue =
|
retValue =
|
||||||
|
@ -1211,7 +1198,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
//m_log.Debug(e.ToString());
|
//m_log.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (SocketException e)
|
catch (SocketException e)
|
||||||
{
|
{
|
||||||
NoteDeadRegion(regionHandle);
|
NoteDeadRegion(regionHandle);
|
||||||
|
@ -1312,7 +1298,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
if (m_deadRegionCache.ContainsKey(regionData.RegionHandle))
|
if (m_deadRegionCache.ContainsKey(regionData.RegionHandle))
|
||||||
{
|
{
|
||||||
|
|
||||||
m_deadRegionCache.Remove(regionData.RegionHandle);
|
m_deadRegionCache.Remove(regionData.RegionHandle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1356,7 +1341,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
m_localBackend.TriggerExpectPrim(regionHandle, primID, objData);
|
m_localBackend.TriggerExpectPrim(regionHandle, primID, objData);
|
||||||
return true;
|
return true;
|
||||||
//m_localBackend.
|
//m_localBackend.
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -177,7 +177,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result)
|
public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result)
|
||||||
{
|
{
|
||||||
m_log.Warn("Terrain commands have been depreciated.");
|
m_log.Warn("Terrain commands have been deprecated.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,11 +332,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public void SetCurrentSceneTimePhase(int timePhase)
|
public void SetCurrentSceneTimePhase(int timePhase)
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene)
|
ForEachCurrentScene(delegate(Scene scene)
|
||||||
{
|
{
|
||||||
scene.SetTimePhase(
|
scene.SetTimePhase(
|
||||||
timePhase)
|
timePhase)
|
||||||
;
|
;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ForceCurrentSceneClientUpdate()
|
public void ForceCurrentSceneClientUpdate()
|
||||||
|
|
|
@ -33,9 +33,7 @@ using OpenSim.Framework;
|
||||||
namespace OpenSim.Region.Physics.Manager
|
namespace OpenSim.Region.Physics.Manager
|
||||||
{
|
{
|
||||||
public delegate void PositionUpdate(PhysicsVector position);
|
public delegate void PositionUpdate(PhysicsVector position);
|
||||||
|
|
||||||
public delegate void VelocityUpdate(PhysicsVector velocity);
|
public delegate void VelocityUpdate(PhysicsVector velocity);
|
||||||
|
|
||||||
public delegate void OrientationUpdate(Quaternion orientation);
|
public delegate void OrientationUpdate(Quaternion orientation);
|
||||||
|
|
||||||
public enum ActorTypes : int
|
public enum ActorTypes : int
|
||||||
|
@ -50,7 +48,6 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
{
|
{
|
||||||
// Raising the event on the object, so don't need to provide location.. further up the tree knows that info.
|
// Raising the event on the object, so don't need to provide location.. further up the tree knows that info.
|
||||||
|
|
||||||
|
|
||||||
public int m_colliderType;
|
public int m_colliderType;
|
||||||
public int m_GenericStartEnd;
|
public int m_GenericStartEnd;
|
||||||
//public uint m_LocalID;
|
//public uint m_LocalID;
|
||||||
|
@ -88,13 +85,10 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public abstract class PhysicsActor
|
public abstract class PhysicsActor
|
||||||
{
|
{
|
||||||
public delegate void RequestTerseUpdate();
|
public delegate void RequestTerseUpdate();
|
||||||
|
|
||||||
public delegate void CollisionUpdate(EventArgs e);
|
public delegate void CollisionUpdate(EventArgs e);
|
||||||
|
|
||||||
public delegate void OutOfBounds(PhysicsVector pos);
|
public delegate void OutOfBounds(PhysicsVector pos);
|
||||||
|
|
||||||
#pragma warning disable 67
|
#pragma warning disable 67
|
||||||
|
@ -138,9 +132,7 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
|
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
{
|
{
|
||||||
|
handler();
|
||||||
handler();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,9 +142,10 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
// a race condition if the last subscriber unsubscribes
|
// a race condition if the last subscriber unsubscribes
|
||||||
// immediately after the null check and before the event is raised.
|
// immediately after the null check and before the event is raised.
|
||||||
OutOfBounds handler = OnOutOfBounds;
|
OutOfBounds handler = OnOutOfBounds;
|
||||||
|
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
{
|
{
|
||||||
handler(pos);
|
handler(pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,54 +155,34 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
|
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
{
|
{
|
||||||
handler(e);
|
handler(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public abstract PhysicsVector Position { get; set; }
|
public abstract PhysicsVector Position { get; set; }
|
||||||
|
|
||||||
public abstract float Mass { get; }
|
public abstract float Mass { get; }
|
||||||
|
|
||||||
public abstract PhysicsVector Force { get; }
|
public abstract PhysicsVector Force { get; }
|
||||||
|
|
||||||
public abstract PhysicsVector GeometricCenter { get; }
|
public abstract PhysicsVector GeometricCenter { get; }
|
||||||
|
|
||||||
public abstract PhysicsVector CenterOfMass { get; }
|
public abstract PhysicsVector CenterOfMass { get; }
|
||||||
|
|
||||||
public abstract PhysicsVector Velocity { get; set; }
|
public abstract PhysicsVector Velocity { get; set; }
|
||||||
|
|
||||||
public abstract float CollisionScore { get;}
|
public abstract float CollisionScore { get;}
|
||||||
|
|
||||||
public abstract PhysicsVector Acceleration { get; }
|
public abstract PhysicsVector Acceleration { get; }
|
||||||
|
|
||||||
public abstract Quaternion Orientation { get; set; }
|
public abstract Quaternion Orientation { get; set; }
|
||||||
public abstract int PhysicsActorType { get; set; }
|
public abstract int PhysicsActorType { get; set; }
|
||||||
|
|
||||||
public abstract bool IsPhysical { get; set; }
|
public abstract bool IsPhysical { get; set; }
|
||||||
|
|
||||||
public abstract bool Flying { get; set; }
|
public abstract bool Flying { get; set; }
|
||||||
public abstract bool SetAlwaysRun { get; set; }
|
public abstract bool SetAlwaysRun { get; set; }
|
||||||
public abstract bool ThrottleUpdates { get; set; }
|
public abstract bool ThrottleUpdates { get; set; }
|
||||||
|
|
||||||
public abstract bool IsColliding { get; set; }
|
public abstract bool IsColliding { get; set; }
|
||||||
public abstract bool CollidingGround { get; set; }
|
public abstract bool CollidingGround { get; set; }
|
||||||
public abstract bool CollidingObj { get; set; }
|
public abstract bool CollidingObj { get; set; }
|
||||||
|
|
||||||
public abstract bool FloatOnWater { set; }
|
public abstract bool FloatOnWater { set; }
|
||||||
|
|
||||||
public abstract PhysicsVector RotationalVelocity { get; set; }
|
public abstract PhysicsVector RotationalVelocity { get; set; }
|
||||||
|
|
||||||
public abstract bool Kinematic { get; set; }
|
public abstract bool Kinematic { get; set; }
|
||||||
|
|
||||||
public abstract float Buoyancy { get; set; }
|
public abstract float Buoyancy { get; set; }
|
||||||
|
|
||||||
public abstract void AddForce(PhysicsVector force);
|
public abstract void AddForce(PhysicsVector force);
|
||||||
|
|
||||||
public abstract void SetMomentum(PhysicsVector momentum);
|
public abstract void SetMomentum(PhysicsVector momentum);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class NullPhysicsActor : PhysicsActor
|
public class NullPhysicsActor : PhysicsActor
|
||||||
|
@ -246,7 +219,8 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
set { return; }
|
set { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public override float Buoyancy {
|
public override float Buoyancy
|
||||||
|
{
|
||||||
get { return 0f; }
|
get { return 0f; }
|
||||||
set { return; }
|
set { return; }
|
||||||
}
|
}
|
||||||
|
@ -256,7 +230,6 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
set { return; }
|
set { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override bool CollidingGround
|
public override bool CollidingGround
|
||||||
{
|
{
|
||||||
get { return false; }
|
get { return false; }
|
||||||
|
@ -313,10 +286,8 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
|
|
||||||
public override void CrossingFailure()
|
public override void CrossingFailure()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override Quaternion Orientation
|
public override Quaternion Orientation
|
||||||
{
|
{
|
||||||
get { return Quaternion.Identity; }
|
get { return Quaternion.Identity; }
|
||||||
|
@ -366,17 +337,14 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
|
|
||||||
public override void link(PhysicsActor obj)
|
public override void link(PhysicsActor obj)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void delink()
|
public override void delink()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddForce(PhysicsVector force)
|
public override void AddForce(PhysicsVector force)
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override PhysicsVector RotationalVelocity
|
public override PhysicsVector RotationalVelocity
|
||||||
|
@ -387,7 +355,6 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
|
|
||||||
public override void SetMomentum(PhysicsVector momentum)
|
public override void SetMomentum(PhysicsVector momentum)
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SenseOnce(uint m_localID, LLUUID m_itemID,
|
public void SenseOnce(uint m_localID, LLUUID m_itemID,
|
||||||
string name, LLUUID keyID, int type, double range, double arc, SceneObjectPart host)
|
string name, LLUUID keyID, int type,
|
||||||
|
double range, double arc, SceneObjectPart host)
|
||||||
{
|
{
|
||||||
// Add to timer
|
// Add to timer
|
||||||
SenseRepeatClass ts = new SenseRepeatClass();
|
SenseRepeatClass ts = new SenseRepeatClass();
|
||||||
|
@ -210,7 +211,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
|
||||||
|
|
||||||
foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values)
|
foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values)
|
||||||
{
|
{
|
||||||
|
|
||||||
LLVector3 toRegionPos = ent.AbsolutePosition + regionPos;
|
LLVector3 toRegionPos = ent.AbsolutePosition + regionPos;
|
||||||
double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos));
|
double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos));
|
||||||
if (dis <= ts.range)
|
if (dis <= ts.range)
|
||||||
|
|
|
@ -1558,7 +1558,7 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
<!-- Test Suite -->
|
<!-- Test Suite -->
|
||||||
<Project name="OpenSim.TestSuite" path="OpenSim/TestSuite" type="Exe">
|
<Project name="OpenSim.TestSuite" path="OpenSim/TestSuite" type="Exe">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -1584,8 +1584,6 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Solution>
|
</Solution>
|
||||||
|
|
||||||
<!-- Prebuild tool -->
|
<!-- Prebuild tool -->
|
||||||
|
|
Loading…
Reference in New Issue