Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into sasquatch-prebuil…
Browse files Browse the repository at this point in the history
…d-maint
  • Loading branch information
mdickson committed May 16, 2022
2 parents d2f8759 + bac9425 commit e66ca65
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -519,16 +519,23 @@ public void StartSendResponse(HttpResponse response)

public bool TrySendResponse(int bytesLimit)
{
if(m_currentResponse == null)
return false;
if (m_currentResponse.Sent)
if (m_currentResponse == null)
return false;
try
{
if (m_currentResponse.Sent)
return false;

if(!CanSend())
return false;
if(!CanSend())
return false;

LastActivityTimeMS = ContextTimeoutManager.EnvironmentTickCount();
return m_currentResponse.SendNextAsync(bytesLimit);
LastActivityTimeMS = ContextTimeoutManager.EnvironmentTickCount();
return m_currentResponse.SendNextAsync(bytesLimit);
}
catch
{
return false;
}
}

public void ContinueSendResponse()
Expand Down
18 changes: 8 additions & 10 deletions OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,10 @@ private void AddDefaultFeatures()
m_features["MaxAgentGroupsPremium"] = OSD.FromInteger(Constants.MaxAgentGroups);

// Extra information for viewers that want to use it
// TODO: Take these out of here into their respective modules, like map-server-url
OSDMap extrasMap;
if(m_features.ContainsKey("OpenSimExtras"))
if(m_features.TryGetValue("OpenSimExtras", out OSD oe))
{
extrasMap = (OSDMap)m_features["OpenSimExtras"];
extrasMap = oe as OSDMap;
}
else
extrasMap = new OSDMap();
Expand All @@ -180,8 +179,7 @@ private void AddDefaultFeatures()

if (m_ExportSupported)
extrasMap["ExportSupported"] = true;
if (extrasMap.Count > 0)
m_features["OpenSimExtras"] = extrasMap;
m_features["OpenSimExtras"] = extrasMap;
}
}

Expand Down Expand Up @@ -373,20 +371,20 @@ private void GetGridExtraFeatures(Scene scene)
case "destination-guide-url":
ginfo.DestinationGuideURL = val;
break;
/* keep this local to avoid issues with diferent modules
case "currency-base-uri":
ginfo.EconomyURL = val;
// keep this local to avoid issues with diferent modules
// ginfo.EconomyURL = val;
break;
*/
default:
extrasMap[key] = val;
if (key == "ExportSupported")
{
bool.TryParse(val, out m_ExportSupported);
extrasMap[key] = m_ExportSupported;
}
else
extrasMap[key] = val;
break;
}

}
m_features["OpenSimExtras"] = extrasMap;
}
Expand Down
18 changes: 14 additions & 4 deletions OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6950,8 +6950,13 @@ protected void CreateAvatarUpdateBlock(ScenePresence data, byte[] dest, ref int
Array.Clear(dest, pos, pbszeros); pos += pbszeros;

//NameValue
byte[] nv = Utils.StringToBytes("FirstName STRING RW SV " + data.Firstname + "\nLastName STRING RW SV " +
data.Lastname + "\nTitle STRING RW SV " + data.Grouptitle);
byte[] nv;
if (data.HideTitle)
nv = Utils.StringToBytes("FirstName STRING RW SV " + data.Firstname + "\nLastName STRING RW SV " +
data.Lastname + "\nTitle STRING RW SV ");
else
nv = Utils.StringToBytes("FirstName STRING RW SV " + data.Firstname + "\nLastName STRING RW SV " +
data.Lastname + "\nTitle STRING RW SV " + data.Grouptitle);
int len = nv.Length;
dest[pos++] = (byte)len;
dest[pos++] = (byte)(len >> 8);
Expand Down Expand Up @@ -7010,8 +7015,13 @@ protected void CreateAvatarUpdateBlock(ScenePresence data, LLUDPZeroEncoder zc)
zc.AddZeros(pbszeros);

//NameValue
byte[] nv = Utils.StringToBytes("FirstName STRING RW SV " + data.Firstname + "\nLastName STRING RW SV " +
data.Lastname + "\nTitle STRING RW SV " + data.Grouptitle);
byte[] nv;
if (data.HideTitle)
nv = Utils.StringToBytes("FirstName STRING RW SV " + data.Firstname + "\nLastName STRING RW SV " +
data.Lastname + "\nTitle STRING RW SV ");
else
nv = Utils.StringToBytes("FirstName STRING RW SV " + data.Firstname + "\nLastName STRING RW SV " +
data.Lastname + "\nTitle STRING RW SV " + data.Grouptitle);
int len = nv.Length;
zc.AddByte((byte)len);
zc.AddByte((byte)(len >> 8));
Expand Down
2 changes: 1 addition & 1 deletion OpenSim/Services/GridService/GridService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private void SetExtraServiceURLs(IConfigSource config)
if (!string.IsNullOrEmpty(configVal))
m_ExtraFeatures["GridStatusRSS"] = configVal;

m_ExtraFeatures["ExportSupported"] = gridConfig.GetBoolean("ExportSupported", true);
m_ExtraFeatures["ExportSupported"] = gridConfig.GetString("ExportSupported", "true");

string[] sections = new string[] { "Const, Startup", "Hypergrid", "GatekeeperService" };
string gatekeeperURIAlias = Util.GetConfigVarFromSections<string>(config, "GatekeeperURIAlias", sections, string.Empty);
Expand Down
Binary file modified bin/OpenMetaverse.Rendering.Meshmerizer.dll
Binary file not shown.
Binary file modified bin/OpenMetaverse.StructuredData.dll
Binary file not shown.
Binary file modified bin/OpenMetaverse.dll
Binary file not shown.
Binary file modified bin/OpenMetaverseTypes.dll
Binary file not shown.

0 comments on commit e66ca65

Please sign in to comment.