and more changes on uuid gatherer and libomv

master
UbitUmarov 2020-05-31 14:21:50 +01:00
parent 41d9441512
commit e0c49c42e3
5 changed files with 9 additions and 9 deletions

View File

@ -908,10 +908,11 @@ namespace OpenSim.Region.Framework.Scenes
int indx = data.IndexOf((byte)'<'); int indx = data.IndexOf((byte)'<');
if (indx < 0) if (indx < 0)
return false; return false;
osUTF8 tmp = data.osUTF8SubString(0, indx); osUTF8 tmp = data.osUTF8SubString(0, indx);
tmp.SelfTrim();
data.osUTF8SubStringSelf(indx + 1); data.osUTF8SubStringSelf(indx + 1);
return UUID.TryParse(tmp.ToString(), out id);
return osUTF8.TryParseUUID(tmp, out id);
} }
if (h.StartsWith(uuidB)) if (h.StartsWith(uuidB))
@ -921,9 +922,11 @@ namespace OpenSim.Region.Framework.Scenes
int indx = data.IndexOf((byte)'<'); int indx = data.IndexOf((byte)'<');
if (indx < 0) if (indx < 0)
return false; return false;
osUTF8 tmp = data.osUTF8SubString(0, indx); osUTF8 tmp = data.osUTF8SubString(0, indx);
tmp.SelfTrim(); data.osUTF8SubStringSelf(indx + 1);
return UUID.TryParse(tmp.ToString(), out id);
return osUTF8.TryParseUUID(tmp, out id);
} }
return false; return false;
@ -1184,8 +1187,7 @@ namespace OpenSim.Region.Framework.Scenes
return; return;
if (!osdata.ReadLine(out id)) // uuid if (!osdata.ReadLine(out id)) // uuid
return; return;
id.SelfTrim(); if (osUTF8.TryParseUUID(id, out uid) && uid != UUID.Zero)
if (UUID.TryParse(id.ToString(), out uid) && uid != UUID.Zero)
GatheredUuids[uid] = type == 0 ? (sbyte)AssetType.Animation : (sbyte)AssetType.Sound; GatheredUuids[uid] = type == 0 ? (sbyte)AssetType.Animation : (sbyte)AssetType.Sound;
if (!osdata.SkipLine()) // flags if (!osdata.SkipLine()) // flags
return; return;
@ -1212,7 +1214,6 @@ namespace OpenSim.Region.Framework.Scenes
int next; int next;
while ((next = getxmlNode(ref data, out osUTF8 header)) > 0) while ((next = getxmlNode(ref data, out osUTF8 header)) > 0)
{ {
if (header.StartsWith((byte)'/')) if (header.StartsWith((byte)'/'))
continue; continue;
if (header.StartsWith(uuidB)) if (header.StartsWith(uuidB))
@ -1223,8 +1224,7 @@ namespace OpenSim.Region.Framework.Scenes
if(indx < 0) if(indx < 0)
continue; continue;
osUTF8 tmp = data.osUTF8SubString(0, indx); osUTF8 tmp = data.osUTF8SubString(0, indx);
tmp.SelfTrim(); if(osUTF8.TryParseUUID(tmp, out UUID id) && id != UUID.Zero)
if(UUID.TryParse(tmp.ToString(), out UUID id) && id != UUID.Zero)
GatheredUuids[id] = (sbyte)AssetType.Texture; GatheredUuids[id] = (sbyte)AssetType.Texture;
data.osUTF8SubStringSelf(indx + 1); data.osUTF8SubStringSelf(indx + 1);
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.