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
|
* 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
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* 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
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -38,10 +38,8 @@ using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
|
|
||||||
public class Rest
|
public class Rest
|
||||||
{
|
{
|
||||||
|
|
||||||
internal static readonly log4net.ILog Log =
|
internal static readonly log4net.ILog Log =
|
||||||
log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -455,7 +453,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
|
|
||||||
return sum;
|
return sum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nonce management
|
// Nonce management
|
||||||
|
@ -465,17 +462,15 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
return StringToBase64(CreationDate + Guid.NewGuid().ToString());
|
return StringToBase64(CreationDate + Guid.NewGuid().ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dump he specified data stream;
|
// Dump the specified data stream
|
||||||
|
|
||||||
public static void Dump(byte[] data)
|
public static void Dump(byte[] data)
|
||||||
{
|
{
|
||||||
|
|
||||||
char[] buffer = new char[Rest.DumpLineSize];
|
char[] buffer = new char[Rest.DumpLineSize];
|
||||||
int cc = 0;
|
int cc = 0;
|
||||||
|
|
||||||
for (int i = 0; i < data.Length; i++)
|
for (int i = 0; i < data.Length; i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (i % Rest.DumpLineSize == 0) Console.Write("\n{0}: ",i.ToString("d8"));
|
if (i % Rest.DumpLineSize == 0) Console.Write("\n{0}: ",i.ToString("d8"));
|
||||||
|
|
||||||
if (i % 4 == 0) Console.Write(" ");
|
if (i % 4 == 0) Console.Write(" ");
|
||||||
|
@ -494,7 +489,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
Console.Write(" |"+(new String(buffer))+"|");
|
Console.Write(" |"+(new String(buffer))+"|");
|
||||||
cc = 0;
|
cc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finish off any incomplete line
|
// Finish off any incomplete line
|
||||||
|
@ -513,16 +507,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
Console.Write("\n");
|
Console.Write("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Local exception type
|
// Local exception type
|
||||||
|
|
||||||
public class RestException : Exception
|
public class RestException : Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
internal int statusCode;
|
internal int statusCode;
|
||||||
internal string statusDesc;
|
internal string statusDesc;
|
||||||
internal string httpmethod;
|
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
|
* 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
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
@ -40,10 +39,8 @@ using OpenSim.Framework.Communications.Cache;
|
||||||
|
|
||||||
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
|
|
||||||
public class RestAssetServices : IRest
|
public class RestAssetServices : IRest
|
||||||
{
|
{
|
||||||
|
|
||||||
private bool enabled = false;
|
private bool enabled = false;
|
||||||
private string qPrefix = "assets";
|
private string qPrefix = "assets";
|
||||||
|
|
||||||
|
@ -52,7 +49,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
public RestAssetServices()
|
public RestAssetServices()
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.InfoFormat("{0} Asset services initializing", MsgId);
|
Rest.Log.InfoFormat("{0} Asset services initializing", MsgId);
|
||||||
Rest.Log.InfoFormat("{0} Using REST Implementation Version {1}", MsgId, Rest.Version);
|
Rest.Log.InfoFormat("{0} Using REST Implementation Version {1}", MsgId, Rest.Version);
|
||||||
|
|
||||||
|
@ -73,7 +69,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
enabled = true;
|
enabled = true;
|
||||||
|
|
||||||
Rest.Log.InfoFormat("{0} Asset services initialization complete", MsgId);
|
Rest.Log.InfoFormat("{0} Asset services initialization complete", MsgId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Post-construction, pre-enabled initialization opportunity
|
// Post-construction, pre-enabled initialization opportunity
|
||||||
|
@ -111,7 +106,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void DoAsset(RequestData rparm)
|
private void DoAsset(RequestData rparm)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!enabled) return;
|
if (!enabled) return;
|
||||||
|
|
||||||
AssetRequestData rdata = (AssetRequestData) rparm;
|
AssetRequestData rdata = (AssetRequestData) rparm;
|
||||||
|
@ -186,14 +180,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} REST Asset handler EXIT", MsgId);
|
Rest.Log.DebugFormat("{0} REST Asset handler EXIT", MsgId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Interface
|
#endregion Interface
|
||||||
|
|
||||||
private void DoGet(AssetRequestData rdata)
|
private void DoGet(AssetRequestData rdata)
|
||||||
{
|
{
|
||||||
|
|
||||||
bool istexture = false;
|
bool istexture = false;
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method);
|
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)
|
if (rdata.Parameters.Length == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
LLUUID uuid = new LLUUID(rdata.Parameters[0]);
|
LLUUID uuid = new LLUUID(rdata.Parameters[0]);
|
||||||
AssetBase asset = Rest.AssetServices.GetAsset(uuid, istexture);
|
AssetBase asset = Rest.AssetServices.GetAsset(uuid, istexture);
|
||||||
|
|
||||||
if (asset != null)
|
if (asset != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Asset located <{1}>", MsgId, rdata.Parameters[0]);
|
Rest.Log.DebugFormat("{0} Asset located <{1}>", MsgId, rdata.Parameters[0]);
|
||||||
|
|
||||||
rdata.initXmlWriter();
|
rdata.initXmlWriter();
|
||||||
|
@ -237,7 +227,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
rdata.Complete();
|
rdata.Complete();
|
||||||
rdata.Respond("Asset " + rdata.method + ": Normal completion");
|
rdata.Respond("Asset " + rdata.method + ": Normal completion");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DoPut(AssetRequestData rdata)
|
private void DoPut(AssetRequestData rdata)
|
||||||
|
@ -277,7 +266,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
rdata.Complete();
|
rdata.Complete();
|
||||||
rdata.Respond("Asset " + rdata.method + ": Normal completion");
|
rdata.Respond("Asset " + rdata.method + ": Normal completion");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class AssetRequestData : RequestData
|
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
|
* 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
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@ -35,7 +34,6 @@ using OpenSim.ApplicationPlugins.Rest;
|
||||||
|
|
||||||
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// The class signature reveals the roles that RestHandler plays.
|
/// The class signature reveals the roles that RestHandler plays.
|
||||||
///
|
///
|
||||||
|
@ -86,7 +84,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
static RestHandler()
|
static RestHandler()
|
||||||
{
|
{
|
||||||
|
|
||||||
Module[] mods = Assembly.GetExecutingAssembly().GetModules();
|
Module[] mods = Assembly.GetExecutingAssembly().GetModules();
|
||||||
|
|
||||||
foreach (Module m in mods)
|
foreach (Module m in mods)
|
||||||
|
@ -108,7 +105,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion local static state
|
#endregion local static state
|
||||||
|
@ -136,7 +132,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
if (!handlersLoaded)
|
if (!handlersLoaded)
|
||||||
{
|
{
|
||||||
|
|
||||||
ConstructorInfo ci;
|
ConstructorInfo ci;
|
||||||
Object ht;
|
Object ht;
|
||||||
|
|
||||||
|
@ -211,7 +206,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
// This plugin will only be enabled if the broader
|
// This plugin will only be enabled if the broader
|
||||||
// REST plugin mechanism is enabled.
|
// 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);
|
Rest.Log.ErrorFormat("{0} Plugin initialization has failed: {1}", MsgId, e.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -344,7 +337,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
public override void Close()
|
public override void Close()
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.InfoFormat("{0} Plugin is terminating", MsgId);
|
Rest.Log.InfoFormat("{0} Plugin is terminating", MsgId);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -357,7 +349,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
handler.Close();
|
handler.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion overriding methods
|
#endregion overriding methods
|
||||||
|
@ -406,7 +397,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
foreach (string key in streamHandlers.Keys)
|
foreach (string key in streamHandlers.Keys)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Match testing {1} against stream prefix <{2}>", MsgId, path, key);
|
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
|
// Note that Match will not necessarily find the handler that will
|
||||||
|
@ -426,7 +416,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -486,7 +475,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
Rest.Log.DebugFormat("{0} EXIT", MsgId);
|
Rest.Log.DebugFormat("{0} EXIT", MsgId);
|
||||||
|
|
||||||
return handled;
|
return handled;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion interface methods
|
#endregion interface methods
|
||||||
|
@ -534,7 +522,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
|
|
||||||
return rdata.handled;
|
return rdata.handled;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -547,7 +534,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
public void AddStreamHandler(string httpMethod, string path, RestMethod method)
|
public void AddStreamHandler(string httpMethod, string path, RestMethod method)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!IsEnabled)
|
if (!IsEnabled)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -571,7 +557,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
Rest.Log.WarnFormat("{0} Ignoring duplicate handler for {1}", MsgId, path);
|
Rest.Log.WarnFormat("{0} Ignoring duplicate handler for {1}", MsgId, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -586,7 +571,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
internal bool FindPathHandler(OSHttpRequest request, OSHttpResponse response)
|
internal bool FindPathHandler(OSHttpRequest request, OSHttpResponse response)
|
||||||
{
|
{
|
||||||
|
|
||||||
RequestData rdata = null;
|
RequestData rdata = null;
|
||||||
string bestMatch = null;
|
string bestMatch = null;
|
||||||
|
|
||||||
|
@ -612,7 +596,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(bestMatch))
|
if (!String.IsNullOrEmpty(bestMatch))
|
||||||
{
|
{
|
||||||
|
|
||||||
rdata = pathAllocators[bestMatch](request, response, bestMatch);
|
rdata = pathAllocators[bestMatch](request, response, bestMatch);
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Path based REST handler matched with <{1}>", MsgId, 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);
|
Rest.Log.WarnFormat("{0} Request failed: {1}", MsgId, r.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (rdata == null) ? false : rdata.handled;
|
return (rdata == null) ? false : rdata.handled;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -643,7 +624,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
public void AddPathHandler(RestMethodHandler mh, string path, RestMethodAllocator ra)
|
public void AddPathHandler(RestMethodHandler mh, string path, RestMethodAllocator ra)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!IsEnabled)
|
if (!IsEnabled)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -665,8 +645,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
pathHandlers.Add(path, mh);
|
pathHandlers.Add(path, mh);
|
||||||
pathAllocators.Add(path, ra);
|
pathAllocators.Add(path, ra);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* 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
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@ -42,10 +41,8 @@ using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
|
|
||||||
public class RestInventoryServices : IRest
|
public class RestInventoryServices : IRest
|
||||||
{
|
{
|
||||||
|
|
||||||
private static readonly int PARM_USERID = 0;
|
private static readonly int PARM_USERID = 0;
|
||||||
private static readonly int PARM_PATH = 1;
|
private static readonly int PARM_PATH = 1;
|
||||||
|
|
||||||
|
@ -61,7 +58,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
public RestInventoryServices()
|
public RestInventoryServices()
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.InfoFormat("{0} Inventory services initializing", MsgId);
|
Rest.Log.InfoFormat("{0} Inventory services initializing", MsgId);
|
||||||
Rest.Log.InfoFormat("{0} Using REST Implementation Version {1}", MsgId, Rest.Version);
|
Rest.Log.InfoFormat("{0} Using REST Implementation Version {1}", MsgId, Rest.Version);
|
||||||
|
|
||||||
|
@ -82,7 +78,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
enabled = true;
|
enabled = true;
|
||||||
|
|
||||||
Rest.Log.InfoFormat("{0} Inventory services initialization complete", MsgId);
|
Rest.Log.InfoFormat("{0} Inventory services initialization complete", MsgId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -143,7 +138,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void DoInventory(RequestData hdata)
|
private void DoInventory(RequestData hdata)
|
||||||
{
|
{
|
||||||
|
|
||||||
InventoryRequestData rdata = (InventoryRequestData) hdata;
|
InventoryRequestData rdata = (InventoryRequestData) hdata;
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} DoInventory ENTRY", MsgId);
|
Rest.Log.DebugFormat("{0} DoInventory ENTRY", MsgId);
|
||||||
|
@ -272,7 +266,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
if (Rest.InventoryServices.HasInventoryForUser(rdata.uuid))
|
if (Rest.InventoryServices.HasInventoryForUser(rdata.uuid))
|
||||||
{
|
{
|
||||||
|
|
||||||
rdata.root = Rest.InventoryServices.RequestRootFolder(rdata.uuid);
|
rdata.root = Rest.InventoryServices.RequestRootFolder(rdata.uuid);
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Inventory Root retrieved for {1} {2}",
|
Rest.Log.DebugFormat("{0} Inventory Root retrieved for {1} {2}",
|
||||||
|
@ -311,7 +304,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
switch (rdata.method)
|
switch (rdata.method)
|
||||||
{
|
{
|
||||||
|
|
||||||
case Rest.HEAD : // Do the processing, set the status code, suppress entity
|
case Rest.HEAD : // Do the processing, set the status code, suppress entity
|
||||||
DoGet(rdata);
|
DoGet(rdata);
|
||||||
rdata.buffer = null;
|
rdata.buffer = null;
|
||||||
|
@ -339,7 +331,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
rdata.Fail(Rest.HttpStatusCodeMethodNotAllowed, rdata.method+" not supported");
|
rdata.Fail(Rest.HttpStatusCodeMethodNotAllowed, rdata.method+" not supported");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Interface
|
#endregion Interface
|
||||||
|
@ -355,7 +346,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void DoGet(InventoryRequestData rdata)
|
private void DoGet(InventoryRequestData rdata)
|
||||||
{
|
{
|
||||||
|
|
||||||
rdata.initXmlWriter();
|
rdata.initXmlWriter();
|
||||||
|
|
||||||
rdata.writer.WriteStartElement(String.Empty,"Inventory",String.Empty);
|
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.
|
// constructed from the result of the XML writer.
|
||||||
|
|
||||||
rdata.Respond(String.Format("Inventory {0} Normal completion", rdata.method));
|
rdata.Respond(String.Format("Inventory {0} Normal completion", rdata.method));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -423,7 +412,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void DoExtend(InventoryRequestData rdata)
|
private void DoExtend(InventoryRequestData rdata)
|
||||||
{
|
{
|
||||||
|
|
||||||
bool created = false;
|
bool created = false;
|
||||||
bool modified = false;
|
bool modified = false;
|
||||||
string newnode = String.Empty;
|
string newnode = String.Empty;
|
||||||
|
@ -447,7 +435,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
if (typeof(InventoryFolderBase) == InventoryNode.GetType() ||
|
if (typeof(InventoryFolderBase) == InventoryNode.GetType() ||
|
||||||
typeof(InventoryFolderImpl) == InventoryNode.GetType())
|
typeof(InventoryFolderImpl) == InventoryNode.GetType())
|
||||||
{
|
{
|
||||||
|
|
||||||
// Cast the context node appropriately.
|
// Cast the context node appropriately.
|
||||||
|
|
||||||
InventoryFolderBase context = (InventoryFolderBase) InventoryNode;
|
InventoryFolderBase context = (InventoryFolderBase) InventoryNode;
|
||||||
|
@ -471,7 +458,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
if (entity.Assets.Count > 0)
|
if (entity.Assets.Count > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Adding {1} assets to server",
|
Rest.Log.DebugFormat("{0} Adding {1} assets to server",
|
||||||
MsgId, entity.Assets.Count);
|
MsgId, entity.Assets.Count);
|
||||||
|
|
||||||
|
@ -489,9 +475,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
Rest.Dump(asset.Data);
|
Rest.Dump(asset.Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modify the context using the collection of folders and items
|
// 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)
|
foreach (InventoryFolderBase folder in entity.Folders)
|
||||||
{
|
{
|
||||||
|
|
||||||
InventoryFolderBase found;
|
InventoryFolderBase found;
|
||||||
|
|
||||||
// If the parentID is zero, then this folder is going
|
// If the parentID is zero, then this folder is going
|
||||||
|
@ -554,9 +537,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
created = true;
|
created = true;
|
||||||
rdata.appendStatus(String.Format("<p> Modified folder {0}, UUID {1}<p>",
|
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
|
// 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)
|
foreach (InventoryItemBase item in entity.Items)
|
||||||
{
|
{
|
||||||
|
|
||||||
InventoryItemBase found = null;
|
InventoryItemBase found = null;
|
||||||
|
|
||||||
// If the parentID is zero, then this is going
|
// If the parentID is zero, then this is going
|
||||||
|
@ -604,7 +584,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
created = true;
|
created = true;
|
||||||
rdata.appendStatus(String.Format("<p> Created item {2}, UUID {3}<p>", item.Name, item.ID));
|
rdata.appendStatus(String.Format("<p> Created item {2}, UUID {3}<p>", item.Name, item.ID));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (created)
|
if (created)
|
||||||
|
@ -627,7 +606,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
|
|
||||||
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
|
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -635,7 +613,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
MsgId, rdata.method, rdata.path, InventoryNode.GetType());
|
MsgId, rdata.method, rdata.path, InventoryNode.GetType());
|
||||||
rdata.Fail(Rest.HttpStatusCodeBadRequest, "invalid resource context");
|
rdata.Fail(Rest.HttpStatusCodeBadRequest, "invalid resource context");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -663,7 +640,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void DoUpdate(InventoryRequestData rdata)
|
private void DoUpdate(InventoryRequestData rdata)
|
||||||
{
|
{
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
bool created = false;
|
bool created = false;
|
||||||
bool modified = false;
|
bool modified = false;
|
||||||
|
@ -705,7 +681,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
Rest.Dump(asset.Data);
|
Rest.Dump(asset.Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -727,7 +702,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
if (typeof(InventoryFolderBase) == InventoryNode.GetType() ||
|
if (typeof(InventoryFolderBase) == InventoryNode.GetType() ||
|
||||||
typeof(InventoryFolderImpl) == InventoryNode.GetType())
|
typeof(InventoryFolderImpl) == InventoryNode.GetType())
|
||||||
{
|
{
|
||||||
|
|
||||||
bool rfound = false;
|
bool rfound = false;
|
||||||
InventoryFolderBase uri = (InventoryFolderBase) InventoryNode;
|
InventoryFolderBase uri = (InventoryFolderBase) InventoryNode;
|
||||||
InventoryFolderBase xml = null;
|
InventoryFolderBase xml = null;
|
||||||
|
@ -741,7 +715,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
if (uri == rdata.root)
|
if (uri == rdata.root)
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach (InventoryFolderBase folder in entity.Folders)
|
foreach (InventoryFolderBase folder in entity.Folders)
|
||||||
{
|
{
|
||||||
if ((rfound = (folder.Name == PRIVATE_ROOT_NAME)))
|
if ((rfound = (folder.Name == PRIVATE_ROOT_NAME)))
|
||||||
|
@ -757,7 +730,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
MsgId, rdata.method, rdata.path);
|
MsgId, rdata.method, rdata.path);
|
||||||
rdata.Fail(Rest.HttpStatusCodeBadRequest, "invalid inventory structure");
|
rdata.Fail(Rest.HttpStatusCodeBadRequest, "invalid inventory structure");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scan the set of folders in the entity collection for an
|
// Scan the set of folders in the entity collection for an
|
||||||
|
@ -801,7 +773,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
InventoryFolderBase TrashCan = GetTrashCan(rdata);
|
InventoryFolderBase TrashCan = GetTrashCan(rdata);
|
||||||
|
|
||||||
// All went well, so we generate a UUID is one is
|
// 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.MoveFolder(uri);
|
||||||
Rest.InventoryServices.PurgeFolder(TrashCan);
|
Rest.InventoryServices.PurgeFolder(TrashCan);
|
||||||
modified = true;
|
modified = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now, regardelss of what they represent, we
|
// 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));
|
rdata.appendStatus(String.Format("<p>Storing item {0} UUID {1}<p>", it.Name, it.ID));
|
||||||
Rest.InventoryServices.AddItem(it);
|
Rest.InventoryServices.AddItem(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -846,7 +815,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
InventoryItemBase uri = (InventoryItemBase) InventoryNode;
|
InventoryItemBase uri = (InventoryItemBase) InventoryNode;
|
||||||
InventoryItemBase xml = null;
|
InventoryItemBase xml = null;
|
||||||
|
|
||||||
|
@ -884,7 +852,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
Rest.InventoryServices.AddItem(xml);
|
Rest.InventoryServices.AddItem(xml);
|
||||||
|
|
||||||
rdata.appendStatus(String.Format("<p>Storing item {0} UUID {1}<p>", xml.Name, xml.ID));
|
rdata.appendStatus(String.Format("<p>Storing item {0} UUID {1}<p>", xml.Name, xml.ID));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (created)
|
if (created)
|
||||||
|
@ -904,7 +871,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
|
|
||||||
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
|
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -930,13 +896,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void DoDelete(InventoryRequestData rdata)
|
private void DoDelete(InventoryRequestData rdata)
|
||||||
{
|
{
|
||||||
|
|
||||||
Object InventoryNode = getInventoryNode(rdata, rdata.root, PARM_PATH, false);
|
Object InventoryNode = getInventoryNode(rdata, rdata.root, PARM_PATH, false);
|
||||||
|
|
||||||
if (typeof(InventoryFolderBase) == InventoryNode.GetType() ||
|
if (typeof(InventoryFolderBase) == InventoryNode.GetType() ||
|
||||||
typeof(InventoryFolderImpl) == InventoryNode.GetType())
|
typeof(InventoryFolderImpl) == InventoryNode.GetType())
|
||||||
{
|
{
|
||||||
|
|
||||||
InventoryFolderBase TrashCan = GetTrashCan(rdata);
|
InventoryFolderBase TrashCan = GetTrashCan(rdata);
|
||||||
|
|
||||||
InventoryFolderBase folder = (InventoryFolderBase) InventoryNode;
|
InventoryFolderBase folder = (InventoryFolderBase) InventoryNode;
|
||||||
|
@ -947,7 +911,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
Rest.InventoryServices.PurgeFolder(TrashCan);
|
Rest.InventoryServices.PurgeFolder(TrashCan);
|
||||||
|
|
||||||
rdata.appendStatus(String.Format("<p>Deleted folder {0} UUID {1}<p>", folder.Name, folder.ID));
|
rdata.appendStatus(String.Format("<p>Deleted folder {0} UUID {1}<p>", folder.Name, folder.ID));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deleting items is much more straight forward.
|
// Deleting items is much more straight forward.
|
||||||
|
@ -963,7 +926,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
rdata.Complete();
|
rdata.Complete();
|
||||||
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
|
rdata.Respond("Inventory " + rdata.method + ": Normal completion");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion method-specific processing
|
#endregion method-specific processing
|
||||||
|
@ -1000,7 +962,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
InventoryFolderBase folder,
|
InventoryFolderBase folder,
|
||||||
int pi, bool fill)
|
int pi, bool fill)
|
||||||
{
|
{
|
||||||
|
|
||||||
InventoryFolderBase foundf = null;
|
InventoryFolderBase foundf = null;
|
||||||
int fk = 0;
|
int fk = 0;
|
||||||
|
|
||||||
|
@ -1021,6 +982,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
// option.
|
// option.
|
||||||
|
|
||||||
if (rdata.folders != null)
|
if (rdata.folders != null)
|
||||||
|
{
|
||||||
foreach (InventoryFolderBase f in rdata.folders)
|
foreach (InventoryFolderBase f in rdata.folders)
|
||||||
{
|
{
|
||||||
// Look for the present node in the directory list
|
// Look for the present node in the directory list
|
||||||
|
@ -1032,6 +994,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
fk++;
|
fk++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If more than one node matched, then the path, as specified
|
// If more than one node matched, then the path, as specified
|
||||||
// is ambiguous.
|
// is ambiguous.
|
||||||
|
@ -1099,7 +1062,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
rdata.Fail(Rest.HttpStatusCodeNotFound, "resource "+rdata.path+" not found");
|
rdata.Fail(Rest.HttpStatusCodeNotFound, "resource "+rdata.path+" not found");
|
||||||
|
|
||||||
return null; /* Never reached */
|
return null; /* Never reached */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1119,12 +1081,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void traverse(InventoryRequestData rdata, InventoryFolderBase folder, int pi)
|
private void traverse(InventoryRequestData rdata, InventoryFolderBase folder, int pi)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Traverse[initial] : {1} {2} [{3}]", MsgId, folder.ID, folder.Name, pi);
|
Rest.Log.DebugFormat("{0} Traverse[initial] : {1} {2} [{3}]", MsgId, folder.ID, folder.Name, pi);
|
||||||
|
|
||||||
if (rdata.folders != null)
|
if (rdata.folders != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// If there was only one parameter (avatar name), then the entire
|
// If there was only one parameter (avatar name), then the entire
|
||||||
// inventory is being requested.
|
// inventory is being requested.
|
||||||
|
|
||||||
|
@ -1159,7 +1119,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1170,7 +1129,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void traverseInventory(InventoryRequestData rdata, InventoryFolderBase folder, int pi)
|
private void traverseInventory(InventoryRequestData rdata, InventoryFolderBase folder, int pi)
|
||||||
{
|
{
|
||||||
|
|
||||||
int fk = 0;
|
int fk = 0;
|
||||||
InventoryFolderBase ffound = null;
|
InventoryFolderBase ffound = null;
|
||||||
InventoryItemBase ifound = null;
|
InventoryItemBase ifound = null;
|
||||||
|
@ -1194,7 +1152,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
if (pi == rdata.Parameters.Length-1)
|
if (pi == rdata.Parameters.Length-1)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Only if there are any items, and there pretty much always are.
|
// Only if there are any items, and there pretty much always are.
|
||||||
|
|
||||||
if (rdata.items != null)
|
if (rdata.items != null)
|
||||||
|
@ -1264,7 +1221,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void formatInventory(InventoryRequestData rdata, InventoryFolderBase folder, string indent)
|
private void formatInventory(InventoryRequestData rdata, InventoryFolderBase folder, string indent)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (Rest.DEBUG)
|
if (Rest.DEBUG)
|
||||||
{
|
{
|
||||||
Rest.Log.DebugFormat("{0} Folder : {1} {2} {3} type = {4}",
|
Rest.Log.DebugFormat("{0} Folder : {1} {2} {3} type = {4}",
|
||||||
|
@ -1307,7 +1263,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
// End folder item
|
// End folder item
|
||||||
|
|
||||||
rdata.writer.WriteEndElement();
|
rdata.writer.WriteEndElement();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1319,7 +1274,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void formatItem(InventoryRequestData rdata, InventoryItemBase i, string indent)
|
private void formatItem(InventoryRequestData rdata, InventoryItemBase i, string indent)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Item : {1} {2} {3} Type = {4}, AssetType = {5}",
|
Rest.Log.DebugFormat("{0} Item : {1} {2} {3} Type = {4}, AssetType = {5}",
|
||||||
MsgId, i.ID, indent, i.Name, i.InvType, i.AssetType);
|
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.WriteElementString("Asset",i.AssetID.ToString());
|
||||||
|
|
||||||
rdata.writer.WriteEndElement();
|
rdata.writer.WriteEndElement();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1366,7 +1319,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private InventoryFolderBase GetTrashCan(InventoryRequestData rdata)
|
private InventoryFolderBase GetTrashCan(InventoryRequestData rdata)
|
||||||
{
|
{
|
||||||
|
|
||||||
InventoryFolderBase TrashCan = null;
|
InventoryFolderBase TrashCan = null;
|
||||||
|
|
||||||
foreach (InventoryFolderBase f in rdata.folders)
|
foreach (InventoryFolderBase f in rdata.folders)
|
||||||
|
@ -1401,7 +1353,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
|
|
||||||
return TrashCan;
|
return TrashCan;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1468,14 +1419,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
internal XmlInventoryCollection ReconstituteEntity(InventoryRequestData rdata)
|
internal XmlInventoryCollection ReconstituteEntity(InventoryRequestData rdata)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Reconstituting entity", MsgId);
|
Rest.Log.DebugFormat("{0} Reconstituting entity", MsgId);
|
||||||
|
|
||||||
XmlInventoryCollection ic = new XmlInventoryCollection();
|
XmlInventoryCollection ic = new XmlInventoryCollection();
|
||||||
|
|
||||||
if (rdata.request.HasEntityBody)
|
if (rdata.request.HasEntityBody)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Entity present", MsgId);
|
Rest.Log.DebugFormat("{0} Entity present", MsgId);
|
||||||
|
|
||||||
ic.init(rdata);
|
ic.init(rdata);
|
||||||
|
@ -1571,7 +1520,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
Rest.Log.WarnFormat("{0} Unexpected XML parsing error: {1}", MsgId, e.Message);
|
Rest.Log.WarnFormat("{0} Unexpected XML parsing error: {1}", MsgId, e.Message);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1587,7 +1535,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
|
|
||||||
return ic;
|
return ic;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1602,7 +1549,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void CollectFolder(XmlInventoryCollection ic)
|
private void CollectFolder(XmlInventoryCollection ic)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Interpret folder element", MsgId);
|
Rest.Log.DebugFormat("{0} Interpret folder element", MsgId);
|
||||||
|
|
||||||
InventoryFolderBase result = new InventoryFolderBase();
|
InventoryFolderBase result = new InventoryFolderBase();
|
||||||
|
@ -1664,7 +1610,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
foreach (InventoryFolderBase parent in ic.rdata.folders)
|
foreach (InventoryFolderBase parent in ic.rdata.folders)
|
||||||
|
@ -1682,7 +1627,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
MsgId, ic.Item.Folder, result.ID);
|
MsgId, ic.Item.Folder, result.ID);
|
||||||
ic.Fail(Rest.HttpStatusCodeBadRequest, "invalid parent");
|
ic.Fail(Rest.HttpStatusCodeBadRequest, "invalid parent");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a new folder, so no existing UUID is available
|
// This is a new folder, so no existing UUID is available
|
||||||
|
@ -1697,7 +1641,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
// obsolete as a consequence.
|
// obsolete as a consequence.
|
||||||
|
|
||||||
ic.Push(result);
|
ic.Push(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1715,7 +1658,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void CollectItem(XmlInventoryCollection ic)
|
private void CollectItem(XmlInventoryCollection ic)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Interpret item element", MsgId);
|
Rest.Log.DebugFormat("{0} Interpret item element", MsgId);
|
||||||
|
|
||||||
InventoryItemBase result = new InventoryItemBase();
|
InventoryItemBase result = new InventoryItemBase();
|
||||||
|
@ -1736,7 +1678,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ic.xml.AttributeCount; i++)
|
for (int i = 0; i < ic.xml.AttributeCount; i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
ic.xml.MoveToAttribute(i);
|
ic.xml.MoveToAttribute(i);
|
||||||
|
|
||||||
switch (ic.xml.Name)
|
switch (ic.xml.Name)
|
||||||
|
@ -1797,7 +1738,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
ic.xml.MoveToElement();
|
ic.xml.MoveToElement();
|
||||||
|
|
||||||
ic.Push(result);
|
ic.Push(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1910,7 +1850,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
string b64string = null;
|
string b64string = null;
|
||||||
|
|
||||||
// Generate a UUID of none were given, and generally none should
|
// 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.Item.AssetID = uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ic.Push(asset);
|
ic.Push(asset);
|
||||||
|
@ -1967,7 +1905,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void CollectPermissions(XmlInventoryCollection ic)
|
private void CollectPermissions(XmlInventoryCollection ic)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (ic.xml.HasAttributes)
|
if (ic.xml.HasAttributes)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ic.xml.AttributeCount; i++)
|
for (int i = 0; i < ic.xml.AttributeCount; i++)
|
||||||
|
@ -1998,7 +1935,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
|
|
||||||
ic.xml.MoveToElement();
|
ic.xml.MoveToElement();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2013,7 +1949,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
private void Validate(XmlInventoryCollection ic)
|
private void Validate(XmlInventoryCollection ic)
|
||||||
{
|
{
|
||||||
|
|
||||||
// There really should be an item present if we've
|
// There really should be an item present if we've
|
||||||
// called validate. So fail if there is not.
|
// called validate. So fail if there is not.
|
||||||
|
|
||||||
|
@ -2037,11 +1972,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
if (ic.Item.AssetID == LLUUID.Zero)
|
if (ic.Item.AssetID == LLUUID.Zero)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.ErrorFormat("{0} Unable to complete request", MsgId);
|
Rest.Log.ErrorFormat("{0} Unable to complete request", MsgId);
|
||||||
Rest.Log.InfoFormat("{0} Asset information is missing", MsgId);
|
Rest.Log.InfoFormat("{0} Asset information is missing", MsgId);
|
||||||
ic.Fail(Rest.HttpStatusCodeBadRequest, "asset information required");
|
ic.Fail(Rest.HttpStatusCodeBadRequest, "asset information required");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the item is new, then assign it an ID
|
// If the item is new, then assign it an ID
|
||||||
|
@ -2061,7 +1994,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
foreach (InventoryFolderBase parent in ic.rdata.folders)
|
foreach (InventoryFolderBase parent in ic.rdata.folders)
|
||||||
|
@ -2079,7 +2011,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
MsgId, ic.Item.Folder, ic.Item.ID);
|
MsgId, ic.Item.Folder, ic.Item.ID);
|
||||||
ic.Fail(Rest.HttpStatusCodeBadRequest, "parent information required");
|
ic.Fail(Rest.HttpStatusCodeBadRequest, "parent information required");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this is an inline asset being constructed in the context
|
// 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 ||
|
if (ic.Item.AssetType == (int) AssetType.Unknown ||
|
||||||
ic.Item.InvType == (int) AssetType.Unknown)
|
ic.Item.InvType == (int) AssetType.Unknown)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Attempting to infer item type", MsgId);
|
Rest.Log.DebugFormat("{0} Attempting to infer item type", MsgId);
|
||||||
|
|
||||||
string[] parts = ic.Item.Name.Split(Rest.CA_PERIOD);
|
string[] parts = ic.Item.Name.Split(Rest.CA_PERIOD);
|
||||||
|
@ -2188,14 +2118,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
}
|
}
|
||||||
|
|
||||||
ic.reset();
|
ic.reset();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Inventory RequestData extension
|
#region Inventory RequestData extension
|
||||||
|
|
||||||
internal class InventoryRequestData : RequestData
|
internal class InventoryRequestData : RequestData
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// These are the inventory specific request/response state
|
/// These are the inventory specific request/response state
|
||||||
/// extensions.
|
/// extensions.
|
||||||
|
@ -2230,7 +2158,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
Monitor.Pulse(this);
|
Monitor.Pulse(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Inventory RequestData extension
|
#endregion Inventory RequestData extension
|
||||||
|
@ -2243,7 +2170,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
internal class XmlInventoryCollection : InventoryCollection
|
internal class XmlInventoryCollection : InventoryCollection
|
||||||
{
|
{
|
||||||
|
|
||||||
internal InventoryRequestData rdata;
|
internal InventoryRequestData rdata;
|
||||||
private Stack<InventoryFolderBase> stk;
|
private Stack<InventoryFolderBase> stk;
|
||||||
|
|
||||||
|
@ -2336,7 +2262,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
{
|
{
|
||||||
rdata.Fail(code, addendum);
|
rdata.Fail(code, addendum);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* 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
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
@ -41,10 +40,8 @@ using OpenSim.Framework.Communications.Cache;
|
||||||
|
|
||||||
namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
|
namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
|
||||||
{
|
{
|
||||||
|
|
||||||
public class Remote : ITest
|
public class Remote : ITest
|
||||||
{
|
{
|
||||||
|
|
||||||
private static readonly int PARM_TESTID = 0;
|
private static readonly int PARM_TESTID = 0;
|
||||||
private static readonly int PARM_COMMAND = 1;
|
private static readonly int PARM_COMMAND = 1;
|
||||||
|
|
||||||
|
@ -95,7 +92,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
|
||||||
|
|
||||||
public void Execute(RequestData rdata)
|
public void Execute(RequestData rdata)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!enabled) return;
|
if (!enabled) return;
|
||||||
|
|
||||||
// If we can't relate to what's there, leave it for others.
|
// 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)
|
if (rdata.Parameters.Length >= 6)
|
||||||
{
|
{
|
||||||
|
|
||||||
string[] names = rdata.Parameters[PARM_MOVE_AVATAR].Split(Rest.CA_SPACE);
|
string[] names = rdata.Parameters[PARM_MOVE_AVATAR].Split(Rest.CA_SPACE);
|
||||||
ScenePresence avatar = null;
|
ScenePresence avatar = null;
|
||||||
Scene scene = null;
|
Scene scene = null;
|
||||||
|
@ -171,7 +166,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
|
||||||
|
|
||||||
if (avatar != null)
|
if (avatar != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
Rest.Log.DebugFormat("{0} Move : Avatar {1} located in region {2}",
|
Rest.Log.DebugFormat("{0} Move : Avatar {1} located in region {2}",
|
||||||
MsgId, rdata.Parameters[PARM_MOVE_AVATAR], scene.RegionInfo.RegionName);
|
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);
|
Rest.Log.WarnFormat("{0} Move: No movement information provided", MsgId);
|
||||||
rdata.Fail(Rest.HttpStatusCodeBadRequest, "no movement information provided");
|
rdata.Fail(Rest.HttpStatusCodeBadRequest, "no movement information provided");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly string Help =
|
private static readonly string Help =
|
||||||
|
@ -220,6 +213,5 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
|
||||||
+ "</body>"
|
+ "</body>"
|
||||||
+ "</html>"
|
+ "</html>"
|
||||||
;
|
;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,12 +42,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
private Header header;
|
private Header header;
|
||||||
public override void FromBytes(Header header, byte[] bytes, ref int i, ref int packetEnd, byte[] zeroBuffer)
|
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 void FromBytes(byte[] bytes, ref int i, ref int packetEnd, byte[] zeroBuffer)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Header Header { get { return header; } set { header = value; }}
|
public override Header Header { get { return header; } set { header = value; }}
|
||||||
|
@ -56,6 +54,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
return new byte[0];
|
return new byte[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
public KillPacket()
|
public KillPacket()
|
||||||
{
|
{
|
||||||
Header = new LowHeader();
|
Header = new LowHeader();
|
||||||
|
|
|
@ -2100,8 +2100,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
// Gesture
|
// Gesture
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region Appearance/ Wearables Methods
|
#region Appearance/ Wearables Methods
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -83,7 +83,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
public bool visible_to_parent;
|
public bool visible_to_parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class OpenGridProtocolModule : IRegionModule
|
public class OpenGridProtocolModule : IRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
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<string, AgentCircuitData> CapsLoginID = new Dictionary<string, AgentCircuitData>();
|
||||||
private Dictionary<LLUUID, OGPState> m_OGPState = new Dictionary<LLUUID, OGPState>();
|
private Dictionary<LLUUID, OGPState> m_OGPState = new Dictionary<LLUUID, OGPState>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region IRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
|
@ -220,12 +217,9 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
|
|
||||||
Scene homeScene = GetRootScene();
|
Scene homeScene = GetRootScene();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (homeScene == null)
|
if (homeScene == null)
|
||||||
return GenerateNoHandlerMessage();
|
return GenerateNoHandlerMessage();
|
||||||
|
|
||||||
|
|
||||||
RegionInfo reg = homeScene.RegionInfo;
|
RegionInfo reg = homeScene.RegionInfo;
|
||||||
ulong regionhandle = GetOSCompatibleRegionHandle(reg);
|
ulong regionhandle = GetOSCompatibleRegionHandle(reg);
|
||||||
//string RegionURI = reg.ServerURI;
|
//string RegionURI = reg.ServerURI;
|
||||||
|
@ -239,7 +233,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
string FirstName = requestMap["first_name"].AsString();
|
string FirstName = requestMap["first_name"].AsString();
|
||||||
string LastName = requestMap["last_name"].AsString();
|
string LastName = requestMap["last_name"].AsString();
|
||||||
|
|
||||||
|
|
||||||
OGPState userState = GetOGPState(LocalAgentID);
|
OGPState userState = GetOGPState(LocalAgentID);
|
||||||
|
|
||||||
userState.first_name = requestMap["first_name"].AsString();
|
userState.first_name = requestMap["first_name"].AsString();
|
||||||
|
@ -299,7 +292,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
useragent.SecureSessionID=agentData.SecureSessionID;
|
useragent.SecureSessionID=agentData.SecureSessionID;
|
||||||
useragent.SessionID = agentData.SessionID;
|
useragent.SessionID = agentData.SessionID;
|
||||||
|
|
||||||
|
|
||||||
UserProfileData userProfile = new UserProfileData();
|
UserProfileData userProfile = new UserProfileData();
|
||||||
userProfile.AboutText = "OGP User";
|
userProfile.AboutText = "OGP User";
|
||||||
userProfile.CanDoMask = (uint)0;
|
userProfile.CanDoMask = (uint)0;
|
||||||
|
@ -339,14 +331,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
// Do caps registration
|
// Do caps registration
|
||||||
// get seed cap
|
// get seed cap
|
||||||
|
|
||||||
|
|
||||||
// Stick our data in the cache so the region will know something about us
|
// Stick our data in the cache so the region will know something about us
|
||||||
homeScene.CommsManager.UserProfileCacheService.PreloadUserCache(agentData.AgentID, userProfile);
|
homeScene.CommsManager.UserProfileCacheService.PreloadUserCache(agentData.AgentID, userProfile);
|
||||||
|
|
||||||
// Call 'new user' event handler
|
// Call 'new user' event handler
|
||||||
homeScene.NewUserConnection(reg.RegionHandle, agentData);
|
homeScene.NewUserConnection(reg.RegionHandle, agentData);
|
||||||
|
|
||||||
|
|
||||||
//string raCap = string.Empty;
|
//string raCap = string.Empty;
|
||||||
|
|
||||||
LLUUID AvatarRezCapUUID = LLUUID.Random();
|
LLUUID AvatarRezCapUUID = LLUUID.Random();
|
||||||
|
@ -521,27 +511,19 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
responseMap["connect"] = LLSD.FromBoolean(true);
|
responseMap["connect"] = LLSD.FromBoolean(true);
|
||||||
|
|
||||||
m_log.InfoFormat("[OGP]: host: {0}, IP {1}", responseMap["sim_host"].ToString(), responseMap["sim_ip"].ToString());
|
m_log.InfoFormat("[OGP]: host: {0}, IP {1}", responseMap["sim_host"].ToString(), responseMap["sim_ip"].ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public LLSD DerezAvatarMethod(string path, LLSD request)
|
public LLSD DerezAvatarMethod(string path, LLSD request)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString());
|
m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString());
|
||||||
|
|
||||||
//LLSD llsdResponse = null;
|
//LLSD llsdResponse = null;
|
||||||
LLSDMap responseMap = new LLSDMap();
|
LLSDMap responseMap = new LLSDMap();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
string[] PathArray = path.Split('/');
|
string[] PathArray = path.Split('/');
|
||||||
m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]);
|
m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]);
|
||||||
string uuidString = PathArray[2];
|
string uuidString = PathArray[2];
|
||||||
|
@ -549,7 +531,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
LLUUID userUUID = LLUUID.Zero;
|
LLUUID userUUID = LLUUID.Zero;
|
||||||
if (Helpers.TryParse(uuidString, out userUUID))
|
if (Helpers.TryParse(uuidString, out userUUID))
|
||||||
{
|
{
|
||||||
|
|
||||||
LLUUID RemoteID = uuidString;
|
LLUUID RemoteID = uuidString;
|
||||||
LLUUID LocalID = RemoteID;
|
LLUUID LocalID = RemoteID;
|
||||||
// FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds
|
// FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds
|
||||||
|
@ -559,7 +540,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
OGPState userState = GetOGPState(LocalID);
|
OGPState userState = GetOGPState(LocalID);
|
||||||
if (userState.agent_id != LLUUID.Zero)
|
if (userState.agent_id != LLUUID.Zero)
|
||||||
{
|
{
|
||||||
|
|
||||||
//LLSDMap outboundRequestMap = new LLSDMap();
|
//LLSDMap outboundRequestMap = new LLSDMap();
|
||||||
LLSDMap inboundRequestMap = (LLSDMap)request;
|
LLSDMap inboundRequestMap = (LLSDMap)request;
|
||||||
string rezAvatarString = inboundRequestMap["rez_avatar"].AsString();
|
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));
|
||||||
LookAtArray.Add(LLSD.FromInteger(1));
|
LookAtArray.Add(LLSD.FromInteger(1));
|
||||||
|
|
||||||
|
|
||||||
LLSDArray PositionArray = new LLSDArray();
|
LLSDArray PositionArray = new LLSDArray();
|
||||||
PositionArray.Add(LLSD.FromInteger(128));
|
PositionArray.Add(LLSD.FromInteger(128));
|
||||||
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"];
|
LLSDArray RezResponsePositionArray = (LLSDArray)rezResponseMap["position"];
|
||||||
|
|
||||||
|
|
||||||
responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap);
|
responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap);
|
||||||
responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString());
|
responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString());
|
||||||
responseMap["sim_host"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_host).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_y"] = LLSD.FromInteger(rrY );
|
||||||
responseMap["region_id"] = LLSD.FromUUID(rrRID);
|
responseMap["region_id"] = LLSD.FromUUID(rrRID);
|
||||||
responseMap["sim_access"] = LLSD.FromString(rrAccess);
|
responseMap["sim_access"] = LLSD.FromString(rrAccess);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
responseMap["position"] = RezResponsePositionArray;
|
responseMap["position"] = RezResponsePositionArray;
|
||||||
responseMap["look_at"] = lookArray;
|
responseMap["look_at"] = lookArray;
|
||||||
responseMap["connect"] = LLSD.FromBoolean(true);
|
responseMap["connect"] = LLSD.FromBoolean(true);
|
||||||
|
|
||||||
ShutdownConnection(LocalID,this);
|
ShutdownConnection(LocalID,this);
|
||||||
|
|
||||||
|
|
||||||
m_log.Warn("RESPONSEDEREZ: " + responseMap.ToString());
|
m_log.Warn("RESPONSEDEREZ: " + responseMap.ToString());
|
||||||
return responseMap;
|
return responseMap;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
return GenerateNoHandlerMessage();
|
return GenerateNoHandlerMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -649,14 +621,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
|
|
||||||
private LLSDMap invokeRezAvatarCap(LLSDMap responseMap, string CapAddress, OGPState userState)
|
private LLSDMap invokeRezAvatarCap(LLSDMap responseMap, string CapAddress, OGPState userState)
|
||||||
{
|
{
|
||||||
|
|
||||||
Scene reg = GetRootScene();
|
Scene reg = GetRootScene();
|
||||||
|
|
||||||
WebRequest DeRezRequest = WebRequest.Create(CapAddress);
|
WebRequest DeRezRequest = WebRequest.Create(CapAddress);
|
||||||
DeRezRequest.Method = "POST";
|
DeRezRequest.Method = "POST";
|
||||||
DeRezRequest.ContentType = "application/xml+llsd";
|
DeRezRequest.ContentType = "application/xml+llsd";
|
||||||
|
|
||||||
|
|
||||||
LLSDMap RAMap = new LLSDMap();
|
LLSDMap RAMap = new LLSDMap();
|
||||||
LLSDMap AgentParms = new LLSDMap();
|
LLSDMap AgentParms = new LLSDMap();
|
||||||
LLSDMap RegionParms = new LLSDMap();
|
LLSDMap RegionParms = new LLSDMap();
|
||||||
|
@ -696,7 +666,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
// Planned for version 2
|
// Planned for version 2
|
||||||
// RAMap["agent_params"] = AgentParms;
|
// RAMap["agent_params"] = AgentParms;
|
||||||
|
|
||||||
|
|
||||||
RAMap["region_params"] = RegionParms;
|
RAMap["region_params"] = RegionParms;
|
||||||
RAMap["parameter"] = Parameter;
|
RAMap["parameter"] = Parameter;
|
||||||
|
|
||||||
|
@ -770,8 +739,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public LLSD GenerateNoHandlerMessage()
|
public LLSD GenerateNoHandlerMessage()
|
||||||
{
|
{
|
||||||
LLSDMap map = new LLSDMap();
|
LLSDMap map = new LLSDMap();
|
||||||
|
@ -802,7 +769,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
CapsLoginID.Remove(path);
|
CapsLoginID.Remove(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private Scene GetRootScene()
|
private Scene GetRootScene()
|
||||||
{
|
{
|
||||||
Scene ReturnScene = null;
|
Scene ReturnScene = null;
|
||||||
|
@ -815,7 +781,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
}
|
}
|
||||||
|
|
||||||
return ReturnScene;
|
return ReturnScene;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ulong GetOSCompatibleRegionHandle(RegionInfo reg)
|
private ulong GetOSCompatibleRegionHandle(RegionInfo reg)
|
||||||
|
@ -871,9 +836,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
public void DeleteOGPState(LLUUID agentId)
|
public void DeleteOGPState(LLUUID agentId)
|
||||||
{
|
{
|
||||||
lock (m_OGPState)
|
lock (m_OGPState)
|
||||||
|
{
|
||||||
if (m_OGPState.ContainsKey(agentId))
|
if (m_OGPState.ContainsKey(agentId))
|
||||||
m_OGPState.Remove(agentId);
|
m_OGPState.Remove(agentId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateOGPState(LLUUID agentId, OGPState state)
|
private void UpdateOGPState(LLUUID agentId, OGPState state)
|
||||||
|
@ -890,6 +856,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShutdownConnection(LLUUID avatarId, OpenGridProtocolModule mod)
|
public void ShutdownConnection(LLUUID avatarId, OpenGridProtocolModule mod)
|
||||||
{
|
{
|
||||||
Scene homeScene = GetRootScene();
|
Scene homeScene = GetRootScene();
|
||||||
|
@ -903,22 +870,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
ta.Start();
|
ta.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Temporary hack to allow teleporting to and from Vaak
|
// Temporary hack to allow teleporting to and from Vaak
|
||||||
private static bool customXertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error)
|
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")
|
//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 true;
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//return false;
|
//return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class KillAUser
|
public class KillAUser
|
||||||
|
@ -953,12 +915,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MonoCert : ICertificatePolicy
|
public class MonoCert : ICertificatePolicy
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
#region ICertificatePolicy Members
|
#region ICertificatePolicy Members
|
||||||
|
|
||||||
public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem)
|
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:
|
// 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
|
// 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))
|
if (Single.IsInfinity(heightvalue) || Single.IsNaN(heightvalue))
|
||||||
heightvalue = 0;
|
heightvalue = 0;
|
||||||
else if (heightvalue > 255f)
|
else if (heightvalue > 255f)
|
||||||
|
@ -198,7 +196,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
|
|
||||||
mapbmp.SetPixel(x-1, yr+1, color);
|
mapbmp.SetPixel(x-1, yr+1, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,7 +210,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
color = Color.Black;
|
color = Color.Black;
|
||||||
mapbmp.SetPixel(x, yr, color);
|
mapbmp.SetPixel(x, yr, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -276,8 +276,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (m_storageManager.EstateDataStore != null)
|
if (m_storageManager.EstateDataStore != null)
|
||||||
m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
|
m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Bind Storage Manager functions to some land manager functions for this scene
|
//Bind Storage Manager functions to some land manager functions for this scene
|
||||||
EventManager.OnLandObjectAdded +=
|
EventManager.OnLandObjectAdded +=
|
||||||
new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject);
|
new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject);
|
||||||
|
@ -322,7 +320,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
m_log.Warn("Failed to load StartupConfig");
|
m_log.Warn("Failed to load StartupConfig");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -351,7 +348,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// we add it to the notify list regardless of distance.
|
// we add it to the notify list regardless of distance.
|
||||||
// We'll check the agent's draw distance before notifying them though.
|
// We'll check the agent's draw distance before notifying them though.
|
||||||
|
|
||||||
|
|
||||||
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
|
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < m_neighbours.Count; i++)
|
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 resultX = Math.Abs((int)otherRegion.RegionLocX - (int)RegionInfo.RegionLocX);
|
||||||
int resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY);
|
int resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY);
|
||||||
if ((resultX <= 1) &&
|
if (resultX <= 1 && resultY <= 1)
|
||||||
(resultY <= 1))
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -584,8 +579,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
m_scripts_enabled = !ScriptEngine;
|
m_scripts_enabled = !ScriptEngine;
|
||||||
m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine");
|
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()
|
public int GetInaccurateNeighborCount()
|
||||||
{
|
{
|
||||||
lock (m_neighbours)
|
lock (m_neighbours)
|
||||||
|
{
|
||||||
return m_neighbours.Count;
|
return m_neighbours.Count;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This is the method that shuts down the scene.
|
// This is the method that shuts down the scene.
|
||||||
public override void Close()
|
public override void Close()
|
||||||
|
@ -1062,7 +1057,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
float hfdiff = hfvalue;
|
float hfdiff = hfvalue;
|
||||||
int hfdiffi = 0;
|
int hfdiffi = 0;
|
||||||
|
|
||||||
|
|
||||||
for (int x = 0; x < 256; x++)
|
for (int x = 0; x < 256; x++)
|
||||||
{
|
{
|
||||||
//int tc = System.Environment.TickCount;
|
//int tc = System.Environment.TickCount;
|
||||||
|
@ -1087,10 +1081,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
//float tmpval = (float)hm[x, y];
|
//float tmpval = (float)hm[x, y];
|
||||||
float heightvalue = (float)hm[x, y];
|
float heightvalue = (float)hm[x, y];
|
||||||
|
|
||||||
|
|
||||||
if (heightvalue > (float)m_regInfo.RegionSettings.WaterHeight)
|
if (heightvalue > (float)m_regInfo.RegionSettings.WaterHeight)
|
||||||
{
|
{
|
||||||
|
|
||||||
// scale height value
|
// scale height value
|
||||||
heightvalue = low + mid * (heightvalue - low) / mid;
|
heightvalue = low + mid * (heightvalue - low) / mid;
|
||||||
|
|
||||||
|
@ -1102,6 +1094,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
if (Single.IsInfinity(heightvalue) || Single.IsNaN(heightvalue))
|
if (Single.IsInfinity(heightvalue) || Single.IsNaN(heightvalue))
|
||||||
heightvalue = 0;
|
heightvalue = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Color green = Color.FromArgb((int)heightvalue, 100, (int)heightvalue);
|
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
|
// we use floats, colors use bytes, so shrink are space down to
|
||||||
// 0-255
|
// 0-255
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
hfdiffi = Math.Abs((int)((hfdiff * 4) + (hfdiff * 0.5))) + 1;
|
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);
|
mapbmp.SetPixel(x - 1, (256 - y) - 1, Shade);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (System.ArgumentException)
|
catch (System.ArgumentException)
|
||||||
{
|
{
|
||||||
|
@ -1264,7 +1249,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (part == null)
|
if (part == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
// Draw if the object is at least 1 meter wide in any direction
|
// 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)
|
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)
|
public void LazySaveGeneratedMaptile(byte[] data, bool temporary)
|
||||||
{
|
{
|
||||||
// Overwrites the local Asset cache with new maptile data
|
// Overwrites the local Asset cache with new maptile data
|
||||||
|
@ -1482,6 +1467,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
asset.Temporary = temporary;
|
asset.Temporary = temporary;
|
||||||
AssetCache.AddAsset(asset);
|
AssetCache.AddAsset(asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Load Land
|
#region Load Land
|
||||||
|
@ -1556,6 +1542,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
pos = RayEnd;
|
pos = RayEnd;
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RayTargetID != LLUUID.Zero)
|
if (RayTargetID != LLUUID.Zero)
|
||||||
{
|
{
|
||||||
SceneObjectPart target = GetSceneObjectPart(RayTargetID);
|
SceneObjectPart target = GetSceneObjectPart(RayTargetID);
|
||||||
|
@ -1921,9 +1908,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (position.X > Constants.RegionSize + 0.1f)
|
if (position.X > Constants.RegionSize + 0.1f)
|
||||||
{
|
{
|
||||||
pos.X = ((pos.X - Constants.RegionSize));
|
pos.X = ((pos.X - Constants.RegionSize));
|
||||||
|
|
||||||
newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize));
|
newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize));
|
||||||
|
|
||||||
// x + 1
|
// x + 1
|
||||||
}
|
}
|
||||||
else if (position.X < -0.1f)
|
else if (position.X < -0.1f)
|
||||||
|
@ -2165,9 +2150,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
client.OnScriptReset += ProcessScriptReset;
|
client.OnScriptReset += ProcessScriptReset;
|
||||||
client.OnGetScriptRunning += GetScriptRunning;
|
client.OnGetScriptRunning += GetScriptRunning;
|
||||||
client.OnSetScriptRunning += SetScriptRunning;
|
client.OnSetScriptRunning += SetScriptRunning;
|
||||||
|
|
||||||
client.OnRegionHandleRequest += RegionHandleRequest;
|
client.OnRegionHandleRequest += RegionHandleRequest;
|
||||||
|
|
||||||
client.OnUnackedTerrain += TerrainUnAcked;
|
client.OnUnackedTerrain += TerrainUnAcked;
|
||||||
|
|
||||||
//Gesture
|
//Gesture
|
||||||
|
@ -2185,7 +2168,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId);
|
InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
|
@ -2206,7 +2188,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId);
|
InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
|
@ -2607,7 +2588,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
"[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}",
|
"[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}",
|
||||||
agent.AgentID, regionHandle, RegionInfo.RegionName);
|
agent.AgentID, regionHandle, RegionInfo.RegionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateCircuitData(AgentCircuitData data)
|
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());
|
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>
|
/// <summary>
|
||||||
/// Add a caps handler for the given agent. If the CAPS handler already exists for this agent,
|
/// 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.
|
/// then it is replaced by a new CAPS handler.
|
||||||
|
@ -3016,7 +2995,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_statsReporter.SetObjectCapacity(objects);
|
m_statsReporter.SetObjectCapacity(objects);
|
||||||
}
|
}
|
||||||
objectCapacity = objects;
|
objectCapacity = objects;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<FriendListItem> GetFriendList(LLUUID avatarID)
|
public List<FriendListItem> GetFriendList(LLUUID avatarID)
|
||||||
|
@ -3089,7 +3067,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return LLUUID.Zero;
|
return LLUUID.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This method is a way for the Friends Module to create an instant
|
/// This method is a way for the Friends Module to create an instant
|
||||||
/// message to the avatar and for Instant Messages that travel across
|
/// 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);
|
m_eventManager.TriggerGridInstantMessage(message, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public virtual void StoreAddFriendship(LLUUID ownerID, LLUUID friendID, uint perms)
|
public virtual void StoreAddFriendship(LLUUID ownerID, LLUUID friendID, uint perms)
|
||||||
{
|
{
|
||||||
// TODO: m_sceneGridService.DoStuff;
|
// TODO: m_sceneGridService.DoStuff;
|
||||||
|
@ -3123,6 +3099,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// TODO: m_sceneGridService.DoStuff;
|
// TODO: m_sceneGridService.DoStuff;
|
||||||
m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID);
|
m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual List<FriendListItem> StoreGetFriendsForUser(LLUUID ownerID)
|
public virtual List<FriendListItem> StoreGetFriendsForUser(LLUUID ownerID)
|
||||||
{
|
{
|
||||||
// TODO: m_sceneGridService.DoStuff;
|
// TODO: m_sceneGridService.DoStuff;
|
||||||
|
@ -3135,11 +3112,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_statsReporter.AddOutPackets(outPackets);
|
m_statsReporter.AddOutPackets(outPackets);
|
||||||
m_statsReporter.AddunAckedBytes(unAckedBytes);
|
m_statsReporter.AddunAckedBytes(unAckedBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddAgentTime(int ms)
|
public void AddAgentTime(int ms)
|
||||||
{
|
{
|
||||||
m_statsReporter.addFrameMS(ms);
|
m_statsReporter.addFrameMS(ms);
|
||||||
m_statsReporter.addAgentMS(ms);
|
m_statsReporter.addAgentMS(ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddAgentUpdates(int count)
|
public void AddAgentUpdates(int count)
|
||||||
{
|
{
|
||||||
m_statsReporter.AddAgentUpdates(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>
|
/// <param name="Message">The Message being sent to the user</param>
|
||||||
public void SendRegionMessageFromEstateTools(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message)
|
public void SendRegionMessageFromEstateTools(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<ScenePresence> presenceList = GetScenePresences();
|
List<ScenePresence> presenceList = GetScenePresences();
|
||||||
|
|
||||||
foreach (ScenePresence presence in presenceList)
|
foreach (ScenePresence presence in presenceList)
|
||||||
|
@ -3359,7 +3337,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
foreach (ScenePresence presence in presenceList)
|
foreach (ScenePresence presence in presenceList)
|
||||||
{
|
{
|
||||||
if ((presence.Firstname == firstName) && (presence.Lastname == lastName))
|
if (presence.Firstname == firstName && presence.Lastname == lastName)
|
||||||
{
|
{
|
||||||
presence.ControllingClient.SendAgentAlertMessage(message, modal);
|
presence.ControllingClient.SendAgentAlertMessage(message, modal);
|
||||||
break;
|
break;
|
||||||
|
@ -3876,7 +3854,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return m_httpListener.AddLLSDHandler(path, handler);
|
return m_httpListener.AddLLSDHandler(path, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void RemoveStreamHandler(string httpMethod, string path)
|
public void RemoveStreamHandler(string httpMethod, string path)
|
||||||
{
|
{
|
||||||
m_httpListener.RemoveStreamHandler(httpMethod, path);
|
m_httpListener.RemoveStreamHandler(httpMethod, path);
|
||||||
|
@ -3945,7 +3922,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
client.SendRegionHandle(regionID, info.RegionHandle);
|
client.SendRegionHandle(regionID, info.RegionHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void TerrainUnAcked(IClientAPI client, int patchX, int patchY)
|
public void TerrainUnAcked(IClientAPI client, int patchX, int patchY)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + 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)
|
else if (primShape.HollowShape == HollowShape.Triangle)
|
||||||
hollowSides = 3;
|
hollowSides = 3;
|
||||||
|
|
||||||
|
|
||||||
PrimMesh primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides);
|
PrimMesh primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides);
|
||||||
//PrimMesh primMesh = new PrimMesh(sides, profileBegin, profileEnd, 0.0f, 4);
|
//PrimMesh primMesh = new PrimMesh(sides, profileBegin, profileEnd, 0.0f, 4);
|
||||||
|
|
||||||
|
|
|
@ -708,7 +708,6 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void ExtrudeCircular()
|
public void ExtrudeCircular()
|
||||||
{
|
{
|
||||||
this.coords = new List<Coord>();
|
this.coords = new List<Coord>();
|
||||||
|
|
|
@ -89,7 +89,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
det[0].Key = remoteClient.AgentId;
|
det[0].Key = remoteClient.AgentId;
|
||||||
det[0].Populate(myScriptEngine.World);
|
det[0].Populate(myScriptEngine.World);
|
||||||
|
|
||||||
|
|
||||||
if (originalID == 0)
|
if (originalID == 0)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = myScriptEngine.World.GetSceneObjectPart(localID);
|
SceneObjectPart part = myScriptEngine.World.GetSceneObjectPart(localID);
|
||||||
|
|
Loading…
Reference in New Issue