Update svn properties, formatting cleanup.

0.6.0-stable
Jeff Ames 2008-08-28 14:41:54 +00:00
parent 086284da55
commit 3bf8858727
37 changed files with 505 additions and 709 deletions

View File

@ -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;

View File

@ -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;

View File

@ -38,11 +38,9 @@ using Nini.Config;
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;
@ -88,7 +86,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
static Rest()
{
HttpStatusDesc = new Dictionary<int,string>();
HttpStatusDesc = new Dictionary<int,string>();
if (HttpStatusCodeArray.Length != HttpStatusDescArray.Length)
{
Log.ErrorFormat("{0} HTTP Status Code and Description arrays do not match");
@ -455,7 +453,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
return sum;
}
// Nonce management
@ -465,17 +462,15 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
return StringToBase64(CreationDate + Guid.NewGuid().ToString());
}
// Dump he specified data stream;
// Dump the specified data stream
public static void Dump(byte[] data)
{
char[] buffer = new char[Rest.DumpLineSize];
int cc = 0;
for (int i = 0; i < data.Length; i++)
{
if (i % Rest.DumpLineSize == 0) Console.Write("\n{0}: ",i.ToString("d8"));
if (i % 4 == 0) Console.Write(" ");
@ -494,7 +489,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Console.Write(" |"+(new String(buffer))+"|");
cc = 0;
}
}
// Finish off any incomplete line
@ -513,16 +507,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
Console.Write("\n");
}
}
}
// Local exception type
public class RestException : Exception
{
internal int statusCode;
internal string statusDesc;
internal string httpmethod;
@ -532,5 +523,4 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
}
}
}

View File

@ -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,7 +106,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void DoAsset(RequestData rparm)
{
if (!enabled) return;
AssetRequestData rdata = (AssetRequestData) rparm;
@ -186,14 +180,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
Rest.Log.DebugFormat("{0} REST Asset handler EXIT", MsgId);
}
#endregion Interface
private void DoGet(AssetRequestData rdata)
{
bool istexture = false;
Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method);
@ -203,13 +195,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();
@ -237,7 +227,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.Complete();
rdata.Respond("Asset " + rdata.method + ": Normal completion");
}
private void DoPut(AssetRequestData rdata)
@ -277,7 +266,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.Complete();
rdata.Respond("Asset " + rdata.method + ": Normal completion");
}
internal class AssetRequestData : RequestData
@ -287,6 +275,5 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
}
}
}
}

View File

@ -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;
@ -35,7 +34,6 @@ using OpenSim.ApplicationPlugins.Rest;
namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
/// <remarks>
/// The class signature reveals the roles that RestHandler plays.
///
@ -86,7 +84,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
static RestHandler()
{
Module[] mods = Assembly.GetExecutingAssembly().GetModules();
foreach (Module m in mods)
@ -108,7 +105,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
}
}
}
#endregion local static state
@ -136,7 +132,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
if (!handlersLoaded)
{
ConstructorInfo ci;
Object ht;
@ -211,7 +206,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
try
{
// This plugin will only be enabled if the broader
// REST plugin mechanism is enabled.
@ -329,7 +323,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
Rest.Log.ErrorFormat("{0} Plugin initialization has failed: {1}", MsgId, e.Message);
}
}
/// <summary>
@ -344,7 +337,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
public override void Close()
{
Rest.Log.InfoFormat("{0} Plugin is terminating", MsgId);
try
@ -357,7 +349,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
handler.Close();
}
}
#endregion overriding methods
@ -406,7 +397,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
foreach (string key in streamHandlers.Keys)
{
Rest.Log.DebugFormat("{0} Match testing {1} against stream prefix <{2}>", MsgId, path, key);
// Note that Match will not necessarily find the handler that will
@ -426,7 +416,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
}
}
catch (Exception e)
{
@ -486,7 +475,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Rest.Log.DebugFormat("{0} EXIT", MsgId);
return handled;
}
#endregion interface methods
@ -534,7 +522,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
return rdata.handled;
}
/// <summary>
@ -547,7 +534,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
public void AddStreamHandler(string httpMethod, string path, RestMethod method)
{
if (!IsEnabled)
{
return;
@ -571,7 +557,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
Rest.Log.WarnFormat("{0} Ignoring duplicate handler for {1}", MsgId, path);
}
}
/// <summary>
@ -586,7 +571,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
internal bool FindPathHandler(OSHttpRequest request, OSHttpResponse response)
{
RequestData rdata = null;
string bestMatch = null;
@ -612,7 +596,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
if (!String.IsNullOrEmpty(bestMatch))
{
rdata = pathAllocators[bestMatch](request, response, bestMatch);
Rest.Log.DebugFormat("{0} Path based REST handler matched with <{1}>", MsgId, bestMatch);
@ -629,11 +612,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
Rest.Log.WarnFormat("{0} Request failed: {1}", MsgId, r.Message);
}
}
return (rdata == null) ? false : rdata.handled;
}
/// <summary>
@ -643,7 +624,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
public void AddPathHandler(RestMethodHandler mh, string path, RestMethodAllocator ra)
{
if (!IsEnabled)
{
return;
@ -665,8 +645,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
pathHandlers.Add(path, mh);
pathAllocators.Add(path, ra);
}
}
}

View File

@ -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 static readonly int PARM_USERID = 0;
private static readonly int PARM_PATH = 1;
@ -61,7 +58,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);
@ -82,7 +78,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
enabled = true;
Rest.Log.InfoFormat("{0} Inventory services initialization complete", MsgId);
}
/// <summary>
@ -143,7 +138,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void DoInventory(RequestData hdata)
{
InventoryRequestData rdata = (InventoryRequestData) hdata;
Rest.Log.DebugFormat("{0} DoInventory ENTRY", MsgId);
@ -272,7 +266,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
if (Rest.InventoryServices.HasInventoryForUser(rdata.uuid))
{
rdata.root = Rest.InventoryServices.RequestRootFolder(rdata.uuid);
Rest.Log.DebugFormat("{0} Inventory Root retrieved for {1} {2}",
@ -311,7 +304,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;
@ -339,7 +331,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.Fail(Rest.HttpStatusCodeMethodNotAllowed, rdata.method+" not supported");
break;
}
}
#endregion Interface
@ -355,7 +346,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void DoGet(InventoryRequestData rdata)
{
rdata.initXmlWriter();
rdata.writer.WriteStartElement(String.Empty,"Inventory",String.Empty);
@ -379,7 +369,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// constructed from the result of the XML writer.
rdata.Respond(String.Format("Inventory {0} Normal completion", rdata.method));
}
/// <summary>
@ -423,7 +412,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void DoExtend(InventoryRequestData rdata)
{
bool created = false;
bool modified = false;
string newnode = String.Empty;
@ -447,7 +435,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
if (typeof(InventoryFolderBase) == InventoryNode.GetType() ||
typeof(InventoryFolderImpl) == InventoryNode.GetType())
{
// Cast the context node appropriately.
InventoryFolderBase context = (InventoryFolderBase) InventoryNode;
@ -471,7 +458,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
if (entity.Assets.Count > 0)
{
Rest.Log.DebugFormat("{0} Adding {1} assets to server",
MsgId, entity.Assets.Count);
@ -489,9 +475,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
Rest.Dump(asset.Data);
}
}
}
// Modify the context using the collection of folders and items
@ -499,7 +483,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
foreach (InventoryFolderBase folder in entity.Folders)
{
InventoryFolderBase found;
// If the parentID is zero, then this folder is going
@ -544,7 +527,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
modified = true;
rdata.appendStatus(String.Format("<p> Created folder {0}, UUID {1}<p>",
folder.Name, folder.ID));
folder.Name, folder.ID));
}
else
{
@ -553,10 +536,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
created = true;
rdata.appendStatus(String.Format("<p> Modified folder {0}, UUID {1}<p>",
folder.Name, folder.ID));
folder.Name, folder.ID));
}
}
// Now we repeat a similar process for the items included
@ -564,7 +545,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
foreach (InventoryItemBase item in entity.Items)
{
InventoryItemBase found = null;
// If the parentID is zero, then this is going
@ -604,7 +584,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
created = true;
rdata.appendStatus(String.Format("<p> Created item {2}, UUID {3}<p>", item.Name, item.ID));
}
}
if (created)
@ -627,7 +606,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
}
else
{
@ -635,7 +613,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
MsgId, rdata.method, rdata.path, InventoryNode.GetType());
rdata.Fail(Rest.HttpStatusCodeBadRequest, "invalid resource context");
}
}
/// <summary>
@ -663,7 +640,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void DoUpdate(InventoryRequestData rdata)
{
int count = 0;
bool created = false;
bool modified = false;
@ -705,7 +681,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
Rest.Dump(asset.Data);
}
}
}
@ -727,7 +702,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
if (typeof(InventoryFolderBase) == InventoryNode.GetType() ||
typeof(InventoryFolderImpl) == InventoryNode.GetType())
{
bool rfound = false;
InventoryFolderBase uri = (InventoryFolderBase) InventoryNode;
InventoryFolderBase xml = null;
@ -741,7 +715,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
if (uri == rdata.root)
{
foreach (InventoryFolderBase folder in entity.Folders)
{
if ((rfound = (folder.Name == PRIVATE_ROOT_NAME)))
@ -757,7 +730,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
MsgId, rdata.method, rdata.path);
rdata.Fail(Rest.HttpStatusCodeBadRequest, "invalid inventory structure");
}
}
// Scan the set of folders in the entity collection for an
@ -801,7 +773,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
if (count == 1)
{
InventoryFolderBase TrashCan = GetTrashCan(rdata);
// All went well, so we generate a UUID is one is
@ -816,7 +787,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Rest.InventoryServices.MoveFolder(uri);
Rest.InventoryServices.PurgeFolder(TrashCan);
modified = true;
}
// Now, regardelss of what they represent, we
@ -833,7 +803,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.appendStatus(String.Format("<p>Storing item {0} UUID {1}<p>", it.Name, it.ID));
Rest.InventoryServices.AddItem(it);
}
}
/// <summary>
@ -846,7 +815,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
else
{
InventoryItemBase uri = (InventoryItemBase) InventoryNode;
InventoryItemBase xml = null;
@ -884,7 +852,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Rest.InventoryServices.AddItem(xml);
rdata.appendStatus(String.Format("<p>Storing item {0} UUID {1}<p>", xml.Name, xml.ID));
}
if (created)
@ -904,7 +871,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
}
/// <summary>
@ -930,13 +896,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void DoDelete(InventoryRequestData rdata)
{
Object InventoryNode = getInventoryNode(rdata, rdata.root, PARM_PATH, false);
if (typeof(InventoryFolderBase) == InventoryNode.GetType() ||
typeof(InventoryFolderImpl) == InventoryNode.GetType())
{
InventoryFolderBase TrashCan = GetTrashCan(rdata);
InventoryFolderBase folder = (InventoryFolderBase) InventoryNode;
@ -947,7 +911,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Rest.InventoryServices.PurgeFolder(TrashCan);
rdata.appendStatus(String.Format("<p>Deleted folder {0} UUID {1}<p>", folder.Name, folder.ID));
}
// Deleting items is much more straight forward.
@ -963,7 +926,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.Complete();
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
}
#endregion method-specific processing
@ -1000,7 +962,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
InventoryFolderBase folder,
int pi, bool fill)
{
InventoryFolderBase foundf = null;
int fk = 0;
@ -1021,6 +982,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// option.
if (rdata.folders != null)
{
foreach (InventoryFolderBase f in rdata.folders)
{
// Look for the present node in the directory list
@ -1032,6 +994,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
fk++;
}
}
}
// If more than one node matched, then the path, as specified
// is ambiguous.
@ -1099,7 +1062,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.Fail(Rest.HttpStatusCodeNotFound, "resource "+rdata.path+" not found");
return null; /* Never reached */
}
/// <summary>
@ -1119,12 +1081,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void traverse(InventoryRequestData rdata, InventoryFolderBase folder, int pi)
{
Rest.Log.DebugFormat("{0} Traverse[initial] : {1} {2} [{3}]", MsgId, folder.ID, folder.Name, pi);
if (rdata.folders != null)
{
// If there was only one parameter (avatar name), then the entire
// inventory is being requested.
@ -1159,7 +1119,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
return;
}
}
@ -1170,7 +1129,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void traverseInventory(InventoryRequestData rdata, InventoryFolderBase folder, int pi)
{
int fk = 0;
InventoryFolderBase ffound = null;
InventoryItemBase ifound = null;
@ -1194,7 +1152,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
if (pi == rdata.Parameters.Length-1)
{
// Only if there are any items, and there pretty much always are.
if (rdata.items != null)
@ -1240,14 +1197,14 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
else if (fk > 1)
{
rdata.Fail(Rest.HttpStatusCodeConflict,
String.Format("ambiguous element ({0}) in path specified: <{1}>",
pi, rdata.path));
String.Format("ambiguous element ({0}) in path specified: <{1}>",
pi, rdata.path));
}
Rest.Log.DebugFormat("{0} Inventory does not contain item/folder: <{1}>",
MsgId, rdata.path);
rdata.Fail(Rest.HttpStatusCodeNotFound,String.Format("no such item/folder : {0}",
rdata.Parameters[pi]));
rdata.Parameters[pi]));
}
@ -1264,7 +1221,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} type = {4}",
@ -1307,7 +1263,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// End folder item
rdata.writer.WriteEndElement();
}
/// <summary>
@ -1319,7 +1274,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void formatItem(InventoryRequestData rdata, InventoryItemBase i, string indent)
{
Rest.Log.DebugFormat("{0} Item : {1} {2} {3} Type = {4}, AssetType = {5}",
MsgId, i.ID, indent, i.Name, i.InvType, i.AssetType);
@ -1350,7 +1304,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.writer.WriteElementString("Asset",i.AssetID.ToString());
rdata.writer.WriteEndElement();
}
/// <summary>
@ -1366,7 +1319,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private InventoryFolderBase GetTrashCan(InventoryRequestData rdata)
{
InventoryFolderBase TrashCan = null;
foreach (InventoryFolderBase f in rdata.folders)
@ -1401,7 +1353,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
return TrashCan;
}
/// <summary>
@ -1413,11 +1364,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
);
}
@ -1430,16 +1381,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
);
}
@ -1468,14 +1419,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);
@ -1571,7 +1520,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Rest.Log.WarnFormat("{0} Unexpected XML parsing error: {1}", MsgId, e.Message);
throw e;
}
}
else
{
@ -1587,7 +1535,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
return ic;
}
/// <summary>
@ -1602,7 +1549,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void CollectFolder(XmlInventoryCollection ic)
{
Rest.Log.DebugFormat("{0} Interpret folder element", MsgId);
InventoryFolderBase result = new InventoryFolderBase();
@ -1614,7 +1560,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
result.Owner = ic.UserID;
result.ParentID = LLUUID.Zero; // Context
result.Type = (short) AssetType.Folder;
result.Version = 1;
result.Version = 1;
if (ic.xml.HasAttributes)
{
@ -1664,7 +1610,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
else
{
bool found = false;
foreach (InventoryFolderBase parent in ic.rdata.folders)
@ -1682,7 +1627,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
MsgId, ic.Item.Folder, result.ID);
ic.Fail(Rest.HttpStatusCodeBadRequest, "invalid parent");
}
}
// This is a new folder, so no existing UUID is available
@ -1697,7 +1641,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// obsolete as a consequence.
ic.Push(result);
}
/// <summary>
@ -1715,7 +1658,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void CollectItem(XmlInventoryCollection ic)
{
Rest.Log.DebugFormat("{0} Interpret item element", MsgId);
InventoryItemBase result = new InventoryItemBase();
@ -1736,7 +1678,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
for (int i = 0; i < ic.xml.AttributeCount; i++)
{
ic.xml.MoveToAttribute(i);
switch (ic.xml.Name)
@ -1797,7 +1738,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
ic.xml.MoveToElement();
ic.Push(result);
}
/// <summary>
@ -1910,7 +1850,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
else
{
string b64string = null;
// Generate a UUID of none were given, and generally none should
@ -1952,7 +1891,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
ic.Item.AssetID = uuid;
}
}
ic.Push(asset);
@ -1967,7 +1905,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
private void CollectPermissions(XmlInventoryCollection ic)
{
if (ic.xml.HasAttributes)
{
for (int i = 0; i < ic.xml.AttributeCount; i++)
@ -1998,7 +1935,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
ic.xml.MoveToElement();
}
/// <summary>
@ -2013,7 +1949,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.
@ -2037,11 +1972,9 @@ 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, "asset information required");
}
// If the item is new, then assign it an ID
@ -2061,7 +1994,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
else
{
bool found = false;
foreach (InventoryFolderBase parent in ic.rdata.folders)
@ -2079,7 +2011,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
MsgId, ic.Item.Folder, ic.Item.ID);
ic.Fail(Rest.HttpStatusCodeBadRequest, "parent information required");
}
}
// If this is an inline asset being constructed in the context
@ -2107,7 +2038,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);
@ -2188,14 +2118,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.
@ -2230,7 +2158,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Monitor.Pulse(this);
}
}
}
#endregion Inventory RequestData extension
@ -2243,7 +2170,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
internal class XmlInventoryCollection : InventoryCollection
{
internal InventoryRequestData rdata;
private Stack<InventoryFolderBase> stk;
@ -2336,7 +2262,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
rdata.Fail(code, addendum);
}
}
}
}

View File

@ -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;
@ -41,10 +40,8 @@ using OpenSim.Framework.Communications.Cache;
namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
{
public class Remote : ITest
{
private static readonly int PARM_TESTID = 0;
private static readonly int PARM_COMMAND = 1;
@ -95,7 +92,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
public void Execute(RequestData rdata)
{
if (!enabled) return;
// If we can't relate to what's there, leave it for others.
@ -138,7 +134,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
{
if (rdata.Parameters.Length >= 6)
{
string[] names = rdata.Parameters[PARM_MOVE_AVATAR].Split(Rest.CA_SPACE);
ScenePresence avatar = null;
Scene scene = null;
@ -171,7 +166,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
if (avatar != null)
{
Rest.Log.DebugFormat("{0} Move : Avatar {1} located in region {2}",
MsgId, rdata.Parameters[PARM_MOVE_AVATAR], scene.RegionInfo.RegionName);
@ -185,8 +179,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
}
catch (Exception e)
{
rdata.Fail(Rest.HttpStatusCodeBadRequest,
String.Format("invalid parameters: {0}", e.Message));
rdata.Fail(Rest.HttpStatusCodeBadRequest,
String.Format("invalid parameters: {0}", e.Message));
}
}
@ -205,7 +199,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
Rest.Log.WarnFormat("{0} Move: No movement information provided", MsgId);
rdata.Fail(Rest.HttpStatusCodeBadRequest, "no movement information provided");
}
}
private static readonly string Help =
@ -220,6 +213,5 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
+ "</body>"
+ "</html>"
;
}
}

View File

@ -617,9 +617,9 @@ namespace OpenSim.Framework.Communications.Capabilities
IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>();
if(mm != null)
if (mm != null)
{
if(!mm.UploadCovered(client))
if (!mm.UploadCovered(client))
{
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);

View File

@ -42,12 +42,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private Header header;
public override void FromBytes(Header header, byte[] bytes, ref int i, ref int packetEnd, byte[] zeroBuffer)
{
}
public override void FromBytes(byte[] bytes, ref int i, ref int packetEnd, byte[] zeroBuffer)
{
}
public override Header Header { get { return header; } set { header = value; }}
@ -56,6 +54,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
return new byte[0];
}
public KillPacket()
{
Header = new LowHeader();

View File

@ -2100,8 +2100,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Gesture
#region Appearance/ Wearables Methods
/// <summary>

View File

@ -1537,7 +1537,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
{
GetClientFunds(client);
lock(m_KnownClientFunds)
lock (m_KnownClientFunds)
{
if (!m_KnownClientFunds.ContainsKey(client.AgentId))
return 0;
@ -1570,7 +1570,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
int funds = m_KnownClientFunds[remoteClient.AgentId];
if(salePrice != 0 && funds < salePrice)
if (salePrice != 0 && funds < salePrice)
{
remoteClient.SendAgentAlertMessage("Unable to buy now. You don't have sufficient funds.", false);
return;

View File

@ -83,7 +83,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
public bool visible_to_parent;
}
public class OpenGridProtocolModule : IRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -92,8 +91,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
private Dictionary<string, AgentCircuitData> CapsLoginID = new Dictionary<string, AgentCircuitData>();
private Dictionary<LLUUID, OGPState> m_OGPState = new Dictionary<LLUUID, OGPState>();
#region IRegionModule Members
public void Initialise(Scene scene, IConfigSource config)
@ -220,12 +217,9 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
Scene homeScene = GetRootScene();
if (homeScene == null)
return GenerateNoHandlerMessage();
RegionInfo reg = homeScene.RegionInfo;
ulong regionhandle = GetOSCompatibleRegionHandle(reg);
//string RegionURI = reg.ServerURI;
@ -239,7 +233,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
string FirstName = requestMap["first_name"].AsString();
string LastName = requestMap["last_name"].AsString();
OGPState userState = GetOGPState(LocalAgentID);
userState.first_name = requestMap["first_name"].AsString();
@ -299,7 +292,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
useragent.SecureSessionID=agentData.SecureSessionID;
useragent.SessionID = agentData.SessionID;
UserProfileData userProfile = new UserProfileData();
userProfile.AboutText = "OGP User";
userProfile.CanDoMask = (uint)0;
@ -339,14 +331,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
// Do caps registration
// get seed cap
// Stick our data in the cache so the region will know something about us
homeScene.CommsManager.UserProfileCacheService.PreloadUserCache(agentData.AgentID, userProfile);
// Call 'new user' event handler
homeScene.NewUserConnection(reg.RegionHandle, agentData);
//string raCap = string.Empty;
LLUUID AvatarRezCapUUID = LLUUID.Random();
@ -521,27 +511,19 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
responseMap["connect"] = LLSD.FromBoolean(true);
m_log.InfoFormat("[OGP]: host: {0}, IP {1}", responseMap["sim_host"].ToString(), responseMap["sim_ip"].ToString());
}
}
return responseMap;
}
public LLSD DerezAvatarMethod(string path, LLSD request)
{
m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString());
//LLSD llsdResponse = null;
LLSDMap responseMap = new LLSDMap();
string[] PathArray = path.Split('/');
m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]);
string uuidString = PathArray[2];
@ -549,7 +531,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
LLUUID userUUID = LLUUID.Zero;
if (Helpers.TryParse(uuidString, out userUUID))
{
LLUUID RemoteID = uuidString;
LLUUID LocalID = RemoteID;
// FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds
@ -559,7 +540,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
OGPState userState = GetOGPState(LocalID);
if (userState.agent_id != LLUUID.Zero)
{
//LLSDMap outboundRequestMap = new LLSDMap();
LLSDMap inboundRequestMap = (LLSDMap)request;
string rezAvatarString = inboundRequestMap["rez_avatar"].AsString();
@ -569,7 +549,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
LookAtArray.Add(LLSD.FromInteger(1));
LookAtArray.Add(LLSD.FromInteger(1));
LLSDArray PositionArray = new LLSDArray();
PositionArray.Add(LLSD.FromInteger(128));
PositionArray.Add(LLSD.FromInteger(128));
@ -610,7 +589,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
LLSDArray RezResponsePositionArray = (LLSDArray)rezResponseMap["position"];
responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap);
responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString());
responseMap["sim_host"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_host).ToString());
@ -619,23 +597,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
responseMap["region_y"] = LLSD.FromInteger(rrY );
responseMap["region_id"] = LLSD.FromUUID(rrRID);
responseMap["sim_access"] = LLSD.FromString(rrAccess);
responseMap["position"] = RezResponsePositionArray;
responseMap["look_at"] = lookArray;
responseMap["connect"] = LLSD.FromBoolean(true);
ShutdownConnection(LocalID,this);
m_log.Warn("RESPONSEDEREZ: " + responseMap.ToString());
return responseMap;
}
else
{
return GenerateNoHandlerMessage();
}
}
@ -649,14 +621,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
private LLSDMap invokeRezAvatarCap(LLSDMap responseMap, string CapAddress, OGPState userState)
{
Scene reg = GetRootScene();
WebRequest DeRezRequest = WebRequest.Create(CapAddress);
DeRezRequest.Method = "POST";
DeRezRequest.ContentType = "application/xml+llsd";
LLSDMap RAMap = new LLSDMap();
LLSDMap AgentParms = new LLSDMap();
LLSDMap RegionParms = new LLSDMap();
@ -696,7 +666,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
// Planned for version 2
// RAMap["agent_params"] = AgentParms;
RAMap["region_params"] = RegionParms;
RAMap["parameter"] = Parameter;
@ -770,8 +739,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
return responseMap;
}
public LLSD GenerateNoHandlerMessage()
{
LLSDMap map = new LLSDMap();
@ -802,7 +769,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
CapsLoginID.Remove(path);
}
private Scene GetRootScene()
{
Scene ReturnScene = null;
@ -815,7 +781,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
}
return ReturnScene;
}
private ulong GetOSCompatibleRegionHandle(RegionInfo reg)
@ -871,9 +836,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
public void DeleteOGPState(LLUUID agentId)
{
lock (m_OGPState)
{
if (m_OGPState.ContainsKey(agentId))
m_OGPState.Remove(agentId);
}
}
private void UpdateOGPState(LLUUID agentId, OGPState state)
@ -890,6 +856,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
}
}
}
public void ShutdownConnection(LLUUID avatarId, OpenGridProtocolModule mod)
{
Scene homeScene = GetRootScene();
@ -903,22 +870,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
ta.Start();
}
}
// Temporary hack to allow teleporting to and from Vaak
private static bool customXertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error)
{
//if (cert.Subject == "E=root@lindenlab.com, CN=*.vaak.lindenlab.com, O=\"Linden Lab, Inc.\", L=San Francisco, S=California, C=US")
//{
return true;
//}
//return false;
}
}
public class KillAUser
@ -953,12 +915,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
}
}
}
}
public class MonoCert : ICertificatePolicy
{
#region ICertificatePolicy Members
public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem)

View File

@ -103,7 +103,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
Bitmap mapbmp = new Bitmap(256, 256);
//long t = System.Environment.TickCount;
//for(int i = 0; i < 10; ++i) {
//for (int i = 0; i < 10; ++i) {
terrainRenderer.TerrainToBitmap(mapbmp);
//}
//t = System.Environment.TickCount - t;

View File

@ -97,8 +97,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
// No, that doesn't scale it:
// heightvalue = low + mid * (heightvalue - low) / mid; => low + (heightvalue - low) * mid / mid = low + (heightvalue - low) * 1 = low + heightvalue - low = heightvalue
if (Single.IsInfinity(heightvalue) || Single.IsNaN(heightvalue))
heightvalue = 0;
else if (heightvalue > 255f)
@ -198,7 +196,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
mapbmp.SetPixel(x-1, yr+1, color);
}
}
}
}
@ -213,7 +210,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
color = Color.Black;
mapbmp.SetPixel(x, yr, color);
}
}
else
{

View File

@ -82,10 +82,10 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
// (for info about algorithm, see http://en.wikipedia.org/wiki/HSL_and_HSV)
public Color toColor()
{
if(s < 0f) Console.WriteLine("S < 0: " + s);
else if(s > 1f) Console.WriteLine("S > 1: " + s);
if(v < 0f) Console.WriteLine("V < 0: " + v);
else if(v > 1f) Console.WriteLine("V > 1: " + v);
if (s < 0f) Console.WriteLine("S < 0: " + s);
else if (s > 1f) Console.WriteLine("S > 1: " + s);
if (v < 0f) Console.WriteLine("V < 0: " + v);
else if (v > 1f) Console.WriteLine("V > 1: " + v);
float f = h / 60f;
int sector = (int)f % 6;
@ -95,7 +95,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
int ti = (int)(v * (1f - (1f - f) * s) * 255f);
int vi = (int)(v * 255f);
switch(sector)
switch (sector)
{
case 0:
return Color.FromArgb(vi, ti, pi);
@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
{
AssetBase asset = m_scene.AssetCache.GetAsset(id, true);
m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null);
if(asset == null) return null;
if (asset == null) return null;
return new Bitmap(OpenJPEG.DecodeToImage(asset.Data));
}
@ -179,9 +179,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
// color-channel, so 2^24 is the maximum value we can get, adding everything.
// int is be big enough for that.
int r = 0, g = 0, b = 0;
for(int y = 0; y < bmp.Height; ++y)
for (int y = 0; y < bmp.Height; ++y)
{
for(int x = 0; x < bmp.Width; ++x)
for (int x = 0; x < bmp.Width; ++x)
{
Color c = bmp.GetPixel(x, y);
r += (int)c.R & 0xff;
@ -218,14 +218,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
// interpolate two colors in HSV space and return the resulting color
private HSV interpolateHSV(ref HSV c1, ref HSV c2, float ratio) {
if(ratio <= 0f) return c1;
if(ratio >= 1f) return c2;
if (ratio <= 0f) return c1;
if (ratio >= 1f) return c2;
// make sure we are on the same side on the hue-circle for interpolation
// We change the hue of the parameters here, but we don't change the color
// represented by that value
if(c1.h - c2.h > 180f) c1.h -= 360f;
else if(c2.h - c1.h > 180f) c1.h += 360f;
if (c1.h - c2.h > 180f) c1.h -= 360f;
else if (c2.h - c1.h > 180f) c1.h += 360f;
return new HSV(c1.h * (1f - ratio) + c2.h * ratio,
c1.s * (1f - ratio) + c2.s * ratio,
@ -321,16 +321,16 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
}
HSV hsv;
if(hmod <= low) hsv = hsv1; // too low
else if(hmod >= high) hsv = hsv4; // too high
if (hmod <= low) hsv = hsv1; // too low
else if (hmod >= high) hsv = hsv4; // too high
else
{
// HSV-interpolate along the colors
// first, rescale h to 0.0 - 1.0
hmod = (hmod - low) / (high - low);
// now we have to split: 0.00 => color1, 0.33 => color2, 0.67 => color3, 1.00 => color4
if(hmod < 1f/3f) hsv = interpolateHSV(ref hsv1, ref hsv2, hmod * 3f);
else if(hmod < 2f/3f) hsv = interpolateHSV(ref hsv2, ref hsv3, (hmod * 3f) - 1f);
if (hmod < 1f/3f) hsv = interpolateHSV(ref hsv1, ref hsv2, hmod * 3f);
else if (hmod < 2f/3f) hsv = interpolateHSV(ref hsv2, ref hsv3, (hmod * 3f) - 1f);
else hsv = interpolateHSV(ref hsv3, ref hsv4, (hmod * 3f) - 2f);
}

View File

@ -276,8 +276,6 @@ namespace OpenSim.Region.Environment.Scenes
if (m_storageManager.EstateDataStore != null)
m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
//Bind Storage Manager functions to some land manager functions for this scene
EventManager.OnLandObjectAdded +=
new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject);
@ -322,7 +320,6 @@ namespace OpenSim.Region.Environment.Scenes
{
m_log.Warn("Failed to load StartupConfig");
}
}
#endregion
@ -351,7 +348,6 @@ namespace OpenSim.Region.Environment.Scenes
// we add it to the notify list regardless of distance.
// We'll check the agent's draw distance before notifying them though.
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
{
for (int i = 0; i < m_neighbours.Count; i++)
@ -386,8 +382,7 @@ namespace OpenSim.Region.Environment.Scenes
int resultX = Math.Abs((int)otherRegion.RegionLocX - (int)RegionInfo.RegionLocX);
int resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY);
if ((resultX <= 1) &&
(resultY <= 1))
if (resultX <= 1 && resultY <= 1)
{
try
{
@ -584,8 +579,6 @@ namespace OpenSim.Region.Environment.Scenes
}
}
}
}
m_scripts_enabled = !ScriptEngine;
m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine");
@ -600,7 +593,9 @@ namespace OpenSim.Region.Environment.Scenes
public int GetInaccurateNeighborCount()
{
lock (m_neighbours)
{
return m_neighbours.Count;
}
}
// This is the method that shuts down the scene.
@ -1062,7 +1057,6 @@ namespace OpenSim.Region.Environment.Scenes
float hfdiff = hfvalue;
int hfdiffi = 0;
for (int x = 0; x < 256; x++)
{
//int tc = System.Environment.TickCount;
@ -1087,10 +1081,8 @@ namespace OpenSim.Region.Environment.Scenes
//float tmpval = (float)hm[x, y];
float heightvalue = (float)hm[x, y];
if (heightvalue > (float)m_regInfo.RegionSettings.WaterHeight)
{
// scale height value
heightvalue = low + mid * (heightvalue - low) / mid;
@ -1102,6 +1094,7 @@ namespace OpenSim.Region.Environment.Scenes
if (Single.IsInfinity(heightvalue) || Single.IsNaN(heightvalue))
heightvalue = 0;
try
{
Color green = Color.FromArgb((int)heightvalue, 100, (int)heightvalue);
@ -1136,7 +1129,6 @@ namespace OpenSim.Region.Environment.Scenes
// we use floats, colors use bytes, so shrink are space down to
// 0-255
try
{
hfdiffi = Math.Abs((int)((hfdiff * 4) + (hfdiff * 0.5))) + 1;
@ -1166,15 +1158,8 @@ namespace OpenSim.Region.Environment.Scenes
mapbmp.SetPixel(x - 1, (256 - y) - 1, Shade);
}
}
}
}
}
catch (System.ArgumentException)
{
@ -1264,7 +1249,6 @@ namespace OpenSim.Region.Environment.Scenes
if (part == null)
continue;
// Draw if the object is at least 1 meter wide in any direction
if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f)
{
@ -1426,6 +1410,7 @@ namespace OpenSim.Region.Environment.Scenes
}
}
}
public void LazySaveGeneratedMaptile(byte[] data, bool temporary)
{
// Overwrites the local Asset cache with new maptile data
@ -1482,6 +1467,7 @@ namespace OpenSim.Region.Environment.Scenes
asset.Temporary = temporary;
AssetCache.AddAsset(asset);
}
#endregion
#region Load Land
@ -1556,6 +1542,7 @@ namespace OpenSim.Region.Environment.Scenes
pos = RayEnd;
return pos;
}
if (RayTargetID != LLUUID.Zero)
{
SceneObjectPart target = GetSceneObjectPart(RayTargetID);
@ -1921,9 +1908,7 @@ namespace OpenSim.Region.Environment.Scenes
if (position.X > Constants.RegionSize + 0.1f)
{
pos.X = ((pos.X - Constants.RegionSize));
newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize));
// x + 1
}
else if (position.X < -0.1f)
@ -2165,9 +2150,7 @@ namespace OpenSim.Region.Environment.Scenes
client.OnScriptReset += ProcessScriptReset;
client.OnGetScriptRunning += GetScriptRunning;
client.OnSetScriptRunning += SetScriptRunning;
client.OnRegionHandleRequest += RegionHandleRequest;
client.OnUnackedTerrain += TerrainUnAcked;
//Gesture
@ -2185,7 +2168,6 @@ namespace OpenSim.Region.Environment.Scenes
if (userInfo != null)
{
InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId);
if (item != null)
{
@ -2206,7 +2188,6 @@ namespace OpenSim.Region.Environment.Scenes
if (userInfo != null)
{
InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId);
if (item != null)
{
@ -2607,7 +2588,6 @@ namespace OpenSim.Region.Environment.Scenes
"[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}",
agent.AgentID, regionHandle, RegionInfo.RegionName);
}
}
public void UpdateCircuitData(AgentCircuitData data)
@ -2645,9 +2625,8 @@ namespace OpenSim.Region.Environment.Scenes
m_log.InfoFormat("[USERLOGOFF]: Got a logoff request for {0} but the user isn't here. The user might already have been logged out", AvatarID.ToString());
}
}
}
/// <summary>
/// Add a caps handler for the given agent. If the CAPS handler already exists for this agent,
/// then it is replaced by a new CAPS handler.
@ -3016,7 +2995,6 @@ namespace OpenSim.Region.Environment.Scenes
m_statsReporter.SetObjectCapacity(objects);
}
objectCapacity = objects;
}
public List<FriendListItem> GetFriendList(LLUUID avatarID)
@ -3089,7 +3067,6 @@ namespace OpenSim.Region.Environment.Scenes
return LLUUID.Zero;
}
/// <summary>
/// This method is a way for the Friends Module to create an instant
/// message to the avatar and for Instant Messages that travel across
@ -3105,7 +3082,6 @@ namespace OpenSim.Region.Environment.Scenes
m_eventManager.TriggerGridInstantMessage(message, options);
}
public virtual void StoreAddFriendship(LLUUID ownerID, LLUUID friendID, uint perms)
{
// TODO: m_sceneGridService.DoStuff;
@ -3123,6 +3099,7 @@ namespace OpenSim.Region.Environment.Scenes
// TODO: m_sceneGridService.DoStuff;
m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID);
}
public virtual List<FriendListItem> StoreGetFriendsForUser(LLUUID ownerID)
{
// TODO: m_sceneGridService.DoStuff;
@ -3135,11 +3112,13 @@ namespace OpenSim.Region.Environment.Scenes
m_statsReporter.AddOutPackets(outPackets);
m_statsReporter.AddunAckedBytes(unAckedBytes);
}
public void AddAgentTime(int ms)
{
m_statsReporter.addFrameMS(ms);
m_statsReporter.addAgentMS(ms);
}
public void AddAgentUpdates(int count)
{
m_statsReporter.AddAgentUpdates(count);
@ -3239,7 +3218,6 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="Message">The Message being sent to the user</param>
public void SendRegionMessageFromEstateTools(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message)
{
List<ScenePresence> presenceList = GetScenePresences();
foreach (ScenePresence presence in presenceList)
@ -3359,7 +3337,7 @@ namespace OpenSim.Region.Environment.Scenes
foreach (ScenePresence presence in presenceList)
{
if ((presence.Firstname == firstName) && (presence.Lastname == lastName))
if (presence.Firstname == firstName && presence.Lastname == lastName)
{
presence.ControllingClient.SendAgentAlertMessage(message, modal);
break;
@ -3876,7 +3854,6 @@ namespace OpenSim.Region.Environment.Scenes
return m_httpListener.AddLLSDHandler(path, handler);
}
public void RemoveStreamHandler(string httpMethod, string path)
{
m_httpListener.RemoveStreamHandler(httpMethod, path);
@ -3945,7 +3922,6 @@ namespace OpenSim.Region.Environment.Scenes
client.SendRegionHandle(regionID, info.RegionHandle);
}
public void TerrainUnAcked(IClientAPI client, int patchX, int patchY)
{
//Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
@ -3973,10 +3949,10 @@ namespace OpenSim.Region.Environment.Scenes
public void ObjectSaleInfo(IClientAPI client, LLUUID agentID, LLUUID sessionID, uint localID, byte saleType, int salePrice)
{
SceneObjectPart part = GetSceneObjectPart(localID);
if(part == null || part.ParentGroup == null)
if (part == null || part.ParentGroup == null)
return;
if(part.ParentGroup.RootPart == null)
if (part.ParentGroup.RootPart == null)
return;
part = part.ParentGroup.RootPart;
@ -3994,10 +3970,10 @@ namespace OpenSim.Region.Environment.Scenes
{
SceneObjectPart part = GetSceneObjectPart(localID);
if(part == null)
if (part == null)
return;
if(part.ParentGroup == null)
if (part.ParentGroup == null)
return;
SceneObjectGroup group = part.ParentGroup;

View File

@ -636,7 +636,7 @@ namespace OpenSim.Region.Environment.Scenes
// both regions
if (avatar.ParentID != (uint)0)
avatar.StandUp();
if(!avatar.ValidateAttachments())
if (!avatar.ValidateAttachments())
{
avatar.ControllingClient.SendTeleportFailed("Inconsistent attachment state");
return;

View File

@ -2350,10 +2350,10 @@ namespace OpenSim.Region.Environment.Scenes
// Validate
foreach (SceneObjectGroup gobj in m_attachments)
{
if(gobj == null)
if (gobj == null)
return false;
if(gobj.RootPart == null)
if (gobj.RootPart == null)
{
return false;
}
@ -2370,7 +2370,7 @@ namespace OpenSim.Region.Environment.Scenes
// Validate
foreach (SceneObjectGroup gobj in m_attachments)
{
if(gobj == null || gobj.RootPart == null)
if (gobj == null || gobj.RootPart == null)
return false;
}

View File

@ -1891,8 +1891,8 @@ namespace OpenSim.Region.Physics.Meshing
{ // half circle, prim is a sphere
sides = 24;
profileBegin = 0.5f * profileBegin + 0.5f;
profileEnd = 0.5f * profileEnd + 0.5f;
profileBegin = 0.5f * profileBegin + 0.5f;
profileEnd = 0.5f * profileEnd + 0.5f;
//profileHollow = 0.0f; // debugging only
}
@ -1905,7 +1905,6 @@ namespace OpenSim.Region.Physics.Meshing
else if (primShape.HollowShape == HollowShape.Triangle)
hollowSides = 3;
PrimMesh primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides);
//PrimMesh primMesh = new PrimMesh(sides, profileBegin, profileEnd, 0.0f, 4);

View File

@ -99,8 +99,8 @@ namespace OpenSim.Region.Physics.Meshing
internal List<Angle> angles;
// this class should have a table of most commonly computed values
// instead of all the trig function calls
// most common would be for sides = 3, 4, or 24
// instead of all the trig function calls
// most common would be for sides = 3, 4, or 24
internal void makeAngles( int sides, float startAngle, float stopAngle )
{
angles = new List<Angle>();
@ -134,7 +134,7 @@ namespace OpenSim.Region.Physics.Meshing
newAngle.Y = (float) System.Math.Sin(angle);
angles.Add(newAngle);
step += 1;
angle = stepSize * step;
angle = stepSize * step;
}
if (startAngle > angles[0].angle)
@ -189,13 +189,13 @@ namespace OpenSim.Region.Physics.Meshing
float xScale = 0.5f;
float yScale = 0.5f;
if (sides == 4) // corners of a square are sqrt(2) from center
{
{
xScale = 0.707f;
yScale = 0.707f;
yScale = 0.707f;
}
float startAngle = profileStart * twoPi;
float stopAngle = profileEnd * twoPi;
float stopAngle = profileEnd * twoPi;
float stepSize = twoPi / sides;
try { angles.makeAngles(sides, startAngle, stopAngle); }
@ -507,23 +507,23 @@ namespace OpenSim.Region.Physics.Meshing
s += "sides..................: " + this.sides.ToString();
s += "\nhollowSides..........: " + this.hollowSides.ToString();
s += "\nprofileStart.........: " + this.profileStart.ToString();
s += "\nprofileEnd...........: " + this.profileEnd.ToString();
s += "\nhollow...............: " + this.hollow.ToString();
s += "\ntwistBegin...........: " + this.twistBegin.ToString();
s += "\ntwistEnd.............: " + this.twistEnd.ToString();
s += "\ntopShearX............: " + this.topShearX.ToString();
s += "\ntopShearY............: " + this.topShearY.ToString();
s += "\npathCutBegin.........: " + this.pathCutBegin.ToString();
s += "\npathCutEnd...........: " + this.pathCutEnd.ToString();
s += "\ndimpleBegin..........: " + this.dimpleBegin.ToString();
s += "\ndimpleEnd............: " + this.dimpleEnd.ToString();
s += "\nskew.................: " + this.skew.ToString();
s += "\nholeSizeX............: " + this.holeSizeX.ToString();
s += "\nholeSizeY............: " + this.holeSizeY.ToString();
s += "\ntaperX...............: " + this.taperX.ToString();
s += "\ntaperY...............: " + this.taperY.ToString();
s += "\nradius...............: " + this.radius.ToString();
s += "\nrevolutions..........: " + this.revolutions.ToString();
s += "\nprofileEnd...........: " + this.profileEnd.ToString();
s += "\nhollow...............: " + this.hollow.ToString();
s += "\ntwistBegin...........: " + this.twistBegin.ToString();
s += "\ntwistEnd.............: " + this.twistEnd.ToString();
s += "\ntopShearX............: " + this.topShearX.ToString();
s += "\ntopShearY............: " + this.topShearY.ToString();
s += "\npathCutBegin.........: " + this.pathCutBegin.ToString();
s += "\npathCutEnd...........: " + this.pathCutEnd.ToString();
s += "\ndimpleBegin..........: " + this.dimpleBegin.ToString();
s += "\ndimpleEnd............: " + this.dimpleEnd.ToString();
s += "\nskew.................: " + this.skew.ToString();
s += "\nholeSizeX............: " + this.holeSizeX.ToString();
s += "\nholeSizeY............: " + this.holeSizeY.ToString();
s += "\ntaperX...............: " + this.taperX.ToString();
s += "\ntaperY...............: " + this.taperY.ToString();
s += "\nradius...............: " + this.radius.ToString();
s += "\nrevolutions..........: " + this.revolutions.ToString();
s += "\nstepsPerRevolution...: " + this.stepsPerRevolution.ToString();
return s;
@ -542,20 +542,20 @@ namespace OpenSim.Region.Physics.Meshing
this.hollowSides = hollowSides;
if (sides < 3)
this.sides = 3;
this.sides = 3;
if ( hollowSides < 3)
this.hollowSides = 3;
if (profileStart < 0.0f)
this.hollowSides = 3;
if (profileStart < 0.0f)
this.profileStart = 0.0f;
if (profileEnd > 1.0f)
if (profileEnd > 1.0f)
this.profileEnd = 1.0f;
if (profileEnd < 0.02f)
if (profileEnd < 0.02f)
this.profileEnd = 0.02f;
if (profileStart >= profileEnd)
if (profileStart >= profileEnd)
this.profileStart = profileEnd - 0.02f;
if (hollow > 1.0f)
if (hollow > 1.0f)
this.hollow = 1.0f;
if (hollow < 0.0f)
if (hollow < 0.0f)
this.hollow = 0.0f;
}
@ -708,7 +708,6 @@ namespace OpenSim.Region.Physics.Meshing
}
}
public void ExtrudeCircular()
{
this.coords = new List<Coord>();
@ -721,9 +720,9 @@ namespace OpenSim.Region.Physics.Meshing
float twistEnd = this.twistEnd / 360.0f * twoPi;
float twistTotal = twistEnd - twistBegin;
// if the profile has a lot of twist, add more layers otherwise the layers may overlap
// and the resulting mesh may be quite inaccurate. This method is arbitrary and doesn't
// accurately match the viewer
// if the profile has a lot of twist, add more layers otherwise the layers may overlap
// and the resulting mesh may be quite inaccurate. This method is arbitrary and doesn't
// accurately match the viewer
float twistTotalAbs = Math.Abs(twistTotal);
if (twistTotalAbs > 0.01f)
{
@ -739,12 +738,12 @@ namespace OpenSim.Region.Physics.Meshing
float skewStart = this.pathCutBegin * 2.0f * this.skew - this.skew;
// It's not quite clear what pushY (Y top shear) does, but subtracting it from the start and end
// angles appears to approximate it's effects on path cut. Likewise, adding it to the angle used
// to calculate the sine for generating the path radius appears to approximate it's effects there
// too, but there are some subtle differences in the radius which are noticeable as the prim size
// increases and it may affect megaprims quite a bit. The effect of the Y top shear parameter on
// the meshes generated with this technique appear nearly identical in shape to the same prims when
// displayed by the viewer.
// angles appears to approximate it's effects on path cut. Likewise, adding it to the angle used
// to calculate the sine for generating the path radius appears to approximate it's effects there
// too, but there are some subtle differences in the radius which are noticeable as the prim size
// increases and it may affect megaprims quite a bit. The effect of the Y top shear parameter on
// the meshes generated with this technique appear nearly identical in shape to the same prims when
// displayed by the viewer.
float startAngle = (twoPi * this.pathCutBegin * this.revolutions) - this.topShearY * 0.9f;
float endAngle = (twoPi * this.pathCutEnd * this.revolutions) - this.topShearY * 0.9f;
@ -834,7 +833,7 @@ namespace OpenSim.Region.Physics.Meshing
newLayer.AddRot(new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist));
// now orient the rotation of the profile layer relative to it's position on the path
// adding taperY to the angle used to generate the quat appears to approximate the viewer
// adding taperY to the angle used to generate the quat appears to approximate the viewer
newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY * 0.9f));
newLayer.AddPos(xOffset, yOffset, zOffset);

View File

@ -2296,7 +2296,7 @@ namespace OpenSim.Region.ScriptEngine.Common
bool found = false;
float dist = (float)llVecDist(llGetPos(), pos);
if(dist > m_distanceFactor * 10.0f)
if (dist > m_distanceFactor * 10.0f)
return;
// Instead of using return;, I'm using continue; because in our TaskInventory implementation
@ -7014,10 +7014,10 @@ namespace OpenSim.Region.ScriptEngine.Common
{
case 5: // DATA_SIM_POS
if (info == null)
{
// ScriptSleep(1000);
return LLUUID.Zero.ToString();
}
{
// ScriptSleep(1000);
return LLUUID.Zero.ToString();
}
reply = new LSL_Types.Vector3(
info.RegionLocX * Constants.RegionSize,
info.RegionLocY * Constants.RegionSize,
@ -7031,10 +7031,10 @@ namespace OpenSim.Region.ScriptEngine.Common
break;
case 7: // DATA_SIM_RATING
if (info == null)
{
// ScriptSleep(1000);
return LLUUID.Zero.ToString();
}
{
// ScriptSleep(1000);
return LLUUID.Zero.ToString();
}
int access = info.RegionSettings.Maturity;
if (access == 0)
reply = "PG";
@ -7047,18 +7047,18 @@ namespace OpenSim.Region.ScriptEngine.Common
reply = m_ScriptEngine.World.GetSimulatorVersion();
break;
default:
// ScriptSleep(1000);
// ScriptSleep(1000);
return LLUUID.Zero.ToString(); // Raise no event
}
LLUUID rq = LLUUID.Random();
LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.
m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString());
LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.
m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString());
m_ScriptEngine.m_ASYNCLSLCommandManager.
m_Dataserver.DataserverReply(rq.ToString(), reply);
m_ScriptEngine.m_ASYNCLSLCommandManager.
m_Dataserver.DataserverReply(rq.ToString(), reply);
// ScriptSleep(1000);
// ScriptSleep(1000);
return tid.ToString();
}
catch(Exception e)
@ -8041,12 +8041,12 @@ namespace OpenSim.Region.ScriptEngine.Common
(line >= 0) &&
(line < notecardLines.Length))
{
// ScriptSleep(100);
// ScriptSleep(100);
return notecardLines[line];
}
else
{
// ScriptSleep(100);
// ScriptSleep(100);
return String.Empty;
}
}

View File

@ -2130,7 +2130,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
float dist = (float)llVecMag(llGetPos() - pos);
if(dist > m_ScriptDistanceFactor * 10.0f)
if (dist > m_ScriptDistanceFactor * 10.0f)
return;
m_host.AddScriptLPS(1);
@ -5735,8 +5735,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case (int)ScriptBaseClass.PRIM_POINT_LIGHT:
if (remain < 5)
return;
LSL_Types.LSLInteger light = new LSL_Types.LSLInteger(rules.Data[idx++].ToString());
LSL_Types.Vector3 lightcolor =new LSL_Types.Vector3(rules.Data[idx++].ToString());
LSL_Types.LSLInteger light = new LSL_Types.LSLInteger(rules.Data[idx++].ToString());
LSL_Types.Vector3 lightcolor = new LSL_Types.Vector3(rules.Data[idx++].ToString());
float intensity = (float)Convert.ToDouble(rules.Data[idx++]);
float radius = (float)Convert.ToDouble(rules.Data[idx++]);
float falloff = (float)Convert.ToDouble(rules.Data[idx++]);
@ -6895,10 +6895,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
case 5: // DATA_SIM_POS
if (info == null)
{
// ScriptSleep(1000);
return LLUUID.Zero.ToString();
}
{
// ScriptSleep(1000);
return LLUUID.Zero.ToString();
}
reply = new LSL_Types.Vector3(
info.RegionLocX * Constants.RegionSize,
info.RegionLocY * Constants.RegionSize,
@ -6912,10 +6912,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
break;
case 7: // DATA_SIM_RATING
if (info == null)
{
// ScriptSleep(1000);
return LLUUID.Zero.ToString();
}
{
// ScriptSleep(1000);
return LLUUID.Zero.ToString();
}
int access = info.RegionSettings.Maturity;
if (access == 0)
reply = "PG";
@ -6928,7 +6928,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
reply = m_ScriptEngine.World.GetSimulatorVersion();
break;
default:
// ScriptSleep(1000);
// ScriptSleep(1000);
return LLUUID.Zero.ToString(); // Raise no event
}
LLUUID rq = LLUUID.Random();
@ -6939,7 +6939,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
AsyncCommands.
DataserverPlugin.DataserverReply(rq.ToString(), reply);
// ScriptSleep(1000);
// ScriptSleep(1000);
return tid.ToString();
}
catch(Exception e)
@ -7910,7 +7910,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
AsyncCommands.
DataserverPlugin.DataserverReply(item.AssetID.ToString(),
NotecardCache.GetLines(item.AssetID).ToString());
// ScriptSleep(100);
// ScriptSleep(100);
return tid.ToString();
}
WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a)
@ -7924,7 +7924,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
DataserverPlugin.DataserverReply(id.ToString(),
NotecardCache.GetLines(id).ToString());
});
// ScriptSleep(100);
// ScriptSleep(100);
return tid.ToString();
}
}
@ -7948,7 +7948,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
AsyncCommands.
DataserverPlugin.DataserverReply(item.AssetID.ToString(),
NotecardCache.GetLine(item.AssetID, line));
// ScriptSleep(100);
// ScriptSleep(100);
return tid.ToString();
}
WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a)
@ -7963,7 +7963,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
NotecardCache.GetLine(id, line));
});
// ScriptSleep(100);
// ScriptSleep(100);
return tid.ToString();
}
}

View File

@ -89,7 +89,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
det[0].Key = remoteClient.AgentId;
det[0].Populate(myScriptEngine.World);
if (originalID == 0)
{
SceneObjectPart part = myScriptEngine.World.GetSceneObjectPart(localID);