cosmetics

0.9.1.0-post-fixes
UbitUmarov 2019-08-02 04:28:34 +01:00
parent 04eb4744df
commit 482c51a42a
5 changed files with 22 additions and 46 deletions

View File

@ -374,8 +374,7 @@ namespace OpenSim.Framework
OSDMap urls = (OSDMap)tmpOSD;
foreach (KeyValuePair<String, OSD> kvp in urls)
{
tmpOSD = kvp.Value;
ServiceURLs[kvp.Key] = tmpOSD.AsString();
ServiceURLs[kvp.Key] = kvp.Value;
//System.Console.WriteLine("XXX " + kvp.Key + "=" + ServiceURLs[kvp.Key]);
}
}
@ -394,6 +393,5 @@ namespace OpenSim.Framework
}
}
}
}
}

View File

@ -161,20 +161,16 @@ namespace OpenSim.Framework
public static WearableCacheItem[] BakedFromOSD(OSD pInput)
{
WearableCacheItem[] pcache = WearableCacheItem.GetDefaultCacheItem();
OSD tmpOSD;
if (pInput.Type == OSDType.Array)
{
OSDArray itemarray = (OSDArray)pInput;
foreach (OSDMap item in itemarray)
{
tmpOSD = item["textureindex"];
int idx = tmpOSD.AsInteger();
int idx = item["textureindex"].AsInteger();
if (idx < 0 || idx > pcache.Length)
continue;
tmpOSD = item["cacheid"];
pcache[idx].CacheId = tmpOSD.AsUUID();
tmpOSD = item["textureid"];
pcache[idx].TextureID = tmpOSD.AsUUID();
pcache[idx].CacheId = item["cacheid"].AsUUID();
pcache[idx].TextureID = item["textureid"].AsUUID();
/*
if (item.ContainsKey("assetdata"))
{
@ -220,6 +216,4 @@ namespace OpenSim.Framework
return null;
}
}
}

View File

@ -267,24 +267,24 @@ namespace OpenSim.Region.OptionalModules.Materials
if (matsArr == null)
return partchanged;
OSD tmpOSD;
foreach (OSD elemOsd in matsArr)
{
if (elemOsd != null && elemOsd is OSDMap)
{
OSDMap matMap = elemOsd as OSDMap;
if (matMap.ContainsKey("ID") && matMap.ContainsKey("Material"))
OSD OSDID;
OSD OSDMaterial;
if (matMap.TryGetValue("ID", out OSDID) && matMap.TryGetValue("Material", out OSDMaterial) && OSDMaterial is OSDMap)
{
try
{
lock (materialslock)
{
tmpOSD = matMap["ID"];
UUID id = tmpOSD.AsUUID();
UUID id = OSDID.AsUUID();
if(m_Materials.ContainsKey(id))
continue;
OSDMap theMatMap = (OSDMap)matMap["Material"];
OSDMap theMatMap = (OSDMap)OSDMaterial;
FaceMaterial fmat = new FaceMaterial(theMatMap);
if(fmat == null ||
@ -560,8 +560,7 @@ namespace OpenSim.Region.OptionalModules.Materials
uint primLocalID = 0;
try
{
tmpOSD = matsMap["ID"];
primLocalID = tmpOSD.AsUInteger();
primLocalID = matsMap["ID"].AsUInteger();
}
catch (Exception e)
{

View File

@ -120,36 +120,26 @@ namespace OpenSim.Services.Connectors.Simulation
PackData(args, source, aCircuit, destination, flags);
OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000);
tmpOSD = result["success"];
bool success = tmpOSD.AsBoolean();
bool success = result["success"].AsBoolean();
if (success && result.TryGetValue("_Result", out tmpOSD) && tmpOSD is OSDMap)
{
OSDMap data = (OSDMap)tmpOSD;
tmpOSD = data["reason"];
reason = tmpOSD.AsString();
tmpOSD = data["success"];
success = tmpOSD.AsBoolean();
reason = data["reason"].AsString();
success = data["success"].AsBoolean();
return success;
}
// Try the old version, uncompressed
result = WebUtil.PostToService(uri, args, 30000, false);
tmpOSD = result["success"];
success = tmpOSD.AsBoolean();
success = result["success"].AsBoolean();
if (success)
{
if (result.TryGetValue("_Result", out tmpOSD) && tmpOSD is OSDMap)
{
OSDMap data = (OSDMap)tmpOSD;
tmpOSD = data["reason"];
reason = tmpOSD.AsString();
tmpOSD = data["success"];
success = tmpOSD.AsBoolean();
reason = data["reason"].AsString();
success = data["success"].AsBoolean();
m_log.WarnFormat(
"[REMOTE SIMULATION CONNECTOR]: Remote simulator {0} did not accept compressed transfer, suggest updating it.", destination.RegionName);
@ -327,8 +317,7 @@ namespace OpenSim.Services.Connectors.Simulation
{
OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 30000, false, false, true);
tmpOSD = result["success"];
bool success = tmpOSD.AsBoolean();
bool success = result["success"].AsBoolean();
bool has_Result = false;
if (result.TryGetValue("_Result", out tmpOSD))
@ -339,18 +328,14 @@ namespace OpenSim.Services.Connectors.Simulation
// FIXME: If there is a _Result map then it's the success key here that indicates the true success
// or failure, not the sibling result node.
//nte4.8 crap
tmpOSD = data["success"];
success = tmpOSD.AsBoolean();
tmpOSD = data["reason"];
reason = tmpOSD.AsString();
success = data["success"].AsBoolean();
reason = data["reason"].AsString();
// We will need to plumb this and start sing the outbound version as well
// TODO: lay the pipe for version plumbing
if (data.TryGetValue("negotiated_inbound_version", out tmpOSD) && tmpOSD != null)
{
ctx.InboundVersion = (float)tmpOSD.AsReal();
tmpOSD = data["negotiated_outbound_version"];
ctx.OutboundVersion = (float)tmpOSD.AsReal();
ctx.OutboundVersion = (float)data["negotiated_outbound_version"].AsReal();
}
else if (data.TryGetValue("version", out tmpOSD) && tmpOSD != null)
{

View File

@ -1051,7 +1051,7 @@ namespace OpenSim.Services.LLLoginService
}
aCircuit.ServiceURLs[keyName] = keyValue;
m_log.DebugFormat("[LLLOGIN SERVICE]: found new key {0} {1}", keyName, aCircuit.ServiceURLs[keyName]);
// m_log.DebugFormat("[LLLOGIN SERVICE]: found new key {0} {1}", keyName, aCircuit.ServiceURLs[keyName]);
}
if (!account.ServiceURLs.ContainsKey("GatekeeperURI") && !string.IsNullOrEmpty(m_GatekeeperURL))