Update svn properties, formatting cleanup.
parent
086284da55
commit
3bf8858727
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -38,10 +38,8 @@ using Nini.Config;
|
|||
|
||||
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||
{
|
||||
|
||||
public class Rest
|
||||
{
|
||||
|
||||
internal static readonly log4net.ILog Log =
|
||||
log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -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
|
|||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
|||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -554,9 +537,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
created = true;
|
||||
rdata.appendStatus(String.Format("<p> Modified folder {0}, UUID {1}<p>",
|
||||
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)
|
||||
|
@ -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>
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
@ -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>"
|
||||
;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -2100,8 +2100,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
// Gesture
|
||||
|
||||
|
||||
|
||||
#region Appearance/ Wearables Methods
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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,8 +593,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public int GetInaccurateNeighborCount()
|
||||
{
|
||||
lock (m_neighbours)
|
||||
{
|
||||
return m_neighbours.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// This is the method that shuts down the scene.
|
||||
public override void Close()
|
||||
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -708,7 +708,6 @@ namespace OpenSim.Region.Physics.Meshing
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void ExtrudeCircular()
|
||||
{
|
||||
this.coords = new List<Coord>();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue