From 236906364071712a2ad0a65d128958abeddc4b1b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 6 Aug 2010 10:57:52 -0700 Subject: HACK ALERT! There's some underlying bug in the HTTP server that makes requests come up with Accept headers from previous requests. Until that gets fixed, this hack goes in. --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index ffa30d5..016ab73 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -319,6 +319,13 @@ namespace OpenSim.Framework.Servers.HttpServer OSHttpRequest req = new OSHttpRequest(context, request); OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context); HandleRequest(req, resp); + + // !!!HACK ALERT!!! + // There seems to be a bug in the underlying http code that makes subsequent requests + // come up with trash in Accept headers. Until that gets fixed, we're cleaning them up here. + if (request.AcceptTypes != null) + for (int i = 0; i < request.AcceptTypes.Length; i++) + request.AcceptTypes[i] = string.Empty; } // public void ConvertIHttpClientContextToOSHttp(object stateinfo) -- cgit v1.1 From 85d7d0583ea90c0044f823a665d2bf99abee6df8 Mon Sep 17 00:00:00 2001 From: BlueWall (James Hughes) Date: Tue, 3 Aug 2010 01:49:27 -0400 Subject: Fix XStats formatting: Recent libomv update broke the json serialization for XStats. This uses String.Format to convert all data to strings with fixed decimal (2 places ), or integer formats as appropriate. --- .../Framework/Statistics/SimExtraStatsCollector.cs | 65 ++++++++++++---------- 1 file changed, 35 insertions(+), 30 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs index 3619606..5449757 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs @@ -390,36 +390,41 @@ Asset service request failures: {3}" + Environment.NewLine, public override string XReport(string uptime, string version) { OSDMap args = new OSDMap(30); - args["AssetsInCache"] = OSD.FromReal(AssetsInCache); - args["TimeAfterCacheMiss"] = OSD.FromReal(assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0); - args["BlockedMissingTextureRequests"] = OSD.FromReal(BlockedMissingTextureRequests); - args["AssetServiceRequestFailures"] = OSD.FromReal(AssetServiceRequestFailures); - args["abnormalClientThreadTerminations"] = OSD.FromReal(abnormalClientThreadTerminations); - args["InventoryServiceRetrievalFailures"] = OSD.FromReal(InventoryServiceRetrievalFailures); - args["Dilatn"] = OSD.FromReal(timeDilation); - args["SimFPS"] = OSD.FromReal(simFps); - args["PhyFPS"] = OSD.FromReal(physicsFps); - args["AgntUp"] = OSD.FromReal(agentUpdates); - args["RootAg"] = OSD.FromReal(rootAgents); - args["ChldAg"] = OSD.FromReal(childAgents); - args["Prims"] = OSD.FromReal(totalPrims); - args["AtvPrm"] = OSD.FromReal(activePrims); - args["AtvScr"] = OSD.FromReal(activeScripts); - args["ScrLPS"] = OSD.FromReal(scriptLinesPerSecond); - args["PktsIn"] = OSD.FromReal(inPacketsPerSecond); - args["PktOut"] = OSD.FromReal(outPacketsPerSecond); - args["PendDl"] = OSD.FromReal(pendingDownloads); - args["PendUl"] = OSD.FromReal(pendingUploads); - args["UnackB"] = OSD.FromReal(unackedBytes); - args["TotlFt"] = OSD.FromReal(totalFrameTime); - args["NetFt"] = OSD.FromReal(netFrameTime); - args["PhysFt"] = OSD.FromReal(physicsFrameTime); - args["OthrFt"] = OSD.FromReal(otherFrameTime); - args["AgntFt"] = OSD.FromReal(agentFrameTime); - args["ImgsFt"] = OSD.FromReal(imageFrameTime); - args["Memory"] = OSD.FromString(base.XReport(uptime, version)); - args["Uptime"] = OSD.FromString(uptime); - args["Version"] = OSD.FromString(version); + args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache)); + args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}", + assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0)); + args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}", + BlockedMissingTextureRequests)); + args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}", + AssetServiceRequestFailures)); + args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}", + abnormalClientThreadTerminations)); + args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}", + InventoryServiceRetrievalFailures)); + args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation)); + args["SimFPS"] = OSD.FromString (String.Format ("{0:0.##}", simFps)); + args["PhyFPS"] = OSD.FromString (String.Format ("{0:0.##}", physicsFps)); + args["AgntUp"] = OSD.FromString (String.Format ("{0:0.##}", agentUpdates)); + args["RootAg"] = OSD.FromString (String.Format ("{0:0.##}", rootAgents)); + args["ChldAg"] = OSD.FromString (String.Format ("{0:0.##}", childAgents)); + args["Prims"] = OSD.FromString (String.Format ("{0:0.##}", totalPrims)); + args["AtvPrm"] = OSD.FromString (String.Format ("{0:0.##}", activePrims)); + args["AtvScr"] = OSD.FromString (String.Format ("{0:0.##}", activeScripts)); + args["ScrLPS"] = OSD.FromString (String.Format ("{0:0.##}", scriptLinesPerSecond)); + args["PktsIn"] = OSD.FromString (String.Format ("{0:0.##}", inPacketsPerSecond)); + args["PktOut"] = OSD.FromString (String.Format ("{0:0.##}", outPacketsPerSecond)); + args["PendDl"] = OSD.FromString (String.Format ("{0:0.##}", pendingDownloads)); + args["PendUl"] = OSD.FromString (String.Format ("{0:0.##}", pendingUploads)); + args["UnackB"] = OSD.FromString (String.Format ("{0:0.##}", unackedBytes)); + args["TotlFt"] = OSD.FromString (String.Format ("{0:0.##}", totalFrameTime)); + args["NetFt"] = OSD.FromString (String.Format ("{0:0.##}", netFrameTime)); + args["PhysFt"] = OSD.FromString (String.Format ("{0:0.##}", physicsFrameTime)); + args["OthrFt"] = OSD.FromString (String.Format ("{0:0.##}", otherFrameTime)); + args["AgntFt"] = OSD.FromString (String.Format ("{0:0.##}", agentFrameTime)); + args["ImgsFt"] = OSD.FromString (String.Format ("{0:0.##}", imageFrameTime)); + args["Memory"] = OSD.FromString (base.XReport (uptime, version)); + args["Uptime"] = OSD.FromString (uptime); + args["Version"] = OSD.FromString (version); string strBuffer = ""; strBuffer = OSDParser.SerializeJsonString(args); -- cgit v1.1 From 00fd2e0446382af1a3581c8feec359cad5b939aa Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 7 Aug 2010 05:45:52 +0200 Subject: Correct display of landmark about info. Also correct region maturity rating in LM info. Maturity is NOT the parcel's setting, that is only for the image and text. Parcel maturity is governed by region maturity. --- OpenSim/Framework/Util.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 802cb37..b5d025f 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -1171,6 +1171,16 @@ namespace OpenSim.Framework } + public static uint ConvertAccessLevelToMaturity(byte maturity) + { + if (maturity <= 13) + return 0; + else if (maturity <= 21) + return 1; + else + return 2; + } + /// /// Produces an OSDMap from its string representation on a stream /// @@ -1486,4 +1496,4 @@ namespace OpenSim.Framework } } -} \ No newline at end of file +} -- cgit v1.1