Update svn properties. Formatting cleanup.
parent
c20f7d6171
commit
5d77625e9a
|
@ -1,30 +1,29 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* 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;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
@ -54,10 +53,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
public partial class RestRegionPlugin : RestPlugin
|
public partial class RestRegionPlugin : RestPlugin
|
||||||
{
|
{
|
||||||
#region GET methods
|
#region GET methods
|
||||||
public string GetHandler(string request, string path, string param,
|
public string GetHandler(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
// foreach (string h in httpRequest.Headers.AllKeys)
|
// foreach (string h in httpRequest.Headers.AllKeys)
|
||||||
// foreach (string v in httpRequest.Headers.GetValues(h))
|
// foreach (string v in httpRequest.Headers.GetValues(h))
|
||||||
// m_log.DebugFormat("{0} IsGod: {1} -> {2}", MsgID, h, v);
|
// m_log.DebugFormat("{0} IsGod: {1} -> {2}", MsgID, h, v);
|
||||||
|
|
||||||
|
@ -72,7 +71,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
// param not empty: specific region
|
// param not empty: specific region
|
||||||
return GetHandlerRegion(httpResponse, param);
|
return GetHandlerRegion(httpResponse, param);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
return Failure(httpResponse, OSHttpStatusCode.ServerErrorInternalError, "GET", e);
|
return Failure(httpResponse, OSHttpStatusCode.ServerErrorInternalError, "GET", e);
|
||||||
}
|
}
|
||||||
|
@ -88,7 +87,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
XmlWriter.WriteEndElement();
|
XmlWriter.WriteEndElement();
|
||||||
}
|
}
|
||||||
XmlWriter.WriteEndElement();
|
XmlWriter.WriteEndElement();
|
||||||
|
|
||||||
return XmlWriterResult;
|
return XmlWriterResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +140,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
// m_log.DebugFormat("{0} GET comps advanced: >{1}<", MsgID, comps[1]);
|
// m_log.DebugFormat("{0} GET comps advanced: >{1}<", MsgID, comps[1]);
|
||||||
|
|
||||||
// check for {terrain,stats,prims}
|
// check for {terrain,stats,prims}
|
||||||
switch (comps[1].ToLower())
|
switch (comps[1].ToLower())
|
||||||
{
|
{
|
||||||
case "terrain":
|
case "terrain":
|
||||||
return RegionTerrain(httpResponse, scene);
|
return RegionTerrain(httpResponse, scene);
|
||||||
|
@ -175,13 +174,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
XmlWriter.WriteStartElement(String.Empty, "users", String.Empty);
|
XmlWriter.WriteStartElement(String.Empty, "users", String.Empty);
|
||||||
XmlWriter.WriteString(users.ToString());
|
XmlWriter.WriteString(users.ToString());
|
||||||
XmlWriter.WriteEndElement();
|
XmlWriter.WriteEndElement();
|
||||||
|
|
||||||
XmlWriter.WriteStartElement(String.Empty, "objects", String.Empty);
|
XmlWriter.WriteStartElement(String.Empty, "objects", String.Empty);
|
||||||
XmlWriter.WriteString(objects.ToString());
|
XmlWriter.WriteString(objects.ToString());
|
||||||
XmlWriter.WriteEndElement();
|
XmlWriter.WriteEndElement();
|
||||||
|
|
||||||
XmlWriter.WriteEndDocument();
|
XmlWriter.WriteEndDocument();
|
||||||
|
|
||||||
return XmlWriterResult;
|
return XmlWriterResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,29 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* 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;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
@ -54,10 +53,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
public partial class RestRegionPlugin : RestPlugin
|
public partial class RestRegionPlugin : RestPlugin
|
||||||
{
|
{
|
||||||
#region POST methods
|
#region POST methods
|
||||||
public string PostHandler(string request, string path, string param,
|
public string PostHandler(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
// foreach (string h in httpRequest.Headers.AllKeys)
|
// foreach (string h in httpRequest.Headers.AllKeys)
|
||||||
// foreach (string v in httpRequest.Headers.GetValues(h))
|
// foreach (string v in httpRequest.Headers.GetValues(h))
|
||||||
// m_log.DebugFormat("{0} IsGod: {1} -> {2}", MsgID, h, v);
|
// m_log.DebugFormat("{0} IsGod: {1} -> {2}", MsgID, h, v);
|
||||||
|
|
||||||
|
@ -67,17 +66,17 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// param empty: new region post
|
// param empty: new region post
|
||||||
if (!IsGod(httpRequest))
|
if (!IsGod(httpRequest))
|
||||||
// XXX: this needs to be turned into a FailureUnauthorized(...)
|
// XXX: this needs to be turned into a FailureUnauthorized(...)
|
||||||
return Failure(httpResponse, OSHttpStatusCode.ClientErrorUnauthorized,
|
return Failure(httpResponse, OSHttpStatusCode.ClientErrorUnauthorized,
|
||||||
"GET", "you are not god");
|
"GET", "you are not god");
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(param)) return CreateRegion(httpRequest, httpResponse);
|
if (String.IsNullOrEmpty(param)) return CreateRegion(httpRequest, httpResponse);
|
||||||
|
|
||||||
return Failure(httpResponse, OSHttpStatusCode.ClientErrorNotFound,
|
return Failure(httpResponse, OSHttpStatusCode.ClientErrorNotFound,
|
||||||
"POST", "url {0} not supported", param);
|
"POST", "url {0} not supported", param);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
return Failure(httpResponse, OSHttpStatusCode.ServerErrorInternalError, "POST", e);
|
return Failure(httpResponse, OSHttpStatusCode.ServerErrorInternalError, "POST", e);
|
||||||
}
|
}
|
||||||
|
@ -93,7 +92,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
XmlWriter.WriteEndElement();
|
XmlWriter.WriteEndElement();
|
||||||
}
|
}
|
||||||
XmlWriter.WriteEndElement();
|
XmlWriter.WriteEndElement();
|
||||||
|
|
||||||
return XmlWriterResult;
|
return XmlWriterResult;
|
||||||
}
|
}
|
||||||
#endregion POST methods
|
#endregion POST methods
|
||||||
|
|
|
@ -1,30 +1,29 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* 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;
|
||||||
using System;
|
using System;
|
||||||
|
@ -65,35 +64,35 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
region_external_hostname = regInfo.ExternalHostName;
|
region_external_hostname = regInfo.ExternalHostName;
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName))
|
if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName))
|
||||||
region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName,
|
region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName,
|
||||||
regInfo.MasterAvatarLastName);
|
regInfo.MasterAvatarLastName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string this[string idx]
|
public string this[string idx]
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
switch(idx.ToLower())
|
switch(idx.ToLower())
|
||||||
{
|
{
|
||||||
case "name":
|
case "name":
|
||||||
return region_name;
|
return region_name;
|
||||||
case "id":
|
case "id":
|
||||||
return region_id;
|
return region_id;
|
||||||
case "location":
|
case "location":
|
||||||
return String.Format("<x>{0}</x><y>{1}</y>", region_x, region_y);
|
return String.Format("<x>{0}</x><y>{1}</y>", region_x, region_y);
|
||||||
case "owner":
|
case "owner":
|
||||||
return region_owner;
|
return region_owner;
|
||||||
case "owner_id":
|
case "owner_id":
|
||||||
return region_owner_id;
|
return region_owner_id;
|
||||||
case "http_port":
|
case "http_port":
|
||||||
return region_http_port.ToString();
|
return region_http_port.ToString();
|
||||||
case "server_uri":
|
case "server_uri":
|
||||||
return region_server_uri;
|
return region_server_uri;
|
||||||
case "external_hostname":
|
case "external_hostname":
|
||||||
case "hostname":
|
case "hostname":
|
||||||
return region_external_hostname;
|
return region_external_hostname;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,29 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* 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;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
@ -58,8 +57,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
public partial class RestRegionPlugin : RestPlugin
|
public partial class RestRegionPlugin : RestPlugin
|
||||||
{
|
{
|
||||||
#region overriding properties
|
#region overriding properties
|
||||||
public override string Name
|
public override string Name
|
||||||
{
|
{
|
||||||
get { return "REGION"; }
|
get { return "REGION"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +82,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
base.Initialise(openSim);
|
base.Initialise(openSim);
|
||||||
if (!IsEnabled)
|
if (!IsEnabled)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID);
|
m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,30 +1,29 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* 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;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
@ -56,7 +55,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
{
|
{
|
||||||
#region properties
|
#region properties
|
||||||
|
|
||||||
protected static readonly log4net.ILog m_log =
|
protected static readonly log4net.ILog m_log =
|
||||||
log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private IConfig _config; // Configuration source: Rest Plugins
|
private IConfig _config; // Configuration source: Rest Plugins
|
||||||
|
@ -106,8 +105,8 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsEnabled
|
public bool IsEnabled
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return (null != _pluginConfig) && _pluginConfig.GetBoolean("enabled", false);
|
return (null != _pluginConfig) && _pluginConfig.GetBoolean("enabled", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +114,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// OpenSimMain application
|
/// OpenSimMain application
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public OpenSimMain App
|
public OpenSimMain App
|
||||||
{
|
{
|
||||||
get { return _app; }
|
get { return _app; }
|
||||||
}
|
}
|
||||||
|
@ -123,7 +122,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RPC server
|
/// RPC server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BaseHttpServer HttpServer
|
public BaseHttpServer HttpServer
|
||||||
{
|
{
|
||||||
get { return _httpd; }
|
get { return _httpd; }
|
||||||
}
|
}
|
||||||
|
@ -156,7 +155,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
|
|
||||||
public XmlTextWriter XmlWriter
|
public XmlTextWriter XmlWriter
|
||||||
{
|
{
|
||||||
get {
|
get {
|
||||||
if (null == _xw)
|
if (null == _xw)
|
||||||
{
|
{
|
||||||
_sw = new StringWriter();
|
_sw = new StringWriter();
|
||||||
|
@ -200,7 +199,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_config.GetBoolean("enabled", false))
|
if (!_config.GetBoolean("enabled", false))
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID);
|
m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID);
|
||||||
return;
|
return;
|
||||||
|
@ -211,14 +210,14 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
|
|
||||||
// Retrieve GOD key value, if any.
|
// Retrieve GOD key value, if any.
|
||||||
_godkey = _config.GetString("god_key", String.Empty);
|
_godkey = _config.GetString("god_key", String.Empty);
|
||||||
|
|
||||||
// Retrive prefix if any.
|
// Retrive prefix if any.
|
||||||
_prefix = _config.GetString("prefix", "/admin");
|
_prefix = _config.GetString("prefix", "/admin");
|
||||||
|
|
||||||
// Get plugin specific config
|
// Get plugin specific config
|
||||||
_pluginConfig = openSim.ConfigSource.Configs[ConfigName];
|
_pluginConfig = openSim.ConfigSource.Configs[ConfigName];
|
||||||
|
|
||||||
|
|
||||||
m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID);
|
m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -231,7 +230,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
// not possible for the openSim pointer to be null. However
|
// not possible for the openSim pointer to be null. However
|
||||||
// were the implementation to be changed, this could
|
// were the implementation to be changed, this could
|
||||||
// result in a silent initialization failure. Harmless
|
// result in a silent initialization failure. Harmless
|
||||||
// except for lack of function and lack of any
|
// except for lack of function and lack of any
|
||||||
// diagnostic indication as to why. The same is true if
|
// diagnostic indication as to why. The same is true if
|
||||||
// the HTTP server reference is bad.
|
// the HTTP server reference is bad.
|
||||||
// We should at least issue a message...
|
// We should at least issue a message...
|
||||||
|
@ -254,7 +253,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
{
|
{
|
||||||
if (!IsEnabled) return;
|
if (!IsEnabled) return;
|
||||||
|
|
||||||
if (!path.StartsWith(_prefix))
|
if (!path.StartsWith(_prefix))
|
||||||
{
|
{
|
||||||
path = String.Format("{0}{1}", _prefix, path);
|
path = String.Format("{0}{1}", _prefix, path);
|
||||||
}
|
}
|
||||||
|
@ -354,7 +353,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
/// <param name="method">origin of the failure message</param>
|
/// <param name="method">origin of the failure message</param>
|
||||||
/// <param name="message">failure message</param>
|
/// <param name="message">failure message</param>
|
||||||
/// <remarks>This should probably set a return code as
|
/// <remarks>This should probably set a return code as
|
||||||
/// well. (?)</remarks>
|
/// well. (?)</remarks>
|
||||||
protected string Failure(OSHttpResponse response, OSHttpStatusCode status,
|
protected string Failure(OSHttpResponse response, OSHttpStatusCode status,
|
||||||
string method, string format, params string[] msg)
|
string method, string format, params string[] msg)
|
||||||
{
|
{
|
||||||
|
@ -373,8 +372,8 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
/// <param name="method">origin of the failure message</param>
|
/// <param name="method">origin of the failure message</param>
|
||||||
/// <param name="e">exception causing the failure message</param>
|
/// <param name="e">exception causing the failure message</param>
|
||||||
/// <remarks>This should probably set a return code as
|
/// <remarks>This should probably set a return code as
|
||||||
/// well. (?)</remarks>
|
/// well. (?)</remarks>
|
||||||
public string Failure(OSHttpResponse response, OSHttpStatusCode status,
|
public string Failure(OSHttpResponse response, OSHttpStatusCode status,
|
||||||
string method, Exception e)
|
string method, Exception e)
|
||||||
{
|
{
|
||||||
string m = String.Format("exception occurred: {0}", e.Message);
|
string m = String.Format("exception occurred: {0}", e.Message);
|
||||||
|
|
|
@ -95,7 +95,9 @@ namespace OpenSim.Data.MySQL
|
||||||
settingUsername + ";Password=" + settingPassword + ";Pooling=" + settingPooling + ";";
|
settingUsername + ";Password=" + settingPassword + ";Pooling=" + settingPooling + ";";
|
||||||
|
|
||||||
database = new MySQLManager(m_connectString);
|
database = new MySQLManager(m_connectString);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
m_connectString = connect;
|
m_connectString = connect;
|
||||||
m_agentsTableName = "agents";
|
m_agentsTableName = "agents";
|
||||||
m_usersTableName = "users";
|
m_usersTableName = "users";
|
||||||
|
@ -190,7 +192,7 @@ namespace OpenSim.Data.MySQL
|
||||||
{
|
{
|
||||||
database.ExecuteResourceSql("CreateAvatarAppearance.sql");
|
database.ExecuteResourceSql("CreateAvatarAppearance.sql");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (oldVersion.Contains("Rev.1"))
|
else if (oldVersion.Contains("Rev.1"))
|
||||||
{
|
{
|
||||||
database.ExecuteSql("drop table avatarappearance");
|
database.ExecuteSql("drop table avatarappearance");
|
||||||
|
@ -674,15 +676,15 @@ namespace OpenSim.Data.MySQL
|
||||||
{
|
{
|
||||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
param["?owner"] = user.ToString();
|
param["?owner"] = user.ToString();
|
||||||
|
|
||||||
IDbCommand result = database.Query("SELECT * FROM " + m_appearanceTableName + " WHERE owner = ?owner", param);
|
IDbCommand result = database.Query("SELECT * FROM " + m_appearanceTableName + " WHERE owner = ?owner", param);
|
||||||
IDataReader reader = result.ExecuteReader();
|
IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
AvatarAppearance appearance = database.readAppearanceRow(reader);
|
AvatarAppearance appearance = database.readAppearanceRow(reader);
|
||||||
|
|
||||||
reader.Close();
|
reader.Close();
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
|
|
||||||
return appearance;
|
return appearance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications
|
||||||
m_server.AddStreamHandler(new RestStreamHandler("POST", path, restMethod));
|
m_server.AddStreamHandler(new RestStreamHandler("POST", path, restMethod));
|
||||||
}
|
}
|
||||||
|
|
||||||
public string CapsRequest(string request, string path, string param,
|
public string CapsRequest(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
System.Console.WriteLine("new caps request " + request + " from path " + path);
|
System.Console.WriteLine("new caps request " + request + " from path " + path);
|
||||||
|
|
|
@ -211,7 +211,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
/// <param name="httpRequest">HTTP request header object</param>
|
/// <param name="httpRequest">HTTP request header object</param>
|
||||||
/// <param name="httpResponse">HTTP response header object</param>
|
/// <param name="httpResponse">HTTP response header object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string CapsRequest(string request, string path, string param,
|
public string CapsRequest(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
|
m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
|
||||||
|
@ -509,7 +509,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
/// <param name="httpRequest">HTTP request header object</param>
|
/// <param name="httpRequest">HTTP request header object</param>
|
||||||
/// <param name="httpResponse">HTTP response header object</param>
|
/// <param name="httpResponse">HTTP response header object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string ScriptTaskInventory(string request, string path, string param,
|
public string ScriptTaskInventory(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -564,7 +564,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
/// <param name="path"></param>
|
/// <param name="path"></param>
|
||||||
/// <param name="param"></param>
|
/// <param name="param"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string NoteCardAgentInventory(string request, string path, string param,
|
public string NoteCardAgentInventory(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName);
|
m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName);
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
m_method = method;
|
m_method = method;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] Handle(string path, Stream request,
|
public override byte[] Handle(string path, Stream request,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
//Encoding encoding = Encoding.UTF8;
|
//Encoding encoding = Encoding.UTF8;
|
||||||
|
|
|
@ -73,9 +73,9 @@ namespace OpenSim.Framework
|
||||||
public class PrimitiveBaseShape
|
public class PrimitiveBaseShape
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private static readonly LLObject.TextureEntry m_defaultTexture;
|
private static readonly LLObject.TextureEntry m_defaultTexture;
|
||||||
|
|
||||||
private byte[] m_textureEntry;
|
private byte[] m_textureEntry;
|
||||||
|
|
||||||
public ushort PathBegin;
|
public ushort PathBegin;
|
||||||
|
@ -93,39 +93,39 @@ namespace OpenSim.Framework
|
||||||
public sbyte PathTwist;
|
public sbyte PathTwist;
|
||||||
public sbyte PathTwistBegin;
|
public sbyte PathTwistBegin;
|
||||||
public byte PCode;
|
public byte PCode;
|
||||||
public ushort ProfileBegin;
|
public ushort ProfileBegin;
|
||||||
|
|
||||||
public byte ProfileCurve
|
public byte ProfileCurve
|
||||||
{
|
{
|
||||||
get { return (byte)((byte)HollowShape | (byte)ProfileShape); }
|
get { return (byte)((byte)HollowShape | (byte)ProfileShape); }
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
// Handle hollow shape component
|
// Handle hollow shape component
|
||||||
byte hollowShapeByte = (byte)(value & 0xf0);
|
byte hollowShapeByte = (byte)(value & 0xf0);
|
||||||
|
|
||||||
if (!Enum.IsDefined(typeof(HollowShape), hollowShapeByte))
|
if (!Enum.IsDefined(typeof(HollowShape), hollowShapeByte))
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.WarnFormat(
|
||||||
"[SHAPE]: Attempt to set a ProfileCurve with a hollow shape value of {0}, which isn't a valid enum. Replacing with default shape.",
|
"[SHAPE]: Attempt to set a ProfileCurve with a hollow shape value of {0}, which isn't a valid enum. Replacing with default shape.",
|
||||||
hollowShapeByte);
|
hollowShapeByte);
|
||||||
|
|
||||||
this.HollowShape = HollowShape.Same;
|
this.HollowShape = HollowShape.Same;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.HollowShape = (HollowShape)hollowShapeByte;
|
this.HollowShape = (HollowShape)hollowShapeByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle profile shape component
|
// Handle profile shape component
|
||||||
byte profileShapeByte = (byte)(value & 0xf);
|
byte profileShapeByte = (byte)(value & 0xf);
|
||||||
|
|
||||||
if (!Enum.IsDefined(typeof(ProfileShape), profileShapeByte))
|
if (!Enum.IsDefined(typeof(ProfileShape), profileShapeByte))
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.WarnFormat(
|
||||||
"[SHAPE]: Attempt to set a ProfileCurve with a profile shape value of {0}, which isn't a valid enum. Replacing with square.",
|
"[SHAPE]: Attempt to set a ProfileCurve with a profile shape value of {0}, which isn't a valid enum. Replacing with square.",
|
||||||
profileShapeByte);
|
profileShapeByte);
|
||||||
|
|
||||||
this.ProfileShape = ProfileShape.Square;
|
this.ProfileShape = ProfileShape.Square;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -133,13 +133,13 @@ namespace OpenSim.Framework
|
||||||
this.ProfileShape = (ProfileShape)profileShapeByte;
|
this.ProfileShape = (ProfileShape)profileShapeByte;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ushort ProfileEnd;
|
public ushort ProfileEnd;
|
||||||
public ushort ProfileHollow;
|
public ushort ProfileHollow;
|
||||||
public LLVector3 Scale;
|
public LLVector3 Scale;
|
||||||
public byte State;
|
public byte State;
|
||||||
|
|
||||||
// Sculpted
|
// Sculpted
|
||||||
[XmlIgnore] public LLUUID SculptTexture = LLUUID.Zero;
|
[XmlIgnore] public LLUUID SculptTexture = LLUUID.Zero;
|
||||||
[XmlIgnore] public byte SculptType = (byte)0;
|
[XmlIgnore] public byte SculptType = (byte)0;
|
||||||
|
@ -154,7 +154,7 @@ namespace OpenSim.Framework
|
||||||
[XmlIgnore] public float FlexiForceX = 0f;
|
[XmlIgnore] public float FlexiForceX = 0f;
|
||||||
[XmlIgnore] public float FlexiForceY = 0f;
|
[XmlIgnore] public float FlexiForceY = 0f;
|
||||||
[XmlIgnore] public float FlexiForceZ = 0f;
|
[XmlIgnore] public float FlexiForceZ = 0f;
|
||||||
|
|
||||||
//Bright n sparkly
|
//Bright n sparkly
|
||||||
[XmlIgnore] public float LightColorR = 0f;
|
[XmlIgnore] public float LightColorR = 0f;
|
||||||
[XmlIgnore] public float LightColorG = 0f;
|
[XmlIgnore] public float LightColorG = 0f;
|
||||||
|
@ -198,8 +198,8 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProfileShape ProfileShape;
|
public ProfileShape ProfileShape;
|
||||||
|
|
||||||
public HollowShape HollowShape;
|
public HollowShape HollowShape;
|
||||||
|
|
||||||
public static PrimitiveBaseShape Default
|
public static PrimitiveBaseShape Default
|
||||||
{
|
{
|
||||||
|
@ -394,7 +394,7 @@ namespace OpenSim.Framework
|
||||||
returnbyte[0] = 0;
|
returnbyte[0] = 0;
|
||||||
return returnbyte;
|
return returnbyte;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return returnbytes;
|
return returnbytes;
|
||||||
//m_log.Info("[EXTRAPARAMS]: Length = " + m_shape.ExtraParams.Length.ToString());
|
//m_log.Info("[EXTRAPARAMS]: Length = " + m_shape.ExtraParams.Length.ToString());
|
||||||
|
@ -451,11 +451,11 @@ namespace OpenSim.Framework
|
||||||
int i = 0;
|
int i = 0;
|
||||||
byte extraParamCount = data[i++];
|
byte extraParamCount = data[i++];
|
||||||
|
|
||||||
|
|
||||||
for (int k = 0; k < extraParamCount; k++)
|
for (int k = 0; k < extraParamCount; k++)
|
||||||
{
|
{
|
||||||
ushort epType = Helpers.BytesToUInt16(data, i);
|
ushort epType = Helpers.BytesToUInt16(data, i);
|
||||||
|
|
||||||
i += 2;
|
i += 2;
|
||||||
uint paramLength = Helpers.BytesToUIntBig(data, i);
|
uint paramLength = Helpers.BytesToUIntBig(data, i);
|
||||||
|
|
||||||
|
@ -611,7 +611,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
// Alpha channel in color is intensity
|
// Alpha channel in color is intensity
|
||||||
LLColor tmpColor = new LLColor(LightColorR,LightColorG,LightColorB,LightIntensity);
|
LLColor tmpColor = new LLColor(LightColorR,LightColorG,LightColorB,LightIntensity);
|
||||||
|
|
||||||
tmpColor.GetBytes().CopyTo(data, 0);
|
tmpColor.GetBytes().CopyTo(data, 0);
|
||||||
Helpers.FloatToBytes(LightRadius).CopyTo(data, 4);
|
Helpers.FloatToBytes(LightRadius).CopyTo(data, 4);
|
||||||
Helpers.FloatToBytes(LightCutoff).CopyTo(data, 8);
|
Helpers.FloatToBytes(LightCutoff).CopyTo(data, 8);
|
||||||
|
|
|
@ -164,8 +164,8 @@ namespace OpenSim.Framework.Servers
|
||||||
if (TryGetAgentHandler(request, response, out agentHandler))
|
if (TryGetAgentHandler(request, response, out agentHandler))
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[HTTP-AGENT] Handler located for {0}", request.UserAgent);
|
// m_log.DebugFormat("[HTTP-AGENT] Handler located for {0}", request.UserAgent);
|
||||||
if(HandleAgentRequest(agentHandler, request, response))
|
if (HandleAgentRequest(agentHandler, request, response))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,22 +177,22 @@ namespace OpenSim.Framework.Servers
|
||||||
string handlerKey = GetHandlerKey(request.HttpMethod, path);
|
string handlerKey = GetHandlerKey(request.HttpMethod, path);
|
||||||
|
|
||||||
//m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path);
|
//m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path);
|
||||||
|
|
||||||
if (TryGetStreamHandler(handlerKey, out requestHandler))
|
if (TryGetStreamHandler(handlerKey, out requestHandler))
|
||||||
{
|
{
|
||||||
|
|
||||||
// Okay, so this is bad, but should be considered temporary until everything is IStreamHandler.
|
// Okay, so this is bad, but should be considered temporary until everything is IStreamHandler.
|
||||||
byte[] buffer;
|
byte[] buffer;
|
||||||
if (requestHandler is IStreamedRequestHandler)
|
if (requestHandler is IStreamedRequestHandler)
|
||||||
{
|
{
|
||||||
IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
|
IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
|
||||||
|
|
||||||
buffer = streamedRequestHandler.Handle(path, request.InputStream, request, response);
|
buffer = streamedRequestHandler.Handle(path, request.InputStream, request, response);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IStreamHandler streamHandler = (IStreamHandler) requestHandler;
|
IStreamHandler streamHandler = (IStreamHandler) requestHandler;
|
||||||
|
|
||||||
using (MemoryStream memoryStream = new MemoryStream())
|
using (MemoryStream memoryStream = new MemoryStream())
|
||||||
{
|
{
|
||||||
streamHandler.Handle(path, request.InputStream, memoryStream, request, response);
|
streamHandler.Handle(path, request.InputStream, memoryStream, request, response);
|
||||||
|
@ -200,11 +200,11 @@ namespace OpenSim.Framework.Servers
|
||||||
buffer = memoryStream.ToArray();
|
buffer = memoryStream.ToArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
request.InputStream.Close();
|
request.InputStream.Close();
|
||||||
if (!response.IsContentTypeSet) response.ContentType = requestHandler.ContentType;
|
if (!response.IsContentTypeSet) response.ContentType = requestHandler.ContentType;
|
||||||
response.ContentLength64 = buffer.LongLength;
|
response.ContentLength64 = buffer.LongLength;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
response.OutputStream.Write(buffer, 0, buffer.Length);
|
response.OutputStream.Write(buffer, 0, buffer.Length);
|
||||||
|
@ -216,7 +216,7 @@ namespace OpenSim.Framework.Servers
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (request.ContentType)
|
switch (request.ContentType)
|
||||||
{
|
{
|
||||||
case null:
|
case null:
|
||||||
|
@ -479,7 +479,7 @@ namespace OpenSim.Framework.Servers
|
||||||
private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response)
|
private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response)
|
||||||
{
|
{
|
||||||
|
|
||||||
// In the case of REST, then handler is responsible for ALL aspects of
|
// In the case of REST, then handler is responsible for ALL aspects of
|
||||||
// the request/response handling. Nothing is done here, not even encoding.
|
// the request/response handling. Nothing is done here, not even encoding.
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
public abstract class BaseStreamHandler : BaseRequestHandler, IStreamedRequestHandler
|
public abstract class BaseStreamHandler : BaseRequestHandler, IStreamedRequestHandler
|
||||||
{
|
{
|
||||||
public abstract byte[] Handle(string path, Stream request,
|
public abstract byte[] Handle(string path, Stream request,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse);
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse);
|
||||||
|
|
||||||
protected BaseStreamHandler(string httpMethod, string path) : base(httpMethod, path)
|
protected BaseStreamHandler(string httpMethod, string path) : base(httpMethod, path)
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim.Framework.Servers
|
||||||
get { return _acceptTypes; }
|
get { return _acceptTypes; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public Encoding ContentEncoding
|
public Encoding ContentEncoding
|
||||||
{
|
{
|
||||||
get { return _contentEncoding; }
|
get { return _contentEncoding; }
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ namespace OpenSim.Framework.Servers
|
||||||
get { return _url; }
|
get { return _url; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string UserAgent
|
public string UserAgent
|
||||||
{
|
{
|
||||||
get { return _userAgent; }
|
get { return _userAgent; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,36 +36,36 @@ namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
private string _contentType;
|
private string _contentType;
|
||||||
private bool _contentTypeSet;
|
private bool _contentTypeSet;
|
||||||
public string ContentType
|
public string ContentType
|
||||||
{
|
{
|
||||||
get { return _contentType; }
|
get { return _contentType; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_contentType = value;
|
_contentType = value;
|
||||||
_contentTypeSet = true;
|
_contentTypeSet = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool IsContentTypeSet
|
public bool IsContentTypeSet
|
||||||
{
|
{
|
||||||
get { return _contentTypeSet; }
|
get { return _contentTypeSet; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private long _contentLength64;
|
private long _contentLength64;
|
||||||
public long ContentLength64
|
public long ContentLength64
|
||||||
{
|
{
|
||||||
get { return _contentLength64; }
|
get { return _contentLength64; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_contentLength64 = value;
|
_contentLength64 = value;
|
||||||
if (null != _resp) _resp.ContentLength64 = value;
|
if (null != _resp) _resp.ContentLength64 = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Encoding _contentEncoding;
|
private Encoding _contentEncoding;
|
||||||
public Encoding ContentEncoding
|
public Encoding ContentEncoding
|
||||||
{
|
{
|
||||||
get { return _contentEncoding; }
|
get { return _contentEncoding; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_contentEncoding = value;
|
_contentEncoding = value;
|
||||||
if (null != _resp) _resp.ContentEncoding = value;
|
if (null != _resp) _resp.ContentEncoding = value;
|
||||||
|
@ -76,10 +76,10 @@ namespace OpenSim.Framework.Servers
|
||||||
public CookieCollection Cookies;
|
public CookieCollection Cookies;
|
||||||
|
|
||||||
private bool _keepAlive;
|
private bool _keepAlive;
|
||||||
public bool KeepAlive
|
public bool KeepAlive
|
||||||
{
|
{
|
||||||
get { return _keepAlive; }
|
get { return _keepAlive; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_keepAlive = value;
|
_keepAlive = value;
|
||||||
if (null != _resp) _resp.KeepAlive = value;
|
if (null != _resp) _resp.KeepAlive = value;
|
||||||
|
@ -92,7 +92,7 @@ namespace OpenSim.Framework.Servers
|
||||||
public string RedirectLocation
|
public string RedirectLocation
|
||||||
{
|
{
|
||||||
get { return _redirectLocation; }
|
get { return _redirectLocation; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_redirectLocation = value;
|
_redirectLocation = value;
|
||||||
if (null != _resp) _resp.RedirectLocation = value;
|
if (null != _resp) _resp.RedirectLocation = value;
|
||||||
|
@ -103,7 +103,7 @@ namespace OpenSim.Framework.Servers
|
||||||
public bool SendChunked
|
public bool SendChunked
|
||||||
{
|
{
|
||||||
get { return _sendChunked; }
|
get { return _sendChunked; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_sendChunked = value;
|
_sendChunked = value;
|
||||||
if (null != _resp) _resp.SendChunked = value;
|
if (null != _resp) _resp.SendChunked = value;
|
||||||
|
@ -111,10 +111,10 @@ namespace OpenSim.Framework.Servers
|
||||||
}
|
}
|
||||||
|
|
||||||
private int _statusCode;
|
private int _statusCode;
|
||||||
public int StatusCode
|
public int StatusCode
|
||||||
{
|
{
|
||||||
get { return _statusCode; }
|
get { return _statusCode; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_statusCode = value;
|
_statusCode = value;
|
||||||
if (null != _resp) _resp.StatusCode = value;
|
if (null != _resp) _resp.StatusCode = value;
|
||||||
|
@ -122,10 +122,10 @@ namespace OpenSim.Framework.Servers
|
||||||
}
|
}
|
||||||
|
|
||||||
private string _statusDescription;
|
private string _statusDescription;
|
||||||
public string StatusDescription
|
public string StatusDescription
|
||||||
{
|
{
|
||||||
get { return _statusDescription; }
|
get { return _statusDescription; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_statusDescription = value;
|
_statusDescription = value;
|
||||||
if (null != _resp) _resp.StatusDescription = value;
|
if (null != _resp) _resp.StatusDescription = value;
|
||||||
|
|
|
@ -41,13 +41,13 @@ namespace OpenSim.Framework.Servers
|
||||||
// application level protocol
|
// application level protocol
|
||||||
InfoSwitchingProtocols = 101,
|
InfoSwitchingProtocols = 101,
|
||||||
|
|
||||||
|
|
||||||
// 2xx Success codes
|
// 2xx Success codes
|
||||||
// 200 Request successful
|
// 200 Request successful
|
||||||
SuccessOk = 200,
|
SuccessOk = 200,
|
||||||
// 201 Request successful, new resource created
|
// 201 Request successful, new resource created
|
||||||
SuccessOkCreated = 201,
|
SuccessOkCreated = 201,
|
||||||
// 202 Request accepted, processing still on-going
|
// 202 Request accepted, processing still on-going
|
||||||
SuccessOkAccepted = 202,
|
SuccessOkAccepted = 202,
|
||||||
// 203 Request successful, meta information not authoritative
|
// 203 Request successful, meta information not authoritative
|
||||||
SuccessOkNonAuthoritativeInformation = 203,
|
SuccessOkNonAuthoritativeInformation = 203,
|
||||||
|
@ -60,7 +60,7 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
// 3xx Redirect code: user agent needs to go somewhere else
|
// 3xx Redirect code: user agent needs to go somewhere else
|
||||||
// 300 Redirect: different presentation forms available, take
|
// 300 Redirect: different presentation forms available, take
|
||||||
// a pick
|
// a pick
|
||||||
RedirectMultipleChoices = 300,
|
RedirectMultipleChoices = 300,
|
||||||
// 301 Redirect: requested resource has moved and now lives
|
// 301 Redirect: requested resource has moved and now lives
|
||||||
// somewhere else
|
// somewhere else
|
||||||
|
@ -78,7 +78,7 @@ namespace OpenSim.Framework.Servers
|
||||||
// 307 Redirect: Resource temporarily somewhere else, location
|
// 307 Redirect: Resource temporarily somewhere else, location
|
||||||
// might change
|
// might change
|
||||||
RedirectMovedTemporarily = 307,
|
RedirectMovedTemporarily = 307,
|
||||||
|
|
||||||
// 4xx Client error: the client borked the request
|
// 4xx Client error: the client borked the request
|
||||||
// 400 Client error: bad request, server does not grok what
|
// 400 Client error: bad request, server does not grok what
|
||||||
// the client wants
|
// the client wants
|
||||||
|
@ -92,7 +92,7 @@ namespace OpenSim.Framework.Servers
|
||||||
// deliver, do not try again.
|
// deliver, do not try again.
|
||||||
ClientErrorForbidden = 403,
|
ClientErrorForbidden = 403,
|
||||||
// 404 Client error: Server cannot find anything matching the
|
// 404 Client error: Server cannot find anything matching the
|
||||||
// client request.
|
// client request.
|
||||||
ClientErrorNotFound = 404,
|
ClientErrorNotFound = 404,
|
||||||
// 405 Client error: The method specified by the client in the
|
// 405 Client error: The method specified by the client in the
|
||||||
// request is not allowed for the resource requested
|
// request is not allowed for the resource requested
|
||||||
|
@ -148,7 +148,7 @@ namespace OpenSim.Framework.Servers
|
||||||
// 501 Server error: The server does not do the functionality
|
// 501 Server error: The server does not do the functionality
|
||||||
// required to carry out the client request. not at
|
// required to carry out the client request. not at
|
||||||
// all. certainly not before breakfast. but also not after
|
// all. certainly not before breakfast. but also not after
|
||||||
// breakfast.
|
// breakfast.
|
||||||
ServerErrorNotImplemented = 501,
|
ServerErrorNotImplemented = 501,
|
||||||
// 502 Server error: While acting as a proxy or a gateway, the
|
// 502 Server error: While acting as a proxy or a gateway, the
|
||||||
// server got ditched by the upstream server and as a
|
// server got ditched by the upstream server and as a
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace OpenSim.Framework.Servers
|
||||||
m_method = method;
|
m_method = method;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Handle(string path, Stream request, Stream responseStream,
|
public void Handle(string path, Stream request, Stream responseStream,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
TRequest deserial;
|
TRequest deserial;
|
||||||
|
|
|
@ -27,6 +27,6 @@
|
||||||
|
|
||||||
namespace OpenSim.Framework.Servers
|
namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
public delegate string RestMethod(string request, string path, string param,
|
public delegate string RestMethod(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse);
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace OpenSim.Grid.AssetServer
|
||||||
m_assetProvider = assetProvider;
|
m_assetProvider = assetProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] Handle(string path, Stream request,
|
public override byte[] Handle(string path, Stream request,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
string param = GetParam(path);
|
string param = GetParam(path);
|
||||||
|
@ -123,7 +123,7 @@ namespace OpenSim.Grid.AssetServer
|
||||||
private OpenAsset_Main m_assetManager;
|
private OpenAsset_Main m_assetManager;
|
||||||
private IAssetProvider m_assetProvider;
|
private IAssetProvider m_assetProvider;
|
||||||
|
|
||||||
public override byte[] Handle(string path, Stream request,
|
public override byte[] Handle(string path, Stream request,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
string param = GetParam(path);
|
string param = GetParam(path);
|
||||||
|
|
|
@ -880,7 +880,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
/// <param name="httpRequest">HTTP request header object</param>
|
/// <param name="httpRequest">HTTP request header object</param>
|
||||||
/// <param name="httpResponse">HTTP response header object</param>
|
/// <param name="httpResponse">HTTP response header object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string RestGetRegionMethod(string request, string path, string param,
|
public string RestGetRegionMethod(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
return RestGetSimMethod(String.Empty, "/sims/", param, httpRequest, httpResponse);
|
return RestGetSimMethod(String.Empty, "/sims/", param, httpRequest, httpResponse);
|
||||||
|
@ -895,7 +895,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
/// <param name="httpRequest">HTTP request header object</param>
|
/// <param name="httpRequest">HTTP request header object</param>
|
||||||
/// <param name="httpResponse">HTTP response header object</param>
|
/// <param name="httpResponse">HTTP response header object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string RestSetRegionMethod(string request, string path, string param,
|
public string RestSetRegionMethod(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
return RestSetSimMethod(String.Empty, "/sims/", param, httpRequest, httpResponse);
|
return RestSetSimMethod(String.Empty, "/sims/", param, httpRequest, httpResponse);
|
||||||
|
@ -910,7 +910,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
/// <param name="httpRequest">HTTP request header object</param>
|
/// <param name="httpRequest">HTTP request header object</param>
|
||||||
/// <param name="httpResponse">HTTP response header object</param>
|
/// <param name="httpResponse">HTTP response header object</param>
|
||||||
/// <returns>Information about the sim in XML</returns>
|
/// <returns>Information about the sim in XML</returns>
|
||||||
public string RestGetSimMethod(string request, string path, string param,
|
public string RestGetSimMethod(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
string respstring = String.Empty;
|
string respstring = String.Empty;
|
||||||
|
@ -958,7 +958,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
/// <param name="httpRequest">HTTP request header object</param>
|
/// <param name="httpRequest">HTTP request header object</param>
|
||||||
/// <param name="httpResponse">HTTP response header object</param>
|
/// <param name="httpResponse">HTTP response header object</param>
|
||||||
/// <returns>"OK" or an error</returns>
|
/// <returns>"OK" or an error</returns>
|
||||||
public string RestSetSimMethod(string request, string path, string param,
|
public string RestSetSimMethod(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Processing region update via REST method");
|
Console.WriteLine("Processing region update via REST method");
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace OpenSim.Grid.MessagingServer
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] Handle(string path, Stream request,
|
public override byte[] Handle(string path, Stream request,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
string param = GetParam(path);
|
string param = GetParam(path);
|
||||||
|
@ -86,7 +86,7 @@ namespace OpenSim.Grid.MessagingServer
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
public override byte[] Handle(string path, Stream request,
|
public override byte[] Handle(string path, Stream request,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
string param = GetParam(path);
|
string param = GetParam(path);
|
||||||
|
|
|
@ -119,7 +119,9 @@ namespace OpenSim.Grid.UserServer
|
||||||
RegionProfileData.RequestSimProfileData(
|
RegionProfileData.RequestSimProfileData(
|
||||||
theUser.HomeRegion, m_config.GridServerURL,
|
theUser.HomeRegion, m_config.GridServerURL,
|
||||||
m_config.GridSendKey, m_config.GridRecvKey);
|
m_config.GridSendKey, m_config.GridRecvKey);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
start_x = Convert.ToInt32(startLocationRequestParsed[1]);
|
start_x = Convert.ToInt32(startLocationRequestParsed[1]);
|
||||||
start_y = Convert.ToInt32(startLocationRequestParsed[2]);
|
start_y = Convert.ToInt32(startLocationRequestParsed[2]);
|
||||||
start_z = Convert.ToInt32(startLocationRequestParsed[3]);
|
start_z = Convert.ToInt32(startLocationRequestParsed[3]);
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
/// <param name="httpRequest">HTTP request header object</param>
|
/// <param name="httpRequest">HTTP request header object</param>
|
||||||
/// <param name="httpResponse">HTTP response header object</param>
|
/// <param name="httpResponse">HTTP response header object</param>
|
||||||
/// <returns>Success "OK" else error</returns>
|
/// <returns>Success "OK" else error</returns>
|
||||||
public string RestDeleteUserSessionMethod(string request, string path, string param,
|
public string RestDeleteUserSessionMethod(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
// TODO! Important!
|
// TODO! Important!
|
||||||
|
@ -260,11 +260,14 @@ namespace OpenSim.Grid.UserServer
|
||||||
if (requestData.Contains("owner"))
|
if (requestData.Contains("owner"))
|
||||||
{
|
{
|
||||||
appearance = GetUserAppearance(new LLUUID((string)requestData["owner"]));
|
appearance = GetUserAppearance(new LLUUID((string)requestData["owner"]));
|
||||||
if (appearance == null) {
|
if (appearance == null)
|
||||||
|
{
|
||||||
responseData = new Hashtable();
|
responseData = new Hashtable();
|
||||||
responseData["error_type"] = "no appearance";
|
responseData["error_type"] = "no appearance";
|
||||||
responseData["error_desc"] = "There was no appearance found for this avatar";
|
responseData["error_desc"] = "There was no appearance found for this avatar";
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
responseData = appearance.ToHashTable();
|
responseData = appearance.ToHashTable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace OpenSim
|
||||||
/// The file used to load and save prim backup xml if none has been specified
|
/// The file used to load and save prim backup xml if none has been specified
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml";
|
protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The file use to load and save an opensim archive if none has been specified
|
/// The file use to load and save an opensim archive if none has been specified
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -354,7 +354,7 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enhance the version string with extra information if it's available.
|
/// Enhance the version string with extra information if it's available.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected void EnhanceVersionInformation()
|
protected void EnhanceVersionInformation()
|
||||||
{
|
{
|
||||||
|
@ -387,7 +387,7 @@ namespace OpenSim
|
||||||
if (!string.IsNullOrEmpty(buildVersion))
|
if (!string.IsNullOrEmpty(buildVersion))
|
||||||
{
|
{
|
||||||
VersionInfo.Version += ", SVN build r" + buildVersion;
|
VersionInfo.Version += ", SVN build r" + buildVersion;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
VersionInfo.Version += ", SVN build revision not available";
|
VersionInfo.Version += ", SVN build revision not available";
|
||||||
|
@ -407,9 +407,9 @@ namespace OpenSim
|
||||||
if (OSString.Length > 45)
|
if (OSString.Length > 45)
|
||||||
{
|
{
|
||||||
OSString = OSString.Substring(0, 45);
|
OSString = OSString.Substring(0, 45);
|
||||||
}
|
}
|
||||||
|
|
||||||
VersionInfo.Version += ", OS " + OSString;
|
VersionInfo.Version += ", OS " + OSString;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -418,7 +418,7 @@ namespace OpenSim
|
||||||
protected void InternalStartUp()
|
protected void InternalStartUp()
|
||||||
{
|
{
|
||||||
EnhanceVersionInformation();
|
EnhanceVersionInformation();
|
||||||
|
|
||||||
m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + "\n");
|
m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + "\n");
|
||||||
|
|
||||||
m_stats = StatsManager.StartCollectingSimExtraStats();
|
m_stats = StatsManager.StartCollectingSimExtraStats();
|
||||||
|
@ -710,7 +710,7 @@ namespace OpenSim
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected class SimStatusHandler : IStreamedRequestHandler
|
protected class SimStatusHandler : IStreamedRequestHandler
|
||||||
{
|
{
|
||||||
public byte[] Handle(string path, Stream request,
|
public byte[] Handle(string path, Stream request,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
return Encoding.UTF8.GetBytes("OK");
|
return Encoding.UTF8.GetBytes("OK");
|
||||||
|
|
|
@ -291,7 +291,7 @@ namespace OpenSim
|
||||||
break;
|
break;
|
||||||
case "save-xml":
|
case "save-xml":
|
||||||
m_log.Error("[CONSOLE]: PLEASE NOTE, save-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use save-xml2, please file a mantis detailing the reason.");
|
m_log.Error("[CONSOLE]: PLEASE NOTE, save-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use save-xml2, please file a mantis detailing the reason.");
|
||||||
|
|
||||||
if (cmdparams.Length > 0)
|
if (cmdparams.Length > 0)
|
||||||
{
|
{
|
||||||
m_sceneManager.SaveCurrentSceneToXml(cmdparams[0]);
|
m_sceneManager.SaveCurrentSceneToXml(cmdparams[0]);
|
||||||
|
@ -304,7 +304,7 @@ namespace OpenSim
|
||||||
|
|
||||||
case "load-xml":
|
case "load-xml":
|
||||||
m_log.Error("[CONSOLE]: PLEASE NOTE, load-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use load-xml2, please file a mantis detailing the reason.");
|
m_log.Error("[CONSOLE]: PLEASE NOTE, load-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use load-xml2, please file a mantis detailing the reason.");
|
||||||
|
|
||||||
LLVector3 loadOffset = new LLVector3(0, 0, 0);
|
LLVector3 loadOffset = new LLVector3(0, 0, 0);
|
||||||
if (cmdparams.Length > 0)
|
if (cmdparams.Length > 0)
|
||||||
{
|
{
|
||||||
|
@ -359,10 +359,10 @@ namespace OpenSim
|
||||||
m_sceneManager.LoadCurrentSceneFromXml2(DEFAULT_PRIM_BACKUP_FILENAME);
|
m_sceneManager.LoadCurrentSceneFromXml2(DEFAULT_PRIM_BACKUP_FILENAME);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "save-oar":
|
case "save-oar":
|
||||||
m_log.Error("[CONSOLE]: Don't use me - I haven't yet been sufficiently implemented!");
|
m_log.Error("[CONSOLE]: Don't use me - I haven't yet been sufficiently implemented!");
|
||||||
|
|
||||||
if (cmdparams.Length > 0)
|
if (cmdparams.Length > 0)
|
||||||
{
|
{
|
||||||
m_sceneManager.SaveCurrentSceneToArchive(cmdparams[0]);
|
m_sceneManager.SaveCurrentSceneToArchive(cmdparams[0]);
|
||||||
|
@ -371,7 +371,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
m_sceneManager.SaveCurrentSceneToArchive(DEFAULT_OAR_BACKUP_FILENAME);
|
m_sceneManager.SaveCurrentSceneToArchive(DEFAULT_OAR_BACKUP_FILENAME);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "plugin":
|
case "plugin":
|
||||||
m_sceneManager.SendCommandToPluginModules(cmdparams);
|
m_sceneManager.SendCommandToPluginModules(cmdparams);
|
||||||
|
@ -597,9 +597,9 @@ namespace OpenSim
|
||||||
|
|
||||||
case "users":
|
case "users":
|
||||||
IList agents = m_sceneManager.GetCurrentSceneAvatars();
|
IList agents = m_sceneManager.GetCurrentSceneAvatars();
|
||||||
|
|
||||||
m_console.Notice(String.Format("\nAgents connected: {0}\n", agents.Count));
|
m_console.Notice(String.Format("\nAgents connected: {0}\n", agents.Count));
|
||||||
|
|
||||||
m_console.Notice(
|
m_console.Notice(
|
||||||
String.Format("{0,-16}{1,-16}{2,-37}{3,-16}", "Firstname", "Lastname",
|
String.Format("{0,-16}{1,-16}{2,-37}{3,-16}", "Firstname", "Lastname",
|
||||||
"Agent ID","Region"));
|
"Agent ID","Region"));
|
||||||
|
@ -627,7 +627,7 @@ namespace OpenSim
|
||||||
presence.UUID,
|
presence.UUID,
|
||||||
regionName));
|
regionName));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_console.Notice("");
|
m_console.Notice("");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
private Dictionary<string, LLUUID> m_defaultAnimations = new Dictionary<string, LLUUID>();
|
private Dictionary<string, LLUUID> m_defaultAnimations = new Dictionary<string, LLUUID>();
|
||||||
|
|
||||||
|
|
||||||
/* protected variables */
|
/* protected variables */
|
||||||
|
|
||||||
protected static Dictionary<PacketType, PacketMethod> PacketHandlers =
|
protected static Dictionary<PacketType, PacketMethod> PacketHandlers =
|
||||||
|
@ -413,7 +412,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
Thread.Sleep(2000);
|
Thread.Sleep(2000);
|
||||||
|
|
||||||
|
|
||||||
// Shut down timers
|
// Shut down timers
|
||||||
m_ackTimer.Stop();
|
m_ackTimer.Stop();
|
||||||
m_clientPingTimer.Stop();
|
m_clientPingTimer.Stop();
|
||||||
|
@ -782,7 +780,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
public event TeleportLocationRequest OnSetStartLocationRequest;
|
public event TeleportLocationRequest OnSetStartLocationRequest;
|
||||||
public event UpdateAvatarProperties OnUpdateAvatarProperties;
|
public event UpdateAvatarProperties OnUpdateAvatarProperties;
|
||||||
|
|
||||||
|
|
||||||
public event CreateNewInventoryItem OnCreateNewInventoryItem;
|
public event CreateNewInventoryItem OnCreateNewInventoryItem;
|
||||||
public event CreateInventoryFolder OnCreateNewInventoryFolder;
|
public event CreateInventoryFolder OnCreateNewInventoryFolder;
|
||||||
public event UpdateInventoryFolder OnUpdateInventoryFolder;
|
public event UpdateInventoryFolder OnUpdateInventoryFolder;
|
||||||
|
@ -937,13 +934,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// <param name="fromPos"></param>
|
/// <param name="fromPos"></param>
|
||||||
/// <param name="fromName"></param>
|
/// <param name="fromName"></param>
|
||||||
/// <param name="fromAgentID"></param>
|
/// <param name="fromAgentID"></param>
|
||||||
public void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName,
|
public void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName,
|
||||||
LLUUID fromAgentID, byte source, byte audible)
|
LLUUID fromAgentID, byte source, byte audible)
|
||||||
{
|
{
|
||||||
SendChatMessage(Helpers.StringToField(message), type, fromPos, fromName, fromAgentID, source, audible);
|
SendChatMessage(Helpers.StringToField(message), type, fromPos, fromName, fromAgentID, source, audible);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName,
|
public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName,
|
||||||
LLUUID fromAgentID, byte source, byte audible)
|
LLUUID fromAgentID, byte source, byte audible)
|
||||||
{
|
{
|
||||||
ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator);
|
ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator);
|
||||||
|
@ -3172,7 +3169,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public bool HandleObjectGroupRequest(IClientAPI sender, Packet Pack)
|
public bool HandleObjectGroupRequest(IClientAPI sender, Packet Pack)
|
||||||
{
|
{
|
||||||
|
|
||||||
ObjectGroupPacket ogpack = (ObjectGroupPacket)Pack;
|
ObjectGroupPacket ogpack = (ObjectGroupPacket)Pack;
|
||||||
handlerObjectGroupRequest = OnObjectGroupRequest;
|
handlerObjectGroupRequest = OnObjectGroupRequest;
|
||||||
if (handlerObjectGroupRequest != null)
|
if (handlerObjectGroupRequest != null)
|
||||||
|
@ -3185,7 +3182,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private bool HandleViewerEffect(IClientAPI sender, Packet Pack)
|
private bool HandleViewerEffect(IClientAPI sender, Packet Pack)
|
||||||
{
|
{
|
||||||
|
@ -3875,7 +3872,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (Pack.Type)
|
switch (Pack.Type)
|
||||||
{
|
{
|
||||||
#region Scene/Avatar
|
#region Scene/Avatar
|
||||||
|
@ -5427,10 +5424,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PacketType.ParcelReturnObjects:
|
case PacketType.ParcelReturnObjects:
|
||||||
|
|
||||||
|
|
||||||
ParcelReturnObjectsPacket parcelReturnObjects = (ParcelReturnObjectsPacket)Pack;
|
ParcelReturnObjectsPacket parcelReturnObjects = (ParcelReturnObjectsPacket)Pack;
|
||||||
|
|
||||||
LLUUID[] puserselectedOwnerIDs = new LLUUID[parcelReturnObjects.OwnerIDs.Length];
|
LLUUID[] puserselectedOwnerIDs = new LLUUID[parcelReturnObjects.OwnerIDs.Length];
|
||||||
for (int parceliterator = 0; parceliterator < parcelReturnObjects.OwnerIDs.Length; parceliterator++)
|
for (int parceliterator = 0; parceliterator < parcelReturnObjects.OwnerIDs.Length; parceliterator++)
|
||||||
puserselectedOwnerIDs[parceliterator] = parcelReturnObjects.OwnerIDs[parceliterator].OwnerID;
|
puserselectedOwnerIDs[parceliterator] = parcelReturnObjects.OwnerIDs[parceliterator].OwnerID;
|
||||||
|
@ -5444,10 +5441,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (handlerParcelReturnObjectsRequest != null)
|
if (handlerParcelReturnObjectsRequest != null)
|
||||||
{
|
{
|
||||||
handlerParcelReturnObjectsRequest(parcelReturnObjects.ParcelData.LocalID,parcelReturnObjects.ParcelData.ReturnType,puserselectedOwnerIDs,puserselectedTaskIDs, this);
|
handlerParcelReturnObjectsRequest(parcelReturnObjects.ParcelData.LocalID,parcelReturnObjects.ParcelData.ReturnType,puserselectedOwnerIDs,puserselectedTaskIDs, this);
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Estate Packets
|
#region Estate Packets
|
||||||
|
@ -5666,7 +5663,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
case PacketType.LandStatRequest:
|
case PacketType.LandStatRequest:
|
||||||
LandStatRequestPacket lsrp = (LandStatRequestPacket)Pack;
|
LandStatRequestPacket lsrp = (LandStatRequestPacket)Pack;
|
||||||
|
|
||||||
handlerLandStatRequest = OnLandStatRequest;
|
handlerLandStatRequest = OnLandStatRequest;
|
||||||
if (handlerLandStatRequest != null)
|
if (handlerLandStatRequest != null)
|
||||||
{
|
{
|
||||||
|
@ -5678,7 +5675,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//lsrp.RequestData.ReportType; // 1 = colliders, 0 = scripts
|
//lsrp.RequestData.ReportType; // 1 = colliders, 0 = scripts
|
||||||
//lsrp.RequestData.RequestFlags;
|
//lsrp.RequestData.RequestFlags;
|
||||||
//lsrp.RequestData.Filter;
|
//lsrp.RequestData.Filter;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.RequestRegionInfo:
|
case PacketType.RequestRegionInfo:
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
public class LLPacketQueue : IPullStatsProvider
|
public class LLPacketQueue : IPullStatsProvider
|
||||||
{
|
{
|
||||||
private static readonly log4net.ILog m_log
|
private static readonly log4net.ILog m_log
|
||||||
= log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
= log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private bool m_enabled = true;
|
private bool m_enabled = true;
|
||||||
|
@ -424,7 +424,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_log.Warn("[PACKET QUEUE]: SetThrottleFromClient unexpectedly received a throttle byte array containing no elements!");
|
m_log.Warn("[PACKET QUEUE]: SetThrottleFromClient unexpectedly received a throttle byte array containing no elements!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tResend = -1;
|
int tResend = -1;
|
||||||
int tLand = -1;
|
int tLand = -1;
|
||||||
int tWind = -1;
|
int tWind = -1;
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
|
|
||||||
//Register CAPS handler event
|
//Register CAPS handler event
|
||||||
m_scene.EventManager.OnRegisterCaps += OnRegisterCaps;
|
m_scene.EventManager.OnRegisterCaps += OnRegisterCaps;
|
||||||
|
|
||||||
//harbl
|
//harbl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
new RestStreamHandler("POST", capsBase + m_discoveryPath, OnDiscoveryAttempt));
|
new RestStreamHandler("POST", capsBase + m_discoveryPath, OnDiscoveryAttempt));
|
||||||
}
|
}
|
||||||
|
|
||||||
public string OnDiscoveryAttempt(string request, string path, string param,
|
public string OnDiscoveryAttempt(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
//Very static for now, flexible enough to add new formats
|
//Very static for now, flexible enough to add new formats
|
||||||
|
@ -82,7 +82,7 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
LLSDDiscoveryDataURL llsd_dataurl = new LLSDDiscoveryDataURL();
|
LLSDDiscoveryDataURL llsd_dataurl = new LLSDDiscoveryDataURL();
|
||||||
llsd_dataurl.snapshot_format = "os-datasnapshot-v1";
|
llsd_dataurl.snapshot_format = "os-datasnapshot-v1";
|
||||||
llsd_dataurl.snapshot_url = "http://" + m_externalData.m_hostname + ":" + m_externalData.m_listener_port + "/?method=collector";
|
llsd_dataurl.snapshot_url = "http://" + m_externalData.m_hostname + ":" + m_externalData.m_listener_port + "/?method=collector";
|
||||||
|
|
||||||
llsd_response.snapshot_resources.Array.Add(llsd_dataurl);
|
llsd_response.snapshot_resources.Array.Add(llsd_dataurl);
|
||||||
|
|
||||||
string response = LLSDHelpers.SerialiseLLSDReply(llsd_response);
|
string response = LLSDHelpers.SerialiseLLSDReply(llsd_response);
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
{
|
{
|
||||||
public class ChatModule : IRegionModule, ISimChat
|
public class ChatModule : IRegionModule, ISimChat
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private const int DEBUG_CHANNEL = 2147483647;
|
private const int DEBUG_CHANNEL = 2147483647;
|
||||||
|
@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
|
|
||||||
// Filled in since it's easier than rewriting right now.
|
// Filled in since it's easier than rewriting right now.
|
||||||
LLVector3 fromPos = e.Position;
|
LLVector3 fromPos = e.Position;
|
||||||
LLVector3 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
LLVector3 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||||
scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
||||||
|
|
||||||
string fromName = e.From;
|
string fromName = e.From;
|
||||||
|
@ -130,7 +130,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
if (avatar != null)
|
if (avatar != null)
|
||||||
{
|
{
|
||||||
fromPos = avatar.AbsolutePosition;
|
fromPos = avatar.AbsolutePosition;
|
||||||
regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||||
scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
||||||
fromName = avatar.Firstname + " " + avatar.Lastname;
|
fromName = avatar.Firstname + " " + avatar.Lastname;
|
||||||
fromAgentID = e.Sender.AgentId;
|
fromAgentID = e.Sender.AgentId;
|
||||||
|
@ -151,13 +151,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
if (e.Channel == DEBUG_CHANNEL)
|
if (e.Channel == DEBUG_CHANNEL)
|
||||||
{
|
{
|
||||||
TrySendChatMessage(presence, fromPos, regionPos,
|
TrySendChatMessage(presence, fromPos, regionPos,
|
||||||
fromAgentID, fromName, e.Type,
|
fromAgentID, fromName, e.Type,
|
||||||
message, ChatSourceType.Object);
|
message, ChatSourceType.Object);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TrySendChatMessage(presence, fromPos, regionPos,
|
TrySendChatMessage(presence, fromPos, regionPos,
|
||||||
fromAgentID, fromName, e.Type,
|
fromAgentID, fromName, e.Type,
|
||||||
message, ChatSourceType.Agent);
|
message, ChatSourceType.Agent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -180,7 +180,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TrySendChatMessage(ScenePresence presence, LLVector3 fromPos, LLVector3 regionPos,
|
private void TrySendChatMessage(ScenePresence presence, LLVector3 fromPos, LLVector3 regionPos,
|
||||||
LLUUID fromAgentID, string fromName, ChatTypeEnum type,
|
LLUUID fromAgentID, string fromName, ChatTypeEnum type,
|
||||||
string message, ChatSourceType src)
|
string message, ChatSourceType src)
|
||||||
{
|
{
|
||||||
if (!presence.IsChildAgent)
|
if (!presence.IsChildAgent)
|
||||||
|
@ -188,7 +188,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
LLVector3 fromRegionPos = fromPos + regionPos;
|
LLVector3 fromRegionPos = fromPos + regionPos;
|
||||||
LLVector3 toRegionPos = presence.AbsolutePosition + regionPos;
|
LLVector3 toRegionPos = presence.AbsolutePosition + regionPos;
|
||||||
int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos));
|
int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos));
|
||||||
|
|
||||||
if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance ||
|
if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance ||
|
||||||
type == ChatTypeEnum.Say && dis > m_saydistance ||
|
type == ChatTypeEnum.Say && dis > m_saydistance ||
|
||||||
type == ChatTypeEnum.Shout && dis > m_shoutdistance)
|
type == ChatTypeEnum.Shout && dis > m_shoutdistance)
|
||||||
|
@ -197,7 +197,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: should change so the message is sent through the avatar rather than direct to the ClientView
|
// TODO: should change so the message is sent through the avatar rather than direct to the ClientView
|
||||||
presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName,
|
presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName,
|
||||||
fromAgentID,(byte)src,(byte)ChatAudibleLevel.Fully);
|
fromAgentID,(byte)src,(byte)ChatAudibleLevel.Fully);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
{
|
{
|
||||||
public class IRCBridgeModule : IRegionModule, ISimChat
|
public class IRCBridgeModule : IRegionModule, ISimChat
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private const int DEBUG_CHANNEL = 2147483647;
|
private const int DEBUG_CHANNEL = 2147483647;
|
||||||
|
@ -94,7 +94,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
m_irc_connector.Name = "IRCConnectorThread";
|
m_irc_connector.Name = "IRCConnectorThread";
|
||||||
m_irc_connector.IsBackground = true;
|
m_irc_connector.IsBackground = true;
|
||||||
}
|
}
|
||||||
m_log.InfoFormat("[IRC] initialized for {0}, nick: {1} ", scene.RegionInfo.RegionName,
|
m_log.InfoFormat("[IRC] initialized for {0}, nick: {1} ", scene.RegionInfo.RegionName,
|
||||||
m_defaultzone);
|
m_defaultzone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
if ((m_irc.Enabled) && (m_irc.Connected))
|
if ((m_irc.Enabled) && (m_irc.Connected))
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[IRC] {0} logging on", clientName);
|
m_log.DebugFormat("[IRC] {0} logging on", clientName);
|
||||||
m_irc.PrivMsg(m_irc.Nick, "Sim",
|
m_irc.PrivMsg(m_irc.Nick, "Sim",
|
||||||
String.Format("notices {0} logging on", clientName));
|
String.Format("notices {0} logging on", clientName));
|
||||||
}
|
}
|
||||||
m_last_new_user = clientName;
|
m_last_new_user = clientName;
|
||||||
|
@ -288,7 +288,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
m_log.InfoFormat("[IRC]: {0} logging out", clientName);
|
m_log.InfoFormat("[IRC]: {0} logging out", clientName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_last_new_user == clientName)
|
if (m_last_new_user == clientName)
|
||||||
m_last_new_user = null;
|
m_last_new_user = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -588,7 +588,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
if (!avatar.IsChildAgent)
|
if (!avatar.IsChildAgent)
|
||||||
{
|
{
|
||||||
avatar.ControllingClient.SendChatMessage(
|
avatar.ControllingClient.SendChatMessage(
|
||||||
Helpers.StringToField(data["msg"]),
|
Helpers.StringToField(data["msg"]),
|
||||||
1, // 255,
|
1, // 255,
|
||||||
pos, data["nick"],
|
pos, data["nick"],
|
||||||
LLUUID.Zero,(byte)ChatSourceType.Agent,(byte)ChatAudibleLevel.Fully);
|
LLUUID.Zero,(byte)ChatSourceType.Agent,(byte)ChatAudibleLevel.Fully);
|
||||||
|
@ -634,9 +634,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
if (!avatar.IsChildAgent)
|
if (!avatar.IsChildAgent)
|
||||||
{
|
{
|
||||||
avatar.ControllingClient.SendChatMessage(
|
avatar.ControllingClient.SendChatMessage(
|
||||||
Helpers.StringToField(String.Format(format, args)),
|
Helpers.StringToField(String.Format(format, args)),
|
||||||
1, //255,
|
1, //255,
|
||||||
pos, sender, LLUUID.Zero,
|
pos, sender, LLUUID.Zero,
|
||||||
(byte)ChatSourceType.Object,
|
(byte)ChatSourceType.Object,
|
||||||
(byte)ChatAudibleLevel.Fully);
|
(byte)ChatAudibleLevel.Fully);
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
|
||||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||||
caps.RegisterHandler("ParcelVoiceInfoRequest",
|
caps.RegisterHandler("ParcelVoiceInfoRequest",
|
||||||
new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath,
|
new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath,
|
||||||
delegate(string request, string path, string param,
|
delegate(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
return ParcelVoiceInfoRequest(request, path, param,
|
return ParcelVoiceInfoRequest(request, path, param,
|
||||||
|
@ -139,7 +139,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
|
||||||
}));
|
}));
|
||||||
caps.RegisterHandler("ProvisionVoiceAccountRequest",
|
caps.RegisterHandler("ProvisionVoiceAccountRequest",
|
||||||
new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath,
|
new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath,
|
||||||
delegate(string request, string path, string param,
|
delegate(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
return ProvisionVoiceAccountRequest(request, path, param,
|
return ProvisionVoiceAccountRequest(request, path, param,
|
||||||
|
|
|
@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
|
||||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||||
caps.RegisterHandler("ParcelVoiceInfoRequest",
|
caps.RegisterHandler("ParcelVoiceInfoRequest",
|
||||||
new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath,
|
new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath,
|
||||||
delegate(string request, string path, string param,
|
delegate(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
return ParcelVoiceInfoRequest(request, path, param,
|
return ParcelVoiceInfoRequest(request, path, param,
|
||||||
|
@ -112,7 +112,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
|
||||||
}));
|
}));
|
||||||
caps.RegisterHandler("ProvisionVoiceAccountRequest",
|
caps.RegisterHandler("ProvisionVoiceAccountRequest",
|
||||||
new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath,
|
new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath,
|
||||||
delegate(string request, string path, string param,
|
delegate(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
return ProvisionVoiceAccountRequest(request, path, param,
|
return ProvisionVoiceAccountRequest(request, path, param,
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
/// This module loads and saves OpenSimulator archives
|
/// This module loads and saves OpenSimulator archives
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ArchiverModule : IRegionModule, IRegionArchiver
|
public class ArchiverModule : IRegionModule, IRegionArchiver
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,51 +47,51 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="scene"></param>
|
/// <param name="scene"></param>
|
||||||
/// <param name="source"></param>
|
/// <param name="source"></param>
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
|
||||||
public string Name { get { return "ArchiverModule"; } }
|
public string Name { get { return "ArchiverModule"; } }
|
||||||
|
|
||||||
public bool IsSharedModule { get { return false; } }
|
public bool IsSharedModule { get { return false; } }
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(Scene scene, IConfigSource source)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
m_scene.RegisterModuleInterface<IRegionArchiver>(this);
|
m_scene.RegisterModuleInterface<IRegionArchiver>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ArchiveRegion(string savePath)
|
public void ArchiveRegion(string savePath)
|
||||||
{
|
{
|
||||||
m_log.Warn("[ARCHIVER]: Archive region not yet implemented");
|
m_log.Warn("[ARCHIVER]: Archive region not yet implemented");
|
||||||
|
|
||||||
List<EntityBase> entities = m_scene.GetEntities();
|
List<EntityBase> entities = m_scene.GetEntities();
|
||||||
|
|
||||||
foreach (EntityBase entity in entities)
|
foreach (EntityBase entity in entities)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string serEntities = SerializeObjects(entities);
|
string serEntities = SerializeObjects(entities);
|
||||||
|
|
||||||
if (serEntities != null && serEntities.Length > 0)
|
if (serEntities != null && serEntities.Length > 0)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count);
|
m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DearchiveRegion(string loadPath)
|
public void DearchiveRegion(string loadPath)
|
||||||
{
|
{
|
||||||
m_log.Warn("[ARCHIVER]: Dearchive region not yet implemented");
|
m_log.Warn("[ARCHIVER]: Dearchive region not yet implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get an xml representation of the given scene objects.
|
/// Get an xml representation of the given scene objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -115,8 +115,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
serialization += serObject;
|
serialization += serObject;
|
||||||
|
|
||||||
serialization += "</scene>";
|
serialization += "</scene>";
|
||||||
|
|
||||||
return serialization;
|
return serialization;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -28,7 +28,7 @@
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules.World.Archiver
|
namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface to region archive functionality
|
/// Interface to region archive functionality
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="savePath"></param>
|
/// <param name="savePath"></param>
|
||||||
void ArchiveRegion(string savePath);
|
void ArchiveRegion(string savePath);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dearchive the given region archive into the scene
|
/// Dearchive the given region archive into the scene
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -731,7 +731,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
if (obj.OwnerID == owners[i])
|
if (obj.OwnerID == owners[i])
|
||||||
objlist.Add(obj);
|
objlist.Add(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (InvalidOperationException)
|
catch (InvalidOperationException)
|
||||||
{
|
{
|
||||||
m_log.Info("[PARCEL]: Unable to figure out all the objects owned by " + owners[i].ToString() + " arr.");
|
m_log.Info("[PARCEL]: Unable to figure out all the objects owned by " + owners[i].ToString() + " arr.");
|
||||||
|
@ -751,7 +751,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
landData.ownerPrims = 0;
|
landData.ownerPrims = 0;
|
||||||
landData.otherPrims = 0;
|
landData.otherPrims = 0;
|
||||||
landData.selectedPrims = 0;
|
landData.selectedPrims = 0;
|
||||||
|
|
||||||
|
|
||||||
lock (primsOverMe)
|
lock (primsOverMe)
|
||||||
primsOverMe.Clear();
|
primsOverMe.Clear();
|
||||||
|
@ -759,7 +759,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
|
|
||||||
public void addPrimToCount(SceneObjectGroup obj)
|
public void addPrimToCount(SceneObjectGroup obj)
|
||||||
{
|
{
|
||||||
|
|
||||||
LLUUID prim_owner = obj.OwnerID;
|
LLUUID prim_owner = obj.OwnerID;
|
||||||
int prim_count = obj.PrimCount;
|
int prim_count = obj.PrimCount;
|
||||||
|
|
||||||
|
|
|
@ -1448,12 +1448,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
Entities.Add(copy.UUID, copy);
|
Entities.Add(copy.UUID, copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since we copy from a source group that is in selected
|
// Since we copy from a source group that is in selected
|
||||||
// state, but the copy is shown deselected in the viewer,
|
// state, but the copy is shown deselected in the viewer,
|
||||||
// We need to clear the selection flag here, else that
|
// We need to clear the selection flag here, else that
|
||||||
// prim never gets persisted at all. The client doesn't
|
// prim never gets persisted at all. The client doesn't
|
||||||
// think it's selected, so it will never send a deselect...
|
// think it's selected, so it will never send a deselect...
|
||||||
copy.IsSelected=false;
|
copy.IsSelected = false;
|
||||||
|
|
||||||
m_numPrim++;
|
m_numPrim++;
|
||||||
|
|
||||||
|
|
|
@ -1078,7 +1078,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when an object is removed from the environment into inventory.
|
/// Called when an object is removed from the environment into inventory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1087,7 +1087,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public virtual void DeRezObject(Packet packet, IClientAPI remoteClient)
|
public virtual void DeRezObject(Packet packet, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) packet;
|
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) packet;
|
||||||
|
|
||||||
LLUUID folderID = LLUUID.Zero;
|
LLUUID folderID = LLUUID.Zero;
|
||||||
|
|
||||||
foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData)
|
foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData)
|
||||||
|
@ -1128,7 +1128,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
else if (DeRezPacket.AgentBlock.Destination == 6) //Delete
|
else if (DeRezPacket.AgentBlock.Destination == 6) //Delete
|
||||||
{
|
{
|
||||||
permissionToTake = ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId);
|
permissionToTake = ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId);
|
||||||
permissionToDelete = ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId);
|
permissionToDelete = ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId);
|
||||||
}
|
}
|
||||||
else if (DeRezPacket.AgentBlock.Destination == 9) //Return
|
else if (DeRezPacket.AgentBlock.Destination == 9) //Return
|
||||||
|
@ -1251,7 +1251,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
DeleteSceneObject(objectGroup);
|
DeleteSceneObject(objectGroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateKnownAsset(IClientAPI remoteClient, SceneObjectGroup grp, LLUUID assetID, LLUUID agentID)
|
public void updateKnownAsset(IClientAPI remoteClient, SceneObjectGroup grp, LLUUID assetID, LLUUID agentID)
|
||||||
|
@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
group.ResetIDs();
|
group.ResetIDs();
|
||||||
|
|
||||||
AddSceneObject(group);
|
AddSceneObject(group);
|
||||||
|
|
||||||
// if attachment we set it's asset id so object updates can reflect that
|
// if attachment we set it's asset id so object updates can reflect that
|
||||||
|
@ -1583,7 +1583,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1606,7 +1606,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
group.ResetIDs();
|
group.ResetIDs();
|
||||||
|
|
||||||
AddSceneObject(group);
|
AddSceneObject(group);
|
||||||
|
|
||||||
// Set the startup parameter for on_rez event and llGetStartParameter() function
|
// Set the startup parameter for on_rez event and llGetStartParameter() function
|
||||||
|
@ -1674,7 +1674,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (returnobjects.Length <= 0)
|
if (returnobjects.Length <= 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// for the moment we're going to store them individually.. however, in the future, the rezObject
|
// for the moment we're going to store them individually.. however, in the future, the rezObject
|
||||||
// will be able to have more items.
|
// will be able to have more items.
|
||||||
|
|
||||||
//string returnstring = "";
|
//string returnstring = "";
|
||||||
|
@ -1684,9 +1684,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// returnstring += grp.ToXmlString2();
|
// returnstring += grp.ToXmlString2();
|
||||||
//}
|
//}
|
||||||
//returnstring += "</scene>\n";
|
//returnstring += "</scene>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool permissionToDelete = false;
|
bool permissionToDelete = false;
|
||||||
|
|
||||||
|
@ -1697,7 +1697,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (userInfo == null)
|
if (userInfo == null)
|
||||||
{
|
{
|
||||||
CommsManager.UserProfileCacheService.AddNewUser(returnobjects[i].OwnerID);
|
CommsManager.UserProfileCacheService.AddNewUser(returnobjects[i].OwnerID);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
{
|
{
|
||||||
|
@ -1807,7 +1807,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
returningavatar.ControllingClient.SendAlertMessage(message);
|
returningavatar.ControllingClient.SendAlertMessage(message);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
private int m_incrementsof15seconds = 0;
|
private int m_incrementsof15seconds = 0;
|
||||||
private volatile bool m_backingup = false;
|
private volatile bool m_backingup = false;
|
||||||
|
|
||||||
protected string m_simulatorVersion = "unknown";
|
protected string m_simulatorVersion = "unknown";
|
||||||
|
|
||||||
protected ModuleLoader m_moduleLoader;
|
protected ModuleLoader m_moduleLoader;
|
||||||
protected StorageManager m_storageManager;
|
protected StorageManager m_storageManager;
|
||||||
|
@ -218,7 +218,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public Scene(RegionInfo regInfo, AgentCircuitManager authen,
|
public Scene(RegionInfo regInfo, AgentCircuitManager authen,
|
||||||
CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
|
CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
|
||||||
AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer,
|
AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer,
|
||||||
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
|
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
|
||||||
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
|
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
|
||||||
{
|
{
|
||||||
m_config = config;
|
m_config = config;
|
||||||
|
@ -287,7 +287,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_statsReporter.SetObjectCapacity(objectCapacity);
|
m_statsReporter.SetObjectCapacity(objectCapacity);
|
||||||
|
|
||||||
m_simulatorVersion = simulatorVersion
|
m_simulatorVersion = simulatorVersion
|
||||||
+ " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString()
|
+ " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString()
|
||||||
+ " PhysPrim:" + m_physicalPrim.ToString();
|
+ " PhysPrim:" + m_physicalPrim.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1322,7 +1322,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add an object into the scene that has come from storage
|
/// Add an object into the scene that has come from storage
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sceneObject"></param>
|
/// <param name="sceneObject"></param>
|
||||||
public void AddSceneObjectFromStorage(SceneObjectGroup sceneObject)
|
public void AddSceneObjectFromStorage(SceneObjectGroup sceneObject)
|
||||||
{
|
{
|
||||||
m_innerScene.AddSceneObjectFromStorage(sceneObject);
|
m_innerScene.AddSceneObjectFromStorage(sceneObject);
|
||||||
|
@ -1335,7 +1335,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public void AddSceneObject(SceneObjectGroup sceneObject)
|
public void AddSceneObject(SceneObjectGroup sceneObject)
|
||||||
{
|
{
|
||||||
m_innerScene.AddSceneObject(sceneObject);
|
m_innerScene.AddSceneObject(sceneObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete this object from the scene.
|
/// Delete this object from the scene.
|
||||||
|
@ -1344,20 +1344,20 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public void DeleteSceneObject(SceneObjectGroup group)
|
public void DeleteSceneObject(SceneObjectGroup group)
|
||||||
{
|
{
|
||||||
SceneObjectPart rootPart = (group).GetChildPart(group.UUID);
|
SceneObjectPart rootPart = (group).GetChildPart(group.UUID);
|
||||||
|
|
||||||
if (rootPart.PhysActor != null)
|
if (rootPart.PhysActor != null)
|
||||||
{
|
{
|
||||||
PhysicsScene.RemovePrim(rootPart.PhysActor);
|
PhysicsScene.RemovePrim(rootPart.PhysActor);
|
||||||
rootPart.PhysActor = null;
|
rootPart.PhysActor = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UnlinkSceneObject(group.UUID))
|
if (UnlinkSceneObject(group.UUID))
|
||||||
{
|
{
|
||||||
EventManager.TriggerObjectBeingRemovedFromScene(group);
|
EventManager.TriggerObjectBeingRemovedFromScene(group);
|
||||||
EventManager.TriggerParcelPrimCountTainted();
|
EventManager.TriggerParcelPrimCountTainted();
|
||||||
}
|
}
|
||||||
|
|
||||||
group.DeleteGroup();
|
group.DeleteGroup();
|
||||||
group.DeleteParts();
|
group.DeleteParts();
|
||||||
|
|
||||||
// In case anybody else retains a reference to this group, signal deletion by changing the name
|
// In case anybody else retains a reference to this group, signal deletion by changing the name
|
||||||
|
@ -1367,8 +1367,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// conditions where a user deletes an entity while it is being stored. Really, the update
|
// conditions where a user deletes an entity while it is being stored. Really, the update
|
||||||
// code needs a redesign.
|
// code needs a redesign.
|
||||||
group.Name = null;
|
group.Name = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unlink the given object from the scene. Unlike delete, this just removes the record of the object - the
|
/// Unlink the given object from the scene. Unlike delete, this just removes the record of the object - the
|
||||||
/// object itself is not destroyed.
|
/// object itself is not destroyed.
|
||||||
|
@ -1376,14 +1376,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="uuid"></param>
|
/// <param name="uuid"></param>
|
||||||
/// <returns>true if the object was in the scene, false if it was not</returns>
|
/// <returns>true if the object was in the scene, false if it was not</returns>
|
||||||
public bool UnlinkSceneObject(LLUUID uuid)
|
public bool UnlinkSceneObject(LLUUID uuid)
|
||||||
{
|
{
|
||||||
if (m_innerScene.DeleteSceneObject(uuid))
|
if (m_innerScene.DeleteSceneObject(uuid))
|
||||||
{
|
{
|
||||||
m_storageManager.DataStore.RemoveObject(uuid, m_regInfo.RegionID);
|
m_storageManager.DataStore.RemoveObject(uuid, m_regInfo.RegionID);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1406,7 +1406,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
m_sceneXmlLoader.SavePrimsToXml2(fileName);
|
m_sceneXmlLoader.SavePrimsToXml2(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load a prim archive into the scene. This loads both prims and their assets.
|
/// Load a prim archive into the scene. This loads both prims and their assets.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1416,7 +1416,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
IRegionArchiver archiver = RequestModuleInterface<IRegionArchiver>();
|
IRegionArchiver archiver = RequestModuleInterface<IRegionArchiver>();
|
||||||
archiver.DearchiveRegion(filePath);
|
archiver.DearchiveRegion(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save the prims in the scene to an archive. This saves both prims and their assets.
|
/// Save the prims in the scene to an archive. This saves both prims and their assets.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1825,7 +1825,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child)
|
protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child)
|
||||||
{
|
{
|
||||||
|
|
||||||
AvatarAppearance appearance = null;
|
AvatarAppearance appearance = null;
|
||||||
GetAvatarAppearance(client, out appearance);
|
GetAvatarAppearance(client, out appearance);
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset);
|
CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save the prims in the current scene to an xml file in OpenSimulator's current 'xml2' format
|
/// Save the prims in the current scene to an xml file in OpenSimulator's current 'xml2' format
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -188,12 +188,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load an xml file of prims in OpenSimulator's current 'xml2' file format to the current scene
|
/// Load an xml file of prims in OpenSimulator's current 'xml2' file format to the current scene
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void LoadCurrentSceneFromXml2(string filename)
|
public void LoadCurrentSceneFromXml2(string filename)
|
||||||
{
|
{
|
||||||
CurrentOrFirstScene.LoadPrimsFromXml2(filename);
|
CurrentOrFirstScene.LoadPrimsFromXml2(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save the current scene to an OpenSimulator archive. This archive will eventually include the prim's assets
|
/// Save the current scene to an OpenSimulator archive. This archive will eventually include the prim's assets
|
||||||
/// as well as the details of the prims themselves.
|
/// as well as the details of the prims themselves.
|
||||||
|
@ -203,7 +203,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
CurrentOrFirstScene.SavePrimsToArchive(filename);
|
CurrentOrFirstScene.SavePrimsToArchive(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load an OpenSim archive into the current scene. This will load both the shapes of the prims and upload
|
/// Load an OpenSim archive into the current scene. This will load both the shapes of the prims and upload
|
||||||
/// their assets to the asset service.
|
/// their assets to the asset service.
|
||||||
|
|
|
@ -271,11 +271,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
get { return m_rootPart.Text; }
|
get { return m_rootPart.Text; }
|
||||||
set { m_rootPart.Text = value; }
|
set { m_rootPart.Text = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual bool InSceneBackup
|
protected virtual bool InSceneBackup
|
||||||
{
|
{
|
||||||
get { return true; }
|
get { return true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSelected
|
public bool IsSelected
|
||||||
{
|
{
|
||||||
|
@ -523,11 +523,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE OBJECT GROUP]: Attaching object {0} to scene presistence sweep", UUID);
|
// "[SCENE OBJECT GROUP]: Attaching object {0} to scene presistence sweep", UUID);
|
||||||
|
|
||||||
m_scene.EventManager.OnBackup += ProcessBackup;
|
m_scene.EventManager.OnBackup += ProcessBackup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLVector3 GroupScale()
|
public LLVector3 GroupScale()
|
||||||
{
|
{
|
||||||
LLVector3 minScale = new LLVector3(Constants.RegionSize,Constants.RegionSize,Constants.RegionSize);
|
LLVector3 minScale = new LLVector3(Constants.RegionSize,Constants.RegionSize,Constants.RegionSize);
|
||||||
|
@ -1079,21 +1079,21 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="datastore"></param>
|
/// <param name="datastore"></param>
|
||||||
public void ProcessBackup(IRegionDataStore datastore)
|
public void ProcessBackup(IRegionDataStore datastore)
|
||||||
{
|
{
|
||||||
// don't backup while it's selected or you're asking for changes mid stream.
|
// don't backup while it's selected or you're asking for changes mid stream.
|
||||||
if (HasGroupChanged)
|
if (HasGroupChanged)
|
||||||
{
|
{
|
||||||
if ((!IsSelected) && (RootPart != null))
|
if ((!IsSelected) && (RootPart != null))
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[SCENE OBJECT GROUP]: Storing object {0}", UUID);
|
m_log.InfoFormat("[SCENE OBJECT GROUP]: Storing object {0}", UUID);
|
||||||
|
|
||||||
SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false);
|
SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false);
|
||||||
|
|
||||||
datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID);
|
datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID);
|
||||||
HasGroupChanged = false;
|
HasGroupChanged = false;
|
||||||
|
|
||||||
backup_group.ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); });
|
backup_group.ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); });
|
||||||
|
|
||||||
backup_group = null;
|
backup_group = null;
|
||||||
}
|
}
|
||||||
// else
|
// else
|
||||||
|
@ -1102,10 +1102,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// "[SCENE OBJECT GROUP]: Did not update persistence of object {0} since it was still selected by an avatar during the backup sweep", UUID);
|
// "[SCENE OBJECT GROUP]: Did not update persistence of object {0} since it was still selected by an avatar during the backup sweep", UUID);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Why is storing the inventory outside of HasGroupChanged?
|
// Why is storing the inventory outside of HasGroupChanged?
|
||||||
|
|
||||||
|
|
||||||
//ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); });
|
//ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1192,7 +1192,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
dupe.m_regionHandle = m_regionHandle;
|
dupe.m_regionHandle = m_regionHandle;
|
||||||
|
|
||||||
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
|
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
|
||||||
|
|
||||||
if (userExposed)
|
if (userExposed)
|
||||||
dupe.m_rootPart.TrimPermissions();
|
dupe.m_rootPart.TrimPermissions();
|
||||||
|
|
||||||
|
@ -1223,7 +1223,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
SetRootPartOwner(m_rootPart, cAgentID, cGroupID);
|
SetRootPartOwner(m_rootPart, cAgentID, cGroupID);
|
||||||
m_rootPart.ScheduleFullUpdate();
|
m_rootPart.ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values);
|
List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values);
|
||||||
foreach (SceneObjectPart part in partList)
|
foreach (SceneObjectPart part in partList)
|
||||||
|
@ -1231,7 +1231,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (part.UUID != m_rootPart.UUID)
|
if (part.UUID != m_rootPart.UUID)
|
||||||
{
|
{
|
||||||
dupe.CopyPart(part, OwnerID, GroupID, userExposed);
|
dupe.CopyPart(part, OwnerID, GroupID, userExposed);
|
||||||
|
|
||||||
if (userExposed)
|
if (userExposed)
|
||||||
{
|
{
|
||||||
SetPartOwner(part, cAgentID, cGroupID);
|
SetPartOwner(part, cAgentID, cGroupID);
|
||||||
|
|
|
@ -1403,10 +1403,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="remoteAvatar"></param>
|
/// <param name="remoteAvatar"></param>
|
||||||
public void SendFullUpdateToOtherClient(ScenePresence remoteAvatar)
|
public void SendFullUpdateToOtherClient(ScenePresence remoteAvatar)
|
||||||
{
|
{
|
||||||
if(remoteAvatar == null)
|
if (remoteAvatar == null || remoteAvatar.ControllingClient == null)
|
||||||
return;
|
|
||||||
IClientAPI rc=remoteAvatar.ControllingClient;
|
|
||||||
if(rc == null)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,
|
remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,
|
||||||
|
|
|
@ -51,10 +51,10 @@ namespace OpenSim.Region.Modules.AvatarFactory
|
||||||
public bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance)
|
public bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance)
|
||||||
{
|
{
|
||||||
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(avatarId);
|
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(avatarId);
|
||||||
if ((profile != null) && (profile.RootFolder != null))
|
if ((profile != null) && (profile.RootFolder != null))
|
||||||
{
|
{
|
||||||
appearance = m_scene.CommsManager.UserService.GetUserAppearance(avatarId);
|
appearance = m_scene.CommsManager.UserService.GetUserAppearance(avatarId);
|
||||||
if (appearance != null)
|
if (appearance != null)
|
||||||
{
|
{
|
||||||
SetAppearanceAssets(profile, ref appearance);
|
SetAppearanceAssets(profile, ref appearance);
|
||||||
m_log.InfoFormat("[APPEARANCE] found : {0}", appearance.ToString());
|
m_log.InfoFormat("[APPEARANCE] found : {0}", appearance.ToString());
|
||||||
|
@ -182,9 +182,9 @@ namespace OpenSim.Region.Modules.AvatarFactory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SetAppearanceAssets(profile, ref avatAppearance);
|
SetAppearanceAssets(profile, ref avatAppearance);
|
||||||
|
|
||||||
m_scene.CommsManager.UserService.UpdateUserAppearance(clientView.AgentId, avatAppearance);
|
m_scene.CommsManager.UserService.UpdateUserAppearance(clientView.AgentId, avatAppearance);
|
||||||
avatar.Appearance = avatAppearance;
|
avatar.Appearance = avatAppearance;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -200,7 +200,7 @@ namespace OpenSim.Region.Modules.AvatarFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateDatabase(LLUUID user, AvatarAppearance appearance)
|
public void UpdateDatabase(LLUUID user, AvatarAppearance appearance)
|
||||||
{
|
{
|
||||||
m_scene.CommsManager.UserService.UpdateUserAppearance(user, appearance);
|
m_scene.CommsManager.UserService.UpdateUserAppearance(user, appearance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3298,8 +3298,11 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
result.Add(src.Substring(start,length).Trim());
|
result.Add(src.Substring(start,length).Trim());
|
||||||
start += length+1;
|
start += length+1;
|
||||||
length = 0;
|
length = 0;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
length++;
|
length++;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
length++;
|
length++;
|
||||||
|
@ -5301,7 +5304,8 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
{
|
{
|
||||||
// not present at all
|
// not present at all
|
||||||
active[j] = false;
|
active[j] = false;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// present and correct
|
// present and correct
|
||||||
if (offset[j] < offset[best])
|
if (offset[j] < offset[best])
|
||||||
|
@ -5329,10 +5333,11 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
|
|
||||||
tokens.Add(src.Substring(beginning,offset[best]-beginning));
|
tokens.Add(src.Substring(beginning,offset[best]-beginning));
|
||||||
|
|
||||||
if (best<seplen)
|
if (best < seplen)
|
||||||
{
|
{
|
||||||
beginning = offset[best]+((string)separray[best]).Length;
|
beginning = offset[best]+((string)separray[best]).Length;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
beginning = offset[best]+((string)spcarray[best-seplen]).Length;
|
beginning = offset[best]+((string)spcarray[best-seplen]).Length;
|
||||||
tokens.Add(spcarray[best-seplen]);
|
tokens.Add(spcarray[best-seplen]);
|
||||||
|
|
|
@ -80,11 +80,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||||
TaskInventoryItem taskInventoryItem = new TaskInventoryItem();
|
TaskInventoryItem taskInventoryItem = new TaskInventoryItem();
|
||||||
if(m_host.TaskInventory.TryGetValue(itemID,out taskInventoryItem))
|
if(m_host.TaskInventory.TryGetValue(itemID,out taskInventoryItem))
|
||||||
assetID = taskInventoryItem.AssetID;
|
assetID = taskInventoryItem.AssetID;
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Xantor 20080525 see if we already compiled this script this session, stop incessant recompiling on
|
// Xantor 20080525 see if we already compiled this script this session, stop incessant recompiling on
|
||||||
// scriptreset, spawning of objects with embedded scripts etc.
|
// scriptreset, spawning of objects with embedded scripts etc.
|
||||||
|
|
||||||
if (scriptList.TryGetValue(assetID, out CompiledScriptFile))
|
if (scriptList.TryGetValue(assetID, out CompiledScriptFile))
|
||||||
|
|
|
@ -100,7 +100,9 @@ namespace OpenSim.GUI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
InHistory = false;
|
InHistory = false;
|
||||||
HistoryPosition = -1;
|
HistoryPosition = -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue