Formatting cleanup.
parent
531f6c01eb
commit
6ef9d4da90
|
@ -23,7 +23,6 @@
|
|||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@ -654,7 +653,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
/// does not supply an open password, the hashed passwords cannot
|
||||
/// be used unless the cliemt has used the same salting mechanism
|
||||
/// to has the password before using it in the authentication
|
||||
/// algorithn. This is not inconceivable...
|
||||
/// algorithm. This is not inconceivable...
|
||||
/// </summary>
|
||||
|
||||
private string getPassword(string user)
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
public class Rest
|
||||
{
|
||||
|
||||
internal static readonly log4net.ILog Log =
|
||||
internal static readonly log4net.ILog Log =
|
||||
log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
internal static bool DEBUG = Log.IsDebugEnabled;
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
using libsecondlife;
|
||||
|
@ -40,10 +39,8 @@ using OpenSim.Framework.Communications.Cache;
|
|||
|
||||
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||
{
|
||||
|
||||
public class RestAssetServices : IRest
|
||||
{
|
||||
|
||||
private bool enabled = false;
|
||||
private string qPrefix = "assets";
|
||||
|
||||
|
@ -52,7 +49,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
public RestAssetServices()
|
||||
{
|
||||
|
||||
Rest.Log.InfoFormat("{0} Asset services initializing", MsgId);
|
||||
Rest.Log.InfoFormat("{0} Using REST Implementation Version {1}", MsgId, Rest.Version);
|
||||
|
||||
|
@ -73,7 +69,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
enabled = true;
|
||||
|
||||
Rest.Log.InfoFormat("{0} Asset services initialization complete", MsgId);
|
||||
|
||||
}
|
||||
|
||||
// Post-construction, pre-enabled initialization opportunity
|
||||
|
@ -111,8 +106,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void DoAsset(RequestData rparm)
|
||||
{
|
||||
|
||||
if (!enabled) return;
|
||||
if (!enabled)
|
||||
return;
|
||||
|
||||
AssetRequestData rdata = (AssetRequestData) rparm;
|
||||
|
||||
|
@ -194,7 +189,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void DoGet(AssetRequestData rdata)
|
||||
{
|
||||
|
||||
bool istexture = false;
|
||||
|
||||
Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method);
|
||||
|
@ -204,13 +198,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
if (rdata.parameters.Length == 1)
|
||||
{
|
||||
|
||||
LLUUID uuid = new LLUUID(rdata.parameters[0]);
|
||||
AssetBase asset = Rest.AssetServices.GetAsset(uuid, istexture);
|
||||
|
||||
if (asset != null)
|
||||
{
|
||||
|
||||
Rest.Log.DebugFormat("{0} Asset located <{1}>", MsgId, rdata.parameters[0]);
|
||||
|
||||
rdata.initXmlWriter();
|
||||
|
@ -227,7 +219,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
rdata.writer.WriteBase64(asset.Data,0,asset.Data.Length);
|
||||
|
||||
rdata.writer.WriteFullEndElement();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -239,7 +230,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
rdata.Complete();
|
||||
rdata.Respond("Asset " + rdata.method + ": Normal completion");
|
||||
|
||||
}
|
||||
|
||||
private void DoPut(AssetRequestData rdata)
|
||||
|
@ -281,7 +271,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
rdata.Complete();
|
||||
rdata.Respond("Asset " + rdata.method + ": Normal completion");
|
||||
|
||||
}
|
||||
|
||||
internal class AssetRequestData : RequestData
|
||||
|
@ -291,6 +280,5 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@ -37,7 +36,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
public class RestHandler : RestPlugin, IHttpAgentHandler
|
||||
{
|
||||
|
||||
/// <remarks>
|
||||
/// The handler delegates are not noteworthy. The allocator allows
|
||||
/// a given handler to optionally subclass the base RequestData
|
||||
|
@ -78,7 +76,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
static RestHandler()
|
||||
{
|
||||
|
||||
Module[] mods = Assembly.GetExecutingAssembly().GetModules();
|
||||
|
||||
foreach (Module m in mods)
|
||||
|
@ -100,7 +97,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion local static state
|
||||
|
@ -128,7 +124,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
if (!handlersLoaded)
|
||||
{
|
||||
|
||||
ConstructorInfo ci;
|
||||
Object ht;
|
||||
|
||||
|
@ -203,7 +198,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
try
|
||||
{
|
||||
|
||||
// This plugin will only be enabled if the broader
|
||||
// REST plugin mechanism is enabled.
|
||||
|
||||
|
@ -314,7 +308,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
Rest.Log.ErrorFormat("{0} Plugin initialization has failed: {1}", MsgId, e.Message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -329,7 +322,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
public override void Close()
|
||||
{
|
||||
|
||||
Rest.Log.InfoFormat("{0} Plugin is terminating", MsgId);
|
||||
|
||||
try
|
||||
|
@ -342,7 +334,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
handler.Close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion overriding methods
|
||||
|
@ -380,7 +371,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -425,8 +415,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
try
|
||||
{
|
||||
handled = ( FindPathHandler(request, response) ||
|
||||
FindStreamHandler(request, response) );
|
||||
handled = FindPathHandler(request, response) ||
|
||||
FindStreamHandler(request, response);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -440,7 +430,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
Rest.Log.DebugFormat("{0} EXIT", MsgId);
|
||||
|
||||
return handled;
|
||||
|
||||
}
|
||||
|
||||
#endregion interface methods
|
||||
|
@ -488,7 +477,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
}
|
||||
|
||||
return rdata.handled;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -501,7 +489,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
public void AddStreamHandler(string httpMethod, string path, RestMethod method)
|
||||
{
|
||||
|
||||
if (!IsEnabled)
|
||||
{
|
||||
return;
|
||||
|
@ -525,7 +512,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
Rest.Log.WarnFormat("{0} Ignoring duplicate handler for {1}", MsgId, path);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -540,7 +526,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
internal bool FindPathHandler(OSHttpRequest request, OSHttpResponse response)
|
||||
{
|
||||
|
||||
RequestData rdata = null;
|
||||
string bestMatch = null;
|
||||
|
||||
|
@ -566,7 +551,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
if (!String.IsNullOrEmpty(bestMatch))
|
||||
{
|
||||
|
||||
rdata = pathAllocators[bestMatch](request, response);
|
||||
|
||||
Rest.Log.DebugFormat("{0} Path based REST handler matched with <{1}>", MsgId, bestMatch);
|
||||
|
@ -583,11 +567,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
Rest.Log.WarnFormat("{0} Request failed: {1}", MsgId, r.Message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return (rdata == null) ? false : rdata.handled;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -597,7 +579,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
internal void AddPathHandler(RestMethodHandler mh, string path, RestMethodAllocator ra)
|
||||
{
|
||||
|
||||
if (!IsEnabled)
|
||||
{
|
||||
return;
|
||||
|
@ -619,8 +600,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
pathHandlers.Add(path, mh);
|
||||
pathAllocators.Add(path, ra);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@ -42,10 +41,8 @@ using Nini.Config;
|
|||
|
||||
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||
{
|
||||
|
||||
public class RestInventoryServices : IRest
|
||||
{
|
||||
|
||||
private bool enabled = false;
|
||||
private string qPrefix = "inventory";
|
||||
|
||||
|
@ -56,7 +53,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
public RestInventoryServices()
|
||||
{
|
||||
|
||||
Rest.Log.InfoFormat("{0} Inventory services initializing", MsgId);
|
||||
Rest.Log.InfoFormat("{0} Using REST Implementation Version {1}", MsgId, Rest.Version);
|
||||
|
||||
|
@ -77,7 +73,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
enabled = true;
|
||||
|
||||
Rest.Log.InfoFormat("{0} Inventory services initialization complete", MsgId);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -134,7 +129,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void DoInventory(RequestData hdata)
|
||||
{
|
||||
|
||||
InventoryRequestData rdata = (InventoryRequestData) hdata;
|
||||
|
||||
Rest.Log.DebugFormat("{0} DoInventory ENTRY", MsgId);
|
||||
|
@ -288,7 +282,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName);
|
||||
rdata.Fail(Rest.HttpStatusCodeServerError,Rest.HttpStatusDescServerError+": inventory retrieval failed");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -302,7 +295,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
switch (rdata.method)
|
||||
{
|
||||
|
||||
case Rest.HEAD : // Do the processing, set the status code, suppress entity
|
||||
DoGet(rdata);
|
||||
rdata.buffer = null;
|
||||
|
@ -331,7 +323,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
Rest.HttpStatusDescMethodNotAllowed+": "+rdata.method+" not supported");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion Interface
|
||||
|
@ -346,7 +337,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void DoGet(InventoryRequestData rdata)
|
||||
{
|
||||
|
||||
rdata.initXmlWriter();
|
||||
|
||||
rdata.writer.WriteStartElement(String.Empty,"Inventory",String.Empty);
|
||||
|
@ -373,7 +363,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
rdata.Complete();
|
||||
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -411,7 +400,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void DoPut(InventoryRequestData rdata)
|
||||
{
|
||||
|
||||
// Resolve the context node specified in the URI. Entity
|
||||
// data will be ADDED beneath this node.
|
||||
|
||||
|
@ -453,7 +441,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
if (entity.Assets.Count > 0)
|
||||
{
|
||||
|
||||
Rest.Log.DebugFormat("{0} Adding {1} assets to server",
|
||||
MsgId, entity.Assets.Count);
|
||||
|
||||
|
@ -467,9 +454,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
Rest.Dump(asset.Data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Modify the context using the collection of folders and items
|
||||
|
@ -477,7 +462,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
foreach (InventoryFolderBase folder in entity.Folders)
|
||||
{
|
||||
|
||||
InventoryFolderBase found;
|
||||
|
||||
// If the parentID is zero, then this folder is going
|
||||
|
@ -519,7 +503,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
Rest.Log.DebugFormat("{0} Adding new folder", MsgId);
|
||||
Rest.InventoryServices.AddFolder(folder);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Now we repeat a similar process for the items included
|
||||
|
@ -527,7 +510,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
foreach (InventoryItemBase item in entity.Items)
|
||||
{
|
||||
|
||||
InventoryItemBase found = null;
|
||||
|
||||
// If the parentID is zero, then this is going
|
||||
|
@ -563,9 +545,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
MsgId, item.ID, item.AssetID, item.InvType, item.AssetType, item.Name);
|
||||
Rest.InventoryServices.AddItem(item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -577,7 +557,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
rdata.Complete();
|
||||
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -604,7 +583,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void DoPost(InventoryRequestData rdata)
|
||||
{
|
||||
|
||||
int count = 0;
|
||||
|
||||
// Resolve the inventory node that is to be modified.
|
||||
|
@ -639,7 +617,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
Rest.Dump(asset.Data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -664,7 +641,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
if (typeof(InventoryFolderBase) == InventoryNode.GetType() ||
|
||||
typeof(InventoryFolderImpl) == InventoryNode.GetType())
|
||||
{
|
||||
|
||||
InventoryFolderBase uri = (InventoryFolderBase) InventoryNode;
|
||||
InventoryFolderBase xml = null;
|
||||
|
||||
|
@ -714,13 +690,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
if (count == 1)
|
||||
{
|
||||
|
||||
InventoryFolderBase TrashCan = GetTrashCan(rdata);
|
||||
|
||||
uri.ParentID = TrashCan.ID;
|
||||
Rest.InventoryServices.MoveFolder(uri);
|
||||
Rest.InventoryServices.PurgeFolder(TrashCan);
|
||||
|
||||
}
|
||||
|
||||
// Now, regardelss of what they represent, we
|
||||
|
@ -735,7 +709,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
Rest.InventoryServices.AddItem(it);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -748,7 +721,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
else
|
||||
{
|
||||
|
||||
InventoryItemBase uri = (InventoryItemBase) InventoryNode;
|
||||
InventoryItemBase xml = null;
|
||||
|
||||
|
@ -786,12 +758,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
// Add the new item to the inventory
|
||||
|
||||
Rest.InventoryServices.AddItem(xml);
|
||||
|
||||
}
|
||||
|
||||
rdata.Complete();
|
||||
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -816,13 +786,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void DoDelete(InventoryRequestData rdata)
|
||||
{
|
||||
|
||||
Object InventoryNode = getInventoryNode(rdata, rdata.root, 1);
|
||||
|
||||
if (typeof(InventoryFolderBase) == InventoryNode.GetType() ||
|
||||
typeof(InventoryFolderImpl) == InventoryNode.GetType())
|
||||
{
|
||||
|
||||
InventoryFolderBase TrashCan = GetTrashCan(rdata);
|
||||
|
||||
InventoryFolderBase folder = (InventoryFolderBase) InventoryNode;
|
||||
|
@ -831,7 +799,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
folder.ParentID = TrashCan.ID;
|
||||
Rest.InventoryServices.MoveFolder(folder);
|
||||
Rest.InventoryServices.PurgeFolder(TrashCan);
|
||||
|
||||
}
|
||||
|
||||
// Deleting items is much more straight forward.
|
||||
|
@ -846,10 +813,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
rdata.Complete();
|
||||
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
|
||||
|
||||
}
|
||||
|
||||
#endregion method-specific processing
|
||||
#endregion method-specific processing
|
||||
|
||||
/// <summary>
|
||||
/// This method is called to obtain the OpenSim inventory object identified
|
||||
|
@ -880,7 +846,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private Object getInventoryNode(InventoryRequestData rdata, InventoryFolderBase folder, int pi)
|
||||
{
|
||||
|
||||
Rest.Log.DebugFormat("{0} Searching folder {1} {2} [{3}]", MsgId, folder.ID, folder.Name, pi);
|
||||
|
||||
// We have just run off the end of the parameter sequence
|
||||
|
@ -894,6 +859,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
// get us there.
|
||||
|
||||
if (rdata.folders != null)
|
||||
{
|
||||
foreach (InventoryFolderBase f in rdata.folders)
|
||||
{
|
||||
// Look for the present node in the directory list
|
||||
|
@ -904,6 +870,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
return getInventoryNode(rdata, f, pi+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No folders that match. Perhaps this parameter identifies an item? If
|
||||
// it does, then it MUST also be the last name in the sequence.
|
||||
|
@ -944,7 +911,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
rdata.Fail(Rest.HttpStatusCodeNotFound, Rest.HttpStatusDescNotFound+": resource "+rdata.path+" not found");
|
||||
|
||||
return null; /* Never reached */
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -961,7 +927,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void traverseInventory(InventoryRequestData rdata, InventoryFolderBase folder, int pi)
|
||||
{
|
||||
|
||||
Rest.Log.DebugFormat("{0} Folder : {1} {2} [{3}]", MsgId, folder.ID, folder.Name, pi);
|
||||
|
||||
if (rdata.folders != null)
|
||||
|
@ -1010,7 +975,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
Rest.Log.DebugFormat("{0} Inventory does not contain item/folder: <{1}>",
|
||||
MsgId, rdata.path);
|
||||
rdata.Fail(Rest.HttpStatusCodeNotFound,Rest.HttpStatusDescNotFound+": no such item/folder");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1023,7 +987,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void formatInventory(InventoryRequestData rdata, InventoryFolderBase folder, string indent)
|
||||
{
|
||||
|
||||
if (Rest.DEBUG)
|
||||
{
|
||||
Rest.Log.DebugFormat("{0} Folder : {1} {2} {3}", MsgId, folder.ID, indent, folder.Name);
|
||||
|
@ -1064,7 +1027,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
// End folder item
|
||||
|
||||
rdata.writer.WriteEndElement();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1073,7 +1035,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void formatItem(InventoryRequestData rdata, InventoryItemBase i, string indent)
|
||||
{
|
||||
|
||||
Rest.Log.DebugFormat("{0} Item : {1} {2} {3}", MsgId, i.ID, indent, i.Name);
|
||||
|
||||
rdata.writer.WriteStartElement(String.Empty,"Item",String.Empty);
|
||||
|
@ -1102,7 +1063,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
rdata.writer.WriteElementString("Asset",i.AssetID.ToString());
|
||||
|
||||
rdata.writer.WriteEndElement();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1117,7 +1077,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private InventoryFolderBase GetTrashCan(InventoryRequestData rdata)
|
||||
{
|
||||
|
||||
InventoryFolderBase TrashCan = null;
|
||||
|
||||
foreach (InventoryFolderBase f in rdata.folders)
|
||||
|
@ -1153,7 +1112,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
}
|
||||
|
||||
return TrashCan;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1163,11 +1121,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private bool FolderHasChanged(InventoryFolderBase newf, InventoryFolderBase oldf)
|
||||
{
|
||||
return ( newf.Name != oldf.Name
|
||||
|| newf.ParentID != oldf.ParentID
|
||||
|| newf.Owner != oldf.Owner
|
||||
|| newf.Type != oldf.Type
|
||||
|| newf.Version != oldf.Version
|
||||
return (newf.Name != oldf.Name
|
||||
|| newf.ParentID != oldf.ParentID
|
||||
|| newf.Owner != oldf.Owner
|
||||
|| newf.Type != oldf.Type
|
||||
|| newf.Version != oldf.Version
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1178,16 +1136,16 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private bool ItemHasChanged(InventoryItemBase newf, InventoryItemBase oldf)
|
||||
{
|
||||
return ( newf.Name != oldf.Name
|
||||
|| newf.Folder != oldf.Description
|
||||
|| newf.Description != oldf.Description
|
||||
|| newf.Owner != oldf.Owner
|
||||
|| newf.Creator != oldf.Creator
|
||||
|| newf.AssetID != oldf.AssetID
|
||||
|| newf.GroupID != oldf.GroupID
|
||||
|| newf.GroupOwned != oldf.GroupOwned
|
||||
|| newf.InvType != oldf.InvType
|
||||
|| newf.AssetType != oldf.AssetType
|
||||
return (newf.Name != oldf.Name
|
||||
|| newf.Folder != oldf.Description
|
||||
|| newf.Description != oldf.Description
|
||||
|| newf.Owner != oldf.Owner
|
||||
|| newf.Creator != oldf.Creator
|
||||
|| newf.AssetID != oldf.AssetID
|
||||
|| newf.GroupID != oldf.GroupID
|
||||
|| newf.GroupOwned != oldf.GroupOwned
|
||||
|| newf.InvType != oldf.InvType
|
||||
|| newf.AssetType != oldf.AssetType
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1215,14 +1173,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
internal XmlInventoryCollection ReconstituteEntity(InventoryRequestData rdata)
|
||||
{
|
||||
|
||||
Rest.Log.DebugFormat("{0} Reconstituting entity", MsgId);
|
||||
|
||||
XmlInventoryCollection ic = new XmlInventoryCollection();
|
||||
|
||||
if (rdata.request.HasEntityBody)
|
||||
{
|
||||
|
||||
Rest.Log.DebugFormat("{0} Entity present", MsgId);
|
||||
|
||||
ic.init(rdata);
|
||||
|
@ -1318,7 +1274,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
Rest.Log.WarnFormat("{0} Unexpected XML parsing error: {1}", MsgId, e.Message);
|
||||
throw e;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1334,7 +1289,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
}
|
||||
|
||||
return ic;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1349,7 +1303,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void CollectFolder(XmlInventoryCollection ic)
|
||||
{
|
||||
|
||||
Rest.Log.DebugFormat("{0} Interpret folder element", MsgId);
|
||||
|
||||
InventoryFolderBase result = new InventoryFolderBase();
|
||||
|
@ -1411,7 +1364,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
bool found = false;
|
||||
|
||||
foreach (InventoryFolderBase parent in ic.rdata.folders)
|
||||
|
@ -1445,7 +1397,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
// obsolete as a consequence.
|
||||
|
||||
ic.Push(result);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1463,7 +1414,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void CollectItem(XmlInventoryCollection ic)
|
||||
{
|
||||
|
||||
Rest.Log.DebugFormat("{0} Interpret item element", MsgId);
|
||||
|
||||
InventoryItemBase result = new InventoryItemBase();
|
||||
|
@ -1484,7 +1434,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
for (int i = 0; i < ic.xml.AttributeCount; i++)
|
||||
{
|
||||
|
||||
ic.xml.MoveToAttribute(i);
|
||||
|
||||
switch (ic.xml.Name)
|
||||
|
@ -1545,7 +1494,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
ic.xml.MoveToElement();
|
||||
|
||||
ic.Push(result);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1659,7 +1607,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
else
|
||||
{
|
||||
|
||||
string b64string = null;
|
||||
|
||||
// Generate a UUID of none were given, and generally none should
|
||||
|
@ -1701,11 +1648,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
ic.Item.AssetID = uuid;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ic.Push(asset);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1716,7 +1661,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void CollectPermissions(XmlInventoryCollection ic)
|
||||
{
|
||||
|
||||
if (ic.xml.HasAttributes)
|
||||
{
|
||||
for (int i = 0; i < ic.xml.AttributeCount; i++)
|
||||
|
@ -1747,7 +1691,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
}
|
||||
|
||||
ic.xml.MoveToElement();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1762,7 +1705,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
private void Validate(XmlInventoryCollection ic)
|
||||
{
|
||||
|
||||
// There really should be an item present if we've
|
||||
// called validate. So fail if there is not.
|
||||
|
||||
|
@ -1788,12 +1730,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
if (ic.Item.AssetID == LLUUID.Zero)
|
||||
{
|
||||
|
||||
Rest.Log.ErrorFormat("{0} Unable to complete request", MsgId);
|
||||
Rest.Log.InfoFormat("{0} Asset information is missing", MsgId);
|
||||
ic.Fail(Rest.HttpStatusCodeBadRequest,
|
||||
Rest.HttpStatusDescBadRequest+": asset information required");
|
||||
|
||||
}
|
||||
|
||||
// If the item is new, then assign it an ID
|
||||
|
@ -1813,12 +1753,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
bool found = false;
|
||||
|
||||
foreach (InventoryFolderBase parent in ic.rdata.folders)
|
||||
{
|
||||
if ( parent.ID == ic.Item.Folder )
|
||||
if (parent.ID == ic.Item.Folder)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
|
@ -1832,7 +1771,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
ic.Fail(Rest.HttpStatusCodeBadRequest,
|
||||
Rest.HttpStatusDescBadRequest+": parent information required");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// If this is an inline asset being constructed in the context
|
||||
|
@ -1860,7 +1798,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
if (ic.Item.AssetType == (int) AssetType.Unknown ||
|
||||
ic.Item.InvType == (int) AssetType.Unknown)
|
||||
{
|
||||
|
||||
Rest.Log.DebugFormat("{0} Attempting to infer item type", MsgId);
|
||||
|
||||
string[] parts = ic.Item.Name.Split(Rest.CA_PERIOD);
|
||||
|
@ -1940,14 +1877,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
}
|
||||
|
||||
ic.reset();
|
||||
|
||||
}
|
||||
|
||||
#region Inventory RequestData extension
|
||||
|
||||
internal class InventoryRequestData : RequestData
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// These are the inventory specific request/response state
|
||||
/// extensions.
|
||||
|
@ -1981,7 +1916,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
Monitor.Pulse(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion Inventory RequestData extension
|
||||
|
@ -1994,7 +1928,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
internal class XmlInventoryCollection : InventoryCollection
|
||||
{
|
||||
|
||||
internal InventoryRequestData rdata;
|
||||
private Stack<InventoryFolderBase> stk;
|
||||
|
||||
|
@ -2087,7 +2020,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
rdata.Fail(code, desc);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,11 +178,10 @@ namespace OpenSim.Data.MySQL
|
|||
SetupShapeCommands(m_shapeDataAdapter, m_connection);
|
||||
m_shapeDataAdapter.Fill(m_shapeTable);
|
||||
|
||||
|
||||
m_itemsTable = createItemsTable();
|
||||
m_dataSet.Tables.Add(m_itemsTable);
|
||||
SetupItemsCommands(m_itemsDataAdapter, m_connection);
|
||||
m_itemsDataAdapter.Fill(m_itemsTable);
|
||||
m_itemsTable = createItemsTable();
|
||||
m_dataSet.Tables.Add(m_itemsTable);
|
||||
SetupItemsCommands(m_itemsDataAdapter, m_connection);
|
||||
m_itemsDataAdapter.Fill(m_itemsTable);
|
||||
|
||||
m_terrainTable = createTerrainTable();
|
||||
m_dataSet.Tables.Add(m_terrainTable);
|
||||
|
|
|
@ -449,7 +449,7 @@ namespace OpenSim.Data.SQLite
|
|||
folderRows = inventoryFolderTable.Select(selectExp);
|
||||
}
|
||||
|
||||
if ( folderRows!=null && folderRows.GetLength(0)>=1 ) // No result means parent folder does not exist
|
||||
if (folderRows != null && folderRows.GetLength(0) >= 1) // No result means parent folder does not exist
|
||||
{ // or has no children
|
||||
/* if we're querying the root folder, just return an unordered list of all folders in the user's
|
||||
* inventory
|
||||
|
@ -481,16 +481,16 @@ namespace OpenSim.Data.SQLite
|
|||
InventoryFolderBase curFolder = buildFolder(row);
|
||||
if (curFolder.ParentID != LLUUID.Zero) // Discard root of tree - not needed
|
||||
{
|
||||
if ( hashtable.ContainsKey(curFolder.ParentID ) )
|
||||
if (hashtable.ContainsKey(curFolder.ParentID))
|
||||
{
|
||||
// Current folder already has a sibling - append to sibling list
|
||||
hashtable[curFolder.ParentID].Add( curFolder );
|
||||
hashtable[curFolder.ParentID].Add(curFolder);
|
||||
}
|
||||
else {
|
||||
List<InventoryFolderBase> siblingList = new List<InventoryFolderBase>();
|
||||
siblingList.Add( curFolder );
|
||||
siblingList.Add(curFolder);
|
||||
// Current folder has no known (yet) siblings
|
||||
hashtable.Add( curFolder.ParentID, siblingList );
|
||||
hashtable.Add(curFolder.ParentID, siblingList);
|
||||
}
|
||||
}
|
||||
} // For all inventory folders
|
||||
|
@ -498,11 +498,11 @@ namespace OpenSim.Data.SQLite
|
|||
// Note: Could release the ds lock here - we don't access folderRows or the database anymore.
|
||||
// This is somewhat of a moot point as the callers of this function usually lock db anyways.
|
||||
|
||||
if ( hashtable.ContainsKey( parentID ) ) // if requested folder does have children
|
||||
folders.AddRange( hashtable[parentID] );
|
||||
if (hashtable.ContainsKey(parentID)) // if requested folder does have children
|
||||
folders.AddRange(hashtable[parentID]);
|
||||
|
||||
// BreadthFirstSearch build inventory tree **Note: folders.Count is *not* static
|
||||
for ( int i = 0; i < folders.Count; i++ )
|
||||
for (int i = 0; i < folders.Count; i++)
|
||||
if (hashtable.ContainsKey(folders[i].ID))
|
||||
folders.AddRange(hashtable[folders[i].ID]);
|
||||
|
||||
|
|
|
@ -68,12 +68,12 @@ namespace OpenSim.Framework.Communications
|
|||
}
|
||||
protected UserProfileCacheService m_userProfileCacheService;
|
||||
|
||||
// protected AgentAssetTransactionsManager m_transactionsManager;
|
||||
// protected AgentAssetTransactionsManager m_transactionsManager;
|
||||
|
||||
// public AgentAssetTransactionsManager TransactionsManager
|
||||
// {
|
||||
// get { return m_transactionsManager; }
|
||||
// }
|
||||
// public AgentAssetTransactionsManager TransactionsManager
|
||||
// {
|
||||
// get { return m_transactionsManager; }
|
||||
// }
|
||||
|
||||
public IAvatarService AvatarService
|
||||
{
|
||||
|
|
|
@ -212,7 +212,6 @@ namespace OpenSim.Framework.Communications
|
|||
|
||||
// Reject the login
|
||||
|
||||
|
||||
m_log.InfoFormat(
|
||||
"[LOGIN END]: XMLRPC Notifying user {0} {1} that they are already logged in",
|
||||
firstname, lastname);
|
||||
|
|
|
@ -457,12 +457,11 @@ namespace OpenSim.Framework
|
|||
|
||||
configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||
"Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);
|
||||
|
||||
}
|
||||
|
||||
public bool shouldMasterAvatarDetailsBeAsked(string configuration_key)
|
||||
{
|
||||
if (MasterAvatarAssignedUUID == LLUUID.Zero)
|
||||
return MasterAvatarAssignedUUID == LLUUID.Zero;
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -38,42 +38,35 @@ namespace OpenSim.Framework.Servers
|
|||
{
|
||||
public class OSHttpRequest
|
||||
{
|
||||
|
||||
|
||||
public string[] AcceptTypes
|
||||
{
|
||||
get { return _acceptTypes; }
|
||||
}
|
||||
private string[] _acceptTypes;
|
||||
|
||||
|
||||
public Encoding ContentEncoding
|
||||
{
|
||||
get { return _contentEncoding; }
|
||||
}
|
||||
private Encoding _contentEncoding;
|
||||
|
||||
|
||||
public long ContentLength
|
||||
{
|
||||
get { return _contentLength64; }
|
||||
}
|
||||
private long _contentLength64;
|
||||
|
||||
|
||||
public long ContentLength64
|
||||
{
|
||||
get { return ContentLength; }
|
||||
}
|
||||
|
||||
|
||||
public string ContentType
|
||||
{
|
||||
get { return _contentType; }
|
||||
}
|
||||
private string _contentType;
|
||||
|
||||
|
||||
// public CookieCollection Cookies
|
||||
// {
|
||||
// get { return _cookies; }
|
||||
|
@ -92,63 +85,54 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
private string _httpMethod;
|
||||
|
||||
|
||||
public Stream InputStream
|
||||
{
|
||||
get { return _inputStream; }
|
||||
}
|
||||
private Stream _inputStream;
|
||||
|
||||
|
||||
// public bool IsSecureConnection
|
||||
// {
|
||||
// get { return _isSecureConnection; }
|
||||
// }
|
||||
// private bool _isSecureConnection;
|
||||
|
||||
|
||||
// public bool IsAuthenticated
|
||||
// {
|
||||
// get { return _isAuthenticated; }
|
||||
// }
|
||||
// private bool _isAuthenticated;
|
||||
|
||||
|
||||
public bool HasEntityBody
|
||||
{
|
||||
get { return _hasbody; }
|
||||
}
|
||||
private bool _hasbody;
|
||||
|
||||
|
||||
public bool KeepAlive
|
||||
{
|
||||
get { return _keepAlive; }
|
||||
}
|
||||
private bool _keepAlive;
|
||||
|
||||
|
||||
public string RawUrl
|
||||
{
|
||||
get { return _rawUrl; }
|
||||
}
|
||||
private string _rawUrl;
|
||||
|
||||
|
||||
public Uri Url
|
||||
{
|
||||
get { return _url; }
|
||||
}
|
||||
private Uri _url;
|
||||
|
||||
|
||||
public string UserAgent
|
||||
{
|
||||
get { return _userAgent; }
|
||||
}
|
||||
private string _userAgent;
|
||||
|
||||
|
||||
public NameValueCollection QueryString
|
||||
{
|
||||
get { return _queryString; }
|
||||
|
@ -161,28 +145,24 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
private Hashtable _query;
|
||||
|
||||
|
||||
public IPEndPoint RemoteIPEndPoint
|
||||
{
|
||||
get { return _ipEndPoint; }
|
||||
}
|
||||
private IPEndPoint _ipEndPoint;
|
||||
|
||||
|
||||
internal HttpRequest HttpRequest
|
||||
{
|
||||
get { return _request; }
|
||||
}
|
||||
private HttpRequest _request;
|
||||
|
||||
|
||||
internal HttpClientContext HttpClientContext
|
||||
{
|
||||
get { return _context; }
|
||||
}
|
||||
private HttpClientContext _context;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Internal whiteboard for handlers to store temporary stuff
|
||||
/// into.
|
||||
|
@ -193,12 +173,10 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
private Dictionary<string, object> _whiteboard = new Dictionary<string, object>();
|
||||
|
||||
|
||||
public OSHttpRequest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public OSHttpRequest(HttpListenerRequest req)
|
||||
{
|
||||
_acceptTypes = req.AcceptTypes;
|
||||
|
|
|
@ -39,7 +39,6 @@ using System.Threading;
|
|||
using log4net;
|
||||
using HttpServer;
|
||||
|
||||
|
||||
namespace OpenSim.Framework.Servers
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -64,7 +63,6 @@ namespace OpenSim.Framework.Servers
|
|||
get { return String.Format("{0} pump {1}", _server.EngineID, _id); }
|
||||
}
|
||||
|
||||
|
||||
public OSHttpRequestPump(OSHttpServer server, OSHttpRequestQueue queue, int id)
|
||||
{
|
||||
_server = server;
|
||||
|
@ -77,7 +75,6 @@ namespace OpenSim.Framework.Servers
|
|||
_engine.Start();
|
||||
|
||||
ThreadTracker.Add(_engine);
|
||||
|
||||
}
|
||||
|
||||
public static OSHttpRequestPump[] Pumps(OSHttpServer server, OSHttpRequestQueue queue, int poolSize)
|
||||
|
@ -107,7 +104,8 @@ namespace OpenSim.Framework.Servers
|
|||
|
||||
while (true)
|
||||
{
|
||||
try {
|
||||
try
|
||||
{
|
||||
// dequeue an OSHttpRequest from OSHttpServer's
|
||||
// request queue
|
||||
req = _queue.Dequeue();
|
||||
|
@ -276,7 +274,8 @@ namespace OpenSim.Framework.Servers
|
|||
// does the content of collection[tag] match
|
||||
// the supplied regex?
|
||||
Match cm = regexs[tag].Match(collection[tag]);
|
||||
if (!cm.Success) {
|
||||
if (!cm.Success)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@ namespace OpenGridServices.Manager
|
|||
{
|
||||
case Gtk.ResponseType.Ok:
|
||||
MainClass.PendingOperations.Enqueue("connect_to_gridserver " + this.entry1.Text + " " + this.entry2.Text + " " + this.entry3.Text);
|
||||
break;
|
||||
break;
|
||||
|
||||
case Gtk.ResponseType.Cancel:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
this.Hide();
|
||||
}
|
||||
|
|
|
@ -89,8 +89,6 @@ namespace OpenSim.Grid.MessagingServer
|
|||
m_log.Info("[REGION]: Starting HTTP process");
|
||||
m_httpServer = new BaseHttpServer(Cfg.HttpPort);
|
||||
|
||||
|
||||
|
||||
msgsvc = new MessageService(Cfg);
|
||||
|
||||
if (msgsvc.registerWithUserServer())
|
||||
|
@ -123,7 +121,6 @@ namespace OpenSim.Grid.MessagingServer
|
|||
switch (what)
|
||||
{
|
||||
case "user":
|
||||
|
||||
try
|
||||
{
|
||||
//userID =
|
||||
|
@ -161,8 +158,6 @@ namespace OpenSim.Grid.MessagingServer
|
|||
m_console.Notice("Region cache cleared! Cleared " + entries.ToString() + " entries");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
|
|
|
@ -45,7 +45,6 @@ namespace OpenSim.Grid.ScriptServer
|
|||
regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, httpServer,
|
||||
moduleLoader, dumpAssetsToFile, physicalPrim, sendTasksToChild, config, "")
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// What does a scene have to do? :P
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace OpenSim.Grid.ScriptServer
|
|||
internal TCPServer m_TCPServer;
|
||||
internal TRPC_Remote RPC;
|
||||
|
||||
public ScriptServerMain()
|
||||
public ScriptServerMain()
|
||||
{
|
||||
m_console = CreateConsole();
|
||||
|
||||
|
@ -69,7 +69,6 @@ namespace OpenSim.Grid.ScriptServer
|
|||
|
||||
Engine.InitializeEngine(null, null, false, Engine.GetScriptManager());
|
||||
|
||||
|
||||
// Set up server
|
||||
//m_RemotingServer = new RemotingServer(listenPort, "DotNetEngine");
|
||||
m_TCPServer = new TCPServer(listenPort);
|
||||
|
|
|
@ -152,7 +152,6 @@ namespace OpenSim.Grid.UserServer
|
|||
m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod));
|
||||
m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod);
|
||||
|
||||
|
||||
m_httpServer.AddStreamHandler(
|
||||
new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod));
|
||||
|
||||
|
|
|
@ -306,8 +306,6 @@ namespace OpenSim.Grid.UserServer
|
|||
theUser.FirstName, theUser.SurName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
|
||||
namespace OpenSim.Region.Environment.Interfaces
|
||||
{
|
||||
|
||||
|
||||
public interface ICommander
|
||||
{
|
||||
void ProcessConsoleCommand(string function, string[] args);
|
||||
|
|
|
@ -159,8 +159,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
|||
updateGroups[0] = OpenSimulatorGroup;
|
||||
|
||||
client.SendGroupMembership(updateGroups);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void OnAgentDataUpdateRequest(IClientAPI remoteClient, LLUUID AgentID, LLUUID SessionID)
|
||||
|
@ -275,6 +273,4 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
|||
GC.Collect();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -408,7 +408,6 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
|||
args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;
|
||||
args.simName = m_scene.RegionInfo.RegionName;
|
||||
|
||||
|
||||
remote_client.SendRegionInfoToEstateMenu(args);
|
||||
}
|
||||
|
||||
|
@ -416,6 +415,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
|||
{
|
||||
remote_client.SendEstateCovenantInformation(m_scene.RegionInfo.RegionSettings.Covenant);
|
||||
}
|
||||
|
||||
private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient)
|
||||
{
|
||||
Dictionary<uint, float> SceneData = new Dictionary<uint,float>();
|
||||
|
|
|
@ -53,8 +53,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
private LandChannel landChannel;
|
||||
private Scene m_scene;
|
||||
|
||||
|
||||
|
||||
private readonly int[,] landIDList = new int[64, 64];
|
||||
private readonly Dictionary<int, ILandObject> landList = new Dictionary<int, ILandObject>();
|
||||
|
||||
|
@ -115,8 +113,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
@ -153,8 +149,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool AllowedForcefulBans
|
||||
{
|
||||
get { return m_allowedForcefulBans; }
|
||||
|
@ -185,11 +179,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
public List<ILandObject> ParcelsNearPoint(LLVector3 position)
|
||||
{
|
||||
List<ILandObject> parcelsNear = new List<ILandObject>();
|
||||
int x;
|
||||
for (x = -4; x <= 4; x += 4)
|
||||
for (int x = -4; x <= 4; x += 4)
|
||||
{
|
||||
int y;
|
||||
for (y = -4; y <= 4; y += 4)
|
||||
for (int y = -4; y <= 4; y += 4)
|
||||
{
|
||||
ILandObject check = GetLandObject(position.X + x, position.Y + y);
|
||||
if (check != null)
|
||||
|
@ -286,7 +278,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
ILandObject over = GetLandObject((int)Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.X))),
|
||||
(int)Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.Y))));
|
||||
|
||||
|
||||
if (over != null)
|
||||
{
|
||||
if (force)
|
||||
|
@ -387,6 +378,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
Console.WriteLine("INVALID LOCAL LAND ID");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a basic Parcel object without an owner (a zeroed key)
|
||||
/// </summary>
|
||||
|
@ -406,13 +398,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
new_land.landData.LocalID = lastLandLocalID;
|
||||
landList.Add(lastLandLocalID, new_land.Copy());
|
||||
|
||||
|
||||
bool[,] landBitmap = new_land.getLandBitmap();
|
||||
int x;
|
||||
for (x = 0; x < 64; x++)
|
||||
for (int x = 0; x < 64; x++)
|
||||
{
|
||||
int y;
|
||||
for (y = 0; y < 64; y++)
|
||||
for (int y = 0; y < 64; y++)
|
||||
{
|
||||
if (landBitmap[x, y])
|
||||
{
|
||||
|
@ -431,11 +420,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
/// <param name="local_id">Land.localID of the peice of land to remove.</param>
|
||||
public void removeLandObject(int local_id)
|
||||
{
|
||||
int x;
|
||||
for (x = 0; x < 64; x++)
|
||||
for (int x = 0; x < 64; x++)
|
||||
{
|
||||
int y;
|
||||
for (y = 0; y < 64; y++)
|
||||
for (int y = 0; y < 64; y++)
|
||||
{
|
||||
if (landIDList[x, y] == local_id)
|
||||
{
|
||||
|
@ -451,12 +438,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
|
||||
private void performFinalLandJoin(ILandObject master, ILandObject slave)
|
||||
{
|
||||
int x;
|
||||
bool[,] landBitmapSlave = slave.getLandBitmap();
|
||||
for (x = 0; x < 64; x++)
|
||||
for (int x = 0; x < 64; x++)
|
||||
{
|
||||
int y;
|
||||
for (y = 0; y < 64; y++)
|
||||
for (int y = 0; y < 64; y++)
|
||||
{
|
||||
if (landBitmapSlave[x, y])
|
||||
{
|
||||
|
@ -519,6 +504,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
}
|
||||
return landList[landIDList[x / 4, y / 4]];
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Parcel Modification
|
||||
|
@ -647,11 +633,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
{
|
||||
int totalX = end_x - start_x;
|
||||
int totalY = end_y - start_y;
|
||||
int y;
|
||||
for (y = 0; y < totalY; y++)
|
||||
for (int y = 0; y < totalY; y++)
|
||||
{
|
||||
int x;
|
||||
for (x = 0; x < totalX; x++)
|
||||
for (int x = 0; x < totalX; x++)
|
||||
{
|
||||
ILandObject tempLandObject = GetLandObject(start_x + x, start_y + y);
|
||||
if (tempLandObject == null) return;
|
||||
|
@ -690,9 +674,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
ILandObject result = AddLandObject(newLand);
|
||||
UpdateLandObject(startLandObject.landData.LocalID, startLandObject.landData);
|
||||
result.sendLandUpdateToAvatarsOverMe();
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -730,7 +711,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
ILandObject masterLandObject = selectedLandObjects[0];
|
||||
selectedLandObjects.RemoveAt(0);
|
||||
|
||||
|
||||
if (selectedLandObjects.Count < 1)
|
||||
{
|
||||
return;
|
||||
|
@ -753,12 +733,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
performFinalLandJoin(masterLandObject, slaveLandObject);
|
||||
}
|
||||
|
||||
|
||||
SetPrimsTainted();
|
||||
|
||||
masterLandObject.sendLandUpdateToAvatarsOverMe();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -777,17 +754,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
int byteArrayCount = 0;
|
||||
int sequenceID = 0;
|
||||
|
||||
int y;
|
||||
for (y = 0; y < 64; y++)
|
||||
for (int y = 0; y < 64; y++)
|
||||
{
|
||||
int x;
|
||||
for (x = 0; x < 64; x++)
|
||||
for (int x = 0; x < 64; x++)
|
||||
{
|
||||
byte tempByte = 0; //This represents the byte for the current 4x4
|
||||
|
||||
ILandObject currentParcelBlock = GetLandObject(x * 4, y * 4);
|
||||
|
||||
|
||||
if (currentParcelBlock != null)
|
||||
{
|
||||
if (currentParcelBlock.landData.OwnerID == remote_client.AgentId)
|
||||
|
@ -813,7 +787,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_OTHER);
|
||||
}
|
||||
|
||||
|
||||
//Now for border control
|
||||
|
||||
ILandObject westParcel = null;
|
||||
|
@ -864,14 +837,11 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
{
|
||||
//Get the land objects within the bounds
|
||||
List<ILandObject> temp = new List<ILandObject>();
|
||||
int x;
|
||||
int i;
|
||||
int inc_x = end_x - start_x;
|
||||
int inc_y = end_y - start_y;
|
||||
for (x = 0; x < inc_x; x++)
|
||||
for (int x = 0; x < inc_x; x++)
|
||||
{
|
||||
int y;
|
||||
for (y = 0; y < inc_y; y++)
|
||||
for (int y = 0; y < inc_y; y++)
|
||||
{
|
||||
ILandObject currentParcel = GetLandObject(start_x + x, start_y + y);
|
||||
|
||||
|
@ -892,12 +862,11 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
requestResult = LandChannel.LAND_RESULT_MULTIPLE;
|
||||
}
|
||||
|
||||
for (i = 0; i < temp.Count; i++)
|
||||
for (int i = 0; i < temp.Count; i++)
|
||||
{
|
||||
temp[i].sendLandProperties(sequence_id, snap_selection, requestResult, remote_client);
|
||||
}
|
||||
|
||||
|
||||
SendParcelOverlay(remote_client);
|
||||
}
|
||||
|
||||
|
@ -921,7 +890,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
|
||||
public void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client)
|
||||
{
|
||||
|
||||
landList[local_id].sendForceObjectSelect(local_id, request_type, remote_client);
|
||||
}
|
||||
|
||||
|
@ -954,7 +922,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
landList[local_id].sendLandUpdateToClient(remote_client);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void handleParcelReclaim(int local_id, IClientAPI remote_client)
|
||||
|
@ -972,7 +939,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
landList[local_id].sendLandUpdateToClient(remote_client);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -1076,7 +1042,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
{
|
||||
selectedParcel.returnLandObjects(returnType, agentIDs, remoteClient);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void NoLandDataFromStorage()
|
||||
|
@ -1093,11 +1058,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
|||
obj.setParcelObjectMaxOverride(overrideDel);
|
||||
}
|
||||
}
|
||||
|
||||
public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel)
|
||||
{
|
||||
}
|
||||
|
||||
#region CAPS handler
|
||||
|
||||
private void OnRegisterCaps(LLUUID agentID, Caps caps)
|
||||
{
|
||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||
|
|
|
@ -103,10 +103,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
|||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void OnRegisterCaps(LLUUID agentID, Caps caps)
|
||||
{
|
||||
m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
|
@ -117,9 +113,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
|||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
{
|
||||
return MapLayerRequest(request, path, param,
|
||||
agentID, caps);
|
||||
agentID, caps);
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -263,12 +258,10 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
|||
Bitmap mapTexture = new Bitmap(1,1);
|
||||
System.Drawing.Image image = (System.Drawing.Image)mapTexture;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
// Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular jpeg data
|
||||
|
||||
|
||||
imgstream = new MemoryStream();
|
||||
|
||||
// non-async because we know we have the asset immediately.
|
||||
|
@ -332,16 +325,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
|||
// From msdn
|
||||
private static ImageCodecInfo GetEncoderInfo(String mimeType)
|
||||
{
|
||||
int j;
|
||||
ImageCodecInfo[] encoders;
|
||||
encoders = ImageCodecInfo.GetImageEncoders();
|
||||
for (j = 0; j < encoders.Length; ++j)
|
||||
for (int j = 0; j < encoders.Length; ++j)
|
||||
{
|
||||
if (encoders[j].MimeType == mimeType)
|
||||
return encoders[j];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,13 +131,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
|
||||
|
||||
|
||||
public delegate void SignificantClientMovement(IClientAPI remote_client);
|
||||
|
||||
public event SignificantClientMovement OnSignificantClientMovement;
|
||||
|
||||
|
||||
|
||||
public delegate void NewGridInstantMessage(GridInstantMessage message);
|
||||
|
||||
public event NewGridInstantMessage OnGridInstantMessageToIMModule;
|
||||
|
@ -172,8 +169,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public event ScriptColliding OnScriptColliding;
|
||||
public event ScriptColliding OnScriptCollidingEnd;
|
||||
|
||||
|
||||
|
||||
public delegate void OnMakeChildAgentDelegate(ScenePresence presence);
|
||||
public event OnMakeChildAgentDelegate OnMakeChildAgent;
|
||||
|
||||
|
@ -289,7 +284,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public int transactionID = 0;
|
||||
public int amountDebited = 0;
|
||||
|
||||
|
||||
public LandBuyArgs(LLUUID pagentId, LLUUID pgroupId, bool pfinal, bool pgroupOwned,
|
||||
bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice,
|
||||
bool pauthenticated)
|
||||
|
@ -306,8 +300,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public delegate void MoneyTransferEvent(Object sender, MoneyTransferArgs e);
|
||||
|
||||
public delegate void LandBuy(Object sender, LandBuyArgs e);
|
||||
|
@ -377,7 +369,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
private ScriptColliding handlerColliding = null;
|
||||
private ScriptColliding handlerCollidingEnd = null;
|
||||
|
||||
|
||||
private SunLindenHour handlerSunGetLindenHour = null;
|
||||
|
||||
public void TriggerOnScriptChangedEvent(uint localID, uint change)
|
||||
|
@ -491,7 +482,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (handlerObjectBeingRemovedFromScene != null)
|
||||
{
|
||||
handlerObjectBeingRemovedFromScene(obj);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -641,7 +631,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
handlerGridInstantMessageToFriends(message);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -698,7 +687,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
handlerNewInventoryItemUpdateComplete(agentID, AssetID, AssetName, userlevel);
|
||||
}
|
||||
}
|
||||
public void TriggerLandBuy (Object sender, LandBuyArgs e)
|
||||
|
||||
public void TriggerLandBuy(Object sender, LandBuyArgs e)
|
||||
{
|
||||
handlerLandBuy = OnLandBuy;
|
||||
if (handlerLandBuy != null)
|
||||
|
@ -706,6 +696,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
handlerLandBuy(sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerValidateLandBuy(Object sender, LandBuyArgs e)
|
||||
{
|
||||
handlerValidateLandBuy = OnValidateLandBuy;
|
||||
|
@ -741,6 +732,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
handlerRequestChangeWaterHeight(height);
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar)
|
||||
{
|
||||
handlerAvatarKill = OnAvatarKilled;
|
||||
|
@ -756,7 +748,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (handlerSignificantClientMovement != null)
|
||||
{
|
||||
handlerSignificantClientMovement(client);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -787,7 +778,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void TriggerNoticeNoLandDataFromStorage()
|
||||
{
|
||||
handlerNoticeNoLandDataFromStorage = OnNoticeNoLandDataFromStorage;
|
||||
|
@ -818,26 +808,24 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void TriggerRequestParcelPrimCountUpdate()
|
||||
{
|
||||
handlerRequestParcelPrimCountUpdate = OnRequestParcelPrimCountUpdate;
|
||||
if (handlerRequestParcelPrimCountUpdate != null)
|
||||
{
|
||||
handlerRequestParcelPrimCountUpdate();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerParcelPrimCountTainted()
|
||||
{
|
||||
handlerParcelPrimCountTainted = OnParcelPrimCountTainted;
|
||||
if (handlerParcelPrimCountTainted != null)
|
||||
{
|
||||
handlerParcelPrimCountTainted();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// this lets us keep track of nasty script events like timer, etc.
|
||||
public void TriggerTimerEvent(uint objLocalID, double Interval)
|
||||
{
|
||||
|
@ -845,9 +833,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (handlerScriptTimerEvent != null)
|
||||
{
|
||||
handlerScriptTimerEvent(objLocalID, Interval);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void TriggerEstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool useEstateTime, float LindenHour)
|
||||
|
@ -875,19 +861,19 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (handlerCollidingStart != null)
|
||||
handlerCollidingStart(localId, colliders);
|
||||
}
|
||||
|
||||
public void TriggerScriptColliding(uint localId, ColliderArgs colliders)
|
||||
{
|
||||
|
||||
handlerColliding = OnScriptColliding;
|
||||
if (handlerColliding != null)
|
||||
handlerColliding(localId, colliders);
|
||||
}
|
||||
|
||||
public void TriggerScriptCollidingEnd(uint localId, ColliderArgs colliders)
|
||||
{
|
||||
handlerCollidingEnd = OnScriptCollidingEnd;
|
||||
if (handlerCollidingEnd != null)
|
||||
handlerCollidingEnd(localId, colliders);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -339,7 +339,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
else
|
||||
item.CreationDate = itemUpd.CreationDate;
|
||||
|
||||
|
||||
// TODO: Check if folder changed and move item
|
||||
//item.NextPermissions = itemUpd.Folder;
|
||||
item.InvType = itemUpd.InvType;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -49,7 +49,6 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
|
||||
public RotatingWheel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID,
|
||||
|
@ -78,7 +77,6 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
|
||||
public ComplexObject()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos)
|
||||
|
|
|
@ -48,6 +48,5 @@ namespace OpenSim.Region.Physics.Manager
|
|||
int[] getIndexListAsIntLocked();
|
||||
float[] getVertexListAsFloatLocked();
|
||||
void releasePinned();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -209,10 +209,8 @@ namespace OpenSim.Region.Physics.Manager
|
|||
public override bool Stopped
|
||||
{
|
||||
get{ return false; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override PhysicsVector Position
|
||||
{
|
||||
get { return PhysicsVector.Zero; }
|
||||
|
|
|
@ -369,28 +369,26 @@ namespace OpenSim.Region.Physics.Meshing
|
|||
float yOffset;
|
||||
float zOffset;
|
||||
|
||||
|
||||
xOffset = 0.5f * (skewStart + totalSkew * (float)percentOfPath);
|
||||
xOffset += (float) System.Math.Sin(angle) * pushX * 0.45f;
|
||||
yOffset = (float)(System.Math.Cos(angle) * (0.5f - yPathScale)) * radiusScale;
|
||||
zOffset = (float)(System.Math.Sin(angle + pushY * 0.9f) * (0.5f - yPathScale)) * radiusScale;
|
||||
|
||||
|
||||
// next apply twist rotation to the profile layer
|
||||
if (twistTotal != 0.0f || twistBot != 0.0f)
|
||||
// next apply twist rotation to the profile layer
|
||||
if (twistTotal != 0.0f || twistBot != 0.0f)
|
||||
{
|
||||
Quaternion profileRot = new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist);
|
||||
foreach (Vertex v in newLayer.vertices)
|
||||
{
|
||||
Quaternion profileRot = new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist);
|
||||
foreach (Vertex v in newLayer.vertices)
|
||||
if (v != null)
|
||||
{
|
||||
if (v != null)
|
||||
{
|
||||
vTemp = v * profileRot;
|
||||
v.X = vTemp.X;
|
||||
v.Y = vTemp.Y;
|
||||
v.Z = vTemp.Z;
|
||||
}
|
||||
vTemp = v * profileRot;
|
||||
v.X = vTemp.X;
|
||||
v.Y = vTemp.Y;
|
||||
v.Z = vTemp.Z;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// now orient the rotation of the profile layer relative to it's position on the path
|
||||
// adding pushY to the angle used to generate the quat appears to approximate the viewer
|
||||
|
|
|
@ -252,7 +252,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
public int physics_logging_interval = 0;
|
||||
public bool physics_logging_append_existing_logfile = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Initiailizes the scene
|
||||
/// Sets many properties that ODE requires to be stable
|
||||
|
@ -360,14 +359,12 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
meshSculptLOD = physicsconfig.GetFloat("mesh_lod", 32f);
|
||||
MeshSculptphysicalLOD = physicsconfig.GetFloat("mesh_physical_lod", 16f);
|
||||
|
||||
|
||||
if (Environment.OSVersion.Platform == PlatformID.Unix)
|
||||
{
|
||||
avPIDD = physicsconfig.GetFloat("av_pid_derivative_linux", 3200.0f);
|
||||
avPIDP = physicsconfig.GetFloat("av_pid_proportional_linux", 1400.0f);
|
||||
avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_linux", 2000000f);
|
||||
bodyMotorJointMaxforceTensor = physicsconfig.GetFloat("body_motor_joint_maxforce_tensor_linux", 2f);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -547,7 +544,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
catch (AccessViolationException)
|
||||
{
|
||||
|
||||
m_log.Warn("[PHYSICS]: Unable to collide test an object");
|
||||
return;
|
||||
}
|
||||
|
@ -604,7 +600,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
// we don't want prim or avatar to explode
|
||||
|
||||
#region InterPenetration Handling - Unintended physics explosions
|
||||
|
@ -850,87 +845,87 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
case ActorTypes.Agent:
|
||||
cc2 = (OdeCharacter)p2;
|
||||
|
||||
// obj1LocalID = cc2.m_localID;
|
||||
switch ((ActorTypes)p1.PhysicsActorType)
|
||||
{
|
||||
case ActorTypes.Agent:
|
||||
cc1 = (OdeCharacter)p1;
|
||||
obj2LocalID = cc1.m_localID;
|
||||
cc1.AddCollisionEvent(cc2.m_localID, collisiondepth);
|
||||
//ctype = (int)CollisionCategories.Character;
|
||||
// obj1LocalID = cc2.m_localID;
|
||||
switch ((ActorTypes)p1.PhysicsActorType)
|
||||
{
|
||||
case ActorTypes.Agent:
|
||||
cc1 = (OdeCharacter)p1;
|
||||
obj2LocalID = cc1.m_localID;
|
||||
cc1.AddCollisionEvent(cc2.m_localID, collisiondepth);
|
||||
//ctype = (int)CollisionCategories.Character;
|
||||
|
||||
//if (cc1.CollidingObj)
|
||||
//cStartStop = (int)StatusIndicators.Generic;
|
||||
//else
|
||||
//cStartStop = (int)StatusIndicators.Start;
|
||||
//if (cc1.CollidingObj)
|
||||
//cStartStop = (int)StatusIndicators.Generic;
|
||||
//else
|
||||
//cStartStop = (int)StatusIndicators.Start;
|
||||
|
||||
//returncollisions = true;
|
||||
break;
|
||||
case ActorTypes.Prim:
|
||||
cp1 = (OdePrim)p1;
|
||||
obj2LocalID = cp1.m_localID;
|
||||
cp1.AddCollisionEvent(cc2.m_localID, collisiondepth);
|
||||
//ctype = (int)CollisionCategories.Geom;
|
||||
//returncollisions = true;
|
||||
break;
|
||||
case ActorTypes.Prim:
|
||||
cp1 = (OdePrim)p1;
|
||||
obj2LocalID = cp1.m_localID;
|
||||
cp1.AddCollisionEvent(cc2.m_localID, collisiondepth);
|
||||
//ctype = (int)CollisionCategories.Geom;
|
||||
|
||||
//if (cp1.CollidingObj)
|
||||
//cStartStop = (int)StatusIndicators.Generic;
|
||||
//else
|
||||
//cStartStop = (int)StatusIndicators.Start;
|
||||
//if (cp1.CollidingObj)
|
||||
//cStartStop = (int)StatusIndicators.Generic;
|
||||
//else
|
||||
//cStartStop = (int)StatusIndicators.Start;
|
||||
|
||||
//returncollisions = true;
|
||||
break;
|
||||
//returncollisions = true;
|
||||
break;
|
||||
|
||||
case ActorTypes.Ground:
|
||||
case ActorTypes.Unknown:
|
||||
obj2LocalID = 0;
|
||||
//ctype = (int)CollisionCategories.Land;
|
||||
//returncollisions = true;
|
||||
break;
|
||||
}
|
||||
case ActorTypes.Ground:
|
||||
case ActorTypes.Unknown:
|
||||
obj2LocalID = 0;
|
||||
//ctype = (int)CollisionCategories.Land;
|
||||
//returncollisions = true;
|
||||
break;
|
||||
}
|
||||
|
||||
cc2.AddCollisionEvent(obj2LocalID, collisiondepth);
|
||||
break;
|
||||
case ActorTypes.Prim:
|
||||
cp2 = (OdePrim)p2;
|
||||
|
||||
// obj1LocalID = cp2.m_localID;
|
||||
switch ((ActorTypes)p1.PhysicsActorType)
|
||||
{
|
||||
case ActorTypes.Agent:
|
||||
cc1 = (OdeCharacter)p1;
|
||||
obj2LocalID = cc1.m_localID;
|
||||
cc1.AddCollisionEvent(cp2.m_localID, collisiondepth);
|
||||
//ctype = (int)CollisionCategories.Character;
|
||||
// obj1LocalID = cp2.m_localID;
|
||||
switch ((ActorTypes)p1.PhysicsActorType)
|
||||
{
|
||||
case ActorTypes.Agent:
|
||||
cc1 = (OdeCharacter)p1;
|
||||
obj2LocalID = cc1.m_localID;
|
||||
cc1.AddCollisionEvent(cp2.m_localID, collisiondepth);
|
||||
//ctype = (int)CollisionCategories.Character;
|
||||
|
||||
//if (cc1.CollidingObj)
|
||||
//cStartStop = (int)StatusIndicators.Generic;
|
||||
//else
|
||||
//cStartStop = (int)StatusIndicators.Start;
|
||||
//returncollisions = true;
|
||||
//if (cc1.CollidingObj)
|
||||
//cStartStop = (int)StatusIndicators.Generic;
|
||||
//else
|
||||
//cStartStop = (int)StatusIndicators.Start;
|
||||
//returncollisions = true;
|
||||
|
||||
break;
|
||||
case ActorTypes.Prim:
|
||||
cp1 = (OdePrim)p1;
|
||||
obj2LocalID = cp1.m_localID;
|
||||
cp1.AddCollisionEvent(cp2.m_localID, collisiondepth);
|
||||
//ctype = (int)CollisionCategories.Geom;
|
||||
break;
|
||||
case ActorTypes.Prim:
|
||||
cp1 = (OdePrim)p1;
|
||||
obj2LocalID = cp1.m_localID;
|
||||
cp1.AddCollisionEvent(cp2.m_localID, collisiondepth);
|
||||
//ctype = (int)CollisionCategories.Geom;
|
||||
|
||||
//if (cp1.CollidingObj)
|
||||
//cStartStop = (int)StatusIndicators.Generic;
|
||||
//else
|
||||
//cStartStop = (int)StatusIndicators.Start;
|
||||
//if (cp1.CollidingObj)
|
||||
//cStartStop = (int)StatusIndicators.Generic;
|
||||
//else
|
||||
//cStartStop = (int)StatusIndicators.Start;
|
||||
|
||||
//returncollisions = true;
|
||||
break;
|
||||
//returncollisions = true;
|
||||
break;
|
||||
|
||||
case ActorTypes.Ground:
|
||||
case ActorTypes.Unknown:
|
||||
obj2LocalID = 0;
|
||||
//ctype = (int)CollisionCategories.Land;
|
||||
case ActorTypes.Ground:
|
||||
case ActorTypes.Unknown:
|
||||
obj2LocalID = 0;
|
||||
//ctype = (int)CollisionCategories.Land;
|
||||
|
||||
//returncollisions = true;
|
||||
break;
|
||||
}
|
||||
//returncollisions = true;
|
||||
break;
|
||||
}
|
||||
|
||||
cp2.AddCollisionEvent(obj2LocalID, collisiondepth);
|
||||
break;
|
||||
|
@ -1015,7 +1010,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
/// <param name="timeStep"></param>
|
||||
private void collision_optimized(float timeStep)
|
||||
{
|
||||
|
||||
foreach (OdeCharacter chr in _characters)
|
||||
{
|
||||
// Reset the collision values to false
|
||||
|
@ -1625,7 +1619,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
//m_log.Info(timeStep.ToString());
|
||||
step_time += timeStep;
|
||||
|
||||
|
||||
// If We're loaded down by something else,
|
||||
// or debugging with the Visual Studio project on pause
|
||||
// skip a few frames to catch up gracefully.
|
||||
|
@ -1739,7 +1732,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
|
||||
d.WorldQuickStep(world, ODE_STEPSIZE);
|
||||
|
||||
d.JointGroupEmpty(contactgroup);
|
||||
//ode.dunlock(world);
|
||||
}
|
||||
|
|
|
@ -355,8 +355,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
|||
|
||||
private static string CreateYPCompilerScript(string compileScript)
|
||||
{
|
||||
|
||||
|
||||
compileScript = String.Empty +
|
||||
"using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog; " +
|
||||
"using OpenSim.Region.ScriptEngine.Common; using System.Collections.Generic;\r\n" +
|
||||
|
|
|
@ -412,8 +412,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
|||
|
||||
private static string CreateYPCompilerScript(string compileScript)
|
||||
{
|
||||
|
||||
|
||||
compileScript = String.Empty +
|
||||
"using OpenSim.Region.ScriptEngine.Shared.YieldProlog; " +
|
||||
"using OpenSim.Region.ScriptEngine.Shared; using System.Collections.Generic;\r\n" +
|
||||
|
|
Loading…
Reference in New Issue