* Optimized usings
* shortened references * Removed redundant 'this' * Normalized EOFafrisby
parent
d508d77122
commit
efd90b56b7
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -26,18 +26,11 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using Mono.Addins;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using OpenSim;
|
|
||||||
using OpenSim.Framework.Console;
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.RegionLoader.Filesystem;
|
using OpenSim.Framework.RegionLoader.Filesystem;
|
||||||
using OpenSim.Framework.RegionLoader.Web;
|
using OpenSim.Framework.RegionLoader.Web;
|
||||||
using Mono.Addins;
|
|
||||||
using Mono.Addins.Description;
|
|
||||||
using Nini;
|
|
||||||
using Nini.Config;
|
|
||||||
|
|
||||||
[assembly : Addin]
|
[assembly : Addin]
|
||||||
[assembly : AddinDependency("OpenSim", "0.4")]
|
[assembly : AddinDependency("OpenSim", "0.4")]
|
||||||
|
@ -77,6 +70,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
openSim.ModuleLoader.PostInitialise();
|
openSim.ModuleLoader.PostInitialise();
|
||||||
openSim.ModuleLoader.ClearCache();
|
openSim.ModuleLoader.ClearCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadRegionFromConfig(OpenSimMain openSim, ulong regionhandle)
|
public void LoadRegionFromConfig(OpenSimMain openSim, ulong regionhandle)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Notice("LOADREGIONS", "Load Regions addin being initialised");
|
MainLog.Instance.Notice("LOADREGIONS", "Load Regions addin being initialised");
|
||||||
|
@ -103,11 +97,10 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
openSim.CreateRegion(regionsToLoad[i]);
|
openSim.CreateRegion(regionsToLoad[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,25 +1,27 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
|
|
||||||
[assembly : AssemblyTitle("OpenSim.Addin")]
|
[assembly : AssemblyTitle("OpenSim.Addin")]
|
||||||
[assembly : AssemblyDescription("")]
|
[assembly : AssemblyDescription("")]
|
||||||
[assembly : AssemblyConfiguration("")]
|
[assembly : AssemblyConfiguration("")]
|
||||||
[assembly : AssemblyCompany("")]
|
[assembly : AssemblyCompany("")]
|
||||||
[assembly : AssemblyProduct("OpenSim.Addin")]
|
[assembly : AssemblyProduct("OpenSim.Addin")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2007")]
|
[assembly : AssemblyCopyright("Copyright © 2007")]
|
||||||
[assembly : AssemblyTrademark("")]
|
[assembly : AssemblyTrademark("")]
|
||||||
[assembly : AssemblyCulture("")]
|
[assembly : AssemblyCulture("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
|
||||||
[assembly : ComVisible(false)]
|
[assembly : ComVisible(false)]
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
|
||||||
[assembly : Guid("45b979d9-d8d4-42fd-9780-fe9ac7e86cb4")]
|
[assembly : Guid("45b979d9-d8d4-42fd-9780-fe9ac7e86cb4")]
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
|
@ -32,5 +34,6 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
|
||||||
[assembly : AssemblyVersion("1.0.0.0")]
|
[assembly : AssemblyVersion("1.0.0.0")]
|
||||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
[assembly : AssemblyFileVersion("1.0.0.0")]
|
|
@ -27,21 +27,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Net;
|
|
||||||
using OpenSim;
|
|
||||||
using OpenSim.Framework.Console;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
using OpenSim.Framework.Servers;
|
|
||||||
using Mono.Addins;
|
|
||||||
using Mono.Addins.Description;
|
|
||||||
using Nini;
|
|
||||||
using Nini.Config;
|
|
||||||
using Nwc.XmlRpc;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Net;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
using Mono.Addins;
|
||||||
|
using Nwc.XmlRpc;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Console;
|
||||||
|
using OpenSim.Framework.Servers;
|
||||||
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
[assembly : Addin]
|
[assembly : Addin]
|
||||||
[assembly : AddinDependency("OpenSim", "0.4")]
|
[assembly : AddinDependency("OpenSim", "0.4")]
|
||||||
|
@ -54,6 +49,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
private OpenSimMain m_app;
|
private OpenSimMain m_app;
|
||||||
private BaseHttpServer m_httpd;
|
private BaseHttpServer m_httpd;
|
||||||
private string requiredPassword = "";
|
private string requiredPassword = "";
|
||||||
|
|
||||||
public void Initialise(OpenSimMain openSim)
|
public void Initialise(OpenSimMain openSim)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -86,7 +82,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
LLUUID regionID = new LLUUID((string) requestData["regionID"]);
|
LLUUID regionID = new LLUUID((string) requestData["regionID"]);
|
||||||
|
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
if (requiredPassword != "" && (!requestData.Contains("password") || (string)requestData["password"] != requiredPassword))
|
if (requiredPassword != "" &&
|
||||||
|
(!requestData.Contains("password") || (string) requestData["password"] != requiredPassword))
|
||||||
{
|
{
|
||||||
responseData["accepted"] = "false";
|
responseData["accepted"] = "false";
|
||||||
response.Value = responseData;
|
response.Value = responseData;
|
||||||
|
@ -96,7 +93,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
responseData["accepted"] = "true";
|
responseData["accepted"] = "true";
|
||||||
response.Value = responseData;
|
response.Value = responseData;
|
||||||
|
|
||||||
OpenSim.Region.Environment.Scenes.Scene RebootedScene;
|
Scene RebootedScene;
|
||||||
|
|
||||||
if (m_app.SceneManager.TryGetScene(regionID, out RebootedScene))
|
if (m_app.SceneManager.TryGetScene(regionID, out RebootedScene))
|
||||||
{
|
{
|
||||||
|
@ -118,14 +115,14 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
Hashtable requestData = (Hashtable) request.Params[0];
|
Hashtable requestData = (Hashtable) request.Params[0];
|
||||||
|
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
if (requiredPassword != "" && (!requestData.Contains("password") || (string)requestData["password"] != requiredPassword))
|
if (requiredPassword != "" &&
|
||||||
|
(!requestData.Contains("password") || (string) requestData["password"] != requiredPassword))
|
||||||
{
|
{
|
||||||
responseData["accepted"] = "false";
|
responseData["accepted"] = "false";
|
||||||
response.Value = responseData;
|
response.Value = responseData;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
string message = (string) requestData["message"];
|
string message = (string) requestData["message"];
|
||||||
MainLog.Instance.Verbose("RADMIN", "Broadcasting: " + message);
|
MainLog.Instance.Verbose("RADMIN", "Broadcasting: " + message);
|
||||||
|
|
||||||
|
@ -144,7 +141,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable requestData = (Hashtable) request.Params[0];
|
Hashtable requestData = (Hashtable) request.Params[0];
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
if (requiredPassword != "" && (!requestData.Contains("password") || (string)requestData["password"] != requiredPassword))
|
if (requiredPassword != "" &&
|
||||||
|
(!requestData.Contains("password") || (string) requestData["password"] != requiredPassword))
|
||||||
{
|
{
|
||||||
responseData["accepted"] = "false";
|
responseData["accepted"] = "false";
|
||||||
response.Value = responseData;
|
response.Value = responseData;
|
||||||
|
@ -199,7 +197,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable requestData = (Hashtable) request.Params[0];
|
Hashtable requestData = (Hashtable) request.Params[0];
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
if (requiredPassword != "" && (!requestData.Contains("password") || (string)requestData["password"] != requiredPassword))
|
if (requiredPassword != "" &&
|
||||||
|
(!requestData.Contains("password") || (string) requestData["password"] != requiredPassword))
|
||||||
{
|
{
|
||||||
responseData["created"] = "false";
|
responseData["created"] = "false";
|
||||||
response.Value = responseData;
|
response.Value = responseData;
|
||||||
|
@ -245,7 +244,6 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -35,6 +35,7 @@ namespace OpenSim.Framework
|
||||||
public AgentCircuitData()
|
public AgentCircuitData()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public AgentCircuitData(sAgentCircuitData cAgent)
|
public AgentCircuitData(sAgentCircuitData cAgent)
|
||||||
{
|
{
|
||||||
AgentID = new LLUUID(cAgent.AgentID);
|
AgentID = new LLUUID(cAgent.AgentID);
|
||||||
|
@ -69,6 +70,7 @@ namespace OpenSim.Framework
|
||||||
public sAgentCircuitData()
|
public sAgentCircuitData()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public sAgentCircuitData(AgentCircuitData cAgent)
|
public sAgentCircuitData(AgentCircuitData cAgent)
|
||||||
{
|
{
|
||||||
AgentID = cAgent.AgentID.UUID;
|
AgentID = cAgent.AgentID.UUID;
|
||||||
|
@ -85,6 +87,7 @@ namespace OpenSim.Framework
|
||||||
BaseFolder = cAgent.BaseFolder.UUID;
|
BaseFolder = cAgent.BaseFolder.UUID;
|
||||||
CapsPath = cAgent.CapsPath;
|
CapsPath = cAgent.CapsPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Guid AgentID;
|
public Guid AgentID;
|
||||||
public Guid SessionID;
|
public Guid SessionID;
|
||||||
public Guid SecureSessionID;
|
public Guid SecureSessionID;
|
||||||
|
@ -98,8 +101,5 @@ namespace OpenSim.Framework
|
||||||
public Guid InventoryFolder;
|
public Guid InventoryFolder;
|
||||||
public Guid BaseFolder;
|
public Guid BaseFolder;
|
||||||
public string CapsPath = "";
|
public string CapsPath = "";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -27,8 +27,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
|
@ -37,8 +35,8 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public ChildAgentDataUpdate()
|
public ChildAgentDataUpdate()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public sLLVector3 Position;
|
public sLLVector3 Position;
|
||||||
public ulong regionHandle;
|
public ulong regionHandle;
|
||||||
public float drawdistance;
|
public float drawdistance;
|
||||||
|
|
|
@ -26,9 +26,11 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
|
@ -40,7 +42,6 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public void ForEachClient(ForEachClientDelegate whatToDo)
|
public void ForEachClient(ForEachClientDelegate whatToDo)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Wasteful, I know
|
// Wasteful, I know
|
||||||
IClientAPI[] LocalClients = new IClientAPI[0];
|
IClientAPI[] LocalClients = new IClientAPI[0];
|
||||||
lock (m_clients)
|
lock (m_clients)
|
||||||
|
@ -55,9 +56,11 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
whatToDo(LocalClients[i]);
|
whatToDo(LocalClients[i]);
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
OpenSim.Framework.Console.MainLog.Instance.Warn("CLIENT", "Unable to do ForEachClient for one of the clients" + "\n Reason: " + e.ToString());
|
MainLog.Instance.Warn("CLIENT",
|
||||||
|
"Unable to do ForEachClient for one of the clients" + "\n Reason: " +
|
||||||
|
e.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,20 +110,19 @@ namespace OpenSim.Framework
|
||||||
IClientAPI client;
|
IClientAPI client;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_clients.TryGetValue(circuits[i], out client))
|
if (m_clients.TryGetValue(circuits[i], out client))
|
||||||
{
|
{
|
||||||
Remove(client.CircuitCode);
|
Remove(client.CircuitCode);
|
||||||
client.Close(false);
|
client.Close(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
OpenSim.Framework.Console.MainLog.Instance.Error("CLIENT", "Unable to shutdown circuit for: " + agentId.ToString() + "\n Reason: " + e.ToString());
|
MainLog.Instance.Error("CLIENT",
|
||||||
|
"Unable to shutdown circuit for: " + agentId.ToString() + "\n Reason: " +
|
||||||
|
e.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private uint[] GetAllCircuits(LLUUID agentId)
|
private uint[] GetAllCircuits(LLUUID agentId)
|
||||||
|
@ -168,7 +170,6 @@ namespace OpenSim.Framework
|
||||||
packet.AgentData.SessionID = LocalClients[i].SessionId;
|
packet.AgentData.SessionID = LocalClients[i].SessionId;
|
||||||
LocalClients[i].OutPacket(packet, ThrottleOutPacketType.Task);
|
LocalClients[i].OutPacket(packet, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
|
@ -195,8 +194,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
{
|
{
|
||||||
return asset;
|
return asset;
|
||||||
}
|
}
|
||||||
}
|
} while (--maxPolls > 0);
|
||||||
while (--maxPolls > 0);
|
|
||||||
|
|
||||||
MainLog.Instance.Warn(
|
MainLog.Instance.Warn(
|
||||||
"ASSETCACHE", "Asset {0} was not received before the retrieval timeout was reached");
|
"ASSETCACHE", "Asset {0} was not received before the retrieval timeout was reached");
|
||||||
|
@ -374,6 +372,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
|
|
||||||
return numPackets;
|
return numPackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Assets
|
#region Assets
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -312,6 +312,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Nested Classes currently not in use (waiting for them to be enabled)
|
#region Nested Classes currently not in use (waiting for them to be enabled)
|
||||||
|
|
||||||
public class AssetCapsUploader
|
public class AssetCapsUploader
|
||||||
{
|
{
|
||||||
// Fields
|
// Fields
|
||||||
|
@ -424,6 +425,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -27,10 +27,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using libsecondlife;
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
|
|
||||||
|
@ -81,7 +79,6 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override void UpdateAsset(AssetBase asset)
|
public override void UpdateAsset(AssetBase asset)
|
||||||
{
|
{
|
||||||
throw new Exception("The method or operation is not implemented.");
|
throw new Exception("The method or operation is not implemented.");
|
||||||
|
@ -119,8 +116,6 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
throw new Exception("The method or operation is not implemented.");
|
throw new Exception("The method or operation is not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -81,28 +81,41 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
|
|
||||||
private void CreateLibraryItems()
|
private void CreateLibraryItems()
|
||||||
{
|
{
|
||||||
InventoryItemBase item = CreateItem(new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"), new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape", (int)AssetType.Bodypart, (int)InventoryType.Wearable, folderID);
|
InventoryItemBase item =
|
||||||
|
CreateItem(new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"),
|
||||||
|
new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape",
|
||||||
|
(int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID);
|
||||||
item.inventoryCurrentPermissions = 0;
|
item.inventoryCurrentPermissions = 0;
|
||||||
item.inventoryNextPermissions = 0;
|
item.inventoryNextPermissions = 0;
|
||||||
Items.Add(item.inventoryID, item);
|
Items.Add(item.inventoryID, item);
|
||||||
|
|
||||||
item = CreateItem(new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"), new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin", (int)AssetType.Bodypart, (int)InventoryType.Wearable, folderID);
|
item =
|
||||||
|
CreateItem(new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"),
|
||||||
|
new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin",
|
||||||
|
(int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID);
|
||||||
item.inventoryCurrentPermissions = 0;
|
item.inventoryCurrentPermissions = 0;
|
||||||
item.inventoryNextPermissions = 0;
|
item.inventoryNextPermissions = 0;
|
||||||
Items.Add(item.inventoryID, item);
|
Items.Add(item.inventoryID, item);
|
||||||
|
|
||||||
item = CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"), new LLUUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt", (int)AssetType.Clothing, (int)InventoryType.Wearable, folderID);
|
item =
|
||||||
|
CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"),
|
||||||
|
new LLUUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt",
|
||||||
|
(int) AssetType.Clothing, (int) InventoryType.Wearable, folderID);
|
||||||
item.inventoryCurrentPermissions = 0;
|
item.inventoryCurrentPermissions = 0;
|
||||||
item.inventoryNextPermissions = 0;
|
item.inventoryNextPermissions = 0;
|
||||||
Items.Add(item.inventoryID, item);
|
Items.Add(item.inventoryID, item);
|
||||||
|
|
||||||
item = CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"), new LLUUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants", (int)AssetType.Clothing, (int)InventoryType.Wearable, folderID);
|
item =
|
||||||
|
CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"),
|
||||||
|
new LLUUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants",
|
||||||
|
(int) AssetType.Clothing, (int) InventoryType.Wearable, folderID);
|
||||||
item.inventoryCurrentPermissions = 0;
|
item.inventoryCurrentPermissions = 0;
|
||||||
item.inventoryNextPermissions = 0;
|
item.inventoryNextPermissions = 0;
|
||||||
Items.Add(item.inventoryID, item);
|
Items.Add(item.inventoryID, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public InventoryItemBase CreateItem(LLUUID inventoryID, LLUUID assetID, string name, string description, int assetType, int invType, LLUUID parentFolderID)
|
public InventoryItemBase CreateItem(LLUUID inventoryID, LLUUID assetID, string name, string description,
|
||||||
|
int assetType, int invType, LLUUID parentFolderID)
|
||||||
{
|
{
|
||||||
InventoryItemBase item = new InventoryItemBase();
|
InventoryItemBase item = new InventoryItemBase();
|
||||||
item.avatarID = libOwner;
|
item.avatarID = libOwner;
|
||||||
|
|
|
@ -130,7 +130,8 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID)
|
public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name,
|
||||||
|
LLUUID parentID)
|
||||||
{
|
{
|
||||||
CachedUserInfo userProfile;
|
CachedUserInfo userProfile;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -28,12 +28,12 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Globalization;
|
||||||
using System.Xml;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using libsecondlife;
|
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Xml;
|
||||||
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,9 @@ namespace OpenSim.Region.Capabilities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LLSDParseException : Exception
|
public class LLSDParseException : Exception
|
||||||
{
|
{
|
||||||
public LLSDParseException(string message) : base(message) { }
|
public LLSDParseException(string message) : base(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -55,7 +57,9 @@ namespace OpenSim.Region.Capabilities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LLSDSerializeException : Exception
|
public class LLSDSerializeException : Exception
|
||||||
{
|
{
|
||||||
public LLSDSerializeException(string message) : base(message) { }
|
public LLSDSerializeException(string message) : base(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -557,7 +561,7 @@ namespace OpenSim.Region.Capabilities
|
||||||
double value;
|
double value;
|
||||||
endPos = FindEnd(llsd, 1);
|
endPos = FindEnd(llsd, 1);
|
||||||
|
|
||||||
if (Double.TryParse(llsd.Substring(1, endPos - 1), System.Globalization.NumberStyles.Float,
|
if (Double.TryParse(llsd.Substring(1, endPos - 1), NumberStyles.Float,
|
||||||
Helpers.EnUsCulture.NumberFormat, out value))
|
Helpers.EnUsCulture.NumberFormat, out value))
|
||||||
return value;
|
return value;
|
||||||
else
|
else
|
||||||
|
|
|
@ -30,7 +30,6 @@ using System.Collections;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using libsecondlife;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,9 +29,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using libsecondlife;
|
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using System.Xml;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
using System.Collections.Generic;
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
|
|
||||||
|
@ -173,6 +173,7 @@ namespace OpenSim.Framework.Communications
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query)
|
public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query)
|
||||||
{
|
{
|
||||||
List<AvatarPickerAvatar> pickerlist = m_userService.GenerateAgentPickerRequestResponse(queryID, query);
|
List<AvatarPickerAvatar> pickerlist = m_userService.GenerateAgentPickerRequestResponse(queryID, query);
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications
|
namespace OpenSim.Framework.Communications
|
||||||
|
@ -39,6 +38,5 @@ namespace OpenSim.Framework.Communications
|
||||||
RegionInfo RequestNeighbourInfo(ulong regionHandle);
|
RegionInfo RequestNeighbourInfo(ulong regionHandle);
|
||||||
Dictionary<string, string> GetGridSettings();
|
Dictionary<string, string> GetGridSettings();
|
||||||
List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
|
List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -31,7 +31,6 @@ namespace OpenSim.Framework.Communications
|
||||||
{
|
{
|
||||||
public interface IInterRegionCommunications
|
public interface IInterRegionCommunications
|
||||||
{
|
{
|
||||||
|
|
||||||
string rdebugRegionName { get; set; }
|
string rdebugRegionName { get; set; }
|
||||||
bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData);
|
bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData);
|
||||||
bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData);
|
bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData);
|
||||||
|
@ -45,6 +44,5 @@ namespace OpenSim.Framework.Communications
|
||||||
bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primID);
|
bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primID);
|
||||||
|
|
||||||
void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID);
|
void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -30,7 +30,6 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications
|
namespace OpenSim.Framework.Communications
|
||||||
|
|
|
@ -111,7 +111,6 @@ namespace OpenSim.Framework.UserManagement
|
||||||
|
|
||||||
// Reject the login
|
// Reject the login
|
||||||
return logResponse.CreateAlreadyLoggedInResponse();
|
return logResponse.CreateAlreadyLoggedInResponse();
|
||||||
|
|
||||||
}
|
}
|
||||||
// Otherwise...
|
// Otherwise...
|
||||||
// Create a new agent session
|
// Create a new agent session
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
@ -112,11 +111,11 @@ namespace OpenSim.Framework.UserManagement
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
pickerlist = plugin.Value.GeneratePickerResults(queryID, query);
|
pickerlist = plugin.Value.GeneratePickerResults(queryID, query);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("USERSTORAGE", "Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")");
|
MainLog.Instance.Verbose("USERSTORAGE",
|
||||||
|
"Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")");
|
||||||
return new List<AvatarPickerAvatar>();
|
return new List<AvatarPickerAvatar>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -162,7 +161,8 @@ namespace OpenSim.Framework.UserManagement
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("USERSTORAGE", "Unable to set user via " + plugin.Key + "(" + e.ToString() + ")");
|
MainLog.Instance.Verbose("USERSTORAGE",
|
||||||
|
"Unable to set user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,8 @@ namespace OpenSim.Framework.UserManagement
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("USERSTORAGE", "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
MainLog.Instance.Verbose("USERSTORAGE",
|
||||||
|
"Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +211,8 @@ namespace OpenSim.Framework.UserManagement
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("USERSTORAGE", "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
MainLog.Instance.Verbose("USERSTORAGE",
|
||||||
|
"Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,7 +244,8 @@ namespace OpenSim.Framework.UserManagement
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("USERSTORAGE", "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
MainLog.Instance.Verbose("USERSTORAGE",
|
||||||
|
"Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,7 +359,8 @@ namespace OpenSim.Framework.UserManagement
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("USERSTORAGE", "Unable to add user via " + plugin.Key + "(" + e.ToString() + ")");
|
MainLog.Instance.Verbose("USERSTORAGE",
|
||||||
|
"Unable to add user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -365,6 +369,6 @@ namespace OpenSim.Framework.UserManagement
|
||||||
|
|
||||||
public abstract UserProfileData SetupMasterUser(string firstName, string lastName);
|
public abstract UserProfileData SetupMasterUser(string firstName, string lastName);
|
||||||
public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password);
|
public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password);
|
||||||
public abstract UserProfileData SetupMasterUser(libsecondlife.LLUUID uuid);
|
public abstract UserProfileData SetupMasterUser(LLUUID uuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -27,24 +27,20 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
|
||||||
using System.Net;
|
|
||||||
using System.Xml;
|
|
||||||
|
|
||||||
using libsecondlife;
|
|
||||||
|
|
||||||
using OpenSim.Framework.Console;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Net;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Xml;
|
||||||
|
using libsecondlife;
|
||||||
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public class ConfigurationMember
|
public class ConfigurationMember
|
||||||
{
|
{
|
||||||
public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result);
|
public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result);
|
||||||
|
|
||||||
public delegate void ConfigurationOptionsLoad();
|
public delegate void ConfigurationOptionsLoad();
|
||||||
|
|
||||||
private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>();
|
private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>();
|
||||||
|
@ -55,29 +51,36 @@ namespace OpenSim.Framework
|
||||||
private ConfigurationOptionResult resultFunction;
|
private ConfigurationOptionResult resultFunction;
|
||||||
|
|
||||||
private IGenericConfig configurationPlugin = null;
|
private IGenericConfig configurationPlugin = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the default configuration DLL loaded
|
/// This is the default configuration DLL loaded
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll";
|
private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll";
|
||||||
public ConfigurationMember(string configuration_filename, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function)
|
|
||||||
|
public ConfigurationMember(string configuration_filename, string configuration_description,
|
||||||
|
ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function)
|
||||||
{
|
{
|
||||||
this.configurationFilename = configuration_filename;
|
configurationFilename = configuration_filename;
|
||||||
this.configurationDescription = configuration_description;
|
configurationDescription = configuration_description;
|
||||||
this.loadFunction = load_function;
|
loadFunction = load_function;
|
||||||
this.resultFunction = result_function;
|
resultFunction = result_function;
|
||||||
}
|
}
|
||||||
public ConfigurationMember(XmlNode configuration_xml, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function)
|
|
||||||
|
public ConfigurationMember(XmlNode configuration_xml, string configuration_description,
|
||||||
|
ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function)
|
||||||
{
|
{
|
||||||
this.configurationFilename = "";
|
configurationFilename = "";
|
||||||
this.configurationFromXMLNode = configuration_xml;
|
configurationFromXMLNode = configuration_xml;
|
||||||
this.configurationDescription = configuration_description;
|
configurationDescription = configuration_description;
|
||||||
this.loadFunction = load_function;
|
loadFunction = load_function;
|
||||||
this.resultFunction = result_function;
|
resultFunction = result_function;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConfigurationFilename(string filename)
|
public void setConfigurationFilename(string filename)
|
||||||
{
|
{
|
||||||
configurationFilename = filename;
|
configurationFilename = filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConfigurationDescription(string desc)
|
public void setConfigurationDescription(string desc)
|
||||||
{
|
{
|
||||||
configurationDescription = desc;
|
configurationDescription = desc;
|
||||||
|
@ -92,9 +95,11 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
configurationPluginFilename = dll_filename;
|
configurationPluginFilename = dll_filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkAndAddConfigOption(ConfigurationOption option)
|
private void checkAndAddConfigOption(ConfigurationOption option)
|
||||||
{
|
{
|
||||||
if ((option.configurationKey != "" && option.configurationQuestion != "") || (option.configurationKey != "" && option.configurationUseDefaultNoPrompt))
|
if ((option.configurationKey != "" && option.configurationQuestion != "") ||
|
||||||
|
(option.configurationKey != "" && option.configurationUseDefaultNoPrompt))
|
||||||
{
|
{
|
||||||
if (!configurationOptions.Contains(option))
|
if (!configurationOptions.Contains(option))
|
||||||
{
|
{
|
||||||
|
@ -103,11 +108,16 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Notice("Required fields for adding a configuration option is invalid. Will not add this option (" + option.configurationKey + ")");
|
MainLog.Instance.Notice(
|
||||||
|
"Required fields for adding a configuration option is invalid. Will not add this option (" +
|
||||||
|
option.configurationKey + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt)
|
public void addConfigurationOption(string configuration_key,
|
||||||
|
ConfigurationOption.ConfigurationTypes configuration_type,
|
||||||
|
string configuration_question, string configuration_default,
|
||||||
|
bool use_default_no_prompt)
|
||||||
{
|
{
|
||||||
ConfigurationOption configOption = new ConfigurationOption();
|
ConfigurationOption configOption = new ConfigurationOption();
|
||||||
configOption.configurationKey = configuration_key;
|
configOption.configurationKey = configuration_key;
|
||||||
|
@ -119,7 +129,11 @@ namespace OpenSim.Framework
|
||||||
checkAndAddConfigOption(configOption);
|
checkAndAddConfigOption(configOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt, ConfigurationOption.ConfigurationOptionShouldBeAsked shouldIBeAskedDelegate)
|
public void addConfigurationOption(string configuration_key,
|
||||||
|
ConfigurationOption.ConfigurationTypes configuration_type,
|
||||||
|
string configuration_question, string configuration_default,
|
||||||
|
bool use_default_no_prompt,
|
||||||
|
ConfigurationOption.ConfigurationOptionShouldBeAsked shouldIBeAskedDelegate)
|
||||||
{
|
{
|
||||||
ConfigurationOption configOption = new ConfigurationOption();
|
ConfigurationOption configOption = new ConfigurationOption();
|
||||||
configOption.configurationKey = configuration_key;
|
configOption.configurationKey = configuration_key;
|
||||||
|
@ -133,26 +147,30 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public void performConfigurationRetrieve()
|
public void performConfigurationRetrieve()
|
||||||
{
|
{
|
||||||
configurationPlugin = this.LoadConfigDll(configurationPluginFilename);
|
configurationPlugin = LoadConfigDll(configurationPluginFilename);
|
||||||
configurationOptions.Clear();
|
configurationOptions.Clear();
|
||||||
if (loadFunction == null)
|
if (loadFunction == null)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Load Function for '" + this.configurationDescription + "' is null. Refusing to run configuration.");
|
MainLog.Instance.Error("Load Function for '" + configurationDescription +
|
||||||
|
"' is null. Refusing to run configuration.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resultFunction == null)
|
if (resultFunction == null)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Result Function for '" + this.configurationDescription + "' is null. Refusing to run configuration.");
|
MainLog.Instance.Error("Result Function for '" + configurationDescription +
|
||||||
|
"' is null. Refusing to run configuration.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainLog.Instance.Verbose("CONFIG", "Calling Configuration Load Function...");
|
MainLog.Instance.Verbose("CONFIG", "Calling Configuration Load Function...");
|
||||||
this.loadFunction();
|
loadFunction();
|
||||||
|
|
||||||
if (configurationOptions.Count <= 0)
|
if (configurationOptions.Count <= 0)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("CONFIG", "No configuration options were specified for '" + this.configurationOptions + "'. Refusing to continue configuration.");
|
MainLog.Instance.Error("CONFIG",
|
||||||
|
"No configuration options were specified for '" + configurationOptions +
|
||||||
|
"'. Refusing to continue configuration.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +197,7 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (this.configurationFromXMLNode != null)
|
if (configurationFromXMLNode != null)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Notice("Loading from XML Node, will not save to the file");
|
MainLog.Instance.Notice("Loading from XML Node, will not save to the file");
|
||||||
configurationPlugin.LoadDataFromString(configurationFromXMLNode.OuterXml);
|
configurationPlugin.LoadDataFromString(configurationFromXMLNode.OuterXml);
|
||||||
|
@ -219,15 +237,22 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((configOption.shouldIBeAsked != null && configOption.shouldIBeAsked(configOption.configurationKey)) || configOption.shouldIBeAsked == null)
|
if ((configOption.shouldIBeAsked != null &&
|
||||||
|
configOption.shouldIBeAsked(configOption.configurationKey)) ||
|
||||||
|
configOption.shouldIBeAsked == null)
|
||||||
{
|
{
|
||||||
if (configurationDescription.Trim() != "")
|
if (configurationDescription.Trim() != "")
|
||||||
{
|
{
|
||||||
console_result = MainLog.Instance.CmdPrompt(configurationDescription + ": " + configOption.configurationQuestion, configOption.configurationDefault);
|
console_result =
|
||||||
|
MainLog.Instance.CmdPrompt(
|
||||||
|
configurationDescription + ": " + configOption.configurationQuestion,
|
||||||
|
configOption.configurationDefault);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
console_result = MainLog.Instance.CmdPrompt(configOption.configurationQuestion, configOption.configurationDefault);
|
console_result =
|
||||||
|
MainLog.Instance.CmdPrompt(configOption.configurationQuestion,
|
||||||
|
configOption.configurationDefault);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -366,7 +391,9 @@ namespace OpenSim.Framework
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT:
|
case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT:
|
||||||
float floatResult;
|
float floatResult;
|
||||||
if (float.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out floatResult))
|
if (
|
||||||
|
float.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo,
|
||||||
|
out floatResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = floatResult;
|
return_result = floatResult;
|
||||||
|
@ -375,7 +402,9 @@ namespace OpenSim.Framework
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE:
|
case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE:
|
||||||
double doubleResult;
|
double doubleResult;
|
||||||
if (Double.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out doubleResult))
|
if (
|
||||||
|
Double.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo,
|
||||||
|
out doubleResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = doubleResult;
|
return_result = doubleResult;
|
||||||
|
@ -391,9 +420,10 @@ namespace OpenSim.Framework
|
||||||
configurationPlugin.SetAttribute(configOption.configurationKey, console_result);
|
configurationPlugin.SetAttribute(configOption.configurationKey, console_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.resultFunction(configOption.configurationKey, return_result))
|
if (!resultFunction(configOption.configurationKey, return_result))
|
||||||
{
|
{
|
||||||
Console.MainLog.Instance.Notice("The handler for the last configuration option denied that input, please try again.");
|
MainLog.Instance.Notice(
|
||||||
|
"The handler for the last configuration option denied that input, please try again.");
|
||||||
convertSuccess = false;
|
convertSuccess = false;
|
||||||
ignoreNextFromConfig = true;
|
ignoreNextFromConfig = true;
|
||||||
}
|
}
|
||||||
|
@ -402,12 +432,20 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
if (configOption.configurationUseDefaultNoPrompt)
|
if (configOption.configurationUseDefaultNoPrompt)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("CONFIG", string.Format("[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n", configOption.configurationKey, console_result, errorMessage, configurationFilename));
|
MainLog.Instance.Error("CONFIG",
|
||||||
|
string.Format(
|
||||||
|
"[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n",
|
||||||
|
configOption.configurationKey, console_result, errorMessage,
|
||||||
|
configurationFilename));
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("CONFIG", string.Format("[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n", configOption.configurationKey, console_result, errorMessage, configurationFilename));
|
MainLog.Instance.Warn("CONFIG",
|
||||||
|
string.Format(
|
||||||
|
"[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n",
|
||||||
|
configOption.configurationKey, console_result, errorMessage,
|
||||||
|
configurationFilename));
|
||||||
ignoreNextFromConfig = true;
|
ignoreNextFromConfig = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -436,7 +474,8 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
if (typeInterface != null)
|
if (typeInterface != null)
|
||||||
{
|
{
|
||||||
plug = (IGenericConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
plug =
|
||||||
|
(IGenericConfig) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -448,10 +487,10 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public void forceSetConfigurationOption(string configuration_key, string configuration_value)
|
public void forceSetConfigurationOption(string configuration_key, string configuration_value)
|
||||||
{
|
{
|
||||||
this.configurationPlugin.LoadData();
|
configurationPlugin.LoadData();
|
||||||
this.configurationPlugin.SetAttribute(configuration_key, configuration_value);
|
configurationPlugin.SetAttribute(configuration_key, configuration_value);
|
||||||
this.configurationPlugin.Commit();
|
configurationPlugin.Commit();
|
||||||
this.configurationPlugin.Close();
|
configurationPlugin.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -30,7 +30,6 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public class ConfigurationOption
|
public class ConfigurationOption
|
||||||
{
|
{
|
||||||
|
|
||||||
public delegate bool ConfigurationOptionShouldBeAsked(string configuration_key);
|
public delegate bool ConfigurationOptionShouldBeAsked(string configuration_key);
|
||||||
|
|
||||||
public enum ConfigurationTypes
|
public enum ConfigurationTypes
|
||||||
|
|
|
@ -248,7 +248,7 @@ namespace OpenSim.Framework.Console
|
||||||
// Some older systems dont support coloured text.
|
// Some older systems dont support coloured text.
|
||||||
System.Console.WriteLine(format, args);
|
System.Console.WriteLine(format, args);
|
||||||
}
|
}
|
||||||
catch (System.FormatException)
|
catch (FormatException)
|
||||||
{
|
{
|
||||||
// Some older systems dont support coloured text.
|
// Some older systems dont support coloured text.
|
||||||
System.Console.WriteLine(args);
|
System.Console.WriteLine(args);
|
||||||
|
|
|
@ -140,16 +140,17 @@ namespace OpenSim.Framework.Data.DB4o
|
||||||
{
|
{
|
||||||
manager = null;
|
manager = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// // Returns a list of avatar and UUIDs that match the query
|
/// // Returns a list of avatar and UUIDs that match the query
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
||||||
{
|
{
|
||||||
//Do nothing yet
|
//Do nothing yet
|
||||||
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
|
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
|
||||||
return returnlist;
|
return returnlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the providers name
|
/// Returns the providers name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Data.DB4o
|
namespace OpenSim.Framework.Data.DB4o
|
||||||
|
@ -132,12 +132,14 @@ namespace OpenSim.Framework.Data.DB4o
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public List<OpenSim.Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
|
||||||
|
public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
||||||
{
|
{
|
||||||
//Do nothing yet
|
//Do nothing yet
|
||||||
List<OpenSim.Framework.AvatarPickerAvatar> returnlist = new List<OpenSim.Framework.AvatarPickerAvatar>();
|
List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>();
|
||||||
return returnlist;
|
return returnlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new user profile
|
/// Creates a new user profile
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -27,18 +27,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Data;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Data.MSSQL
|
namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
class MSSQLAssetData : IAssetProvider
|
internal class MSSQLAssetData : IAssetProvider
|
||||||
{
|
{
|
||||||
MSSQLManager database;
|
private MSSQLManager database;
|
||||||
|
|
||||||
#region IAssetProvider Members
|
#region IAssetProvider Members
|
||||||
|
|
||||||
private void UpgradeAssetsTable(string tableName)
|
private void UpgradeAssetsTable(string tableName)
|
||||||
|
@ -57,14 +57,12 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void TestTables()
|
private void TestTables()
|
||||||
{
|
{
|
||||||
|
|
||||||
Dictionary<string, string> tableList = new Dictionary<string, string>();
|
Dictionary<string, string> tableList = new Dictionary<string, string>();
|
||||||
|
|
||||||
tableList["assets"] = null;
|
tableList["assets"] = null;
|
||||||
database.GetTableVersion(tableList);
|
database.GetTableVersion(tableList);
|
||||||
|
|
||||||
UpgradeAssetsTable(tableList["assets"]);
|
UpgradeAssetsTable(tableList["assets"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AssetBase FetchAsset(LLUUID assetID)
|
public AssetBase FetchAsset(LLUUID assetID)
|
||||||
|
@ -86,14 +84,12 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
|
|
||||||
public void CreateAsset(AssetBase asset)
|
public void CreateAsset(AssetBase asset)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (ExistsAsset((LLUUID) asset.FullID))
|
if (ExistsAsset((LLUUID) asset.FullID))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SqlCommand cmd =
|
SqlCommand cmd =
|
||||||
new SqlCommand(
|
new SqlCommand(
|
||||||
"INSERT INTO assets ([id], [name], [description], [assetType], [invType], [local], [temporary], [data])" +
|
"INSERT INTO assets ([id], [name], [description], [assetType], [invType], [local], [temporary], [data])" +
|
||||||
|
@ -103,7 +99,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
|
|
||||||
using (cmd)
|
using (cmd)
|
||||||
{
|
{
|
||||||
|
|
||||||
//SqlParameter p = cmd.Parameters.Add("id", SqlDbType.NVarChar);
|
//SqlParameter p = cmd.Parameters.Add("id", SqlDbType.NVarChar);
|
||||||
//p.Value = asset.FullID.ToString();
|
//p.Value = asset.FullID.ToString();
|
||||||
cmd.Parameters.AddWithValue("id", asset.FullID.ToString());
|
cmd.Parameters.AddWithValue("id", asset.FullID.ToString());
|
||||||
|
@ -130,7 +125,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
|
|
||||||
cmd.Dispose();
|
cmd.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -172,12 +166,12 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error(e.ToString());
|
MainLog.Instance.Error(e.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ExistsAsset(LLUUID uuid)
|
public bool ExistsAsset(LLUUID uuid)
|
||||||
{
|
{
|
||||||
if (FetchAsset(uuid) != null) {
|
if (FetchAsset(uuid) != null)
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -194,11 +188,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
|
|
||||||
#region IPlugin Members
|
#region IPlugin Members
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void Initialise()
|
public void Initialise()
|
||||||
{
|
{
|
||||||
|
|
||||||
IniFile GridDataMySqlFile = new IniFile("mssql_connection.ini");
|
IniFile GridDataMySqlFile = new IniFile("mssql_connection.ini");
|
||||||
string settingDataSource = GridDataMySqlFile.ParseFileReadValue("data_source");
|
string settingDataSource = GridDataMySqlFile.ParseFileReadValue("data_source");
|
||||||
string settingInitialCatalog = GridDataMySqlFile.ParseFileReadValue("initial_catalog");
|
string settingInitialCatalog = GridDataMySqlFile.ParseFileReadValue("initial_catalog");
|
||||||
|
@ -206,7 +197,9 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id");
|
string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id");
|
||||||
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
||||||
|
|
||||||
this.database = new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, settingPassword);
|
database =
|
||||||
|
new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId,
|
||||||
|
settingPassword);
|
||||||
|
|
||||||
TestTables();
|
TestTables();
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,8 +57,9 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id");
|
string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id");
|
||||||
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
||||||
|
|
||||||
database = new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, settingPassword);
|
database =
|
||||||
|
new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId,
|
||||||
|
settingPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -120,14 +121,13 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
|
||||||
return row;
|
return row;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
if (reader != null) {
|
if (reader != null)
|
||||||
|
{
|
||||||
reader.Close();
|
reader.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// // Returns a list of avatar and UUIDs that match the query
|
/// // Returns a list of avatar and UUIDs that match the query
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
||||||
{
|
{
|
||||||
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
|
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
|
||||||
|
@ -152,7 +151,9 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
param["second"] = querysplit[1];
|
param["second"] = querysplit[1];
|
||||||
|
|
||||||
IDbCommand result =
|
IDbCommand result =
|
||||||
database.Query("SELECT UUID,username,surname FROM users WHERE username = @first AND lastname = @second", param);
|
database.Query(
|
||||||
|
"SELECT UUID,username,surname FROM users WHERE username = @first AND lastname = @second",
|
||||||
|
param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
|
||||||
|
@ -163,7 +164,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
user.firstName = (string) reader["username"];
|
user.firstName = (string) reader["username"];
|
||||||
user.lastName = (string) reader["surname"];
|
user.lastName = (string) reader["surname"];
|
||||||
returnlist.Add(user);
|
returnlist.Add(user);
|
||||||
|
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
@ -175,13 +175,9 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
MainLog.Instance.Error(e.ToString());
|
MainLog.Instance.Error(e.ToString());
|
||||||
return returnlist;
|
return returnlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (querysplit.Length == 1)
|
else if (querysplit.Length == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
lock (database)
|
lock (database)
|
||||||
|
@ -191,7 +187,9 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
param["second"] = querysplit[1];
|
param["second"] = querysplit[1];
|
||||||
|
|
||||||
IDbCommand result =
|
IDbCommand result =
|
||||||
database.Query("SELECT UUID,username,surname FROM users WHERE username = @first OR lastname = @second", param);
|
database.Query(
|
||||||
|
"SELECT UUID,username,surname FROM users WHERE username = @first OR lastname = @second",
|
||||||
|
param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
|
||||||
|
@ -202,7 +200,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
user.firstName = (string) reader["username"];
|
user.firstName = (string) reader["username"];
|
||||||
user.lastName = (string) reader["surname"];
|
user.lastName = (string) reader["surname"];
|
||||||
returnlist.Add(user);
|
returnlist.Add(user);
|
||||||
|
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
@ -244,7 +241,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <returns>A dataresponse enum indicating success</returns>
|
/// <returns>A dataresponse enum indicating success</returns>
|
||||||
public DataResponse AddProfile(RegionProfileData profile)
|
public DataResponse AddProfile(RegionProfileData profile)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (GetProfileByLLUUID(profile.UUID) != null)
|
if (GetProfileByLLUUID(profile.UUID) != null)
|
||||||
|
|
|
@ -26,10 +26,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Collections.Generic;
|
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
|
@ -57,7 +56,9 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id");
|
string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id");
|
||||||
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
||||||
|
|
||||||
database = new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, settingPassword);
|
database =
|
||||||
|
new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId,
|
||||||
|
settingPassword);
|
||||||
TestTables();
|
TestTables();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +73,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
//database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql");
|
//database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpgradeItemsTable(string tableName)
|
private void UpgradeItemsTable(string tableName)
|
||||||
|
@ -88,7 +88,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
|
|
||||||
private void TestTables()
|
private void TestTables()
|
||||||
{
|
{
|
||||||
|
|
||||||
Dictionary<string, string> tableList = new Dictionary<string, string>();
|
Dictionary<string, string> tableList = new Dictionary<string, string>();
|
||||||
|
|
||||||
tableList["inventoryfolders"] = null;
|
tableList["inventoryfolders"] = null;
|
||||||
|
@ -99,6 +98,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
UpgradeFoldersTable(tableList["inventoryfolders"]);
|
UpgradeFoldersTable(tableList["inventoryfolders"]);
|
||||||
UpgradeItemsTable(tableList["inventoryitems"]);
|
UpgradeItemsTable(tableList["inventoryitems"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -143,7 +143,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
param["parentFolderID"] = folderID.ToString();
|
param["parentFolderID"] = folderID.ToString();
|
||||||
|
|
||||||
IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = @parentFolderID", param);
|
IDbCommand result =
|
||||||
|
database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = @parentFolderID", param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
|
@ -174,12 +175,13 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
lock (database)
|
lock (database)
|
||||||
{
|
{
|
||||||
|
|
||||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
param["uuid"] = user.ToString();
|
param["uuid"] = user.ToString();
|
||||||
param["zero"] = LLUUID.Zero.ToString();
|
param["zero"] = LLUUID.Zero.ToString();
|
||||||
|
|
||||||
IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param);
|
IDbCommand result =
|
||||||
|
database.Query(
|
||||||
|
"SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
List<InventoryFolderBase> items = new List<InventoryFolderBase>();
|
List<InventoryFolderBase> items = new List<InventoryFolderBase>();
|
||||||
|
@ -212,7 +214,9 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
param["uuid"] = user.ToString();
|
param["uuid"] = user.ToString();
|
||||||
param["zero"] = LLUUID.Zero.ToString();
|
param["zero"] = LLUUID.Zero.ToString();
|
||||||
|
|
||||||
IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param);
|
IDbCommand result =
|
||||||
|
database.Query(
|
||||||
|
"SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
List<InventoryFolderBase> items = new List<InventoryFolderBase>();
|
List<InventoryFolderBase> items = new List<InventoryFolderBase>();
|
||||||
|
@ -226,7 +230,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
// nicer to print some message to this effect, but this feels like it's too low a
|
// nicer to print some message to this effect, but this feels like it's too low a
|
||||||
// to put such a message out, and it's too minor right now to spare the time to
|
// to put such a message out, and it's too minor right now to spare the time to
|
||||||
// suitably refactor.
|
// suitably refactor.
|
||||||
if (items.Count > 0) {
|
if (items.Count > 0)
|
||||||
|
{
|
||||||
rootFolder = items[0];
|
rootFolder = items[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,7 +264,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
param["parentFolderID"] = parentID.ToString();
|
param["parentFolderID"] = parentID.ToString();
|
||||||
|
|
||||||
|
|
||||||
IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @parentFolderID", param);
|
IDbCommand result =
|
||||||
|
database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @parentFolderID", param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
List<InventoryFolderBase> items = new List<InventoryFolderBase>();
|
List<InventoryFolderBase> items = new List<InventoryFolderBase>();
|
||||||
|
@ -322,7 +328,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <returns>An inventory item</returns>
|
/// <returns>An inventory item</returns>
|
||||||
public InventoryItemBase getInventoryItem(LLUUID itemID)
|
public InventoryItemBase getInventoryItem(LLUUID itemID)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
lock (database)
|
lock (database)
|
||||||
|
@ -330,7 +335,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
param["inventoryID"] = itemID.ToString();
|
param["inventoryID"] = itemID.ToString();
|
||||||
|
|
||||||
IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = @inventoryID", param);
|
IDbCommand result =
|
||||||
|
database.Query("SELECT * FROM inventoryitems WHERE inventoryID = @inventoryID", param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
InventoryItemBase item = null;
|
InventoryItemBase item = null;
|
||||||
|
@ -418,8 +424,10 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
public void addInventoryItem(InventoryItemBase item)
|
public void addInventoryItem(InventoryItemBase item)
|
||||||
{
|
{
|
||||||
string sql = "INSERT INTO inventoryitems";
|
string sql = "INSERT INTO inventoryitems";
|
||||||
sql += "([inventoryID], [assetID], [assetType], [parentFolderID], [avatarID], [inventoryName], [inventoryDescription], [inventoryNextPermissions], [inventoryCurrentPermissions], [invType], [creatorID], [inventoryBasePermissions], [inventoryEveryOnePermissions]) VALUES ";
|
sql +=
|
||||||
sql += "(@inventoryID, @assetID, @assetType, @parentFolderID, @avatarID, @inventoryName, @inventoryDescription, @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID, @inventoryBasePermissions, @inventoryEveryOnePermissions);";
|
"([inventoryID], [assetID], [assetType], [parentFolderID], [avatarID], [inventoryName], [inventoryDescription], [inventoryNextPermissions], [inventoryCurrentPermissions], [invType], [creatorID], [inventoryBasePermissions], [inventoryEveryOnePermissions]) VALUES ";
|
||||||
|
sql +=
|
||||||
|
"(@inventoryID, @assetID, @assetType, @parentFolderID, @avatarID, @inventoryName, @inventoryDescription, @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID, @inventoryBasePermissions, @inventoryEveryOnePermissions);";
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -441,7 +449,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
IDbCommand result = database.Query(sql, param);
|
IDbCommand result = database.Query(sql, param);
|
||||||
result.ExecuteNonQuery();
|
result.ExecuteNonQuery();
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (SqlException e)
|
catch (SqlException e)
|
||||||
{
|
{
|
||||||
|
@ -506,7 +513,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error(e.ToString());
|
MainLog.Instance.Error(e.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -523,8 +529,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE inventoryID=@uuid", param);
|
IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE inventoryID=@uuid", param);
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
cmd.Dispose();
|
cmd.Dispose();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (SqlException e)
|
catch (SqlException e)
|
||||||
{
|
{
|
||||||
|
@ -539,7 +543,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <param name="folder">Folder to create</param>
|
/// <param name="folder">Folder to create</param>
|
||||||
public void addInventoryFolder(InventoryFolderBase folder)
|
public void addInventoryFolder(InventoryFolderBase folder)
|
||||||
{
|
{
|
||||||
string sql = "INSERT INTO inventoryfolders ([folderID], [agentID], [parentFolderID], [folderName], [type], [version]) VALUES ";
|
string sql =
|
||||||
|
"INSERT INTO inventoryfolders ([folderID], [agentID], [parentFolderID], [folderName], [type], [version]) VALUES ";
|
||||||
sql += "(@folderID, @agentID, @parentFolderID, @folderName, @type, @version);";
|
sql += "(@folderID, @agentID, @parentFolderID, @folderName, @type, @version);";
|
||||||
|
|
||||||
|
|
||||||
|
@ -567,7 +572,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// Updates an inventory folder
|
/// Updates an inventory folder
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="folder">Folder to update</param>
|
/// <param name="folder">Folder to update</param>
|
||||||
|
|
||||||
public void updateInventoryFolder(InventoryFolderBase folder)
|
public void updateInventoryFolder(InventoryFolderBase folder)
|
||||||
{
|
{
|
||||||
SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " +
|
SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " +
|
||||||
|
@ -600,15 +604,12 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error(e.ToString());
|
MainLog.Instance.Error(e.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates an inventory folder
|
/// Updates an inventory folder
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="folder">Folder to update</param>
|
/// <param name="folder">Folder to update</param>
|
||||||
|
|
||||||
public void moveInventoryFolder(InventoryFolderBase folder)
|
public void moveInventoryFolder(InventoryFolderBase folder)
|
||||||
{
|
{
|
||||||
SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " +
|
SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " +
|
||||||
|
@ -629,8 +630,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error(e.ToString());
|
MainLog.Instance.Error(e.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -672,7 +671,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
IDbCommand cmd = database.Query("DELETE FROM inventoryfolders WHERE folderID=@folderID", param);
|
IDbCommand cmd = database.Query("DELETE FROM inventoryfolders WHERE folderID=@folderID", param);
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
cmd.Dispose();
|
cmd.Dispose();
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (SqlException e)
|
catch (SqlException e)
|
||||||
{
|
{
|
||||||
|
@ -689,7 +687,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
param["parentFolderID"] = folderID.ToString();
|
param["parentFolderID"] = folderID.ToString();
|
||||||
|
|
||||||
|
|
||||||
IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", param);
|
IDbCommand cmd =
|
||||||
|
database.Query("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", param);
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
cmd.Dispose();
|
cmd.Dispose();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,14 +25,12 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Data.MSSQL
|
namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An interface to the log database for MySQL
|
/// An interface to the log database for MySQL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class MSSQLLogData : ILogData
|
internal class MSSQLLogData : ILogData
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The database manager
|
/// The database manager
|
||||||
|
@ -51,7 +49,9 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id");
|
string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id");
|
||||||
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
||||||
|
|
||||||
database = new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, settingPassword);
|
database =
|
||||||
|
new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId,
|
||||||
|
settingPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -63,7 +63,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <param name="arguments">The arguments passed to the method</param>
|
/// <param name="arguments">The arguments passed to the method</param>
|
||||||
/// <param name="priority">How critical is this?</param>
|
/// <param name="priority">How critical is this?</param>
|
||||||
/// <param name="logMessage">The message to log</param>
|
/// <param name="logMessage">The message to log</param>
|
||||||
public void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
|
public void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,
|
||||||
|
string logMessage)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
@ -32,7 +33,6 @@ using System.Data.SqlClient;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Data.MSSQL
|
namespace OpenSim.Framework.Data.MSSQL
|
||||||
|
@ -40,12 +40,12 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A management class for the MS SQL Storage Engine
|
/// A management class for the MS SQL Storage Engine
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class MSSQLManager
|
internal class MSSQLManager
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The database connection object
|
/// The database connection object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IDbConnection dbcon;
|
private IDbConnection dbcon;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Connection string for ADO.net
|
/// Connection string for ADO.net
|
||||||
|
@ -60,12 +60,14 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <param name="username">The username logging into the database</param>
|
/// <param name="username">The username logging into the database</param>
|
||||||
/// <param name="password">The password for the user logging in</param>
|
/// <param name="password">The password for the user logging in</param>
|
||||||
/// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
|
/// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
|
||||||
public MSSQLManager(string dataSource, string initialCatalog, string persistSecurityInfo, string userId, string password)
|
public MSSQLManager(string dataSource, string initialCatalog, string persistSecurityInfo, string userId,
|
||||||
|
string password)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
connectionString = "Data Source=" + dataSource + ";Initial Catalog=" + initialCatalog +
|
||||||
connectionString = "Data Source=" + dataSource + ";Initial Catalog=" + initialCatalog + ";Persist Security Info=" + persistSecurityInfo + ";User ID=" + userId + ";Password=" + password+";";
|
";Persist Security Info=" + persistSecurityInfo + ";User ID=" + userId + ";Password=" +
|
||||||
|
password + ";";
|
||||||
dbcon = new SqlConnection(connectionString);
|
dbcon = new SqlConnection(connectionString);
|
||||||
TestTables(dbcon);
|
TestTables(dbcon);
|
||||||
dbcon.Open();
|
dbcon.Open();
|
||||||
|
@ -78,7 +80,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
|
|
||||||
private bool TestTables(IDbConnection conn)
|
private bool TestTables(IDbConnection conn)
|
||||||
{
|
{
|
||||||
IDbCommand cmd = this.Query("SELECT * FROM regions", new Dictionary<string, string>());
|
IDbCommand cmd = Query("SELECT * FROM regions", new Dictionary<string, string>());
|
||||||
//SqlCommand cmd = (SqlCommand)dbcon.CreateCommand();
|
//SqlCommand cmd = (SqlCommand)dbcon.CreateCommand();
|
||||||
//cmd.CommandText = "SELECT * FROM regions";
|
//cmd.CommandText = "SELECT * FROM regions";
|
||||||
try
|
try
|
||||||
|
@ -100,19 +102,19 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
string createRegions = defineTable(createRegionsTable());
|
string createRegions = defineTable(createRegionsTable());
|
||||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
IDbCommand pcmd = this.Query(createRegions, param);
|
IDbCommand pcmd = Query(createRegions, param);
|
||||||
if (conn.State == ConnectionState.Closed) {
|
if (conn.State == ConnectionState.Closed)
|
||||||
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
}
|
}
|
||||||
pcmd.ExecuteNonQuery();
|
pcmd.ExecuteNonQuery();
|
||||||
pcmd.Dispose();
|
pcmd.Dispose();
|
||||||
|
|
||||||
this.ExecuteResourceSql("Mssql-users.sql");
|
ExecuteResourceSql("Mssql-users.sql");
|
||||||
this.ExecuteResourceSql("Mssql-agents.sql");
|
ExecuteResourceSql("Mssql-agents.sql");
|
||||||
this.ExecuteResourceSql("Mssql-logs.sql");
|
ExecuteResourceSql("Mssql-logs.sql");
|
||||||
|
|
||||||
conn.Close();
|
conn.Close();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private DataTable createRegionsTable()
|
private DataTable createRegionsTable()
|
||||||
|
@ -120,17 +122,17 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
DataTable regions = new DataTable("regions");
|
DataTable regions = new DataTable("regions");
|
||||||
|
|
||||||
createCol(regions, "regionHandle", typeof (ulong));
|
createCol(regions, "regionHandle", typeof (ulong));
|
||||||
createCol(regions, "regionName", typeof(System.String));
|
createCol(regions, "regionName", typeof (String));
|
||||||
createCol(regions, "uuid", typeof(System.String));
|
createCol(regions, "uuid", typeof (String));
|
||||||
|
|
||||||
createCol(regions, "regionRecvKey", typeof(System.String));
|
createCol(regions, "regionRecvKey", typeof (String));
|
||||||
createCol(regions, "regionSecret", typeof(System.String));
|
createCol(regions, "regionSecret", typeof (String));
|
||||||
createCol(regions, "regionSendKey", typeof(System.String));
|
createCol(regions, "regionSendKey", typeof (String));
|
||||||
|
|
||||||
createCol(regions, "regionDataURI", typeof(System.String));
|
createCol(regions, "regionDataURI", typeof (String));
|
||||||
createCol(regions, "serverIP", typeof(System.String));
|
createCol(regions, "serverIP", typeof (String));
|
||||||
createCol(regions, "serverPort", typeof(System.String));
|
createCol(regions, "serverPort", typeof (String));
|
||||||
createCol(regions, "serverURI", typeof(System.String));
|
createCol(regions, "serverURI", typeof (String));
|
||||||
|
|
||||||
|
|
||||||
createCol(regions, "locX", typeof (uint));
|
createCol(regions, "locX", typeof (uint));
|
||||||
|
@ -142,16 +144,16 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
createCol(regions, "southOverrideHandle", typeof (ulong));
|
createCol(regions, "southOverrideHandle", typeof (ulong));
|
||||||
createCol(regions, "northOverrideHandle", typeof (ulong));
|
createCol(regions, "northOverrideHandle", typeof (ulong));
|
||||||
|
|
||||||
createCol(regions, "regionAssetURI", typeof(System.String));
|
createCol(regions, "regionAssetURI", typeof (String));
|
||||||
createCol(regions, "regionAssetRecvKey", typeof(System.String));
|
createCol(regions, "regionAssetRecvKey", typeof (String));
|
||||||
createCol(regions, "regionAssetSendKey", typeof(System.String));
|
createCol(regions, "regionAssetSendKey", typeof (String));
|
||||||
|
|
||||||
createCol(regions, "regionUserURI", typeof(System.String));
|
createCol(regions, "regionUserURI", typeof (String));
|
||||||
createCol(regions, "regionUserRecvKey", typeof(System.String));
|
createCol(regions, "regionUserRecvKey", typeof (String));
|
||||||
createCol(regions, "regionUserSendKey", typeof(System.String));
|
createCol(regions, "regionUserSendKey", typeof (String));
|
||||||
|
|
||||||
createCol(regions, "regionMapTexture", typeof(System.String));
|
createCol(regions, "regionMapTexture", typeof (String));
|
||||||
createCol(regions, "serverHttpPort", typeof(System.String));
|
createCol(regions, "serverHttpPort", typeof (String));
|
||||||
createCol(regions, "serverRemotingPort", typeof (uint));
|
createCol(regions, "serverRemotingPort", typeof (uint));
|
||||||
|
|
||||||
// Add in contraints
|
// Add in contraints
|
||||||
|
@ -159,7 +161,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
return regions;
|
return regions;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void createCol(DataTable dt, string name, System.Type type)
|
protected static void createCol(DataTable dt, string name, Type type)
|
||||||
{
|
{
|
||||||
DataColumn col = new DataColumn(name, type);
|
DataColumn col = new DataColumn(name, type);
|
||||||
dt.Columns.Add(col);
|
dt.Columns.Add(col);
|
||||||
|
@ -172,7 +174,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
foreach (DataColumn col in dt.Columns)
|
foreach (DataColumn col in dt.Columns)
|
||||||
{
|
{
|
||||||
if (subsql.Length > 0)
|
if (subsql.Length > 0)
|
||||||
{ // a map function would rock so much here
|
{
|
||||||
|
// a map function would rock so much here
|
||||||
subsql += ",\n";
|
subsql += ",\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,19 +195,19 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
// slightly differently.
|
// slightly differently.
|
||||||
private static string SqlType(Type type)
|
private static string SqlType(Type type)
|
||||||
{
|
{
|
||||||
if (type == typeof(System.String))
|
if (type == typeof (String))
|
||||||
{
|
{
|
||||||
return "varchar(255)";
|
return "varchar(255)";
|
||||||
}
|
}
|
||||||
else if (type == typeof(System.Int32))
|
else if (type == typeof (Int32))
|
||||||
{
|
{
|
||||||
return "integer";
|
return "integer";
|
||||||
}
|
}
|
||||||
else if (type == typeof(System.Double))
|
else if (type == typeof (Double))
|
||||||
{
|
{
|
||||||
return "float";
|
return "float";
|
||||||
}
|
}
|
||||||
else if (type == typeof(System.Byte[]))
|
else if (type == typeof (Byte[]))
|
||||||
{
|
{
|
||||||
return "image";
|
return "image";
|
||||||
}
|
}
|
||||||
|
@ -331,7 +334,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
reader.Close();
|
reader.Close();
|
||||||
throw new Exception("No rows to return");
|
throw new Exception("No rows to return");
|
||||||
|
|
||||||
}
|
}
|
||||||
return regionprofile;
|
return regionprofile;
|
||||||
}
|
}
|
||||||
|
@ -378,7 +380,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
|
|
||||||
retval.profileImage = new LLUUID((string) reader["profileImage"]);
|
retval.profileImage = new LLUUID((string) reader["profileImage"]);
|
||||||
retval.profileFirstImage = new LLUUID((string) reader["profileFirstImage"]);
|
retval.profileFirstImage = new LLUUID((string) reader["profileFirstImage"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -439,7 +440,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false;
|
asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false;
|
||||||
asset.Name = (string) reader["name"];
|
asset.Name = (string) reader["name"];
|
||||||
asset.Type = Convert.ToSByte(reader["assetType"]);
|
asset.Type = Convert.ToSByte(reader["assetType"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -455,15 +455,19 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <returns>Successful?</returns>
|
/// <returns>Successful?</returns>
|
||||||
public bool insertRegionRow(RegionProfileData profile)
|
public bool insertRegionRow(RegionProfileData profile)
|
||||||
{
|
{
|
||||||
|
|
||||||
//Insert new region
|
//Insert new region
|
||||||
string sql = "INSERT INTO regions ([regionHandle], [regionName], [uuid], [regionRecvKey], [regionSecret], [regionSendKey], [regionDataURI], ";
|
string sql =
|
||||||
sql += "[serverIP], [serverPort], [serverURI], [locX], [locY], [locZ], [eastOverrideHandle], [westOverrideHandle], [southOverrideHandle], [northOverrideHandle], [regionAssetURI], [regionAssetRecvKey], ";
|
"INSERT INTO regions ([regionHandle], [regionName], [uuid], [regionRecvKey], [regionSecret], [regionSendKey], [regionDataURI], ";
|
||||||
sql += "[regionAssetSendKey], [regionUserURI], [regionUserRecvKey], [regionUserSendKey], [regionMapTexture], [serverHttpPort], [serverRemotingPort]) VALUES ";
|
sql +=
|
||||||
|
"[serverIP], [serverPort], [serverURI], [locX], [locY], [locZ], [eastOverrideHandle], [westOverrideHandle], [southOverrideHandle], [northOverrideHandle], [regionAssetURI], [regionAssetRecvKey], ";
|
||||||
|
sql +=
|
||||||
|
"[regionAssetSendKey], [regionUserURI], [regionUserRecvKey], [regionUserSendKey], [regionMapTexture], [serverHttpPort], [serverRemotingPort]) VALUES ";
|
||||||
|
|
||||||
sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, ";
|
sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, ";
|
||||||
sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, ";
|
sql +=
|
||||||
sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey, @regionMapTexture, @serverHttpPort, @serverRemotingPort);";
|
"@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, ";
|
||||||
|
sql +=
|
||||||
|
"@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey, @regionMapTexture, @serverHttpPort, @serverRemotingPort);";
|
||||||
|
|
||||||
Dictionary<string, string> parameters = new Dictionary<string, string>();
|
Dictionary<string, string> parameters = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
@ -509,15 +513,12 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("MSSQLManager : " + e.ToString());
|
MainLog.Instance.Error("MSSQLManager : " + e.ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return returnval;
|
return returnval;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Inserts a new row into the log database
|
/// Inserts a new row into the log database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -528,7 +529,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <param name="priority">How critical is this?</param>
|
/// <param name="priority">How critical is this?</param>
|
||||||
/// <param name="logMessage">Extra message info</param>
|
/// <param name="logMessage">Extra message info</param>
|
||||||
/// <returns>Saved successfully?</returns>
|
/// <returns>Saved successfully?</returns>
|
||||||
public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
|
public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority,
|
||||||
|
string logMessage)
|
||||||
{
|
{
|
||||||
string sql = "INSERT INTO logs ([target], [server], [method], [arguments], [priority], [message]) VALUES ";
|
string sql = "INSERT INTO logs ([target], [server], [method], [arguments], [priority], [message]) VALUES ";
|
||||||
sql += "(@target, @server, @method, @arguments, @priority, @message);";
|
sql += "(@target, @server, @method, @arguments, @priority, @message);";
|
||||||
|
@ -588,19 +590,26 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <param name="profileImage">UUID for profile image</param>
|
/// <param name="profileImage">UUID for profile image</param>
|
||||||
/// <param name="firstImage">UUID for firstlife image</param>
|
/// <param name="firstImage">UUID for firstlife image</param>
|
||||||
/// <returns>Success?</returns>
|
/// <returns>Success?</returns>
|
||||||
public bool insertUserRow(libsecondlife.LLUUID uuid, string username, string lastname, string passwordHash, string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
|
public bool insertUserRow(LLUUID uuid, string username, string lastname, string passwordHash,
|
||||||
float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string aboutText, string firstText,
|
string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
|
||||||
libsecondlife.LLUUID profileImage, libsecondlife.LLUUID firstImage)
|
float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
|
||||||
|
string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
|
||||||
|
string aboutText, string firstText,
|
||||||
|
LLUUID profileImage, LLUUID firstImage)
|
||||||
{
|
{
|
||||||
string sql = "INSERT INTO users ";
|
string sql = "INSERT INTO users ";
|
||||||
sql += "([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], ";
|
sql += "([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], ";
|
||||||
sql += "[homeLocationX], [homeLocationY], [homeLocationZ], [homeLookAtX], [homeLookAtY], [homeLookAtZ], [created], ";
|
sql +=
|
||||||
sql += "[lastLogin], [userInventoryURI], [userAssetURI], [profileCanDoMask], [profileWantDoMask], [profileAboutText], ";
|
"[homeLocationX], [homeLocationY], [homeLocationZ], [homeLookAtX], [homeLookAtY], [homeLookAtZ], [created], ";
|
||||||
|
sql +=
|
||||||
|
"[lastLogin], [userInventoryURI], [userAssetURI], [profileCanDoMask], [profileWantDoMask], [profileAboutText], ";
|
||||||
sql += "[profileFirstText], [profileImage], [profileFirstImage]) VALUES ";
|
sql += "[profileFirstText], [profileImage], [profileFirstImage]) VALUES ";
|
||||||
|
|
||||||
sql += "(@UUID, @username, @lastname, @passwordHash, @passwordSalt, @homeRegion, ";
|
sql += "(@UUID, @username, @lastname, @passwordHash, @passwordSalt, @homeRegion, ";
|
||||||
sql += "@homeLocationX, @homeLocationY, @homeLocationZ, @homeLookAtX, @homeLookAtY, @homeLookAtZ, @created, ";
|
sql +=
|
||||||
sql += "@lastLogin, @userInventoryURI, @userAssetURI, @profileCanDoMask, @profileWantDoMask, @profileAboutText, ";
|
"@homeLocationX, @homeLocationY, @homeLocationZ, @homeLookAtX, @homeLookAtY, @homeLookAtZ, @created, ";
|
||||||
|
sql +=
|
||||||
|
"@lastLogin, @userInventoryURI, @userAssetURI, @profileCanDoMask, @profileWantDoMask, @profileAboutText, ";
|
||||||
sql += "@profileFirstText, @profileImage, @profileFirstImage);";
|
sql += "@profileFirstText, @profileImage, @profileFirstImage);";
|
||||||
|
|
||||||
Dictionary<string, string> parameters = new Dictionary<string, string>();
|
Dictionary<string, string> parameters = new Dictionary<string, string>();
|
||||||
|
@ -624,8 +633,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
parameters["profileWantDoMask"] = "0";
|
parameters["profileWantDoMask"] = "0";
|
||||||
parameters["profileAboutText"] = "";
|
parameters["profileAboutText"] = "";
|
||||||
parameters["profileFirstText"] = "";
|
parameters["profileFirstText"] = "";
|
||||||
parameters["profileImage"] = libsecondlife.LLUUID.Zero.ToString();
|
parameters["profileImage"] = LLUUID.Zero.ToString();
|
||||||
parameters["profileFirstImage"] = libsecondlife.LLUUID.Zero.ToString();
|
parameters["profileFirstImage"] = LLUUID.Zero.ToString();
|
||||||
|
|
||||||
bool returnval = false;
|
bool returnval = false;
|
||||||
|
|
||||||
|
@ -655,7 +664,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
SqlCommand cmd = new SqlCommand(getResourceString(name), (SqlConnection) dbcon);
|
SqlCommand cmd = new SqlCommand(getResourceString(name), (SqlConnection) dbcon);
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
cmd.Dispose();
|
cmd.Dispose();
|
||||||
|
@ -681,7 +689,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
param["dbname"] = dbcon.Database;
|
param["dbname"] = dbcon.Database;
|
||||||
IDbCommand tablesCmd = this.Query("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_CATALOG=@dbname", param);
|
IDbCommand tablesCmd =
|
||||||
|
Query("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_CATALOG=@dbname", param);
|
||||||
using (IDataReader tables = tablesCmd.ExecuteReader())
|
using (IDataReader tables = tablesCmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
while (tables.Read())
|
while (tables.Read())
|
||||||
|
@ -704,7 +713,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
|
|
||||||
private string getResourceString(string name)
|
private string getResourceString(string name)
|
||||||
{
|
{
|
||||||
Assembly assem = this.GetType().Assembly;
|
Assembly assem = GetType().Assembly;
|
||||||
string[] names = assem.GetManifestResourceNames();
|
string[] names = assem.GetManifestResourceNames();
|
||||||
|
|
||||||
foreach (string s in names)
|
foreach (string s in names)
|
||||||
|
@ -726,16 +735,14 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <returns>A string containing the DB provider</returns>
|
/// <returns>A string containing the DB provider</returns>
|
||||||
public string getVersion()
|
public string getVersion()
|
||||||
{
|
{
|
||||||
System.Reflection.Module module = this.GetType().Module;
|
Module module = GetType().Module;
|
||||||
string dllName = module.Assembly.ManifestModule.Name;
|
string dllName = module.Assembly.ManifestModule.Name;
|
||||||
Version dllVersion = module.Assembly.GetName().Version;
|
Version dllVersion = module.Assembly.GetName().Version;
|
||||||
|
|
||||||
|
|
||||||
return string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, dllVersion.Revision);
|
return
|
||||||
|
string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
|
||||||
|
dllVersion.Revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -37,7 +37,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A database interface class to a user profile storage system
|
/// A database interface class to a user profile storage system
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class MSSQLUserData : IUserData
|
internal class MSSQLUserData : IUserData
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Database manager for MySQL
|
/// Database manager for MySQL
|
||||||
|
@ -58,7 +58,9 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id");
|
string settingUserId = GridDataMySqlFile.ParseFileReadValue("user_id");
|
||||||
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
|
||||||
|
|
||||||
database = new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId, settingPassword);
|
database =
|
||||||
|
new MSSQLManager(settingDataSource, settingInitialCatalog, settingPersistSecurityInfo, settingUserId,
|
||||||
|
settingPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -77,7 +79,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
param["first"] = user;
|
param["first"] = user;
|
||||||
param["second"] = last;
|
param["second"] = last;
|
||||||
|
|
||||||
IDbCommand result = database.Query("SELECT * FROM users WHERE username = @first AND lastname = @second", param);
|
IDbCommand result =
|
||||||
|
database.Query("SELECT * FROM users WHERE username = @first AND lastname = @second", param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
UserProfileData row = database.readUserRow(reader);
|
UserProfileData row = database.readUserRow(reader);
|
||||||
|
@ -96,9 +99,9 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<OpenSim.Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
||||||
{
|
{
|
||||||
List<OpenSim.Framework.AvatarPickerAvatar> returnlist = new List<OpenSim.Framework.AvatarPickerAvatar>();
|
List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>();
|
||||||
string[] querysplit;
|
string[] querysplit;
|
||||||
querysplit = query.Split(' ');
|
querysplit = query.Split(' ');
|
||||||
if (querysplit.Length == 2)
|
if (querysplit.Length == 2)
|
||||||
|
@ -112,18 +115,19 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
param["second"] = querysplit[1];
|
param["second"] = querysplit[1];
|
||||||
|
|
||||||
IDbCommand result =
|
IDbCommand result =
|
||||||
database.Query("SELECT UUID,username,surname FROM users WHERE username = @first AND lastname = @second", param);
|
database.Query(
|
||||||
|
"SELECT UUID,username,surname FROM users WHERE username = @first AND lastname = @second",
|
||||||
|
param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar();
|
Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
|
||||||
user.AvatarID = new LLUUID((string) reader["UUID"]);
|
user.AvatarID = new LLUUID((string) reader["UUID"]);
|
||||||
user.firstName = (string) reader["username"];
|
user.firstName = (string) reader["username"];
|
||||||
user.lastName = (string) reader["surname"];
|
user.lastName = (string) reader["surname"];
|
||||||
returnlist.Add(user);
|
returnlist.Add(user);
|
||||||
|
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
@ -135,13 +139,9 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
MainLog.Instance.Error(e.ToString());
|
MainLog.Instance.Error(e.ToString());
|
||||||
return returnlist;
|
return returnlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (querysplit.Length == 1)
|
else if (querysplit.Length == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
lock (database)
|
lock (database)
|
||||||
|
@ -151,18 +151,19 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
param["second"] = querysplit[1];
|
param["second"] = querysplit[1];
|
||||||
|
|
||||||
IDbCommand result =
|
IDbCommand result =
|
||||||
database.Query("SELECT UUID,username,surname FROM users WHERE username = @first OR lastname = @second", param);
|
database.Query(
|
||||||
|
"SELECT UUID,username,surname FROM users WHERE username = @first OR lastname = @second",
|
||||||
|
param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar();
|
Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
|
||||||
user.AvatarID = new LLUUID((string) reader["UUID"]);
|
user.AvatarID = new LLUUID((string) reader["UUID"]);
|
||||||
user.firstName = (string) reader["username"];
|
user.firstName = (string) reader["username"];
|
||||||
user.lastName = (string) reader["surname"];
|
user.lastName = (string) reader["surname"];
|
||||||
returnlist.Add(user);
|
returnlist.Add(user);
|
||||||
|
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
@ -272,9 +273,14 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
{
|
{
|
||||||
lock (database)
|
lock (database)
|
||||||
{
|
{
|
||||||
database.insertUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt, user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z,
|
database.insertUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt,
|
||||||
user.homeLookAt.X, user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI, user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask,
|
user.homeRegion, user.homeLocation.X, user.homeLocation.Y,
|
||||||
user.profileAboutText, user.profileFirstText, user.profileImage, user.profileFirstImage);
|
user.homeLocation.Z,
|
||||||
|
user.homeLookAt.X, user.homeLookAt.Y, user.homeLookAt.Z, user.created,
|
||||||
|
user.lastLogin, user.userInventoryURI, user.userAssetURI,
|
||||||
|
user.profileCanDoMask, user.profileWantDoMask,
|
||||||
|
user.profileAboutText, user.profileFirstText, user.profileImage,
|
||||||
|
user.profileFirstImage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -282,7 +288,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
database.Reconnect();
|
database.Reconnect();
|
||||||
MainLog.Instance.Error(e.ToString());
|
MainLog.Instance.Error(e.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -297,7 +302,6 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
|
|
||||||
public bool UpdateUserProfile(UserProfileData user)
|
public bool UpdateUserProfile(UserProfileData user)
|
||||||
{
|
{
|
||||||
|
|
||||||
SqlCommand command = new SqlCommand("UPDATE users set UUID = @uuid, " +
|
SqlCommand command = new SqlCommand("UPDATE users set UUID = @uuid, " +
|
||||||
"username = @username, " +
|
"username = @username, " +
|
||||||
"lastname = @lastname," +
|
"lastname = @lastname," +
|
||||||
|
@ -341,8 +345,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
SqlParameter param18 = new SqlParameter("@profileWantDoMask", Convert.ToInt32(user.profileWantDoMask));
|
SqlParameter param18 = new SqlParameter("@profileWantDoMask", Convert.ToInt32(user.profileWantDoMask));
|
||||||
SqlParameter param19 = new SqlParameter("@profileAboutText", user.profileAboutText);
|
SqlParameter param19 = new SqlParameter("@profileAboutText", user.profileAboutText);
|
||||||
SqlParameter param20 = new SqlParameter("@profileFirstText", user.profileFirstText);
|
SqlParameter param20 = new SqlParameter("@profileFirstText", user.profileFirstText);
|
||||||
SqlParameter param21 = new SqlParameter("@profileImage", libsecondlife.LLUUID.Zero.ToString());
|
SqlParameter param21 = new SqlParameter("@profileImage", LLUUID.Zero.ToString());
|
||||||
SqlParameter param22 = new SqlParameter("@profileFirstImage", libsecondlife.LLUUID.Zero.ToString());
|
SqlParameter param22 = new SqlParameter("@profileFirstImage", LLUUID.Zero.ToString());
|
||||||
SqlParameter param23 = new SqlParameter("@keyUUUID", user.UUID.ToString());
|
SqlParameter param23 = new SqlParameter("@keyUUUID", user.UUID.ToString());
|
||||||
command.Parameters.Add(param1);
|
command.Parameters.Add(param1);
|
||||||
command.Parameters.Add(param2);
|
command.Parameters.Add(param2);
|
||||||
|
@ -370,9 +374,12 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int affected = command.ExecuteNonQuery();
|
int affected = command.ExecuteNonQuery();
|
||||||
if (affected != 0) {
|
if (affected != 0)
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -433,6 +440,5 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||||
public void runQuery(string query)
|
public void runQuery(string query)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -31,15 +31,12 @@ using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using MySql.Data.MySqlClient;
|
using MySql.Data.MySqlClient;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.LandManagement;
|
using OpenSim.Region.Environment.LandManagement;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System.Data.Common;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework.Data.MySQL
|
namespace OpenSim.Framework.Data.MySQL
|
||||||
{
|
{
|
||||||
|
@ -258,7 +255,6 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
" values(?RegionUUID, ?Revision, ?Heightfield)", m_connection);
|
" values(?RegionUUID, ?Revision, ?Heightfield)", m_connection);
|
||||||
using (cmd)
|
using (cmd)
|
||||||
{
|
{
|
||||||
|
|
||||||
cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID)));
|
cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID)));
|
||||||
cmd.Parameters.Add(new MySqlParameter("?Revision", revision));
|
cmd.Parameters.Add(new MySqlParameter("?Revision", revision));
|
||||||
cmd.Parameters.Add(new MySqlParameter("?Heightfield", serializeTerrain(ter)));
|
cmd.Parameters.Add(new MySqlParameter("?Heightfield", serializeTerrain(ter)));
|
||||||
|
@ -322,7 +318,9 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?UUID", m_connection))
|
using (
|
||||||
|
MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?UUID", m_connection)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new MySqlParameter("?UUID", Util.ToRawUuidString(globalID)));
|
cmd.Parameters.Add(new MySqlParameter("?UUID", Util.ToRawUuidString(globalID)));
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
|
@ -349,7 +347,9 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
fillLandRow(landRow, parcel.landData, regionUUID);
|
fillLandRow(landRow, parcel.landData, regionUUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection))
|
using (
|
||||||
|
MySqlCommand cmd =
|
||||||
|
new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.globalID)));
|
cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.globalID)));
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
|
@ -361,13 +361,12 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID);
|
fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID);
|
||||||
landaccesslist.Rows.Add(newAccessRow);
|
landaccesslist.Rows.Add(newAccessRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Commit();
|
Commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Framework.LandData> LoadLandObjects(LLUUID regionUUID)
|
public List<LandData> LoadLandObjects(LLUUID regionUUID)
|
||||||
{
|
{
|
||||||
List<LandData> landDataForRegion = new List<LandData>();
|
List<LandData> landDataForRegion = new List<LandData>();
|
||||||
lock (m_dataSet)
|
lock (m_dataSet)
|
||||||
|
@ -403,7 +402,7 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
foreach (DataRow row in table.Rows)
|
foreach (DataRow row in table.Rows)
|
||||||
{
|
{
|
||||||
//--- Display the original values, if there are any.
|
//--- Display the original values, if there are any.
|
||||||
if (row.HasVersion(System.Data.DataRowVersion.Original))
|
if (row.HasVersion(DataRowVersion.Original))
|
||||||
{
|
{
|
||||||
Debug.Write("Original Row Values ===> ");
|
Debug.Write("Original Row Values ===> ");
|
||||||
foreach (DataColumn column in table.Columns)
|
foreach (DataColumn column in table.Columns)
|
||||||
|
@ -412,7 +411,7 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
Debug.WriteLine("");
|
Debug.WriteLine("");
|
||||||
}
|
}
|
||||||
//--- Display the current values, if there are any.
|
//--- Display the current values, if there are any.
|
||||||
if (row.HasVersion(System.Data.DataRowVersion.Current))
|
if (row.HasVersion(DataRowVersion.Current))
|
||||||
{
|
{
|
||||||
Debug.Write("Current Row Values ====> ");
|
Debug.Write("Current Row Values ====> ");
|
||||||
foreach (DataColumn column in table.Columns)
|
foreach (DataColumn column in table.Columns)
|
||||||
|
@ -704,16 +703,24 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
Convert.ToSingle(row["SitTargetOffsetX"]),
|
Convert.ToSingle(row["SitTargetOffsetX"]),
|
||||||
Convert.ToSingle(row["SitTargetOffsetY"]),
|
Convert.ToSingle(row["SitTargetOffsetY"]),
|
||||||
Convert.ToSingle(row["SitTargetOffsetZ"])), new LLQuaternion(
|
Convert.ToSingle(row["SitTargetOffsetZ"])), new LLQuaternion(
|
||||||
Convert.ToSingle(row["SitTargetOrientX"]),
|
Convert.ToSingle(
|
||||||
Convert.ToSingle(row["SitTargetOrientY"]),
|
row["SitTargetOrientX"]),
|
||||||
Convert.ToSingle(row["SitTargetOrientZ"]),
|
Convert.ToSingle(
|
||||||
Convert.ToSingle(row["SitTargetOrientW"])));
|
row["SitTargetOrientY"]),
|
||||||
|
Convert.ToSingle(
|
||||||
|
row["SitTargetOrientZ"]),
|
||||||
|
Convert.ToSingle(
|
||||||
|
row["SitTargetOrientW"])));
|
||||||
}
|
}
|
||||||
catch (System.InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
// Database table was created before we got here and needs to be created! :P
|
// Database table was created before we got here and needs to be created! :P
|
||||||
|
|
||||||
using (MySqlCommand cmd = new MySqlCommand("ALTER TABLE `prims` ADD COLUMN `SitTargetOffsetX` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetY` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetZ` float NOT NULL default 0, ADD COLUMN `SitTargetOrientW` float NOT NULL default 0, ADD COLUMN `SitTargetOrientX` float NOT NULL default 0, ADD COLUMN `SitTargetOrientY` float NOT NULL default 0, ADD COLUMN `SitTargetOrientZ` float NOT NULL default 0;", m_connection))
|
using (
|
||||||
|
MySqlCommand cmd =
|
||||||
|
new MySqlCommand(
|
||||||
|
"ALTER TABLE `prims` ADD COLUMN `SitTargetOffsetX` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetY` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetZ` float NOT NULL default 0, ADD COLUMN `SitTargetOrientW` float NOT NULL default 0, ADD COLUMN `SitTargetOrientX` float NOT NULL default 0, ADD COLUMN `SitTargetOrientY` float NOT NULL default 0, ADD COLUMN `SitTargetOrientZ` float NOT NULL default 0;",
|
||||||
|
m_connection))
|
||||||
{
|
{
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
@ -737,12 +744,14 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
newData.isGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
|
newData.isGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
|
||||||
newData.area = Convert.ToInt32(row["Area"]);
|
newData.area = Convert.ToInt32(row["Area"]);
|
||||||
newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
|
newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
|
||||||
newData.category = (Parcel.ParcelCategory)Convert.ToInt32(row["Category"]); //Enum libsecondlife.Parcel.ParcelCategory
|
newData.category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
|
||||||
|
//Enum libsecondlife.Parcel.ParcelCategory
|
||||||
newData.claimDate = Convert.ToInt32(row["ClaimDate"]);
|
newData.claimDate = Convert.ToInt32(row["ClaimDate"]);
|
||||||
newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]);
|
newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]);
|
||||||
newData.groupID = new LLUUID((String) row["GroupUUID"]);
|
newData.groupID = new LLUUID((String) row["GroupUUID"]);
|
||||||
newData.salePrice = Convert.ToInt32(row["SalePrice"]);
|
newData.salePrice = Convert.ToInt32(row["SalePrice"]);
|
||||||
newData.landStatus = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]); //Enum. libsecondlife.Parcel.ParcelStatus
|
newData.landStatus = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
|
||||||
|
//Enum. libsecondlife.Parcel.ParcelStatus
|
||||||
newData.landFlags = Convert.ToUInt32(row["LandFlags"]);
|
newData.landFlags = Convert.ToUInt32(row["LandFlags"]);
|
||||||
newData.landingType = Convert.ToByte(row["LandingType"]);
|
newData.landingType = Convert.ToByte(row["LandingType"]);
|
||||||
newData.mediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
|
newData.mediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
|
||||||
|
@ -753,8 +762,12 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
newData.passPrice = Convert.ToInt32(row["PassPrice"]);
|
newData.passPrice = Convert.ToInt32(row["PassPrice"]);
|
||||||
newData.snapshotID = (String) row["SnapshotUUID"];
|
newData.snapshotID = (String) row["SnapshotUUID"];
|
||||||
|
|
||||||
newData.userLocation = new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), Convert.ToSingle(row["UserLocationZ"]));
|
newData.userLocation =
|
||||||
newData.userLookAt = new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), Convert.ToSingle(row["UserLookAtZ"]));
|
new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
|
||||||
|
Convert.ToSingle(row["UserLocationZ"]));
|
||||||
|
newData.userLookAt =
|
||||||
|
new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
|
||||||
|
Convert.ToSingle(row["UserLookAtZ"]));
|
||||||
newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
|
||||||
|
|
||||||
return newData;
|
return newData;
|
||||||
|
@ -789,7 +802,8 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
row["ParentID"] = prim.ParentID;
|
row["ParentID"] = prim.ParentID;
|
||||||
row["CreationDate"] = prim.CreationDate;
|
row["CreationDate"] = prim.CreationDate;
|
||||||
row["Name"] = prim.Name;
|
row["Name"] = prim.Name;
|
||||||
row["SceneGroupID"] = Util.ToRawUuidString(sceneGroupID); // the UUID of the root part for this SceneObjectGroup
|
row["SceneGroupID"] = Util.ToRawUuidString(sceneGroupID);
|
||||||
|
// the UUID of the root part for this SceneObjectGroup
|
||||||
// various text fields
|
// various text fields
|
||||||
row["Text"] = prim.Text;
|
row["Text"] = prim.Text;
|
||||||
row["Description"] = prim.Description;
|
row["Description"] = prim.Description;
|
||||||
|
@ -842,17 +856,19 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
row["SitTargetOrientY"] = sitTargetOrient.Y;
|
row["SitTargetOrientY"] = sitTargetOrient.Y;
|
||||||
row["SitTargetOrientZ"] = sitTargetOrient.Z;
|
row["SitTargetOrientZ"] = sitTargetOrient.Z;
|
||||||
}
|
}
|
||||||
catch (MySql.Data.MySqlClient.MySqlException)
|
catch (MySqlException)
|
||||||
{
|
{
|
||||||
// Database table was created before we got here and needs to be created! :P
|
// Database table was created before we got here and needs to be created! :P
|
||||||
|
|
||||||
using (MySqlCommand cmd = new MySqlCommand("ALTER TABLE `prims` ADD COLUMN `SitTargetOffsetX` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetY` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetZ` float NOT NULL default 0, ADD COLUMN `SitTargetOrientW` float NOT NULL default 0, ADD COLUMN `SitTargetOrientX` float NOT NULL default 0, ADD COLUMN `SitTargetOrientY` float NOT NULL default 0, ADD COLUMN `SitTargetOrientZ` float NOT NULL default 0;", m_connection))
|
using (
|
||||||
|
MySqlCommand cmd =
|
||||||
|
new MySqlCommand(
|
||||||
|
"ALTER TABLE `prims` ADD COLUMN `SitTargetOffsetX` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetY` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetZ` float NOT NULL default 0, ADD COLUMN `SitTargetOrientW` float NOT NULL default 0, ADD COLUMN `SitTargetOrientX` float NOT NULL default 0, ADD COLUMN `SitTargetOrientY` float NOT NULL default 0, ADD COLUMN `SitTargetOrientZ` float NOT NULL default 0;",
|
||||||
|
m_connection))
|
||||||
{
|
{
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
|
private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
|
@ -203,15 +204,15 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// // Returns a list of avatar and UUIDs that match the query
|
/// // Returns a list of avatar and UUIDs that match the query
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
||||||
{
|
{
|
||||||
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
|
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
|
||||||
|
|
||||||
System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]");
|
Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]");
|
||||||
|
|
||||||
string[] querysplit;
|
string[] querysplit;
|
||||||
querysplit = query.Split(' ');
|
querysplit = query.Split(' ');
|
||||||
|
@ -224,10 +225,10 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
{
|
{
|
||||||
lock (database)
|
lock (database)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
IDbCommand result =
|
IDbCommand result =
|
||||||
database.Query("SELECT UUID,username,surname FROM users WHERE username like ?first AND lastname like ?second LIMIT 100", param);
|
database.Query(
|
||||||
|
"SELECT UUID,username,surname FROM users WHERE username like ?first AND lastname like ?second LIMIT 100",
|
||||||
|
param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
|
||||||
|
@ -238,7 +239,6 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
user.firstName = (string) reader["username"];
|
user.firstName = (string) reader["username"];
|
||||||
user.lastName = (string) reader["surname"];
|
user.lastName = (string) reader["surname"];
|
||||||
returnlist.Add(user);
|
returnlist.Add(user);
|
||||||
|
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
@ -250,13 +250,9 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
MainLog.Instance.Error(e.ToString());
|
MainLog.Instance.Error(e.ToString());
|
||||||
return returnlist;
|
return returnlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (querysplit.Length == 1)
|
else if (querysplit.Length == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
lock (database)
|
lock (database)
|
||||||
|
@ -265,7 +261,9 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], "") + "%";
|
param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], "") + "%";
|
||||||
|
|
||||||
IDbCommand result =
|
IDbCommand result =
|
||||||
database.Query("SELECT UUID,username,surname FROM users WHERE username like ?first OR lastname like ?second", param);
|
database.Query(
|
||||||
|
"SELECT UUID,username,surname FROM users WHERE username like ?first OR lastname like ?second",
|
||||||
|
param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
|
||||||
|
@ -276,7 +274,6 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
user.firstName = (string) reader["username"];
|
user.firstName = (string) reader["username"];
|
||||||
user.lastName = (string) reader["surname"];
|
user.lastName = (string) reader["surname"];
|
||||||
returnlist.Add(user);
|
returnlist.Add(user);
|
||||||
|
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
|
@ -144,11 +145,11 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<OpenSim.Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
||||||
{
|
{
|
||||||
List<OpenSim.Framework.AvatarPickerAvatar> returnlist = new List<OpenSim.Framework.AvatarPickerAvatar>();
|
List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>();
|
||||||
|
|
||||||
System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]");
|
Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]");
|
||||||
|
|
||||||
string[] querysplit;
|
string[] querysplit;
|
||||||
querysplit = query.Split(' ');
|
querysplit = query.Split(' ');
|
||||||
|
@ -161,21 +162,20 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
{
|
{
|
||||||
lock (database)
|
lock (database)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
IDbCommand result =
|
IDbCommand result =
|
||||||
database.Query("SELECT UUID,username,lastname FROM users WHERE username like ?first AND lastname like ?second LIMIT 100", param);
|
database.Query(
|
||||||
|
"SELECT UUID,username,lastname FROM users WHERE username like ?first AND lastname like ?second LIMIT 100",
|
||||||
|
param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar();
|
Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
|
||||||
user.AvatarID = new LLUUID((string) reader["UUID"]);
|
user.AvatarID = new LLUUID((string) reader["UUID"]);
|
||||||
user.firstName = (string) reader["username"];
|
user.firstName = (string) reader["username"];
|
||||||
user.lastName = (string) reader["lastname"];
|
user.lastName = (string) reader["lastname"];
|
||||||
returnlist.Add(user);
|
returnlist.Add(user);
|
||||||
|
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
@ -187,13 +187,9 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
MainLog.Instance.Error(e.ToString());
|
MainLog.Instance.Error(e.ToString());
|
||||||
return returnlist;
|
return returnlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (querysplit.Length == 1)
|
else if (querysplit.Length == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
lock (database)
|
lock (database)
|
||||||
|
@ -202,18 +198,19 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], "") + "%";
|
param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], "") + "%";
|
||||||
|
|
||||||
IDbCommand result =
|
IDbCommand result =
|
||||||
database.Query("SELECT UUID,username,lastname FROM users WHERE username like ?first OR lastname like ?first LIMIT 100", param);
|
database.Query(
|
||||||
|
"SELECT UUID,username,lastname FROM users WHERE username like ?first OR lastname like ?first LIMIT 100",
|
||||||
|
param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar();
|
Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
|
||||||
user.AvatarID = new LLUUID((string) reader["UUID"]);
|
user.AvatarID = new LLUUID((string) reader["UUID"]);
|
||||||
user.firstName = (string) reader["username"];
|
user.firstName = (string) reader["username"];
|
||||||
user.lastName = (string) reader["lastname"];
|
user.lastName = (string) reader["lastname"];
|
||||||
returnlist.Add(user);
|
returnlist.Add(user);
|
||||||
|
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
|
|
@ -130,16 +130,17 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
|
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// // Returns a list of avatar and UUIDs that match the query
|
/// // Returns a list of avatar and UUIDs that match the query
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
||||||
{
|
{
|
||||||
//Do nothing yet
|
//Do nothing yet
|
||||||
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
|
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
|
||||||
return returnlist;
|
return returnlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a new specified region to the database
|
/// Adds a new specified region to the database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -159,6 +159,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
|
|
||||||
invFoldersDa.Update(ds, "inventoryfolders");
|
invFoldersDa.Update(ds, "inventoryfolders");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addItem(InventoryItemBase item)
|
private void addItem(InventoryItemBase item)
|
||||||
{
|
{
|
||||||
DataTable inventoryItemTable = ds.Tables["inventoryitems"];
|
DataTable inventoryItemTable = ds.Tables["inventoryitems"];
|
||||||
|
@ -248,7 +249,8 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
{
|
{
|
||||||
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
||||||
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
|
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
|
||||||
string selectExp = "agentID = '" + Util.ToRawUuidString(user) + "' AND parentID = '" + Util.ToRawUuidString(LLUUID.Zero) + "'";
|
string selectExp = "agentID = '" + Util.ToRawUuidString(user) + "' AND parentID = '" +
|
||||||
|
Util.ToRawUuidString(LLUUID.Zero) + "'";
|
||||||
DataRow[] rows = inventoryFolderTable.Select(selectExp);
|
DataRow[] rows = inventoryFolderTable.Select(selectExp);
|
||||||
foreach (DataRow row in rows)
|
foreach (DataRow row in rows)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,6 @@ using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using Mono.Data.SqliteClient;
|
using Mono.Data.SqliteClient;
|
||||||
using OpenSim.Framework;
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Data.SQLite
|
namespace OpenSim.Framework.Data.SQLite
|
||||||
|
@ -38,7 +37,6 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A User storage interface for the SQLite database system
|
/// A User storage interface for the SQLite database system
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public class SQLiteUserData : SQLiteBase, IUserData
|
public class SQLiteUserData : SQLiteBase, IUserData
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -119,9 +117,9 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<OpenSim.Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
|
||||||
{
|
{
|
||||||
List<OpenSim.Framework.AvatarPickerAvatar> returnlist = new List<OpenSim.Framework.AvatarPickerAvatar>();
|
List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>();
|
||||||
string[] querysplit;
|
string[] querysplit;
|
||||||
querysplit = query.Split(' ');
|
querysplit = query.Split(' ');
|
||||||
if (querysplit.Length == 2)
|
if (querysplit.Length == 2)
|
||||||
|
@ -134,7 +132,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
{
|
{
|
||||||
for (int i = 0; i < rows.Length; i++)
|
for (int i = 0; i < rows.Length; i++)
|
||||||
{
|
{
|
||||||
OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar();
|
Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
|
||||||
DataRow row = rows[i];
|
DataRow row = rows[i];
|
||||||
user.AvatarID = new LLUUID((string) row["UUID"]);
|
user.AvatarID = new LLUUID((string) row["UUID"]);
|
||||||
user.firstName = (string) row["username"];
|
user.firstName = (string) row["username"];
|
||||||
|
@ -146,15 +144,15 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
}
|
}
|
||||||
else if (querysplit.Length == 1)
|
else if (querysplit.Length == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
string select = "username like '" + querysplit[0] + "%' OR surname like '" + querysplit[0] + "%'";
|
string select = "username like '" + querysplit[0] + "%' OR surname like '" + querysplit[0] + "%'";
|
||||||
lock (ds)
|
lock (ds)
|
||||||
{
|
{
|
||||||
DataRow[] rows = ds.Tables["users"].Select(select);
|
DataRow[] rows = ds.Tables["users"].Select(select);
|
||||||
if (rows.Length > 0)
|
if (rows.Length > 0)
|
||||||
{
|
{
|
||||||
for (int i = 0;i<rows.Length;i++) {
|
for (int i = 0; i < rows.Length; i++)
|
||||||
OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar();
|
{
|
||||||
|
Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
|
||||||
DataRow row = rows[i];
|
DataRow row = rows[i];
|
||||||
user.AvatarID = new LLUUID((string) row[0]);
|
user.AvatarID = new LLUUID((string) row[0]);
|
||||||
user.firstName = (string) row[1];
|
user.firstName = (string) row[1];
|
||||||
|
@ -166,6 +164,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
}
|
}
|
||||||
return returnlist;
|
return returnlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a user by UUID direct
|
/// Returns a user by UUID direct
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -263,7 +262,6 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
row.Delete();
|
row.Delete();
|
||||||
ua.AcceptChanges();
|
ua.AcceptChanges();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using libsecondlife;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Data
|
namespace OpenSim.Framework.Data
|
||||||
{
|
{
|
||||||
|
@ -35,10 +35,12 @@ namespace OpenSim.Framework.Data
|
||||||
public LLUUID AvatarID;
|
public LLUUID AvatarID;
|
||||||
public string firstName;
|
public string firstName;
|
||||||
public string lastName;
|
public string lastName;
|
||||||
|
|
||||||
public AvatarPickerAvatar()
|
public AvatarPickerAvatar()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum DataResponse
|
public enum DataResponse
|
||||||
{
|
{
|
||||||
RESPONSE_OK,
|
RESPONSE_OK,
|
||||||
|
@ -78,6 +80,7 @@ namespace OpenSim.Framework.Data
|
||||||
|
|
||||||
|
|
||||||
List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query);
|
List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Authenticates a sim by use of its recv key.
|
/// Authenticates a sim by use of its recv key.
|
||||||
/// WARNING: Insecure
|
/// WARNING: Insecure
|
||||||
|
|
|
@ -93,7 +93,8 @@ namespace OpenSim.Framework
|
||||||
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
|
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
|
||||||
"Http Listener port", DefaultHttpPort.ToString(), false);
|
"Http Listener port", DefaultHttpPort.ToString(), false);
|
||||||
|
|
||||||
configMember.addConfigurationOption("allow_forceful_banlines", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
configMember.addConfigurationOption("allow_forceful_banlines",
|
||||||
|
ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
||||||
"Allow Forceful Banlines", "TRUE", true);
|
"Allow Forceful Banlines", "TRUE", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,8 @@ namespace OpenSim.Framework
|
||||||
public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos);
|
public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos);
|
||||||
|
|
||||||
public delegate void ModifyTerrain(
|
public delegate void ModifyTerrain(
|
||||||
float height, float seconds, byte size, byte action, float north, float west, float south, float east, IClientAPI remoteClient);
|
float height, float seconds, byte size, byte action, float north, float west, float south, float east,
|
||||||
|
IClientAPI remoteClient);
|
||||||
|
|
||||||
public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
|
public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
|
||||||
|
|
||||||
|
@ -269,7 +270,8 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
|
public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
|
||||||
|
|
||||||
public delegate void RequestObjectPropertiesFamily(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID TaskID);
|
public delegate void RequestObjectPropertiesFamily(
|
||||||
|
IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID TaskID);
|
||||||
|
|
||||||
public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
|
public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
|
||||||
|
|
||||||
|
@ -297,13 +299,17 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID);
|
public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID);
|
||||||
|
|
||||||
public delegate void AvatarPickerRequest(IClientAPI remoteClient, LLUUID agentdata, LLUUID queryID, string UserQuery);
|
public delegate void AvatarPickerRequest(IClientAPI remoteClient, LLUUID agentdata, LLUUID queryID, string UserQuery
|
||||||
|
);
|
||||||
|
|
||||||
public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
|
public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
|
||||||
|
|
||||||
public delegate void ParcelAccessListRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID,IClientAPI remote_client);
|
public delegate void ParcelAccessListRequest(
|
||||||
|
LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
|
||||||
|
|
||||||
public delegate void ParcelAccessListUpdateRequest(LLUUID agentID, LLUUID sessionID,uint flags, int landLocalID, List<libsecondlife.ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
|
public delegate void ParcelAccessListUpdateRequest(
|
||||||
|
LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID, List<ParcelManager.ParcelAccessEntry> entries,
|
||||||
|
IClientAPI remote_client);
|
||||||
|
|
||||||
public delegate void ParcelPropertiesRequest(
|
public delegate void ParcelPropertiesRequest(
|
||||||
int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
|
int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
|
||||||
|
@ -330,7 +336,8 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, IClientAPI remote_client);
|
public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, IClientAPI remote_client);
|
||||||
|
|
||||||
public delegate void GodKickUser(LLUUID GodAgentID, LLUUID GodSessionID, LLUUID AgentID, uint kickflags, byte[] reason);
|
public delegate void GodKickUser(
|
||||||
|
LLUUID GodAgentID, LLUUID GodSessionID, LLUUID AgentID, uint kickflags, byte[] reason);
|
||||||
|
|
||||||
public delegate void CreateInventoryFolder(
|
public delegate void CreateInventoryFolder(
|
||||||
IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
|
IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
|
||||||
|
@ -360,7 +367,8 @@ namespace OpenSim.Framework
|
||||||
uint nextOwnerMask);
|
uint nextOwnerMask);
|
||||||
|
|
||||||
public delegate void CopyInventoryItem(
|
public delegate void CopyInventoryItem(
|
||||||
IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID, string newName);
|
IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID,
|
||||||
|
string newName);
|
||||||
|
|
||||||
public delegate void MoveInventoryItem(
|
public delegate void MoveInventoryItem(
|
||||||
IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, string newName);
|
IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, string newName);
|
||||||
|
@ -372,7 +380,8 @@ namespace OpenSim.Framework
|
||||||
public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID);
|
public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID);
|
||||||
|
|
||||||
public delegate void UDPAssetUploadRequest(
|
public delegate void UDPAssetUploadRequest(
|
||||||
IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal, bool tempFile);
|
IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal,
|
||||||
|
bool tempFile);
|
||||||
|
|
||||||
public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data);
|
public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data);
|
||||||
|
|
||||||
|
@ -380,7 +389,9 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID);
|
public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID);
|
||||||
|
|
||||||
public delegate void ObjectPermissions(IClientAPI remoteClinet, LLUUID AgentID, LLUUID SessionID, List<ObjectPermissionsPacket.ObjectDataBlock> permChanges);
|
public delegate void ObjectPermissions(
|
||||||
|
IClientAPI remoteClinet, LLUUID AgentID, LLUUID SessionID,
|
||||||
|
List<ObjectPermissionsPacket.ObjectDataBlock> permChanges);
|
||||||
|
|
||||||
public interface IClientAPI
|
public interface IClientAPI
|
||||||
{
|
{
|
||||||
|
@ -536,18 +547,21 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
|
void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
|
||||||
void SetChildAgentThrottle(byte[] throttle);
|
void SetChildAgentThrottle(byte[] throttle);
|
||||||
|
|
||||||
void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
|
void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
|
||||||
LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
|
LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
|
||||||
uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction);
|
uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction);
|
||||||
|
|
||||||
void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
|
void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
|
||||||
LLQuaternion rotation);
|
LLQuaternion rotation);
|
||||||
|
|
||||||
void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
|
void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
|
||||||
LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity);
|
LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity);
|
||||||
|
|
||||||
void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items,
|
void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items,
|
||||||
List<InventoryFolderBase> folders, bool fetchFolders,
|
List<InventoryFolderBase> folders, bool fetchFolders,
|
||||||
bool fetchItems);
|
bool fetchItems);
|
||||||
|
|
||||||
void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item);
|
void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -51,8 +51,6 @@ namespace OpenSim.Framework
|
||||||
public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData);
|
public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface IRegionCommsListener
|
public interface IRegionCommsListener
|
||||||
{
|
{
|
||||||
event ExpectUserDelegate OnExpectUser;
|
event ExpectUserDelegate OnExpectUser;
|
||||||
|
@ -66,6 +64,5 @@ namespace OpenSim.Framework
|
||||||
event CloseAgentConnection OnCloseAgentConnection;
|
event CloseAgentConnection OnCloseAgentConnection;
|
||||||
event RegionUp OnRegionUp;
|
event RegionUp OnRegionUp;
|
||||||
event ChildAgentUpdate OnChildAgentUpdate;
|
event ChildAgentUpdate OnChildAgentUpdate;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -26,11 +26,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public interface IRegionLoader
|
public interface IRegionLoader
|
||||||
|
|
|
@ -30,6 +30,7 @@ using libsecondlife;
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public delegate void restart(RegionInfo thisRegion);
|
public delegate void restart(RegionInfo thisRegion);
|
||||||
|
|
||||||
//public delegate void regionup ( RegionInfo thisRegion );
|
//public delegate void regionup ( RegionInfo thisRegion );
|
||||||
|
|
||||||
public enum RegionStatus : int
|
public enum RegionStatus : int
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using libsecondlife;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ namespace OpenSim.Framework
|
||||||
/// <returns>The user data profile</returns>
|
/// <returns>The user data profile</returns>
|
||||||
UserProfileData GetUserByName(string fname, string lname);
|
UserProfileData GetUserByName(string fname, string lname);
|
||||||
|
|
||||||
List<OpenSim.Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query);
|
List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the current agent for a user searching by it's UUID
|
/// Returns the current agent for a user searching by it's UUID
|
||||||
|
@ -127,11 +127,13 @@ namespace OpenSim.Framework
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void Initialise();
|
void Initialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AvatarPickerAvatar
|
public class AvatarPickerAvatar
|
||||||
{
|
{
|
||||||
public LLUUID AvatarID;
|
public LLUUID AvatarID;
|
||||||
public string firstName;
|
public string firstName;
|
||||||
public string lastName;
|
public string lastName;
|
||||||
|
|
||||||
public AvatarPickerAvatar()
|
public AvatarPickerAvatar()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using libsecondlife;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,8 +25,9 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using libsecondlife;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public class LandData
|
public class LandData
|
||||||
|
|
|
@ -80,8 +80,10 @@ namespace OpenSim.Framework
|
||||||
m_defaultHomeLocX = (uint) config.Configs["StandAlone"].GetInt("default_location_x", 1000);
|
m_defaultHomeLocX = (uint) config.Configs["StandAlone"].GetInt("default_location_x", 1000);
|
||||||
m_defaultHomeLocY = (uint) config.Configs["StandAlone"].GetInt("default_location_y", 1000);
|
m_defaultHomeLocY = (uint) config.Configs["StandAlone"].GetInt("default_location_y", 1000);
|
||||||
|
|
||||||
HttpListenerPort = (uint) config.Configs["Network"].GetInt("http_listener_port", (int) DefaultHttpListenerPort);
|
HttpListenerPort =
|
||||||
RemotingListenerPort = (uint) config.Configs["Network"].GetInt("remoting_listener_port", (int) RemotingListenerPort);
|
(uint) config.Configs["Network"].GetInt("http_listener_port", (int) DefaultHttpListenerPort);
|
||||||
|
RemotingListenerPort =
|
||||||
|
(uint) config.Configs["Network"].GetInt("remoting_listener_port", (int) RemotingListenerPort);
|
||||||
GridURL =
|
GridURL =
|
||||||
config.Configs["Network"].GetString("grid_server_url",
|
config.Configs["Network"].GetString("grid_server_url",
|
||||||
"http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString());
|
"http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString());
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
|
@ -94,29 +94,18 @@ namespace OpenSim.Framework
|
||||||
[XmlIgnore]
|
[XmlIgnore]
|
||||||
public LLObject.TextureEntry Textures
|
public LLObject.TextureEntry Textures
|
||||||
{
|
{
|
||||||
get
|
get { return new LLObject.TextureEntry(m_textureEntry, 0, m_textureEntry.Length); }
|
||||||
{
|
|
||||||
return new LLObject.TextureEntry(m_textureEntry, 0, m_textureEntry.Length);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
set { m_textureEntry = value.ToBytes(); }
|
||||||
{
|
|
||||||
m_textureEntry = value.ToBytes();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private byte[] m_textureEntry;
|
private byte[] m_textureEntry;
|
||||||
|
|
||||||
public byte[] TextureEntry
|
public byte[] TextureEntry
|
||||||
{
|
{
|
||||||
get
|
get { return m_textureEntry; }
|
||||||
{
|
|
||||||
return m_textureEntry;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
set { m_textureEntry = value; }
|
||||||
{
|
|
||||||
m_textureEntry = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] ExtraParams;
|
public byte[] ExtraParams;
|
||||||
|
@ -148,7 +137,6 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static PrimitiveBaseShape()
|
static PrimitiveBaseShape()
|
||||||
{
|
{
|
||||||
m_defaultTexture =
|
m_defaultTexture =
|
||||||
|
|
|
@ -66,7 +66,6 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData)
|
public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData)
|
||||||
{
|
{
|
||||||
if (OnExpectUser != null)
|
if (OnExpectUser != null)
|
||||||
|
@ -107,7 +106,9 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
public virtual bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical)
|
|
||||||
|
public virtual bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position,
|
||||||
|
bool isPhysical)
|
||||||
{
|
{
|
||||||
if (OnPrimCrossingIntoRegion != null)
|
if (OnPrimCrossingIntoRegion != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,16 +26,11 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Xml;
|
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using Nini.Config;
|
using System.Xml;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Console;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
|
@ -64,6 +59,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port);
|
m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleRegionInfo(RegionInfo ConvertFrom)
|
public SimpleRegionInfo(RegionInfo ConvertFrom)
|
||||||
{
|
{
|
||||||
m_regionLocX = ConvertFrom.RegionLocX;
|
m_regionLocX = ConvertFrom.RegionLocX;
|
||||||
|
@ -78,16 +74,11 @@ namespace OpenSim.Framework
|
||||||
public LLUUID RegionID = LLUUID.Zero;
|
public LLUUID RegionID = LLUUID.Zero;
|
||||||
|
|
||||||
public uint m_remotingPort;
|
public uint m_remotingPort;
|
||||||
|
|
||||||
public uint RemotingPort
|
public uint RemotingPort
|
||||||
{
|
{
|
||||||
get
|
get { return m_remotingPort; }
|
||||||
{
|
set { m_remotingPort = value; }
|
||||||
return m_remotingPort;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_remotingPort = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string RemotingAddress;
|
public string RemotingAddress;
|
||||||
|
@ -123,70 +114,44 @@ namespace OpenSim.Framework
|
||||||
return new IPEndPoint(ia, m_internalEndPoint.Port);
|
return new IPEndPoint(ia, m_internalEndPoint.Port);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set { m_externalHostName = value.ToString(); }
|
||||||
{
|
|
||||||
m_externalHostName = value.ToString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string m_externalHostName;
|
protected string m_externalHostName;
|
||||||
|
|
||||||
public string ExternalHostName
|
public string ExternalHostName
|
||||||
{
|
{
|
||||||
get
|
get { return m_externalHostName; }
|
||||||
{
|
set { m_externalHostName = value; }
|
||||||
return m_externalHostName;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_externalHostName = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IPEndPoint m_internalEndPoint;
|
protected IPEndPoint m_internalEndPoint;
|
||||||
|
|
||||||
public IPEndPoint InternalEndPoint
|
public IPEndPoint InternalEndPoint
|
||||||
{
|
{
|
||||||
get
|
get { return m_internalEndPoint; }
|
||||||
{
|
set { m_internalEndPoint = value; }
|
||||||
return m_internalEndPoint;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_internalEndPoint = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected uint? m_regionLocX;
|
protected uint? m_regionLocX;
|
||||||
|
|
||||||
public uint RegionLocX
|
public uint RegionLocX
|
||||||
{
|
{
|
||||||
get
|
get { return m_regionLocX.Value; }
|
||||||
{
|
set { m_regionLocX = value; }
|
||||||
return m_regionLocX.Value;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_regionLocX = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected uint? m_regionLocY;
|
protected uint? m_regionLocY;
|
||||||
|
|
||||||
public uint RegionLocY
|
public uint RegionLocY
|
||||||
{
|
{
|
||||||
get
|
get { return m_regionLocY.Value; }
|
||||||
{
|
set { m_regionLocY = value; }
|
||||||
return m_regionLocY.Value;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_regionLocY = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ulong RegionHandle
|
public ulong RegionHandle
|
||||||
{
|
{
|
||||||
get
|
get { return Util.UIntsToLong((RegionLocX*256), (RegionLocY*256)); }
|
||||||
{
|
|
||||||
return Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,6 +171,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
|
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
|
||||||
private static EstateSettings m_estateSettings;
|
private static EstateSettings m_estateSettings;
|
||||||
|
|
||||||
public EstateSettings EstateSettings
|
public EstateSettings EstateSettings
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -223,14 +189,18 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public RegionInfo(string description, string filename)
|
public RegionInfo(string description, string filename)
|
||||||
{
|
{
|
||||||
configMember = new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
|
configMember =
|
||||||
|
new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
|
||||||
configMember.performConfigurationRetrieve();
|
configMember.performConfigurationRetrieve();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RegionInfo(string description, XmlNode xmlNode)
|
public RegionInfo(string description, XmlNode xmlNode)
|
||||||
{
|
{
|
||||||
configMember = new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration);
|
configMember =
|
||||||
|
new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration);
|
||||||
configMember.performConfigurationRetrieve();
|
configMember.performConfigurationRetrieve();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) :
|
public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) :
|
||||||
base(regionLocX, regionLocY, internalEndPoint, externalUri)
|
base(regionLocX, regionLocY, internalEndPoint, externalUri)
|
||||||
{
|
{
|
||||||
|
@ -239,6 +209,7 @@ namespace OpenSim.Framework
|
||||||
public RegionInfo()
|
public RegionInfo()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public RegionInfo(SearializableRegionInfo ConvertFrom)
|
public RegionInfo(SearializableRegionInfo ConvertFrom)
|
||||||
{
|
{
|
||||||
m_regionLocX = ConvertFrom.RegionLocX;
|
m_regionLocX = ConvertFrom.RegionLocX;
|
||||||
|
@ -249,6 +220,7 @@ namespace OpenSim.Framework
|
||||||
RemotingAddress = ConvertFrom.RemotingAddress;
|
RemotingAddress = ConvertFrom.RemotingAddress;
|
||||||
RegionID = LLUUID.Zero;
|
RegionID = LLUUID.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RegionInfo(SimpleRegionInfo ConvertFrom)
|
public RegionInfo(SimpleRegionInfo ConvertFrom)
|
||||||
{
|
{
|
||||||
m_regionLocX = ConvertFrom.RegionLocX;
|
m_regionLocX = ConvertFrom.RegionLocX;
|
||||||
|
@ -259,47 +231,49 @@ namespace OpenSim.Framework
|
||||||
RemotingAddress = ConvertFrom.RemotingAddress;
|
RemotingAddress = ConvertFrom.RemotingAddress;
|
||||||
RegionID = LLUUID.Zero;
|
RegionID = LLUUID.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
//not in use, should swap to nini though.
|
//not in use, should swap to nini though.
|
||||||
public void LoadFromNiniSource(IConfigSource source)
|
public void LoadFromNiniSource(IConfigSource source)
|
||||||
{
|
{
|
||||||
this.LoadFromNiniSource(source, "RegionInfo");
|
LoadFromNiniSource(source, "RegionInfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
//not in use, should swap to nini though.
|
//not in use, should swap to nini though.
|
||||||
public void LoadFromNiniSource(IConfigSource source, string sectionName)
|
public void LoadFromNiniSource(IConfigSource source, string sectionName)
|
||||||
{
|
{
|
||||||
string errorMessage = "";
|
string errorMessage = "";
|
||||||
this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToString()));
|
RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToString()));
|
||||||
this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test");
|
RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test");
|
||||||
this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000"));
|
m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000"));
|
||||||
this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000"));
|
m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000"));
|
||||||
// this.DataStore = source.Configs[sectionName].GetString("datastore", "OpenSim.db");
|
// this.DataStore = source.Configs[sectionName].GetString("datastore", "OpenSim.db");
|
||||||
|
|
||||||
string ipAddress = source.Configs[sectionName].GetString("internal_ip_address", "0.0.0.0");
|
string ipAddress = source.Configs[sectionName].GetString("internal_ip_address", "0.0.0.0");
|
||||||
IPAddress ipAddressResult;
|
IPAddress ipAddressResult;
|
||||||
if (IPAddress.TryParse(ipAddress, out ipAddressResult))
|
if (IPAddress.TryParse(ipAddress, out ipAddressResult))
|
||||||
{
|
{
|
||||||
this.m_internalEndPoint = new IPEndPoint(ipAddressResult, 0);
|
m_internalEndPoint = new IPEndPoint(ipAddressResult, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorMessage = "needs an IP Address (IPAddress)";
|
errorMessage = "needs an IP Address (IPAddress)";
|
||||||
}
|
}
|
||||||
this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", (int) NetworkServersInfo.DefaultHttpListenerPort);
|
m_internalEndPoint.Port =
|
||||||
|
source.Configs[sectionName].GetInt("internal_ip_port", (int) NetworkServersInfo.DefaultHttpListenerPort);
|
||||||
|
|
||||||
string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1");
|
string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1");
|
||||||
if (externalHost != "SYSTEMIP")
|
if (externalHost != "SYSTEMIP")
|
||||||
{
|
{
|
||||||
this.m_externalHostName = externalHost;
|
m_externalHostName = externalHost;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.m_externalHostName = Util.GetLocalHost().ToString();
|
m_externalHostName = Util.GetLocalHost().ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.MasterAvatarFirstName = source.Configs[sectionName].GetString("master_avatar_first", "Test");
|
MasterAvatarFirstName = source.Configs[sectionName].GetString("master_avatar_first", "Test");
|
||||||
this.MasterAvatarLastName = source.Configs[sectionName].GetString("master_avatar_last", "User");
|
MasterAvatarLastName = source.Configs[sectionName].GetString("master_avatar_last", "User");
|
||||||
this.MasterAvatarSandboxPassword = source.Configs[sectionName].GetString("master_avatar_pass", "test");
|
MasterAvatarSandboxPassword = source.Configs[sectionName].GetString("master_avatar_pass", "test");
|
||||||
|
|
||||||
if (errorMessage != "")
|
if (errorMessage != "")
|
||||||
{
|
{
|
||||||
|
@ -309,19 +283,45 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public void loadConfigurationOptions()
|
public void loadConfigurationOptions()
|
||||||
{
|
{
|
||||||
configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "UUID of Region (Default is recommended, random UUID)", LLUUID.Random().ToString(), true);
|
configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
|
||||||
configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Region Name", "OpenSim Test", false);
|
"UUID of Region (Default is recommended, random UUID)",
|
||||||
configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (X Axis)", "1000", false);
|
LLUUID.Random().ToString(), true);
|
||||||
configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (Y Axis)", "1000", false);
|
configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||||
|
"Region Name", "OpenSim Test", false);
|
||||||
|
configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
|
||||||
|
"Grid Location (X Axis)", "1000", false);
|
||||||
|
configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
|
||||||
|
"Grid Location (Y Axis)", "1000", false);
|
||||||
//configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
|
//configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
|
||||||
configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false);
|
configMember.addConfigurationOption("internal_ip_address",
|
||||||
configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false);
|
ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS,
|
||||||
configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false);
|
"Internal IP Address for incoming UDP client connections", "0.0.0.0",
|
||||||
configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Master Avatar UUID", LLUUID.Zero.ToString(), true);
|
false);
|
||||||
configMember.addConfigurationOption("estate_covanant_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant", LLUUID.Zero.ToString(), true);
|
configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||||
configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false,(ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
|
"Internal IP Port for incoming UDP client connections",
|
||||||
configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
|
NetworkServersInfo.DefaultHttpListenerPort.ToString(), false);
|
||||||
configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
|
configMember.addConfigurationOption("external_host_name",
|
||||||
|
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||||
|
"External Host Name", "127.0.0.1", false);
|
||||||
|
configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
|
||||||
|
"Master Avatar UUID", LLUUID.Zero.ToString(), true);
|
||||||
|
configMember.addConfigurationOption("estate_covanant_uuid",
|
||||||
|
ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant",
|
||||||
|
LLUUID.Zero.ToString(), true);
|
||||||
|
configMember.addConfigurationOption("master_avatar_first",
|
||||||
|
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||||
|
"First Name of Master Avatar", "Test", false,
|
||||||
|
(ConfigurationOption.ConfigurationOptionShouldBeAsked)
|
||||||
|
shouldMasterAvatarDetailsBeAsked);
|
||||||
|
configMember.addConfigurationOption("master_avatar_last",
|
||||||
|
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||||
|
"Last Name of Master Avatar", "User", false,
|
||||||
|
(ConfigurationOption.ConfigurationOptionShouldBeAsked)
|
||||||
|
shouldMasterAvatarDetailsBeAsked);
|
||||||
|
configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
||||||
|
"(Sandbox Mode Only)Password for Master Avatar account", "test", false,
|
||||||
|
(ConfigurationOption.ConfigurationOptionShouldBeAsked)
|
||||||
|
shouldMasterAvatarDetailsBeAsked);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool shouldMasterAvatarDetailsBeAsked(string configuration_key)
|
public bool shouldMasterAvatarDetailsBeAsked(string configuration_key)
|
||||||
|
@ -338,58 +338,57 @@ namespace OpenSim.Framework
|
||||||
switch (configuration_key)
|
switch (configuration_key)
|
||||||
{
|
{
|
||||||
case "sim_UUID":
|
case "sim_UUID":
|
||||||
this.RegionID = (LLUUID)configuration_result;
|
RegionID = (LLUUID) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "sim_name":
|
case "sim_name":
|
||||||
this.RegionName = (string)configuration_result;
|
RegionName = (string) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "sim_location_x":
|
case "sim_location_x":
|
||||||
this.m_regionLocX = (uint)configuration_result;
|
m_regionLocX = (uint) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "sim_location_y":
|
case "sim_location_y":
|
||||||
this.m_regionLocY = (uint)configuration_result;
|
m_regionLocY = (uint) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "datastore":
|
case "datastore":
|
||||||
this.DataStore = (string)configuration_result;
|
DataStore = (string) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "internal_ip_address":
|
case "internal_ip_address":
|
||||||
IPAddress address = (IPAddress) configuration_result;
|
IPAddress address = (IPAddress) configuration_result;
|
||||||
this.m_internalEndPoint = new IPEndPoint(address, 0);
|
m_internalEndPoint = new IPEndPoint(address, 0);
|
||||||
break;
|
break;
|
||||||
case "internal_ip_port":
|
case "internal_ip_port":
|
||||||
this.m_internalEndPoint.Port = (int)configuration_result;
|
m_internalEndPoint.Port = (int) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "external_host_name":
|
case "external_host_name":
|
||||||
if ((string) configuration_result != "SYSTEMIP")
|
if ((string) configuration_result != "SYSTEMIP")
|
||||||
{
|
{
|
||||||
this.m_externalHostName = (string)configuration_result;
|
m_externalHostName = (string) configuration_result;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.m_externalHostName = Util.GetLocalHost().ToString();
|
m_externalHostName = Util.GetLocalHost().ToString();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "master_avatar_uuid":
|
case "master_avatar_uuid":
|
||||||
this.MasterAvatarAssignedUUID = (LLUUID)configuration_result;
|
MasterAvatarAssignedUUID = (LLUUID) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "estate_covanant_uuid":
|
case "estate_covanant_uuid":
|
||||||
this.CovenantID = (LLUUID)configuration_result;
|
CovenantID = (LLUUID) configuration_result;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "master_avatar_first":
|
case "master_avatar_first":
|
||||||
this.MasterAvatarFirstName = (string)configuration_result;
|
MasterAvatarFirstName = (string) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "master_avatar_last":
|
case "master_avatar_last":
|
||||||
this.MasterAvatarLastName = (string)configuration_result;
|
MasterAvatarLastName = (string) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "master_avatar_pass":
|
case "master_avatar_pass":
|
||||||
string tempMD5Passwd = (string) configuration_result;
|
string tempMD5Passwd = (string) configuration_result;
|
||||||
this.MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
|
MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -25,12 +25,8 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using Nini.Config;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Framework.RegionLoader.Filesystem
|
namespace OpenSim.Framework.RegionLoader.Filesystem
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,29 +25,28 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
|
||||||
using System.Net;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace OpenSim.Framework.RegionLoader.Web
|
namespace OpenSim.Framework.RegionLoader.Web
|
||||||
{
|
{
|
||||||
public class RegionLoaderWebServer : IRegionLoader
|
public class RegionLoaderWebServer : IRegionLoader
|
||||||
{
|
{
|
||||||
private IniConfigSource m_configSouce;
|
private IniConfigSource m_configSouce;
|
||||||
|
|
||||||
public void SetIniConfigSource(IniConfigSource configSource)
|
public void SetIniConfigSource(IniConfigSource configSource)
|
||||||
{
|
{
|
||||||
m_configSouce = configSource;
|
m_configSouce = configSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RegionInfo[] LoadRegions()
|
public RegionInfo[] LoadRegions()
|
||||||
{
|
{
|
||||||
if (m_configSouce == null)
|
if (m_configSouce == null)
|
||||||
{
|
{
|
||||||
Console.MainLog.Instance.Error("WEBLOADER", "Unable to load configuration source!");
|
MainLog.Instance.Error("WEBLOADER", "Unable to load configuration source!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -56,17 +55,16 @@ namespace OpenSim.Framework.RegionLoader.Web
|
||||||
string url = startupConfig.GetString("regionload_webserver_url", "").Trim();
|
string url = startupConfig.GetString("regionload_webserver_url", "").Trim();
|
||||||
if (url == "")
|
if (url == "")
|
||||||
{
|
{
|
||||||
Console.MainLog.Instance.Error("WEBLOADER", "Unable to load webserver URL - URL was empty.");
|
MainLog.Instance.Error("WEBLOADER", "Unable to load webserver URL - URL was empty.");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url);
|
HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url);
|
||||||
webRequest.Timeout = 30000; //30 Second Timeout
|
webRequest.Timeout = 30000; //30 Second Timeout
|
||||||
Console.MainLog.Instance.Debug("WEBLOADER", "Sending Download Request...");
|
MainLog.Instance.Debug("WEBLOADER", "Sending Download Request...");
|
||||||
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
|
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
|
||||||
Console.MainLog.Instance.Debug("WEBLOADER", "Downloading Region Information From Remote Server...");
|
MainLog.Instance.Debug("WEBLOADER", "Downloading Region Information From Remote Server...");
|
||||||
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
|
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
|
||||||
string xmlSource = "";
|
string xmlSource = "";
|
||||||
string tempStr = reader.ReadLine();
|
string tempStr = reader.ReadLine();
|
||||||
|
@ -75,7 +73,9 @@ namespace OpenSim.Framework.RegionLoader.Web
|
||||||
xmlSource = xmlSource + tempStr;
|
xmlSource = xmlSource + tempStr;
|
||||||
tempStr = reader.ReadLine();
|
tempStr = reader.ReadLine();
|
||||||
}
|
}
|
||||||
Console.MainLog.Instance.Debug("WEBLOADER", "Done downloading region information from server. Total Bytes: " + xmlSource.Length);
|
MainLog.Instance.Debug("WEBLOADER",
|
||||||
|
"Done downloading region information from server. Total Bytes: " +
|
||||||
|
xmlSource.Length);
|
||||||
XmlDocument xmlDoc = new XmlDocument();
|
XmlDocument xmlDoc = new XmlDocument();
|
||||||
xmlDoc.LoadXml(xmlSource);
|
xmlDoc.LoadXml(xmlSource);
|
||||||
if (xmlDoc.FirstChild.Name == "Regions")
|
if (xmlDoc.FirstChild.Name == "Regions")
|
||||||
|
@ -84,8 +84,9 @@ namespace OpenSim.Framework.RegionLoader.Web
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++)
|
for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++)
|
||||||
{
|
{
|
||||||
Console.MainLog.Instance.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml);
|
MainLog.Instance.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml);
|
||||||
regionInfos[i] = new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i]);
|
regionInfos[i] =
|
||||||
|
new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return regionInfos;
|
return regionInfos;
|
||||||
|
|
|
@ -26,15 +26,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Xml;
|
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
@ -46,6 +41,7 @@ namespace OpenSim.Framework
|
||||||
public SearializableRegionInfo()
|
public SearializableRegionInfo()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public SearializableRegionInfo(RegionInfo ConvertFrom)
|
public SearializableRegionInfo(RegionInfo ConvertFrom)
|
||||||
{
|
{
|
||||||
m_regionLocX = ConvertFrom.RegionLocX;
|
m_regionLocX = ConvertFrom.RegionLocX;
|
||||||
|
@ -55,9 +51,9 @@ namespace OpenSim.Framework
|
||||||
m_remotingPort = ConvertFrom.RemotingPort;
|
m_remotingPort = ConvertFrom.RemotingPort;
|
||||||
RemotingAddress = ConvertFrom.RemotingAddress;
|
RemotingAddress = ConvertFrom.RemotingAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SearializableRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
|
public SearializableRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_regionLocX = regionLocX;
|
m_regionLocX = regionLocX;
|
||||||
m_regionLocY = regionLocY;
|
m_regionLocY = regionLocY;
|
||||||
|
|
||||||
|
@ -78,16 +74,11 @@ namespace OpenSim.Framework
|
||||||
public Guid RegionID = LLUUID.Zero.UUID;
|
public Guid RegionID = LLUUID.Zero.UUID;
|
||||||
|
|
||||||
public uint m_remotingPort;
|
public uint m_remotingPort;
|
||||||
|
|
||||||
public uint RemotingPort
|
public uint RemotingPort
|
||||||
{
|
{
|
||||||
get
|
get { return m_remotingPort; }
|
||||||
{
|
set { m_remotingPort = value; }
|
||||||
return m_remotingPort;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_remotingPort = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string RemotingAddress;
|
public string RemotingAddress;
|
||||||
|
@ -120,77 +111,49 @@ namespace OpenSim.Framework
|
||||||
ia = Adr;
|
ia = Adr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new IPEndPoint(ia, m_internalEndPoint.Port);
|
return new IPEndPoint(ia, m_internalEndPoint.Port);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set { m_externalHostName = value.ToString(); }
|
||||||
{
|
|
||||||
m_externalHostName = value.ToString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string m_externalHostName;
|
protected string m_externalHostName;
|
||||||
|
|
||||||
public string ExternalHostName
|
public string ExternalHostName
|
||||||
{
|
{
|
||||||
get
|
get { return m_externalHostName; }
|
||||||
{
|
set { m_externalHostName = value; }
|
||||||
return m_externalHostName;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_externalHostName = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IPEndPoint m_internalEndPoint;
|
protected IPEndPoint m_internalEndPoint;
|
||||||
|
|
||||||
public IPEndPoint InternalEndPoint
|
public IPEndPoint InternalEndPoint
|
||||||
{
|
{
|
||||||
get
|
get { return m_internalEndPoint; }
|
||||||
{
|
set { m_internalEndPoint = value; }
|
||||||
return m_internalEndPoint;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_internalEndPoint = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected uint? m_regionLocX;
|
protected uint? m_regionLocX;
|
||||||
|
|
||||||
public uint RegionLocX
|
public uint RegionLocX
|
||||||
{
|
{
|
||||||
get
|
get { return m_regionLocX.Value; }
|
||||||
{
|
set { m_regionLocX = value; }
|
||||||
return m_regionLocX.Value;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_regionLocX = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected uint? m_regionLocY;
|
protected uint? m_regionLocY;
|
||||||
|
|
||||||
public uint RegionLocY
|
public uint RegionLocY
|
||||||
{
|
{
|
||||||
get
|
get { return m_regionLocY.Value; }
|
||||||
{
|
set { m_regionLocY = value; }
|
||||||
return m_regionLocY.Value;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_regionLocY = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ulong RegionHandle
|
public ulong RegionHandle
|
||||||
{
|
{
|
||||||
get
|
get { return Util.UIntsToLong((RegionLocX*256), (RegionLocY*256)); }
|
||||||
{
|
|
||||||
return Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -194,13 +194,10 @@ namespace OpenSim.Framework.Servers
|
||||||
string[] rHeaders = request.Headers.AllKeys;
|
string[] rHeaders = request.Headers.AllKeys;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (string queryname in querystringkeys)
|
foreach (string queryname in querystringkeys)
|
||||||
{
|
{
|
||||||
keysvals.Add(queryname, request.QueryString[queryname]);
|
keysvals.Add(queryname, request.QueryString[queryname]);
|
||||||
MainLog.Instance.Warn("HTTP", queryname + "=" + request.QueryString[queryname]);
|
MainLog.Instance.Warn("HTTP", queryname + "=" + request.QueryString[queryname]);
|
||||||
|
|
||||||
}
|
}
|
||||||
foreach (string headername in rHeaders)
|
foreach (string headername in rHeaders)
|
||||||
{
|
{
|
||||||
|
@ -218,7 +215,6 @@ namespace OpenSim.Framework.Servers
|
||||||
string methodName = xmlRprcRequest.MethodName;
|
string methodName = xmlRprcRequest.MethodName;
|
||||||
if (methodName != null)
|
if (methodName != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
XmlRpcResponse xmlRpcResponse;
|
XmlRpcResponse xmlRpcResponse;
|
||||||
|
|
||||||
XmlRpcMethod method;
|
XmlRpcMethod method;
|
||||||
|
@ -266,6 +262,7 @@ namespace OpenSim.Framework.Servers
|
||||||
response.OutputStream.Close();
|
response.OutputStream.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleHTTPRequest(Hashtable keysvals, HttpListenerRequest request, HttpListenerResponse response)
|
public void HandleHTTPRequest(Hashtable keysvals, HttpListenerRequest request, HttpListenerResponse response)
|
||||||
{
|
{
|
||||||
// This is a test. There's a workable alternative.. as this way sucks.
|
// This is a test. There's a workable alternative.. as this way sucks.
|
||||||
|
@ -282,10 +279,12 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
if ((string) keysvals["show_login_form"] == "TRUE")
|
if ((string) keysvals["show_login_form"] == "TRUE")
|
||||||
{
|
{
|
||||||
string responseString = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
|
string responseString =
|
||||||
|
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
|
||||||
responseString = responseString + "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
|
responseString = responseString + "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
|
||||||
responseString = responseString + "<head>";
|
responseString = responseString + "<head>";
|
||||||
responseString = responseString + "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";
|
responseString = responseString +
|
||||||
|
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";
|
||||||
responseString = responseString + "<meta http-equiv=\"cache-control\" content=\"no-cache\">";
|
responseString = responseString + "<meta http-equiv=\"cache-control\" content=\"no-cache\">";
|
||||||
responseString = responseString + "<meta http-equiv=\"Pragma\" content=\"no-cache\">";
|
responseString = responseString + "<meta http-equiv=\"Pragma\" content=\"no-cache\">";
|
||||||
responseString = responseString + "<title>Second Life Login</title>";
|
responseString = responseString + "<title>Second Life Login</title>";
|
||||||
|
@ -299,37 +298,50 @@ namespace OpenSim.Framework.Servers
|
||||||
responseString = responseString + "</div>";
|
responseString = responseString + "</div>";
|
||||||
responseString = responseString + "<fieldset id=\"firstname\">";
|
responseString = responseString + "<fieldset id=\"firstname\">";
|
||||||
responseString = responseString + "<legend>First Name:</legend>";
|
responseString = responseString + "<legend>First Name:</legend>";
|
||||||
responseString = responseString + "<input type=\"text\" id=\"firstname_input\" size=\"15\" maxlength=\"100\" name=\"username\" value=\"" + keysvals["username"] + "\" />";
|
responseString = responseString +
|
||||||
|
"<input type=\"text\" id=\"firstname_input\" size=\"15\" maxlength=\"100\" name=\"username\" value=\"" +
|
||||||
|
keysvals["username"] + "\" />";
|
||||||
responseString = responseString + "</fieldset>";
|
responseString = responseString + "</fieldset>";
|
||||||
responseString = responseString + "<fieldset id=\"lastname\">";
|
responseString = responseString + "<fieldset id=\"lastname\">";
|
||||||
responseString = responseString + "<legend>Last Name:</legend>";
|
responseString = responseString + "<legend>Last Name:</legend>";
|
||||||
responseString = responseString + "<input type=\"text\" size=\"15\" maxlength=\"100\" name=\"lastname\" value=\"" + keysvals["lastname"] + "\" />";
|
responseString = responseString +
|
||||||
|
"<input type=\"text\" size=\"15\" maxlength=\"100\" name=\"lastname\" value=\"" +
|
||||||
|
keysvals["lastname"] + "\" />";
|
||||||
responseString = responseString + "</fieldset>";
|
responseString = responseString + "</fieldset>";
|
||||||
responseString = responseString + "<fieldset id=\"password\">";
|
responseString = responseString + "<fieldset id=\"password\">";
|
||||||
responseString = responseString + "<legend>Password:</legend>";
|
responseString = responseString + "<legend>Password:</legend>";
|
||||||
responseString = responseString + "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
|
responseString = responseString + "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
|
||||||
responseString = responseString + "<tr>";
|
responseString = responseString + "<tr>";
|
||||||
responseString = responseString + "<td colspan=\"2\"><input type=\"password\" size=\"15\" maxlength=\"100\" name=\"password\" value=\"" + keysvals["password"] + "\" /></td>";
|
responseString = responseString +
|
||||||
|
"<td colspan=\"2\"><input type=\"password\" size=\"15\" maxlength=\"100\" name=\"password\" value=\"" +
|
||||||
|
keysvals["password"] + "\" /></td>";
|
||||||
responseString = responseString + "</tr>";
|
responseString = responseString + "</tr>";
|
||||||
responseString = responseString + "<tr>";
|
responseString = responseString + "<tr>";
|
||||||
responseString = responseString + "<td valign=\"middle\"><input type=\"checkbox\" name=\"remember_password\" id=\"remember_password\" value=\"" + keysvals["remember_password"] + "\" checked style=\"margin-left:0px;\"/></td>";
|
responseString = responseString +
|
||||||
|
"<td valign=\"middle\"><input type=\"checkbox\" name=\"remember_password\" id=\"remember_password\" value=\"" +
|
||||||
|
keysvals["remember_password"] + "\" checked style=\"margin-left:0px;\"/></td>";
|
||||||
responseString = responseString + "<td><label for=\"remember_password\">Remember password</label></td>";
|
responseString = responseString + "<td><label for=\"remember_password\">Remember password</label></td>";
|
||||||
responseString = responseString + "</tr>";
|
responseString = responseString + "</tr>";
|
||||||
responseString = responseString + "</table>";
|
responseString = responseString + "</table>";
|
||||||
responseString = responseString + "</fieldset>";
|
responseString = responseString + "</fieldset>";
|
||||||
responseString = responseString + "<input type=\"hidden\" name=\"show_login_form\" value=\"FALSE\" />";
|
responseString = responseString + "<input type=\"hidden\" name=\"show_login_form\" value=\"FALSE\" />";
|
||||||
responseString = responseString + "<input type=\"hidden\" id=\"grid\" name=\"grid\" value=\"" + keysvals["grid"] + "\" />";
|
responseString = responseString + "<input type=\"hidden\" id=\"grid\" name=\"grid\" value=\"" +
|
||||||
|
keysvals["grid"] + "\" />";
|
||||||
responseString = responseString + "<div id=\"submitbtn\">";
|
responseString = responseString + "<div id=\"submitbtn\">";
|
||||||
responseString = responseString + "<input class=\"input_over\" type=\"submit\" value=\"Connect\" />";
|
responseString = responseString + "<input class=\"input_over\" type=\"submit\" value=\"Connect\" />";
|
||||||
responseString = responseString + "</div>";
|
responseString = responseString + "</div>";
|
||||||
responseString = responseString + "<div id=\"connecting\" style=\"visibility:hidden\"><img src=\"/_img/sl_logo_rotate_black.gif\" align=\"absmiddle\"> Connecting...</div>";
|
responseString = responseString +
|
||||||
|
"<div id=\"connecting\" style=\"visibility:hidden\"><img src=\"/_img/sl_logo_rotate_black.gif\" align=\"absmiddle\"> Connecting...</div>";
|
||||||
|
|
||||||
responseString = responseString + "<div id=\"helplinks\">";
|
responseString = responseString + "<div id=\"helplinks\">";
|
||||||
responseString = responseString + "<a href=\"http://www.secondlife.com/join/index.php\" target=\"_blank\">Create new account</a> | ";
|
responseString = responseString +
|
||||||
responseString = responseString + "<a href=\"http://www.secondlife.com/account/request.php\" target=\"_blank\">Forgot password?</a>";
|
"<a href=\"http://www.secondlife.com/join/index.php\" target=\"_blank\">Create new account</a> | ";
|
||||||
|
responseString = responseString +
|
||||||
|
"<a href=\"http://www.secondlife.com/account/request.php\" target=\"_blank\">Forgot password?</a>";
|
||||||
responseString = responseString + "</div>";
|
responseString = responseString + "</div>";
|
||||||
|
|
||||||
responseString = responseString + "<div id=\"channelinfo\"> " + keysvals["channel"] + " | " + keysvals["version"] + "=" + keysvals["lang"] + "</div>";
|
responseString = responseString + "<div id=\"channelinfo\"> " + keysvals["channel"] + " | " +
|
||||||
|
keysvals["version"] + "=" + keysvals["lang"] + "</div>";
|
||||||
responseString = responseString + "</form>";
|
responseString = responseString + "</form>";
|
||||||
responseString = responseString + "<script language=\"JavaScript\">";
|
responseString = responseString + "<script language=\"JavaScript\">";
|
||||||
responseString = responseString + "document.getElementById('firstname_input').focus();";
|
responseString = responseString + "document.getElementById('firstname_input').focus();";
|
||||||
|
@ -371,12 +383,14 @@ namespace OpenSim.Framework.Servers
|
||||||
//
|
//
|
||||||
|
|
||||||
response.StatusCode = 301;
|
response.StatusCode = 301;
|
||||||
response.RedirectLocation = "secondlife:///app/login?first_name=" + keysvals["username"] + "&last_name=" + keysvals["lastname"] + "&location=home&grid=Other&web_login_key=796f2b2a-0131-41e4-af12-00f60c24c458";
|
response.RedirectLocation = "secondlife:///app/login?first_name=" + keysvals["username"] + "&last_name=" +
|
||||||
|
keysvals["lastname"] +
|
||||||
|
"&location=home&grid=Other&web_login_key=796f2b2a-0131-41e4-af12-00f60c24c458";
|
||||||
|
|
||||||
response.OutputStream.Close();
|
response.OutputStream.Close();
|
||||||
} // show_login_form == "FALSE"
|
} // show_login_form == "FALSE"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("HTTPD", "Starting up HTTP Server");
|
MainLog.Instance.Verbose("HTTPD", "Starting up HTTP Server");
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -65,12 +65,10 @@ namespace OpenSim.Framework.Servers
|
||||||
TResponse deserial = default(TResponse);
|
TResponse deserial = default(TResponse);
|
||||||
using (WebResponse resp = request.GetResponse())
|
using (WebResponse resp = request.GetResponse())
|
||||||
{
|
{
|
||||||
|
|
||||||
XmlSerializer deserializer = new XmlSerializer(typeof (TResponse));
|
XmlSerializer deserializer = new XmlSerializer(typeof (TResponse));
|
||||||
deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream());
|
deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream());
|
||||||
}
|
}
|
||||||
return deserial;
|
return deserial;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -76,7 +76,8 @@ namespace OpenSim.Framework
|
||||||
configMember.addConfigurationOption("default_inventory_server",
|
configMember.addConfigurationOption("default_inventory_server",
|
||||||
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||||
"Default Inventory Server URI",
|
"Default Inventory Server URI",
|
||||||
"http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString() + "/", false);
|
"http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString() + "/",
|
||||||
|
false);
|
||||||
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
||||||
"DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
|
"DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,6 @@ namespace OpenSim.Framework
|
||||||
//{
|
//{
|
||||||
//}
|
//}
|
||||||
//}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Information about a users session
|
/// Information about a users session
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -46,7 +46,8 @@ namespace OpenSim.Framework
|
||||||
private static object XferLock = new object();
|
private static object XferLock = new object();
|
||||||
private static Dictionary<LLUUID, string> capsURLS = new Dictionary<LLUUID, string>();
|
private static Dictionary<LLUUID, string> capsURLS = new Dictionary<LLUUID, string>();
|
||||||
|
|
||||||
public static double GetDistanceTo(LLVector3 a, LLVector3 b) {
|
public static double GetDistanceTo(LLVector3 a, LLVector3 b)
|
||||||
|
{
|
||||||
float dx = a.X - b.X;
|
float dx = a.X - b.X;
|
||||||
float dy = a.Y - b.Y;
|
float dy = a.Y - b.Y;
|
||||||
float dz = a.Z - b.Z;
|
float dz = a.Z - b.Z;
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
using System;
|
using System;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
@ -37,17 +36,17 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public sLLVector3()
|
public sLLVector3()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public sLLVector3(LLVector3 v)
|
public sLLVector3(LLVector3 v)
|
||||||
{
|
{
|
||||||
x = v.X;
|
x = v.X;
|
||||||
y = v.Y;
|
y = v.Y;
|
||||||
z = v.Z;
|
z = v.Z;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float x;
|
public float x;
|
||||||
public float y;
|
public float y;
|
||||||
public float z;
|
public float z;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -713,7 +713,8 @@ namespace OpenSim.Grid.GridServer
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("DATA", "Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
|
MainLog.Instance.Verbose("DATA",
|
||||||
|
"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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -28,11 +28,10 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using libsecondlife;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using libsecondlife;
|
|
||||||
|
|
||||||
namespace OpenSim.Grid.InventoryServer
|
namespace OpenSim.Grid.InventoryServer
|
||||||
{
|
{
|
||||||
|
@ -41,10 +40,10 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack,
|
public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack,
|
||||||
InventoryItemInfo itemCallBack)
|
InventoryItemInfo itemCallBack)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool TryGetUsersInventory(LLUUID userID, out List<InventoryFolderBase> folderList, out List<InventoryItemBase> itemsList)
|
private bool TryGetUsersInventory(LLUUID userID, out List<InventoryFolderBase> folderList,
|
||||||
|
out List<InventoryItemBase> itemsList)
|
||||||
{
|
{
|
||||||
List<InventoryFolderBase> rootFolders = RequestFirstLevelFolders(userID);
|
List<InventoryFolderBase> rootFolders = RequestFirstLevelFolders(userID);
|
||||||
List<InventoryItemBase> allItems = new List<InventoryItemBase>();
|
List<InventoryItemBase> allItems = new List<InventoryItemBase>();
|
||||||
|
|
|
@ -25,26 +25,23 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Collections;
|
using System.Text;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
|
|
||||||
namespace OpenSim.Grid.InventoryServer
|
namespace OpenSim.Grid.InventoryServer
|
||||||
{
|
{
|
||||||
|
|
||||||
public class InventoryManager
|
public class InventoryManager
|
||||||
{
|
{
|
||||||
IInventoryData _databasePlugin;
|
private IInventoryData _databasePlugin;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a new inventory server plugin - user servers will be requested in the order they were loaded.
|
/// Adds a new inventory server plugin - user servers will be requested in the order they were loaded.
|
||||||
|
@ -55,7 +52,8 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
MainLog.Instance.Verbose(OpenInventory_Main.LogName, "Invenstorage: Attempting to load " + FileName);
|
MainLog.Instance.Verbose(OpenInventory_Main.LogName, "Invenstorage: Attempting to load " + FileName);
|
||||||
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
||||||
|
|
||||||
MainLog.Instance.Verbose(OpenInventory_Main.LogName, "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
|
MainLog.Instance.Verbose(OpenInventory_Main.LogName,
|
||||||
|
"Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
|
||||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||||
{
|
{
|
||||||
if (!pluginType.IsAbstract)
|
if (!pluginType.IsAbstract)
|
||||||
|
@ -64,10 +62,12 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
|
|
||||||
if (typeInterface != null)
|
if (typeInterface != null)
|
||||||
{
|
{
|
||||||
IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
IInventoryData plug =
|
||||||
|
(IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||||
plug.Initialise();
|
plug.Initialise();
|
||||||
_databasePlugin = plug;
|
_databasePlugin = plug;
|
||||||
MainLog.Instance.Verbose(OpenInventory_Main.LogName, "Invenstorage: Added IInventoryData Interface");
|
MainLog.Instance.Verbose(OpenInventory_Main.LogName,
|
||||||
|
"Invenstorage: Added IInventoryData Interface");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,8 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
x.Serialize(writer, inventory);
|
x.Serialize(writer, inventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static bool fixupFolder(SerializableInventory.SerializableFolder f, SerializableInventory.SerializableFolder parent)
|
protected static bool fixupFolder(SerializableInventory.SerializableFolder f,
|
||||||
|
SerializableInventory.SerializableFolder parent)
|
||||||
{
|
{
|
||||||
bool modified = false;
|
bool modified = false;
|
||||||
|
|
||||||
|
@ -142,6 +143,7 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
{
|
{
|
||||||
private SerializableInventory _inventory;
|
private SerializableInventory _inventory;
|
||||||
private InventoryManager _manager;
|
private InventoryManager _manager;
|
||||||
|
|
||||||
public GetInventory(InventoryManager manager)
|
public GetInventory(InventoryManager manager)
|
||||||
: base("GET", "/inventory")
|
: base("GET", "/inventory")
|
||||||
{
|
{
|
||||||
|
@ -170,14 +172,15 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID);
|
InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID);
|
||||||
if (fb == null)
|
if (fb == null)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Notice(OpenInventory_Main.LogName, "Inventory not found for user {0}, creating new", userID.ToString());
|
MainLog.Instance.Notice(OpenInventory_Main.LogName, "Inventory not found for user {0}, creating new",
|
||||||
|
userID.ToString());
|
||||||
CreateDefaultInventory(userID);
|
CreateDefaultInventory(userID);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
override public byte[] Handle(string path, Stream request)
|
public override byte[] Handle(string path, Stream request)
|
||||||
{
|
{
|
||||||
byte[] result = new byte[] {};
|
byte[] result = new byte[] {};
|
||||||
|
|
||||||
|
|
|
@ -25,29 +25,23 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
|
|
||||||
using InventoryManager = OpenSim.Grid.InventoryServer.InventoryManager;
|
|
||||||
|
|
||||||
namespace OpenSim.Grid.InventoryServer
|
namespace OpenSim.Grid.InventoryServer
|
||||||
{
|
{
|
||||||
public class OpenInventory_Main : conscmd_callback
|
public class OpenInventory_Main : conscmd_callback
|
||||||
{
|
{
|
||||||
LogBase m_console;
|
private LogBase m_console;
|
||||||
InventoryManager m_inventoryManager;
|
private InventoryManager m_inventoryManager;
|
||||||
InventoryConfig m_config;
|
private InventoryConfig m_config;
|
||||||
GridInventoryService m_inventoryService;
|
private GridInventoryService m_inventoryService;
|
||||||
|
|
||||||
public const string LogName = "INVENTORY";
|
public const string LogName = "INVENTORY";
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,8 @@ namespace OpenSim.Grid.UserServer
|
||||||
tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
|
tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
|
||||||
|
|
||||||
LLUUID userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
|
LLUUID userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
|
||||||
RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID);
|
RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/",
|
||||||
|
userID.UUID);
|
||||||
m_lastCreatedUser = userID;
|
m_lastCreatedUser = userID;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -157,14 +158,20 @@ namespace OpenSim.Grid.UserServer
|
||||||
// RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>();
|
// RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>();
|
||||||
// requester.ReturnResponseVal = TestResponse;
|
// requester.ReturnResponseVal = TestResponse;
|
||||||
// requester.BeginPostObject<LLUUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser);
|
// requester.BeginPostObject<LLUUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser);
|
||||||
List<InventoryFolderBase> folders = SynchronousRestObjectPoster.BeginPostObject< LLUUID, List<InventoryFolderBase>>("POST",m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser);
|
List<InventoryFolderBase> folders =
|
||||||
|
SynchronousRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>("POST",
|
||||||
|
m_userManager.
|
||||||
|
_config.
|
||||||
|
InventoryUrl +
|
||||||
|
"RootFolders/",
|
||||||
|
m_lastCreatedUser);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TestResponse(List<InventoryFolderBase> resp)
|
public void TestResponse(List<InventoryFolderBase> resp)
|
||||||
{
|
{
|
||||||
System.Console.WriteLine("response got");
|
Console.WriteLine("response got");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*private void ConfigDB(IGenericConfig configData)
|
/*private void ConfigDB(IGenericConfig configData)
|
||||||
|
|
|
@ -29,14 +29,13 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Nwc.XmlRpc;
|
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
using Nwc.XmlRpc;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
|
||||||
using OpenSim.Framework.Data;
|
using OpenSim.Framework.Data;
|
||||||
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.UserManagement;
|
using OpenSim.Framework.UserManagement;
|
||||||
using InventoryFolder=OpenSim.Framework.InventoryFolder;
|
using InventoryFolder=OpenSim.Framework.InventoryFolder;
|
||||||
|
|
||||||
|
@ -157,7 +156,8 @@ namespace OpenSim.Grid.UserServer
|
||||||
theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
|
theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
|
||||||
|
|
||||||
// Destination
|
// Destination
|
||||||
MainLog.Instance.Verbose("LOGIN", "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " +
|
MainLog.Instance.Verbose("LOGIN",
|
||||||
|
"CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " +
|
||||||
SimInfo.regionLocY);
|
SimInfo.regionLocY);
|
||||||
response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString();
|
response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString();
|
||||||
response.SimPort = (uint) SimInfo.serverPort;
|
response.SimPort = (uint) SimInfo.serverPort;
|
||||||
|
@ -202,7 +202,6 @@ namespace OpenSim.Grid.UserServer
|
||||||
MainLog.Instance.Warn("LOGIN", "Default region also not available");
|
MainLog.Instance.Warn("LOGIN", "Default region also not available");
|
||||||
MainLog.Instance.Warn("LOGIN", e.ToString());
|
MainLog.Instance.Warn("LOGIN", e.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -89,6 +90,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts a user profile to an XML element which can be returned
|
/// Converts a user profile to an XML element which can be returned
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -158,7 +160,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
{
|
{
|
||||||
string query = (string) requestData["avatar_name"];
|
string query = (string) requestData["avatar_name"];
|
||||||
|
|
||||||
System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]");
|
Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]");
|
||||||
|
|
||||||
string[] querysplit;
|
string[] querysplit;
|
||||||
querysplit = query.Split(' ');
|
querysplit = query.Split(' ');
|
||||||
|
@ -200,7 +202,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
|
|
||||||
userProfile = GetUserProfile(guess);
|
userProfile = GetUserProfile(guess);
|
||||||
}
|
}
|
||||||
catch (System.FormatException)
|
catch (FormatException)
|
||||||
{
|
{
|
||||||
return CreateUnknownUserErrorResponse();
|
return CreateUnknownUserErrorResponse();
|
||||||
}
|
}
|
||||||
|
@ -231,7 +233,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
throw new Exception("The method or operation is not implemented.");
|
throw new Exception("The method or operation is not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override UserProfileData SetupMasterUser(libsecondlife.LLUUID uuid)
|
public override UserProfileData SetupMasterUser(LLUUID uuid)
|
||||||
{
|
{
|
||||||
throw new Exception("The method or operation is not implemented.");
|
throw new Exception("The method or operation is not implemented.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -26,13 +26,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using Mono.Addins;
|
using Mono.Addins;
|
||||||
using Mono.Addins.Description;
|
|
||||||
|
|
||||||
[assembly : AddinRoot("OpenSim", "0.4")]
|
[assembly : AddinRoot("OpenSim", "0.4")]
|
||||||
|
|
||||||
namespace OpenSim
|
namespace OpenSim
|
||||||
{
|
{
|
||||||
[TypeExtensionPoint("/OpenSim/Startup")]
|
[TypeExtensionPoint("/OpenSim/Startup")]
|
||||||
|
|
|
@ -30,6 +30,10 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Timers;
|
||||||
|
using libsecondlife;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
|
@ -42,9 +46,7 @@ using OpenSim.Region.Environment;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.Physics.Manager;
|
||||||
using libsecondlife;
|
using Timer=System.Timers.Timer;
|
||||||
using Mono.Addins;
|
|
||||||
using Mono.Addins.Description;
|
|
||||||
|
|
||||||
namespace OpenSim
|
namespace OpenSim
|
||||||
{
|
{
|
||||||
|
@ -86,7 +88,7 @@ namespace OpenSim
|
||||||
private string m_assetStorage = "sqlite";
|
private string m_assetStorage = "sqlite";
|
||||||
|
|
||||||
private string m_timedScript = "disabled";
|
private string m_timedScript = "disabled";
|
||||||
private System.Timers.Timer m_scriptTimer;
|
private Timer m_scriptTimer;
|
||||||
|
|
||||||
public ConsoleCommand CreateAccount = null;
|
public ConsoleCommand CreateAccount = null;
|
||||||
private bool m_dumpAssetsToFile;
|
private bool m_dumpAssetsToFile;
|
||||||
|
@ -353,10 +355,10 @@ namespace OpenSim
|
||||||
|
|
||||||
if (m_timedScript != "disabled")
|
if (m_timedScript != "disabled")
|
||||||
{
|
{
|
||||||
m_scriptTimer = new System.Timers.Timer();
|
m_scriptTimer = new Timer();
|
||||||
m_scriptTimer.Enabled = true;
|
m_scriptTimer.Enabled = true;
|
||||||
m_scriptTimer.Interval = (int) (1200*1000);
|
m_scriptTimer.Interval = (int) (1200*1000);
|
||||||
m_scriptTimer.Elapsed += new System.Timers.ElapsedEventHandler(RunAutoTimerScript);
|
m_scriptTimer.Elapsed += new ElapsedEventHandler(RunAutoTimerScript);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,11 +404,13 @@ namespace OpenSim
|
||||||
SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager);
|
SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager);
|
||||||
if (m_SendChildAgentTaskData)
|
if (m_SendChildAgentTaskData)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("WARNING", "Send Child Agent Task Updates is enabled. This is for testing only. It doesn't work on grid mode!");
|
MainLog.Instance.Error("WARNING",
|
||||||
System.Threading.Thread.Sleep(12000);
|
"Send Child Agent Task Updates is enabled. This is for testing only. It doesn't work on grid mode!");
|
||||||
|
Thread.Sleep(12000);
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
new Scene(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer,
|
new Scene(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService, m_assetCache,
|
||||||
|
storageManager, m_httpServer,
|
||||||
m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_SendChildAgentTaskData);
|
m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_SendChildAgentTaskData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,7 +444,6 @@ namespace OpenSim
|
||||||
m_assetCache = new AssetCache(assetServer, m_log);
|
m_assetCache = new AssetCache(assetServer, m_log);
|
||||||
// m_assetCache = new assetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey);
|
// m_assetCache = new assetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey);
|
||||||
m_sceneManager.OnRestartSim += handleRestartRegion;
|
m_sceneManager.OnRestartSim += handleRestartRegion;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleRestartRegion(RegionInfo whichRegion)
|
public void handleRestartRegion(RegionInfo whichRegion)
|
||||||
|
@ -557,6 +560,7 @@ namespace OpenSim
|
||||||
RunCommandScript(m_timedScript);
|
RunCommandScript(m_timedScript);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Console Commands
|
#region Console Commands
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -680,9 +684,16 @@ namespace OpenSim
|
||||||
if (cmdparams.Length > 2)
|
if (cmdparams.Length > 2)
|
||||||
{
|
{
|
||||||
loadOffset.X = (float) Convert.ToDecimal(cmdparams[2]);
|
loadOffset.X = (float) Convert.ToDecimal(cmdparams[2]);
|
||||||
if (cmdparams.Length > 3) { loadOffset.Y = (float)Convert.ToDecimal(cmdparams[3]); }
|
if (cmdparams.Length > 3)
|
||||||
if (cmdparams.Length > 4) { loadOffset.Z = (float)Convert.ToDecimal(cmdparams[4]); }
|
{
|
||||||
m_log.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," + loadOffset.Z + ">");
|
loadOffset.Y = (float) Convert.ToDecimal(cmdparams[3]);
|
||||||
|
}
|
||||||
|
if (cmdparams.Length > 4)
|
||||||
|
{
|
||||||
|
loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]);
|
||||||
|
}
|
||||||
|
m_log.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," +
|
||||||
|
loadOffset.Z + ">");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset);
|
m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset);
|
||||||
|
@ -800,7 +811,8 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("CONSOLE", "Current Region: " + m_sceneManager.CurrentScene.RegionInfo.RegionName +
|
MainLog.Instance.Verbose("CONSOLE",
|
||||||
|
"Current Region: " + m_sceneManager.CurrentScene.RegionInfo.RegionName +
|
||||||
". To change region please use 'change-region <regioname>'");
|
". To change region please use 'change-region <regioname>'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -901,9 +913,12 @@ namespace OpenSim
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "regions":
|
case "regions":
|
||||||
m_sceneManager.ForEachScene(delegate(Scene scene)
|
m_sceneManager.ForEachScene(
|
||||||
|
delegate(Scene scene)
|
||||||
{
|
{
|
||||||
m_log.Error("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + scene.RegionInfo.RegionLocX + " , Region YLoc: " + scene.RegionInfo.RegionLocY);
|
m_log.Error("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " +
|
||||||
|
scene.RegionInfo.RegionLocX + " , Region YLoc: " +
|
||||||
|
scene.RegionInfo.RegionLocY);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ using libsecondlife.Packets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using Timer=System.Timers.Timer;
|
using Timer=System.Timers.Timer;
|
||||||
|
|
||||||
namespace OpenSim.Region.ClientStack
|
namespace OpenSim.Region.ClientStack
|
||||||
|
@ -74,6 +75,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
private readonly byte[] m_channelVersion = new byte[] {0x00}; // Dummy value needed by libSL
|
private readonly byte[] m_channelVersion = new byte[] {0x00}; // Dummy value needed by libSL
|
||||||
|
|
||||||
/* protected variables */
|
/* protected variables */
|
||||||
|
|
||||||
protected static Dictionary<PacketType, PacketMethod> PacketHandlers =
|
protected static Dictionary<PacketType, PacketMethod> PacketHandlers =
|
||||||
new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients
|
new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients
|
||||||
|
|
||||||
|
@ -103,6 +105,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
protected EndPoint m_userEndPoint;
|
protected EndPoint m_userEndPoint;
|
||||||
|
|
||||||
/* Properties */
|
/* Properties */
|
||||||
|
|
||||||
public LLUUID SecureSessionId
|
public LLUUID SecureSessionId
|
||||||
{
|
{
|
||||||
get { return m_secureSessionId; }
|
get { return m_secureSessionId; }
|
||||||
|
@ -165,7 +168,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
/* METHODS */
|
/* METHODS */
|
||||||
|
|
||||||
public ClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode)
|
public ClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, PacketServer packServer,
|
||||||
|
AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode)
|
||||||
{
|
{
|
||||||
m_moneyBalance = 1000;
|
m_moneyBalance = 1000;
|
||||||
|
|
||||||
|
@ -209,7 +213,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
private void CloseCleanup()
|
private void CloseCleanup()
|
||||||
{
|
{
|
||||||
|
|
||||||
m_scene.RemoveClient(AgentId);
|
m_scene.RemoveClient(AgentId);
|
||||||
// Send the STOP packet
|
// Send the STOP packet
|
||||||
DisableSimulatorPacket disable = new DisableSimulatorPacket();
|
DisableSimulatorPacket disable = new DisableSimulatorPacket();
|
||||||
|
@ -223,9 +226,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
Thread.Sleep(2000);
|
Thread.Sleep(2000);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Shut down timers
|
// Shut down timers
|
||||||
m_ackTimer.Stop();
|
m_ackTimer.Stop();
|
||||||
m_clientPingTimer.Stop();
|
m_clientPingTimer.Stop();
|
||||||
|
@ -243,7 +243,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
public void Close(bool ShutdownCircult)
|
public void Close(bool ShutdownCircult)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Pull Client out of Region
|
// Pull Client out of Region
|
||||||
MainLog.Instance.Verbose("CLIENT", "Close has been called");
|
MainLog.Instance.Verbose("CLIENT", "Close has been called");
|
||||||
|
|
||||||
|
@ -253,8 +252,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
|
|
||||||
CloseCleanup();
|
CloseCleanup();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Kick(string message)
|
public void Kick(string message)
|
||||||
|
@ -561,7 +558,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
/// <param name="regionInfo"></param>
|
/// <param name="regionInfo"></param>
|
||||||
public void SendRegionHandshake(RegionInfo regionInfo)
|
public void SendRegionHandshake(RegionInfo regionInfo)
|
||||||
{
|
{
|
||||||
RegionHandshakePacket handshake = (RegionHandshakePacket) PacketPool.Instance.GetPacket(PacketType.RegionHandshake);
|
RegionHandshakePacket handshake =
|
||||||
|
(RegionHandshakePacket) PacketPool.Instance.GetPacket(PacketType.RegionHandshake);
|
||||||
|
|
||||||
handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor;
|
handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor;
|
||||||
handshake.RegionInfo.IsEstateManager = false;
|
handshake.RegionInfo.IsEstateManager = false;
|
||||||
|
@ -861,7 +859,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
public void SendTeleportFailed()
|
public void SendTeleportFailed()
|
||||||
{
|
{
|
||||||
TeleportFailedPacket tpFailed = new TeleportFailedPacket();
|
TeleportFailedPacket tpFailed = new TeleportFailedPacket();
|
||||||
tpFailed.Info.AgentID = this.AgentId;
|
tpFailed.Info.AgentID = AgentId;
|
||||||
tpFailed.Info.Reason = Helpers.StringToField("unknown failure of teleport");
|
tpFailed.Info.Reason = Helpers.StringToField("unknown failure of teleport");
|
||||||
OutPacket(tpFailed, ThrottleOutPacketType.Task);
|
OutPacket(tpFailed, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
@ -984,10 +982,13 @@ namespace OpenSim.Region.ClientStack
|
||||||
descend.ItemData[i].CRC =
|
descend.ItemData[i].CRC =
|
||||||
Helpers.InventoryCRC(descend.ItemData[i].CreationDate, descend.ItemData[i].SaleType,
|
Helpers.InventoryCRC(descend.ItemData[i].CreationDate, descend.ItemData[i].SaleType,
|
||||||
descend.ItemData[i].InvType, descend.ItemData[i].Type,
|
descend.ItemData[i].InvType, descend.ItemData[i].Type,
|
||||||
descend.ItemData[i].AssetID, descend.ItemData[i].GroupID, descend.ItemData[i].SalePrice,
|
descend.ItemData[i].AssetID, descend.ItemData[i].GroupID,
|
||||||
|
descend.ItemData[i].SalePrice,
|
||||||
descend.ItemData[i].OwnerID, descend.ItemData[i].CreatorID,
|
descend.ItemData[i].OwnerID, descend.ItemData[i].CreatorID,
|
||||||
descend.ItemData[i].ItemID, descend.ItemData[i].FolderID, descend.ItemData[i].EveryoneMask,
|
descend.ItemData[i].ItemID, descend.ItemData[i].FolderID,
|
||||||
descend.ItemData[i].Flags, descend.ItemData[i].OwnerMask, descend.ItemData[i].GroupMask, item.inventoryCurrentPermissions);
|
descend.ItemData[i].EveryoneMask,
|
||||||
|
descend.ItemData[i].Flags, descend.ItemData[i].OwnerMask,
|
||||||
|
descend.ItemData[i].GroupMask, item.inventoryCurrentPermissions);
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
count++;
|
count++;
|
||||||
|
@ -1063,12 +1064,14 @@ namespace OpenSim.Region.ClientStack
|
||||||
descend = CreateInventoryDescendentsPacket(ownerID, folderID);
|
descend = CreateInventoryDescendentsPacket(ownerID, folderID);
|
||||||
if ((folders.Count - count) < MAX_ITEMS_PER_PACKET)
|
if ((folders.Count - count) < MAX_ITEMS_PER_PACKET)
|
||||||
{
|
{
|
||||||
descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders.Count - count];
|
descend.FolderData =
|
||||||
|
new InventoryDescendentsPacket.FolderDataBlock[folders.Count - count];
|
||||||
descend.AgentData.Descendents = folders.Count - count;
|
descend.AgentData.Descendents = folders.Count - count;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[MAX_ITEMS_PER_PACKET];
|
descend.FolderData =
|
||||||
|
new InventoryDescendentsPacket.FolderDataBlock[MAX_ITEMS_PER_PACKET];
|
||||||
descend.AgentData.Descendents = MAX_ITEMS_PER_PACKET;
|
descend.AgentData.Descendents = MAX_ITEMS_PER_PACKET;
|
||||||
}
|
}
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -1204,6 +1207,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
sendXfer.DataPacket.Data = data;
|
sendXfer.DataPacket.Data = data;
|
||||||
OutPacket(sendXfer, ThrottleOutPacketType.Task);
|
OutPacket(sendXfer, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAvatarPickerReply(AvatarPickerReplyPacket replyPacket)
|
public void SendAvatarPickerReply(AvatarPickerReplyPacket replyPacket)
|
||||||
{
|
{
|
||||||
OutPacket(replyPacket, ThrottleOutPacketType.Task);
|
OutPacket(replyPacket, ThrottleOutPacketType.Task);
|
||||||
|
@ -1529,7 +1533,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
public void SendPrimitiveToClient(
|
public void SendPrimitiveToClient(
|
||||||
ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos,
|
ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos,
|
||||||
uint flags,
|
uint flags,
|
||||||
LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction)
|
LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem,
|
||||||
|
LLQuaternion rotation, byte clickAction)
|
||||||
{
|
{
|
||||||
ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
|
ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
|
||||||
outPacket.RegionData.RegionHandle = regionHandle;
|
outPacket.RegionData.RegionHandle = regionHandle;
|
||||||
|
@ -1582,10 +1587,10 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
OutPacket(terse, ThrottleOutPacketType.Task);
|
OutPacket(terse, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
|
public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
|
||||||
LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity)
|
LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity)
|
||||||
{
|
{
|
||||||
|
|
||||||
ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
|
ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
|
||||||
terse.RegionData.RegionHandle = regionHandle;
|
terse.RegionData.RegionHandle = regionHandle;
|
||||||
terse.RegionData.TimeDilation = timeDilation;
|
terse.RegionData.TimeDilation = timeDilation;
|
||||||
|
@ -1595,7 +1600,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
OutPacket(terse, ThrottleOutPacketType.Task);
|
OutPacket(terse, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Helper Methods
|
#region Helper Methods
|
||||||
|
@ -1696,7 +1700,9 @@ namespace OpenSim.Region.ClientStack
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreatePrimImprovedBlock(uint localID,
|
protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreatePrimImprovedBlock(uint localID,
|
||||||
LLVector3 position,
|
LLVector3 position,
|
||||||
LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity)
|
LLQuaternion rotation,
|
||||||
|
LLVector3 velocity,
|
||||||
|
LLVector3 rotationalvelocity)
|
||||||
{
|
{
|
||||||
uint ID = localID;
|
uint ID = localID;
|
||||||
byte[] bytes = new byte[60];
|
byte[] bytes = new byte[60];
|
||||||
|
@ -1993,7 +1999,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket) packet;
|
MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket) packet;
|
||||||
// System.Console.WriteLine("new multi update packet " + multipleupdate.ToString());
|
// System.Console.WriteLine("new multi update packet " + multipleupdate.ToString());
|
||||||
OpenSim.Region.Environment.Scenes.Scene tScene = (OpenSim.Region.Environment.Scenes.Scene)this.m_scene;
|
Scene tScene = (Scene) m_scene;
|
||||||
|
|
||||||
for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
|
for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -2062,7 +2068,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
|
LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
|
||||||
//Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
|
//Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
|
||||||
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
|
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
|
||||||
OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this);
|
OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot,
|
||||||
|
this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -2118,9 +2125,9 @@ namespace OpenSim.Region.ClientStack
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// It's a ghost! tell the client to delete it from view.
|
// It's a ghost! tell the client to delete it from view.
|
||||||
simClient.SendKillObject(this.Scene.RegionInfo.RegionHandle, multipleupdate.ObjectData[i].ObjectLocalID);
|
simClient.SendKillObject(Scene.RegionInfo.RegionHandle,
|
||||||
|
multipleupdate.ObjectData[i].ObjectLocalID);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -2173,10 +2180,12 @@ namespace OpenSim.Region.ClientStack
|
||||||
this.OutPacket(mbReply, ThrottleOutPacketType.Land);
|
this.OutPacket(mbReply, ThrottleOutPacketType.Land);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetChildAgentThrottle(byte[] throttles)
|
public void SetChildAgentThrottle(byte[] throttles)
|
||||||
{
|
{
|
||||||
m_packetQueue.SetThrottleFromClient(throttles);
|
m_packetQueue.SetThrottleFromClient(throttles);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Previously ClientView.m_packetQueue
|
// Previously ClientView.m_packetQueue
|
||||||
|
|
||||||
// A thread safe sequence number allocator.
|
// A thread safe sequence number allocator.
|
||||||
|
@ -2442,6 +2451,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Previously ClientView.ProcessPackets
|
// Previously ClientView.ProcessPackets
|
||||||
|
|
||||||
public bool AddMoney(int debit)
|
public bool AddMoney(int debit)
|
||||||
|
@ -2544,7 +2554,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds,
|
OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds,
|
||||||
modify.ModifyBlock.BrushSize,
|
modify.ModifyBlock.BrushSize,
|
||||||
modify.ModifyBlock.Action, modify.ParcelData[i].North,
|
modify.ModifyBlock.Action, modify.ParcelData[i].North,
|
||||||
modify.ParcelData[i].West, modify.ParcelData[i].South, modify.ParcelData[i].East, this);
|
modify.ParcelData[i].West, modify.ParcelData[i].South,
|
||||||
|
modify.ParcelData[i].East, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2579,7 +2590,9 @@ namespace OpenSim.Region.ClientStack
|
||||||
AvatarWearingArgs wearingArgs = new AvatarWearingArgs();
|
AvatarWearingArgs wearingArgs = new AvatarWearingArgs();
|
||||||
for (int i = 0; i < nowWearing.WearableData.Length; i++)
|
for (int i = 0; i < nowWearing.WearableData.Length; i++)
|
||||||
{
|
{
|
||||||
AvatarWearingArgs.Wearable wearable = new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID, nowWearing.WearableData[i].WearableType);
|
AvatarWearingArgs.Wearable wearable =
|
||||||
|
new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID,
|
||||||
|
nowWearing.WearableData[i].WearableType);
|
||||||
wearingArgs.NowWearing.Add(wearable);
|
wearingArgs.NowWearing.Add(wearable);
|
||||||
}
|
}
|
||||||
OnAvatarNowWearing(this, wearingArgs);
|
OnAvatarNowWearing(this, wearingArgs);
|
||||||
|
@ -2603,7 +2616,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
AgentUpdatePacket agenUpdate = (AgentUpdatePacket) Pack;
|
AgentUpdatePacket agenUpdate = (AgentUpdatePacket) Pack;
|
||||||
|
|
||||||
OnAgentUpdate(this, agenUpdate); //agenUpdate.AgentData.ControlFlags, agenUpdate.AgentData.BodyRotationa);
|
OnAgentUpdate(this, agenUpdate);
|
||||||
|
//agenUpdate.AgentData.ControlFlags, agenUpdate.AgentData.BodyRotationa);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PacketType.AgentAnimation:
|
case PacketType.AgentAnimation:
|
||||||
|
@ -2648,9 +2662,11 @@ namespace OpenSim.Region.ClientStack
|
||||||
//System.Console.WriteLine("Agent Sends:" + Helpers.FieldToUTF8String(querydata.Name));
|
//System.Console.WriteLine("Agent Sends:" + Helpers.FieldToUTF8String(querydata.Name));
|
||||||
if (OnAvatarPickerRequest != null)
|
if (OnAvatarPickerRequest != null)
|
||||||
{
|
{
|
||||||
OnAvatarPickerRequest(this, Requestdata.AgentID, Requestdata.QueryID, Helpers.FieldToUTF8String(querydata.Name));
|
OnAvatarPickerRequest(this, Requestdata.AgentID, Requestdata.QueryID,
|
||||||
|
Helpers.FieldToUTF8String(querydata.Name));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Objects/m_sceneObjects
|
#region Objects/m_sceneObjects
|
||||||
|
@ -2706,7 +2722,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
if (OnUpdatePrimShape != null)
|
if (OnUpdatePrimShape != null)
|
||||||
{
|
{
|
||||||
OnUpdatePrimShape(this.m_agentId, shapePacket.ObjectData[i].ObjectLocalID, shapePacket.ObjectData[i]);
|
OnUpdatePrimShape(m_agentId, shapePacket.ObjectData[i].ObjectLocalID,
|
||||||
|
shapePacket.ObjectData[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2714,7 +2731,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket) Pack;
|
ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket) Pack;
|
||||||
if (OnUpdateExtraParams != null)
|
if (OnUpdateExtraParams != null)
|
||||||
{
|
{
|
||||||
OnUpdateExtraParams(this.m_agentId, extraPar.ObjectData[0].ObjectLocalID, extraPar.ObjectData[0].ParamType,
|
OnUpdateExtraParams(m_agentId, extraPar.ObjectData[0].ObjectLocalID,
|
||||||
|
extraPar.ObjectData[0].ParamType,
|
||||||
extraPar.ObjectData[0].ParamInUse, extraPar.ObjectData[0].ParamData);
|
extraPar.ObjectData[0].ParamInUse, extraPar.ObjectData[0].ParamData);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2726,7 +2744,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
if (OnObjectDuplicate != null)
|
if (OnObjectDuplicate != null)
|
||||||
{
|
{
|
||||||
OnObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset,
|
OnObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset,
|
||||||
dupe.SharedData.DuplicateFlags, AgentandGroupData.AgentID, AgentandGroupData.GroupID);
|
dupe.SharedData.DuplicateFlags, AgentandGroupData.AgentID,
|
||||||
|
AgentandGroupData.GroupID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2809,7 +2828,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
if (OnObjectName != null)
|
if (OnObjectName != null)
|
||||||
{
|
{
|
||||||
OnObjectName(this, objName.ObjectData[i].LocalID, m_encoding.GetString(objName.ObjectData[i].Name));
|
OnObjectName(this, objName.ObjectData[i].LocalID,
|
||||||
|
m_encoding.GetString(objName.ObjectData[i].Name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2817,7 +2837,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
MainLog.Instance.Warn("CLIENT", "unhandled packet " + PacketType.ObjectPermissions.ToString());
|
MainLog.Instance.Warn("CLIENT", "unhandled packet " + PacketType.ObjectPermissions.ToString());
|
||||||
ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket) Pack;
|
ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket) Pack;
|
||||||
|
|
||||||
List<ObjectPermissionsPacket.ObjectDataBlock> permChanges = new List<ObjectPermissionsPacket.ObjectDataBlock>();
|
List<ObjectPermissionsPacket.ObjectDataBlock> permChanges =
|
||||||
|
new List<ObjectPermissionsPacket.ObjectDataBlock>();
|
||||||
|
|
||||||
for (int i = 0; i < newobjPerms.ObjectData.Length; i++)
|
for (int i = 0; i < newobjPerms.ObjectData.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -2854,9 +2875,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
if (OnRequestObjectPropertiesFamily != null)
|
if (OnRequestObjectPropertiesFamily != null)
|
||||||
{
|
{
|
||||||
OnRequestObjectPropertiesFamily(this, this.m_agentId, packObjBlock.RequestFlags, packObjBlock.ObjectID);
|
OnRequestObjectPropertiesFamily(this, m_agentId, packObjBlock.RequestFlags,
|
||||||
|
packObjBlock.ObjectID);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -2898,10 +2918,11 @@ namespace OpenSim.Region.ClientStack
|
||||||
// Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
|
// Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
|
||||||
if (OnAssetUploadRequest != null)
|
if (OnAssetUploadRequest != null)
|
||||||
{
|
{
|
||||||
LLUUID temp=libsecondlife.LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
|
LLUUID temp = LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
|
||||||
OnAssetUploadRequest(this, temp,
|
OnAssetUploadRequest(this, temp,
|
||||||
request.AssetBlock.TransactionID, request.AssetBlock.Type,
|
request.AssetBlock.TransactionID, request.AssetBlock.Type,
|
||||||
request.AssetBlock.AssetData, request.AssetBlock.StoreLocal, request.AssetBlock.Tempfile);
|
request.AssetBlock.AssetData, request.AssetBlock.StoreLocal,
|
||||||
|
request.AssetBlock.Tempfile);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PacketType.RequestXfer:
|
case PacketType.RequestXfer:
|
||||||
|
@ -3051,7 +3072,9 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
foreach (CopyInventoryItemPacket.InventoryDataBlock datablock in copyitem.InventoryData)
|
foreach (CopyInventoryItemPacket.InventoryDataBlock datablock in copyitem.InventoryData)
|
||||||
{
|
{
|
||||||
OnCopyInventoryItem(this, datablock.CallbackID, datablock.OldAgentID, datablock.OldItemID, datablock.NewFolderID, Util.FieldToString(datablock.NewName));
|
OnCopyInventoryItem(this, datablock.CallbackID, datablock.OldAgentID,
|
||||||
|
datablock.OldItemID, datablock.NewFolderID,
|
||||||
|
Util.FieldToString(datablock.NewName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -3061,7 +3084,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData)
|
foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData)
|
||||||
{
|
{
|
||||||
OnMoveInventoryItem(this, datablock.FolderID, datablock.ItemID, datablock.Length, Util.FieldToString(datablock.NewName));
|
OnMoveInventoryItem(this, datablock.FolderID, datablock.ItemID, datablock.Length,
|
||||||
|
Util.FieldToString(datablock.NewName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -3202,11 +3226,14 @@ namespace OpenSim.Region.ClientStack
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#region Parcel related packets
|
#region Parcel related packets
|
||||||
|
|
||||||
case PacketType.ParcelAccessListRequest:
|
case PacketType.ParcelAccessListRequest:
|
||||||
ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket) Pack;
|
ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket) Pack;
|
||||||
if (OnParcelAccessListRequest != null)
|
if (OnParcelAccessListRequest != null)
|
||||||
{
|
{
|
||||||
OnParcelAccessListRequest(requestPacket.AgentData.AgentID, requestPacket.AgentData.SessionID, requestPacket.Data.Flags, requestPacket.Data.SequenceID, requestPacket.Data.LocalID,this);
|
OnParcelAccessListRequest(requestPacket.AgentData.AgentID, requestPacket.AgentData.SessionID,
|
||||||
|
requestPacket.Data.Flags, requestPacket.Data.SequenceID,
|
||||||
|
requestPacket.Data.LocalID, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -3224,7 +3251,9 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
if (OnParcelAccessListUpdateRequest != null)
|
if (OnParcelAccessListUpdateRequest != null)
|
||||||
{
|
{
|
||||||
OnParcelAccessListUpdateRequest(updatePacket.AgentData.AgentID, updatePacket.AgentData.SessionID, updatePacket.Data.Flags, updatePacket.Data.LocalID, entries, this);
|
OnParcelAccessListUpdateRequest(updatePacket.AgentData.AgentID,
|
||||||
|
updatePacket.AgentData.SessionID, updatePacket.Data.Flags,
|
||||||
|
updatePacket.Data.LocalID, entries, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PacketType.ParcelPropertiesRequest:
|
case PacketType.ParcelPropertiesRequest:
|
||||||
|
@ -3304,7 +3333,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
break;
|
break;
|
||||||
case PacketType.EstateCovenantRequest:
|
case PacketType.EstateCovenantRequest:
|
||||||
// TODO: handle this packet
|
// TODO: handle this packet
|
||||||
EstateCovenantRequestPacket.AgentDataBlock epack = ((EstateCovenantRequestPacket)Pack).AgentData;
|
EstateCovenantRequestPacket.AgentDataBlock epack =
|
||||||
|
((EstateCovenantRequestPacket) Pack).AgentData;
|
||||||
if (OnEstateCovenantRequest != null)
|
if (OnEstateCovenantRequest != null)
|
||||||
{
|
{
|
||||||
OnEstateCovenantRequest(this, epack.SessionID);
|
OnEstateCovenantRequest(this, epack.SessionID);
|
||||||
|
@ -3318,6 +3348,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region unimplemented handlers
|
#region unimplemented handlers
|
||||||
|
|
||||||
case PacketType.RequestGodlikePowers:
|
case PacketType.RequestGodlikePowers:
|
||||||
RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket) Pack;
|
RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket) Pack;
|
||||||
RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock;
|
RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock;
|
||||||
|
@ -3332,9 +3363,10 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
GodKickUserPacket gkupack = (GodKickUserPacket) Pack;
|
GodKickUserPacket gkupack = (GodKickUserPacket) Pack;
|
||||||
|
|
||||||
if (gkupack.UserInfo.GodSessionID == SessionId && this.AgentId == gkupack.UserInfo.GodID)
|
if (gkupack.UserInfo.GodSessionID == SessionId && AgentId == gkupack.UserInfo.GodID)
|
||||||
{
|
{
|
||||||
OnGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, gkupack.UserInfo.AgentID, (uint) 0, gkupack.UserInfo.Reason);
|
OnGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID,
|
||||||
|
gkupack.UserInfo.AgentID, (uint) 0, gkupack.UserInfo.Reason);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,17 +27,10 @@
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using Axiom.Math;
|
|
||||||
using libsecondlife;
|
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
|
||||||
using OpenSim.Framework.Console;
|
|
||||||
using Timer=System.Timers.Timer;
|
using Timer=System.Timers.Timer;
|
||||||
|
|
||||||
namespace OpenSim.Region.ClientStack
|
namespace OpenSim.Region.ClientStack
|
||||||
|
@ -121,7 +114,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
// TIMERS needed for this
|
// TIMERS needed for this
|
||||||
// LastThrottle = DateTime.Now.Ticks;
|
// LastThrottle = DateTime.Now.Ticks;
|
||||||
// ThrottleInterval = (long)(throttletimems/throttleTimeDivisor);
|
// ThrottleInterval = (long)(throttletimems/throttleTimeDivisor);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* STANDARD QUEUE MANIPULATION INTERFACES */
|
/* STANDARD QUEUE MANIPULATION INTERFACES */
|
||||||
|
@ -129,11 +121,15 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
public void Enqueue(QueItem item)
|
public void Enqueue(QueItem item)
|
||||||
{
|
{
|
||||||
if (!m_enabled) {return;}
|
if (!m_enabled)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
// We could micro lock, but that will tend to actually
|
// We could micro lock, but that will tend to actually
|
||||||
// probably be worse than just synchronizing on SendQueue
|
// probably be worse than just synchronizing on SendQueue
|
||||||
|
|
||||||
lock (this) {
|
lock (this)
|
||||||
|
{
|
||||||
switch (item.throttleType)
|
switch (item.throttleType)
|
||||||
{
|
{
|
||||||
case ThrottleOutPacketType.Resend:
|
case ThrottleOutPacketType.Resend:
|
||||||
|
@ -174,7 +170,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
public void Flush()
|
public void Flush()
|
||||||
{
|
{
|
||||||
lock(this) {
|
lock (this)
|
||||||
|
{
|
||||||
while (PacketsWaiting())
|
while (PacketsWaiting())
|
||||||
{
|
{
|
||||||
//Now comes the fun part.. we dump all our elements into m_packetQueue that we've saved up.
|
//Now comes the fun part.. we dump all our elements into m_packetQueue that we've saved up.
|
||||||
|
@ -242,7 +239,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
public void ProcessThrottle()
|
public void ProcessThrottle()
|
||||||
{
|
{
|
||||||
|
|
||||||
// I was considering this.. Will an event fire if the thread it's on is blocked?
|
// I was considering this.. Will an event fire if the thread it's on is blocked?
|
||||||
|
|
||||||
// Then I figured out.. it doesn't really matter.. because this thread won't be blocked for long
|
// Then I figured out.. it doesn't really matter.. because this thread won't be blocked for long
|
||||||
|
@ -254,7 +250,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
// We're going to dequeue all of the saved up packets until
|
// We're going to dequeue all of the saved up packets until
|
||||||
// we've hit the throttle limit or there's no more packets to send
|
// we've hit the throttle limit or there's no more packets to send
|
||||||
lock (this) {
|
lock (this)
|
||||||
|
{
|
||||||
ResetCounters();
|
ResetCounters();
|
||||||
// MainLog.Instance.Verbose("THROTTLE", "Entering Throttle");
|
// MainLog.Instance.Verbose("THROTTLE", "Entering Throttle");
|
||||||
while (TotalThrottle.UnderLimit() && PacketsWaiting() &&
|
while (TotalThrottle.UnderLimit() && PacketsWaiting() &&
|
||||||
|
@ -320,7 +317,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// MainLog.Instance.Verbose("THROTTLE", "Processed " + throttleLoops + " packets");
|
// MainLog.Instance.Verbose("THROTTLE", "Processed " + throttleLoops + " packets");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,6 +355,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
return (int) (((float) value/(float) curmax)*newmax);
|
return (int) (((float) value/(float) curmax)*newmax);
|
||||||
}
|
}
|
||||||
|
|
||||||
private byte[] GetThrottlesPacked(float multiplier)
|
private byte[] GetThrottlesPacked(float multiplier)
|
||||||
{
|
{
|
||||||
int singlefloat = 4;
|
int singlefloat = 4;
|
||||||
|
@ -372,16 +369,23 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
byte[] throttles = new byte[singlefloat*7];
|
byte[] throttles = new byte[singlefloat*7];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
Buffer.BlockCopy(BitConverter.GetBytes(tResend), 0, throttles, singlefloat * i, singlefloat); i++;
|
Buffer.BlockCopy(BitConverter.GetBytes(tResend), 0, throttles, singlefloat*i, singlefloat);
|
||||||
Buffer.BlockCopy(BitConverter.GetBytes(tLand), 0, throttles, singlefloat * i, singlefloat); i++;
|
i++;
|
||||||
Buffer.BlockCopy(BitConverter.GetBytes(tWind), 0, throttles, singlefloat * i, singlefloat); i++;
|
Buffer.BlockCopy(BitConverter.GetBytes(tLand), 0, throttles, singlefloat*i, singlefloat);
|
||||||
Buffer.BlockCopy(BitConverter.GetBytes(tCloud), 0, throttles, singlefloat * i, singlefloat); i++;
|
i++;
|
||||||
Buffer.BlockCopy(BitConverter.GetBytes(tTask), 0, throttles, singlefloat * i, singlefloat); i++;
|
Buffer.BlockCopy(BitConverter.GetBytes(tWind), 0, throttles, singlefloat*i, singlefloat);
|
||||||
Buffer.BlockCopy(BitConverter.GetBytes(tTexture), 0, throttles, singlefloat * i, singlefloat); i++;
|
i++;
|
||||||
|
Buffer.BlockCopy(BitConverter.GetBytes(tCloud), 0, throttles, singlefloat*i, singlefloat);
|
||||||
|
i++;
|
||||||
|
Buffer.BlockCopy(BitConverter.GetBytes(tTask), 0, throttles, singlefloat*i, singlefloat);
|
||||||
|
i++;
|
||||||
|
Buffer.BlockCopy(BitConverter.GetBytes(tTexture), 0, throttles, singlefloat*i, singlefloat);
|
||||||
|
i++;
|
||||||
Buffer.BlockCopy(BitConverter.GetBytes(tAsset), 0, throttles, singlefloat*i, singlefloat);
|
Buffer.BlockCopy(BitConverter.GetBytes(tAsset), 0, throttles, singlefloat*i, singlefloat);
|
||||||
|
|
||||||
return throttles;
|
return throttles;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetThrottleFromClient(byte[] throttle)
|
public void SetThrottleFromClient(byte[] throttle)
|
||||||
{
|
{
|
||||||
int tResend = -1;
|
int tResend = -1;
|
||||||
|
|
|
@ -68,7 +68,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack,
|
protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack,
|
||||||
ClientManager clientManager, IScene scene, AssetCache assetCache,
|
ClientManager clientManager, IScene scene, AssetCache assetCache,
|
||||||
PacketServer packServer, AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode)
|
PacketServer packServer, AgentCircuitManager authenSessions,
|
||||||
|
LLUUID agentId, LLUUID sessionId, uint circuitCode)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
new ClientView(remoteEP, scene, assetCache, packServer, authenSessions, agentId, sessionId, circuitCode);
|
new ClientView(remoteEP, scene, assetCache, packServer, authenSessions, agentId, sessionId, circuitCode);
|
||||||
|
@ -86,7 +87,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
newuser = CreateNewClient(epSender, useCircuit, m_scene.ClientManager, m_scene, assetCache, this,
|
newuser = CreateNewClient(epSender, useCircuit, m_scene.ClientManager, m_scene, assetCache, this,
|
||||||
authenticateSessionsClass, useCircuit.CircuitCode.ID, useCircuit.CircuitCode.SessionID, useCircuit.CircuitCode.Code);
|
authenticateSessionsClass, useCircuit.CircuitCode.ID,
|
||||||
|
useCircuit.CircuitCode.SessionID, useCircuit.CircuitCode.Code);
|
||||||
|
|
||||||
m_scene.ClientManager.Add(useCircuit.CircuitCode.Code, newuser);
|
m_scene.ClientManager.Add(useCircuit.CircuitCode.Code, newuser);
|
||||||
|
|
||||||
|
@ -123,7 +125,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
/// <param name="circuitcode"></param>
|
/// <param name="circuitcode"></param>
|
||||||
public virtual void CloseCircuit(uint circuitcode)
|
public virtual void CloseCircuit(uint circuitcode)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_networkHandler.RemoveClientCircuit(circuitcode);
|
m_networkHandler.RemoveClientCircuit(circuitcode);
|
||||||
|
|
||||||
//m_scene.ClientManager.CloseAllAgents(circuitcode);
|
//m_scene.ClientManager.CloseAllAgents(circuitcode);
|
||||||
|
|
|
@ -25,26 +25,10 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Timers;
|
|
||||||
using Axiom.Math;
|
|
||||||
using libsecondlife;
|
|
||||||
using libsecondlife.Packets;
|
|
||||||
using OpenSim.Framework;
|
|
||||||
using OpenSim.Framework.Communications.Cache;
|
|
||||||
using OpenSim.Framework.Console;
|
|
||||||
using Timer=System.Timers.Timer;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.ClientStack
|
namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
public class PacketThrottle
|
public class PacketThrottle
|
||||||
{
|
{
|
||||||
|
|
||||||
private int max; // max allowable throttle
|
private int max; // max allowable throttle
|
||||||
private int min; // min allowable throttle
|
private int min; // min allowable throttle
|
||||||
private int throttle; // current throttle setting
|
private int throttle; // current throttle setting
|
||||||
|
@ -91,11 +75,16 @@ namespace OpenSim.Region.ClientStack
|
||||||
get { return throttle; }
|
get { return throttle; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value > max) {
|
if (value > max)
|
||||||
|
{
|
||||||
throttle = max;
|
throttle = max;
|
||||||
} else if (value < min) {
|
}
|
||||||
|
else if (value < min)
|
||||||
|
{
|
||||||
throttle = min;
|
throttle = min;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
throttle = value;
|
throttle = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using Nini.Config;
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
|
@ -44,19 +45,17 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static readonly PacketPool instance = new PacketPool();
|
private static readonly PacketPool instance = new PacketPool();
|
||||||
|
|
||||||
public static PacketPool Instance
|
public static PacketPool Instance
|
||||||
{
|
{
|
||||||
get
|
get { return instance; }
|
||||||
{
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Hashtable pool = new Hashtable();
|
private Hashtable pool = new Hashtable();
|
||||||
|
|
||||||
public Packet GetPacket(PacketType type) {
|
public Packet GetPacket(PacketType type)
|
||||||
|
{
|
||||||
Packet packet = null;
|
Packet packet = null;
|
||||||
|
|
||||||
lock (pool)
|
lock (pool)
|
||||||
|
@ -76,23 +75,26 @@ namespace OpenSim.Region.ClientStack
|
||||||
return packet;
|
return packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Packet GetPacket(byte[] bytes, ref int packetEnd, byte[] zeroBuffer) {
|
public Packet GetPacket(byte[] bytes, ref int packetEnd, byte[] zeroBuffer)
|
||||||
|
{
|
||||||
Packet packet = GetPacket(GetType(bytes, packetEnd, zeroBuffer));
|
Packet packet = GetPacket(GetType(bytes, packetEnd, zeroBuffer));
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
packet.FromBytes(bytes, ref i, ref packetEnd, zeroBuffer);
|
packet.FromBytes(bytes, ref i, ref packetEnd, zeroBuffer);
|
||||||
return packet;
|
return packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PacketType GetType(byte[] bytes, int packetEnd, byte[] zeroBuffer)
|
public PacketType GetType(byte[] bytes, int packetEnd, byte[] zeroBuffer)
|
||||||
{
|
{
|
||||||
//Function removed from LibSL revision 1540
|
//Function removed from LibSL revision 1540
|
||||||
// We're using it.. so Built it into UDP server for now..
|
// We're using it.. so Built it into UDP server for now..
|
||||||
ushort id; libsecondlife.PacketFrequency freq;
|
ushort id;
|
||||||
|
PacketFrequency freq;
|
||||||
int i = 0, end = packetEnd;
|
int i = 0, end = packetEnd;
|
||||||
Header header = Header.BuildHeader(bytes, ref i, ref end);
|
Header header = Header.BuildHeader(bytes, ref i, ref end);
|
||||||
if (header.Zerocoded)
|
if (header.Zerocoded)
|
||||||
{
|
{
|
||||||
end = libsecondlife.Helpers.ZeroDecode(bytes, end + 1, zeroBuffer) - 1;
|
end = Helpers.ZeroDecode(bytes, end + 1, zeroBuffer) - 1;
|
||||||
bytes = zeroBuffer;
|
bytes = zeroBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,20 +102,25 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
if (bytes[7] == 0xFF)
|
if (bytes[7] == 0xFF)
|
||||||
{
|
{
|
||||||
id = (ushort)((bytes[8] << 8) + bytes[9]); freq = libsecondlife.PacketFrequency.Low;
|
id = (ushort) ((bytes[8] << 8) + bytes[9]);
|
||||||
|
freq = PacketFrequency.Low;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
id = (ushort)bytes[7]; freq = libsecondlife.PacketFrequency.Medium;
|
id = (ushort) bytes[7];
|
||||||
|
freq = PacketFrequency.Medium;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
id = (ushort)bytes[6]; freq = libsecondlife.PacketFrequency.High;
|
id = (ushort) bytes[6];
|
||||||
|
freq = PacketFrequency.High;
|
||||||
}
|
}
|
||||||
return Packet.GetType(id, freq);
|
return Packet.GetType(id, freq);
|
||||||
}
|
}
|
||||||
public void ReturnPacket(Packet packet) {
|
|
||||||
|
public void ReturnPacket(Packet packet)
|
||||||
|
{
|
||||||
lock (pool)
|
lock (pool)
|
||||||
{
|
{
|
||||||
PacketType type = packet.Type;
|
PacketType type = packet.Type;
|
||||||
|
@ -162,15 +169,11 @@ namespace OpenSim.Region.ClientStack
|
||||||
m_packetServer.LocalScene = m_localScene;
|
m_packetServer.LocalScene = m_localScene;
|
||||||
m_regionHandle = m_localScene.RegionInfo.RegionHandle;
|
m_regionHandle = m_localScene.RegionInfo.RegionHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ulong RegionHandle
|
public ulong RegionHandle
|
||||||
{
|
{
|
||||||
get
|
get { return m_regionHandle; }
|
||||||
{
|
|
||||||
return m_regionHandle;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public UDPServer()
|
public UDPServer()
|
||||||
|
@ -217,13 +220,14 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
CloseEndPoint(epSender);
|
CloseEndPoint(epSender);
|
||||||
}
|
}
|
||||||
catch (System.Exception a)
|
catch (Exception a)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("UDPSERVER", a.ToString());
|
MainLog.Instance.Verbose("UDPSERVER", a.ToString());
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
|
||||||
|
ReceivedData, null);
|
||||||
|
|
||||||
// Ter: For some stupid reason ConnectionReset basically kills our async event structure..
|
// Ter: For some stupid reason ConnectionReset basically kills our async event structure..
|
||||||
// so therefore.. we've got to tell the server to BeginReceiveFrom again.
|
// so therefore.. we've got to tell the server to BeginReceiveFrom again.
|
||||||
|
@ -231,11 +235,9 @@ namespace OpenSim.Region.ClientStack
|
||||||
// sent to and from this particular user.
|
// sent to and from this particular user.
|
||||||
// Stupid I know..
|
// Stupid I know..
|
||||||
// but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method.
|
// but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method.
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (SocketException)
|
catch (SocketException)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -243,13 +245,14 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
CloseEndPoint(epSender);
|
CloseEndPoint(epSender);
|
||||||
}
|
}
|
||||||
catch (System.Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
//MainLog.Instance.Verbose("UDPSERVER", a.ToString());
|
//MainLog.Instance.Verbose("UDPSERVER", a.ToString());
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
|
||||||
|
ReceivedData, null);
|
||||||
|
|
||||||
// Ter: For some stupid reason ConnectionReset basically kills our async event structure..
|
// Ter: For some stupid reason ConnectionReset basically kills our async event structure..
|
||||||
// so therefore.. we've got to tell the server to BeginReceiveFrom again.
|
// so therefore.. we've got to tell the server to BeginReceiveFrom again.
|
||||||
|
@ -257,11 +260,9 @@ namespace OpenSim.Region.ClientStack
|
||||||
// sent to and from this particular user.
|
// sent to and from this particular user.
|
||||||
// Stupid I know..
|
// Stupid I know..
|
||||||
// but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method.
|
// but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method.
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (SocketException)
|
catch (SocketException)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Here's some reference code! :D
|
// Here's some reference code! :D
|
||||||
|
@ -276,7 +277,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch (System.ObjectDisposedException)
|
catch (ObjectDisposedException)
|
||||||
{
|
{
|
||||||
//MainLog.Instance.Debug("UDPSERVER", e.ToString());
|
//MainLog.Instance.Debug("UDPSERVER", e.ToString());
|
||||||
return;
|
return;
|
||||||
|
@ -311,7 +312,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
// invalid client
|
// invalid client
|
||||||
//CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now
|
//CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now
|
||||||
//m_log.Warn("client", "Got a packet from an invalid client - " + epSender.ToString());
|
//m_log.Warn("client", "Got a packet from an invalid client - " + epSender.ToString());
|
||||||
|
@ -326,9 +326,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
uint circuit;
|
uint circuit;
|
||||||
if (clientCircuits.TryGetValue(sender, out circuit))
|
if (clientCircuits.TryGetValue(sender, out circuit))
|
||||||
{
|
{
|
||||||
|
|
||||||
m_packetServer.CloseCircuit(circuit);
|
m_packetServer.CloseCircuit(circuit);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,13 +379,10 @@ namespace OpenSim.Region.ClientStack
|
||||||
EndPoint sendto = null;
|
EndPoint sendto = null;
|
||||||
if (clientCircuits_reverse.TryGetValue(circuitcode, out sendto))
|
if (clientCircuits_reverse.TryGetValue(circuitcode, out sendto))
|
||||||
{
|
{
|
||||||
|
|
||||||
clientCircuits.Remove(sendto);
|
clientCircuits.Remove(sendto);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
clientCircuits_reverse.Remove(circuitcode);
|
clientCircuits_reverse.Remove(circuitcode);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,8 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Console;
|
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
namespace OpenSim.Region.Communications.Local
|
namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
|
@ -50,21 +50,17 @@ namespace OpenSim.Region.Communications.Local
|
||||||
public string gdebugRegionName
|
public string gdebugRegionName
|
||||||
{
|
{
|
||||||
get { return _gdebugRegionName; }
|
get { return _gdebugRegionName; }
|
||||||
set
|
set { _gdebugRegionName = value; }
|
||||||
{
|
|
||||||
_gdebugRegionName = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string _rdebugRegionName = "";
|
public string _rdebugRegionName = "";
|
||||||
|
|
||||||
public string rdebugRegionName
|
public string rdebugRegionName
|
||||||
{
|
{
|
||||||
get { return _rdebugRegionName; }
|
get { return _rdebugRegionName; }
|
||||||
set
|
set { _rdebugRegionName = value; }
|
||||||
{
|
|
||||||
_rdebugRegionName = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalBackEndServices()
|
public LocalBackEndServices()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -85,7 +81,8 @@ namespace OpenSim.Region.Communications.Local
|
||||||
RegionCommsListener regionHost = new RegionCommsListener();
|
RegionCommsListener regionHost = new RegionCommsListener();
|
||||||
if (m_regionListeners.ContainsKey(regionInfo.RegionHandle))
|
if (m_regionListeners.ContainsKey(regionInfo.RegionHandle))
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("INTERREGION", "Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up.");
|
MainLog.Instance.Error("INTERREGION",
|
||||||
|
"Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up.");
|
||||||
m_regionListeners.Remove(regionInfo.RegionHandle);
|
m_regionListeners.Remove(regionInfo.RegionHandle);
|
||||||
}
|
}
|
||||||
m_regionListeners.Add(regionInfo.RegionHandle, regionHost);
|
m_regionListeners.Add(regionInfo.RegionHandle, regionHost);
|
||||||
|
@ -237,7 +234,6 @@ namespace OpenSim.Region.Communications.Local
|
||||||
public virtual void SetForcefulBanlistsDisallowed(ulong regionHandle)
|
public virtual void SetForcefulBanlistsDisallowed(ulong regionHandle)
|
||||||
{
|
{
|
||||||
m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE");
|
m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TriggerRegionUp(RegionInfo region, ulong regionhandle)
|
public bool TriggerRegionUp(RegionInfo region, ulong regionhandle)
|
||||||
|
@ -291,6 +287,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -308,6 +305,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical)
|
public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical)
|
||||||
{
|
{
|
||||||
if (m_regionListeners.ContainsKey(regionHandle))
|
if (m_regionListeners.ContainsKey(regionHandle))
|
||||||
|
@ -334,6 +332,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primID)
|
public bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primID)
|
||||||
{
|
{
|
||||||
if (m_regionListeners.ContainsKey(regionHandle))
|
if (m_regionListeners.ContainsKey(regionHandle))
|
||||||
|
@ -415,7 +414,8 @@ namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
if (m_regionListeners.ContainsKey(regionHandle))
|
if (m_regionListeners.ContainsKey(regionHandle))
|
||||||
{
|
{
|
||||||
return m_regionListeners[regionHandle].TriggerExpectPrimCrossing(regionHandle, primID, position, isPhysical);
|
return
|
||||||
|
m_regionListeners[regionHandle].TriggerExpectPrimCrossing(regionHandle, primID, position, isPhysical);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using libsecondlife;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
using OpenSim.Framework.UserManagement;
|
using OpenSim.Framework.UserManagement;
|
||||||
|
@ -82,7 +83,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override UserProfileData SetupMasterUser(libsecondlife.LLUUID uuid)
|
public override UserProfileData SetupMasterUser(LLUUID uuid)
|
||||||
{
|
{
|
||||||
UserProfileData data = GetUserProfile(uuid);
|
UserProfileData data = GetUserProfile(uuid);
|
||||||
if (data == null)
|
if (data == null)
|
||||||
|
|
|
@ -60,23 +60,17 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
public string gdebugRegionName
|
public string gdebugRegionName
|
||||||
{
|
{
|
||||||
get { return _gdebugRegionName; }
|
get { return _gdebugRegionName; }
|
||||||
set
|
set { _gdebugRegionName = value; }
|
||||||
{
|
}
|
||||||
_gdebugRegionName = value;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string _rdebugRegionName = "";
|
public string _rdebugRegionName = "";
|
||||||
|
|
||||||
public string rdebugRegionName
|
public string rdebugRegionName
|
||||||
{
|
{
|
||||||
get { return _rdebugRegionName; }
|
get { return _rdebugRegionName; }
|
||||||
set
|
set { _rdebugRegionName = value; }
|
||||||
{
|
}
|
||||||
_rdebugRegionName = value;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -137,14 +131,12 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY);
|
m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY);
|
||||||
if (GridRespData.ContainsKey("allow_forceful_banlines"))
|
if (GridRespData.ContainsKey("allow_forceful_banlines"))
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((string) GridRespData["allow_forceful_banlines"] != "TRUE")
|
if ((string) GridRespData["allow_forceful_banlines"] != "TRUE")
|
||||||
{
|
{
|
||||||
//m_localBackend.SetForcefulBanlistsDisallowed(regionInfo.RegionHandle);
|
//m_localBackend.SetForcefulBanlistsDisallowed(regionInfo.RegionHandle);
|
||||||
m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE");
|
m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return m_localBackend.RegisterRegion(regionInfo);
|
return m_localBackend.RegisterRegion(regionInfo);
|
||||||
}
|
}
|
||||||
|
@ -153,6 +145,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual Dictionary<string, string> GetGridSettings()
|
public virtual Dictionary<string, string> GetGridSettings()
|
||||||
{
|
{
|
||||||
Dictionary<string, string> returnGridSettings = new Dictionary<string, string>();
|
Dictionary<string, string> returnGridSettings = new Dictionary<string, string>();
|
||||||
|
@ -161,7 +154,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
foreach (string Dictkey in m_queuedGridSettings.Keys)
|
foreach (string Dictkey in m_queuedGridSettings.Keys)
|
||||||
{
|
{
|
||||||
returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]);
|
returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -170,6 +162,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
return returnGridSettings;
|
return returnGridSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -254,6 +247,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
return regionInfo;
|
return regionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -309,9 +303,11 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
m_remoteRegionInfoCache.Add(regionHandle, regionInfo);
|
m_remoteRegionInfoCache.Add(regionHandle, regionInfo);
|
||||||
}
|
}
|
||||||
catch (System.Net.WebException)
|
catch (WebException)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("GRID", "Region lookup failed for: " + regionHandle.ToString() + " - Is the GridServer down?");
|
MainLog.Instance.Error("GRID",
|
||||||
|
"Region lookup failed for: " + regionHandle.ToString() +
|
||||||
|
" - Is the GridServer down?");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -463,11 +459,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return new XmlRpcResponse();
|
return new XmlRpcResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region m_interRegion Comms
|
#region m_interRegion Comms
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -525,7 +516,10 @@ 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 Update Child Agent data on outside region and got " + retValue.ToString());
|
MainLog.Instance.Verbose("INTER",
|
||||||
|
gdebugRegionName +
|
||||||
|
": OGS1 tried to Update Child Agent data on outside region and got " +
|
||||||
|
retValue.ToString());
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
@ -534,35 +528,39 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.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 + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
|
||||||
|
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.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 + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (AuthenticationException e)
|
catch (AuthenticationException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
||||||
|
regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.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 + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -571,7 +569,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
/// <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)
|
||||||
{
|
{
|
||||||
RegionInfo regInfo = null;
|
RegionInfo regInfo = null;
|
||||||
|
@ -604,7 +601,10 @@ 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 InformRegionOfChildAgent for " + agentData.firstname + " " + agentData.lastname + " and got " + retValue.ToString());
|
MainLog.Instance.Verbose("INTER",
|
||||||
|
gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " +
|
||||||
|
agentData.firstname + " " + agentData.lastname + " and got " +
|
||||||
|
retValue.ToString());
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
@ -613,31 +613,36 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.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 + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
|
||||||
|
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.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 + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (AuthenticationException e)
|
catch (AuthenticationException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
||||||
|
regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.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 + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -672,8 +677,10 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
|
|
||||||
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject(
|
OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject(
|
||||||
typeof(OGS1InterRegionRemoting),
|
typeof (
|
||||||
"tcp://" + regInfo.RemotingAddress +
|
OGS1InterRegionRemoting),
|
||||||
|
"tcp://" +
|
||||||
|
regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions");
|
"/InterRegions");
|
||||||
|
|
||||||
|
@ -703,23 +710,28 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress +
|
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" +
|
||||||
|
regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - Is this neighbor up?");
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
||||||
|
" - Is this neighbor up?");
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.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://" + regInfo.RemotingAddress +
|
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region using tcp://" +
|
||||||
|
regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - Is this neighbor up?");
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
||||||
|
" - Is this neighbor up?");
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.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://" + regInfo.RemotingAddress +
|
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" +
|
||||||
|
regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.Debug(e.ToString());
|
||||||
|
@ -727,7 +739,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (AuthenticationException e)
|
catch (AuthenticationException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress +
|
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" +
|
||||||
|
regInfo.RemotingAddress +
|
||||||
":" + regInfo.RemotingPort +
|
":" + regInfo.RemotingPort +
|
||||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.Debug(e.ToString());
|
||||||
|
@ -743,13 +756,13 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
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 InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData)
|
public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData)
|
||||||
{
|
{
|
||||||
RegionInfo regInfo = null;
|
RegionInfo regInfo = null;
|
||||||
|
@ -791,35 +804,41 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.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 + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
|
||||||
|
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.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 + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (AuthenticationException e)
|
catch (AuthenticationException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
||||||
|
regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.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 + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -848,7 +867,9 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
"/InterRegions");
|
"/InterRegions");
|
||||||
if (remObject != null)
|
if (remObject != null)
|
||||||
{
|
{
|
||||||
retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID.UUID, new sLLVector3(position), isFlying);
|
retValue =
|
||||||
|
remObject.ExpectAvatarCrossing(regionHandle, agentID.UUID, new sLLVector3(position),
|
||||||
|
isFlying);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -864,7 +885,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -873,6 +895,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical)
|
public bool ExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical)
|
||||||
{
|
{
|
||||||
RegionInfo regInfo = null;
|
RegionInfo regInfo = null;
|
||||||
|
@ -894,7 +917,9 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
"/InterRegions");
|
"/InterRegions");
|
||||||
if (remObject != null)
|
if (remObject != null)
|
||||||
{
|
{
|
||||||
retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID.UUID, new sLLVector3(position), isPhysical);
|
retValue =
|
||||||
|
remObject.ExpectAvatarCrossing(regionHandle, agentID.UUID, new sLLVector3(position),
|
||||||
|
isPhysical);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -910,7 +935,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||||
|
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||||
MainLog.Instance.Debug(e.ToString());
|
MainLog.Instance.Debug(e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -922,7 +948,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
public void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID)
|
public void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId)
|
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId)
|
||||||
|
@ -934,6 +959,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
return m_localBackend.AcknowledgePrimCrossed(regionHandle, primId);
|
return m_localBackend.AcknowledgePrimCrossed(regionHandle, primId);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Methods triggered by calls from external instances
|
#region Methods triggered by calls from external instances
|
||||||
|
@ -961,8 +987,9 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle)
|
public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle)
|
||||||
{
|
{
|
||||||
|
MainLog.Instance.Verbose("INTER",
|
||||||
MainLog.Instance.Verbose("INTER", gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX + "," + regionData.RegionLocY + ")");
|
gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX +
|
||||||
|
"," + regionData.RegionLocY + ")");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -975,6 +1002,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
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");
|
MainLog.Instance.Verbose("INTER", "Incoming OGS1 Child Agent Data Update");
|
||||||
|
@ -988,7 +1016,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1012,6 +1039,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1031,6 +1059,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical)
|
public bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -81,7 +81,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
public bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle)
|
public bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (OnRegionUp != null)
|
if (OnRegionUp != null)
|
||||||
{
|
{
|
||||||
return OnRegionUp(sregion, regionhandle);
|
return OnRegionUp(sregion, regionhandle);
|
||||||
|
@ -106,6 +105,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
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)
|
if (OnPrimGroupNear != null)
|
||||||
|
@ -114,6 +114,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
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)
|
if (OnPrimGroupArrival != null)
|
||||||
|
@ -134,7 +135,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return InterRegionSingleton.Instance.InformRegionOfChildAgent(regionHandle, new AgentCircuitData(agentData));
|
return
|
||||||
|
InterRegionSingleton.Instance.InformRegionOfChildAgent(regionHandle, new AgentCircuitData(agentData));
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
|
@ -142,6 +144,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool RegionUp(SearializableRegionInfo region, ulong regionhandle)
|
public bool RegionUp(SearializableRegionInfo region, ulong regionhandle)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -166,14 +169,16 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
Console.WriteLine("Remoting Error: Unable to send Child agent update to remote region.\n" + e.ToString());
|
Console.WriteLine("Remoting Error: Unable to send Child agent update to remote region.\n" + e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ExpectAvatarCrossing(ulong regionHandle, Guid agentID, sLLVector3 position, bool isFlying)
|
public bool ExpectAvatarCrossing(ulong regionHandle, Guid agentID, sLLVector3 position, bool isFlying)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, new LLUUID(agentID), new LLVector3(position.x,position.y,position.z), isFlying);
|
return
|
||||||
|
InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, new LLUUID(agentID),
|
||||||
|
new LLVector3(position.x, position.y, position.z),
|
||||||
|
isFlying);
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
|
@ -181,19 +186,23 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool InformRegionPrim(ulong regionHandle, Guid SceneObjectGroupID, sLLVector3 position, bool isPhysical)
|
public bool InformRegionPrim(ulong regionHandle, Guid SceneObjectGroupID, sLLVector3 position, bool isPhysical)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return InterRegionSingleton.Instance.InformRegionPrim(regionHandle, new LLUUID(SceneObjectGroupID), new LLVector3(position.x,position.y,position.z), isPhysical);
|
return
|
||||||
|
InterRegionSingleton.Instance.InformRegionPrim(regionHandle, new LLUUID(SceneObjectGroupID),
|
||||||
|
new LLVector3(position.x, position.y, position.z),
|
||||||
|
isPhysical);
|
||||||
}
|
}
|
||||||
catch (RemotingException e)
|
catch (RemotingException e)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Remoting Error: Unable to connect to remote region.\n" + e.ToString());
|
Console.WriteLine("Remoting Error: Unable to connect to remote region.\n" + e.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool InformRegionOfPrimCrossing(ulong regionHandle, Guid primID, string objData)
|
public bool InformRegionOfPrimCrossing(ulong regionHandle, Guid primID, string objData)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -206,6 +215,5 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -29,10 +29,10 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Servers;
|
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
using OpenSim.Framework.Servers;
|
||||||
|
|
||||||
namespace OpenSim.Region.Communications.OGS1
|
namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -50,7 +51,9 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
if (data.Contains("error_type"))
|
if (data.Contains("error_type"))
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("GRID", "Error sent by user server when trying to get user profile: (" + data["error_type"] +
|
MainLog.Instance.Warn("GRID",
|
||||||
|
"Error sent by user server when trying to get user profile: (" +
|
||||||
|
data["error_type"] +
|
||||||
"): " + data["error_desc"]);
|
"): " + data["error_desc"]);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +117,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query)
|
public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query)
|
||||||
{
|
{
|
||||||
List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
|
List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
|
||||||
System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9 ]");
|
Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9 ]");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Hashtable param = new Hashtable();
|
Hashtable param = new Hashtable();
|
||||||
|
@ -196,7 +199,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserProfileData SetupMasterUser(libsecondlife.LLUUID uuid)
|
public UserProfileData SetupMasterUser(LLUUID uuid)
|
||||||
{
|
{
|
||||||
UserProfileData data = GetUserProfile(uuid);
|
UserProfileData data = GetUserProfile(uuid);
|
||||||
if (data == null)
|
if (data == null)
|
||||||
|
|
|
@ -334,6 +334,7 @@ namespace OpenSim.Region.Environment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void estateRestartSim(EstateOwnerMessagePacket packet)
|
private void estateRestartSim(EstateOwnerMessagePacket packet)
|
||||||
{
|
{
|
||||||
// There's only 1 block in the estateResetSim.. and that's the number of seconds till restart.
|
// There's only 1 block in the estateResetSim.. and that's the number of seconds till restart.
|
||||||
|
@ -343,19 +344,18 @@ namespace OpenSim.Region.Environment
|
||||||
timeSeconds = BitConverter.ToInt16(block.Parameter, 1);
|
timeSeconds = BitConverter.ToInt16(block.Parameter, 1);
|
||||||
timeSeconds = (int) ((timeSeconds/100) - 3);
|
timeSeconds = (int) ((timeSeconds/100) - 3);
|
||||||
m_scene.Restart(timeSeconds);
|
m_scene.Restart(timeSeconds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void EstateChangeCovenant(EstateOwnerMessagePacket packet)
|
private void EstateChangeCovenant(EstateOwnerMessagePacket packet)
|
||||||
{
|
{
|
||||||
foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
|
foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
|
||||||
{
|
{
|
||||||
LLUUID newCovenantID = new LLUUID(Helpers.FieldToUTF8String(block.Parameter));
|
LLUUID newCovenantID = new LLUUID(Helpers.FieldToUTF8String(block.Parameter));
|
||||||
m_regInfo.CovenantID = newCovenantID;
|
m_regInfo.CovenantID = newCovenantID;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
public void HandleRegionInfoRequest(IClientAPI client, LLUUID sessionID)
|
public void HandleRegionInfoRequest(IClientAPI client, LLUUID sessionID)
|
||||||
{
|
{
|
||||||
RegionInfoPacket rinfopack = new RegionInfoPacket();
|
RegionInfoPacket rinfopack = new RegionInfoPacket();
|
||||||
|
@ -381,8 +381,8 @@ namespace OpenSim.Region.Environment
|
||||||
rinfopack.RegionInfo = rinfoblk;
|
rinfopack.RegionInfo = rinfoblk;
|
||||||
|
|
||||||
client.OutPacket(rinfopack, ThrottleOutPacketType.Task);
|
client.OutPacket(rinfopack, ThrottleOutPacketType.Task);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleEstateCovenantRequest(IClientAPI client, LLUUID sessionID)
|
public void HandleEstateCovenantRequest(IClientAPI client, LLUUID sessionID)
|
||||||
{
|
{
|
||||||
EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket();
|
EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket();
|
||||||
|
@ -390,10 +390,12 @@ namespace OpenSim.Region.Environment
|
||||||
edata.CovenantID = m_regInfo.CovenantID;
|
edata.CovenantID = m_regInfo.CovenantID;
|
||||||
edata.CovenantTimestamp = 0;
|
edata.CovenantTimestamp = 0;
|
||||||
edata.EstateOwnerID = m_regInfo.MasterAvatarAssignedUUID;
|
edata.EstateOwnerID = m_regInfo.MasterAvatarAssignedUUID;
|
||||||
edata.EstateName = Helpers.StringToField(m_regInfo.MasterAvatarFirstName + " " + m_regInfo.MasterAvatarLastName);
|
edata.EstateName =
|
||||||
|
Helpers.StringToField(m_regInfo.MasterAvatarFirstName + " " + m_regInfo.MasterAvatarLastName);
|
||||||
einfopack.Data = edata;
|
einfopack.Data = edata;
|
||||||
client.OutPacket(einfopack, ThrottleOutPacketType.Task);
|
client.OutPacket(einfopack, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Outgoing Packets
|
#region Outgoing Packets
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework;
|
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Interfaces
|
namespace OpenSim.Region.Environment.Interfaces
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Region.Environment.Modules;
|
using OpenSim.Region.Environment.Modules;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Interfaces
|
namespace OpenSim.Region.Environment.Interfaces
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Environment.LandManagement;
|
using OpenSim.Region.Environment.LandManagement;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ namespace OpenSim.Region.Environment.Interfaces
|
||||||
|
|
||||||
void StoreLandObject(Land Parcel, LLUUID regionUUID);
|
void StoreLandObject(Land Parcel, LLUUID regionUUID);
|
||||||
void RemoveLandObject(LLUUID globalID);
|
void RemoveLandObject(LLUUID globalID);
|
||||||
List<Framework.LandData> LoadLandObjects(LLUUID regionUUID);
|
List<LandData> LoadLandObjects(LLUUID regionUUID);
|
||||||
|
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.LandManagement
|
namespace OpenSim.Region.Environment.LandManagement
|
||||||
{
|
{
|
||||||
|
@ -98,7 +97,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
return newLand;
|
return newLand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Packet Request Handling
|
#region Packet Request Handling
|
||||||
|
@ -222,8 +220,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
m_scene.LandManager.updateLandObject(landData.localID, newData);
|
m_scene.LandManager.updateLandObject(landData.localID, newData);
|
||||||
|
|
||||||
sendLandUpdateToAvatarsOverMe();
|
sendLandUpdateToAvatarsOverMe();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,13 +238,13 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
|
|
||||||
public bool isBannedFromLand(LLUUID avatar)
|
public bool isBannedFromLand(LLUUID avatar)
|
||||||
{
|
{
|
||||||
if ((this.landData.landFlags & (uint)Parcel.ParcelFlags.UseBanList) > 0)
|
if ((landData.landFlags & (uint) Parcel.ParcelFlags.UseBanList) > 0)
|
||||||
{
|
{
|
||||||
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
||||||
entry.AgentID = avatar;
|
entry.AgentID = avatar;
|
||||||
entry.Flags = ParcelManager.AccessList.Ban;
|
entry.Flags = ParcelManager.AccessList.Ban;
|
||||||
entry.Time = new DateTime();
|
entry.Time = new DateTime();
|
||||||
if (this.landData.parcelAccessList.Contains(entry))
|
if (landData.parcelAccessList.Contains(entry))
|
||||||
{
|
{
|
||||||
//They are banned, so lets send them a notice about this parcel
|
//They are banned, so lets send them a notice about this parcel
|
||||||
return true;
|
return true;
|
||||||
|
@ -259,13 +255,13 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
|
|
||||||
public bool isRestrictedFromLand(LLUUID avatar)
|
public bool isRestrictedFromLand(LLUUID avatar)
|
||||||
{
|
{
|
||||||
if ((this.landData.landFlags & (uint)Parcel.ParcelFlags.UseAccessList) > 0)
|
if ((landData.landFlags & (uint) Parcel.ParcelFlags.UseAccessList) > 0)
|
||||||
{
|
{
|
||||||
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
|
||||||
entry.AgentID = avatar;
|
entry.AgentID = avatar;
|
||||||
entry.Flags = ParcelManager.AccessList.Access;
|
entry.Flags = ParcelManager.AccessList.Access;
|
||||||
entry.Time = new DateTime();
|
entry.Time = new DateTime();
|
||||||
if (!this.landData.parcelAccessList.Contains(entry))
|
if (!landData.parcelAccessList.Contains(entry))
|
||||||
{
|
{
|
||||||
//They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel
|
//They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel
|
||||||
return true;
|
return true;
|
||||||
|
@ -331,9 +327,9 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
return list.ToArray();
|
return list.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendAccessList(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, IClientAPI remote_client)
|
public void sendAccessList(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID,
|
||||||
|
IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
|
|
||||||
ParcelAccessListReplyPacket replyPacket;
|
ParcelAccessListReplyPacket replyPacket;
|
||||||
|
|
||||||
if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both)
|
if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both)
|
||||||
|
@ -341,7 +337,7 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
replyPacket = new ParcelAccessListReplyPacket();
|
replyPacket = new ParcelAccessListReplyPacket();
|
||||||
replyPacket.Data.AgentID = agentID;
|
replyPacket.Data.AgentID = agentID;
|
||||||
replyPacket.Data.Flags = (uint) ParcelManager.AccessList.Access;
|
replyPacket.Data.Flags = (uint) ParcelManager.AccessList.Access;
|
||||||
replyPacket.Data.LocalID = this.landData.localID;
|
replyPacket.Data.LocalID = landData.localID;
|
||||||
replyPacket.Data.SequenceID = 0;
|
replyPacket.Data.SequenceID = 0;
|
||||||
|
|
||||||
replyPacket.List = createAccessListArrayByFlag(ParcelManager.AccessList.Access);
|
replyPacket.List = createAccessListArrayByFlag(ParcelManager.AccessList.Access);
|
||||||
|
@ -353,13 +349,12 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
replyPacket = new ParcelAccessListReplyPacket();
|
replyPacket = new ParcelAccessListReplyPacket();
|
||||||
replyPacket.Data.AgentID = agentID;
|
replyPacket.Data.AgentID = agentID;
|
||||||
replyPacket.Data.Flags = (uint) ParcelManager.AccessList.Ban;
|
replyPacket.Data.Flags = (uint) ParcelManager.AccessList.Ban;
|
||||||
replyPacket.Data.LocalID = this.landData.localID;
|
replyPacket.Data.LocalID = landData.localID;
|
||||||
replyPacket.Data.SequenceID = 0;
|
replyPacket.Data.SequenceID = 0;
|
||||||
|
|
||||||
replyPacket.List = createAccessListArrayByFlag(ParcelManager.AccessList.Ban);
|
replyPacket.List = createAccessListArrayByFlag(ParcelManager.AccessList.Ban);
|
||||||
remote_client.OutPacket((Packet) replyPacket, ThrottleOutPacketType.Task);
|
remote_client.OutPacket((Packet) replyPacket, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client)
|
public void updateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client)
|
||||||
|
@ -398,7 +393,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
}
|
}
|
||||||
|
|
||||||
m_scene.LandManager.updateLandObject(landData.localID, newData);
|
m_scene.LandManager.updateLandObject(landData.localID, newData);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -437,7 +431,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
new LLVector3((float) (max_x*4), (float) (max_y*4),
|
new LLVector3((float) (max_x*4), (float) (max_y*4),
|
||||||
(float) m_scene.Terrain.GetHeight((max_x*4), (max_y*4)));
|
(float) m_scene.Terrain.GetHeight((max_x*4), (max_y*4)));
|
||||||
landData.area = tempArea;
|
landData.area = tempArea;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateLandBitmapByteArray()
|
public void updateLandBitmapByteArray()
|
||||||
|
@ -734,8 +727,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
}
|
}
|
||||||
|
|
||||||
pack.Data = dataBlock;
|
pack.Data = dataBlock;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
remote_client.OutPacket(pack, ThrottleOutPacketType.Task);
|
remote_client.OutPacket(pack, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,13 @@
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Axiom.Math;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Physics.Manager;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.LandManagement
|
namespace OpenSim.Region.Environment.LandManagement
|
||||||
{
|
{
|
||||||
|
@ -103,12 +105,11 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_regInfo = reginfo;
|
m_regInfo = reginfo;
|
||||||
landIDList.Initialize();
|
landIDList.Initialize();
|
||||||
scene.EventManager.OnAvatarEnteringNewParcel += new EventManager.AvatarEnteringNewParcel(handleAvatarChangingParcel);
|
scene.EventManager.OnAvatarEnteringNewParcel +=
|
||||||
scene.EventManager.OnClientMovement += new EventManager.ClientMovement(this.handleAnyClientMovement);
|
new EventManager.AvatarEnteringNewParcel(handleAvatarChangingParcel);
|
||||||
|
scene.EventManager.OnClientMovement += new EventManager.ClientMovement(handleAnyClientMovement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Member Functions
|
#region Member Functions
|
||||||
|
@ -147,7 +148,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Land createBaseLand()
|
public Land createBaseLand()
|
||||||
{
|
{
|
||||||
|
|
||||||
return new Land(LLUUID.Zero, false, m_scene);
|
return new Land(LLUUID.Zero, false, m_scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,9 +501,10 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
byteArray = new byte[LAND_BLOCKS_PER_PACKET];
|
byteArray = new byte[LAND_BLOCKS_PER_PACKET];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
OpenSim.Framework.Console.MainLog.Instance.Debug("LAND", "Skipped Land checks because avatar is out of bounds: " + e.Message);
|
MainLog.Instance.Debug("LAND",
|
||||||
|
"Skipped Land checks because avatar is out of bounds: " + e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -599,7 +600,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
|
|
||||||
public List<Land> parcelsNearPoint(LLVector3 position)
|
public List<Land> parcelsNearPoint(LLVector3 position)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<Land> parcelsNear = new List<Land>();
|
List<Land> parcelsNear = new List<Land>();
|
||||||
int x, y;
|
int x, y;
|
||||||
for (x = -4; x <= 4; x += 4)
|
for (x = -4; x <= 4; x += 4)
|
||||||
|
@ -618,21 +618,24 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
}
|
}
|
||||||
|
|
||||||
return parcelsNear;
|
return parcelsNear;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendYouAreBannedNotice(ScenePresence avatar)
|
public void sendYouAreBannedNotice(ScenePresence avatar)
|
||||||
{
|
{
|
||||||
if (allowedForcefulBans)
|
if (allowedForcefulBans)
|
||||||
{
|
{
|
||||||
avatar.ControllingClient.SendAlertMessage("You are not allowed on this parcel because you are banned. Please go away. <3 OpenSim Developers");
|
avatar.ControllingClient.SendAlertMessage(
|
||||||
|
"You are not allowed on this parcel because you are banned. Please go away. <3 OpenSim Developers");
|
||||||
|
|
||||||
avatar.PhysicsActor.Position = new OpenSim.Region.Physics.Manager.PhysicsVector(avatar.lastKnownAllowedPosition.x, avatar.lastKnownAllowedPosition.y, avatar.lastKnownAllowedPosition.z);
|
avatar.PhysicsActor.Position =
|
||||||
avatar.PhysicsActor.Velocity = new OpenSim.Region.Physics.Manager.PhysicsVector(0, 0, 0);
|
new PhysicsVector(avatar.lastKnownAllowedPosition.x, avatar.lastKnownAllowedPosition.y,
|
||||||
|
avatar.lastKnownAllowedPosition.z);
|
||||||
|
avatar.PhysicsActor.Velocity = new PhysicsVector(0, 0, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
avatar.ControllingClient.SendAlertMessage("You are not allowed on this parcel because you are banned; however, the grid administrator has disabled ban lines globally. Please obey the land owner's requests or you can be banned from the entire sim! <3 OpenSim Developers");
|
avatar.ControllingClient.SendAlertMessage(
|
||||||
|
"You are not allowed on this parcel because you are banned; however, the grid administrator has disabled ban lines globally. Please obey the land owner's requests or you can be banned from the entire sim! <3 OpenSim Developers");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -651,7 +654,8 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
}
|
}
|
||||||
else if (parcelAvatarIsEntering.isRestrictedFromLand(avatar.UUID))
|
else if (parcelAvatarIsEntering.isRestrictedFromLand(avatar.UUID))
|
||||||
{
|
{
|
||||||
avatar.ControllingClient.SendAlertMessage("You are not allowed on this parcel because the land owner has restricted access. For now, you can enter, but please respect the land owner's decisions (or he can ban you!). <3 OpenSim Developers");
|
avatar.ControllingClient.SendAlertMessage(
|
||||||
|
"You are not allowed on this parcel because the land owner has restricted access. For now, you can enter, but please respect the land owner's decisions (or he can ban you!). <3 OpenSim Developers");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -668,7 +672,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
|
|
||||||
public void sendOutNearestBanLine(IClientAPI avatar)
|
public void sendOutNearestBanLine(IClientAPI avatar)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<ScenePresence> avatars = m_scene.GetAvatars();
|
List<ScenePresence> avatars = m_scene.GetAvatars();
|
||||||
foreach (ScenePresence presence in avatars)
|
foreach (ScenePresence presence in avatars)
|
||||||
{
|
{
|
||||||
|
@ -687,7 +690,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
checkBan.sendLandProperties(-40000, false, (int) ParcelManager.ParcelResult.Single, avatar);
|
checkBan.sendLandProperties(-40000, false, (int) ParcelManager.ParcelResult.Single, avatar);
|
||||||
return; //Only send one
|
return; //Only send one
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -705,10 +707,10 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
if (avatar.currentParcelUUID != over.landData.globalID)
|
if (avatar.currentParcelUUID != over.landData.globalID)
|
||||||
{
|
{
|
||||||
avatar.currentParcelUUID = over.landData.globalID;
|
avatar.currentParcelUUID = over.landData.globalID;
|
||||||
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.localID, this.m_scene.RegionInfo.RegionID);
|
m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.localID,
|
||||||
|
m_scene.RegionInfo.RegionID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleSignificantClientMovement(IClientAPI remote_client)
|
public void handleSignificantClientMovement(IClientAPI remote_client)
|
||||||
|
@ -722,16 +724,18 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
Land parcel = getLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y);
|
Land parcel = getLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y);
|
||||||
if (parcel != null)
|
if (parcel != null)
|
||||||
{
|
{
|
||||||
if (clientAvatar.AbsolutePosition.Z < BAN_LINE_SAFETY_HIEGHT && clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
|
if (clientAvatar.AbsolutePosition.Z < BAN_LINE_SAFETY_HIEGHT &&
|
||||||
|
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
|
||||||
{
|
{
|
||||||
|
handleAvatarChangingParcel(clientAvatar, parcel.landData.localID, m_scene.RegionInfo.RegionID);
|
||||||
handleAvatarChangingParcel(clientAvatar, parcel.landData.localID, m_scene.RegionInfo.RegionID); //They are going below the safety line!
|
//They are going below the safety line!
|
||||||
if (!parcel.isBannedFromLand(clientAvatar.UUID))
|
if (!parcel.isBannedFromLand(clientAvatar.UUID))
|
||||||
{
|
{
|
||||||
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false;
|
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (clientAvatar.AbsolutePosition.Z < BAN_LINE_SAFETY_HIEGHT && parcel.isBannedFromLand(clientAvatar.UUID))
|
else if (clientAvatar.AbsolutePosition.Z < BAN_LINE_SAFETY_HIEGHT &&
|
||||||
|
parcel.isBannedFromLand(clientAvatar.UUID))
|
||||||
{
|
{
|
||||||
sendYouAreBannedNotice(clientAvatar);
|
sendYouAreBannedNotice(clientAvatar);
|
||||||
}
|
}
|
||||||
|
@ -739,22 +743,23 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleAnyClientMovement(ScenePresence avatar) //Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance.
|
public void handleAnyClientMovement(ScenePresence avatar)
|
||||||
|
//Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance.
|
||||||
{
|
{
|
||||||
Land over = getLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
Land over = getLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||||
if (over != null)
|
if (over != null)
|
||||||
{
|
{
|
||||||
if (!over.isBannedFromLand(avatar.UUID) || avatar.AbsolutePosition.Z >= BAN_LINE_SAFETY_HIEGHT)
|
if (!over.isBannedFromLand(avatar.UUID) || avatar.AbsolutePosition.Z >= BAN_LINE_SAFETY_HIEGHT)
|
||||||
{
|
{
|
||||||
avatar.lastKnownAllowedPosition = new Axiom.Math.Vector3(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z);
|
avatar.lastKnownAllowedPosition =
|
||||||
|
new Vector3(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client)
|
public void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID,
|
||||||
|
int landLocalID, IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
if (landList.ContainsKey(landLocalID))
|
if (landList.ContainsKey(landLocalID))
|
||||||
{
|
{
|
||||||
|
@ -762,7 +767,9 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleParcelAccessUpdateRequest(LLUUID agentID, LLUUID sessionID,uint flags, int landLocalID, List<libsecondlife.ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client)
|
public void handleParcelAccessUpdateRequest(LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID,
|
||||||
|
List<ParcelManager.ParcelAccessEntry> entries,
|
||||||
|
IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
if (landList.ContainsKey(landLocalID))
|
if (landList.ContainsKey(landLocalID))
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,11 +27,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using libsecondlife;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using libsecondlife;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
|
@ -59,9 +60,9 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
m_avatarsAppearance[avatarId] = appearance;
|
m_avatarsAppearance[avatarId] = appearance;
|
||||||
}
|
}
|
||||||
catch (System.NullReferenceException)
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
OpenSim.Framework.Console.MainLog.Instance.Error("AVATAR", "Unable to load appearance for uninitialized avatar");
|
MainLog.Instance.Error("AVATAR", "Unable to load appearance for uninitialized avatar");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,18 +27,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
|
||||||
using OpenSim.Region.Environment.Scenes;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
/*****************************************************
|
/*****************************************************
|
||||||
*
|
*
|
||||||
|
@ -127,7 +124,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
get { return true; }
|
get { return true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLUUID MakeHttpRequest(string url, string parameters, string body) {
|
public LLUUID MakeHttpRequest(string url, string parameters, string body)
|
||||||
|
{
|
||||||
return LLUUID.Zero;
|
return LLUUID.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +186,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
lock (HttpListLock)
|
lock (HttpListLock)
|
||||||
{
|
{
|
||||||
|
|
||||||
HttpRequestClass tmpReq;
|
HttpRequestClass tmpReq;
|
||||||
if (m_pendingRequests.TryGetValue(m_itemID, out tmpReq))
|
if (m_pendingRequests.TryGetValue(m_itemID, out tmpReq))
|
||||||
{
|
{
|
||||||
|
@ -206,6 +203,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
* finsihed. I thought about setting up a queue for this, but
|
* finsihed. I thought about setting up a queue for this, but
|
||||||
* it will need some refactoring and this works 'enough' right now
|
* it will need some refactoring and this works 'enough' right now
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public HttpRequestClass GetNextCompletedRequest()
|
public HttpRequestClass GetNextCompletedRequest()
|
||||||
{
|
{
|
||||||
lock (HttpListLock)
|
lock (HttpListLock)
|
||||||
|
@ -226,8 +224,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -280,9 +276,9 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
* TODO: More work on the response codes. Right now
|
* TODO: More work on the response codes. Right now
|
||||||
* returning 200 for success or 499 for exception
|
* returning 200 for success or 499 for exception
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void SendRequest()
|
public void SendRequest()
|
||||||
{
|
{
|
||||||
|
|
||||||
HttpWebResponse response = null;
|
HttpWebResponse response = null;
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
byte[] buf = new byte[8192];
|
byte[] buf = new byte[8192];
|
||||||
|
@ -317,11 +313,9 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
// continue building the string
|
// continue building the string
|
||||||
sb.Append(tempString);
|
sb.Append(tempString);
|
||||||
}
|
}
|
||||||
}
|
} while (count > 0); // any more data to read?
|
||||||
while (count > 0); // any more data to read?
|
|
||||||
|
|
||||||
response_body = sb.ToString();
|
response_body = sb.ToString();
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -333,7 +327,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
|
|
||||||
status = 200;
|
status = 200;
|
||||||
finished = true;
|
finished = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Stop()
|
public void Stop()
|
||||||
|
@ -342,8 +335,9 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
httpThread.Abort();
|
httpThread.Abort();
|
||||||
}
|
}
|
||||||
catch (Exception) { }
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -28,13 +28,12 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using libsecondlife;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
|
||||||
using OpenSim.Region.Environment.Scenes;
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using libsecondlife;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -57,10 +56,13 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
|
|
||||||
// Just in case they don't have the stanzas
|
// Just in case they don't have the stanzas
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
m_day_length = config.Configs["Sun"].GetDouble("day_length", m_real_day);
|
m_day_length = config.Configs["Sun"].GetDouble("day_length", m_real_day);
|
||||||
m_frame_mod = config.Configs["Sun"].GetInt("frame_rate", m_default_frame);
|
m_frame_mod = config.Configs["Sun"].GetInt("frame_rate", m_default_frame);
|
||||||
} catch (Exception) {
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
m_day_length = m_real_day;
|
m_day_length = m_real_day;
|
||||||
m_frame_mod = m_default_frame;
|
m_frame_mod = m_default_frame;
|
||||||
}
|
}
|
||||||
|
@ -97,7 +99,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
|
|
||||||
public void SunUpdate()
|
public void SunUpdate()
|
||||||
{
|
{
|
||||||
if (m_frame < m_frame_mod) {
|
if (m_frame < m_frame_mod)
|
||||||
|
{
|
||||||
m_frame++;
|
m_frame++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
|
@ -48,7 +49,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
|
|
||||||
private BlockingQueue<TextureSender> QueueSenders = new BlockingQueue<TextureSender>();
|
private BlockingQueue<TextureSender> QueueSenders = new BlockingQueue<TextureSender>();
|
||||||
|
|
||||||
private Dictionary<LLUUID, UserTextureDownloadService> m_userTextureServices = new Dictionary<LLUUID, UserTextureDownloadService>();
|
private Dictionary<LLUUID, UserTextureDownloadService> m_userTextureServices =
|
||||||
|
new Dictionary<LLUUID, UserTextureDownloadService>();
|
||||||
|
|
||||||
private Thread m_thread;
|
private Thread m_thread;
|
||||||
|
|
||||||
|
@ -72,7 +74,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.EventManager.OnNewClient += NewClient;
|
m_scene.EventManager.OnNewClient += NewClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
|
@ -175,7 +176,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
if (!m_textureSenders.ContainsKey(e.RequestedAssetID))
|
if (!m_textureSenders.ContainsKey(e.RequestedAssetID))
|
||||||
{
|
{
|
||||||
TextureSender requestHandler = new TextureSender(client, e.RequestedAssetID, e.DiscardLevel, e.PacketNumber);
|
TextureSender requestHandler =
|
||||||
|
new TextureSender(client, e.RequestedAssetID, e.DiscardLevel, e.PacketNumber);
|
||||||
m_textureSenders.Add(e.RequestedAssetID, requestHandler);
|
m_textureSenders.Add(e.RequestedAssetID, requestHandler);
|
||||||
m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback);
|
m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback);
|
||||||
}
|
}
|
||||||
|
@ -183,7 +185,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
m_textureSenders[e.RequestedAssetID].UpdateRequest(e.DiscardLevel, e.PacketNumber);
|
m_textureSenders[e.RequestedAssetID].UpdateRequest(e.DiscardLevel, e.PacketNumber);
|
||||||
m_textureSenders[e.RequestedAssetID].counter = 0;
|
m_textureSenders[e.RequestedAssetID].counter = 0;
|
||||||
if ((m_textureSenders[e.RequestedAssetID].ImageLoaded) && (m_textureSenders[e.RequestedAssetID].Sending ==false))
|
if ((m_textureSenders[e.RequestedAssetID].ImageLoaded) &&
|
||||||
|
(m_textureSenders[e.RequestedAssetID].Sending == false))
|
||||||
{
|
{
|
||||||
m_textureSenders[e.RequestedAssetID].Sending = true;
|
m_textureSenders[e.RequestedAssetID].Sending = true;
|
||||||
m_sharedSendersQueue.Enqueue(m_textureSenders[e.RequestedAssetID]);
|
m_sharedSendersQueue.Enqueue(m_textureSenders[e.RequestedAssetID]);
|
||||||
|
@ -271,7 +274,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
SendPacket();
|
SendPacket();
|
||||||
counter++;
|
counter++;
|
||||||
if ((NumPackets == 0) || (RequestedDiscardLevel == -1) || (PacketCounter > NumPackets) || ((RequestedDiscardLevel > 0) && (counter > 50 + (NumPackets / (RequestedDiscardLevel + 1)))) )
|
if ((NumPackets == 0) || (RequestedDiscardLevel == -1) || (PacketCounter > NumPackets) ||
|
||||||
|
((RequestedDiscardLevel > 0) && (counter > 50 + (NumPackets/(RequestedDiscardLevel + 1)))))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -323,9 +327,11 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
Array.Copy(m_asset.Data, 600 + (1000*(PacketCounter - 1)), im.ImageData.Data, 0, size);
|
Array.Copy(m_asset.Data, 600 + (1000*(PacketCounter - 1)), im.ImageData.Data, 0, size);
|
||||||
}
|
}
|
||||||
catch (System.ArgumentOutOfRangeException)
|
catch (ArgumentOutOfRangeException)
|
||||||
{
|
{
|
||||||
OpenSim.Framework.Console.MainLog.Instance.Warn("TEXTURE", "Unable to separate texture into multiple packets: Array bounds failure on asset:" + m_asset.FullID.ToString() + "- TextureDownloadModule.cs. line:328");
|
MainLog.Instance.Warn("TEXTURE",
|
||||||
|
"Unable to separate texture into multiple packets: Array bounds failure on asset:" +
|
||||||
|
m_asset.FullID.ToString() + "- TextureDownloadModule.cs. line:328");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RequestUser.OutPacket(im, ThrottleOutPacketType.Texture);
|
RequestUser.OutPacket(im, ThrottleOutPacketType.Texture);
|
||||||
|
@ -349,7 +355,5 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
return numPackets;
|
return numPackets;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -33,10 +33,10 @@ using System.Threading;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Framework.Console;
|
|
||||||
|
|
||||||
/*****************************************************
|
/*****************************************************
|
||||||
*
|
*
|
||||||
|
@ -123,7 +123,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
|
|
||||||
// Start http server
|
// Start http server
|
||||||
// Attach xmlrpc handlers
|
// Attach xmlrpc handlers
|
||||||
m_log.Verbose("REMOTE_DATA", "Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
|
m_log.Verbose("REMOTE_DATA",
|
||||||
|
"Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
|
||||||
BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort);
|
BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort);
|
||||||
httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData);
|
httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData);
|
||||||
httpServer.Start();
|
httpServer.Start();
|
||||||
|
|
|
@ -109,10 +109,11 @@ namespace OpenSim.Region.Environment
|
||||||
|
|
||||||
string reason = "Insufficient permission";
|
string reason = "Insufficient permission";
|
||||||
|
|
||||||
Land land = this.m_scene.LandManager.getLandObject(position.X, position.Y);
|
Land land = m_scene.LandManager.getLandObject(position.X, position.Y);
|
||||||
if (land == null) return false;
|
if (land == null) return false;
|
||||||
|
|
||||||
if ((land.landData.landFlags & ((int)Parcel.ParcelFlags.CreateObjects)) == (int)Parcel.ParcelFlags.CreateObjects)
|
if ((land.landData.landFlags & ((int) Parcel.ParcelFlags.CreateObjects)) ==
|
||||||
|
(int) Parcel.ParcelFlags.CreateObjects)
|
||||||
permission = true;
|
permission = true;
|
||||||
|
|
||||||
//TODO: check for group rights
|
//TODO: check for group rights
|
||||||
|
@ -143,8 +144,6 @@ namespace OpenSim.Region.Environment
|
||||||
|
|
||||||
#region Object Permissions
|
#region Object Permissions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public virtual uint GenerateClientFlags(LLUUID user, LLUUID objID)
|
public virtual uint GenerateClientFlags(LLUUID user, LLUUID objID)
|
||||||
{
|
{
|
||||||
if (!m_scene.Entities.ContainsKey(objID))
|
if (!m_scene.Entities.ContainsKey(objID))
|
||||||
|
@ -298,6 +297,7 @@ namespace OpenSim.Region.Environment
|
||||||
}
|
}
|
||||||
return permission;
|
return permission;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool CanCopyObject(LLUUID user, LLUUID obj)
|
public virtual bool CanCopyObject(LLUUID user, LLUUID obj)
|
||||||
{
|
{
|
||||||
bool permission = GenericObjectPermission(user, obj);
|
bool permission = GenericObjectPermission(user, obj);
|
||||||
|
@ -324,6 +324,7 @@ namespace OpenSim.Region.Environment
|
||||||
}
|
}
|
||||||
return permission;
|
return permission;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool CanReturnObject(LLUUID user, LLUUID obj)
|
public virtual bool CanReturnObject(LLUUID user, LLUUID obj)
|
||||||
{
|
{
|
||||||
return GenericObjectPermission(user, obj);
|
return GenericObjectPermission(user, obj);
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Scenes
|
namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
|
@ -68,11 +68,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
AnimsNames.Add(kp.Value, kp.Key);
|
AnimsNames.Add(kp.Value, kp.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (System.InvalidOperationException)
|
catch (InvalidOperationException)
|
||||||
{
|
{
|
||||||
OpenSim.Framework.Console.MainLog.Instance.Warn("AVATAR", "Unable to load animation names for an Avatar");
|
MainLog.Instance.Warn("AVATAR", "Unable to load animation names for an Avatar");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -26,15 +26,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Console;
|
|
||||||
using OpenSim.Framework.Communications;
|
|
||||||
using OpenSim.Region.Environment.Types;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Scenes
|
namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,7 +146,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public abstract void SetText(string text, Vector3 color, double alpha);
|
public abstract void SetText(string text, Vector3 color, double alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,15 +160,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
public EntityIntersection()
|
public EntityIntersection()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityIntersection(Vector3 _ipoint, float _normal, bool _HitTF)
|
public EntityIntersection(Vector3 _ipoint, float _normal, bool _HitTF)
|
||||||
{
|
{
|
||||||
ipoint = _ipoint;
|
ipoint = _ipoint;
|
||||||
normal = _normal;
|
normal = _normal;
|
||||||
HitTF = _HitTF;
|
HitTF = _HitTF;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Scenes
|
namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
|
||||||
using Axiom.Math;
|
using Axiom.Math;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
|
@ -44,10 +43,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public class InnerScene
|
public class InnerScene
|
||||||
{
|
{
|
||||||
#region Events
|
#region Events
|
||||||
|
|
||||||
public event PhysicsCrash UnRecoverableError;
|
public event PhysicsCrash UnRecoverableError;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
||||||
public Dictionary<LLUUID, ScenePresence> ScenePresences;
|
public Dictionary<LLUUID, ScenePresence> ScenePresences;
|
||||||
public Dictionary<LLUUID, SceneObjectGroup> SceneObjects;
|
public Dictionary<LLUUID, SceneObjectGroup> SceneObjects;
|
||||||
public Dictionary<LLUUID, EntityBase> Entities;
|
public Dictionary<LLUUID, EntityBase> Entities;
|
||||||
|
@ -65,6 +67,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
internal object m_syncRoot = new object();
|
internal object m_syncRoot = new object();
|
||||||
|
|
||||||
public PhysicsScene _PhyScene;
|
public PhysicsScene _PhyScene;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public InnerScene(Scene parent, RegionInfo regInfo, PermissionManager permissionsMngr)
|
public InnerScene(Scene parent, RegionInfo regInfo, PermissionManager permissionsMngr)
|
||||||
|
@ -79,8 +82,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
public PhysicsScene PhysicsScene
|
public PhysicsScene PhysicsScene
|
||||||
{
|
{
|
||||||
get
|
get { return _PhyScene; }
|
||||||
{ return _PhyScene; }
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
// If we're not doing the initial set
|
// If we're not doing the initial set
|
||||||
|
@ -90,7 +92,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
_PhyScene.OnPhysicsCrash -= physicsBasedCrash;
|
_PhyScene.OnPhysicsCrash -= physicsBasedCrash;
|
||||||
}
|
}
|
||||||
catch (System.NullReferenceException)
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
// This occurs when storing to _PhyScene the first time.
|
// This occurs when storing to _PhyScene the first time.
|
||||||
// Is there a better way to check the event handler before
|
// Is there a better way to check the event handler before
|
||||||
|
@ -113,6 +115,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Update Methods
|
#region Update Methods
|
||||||
|
|
||||||
internal void UpdatePreparePhysics()
|
internal void UpdatePreparePhysics()
|
||||||
{
|
{
|
||||||
// If we are using a threaded physics engine
|
// If we are using a threaded physics engine
|
||||||
|
@ -154,9 +157,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
entity.UpdateMovement();
|
entity.UpdateMovement();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Entity Methods
|
#region Entity Methods
|
||||||
|
|
||||||
public void AddEntityFromStorage(SceneObjectGroup sceneObject)
|
public void AddEntityFromStorage(SceneObjectGroup sceneObject)
|
||||||
{
|
{
|
||||||
sceneObject.RegionHandle = m_regInfo.RegionHandle;
|
sceneObject.RegionHandle = m_regInfo.RegionHandle;
|
||||||
|
@ -181,14 +186,17 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_numPrim++;
|
m_numPrim++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddPhysicalPrim(int number)
|
public void AddPhysicalPrim(int number)
|
||||||
{
|
{
|
||||||
m_physicalPrim++;
|
m_physicalPrim++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemovePhysicalPrim(int number)
|
public void RemovePhysicalPrim(int number)
|
||||||
{
|
{
|
||||||
m_physicalPrim--;
|
m_physicalPrim--;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemovePrim(uint localID, LLUUID avatar_deleter)
|
public void RemovePrim(uint localID, LLUUID avatar_deleter)
|
||||||
{
|
{
|
||||||
List<EntityBase> EntityList = GetEntities();
|
List<EntityBase> EntityList = GetEntities();
|
||||||
|
@ -253,6 +261,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
return newAvatar;
|
return newAvatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SwapRootChildAgent(bool direction_RC_CR_T_F)
|
public void SwapRootChildAgent(bool direction_RC_CR_T_F)
|
||||||
{
|
{
|
||||||
if (direction_RC_CR_T_F)
|
if (direction_RC_CR_T_F)
|
||||||
|
@ -266,6 +275,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_numRootAgents++;
|
m_numRootAgents++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeUserCount(bool TypeRCTF)
|
public void removeUserCount(bool TypeRCTF)
|
||||||
{
|
{
|
||||||
if (TypeRCTF)
|
if (TypeRCTF)
|
||||||
|
@ -277,14 +287,17 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_numChildAgents--;
|
m_numChildAgents--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveAPrimCount()
|
public void RemoveAPrimCount()
|
||||||
{
|
{
|
||||||
m_numPrim--;
|
m_numPrim--;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddAPrimCount()
|
public void AddAPrimCount()
|
||||||
{
|
{
|
||||||
m_numPrim++;
|
m_numPrim++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetChildAgentCount()
|
public int GetChildAgentCount()
|
||||||
{
|
{
|
||||||
return m_numChildAgents;
|
return m_numChildAgents;
|
||||||
|
@ -417,7 +430,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return returnResult;
|
return returnResult;
|
||||||
}
|
}
|
||||||
|
@ -537,7 +549,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
//{
|
//{
|
||||||
((SceneObjectGroup) ent).ScheduleFullUpdateToAvatar(presence);
|
((SceneObjectGroup) ent).ScheduleFullUpdateToAvatar(presence);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -554,9 +565,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
action(presence.ControllingClient);
|
action(presence.ControllingClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Client Event handlers
|
#region Client Event handlers
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -583,13 +596,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="AgentID"></param>
|
/// <param name="AgentID"></param>
|
||||||
/// <param name="RequestFlags"></param>
|
/// <param name="RequestFlags"></param>
|
||||||
/// <param name="ObjectID"></param>
|
/// <param name="ObjectID"></param>
|
||||||
public void RequestObjectPropertiesFamily(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID ObjectID)
|
public void RequestObjectPropertiesFamily(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags,
|
||||||
|
LLUUID ObjectID)
|
||||||
{
|
{
|
||||||
SceneObjectGroup group = GetGroupByPrim(ObjectID);
|
SceneObjectGroup group = GetGroupByPrim(ObjectID);
|
||||||
if (group != null)
|
if (group != null)
|
||||||
group.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags);
|
group.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -711,7 +723,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
group.UpdatePrimFlags(localID, (ushort) packet.Type, true, packet.ToBytes());
|
group.UpdatePrimFlags(localID, (ushort) packet.Type, true, packet.ToBytes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
|
public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
|
||||||
|
@ -771,7 +782,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
group.UpdateExtraParam(primLocalID, type, inUse, data);
|
group.UpdateExtraParam(primLocalID, type, inUse, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -786,7 +796,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (PermissionsMngr.CanEditObjectPosition(agentID, group.GetPartsFullID(primLocalID)))
|
if (PermissionsMngr.CanEditObjectPosition(agentID, group.GetPartsFullID(primLocalID)))
|
||||||
{
|
{
|
||||||
|
|
||||||
group.UpdateShape(shapeBlock, primLocalID);
|
group.UpdateShape(shapeBlock, primLocalID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -929,7 +938,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("client", "Attempted to duplicate nonexistant prim");
|
MainLog.Instance.Warn("client", "Attempted to duplicate nonexistant prim");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -943,8 +951,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// We don't really need the double floating point precision...
|
// We don't really need the double floating point precision...
|
||||||
// so casting it to a single
|
// so casting it to a single
|
||||||
|
|
||||||
return (float)Math.Sqrt((v1.x - v2.x) * (v1.x - v2.x) + (v1.y - v2.y) * (v1.y - v2.y) + (v1.z - v2.z) * (v1.z - v2.z));
|
return
|
||||||
|
(float)
|
||||||
|
Math.Sqrt((v1.x - v2.x)*(v1.x - v2.x) + (v1.y - v2.y)*(v1.y - v2.y) + (v1.z - v2.z)*(v1.z - v2.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -26,14 +26,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Axiom.Math;
|
using System.Collections.Generic;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Region.Physics.Manager;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Scenes
|
namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
|
@ -95,7 +93,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
|
InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
AssetBase asset = CreateAsset(item.inventoryName, item.inventoryDescription, (sbyte) item.invType, (sbyte) item.assetType, data);
|
AssetBase asset =
|
||||||
|
CreateAsset(item.inventoryName, item.inventoryDescription, (sbyte) item.invType,
|
||||||
|
(sbyte) item.assetType, data);
|
||||||
AssetCache.AddAsset(asset);
|
AssetCache.AddAsset(asset);
|
||||||
|
|
||||||
item.assetID = asset.FullID;
|
item.assetID = asset.FullID;
|
||||||
|
@ -231,7 +231,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
if (transactions != null)
|
if (transactions != null)
|
||||||
{
|
{
|
||||||
LLUUID assetID = libsecondlife.LLUUID.Combine(transactionID, remoteClient.SecureSessionId);
|
LLUUID assetID = LLUUID.Combine(transactionID, remoteClient.SecureSessionId);
|
||||||
AssetBase asset
|
AssetBase asset
|
||||||
= AssetCache.GetAsset(
|
= AssetCache.GetAsset(
|
||||||
assetID, (item.assetType == (int) AssetType.Texture ? true : false));
|
assetID, (item.assetType == (int) AssetType.Texture ? true : false));
|
||||||
|
@ -271,7 +271,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CopyInventoryItem(IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID, string newName)
|
public void CopyInventoryItem(IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID,
|
||||||
|
LLUUID newFolderID, string newName)
|
||||||
{
|
{
|
||||||
InventoryItemBase item = CommsManager.UserProfileCacheService.libraryRoot.HasItem(oldItemID);
|
InventoryItemBase item = CommsManager.UserProfileCacheService.libraryRoot.HasItem(oldItemID);
|
||||||
if (item == null)
|
if (item == null)
|
||||||
|
@ -325,7 +326,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return asset;
|
return asset;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveInventoryItem(IClientAPI remoteClient,LLUUID folderID, LLUUID itemID, int length, string newName)
|
public void MoveInventoryItem(IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length,
|
||||||
|
string newName)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose(
|
MainLog.Instance.Verbose(
|
||||||
"AGENTINVENTORY",
|
"AGENTINVENTORY",
|
||||||
|
@ -364,8 +366,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
MainLog.Instance.Warn("AGENTINVENTORY", "Failed to find item " + itemID.ToString() + ", no root folder");
|
MainLog.Instance.Warn("AGENTINVENTORY", "Failed to find item " + itemID.ToString() + ", no root folder");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID,
|
private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID,
|
||||||
|
@ -406,7 +406,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="wearableType"></param>
|
/// <param name="wearableType"></param>
|
||||||
/// <param name="nextOwnerMask"></param>
|
/// <param name="nextOwnerMask"></param>
|
||||||
public void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID,
|
public void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID,
|
||||||
uint callbackID, string description, string name, sbyte invType, sbyte assetType,
|
uint callbackID, string description, string name, sbyte invType,
|
||||||
|
sbyte assetType,
|
||||||
byte wearableType, uint nextOwnerMask)
|
byte wearableType, uint nextOwnerMask)
|
||||||
{
|
{
|
||||||
if (transActionID == LLUUID.Zero)
|
if (transActionID == LLUUID.Zero)
|
||||||
|
@ -638,7 +639,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (PermissionsMngr.CanDeRezObject(remoteClient.AgentId, ((SceneObjectGroup) selectedEnt).UUID))
|
if (PermissionsMngr.CanDeRezObject(remoteClient.AgentId, ((SceneObjectGroup) selectedEnt).UUID))
|
||||||
{
|
{
|
||||||
string sceneObjectXml = ((SceneObjectGroup) selectedEnt).ToXmlString();
|
string sceneObjectXml = ((SceneObjectGroup) selectedEnt).ToXmlString();
|
||||||
CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
|
CachedUserInfo userInfo =
|
||||||
|
CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
AssetBase asset = CreateAsset(
|
AssetBase asset = CreateAsset(
|
||||||
|
@ -661,7 +663,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.parentFolderID = DeRezPacket.AgentBlock.DestinationID;
|
item.parentFolderID = DeRezPacket.AgentBlock.DestinationID;
|
||||||
item.inventoryCurrentPermissions = 2147483647;
|
item.inventoryCurrentPermissions = 2147483647;
|
||||||
item.inventoryNextPermissions = 2147483647;
|
item.inventoryNextPermissions = 2147483647;
|
||||||
item.inventoryEveryOnePermissions = ((SceneObjectGroup)selectedEnt).RootPart.EveryoneMask;
|
item.inventoryEveryOnePermissions =
|
||||||
|
((SceneObjectGroup) selectedEnt).RootPart.EveryoneMask;
|
||||||
item.inventoryBasePermissions = ((SceneObjectGroup) selectedEnt).RootPart.BaseMask;
|
item.inventoryBasePermissions = ((SceneObjectGroup) selectedEnt).RootPart.BaseMask;
|
||||||
item.inventoryCurrentPermissions = ((SceneObjectGroup) selectedEnt).RootPart.OwnerMask;
|
item.inventoryCurrentPermissions = ((SceneObjectGroup) selectedEnt).RootPart.OwnerMask;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue