mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
update libomv and apply necessary related changes
This commit is contained in:
@@ -1831,12 +1831,12 @@ namespace OpenSim.Data.PGSQL
|
||||
if (prim.VehicleParams != null)
|
||||
parameters.Add(_Database.CreateParameter("Vehicle", prim.VehicleParams.ToXml2()));
|
||||
else
|
||||
parameters.Add(_Database.CreateParameter("Vehicle", String.Empty));
|
||||
parameters.Add(_Database.CreateParameter("Vehicle", string.Empty));
|
||||
|
||||
if (prim.PhysicsInertia != null)
|
||||
parameters.Add(_Database.CreateParameter("PhysInertia", prim.PhysicsInertia.ToXml2()));
|
||||
else
|
||||
parameters.Add(_Database.CreateParameter("PhysInertia", String.Empty));
|
||||
parameters.Add(_Database.CreateParameter("PhysInertia", string.Empty));
|
||||
|
||||
if (prim.DynAttrs != null && prim.DynAttrs.CountNamespaces > 0)
|
||||
parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml()));
|
||||
|
||||
@@ -47,29 +47,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
// bool AddAgentHandler(string agent, IHttpAgentHandler handler);
|
||||
|
||||
/// <summary>
|
||||
/// Add a handler for an HTTP request.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This handler can actually be invoked either as
|
||||
///
|
||||
/// http://<hostname>:<port>/?method=<methodName>
|
||||
///
|
||||
/// or
|
||||
///
|
||||
/// http://<hostname>:<port><method>
|
||||
///
|
||||
/// if the method name starts with a slash. For example, AddHTTPHandler("/object/", ...) on a standalone region
|
||||
/// server will register a handler that can be invoked with either
|
||||
///
|
||||
/// http://localhost:9000/?method=/object/
|
||||
///
|
||||
/// or
|
||||
///
|
||||
/// http://localhost:9000/object/
|
||||
///
|
||||
/// In addition, the handler invoked by the HTTP server for any request is the one when best matches the request
|
||||
/// URI. So if a handler for "/myapp/" is registered and a request for "/myapp/page" is received, then
|
||||
/// the "/myapp/" handler is invoked if no "/myapp/page" handler exists.
|
||||
/// </remarks>
|
||||
/// <param name="methodName"></param>
|
||||
/// <param name="handler"></param>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using OpenSim.Framework.ServiceAuth;
|
||||
|
||||
|
||||
@@ -6267,10 +6267,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
zc.AddUUID(sop.LastOwnerID);
|
||||
|
||||
//name
|
||||
zc.AddShortString(sop.Name, 64);
|
||||
zc.AddShortLimitedUTF8(sop.osUTF8Name);
|
||||
|
||||
//Description
|
||||
zc.AddShortString(sop.Description, 128);
|
||||
zc.AddShortLimitedUTF8(sop.osUTF8Description);
|
||||
}
|
||||
|
||||
private void CreateObjectPropertiesBlock(SceneObjectPart sop, LLUDPZeroEncoder zc)
|
||||
@@ -6317,7 +6317,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
zc.AddShortLimitedUTF8(sop.osUTF8Name);
|
||||
|
||||
//Description
|
||||
zc.AddShortLimitedUTF8(sop.osUTF8description);
|
||||
zc.AddShortLimitedUTF8(sop.osUTF8Description);
|
||||
|
||||
// touch name
|
||||
zc.AddShortLimitedUTF8(sop.osUTF8TouchName);
|
||||
@@ -7333,11 +7333,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
}
|
||||
|
||||
//text
|
||||
if (part.Text == null || part.Text.Length == 0)
|
||||
osUTF8 osUTF8PartText = part.osUTF8Text;
|
||||
if (osUTF8PartText == null || osUTF8PartText.Length == 0)
|
||||
zc.AddZeros(5);
|
||||
else
|
||||
{
|
||||
zc.AddShortString(part.Text, 255);
|
||||
zc.AddShortLimitedUTF8(osUTF8PartText);
|
||||
|
||||
//textcolor
|
||||
byte[] tc = part.GetTextColor().GetBytes(false);
|
||||
@@ -7756,13 +7757,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
else
|
||||
BlockLengh += extraParamBytes.Length;
|
||||
|
||||
byte[] hoverText = null;
|
||||
byte[] hoverTextColor = null;
|
||||
if (part.Text != null && part.Text.Length > 0)
|
||||
osUTF8 osUTF8PartText = part.osUTF8Text;
|
||||
if (osUTF8PartText != null && osUTF8PartText.Length > 0)
|
||||
{
|
||||
cflags |= CompressedFlags.HasText;
|
||||
hoverText = Util.StringToBytes256(part.Text);
|
||||
BlockLengh += hoverText.Length;
|
||||
BlockLengh += osUTF8PartText.Length + 1;
|
||||
hoverTextColor = part.GetTextColor().GetBytes(false);
|
||||
BlockLengh += hoverTextColor.Length;
|
||||
hastext = true;
|
||||
@@ -7811,9 +7811,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
hasangvel = true;
|
||||
}
|
||||
|
||||
if (part.osUTFMediaUrl.Length > 0)
|
||||
osUTF8 osUTFMediaUrl = part.osUTFMediaUrl;
|
||||
if (osUTFMediaUrl != null && osUTFMediaUrl.Length > 0)
|
||||
{
|
||||
BlockLengh += part.osUTFMediaUrl.Length + 1;
|
||||
BlockLengh += osUTFMediaUrl.Length + 1;
|
||||
cflags |= CompressedFlags.MediaURL;
|
||||
hasmediaurl = true;
|
||||
}
|
||||
@@ -7893,12 +7894,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
}
|
||||
if (hastext)
|
||||
{
|
||||
zc.AddBytes(hoverText, hoverText.Length);
|
||||
zc.AddBytes(osUTF8PartText.GetArray(), osUTF8PartText.Length);
|
||||
zc.AddZeros(1);
|
||||
zc.AddBytes(hoverTextColor, hoverTextColor.Length);
|
||||
}
|
||||
if (hasmediaurl)
|
||||
{
|
||||
zc.AddBytes(part.osUTFMediaUrl.GetArray(), part.osUTFMediaUrl.Length);
|
||||
zc.AddBytes(osUTFMediaUrl.GetArray(), osUTFMediaUrl.Length);
|
||||
zc.AddZeros(1);
|
||||
}
|
||||
if (hasps)
|
||||
|
||||
@@ -352,11 +352,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
AddBytes(data, len);
|
||||
}
|
||||
|
||||
// maxlen <= 255 and includes null termination byte, maxchars == max len of utf16 source
|
||||
// maxlen <= 254 because null termination byte
|
||||
public unsafe void AddShortLimitedUTF8(osUTF8 str)
|
||||
{
|
||||
if(str == null)
|
||||
{
|
||||
AddZeros(1);
|
||||
return;
|
||||
}
|
||||
|
||||
int len = str.Length;
|
||||
if (str.Length == 0)
|
||||
if (len == 0)
|
||||
{
|
||||
AddZeros(1);
|
||||
return;
|
||||
|
||||
@@ -333,7 +333,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
|
||||
resp.PrimID = primId;
|
||||
|
||||
resp.FaceMedia = currentML;
|
||||
if (part.MediaUrl == null)
|
||||
if (string.IsNullOrEmpty(part.MediaUrl))
|
||||
resp.Version = "x-mv:0000000000/00000000-0000-0000-0000-000000000000";
|
||||
else
|
||||
resp.Version = part.MediaUrl;
|
||||
@@ -570,7 +570,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
|
||||
/// </param>
|
||||
protected void UpdateMediaUrl(SceneObjectPart part, UUID updateId)
|
||||
{
|
||||
if (null == part.MediaUrl)
|
||||
if (string.IsNullOrEmpty(part.MediaUrl))
|
||||
{
|
||||
// TODO: We can't set the last changer until we start tracking which cap we give to which agent id
|
||||
part.MediaUrl = "x-mv:0000000001/" + updateId;
|
||||
|
||||
@@ -61,8 +61,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public osUTF8 osUTF8Name;
|
||||
public virtual string Name
|
||||
{
|
||||
get { return osUTF8Name.ToString(); }
|
||||
set { osUTF8Name = new osUTF8(value); }
|
||||
get { return osUTF8Name == null ? string.Empty : osUTF8Name.ToString(); }
|
||||
set { osUTF8Name = value == null? null : new osUTF8(value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -350,11 +350,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
protected bool m_isSelected = false;
|
||||
|
||||
/// <summary>
|
||||
/// Stores media texture data
|
||||
/// </summary>
|
||||
protected string m_mediaUrl;
|
||||
|
||||
// TODO: Those have to be changed into persistent properties at some later point,
|
||||
// or sit-camera on vehicles will break on sim-crossing.
|
||||
private Vector3 m_cameraEyeOffset;
|
||||
@@ -627,18 +622,28 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
get
|
||||
{
|
||||
return osUTF8LargeName.ToString();
|
||||
return osUTF8LargeName == null ? string.Empty : osUTF8LargeName.ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
osUTF8LargeName = new osUTF8(value);
|
||||
osUTF8Name = new osUTF8(value, 63);
|
||||
if(ParentGroup != null)
|
||||
if(string.IsNullOrEmpty(value))
|
||||
{
|
||||
osUTF8LargeName = null;
|
||||
osUTF8Name = null;
|
||||
PhysicsActor pa = PhysActor;
|
||||
if (pa != null)
|
||||
pa.SOPName = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
osUTF8LargeName = new osUTF8(value);
|
||||
osUTF8Name = new osUTF8(value, 63);
|
||||
PhysicsActor pa = PhysActor;
|
||||
if (pa != null)
|
||||
pa.SOPName = value;
|
||||
}
|
||||
if (ParentGroup != null)
|
||||
ParentGroup.InvalidatePartsLinkMaps();
|
||||
|
||||
PhysicsActor pa = PhysActor;
|
||||
if (pa != null)
|
||||
pa.SOPName = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1042,11 +1047,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public osUTF8 osUTF8description;
|
||||
public osUTF8 osUTF8Description;
|
||||
public string Description
|
||||
{
|
||||
get {return osUTF8description.ToString(); }
|
||||
set { osUTF8description = new osUTF8(value, 127);}
|
||||
get {return osUTF8Description == null ? string.Empty : osUTF8Description.ToString(); }
|
||||
set { osUTF8Description = string.IsNullOrEmpty(value) ? null : new osUTF8(value, 127);}
|
||||
}
|
||||
|
||||
/// <value>
|
||||
@@ -1061,22 +1066,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public osUTF8 osUTF8Text;
|
||||
public string Text
|
||||
{
|
||||
get { return osUTF8Text.ToString(); }
|
||||
set { osUTF8Text = new osUTF8(value, 254); }
|
||||
get { return osUTF8Text == null ? string.Empty : osUTF8Text.ToString(); }
|
||||
set { osUTF8Text = string.IsNullOrEmpty(value) ? null : new osUTF8(value, 254); }
|
||||
}
|
||||
|
||||
public osUTF8 osUTF8SitName;
|
||||
public string SitName
|
||||
{
|
||||
get { return osUTF8SitName.ToString(); }
|
||||
set { osUTF8SitName = new osUTF8(value, 36); }
|
||||
get { return osUTF8SitName == null ? string.Empty : osUTF8SitName.ToString(); }
|
||||
set { osUTF8SitName = string.IsNullOrEmpty(value) ? null : new osUTF8(value, 36); }
|
||||
}
|
||||
|
||||
public osUTF8 osUTF8TouchName;
|
||||
public string TouchName
|
||||
{
|
||||
get { return osUTF8TouchName.ToString(); }
|
||||
set { osUTF8TouchName = new osUTF8(value, 36); }
|
||||
get { return osUTF8TouchName == null ? string.Empty : osUTF8TouchName.ToString(); }
|
||||
set { osUTF8TouchName = string.IsNullOrEmpty(value) ? null : new osUTF8(value, 36); }
|
||||
}
|
||||
|
||||
public int LinkNum
|
||||
@@ -1196,18 +1201,25 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
get
|
||||
{
|
||||
if(osUTFMediaUrl.Length == 0)
|
||||
return null;
|
||||
return osUTFMediaUrl.ToString();
|
||||
return osUTFMediaUrl == null ? string.Empty : osUTFMediaUrl.ToString();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
osUTF8 old = osUTFMediaUrl;
|
||||
osUTFMediaUrl = new osUTF8(value, 254);
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
osUTFMediaUrl = null;
|
||||
if (old != null && ParentGroup != null)
|
||||
ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
osUTFMediaUrl = new osUTF8(value, 254);
|
||||
|
||||
if (ParentGroup != null && !osUTFMediaUrl.Equals(old))
|
||||
ParentGroup.HasGroupChanged = true;
|
||||
if (ParentGroup != null && !osUTFMediaUrl.Equals(old))
|
||||
ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -828,7 +828,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if(parts[0].Length == 0)
|
||||
continue;
|
||||
parts[0].SelfTrim(wearableSeps);
|
||||
if (parts[0].ToString() == "parameters")
|
||||
if (parts[0].Equals(parametersB))
|
||||
{
|
||||
if (parts[1].Length == 0)
|
||||
return;
|
||||
@@ -841,7 +841,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (parts[0].ToString() == "textures")
|
||||
else if (parts[0].Equals(texturesB))
|
||||
{
|
||||
if(parts[1].Length == 0)
|
||||
return;
|
||||
@@ -960,18 +960,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
|
||||
// bad ugly
|
||||
private static osUTF8 UUIDB = new osUTF8("UUID");
|
||||
private static osUTF8 uuidB = new osUTF8("uuid");
|
||||
private static osUTF8 SOPAnimsB = new osUTF8("SOPAnims");
|
||||
private static osUTF8 CollisionSoundB = new osUTF8("CollisionSound");
|
||||
private static osUTF8 SoundIDB = new osUTF8("SoundID");
|
||||
private static osUTF8 SculptTextureB = new osUTF8("SculptTexture");
|
||||
private static osUTF8 ExtraParamsB = new osUTF8("ExtraParams");
|
||||
private static osUTF8 ParticleSystemB = new osUTF8("ParticleSystem");
|
||||
private static osUTF8 TextureEntryB = new osUTF8("TextureEntry");
|
||||
private static osUTF8 TaskInventoryB = new osUTF8("TaskInventory");
|
||||
private static osUTF8 endTaskInventoryB = new osUTF8("/TaskInventory");
|
||||
private static osUTF8 UUIDB = new osUTF8("UUID", true);
|
||||
private static osUTF8 uuidB = new osUTF8("uuid", true);
|
||||
private static osUTF8 SOPAnimsB = new osUTF8("SOPAnims", true);
|
||||
private static osUTF8 CollisionSoundB = new osUTF8("CollisionSound", true);
|
||||
private static osUTF8 SoundIDB = new osUTF8("SoundID", true);
|
||||
private static osUTF8 SculptTextureB = new osUTF8("SculptTexture", true);
|
||||
private static osUTF8 ExtraParamsB = new osUTF8("ExtraParams", true);
|
||||
private static osUTF8 ParticleSystemB = new osUTF8("ParticleSystem", true);
|
||||
private static osUTF8 TextureEntryB = new osUTF8("TextureEntry", true);
|
||||
private static osUTF8 TaskInventoryB = new osUTF8("TaskInventory", true);
|
||||
private static osUTF8 endTaskInventoryB = new osUTF8("/TaskInventory", true);
|
||||
private static osUTF8 AssetIDB = new osUTF8("AssetID");
|
||||
private static osUTF8 texturesB = new osUTF8("textures", true);
|
||||
private static osUTF8 parametersB = new osUTF8("parameters", true);
|
||||
|
||||
/// <summary>
|
||||
/// Get all the asset uuids associated with a given object. This includes both those directly associated with
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user