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; OSDMap urls = (OSDMap)tmpOSD;
foreach (KeyValuePair<String, OSD> kvp in urls) foreach (KeyValuePair<String, OSD> kvp in urls)
{ {
tmpOSD = kvp.Value; ServiceURLs[kvp.Key] = kvp.Value;
ServiceURLs[kvp.Key] = tmpOSD.AsString();
//System.Console.WriteLine("XXX " + kvp.Key + "=" + ServiceURLs[kvp.Key]); //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) public static WearableCacheItem[] BakedFromOSD(OSD pInput)
{ {
WearableCacheItem[] pcache = WearableCacheItem.GetDefaultCacheItem(); WearableCacheItem[] pcache = WearableCacheItem.GetDefaultCacheItem();
OSD tmpOSD;
if (pInput.Type == OSDType.Array) if (pInput.Type == OSDType.Array)
{ {
OSDArray itemarray = (OSDArray)pInput; OSDArray itemarray = (OSDArray)pInput;
foreach (OSDMap item in itemarray) foreach (OSDMap item in itemarray)
{ {
tmpOSD = item["textureindex"]; int idx = item["textureindex"].AsInteger();
int idx = tmpOSD.AsInteger();
if (idx < 0 || idx > pcache.Length) if (idx < 0 || idx > pcache.Length)
continue; continue;
tmpOSD = item["cacheid"]; pcache[idx].CacheId = item["cacheid"].AsUUID();
pcache[idx].CacheId = tmpOSD.AsUUID(); pcache[idx].TextureID = item["textureid"].AsUUID();
tmpOSD = item["textureid"];
pcache[idx].TextureID = tmpOSD.AsUUID();
/* /*
if (item.ContainsKey("assetdata")) if (item.ContainsKey("assetdata"))
{ {
@ -220,6 +216,4 @@ namespace OpenSim.Framework
return null; return null;
} }
} }
} }

View File

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

View File

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

View File

@ -1051,7 +1051,7 @@ namespace OpenSim.Services.LLLoginService
} }
aCircuit.ServiceURLs[keyName] = keyValue; 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)) if (!account.ServiceURLs.ContainsKey("GatekeeperURI") && !string.IsNullOrEmpty(m_GatekeeperURL))