From 0f4d54b8b29f509b267e4be64aa83b7658ef318b Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sun, 21 Aug 2016 20:52:31 +0100
Subject: put back the dangerous resp.ReuseContext = true option, that for
some odd reason OSgrid nginx configuration seems to need
---
OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 1ac5059..e431042 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -461,8 +461,8 @@ namespace OpenSim.Framework.Servers.HttpServer
}
OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context);
-// resp.ReuseContext = true;
- resp.ReuseContext = false;
+ resp.ReuseContext = true;
+// resp.ReuseContext = false;
HandleRequest(req, resp);
// !!!HACK ALERT!!!
--
cgit v1.1
From 9953dad3a937e2186683069a9d34f6af99e38e50 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Mon, 22 Aug 2016 08:16:06 +0100
Subject: workaround potencial memory leak
---
OpenSim/Framework/Util.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 96b91ff..b4a81ac 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -706,7 +706,9 @@ namespace OpenSim.Framework
private static byte[] ComputeSHA1Hash(byte[] src)
{
SHA1CryptoServiceProvider SHA1 = new SHA1CryptoServiceProvider();
- return SHA1.ComputeHash(src);
+ byte[] ret = SHA1.ComputeHash(src);
+ SHA1.Dispose();
+ return ret;
}
public static int fast_distance2d(int x, int y)
--
cgit v1.1
From a2c80b20d7365b5c1ff16342e884cd7a60a22890 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Mon, 22 Aug 2016 08:35:39 +0100
Subject: try to make mono happy
---
OpenSim/Framework/Util.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index b4a81ac..01a06cd 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -705,9 +705,9 @@ namespace OpenSim.Framework
private static byte[] ComputeSHA1Hash(byte[] src)
{
- SHA1CryptoServiceProvider SHA1 = new SHA1CryptoServiceProvider();
- byte[] ret = SHA1.ComputeHash(src);
- SHA1.Dispose();
+ byte[] ret;
+ using(SHA1CryptoServiceProvider SHA1 = new SHA1CryptoServiceProvider())
+ ret = SHA1.ComputeHash(src);
return ret;
}
--
cgit v1.1
From 35cc0420c8e22cb4c4fb789df5249491d7e6a8e7 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Wed, 24 Aug 2016 00:20:45 +0100
Subject: fix a use of string Trim()
---
OpenSim/Framework/Servers/ServerBase.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs
index b330384..7b806a4 100644
--- a/OpenSim/Framework/Servers/ServerBase.cs
+++ b/OpenSim/Framework/Servers/ServerBase.cs
@@ -842,7 +842,7 @@ namespace OpenSim.Framework.Servers
{
StreamReader RevisionFile = File.OpenText(svnRevisionFileName);
buildVersion = RevisionFile.ReadLine();
- buildVersion.Trim();
+ buildVersion = buildVersion.Trim();
RevisionFile.Close();
}
--
cgit v1.1
From 32396742f86fb5336de5acd4e2a05099f111022a Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Wed, 24 Aug 2016 06:26:31 +0100
Subject: reduce unnecessary allocation of new items
---
OpenSim/Framework/Monitoring/StatsManager.cs | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs
index 8787ea0..008127e 100644
--- a/OpenSim/Framework/Monitoring/StatsManager.cs
+++ b/OpenSim/Framework/Monitoring/StatsManager.cs
@@ -361,8 +361,8 @@ namespace OpenSim.Framework.Monitoring
///
public static bool RegisterStat(Stat stat)
{
- SortedDictionary> category = null, newCategory;
- SortedDictionary container = null, newContainer;
+ SortedDictionary> category = null;
+ SortedDictionary container = null;
lock (RegisteredStats)
{
@@ -375,19 +375,15 @@ namespace OpenSim.Framework.Monitoring
// We take a copy-on-write approach here of replacing dictionaries when keys are added or removed.
// This means that we don't need to lock or copy them on iteration, which will be a much more
// common operation after startup.
- if (container != null)
- newContainer = new SortedDictionary(container);
- else
- newContainer = new SortedDictionary();
+ if (container == null)
+ container = new SortedDictionary();
- if (category != null)
- newCategory = new SortedDictionary>(category);
- else
- newCategory = new SortedDictionary>();
+ if (category == null)
+ category = new SortedDictionary>();
- newContainer[stat.ShortName] = stat;
- newCategory[stat.Container] = newContainer;
- RegisteredStats[stat.Category] = newCategory;
+ container[stat.ShortName] = stat;
+ category[stat.Container] = container;
+ RegisteredStats[stat.Category] = category;
}
return true;
--
cgit v1.1
From fc459420263329d4e93910df9e761db94bce10e0 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Wed, 24 Aug 2016 06:57:21 +0100
Subject: remove redundate console comand add, change stat deregister
---
OpenSim/Framework/Monitoring/StatsManager.cs | 36 +++++++++++-----------------
1 file changed, 14 insertions(+), 22 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs
index 008127e..c0be87b 100644
--- a/OpenSim/Framework/Monitoring/StatsManager.cs
+++ b/OpenSim/Framework/Monitoring/StatsManager.cs
@@ -80,16 +80,7 @@ namespace OpenSim.Framework.Monitoring
+ "'all' will show all statistics.\n"
+ "A name will show statistics from that category.\n"
+ "A . name will show statistics from that category in that container.\n"
- + "More than one name can be given separated by spaces.\n"
- + "THIS STATS FACILITY IS EXPERIMENTAL AND DOES NOT YET CONTAIN ALL STATS",
- HandleShowStatsCommand);
-
- console.Commands.AddCommand(
- "General",
- false,
- "show stats",
- "show stats [list|all|([.])+",
- "Alias for 'stats show' command",
+ + "More than one name can be given separated by spaces.\n",
HandleShowStatsCommand);
StatsLogger.RegisterConsoleCommands(console);
@@ -396,23 +387,24 @@ namespace OpenSim.Framework.Monitoring
///
public static bool DeregisterStat(Stat stat)
{
- SortedDictionary> category = null, newCategory;
- SortedDictionary container = null, newContainer;
+ SortedDictionary> category = null;
+ SortedDictionary container = null;
lock (RegisteredStats)
{
if (!TryGetStatParents(stat, out category, out container))
return false;
-
- newContainer = new SortedDictionary(container);
- newContainer.Remove(stat.ShortName);
-
- newCategory = new SortedDictionary>(category);
- newCategory.Remove(stat.Container);
-
- newCategory[stat.Container] = newContainer;
- RegisteredStats[stat.Category] = newCategory;
-
+
+ if(container != null)
+ {
+ container.Remove(stat.ShortName);
+ if(category != null && container.Count == 0)
+ {
+ category.Remove(stat.Container);
+ if(category.Count == 0)
+ RegisteredStats.Remove(stat.Category);
+ }
+ }
return true;
}
}
--
cgit v1.1
From 387d564aadc38c28af78d5b60a3bad57f1a8a2d5 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Wed, 24 Aug 2016 07:41:11 +0100
Subject: do similar changes to unused checksManager
---
OpenSim/Framework/Monitoring/ChecksManager.cs | 45 +++++++++++++--------------
OpenSim/Framework/Monitoring/StatsManager.cs | 3 --
2 files changed, 21 insertions(+), 27 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Monitoring/ChecksManager.cs b/OpenSim/Framework/Monitoring/ChecksManager.cs
index e4a7f8c..ff3b041 100644
--- a/OpenSim/Framework/Monitoring/ChecksManager.cs
+++ b/OpenSim/Framework/Monitoring/ChecksManager.cs
@@ -132,8 +132,8 @@ namespace OpenSim.Framework.Monitoring
///
public static bool RegisterCheck(Check check)
{
- SortedDictionary> category = null, newCategory;
- SortedDictionary container = null, newContainer;
+ SortedDictionary> category = null;
+ SortedDictionary container = null;
lock (RegisteredChecks)
{
@@ -146,19 +146,15 @@ namespace OpenSim.Framework.Monitoring
// We take a copy-on-write approach here of replacing dictionaries when keys are added or removed.
// This means that we don't need to lock or copy them on iteration, which will be a much more
// common operation after startup.
- if (container != null)
- newContainer = new SortedDictionary(container);
- else
- newContainer = new SortedDictionary();
+ if (container == null)
+ container = new SortedDictionary();
- if (category != null)
- newCategory = new SortedDictionary>(category);
- else
- newCategory = new SortedDictionary>();
+ if (category == null)
+ category = new SortedDictionary>();
- newContainer[check.ShortName] = check;
- newCategory[check.Container] = newContainer;
- RegisteredChecks[check.Category] = newCategory;
+ container[check.ShortName] = check;
+ category[check.Container] = container;
+ RegisteredChecks[check.Category] = category;
}
return true;
@@ -171,23 +167,24 @@ namespace OpenSim.Framework.Monitoring
///
public static bool DeregisterCheck(Check check)
{
- SortedDictionary> category = null, newCategory;
- SortedDictionary container = null, newContainer;
+ SortedDictionary> category = null;
+ SortedDictionary container = null;
lock (RegisteredChecks)
{
if (!TryGetCheckParents(check, out category, out container))
return false;
- newContainer = new SortedDictionary(container);
- newContainer.Remove(check.ShortName);
-
- newCategory = new SortedDictionary>(category);
- newCategory.Remove(check.Container);
-
- newCategory[check.Container] = newContainer;
- RegisteredChecks[check.Category] = newCategory;
-
+ if(container != null)
+ {
+ container.Remove(check.ShortName);
+ if(category != null && container.Count == 0)
+ {
+ category.Remove(check.Container);
+ if(category.Count == 0)
+ RegisteredChecks.Remove(check.Category);
+ }
+ }
return true;
}
}
diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs
index c0be87b..6277d44 100644
--- a/OpenSim/Framework/Monitoring/StatsManager.cs
+++ b/OpenSim/Framework/Monitoring/StatsManager.cs
@@ -363,9 +363,6 @@ namespace OpenSim.Framework.Monitoring
if (TryGetStatParents(stat, out category, out container))
return false;
- // We take a copy-on-write approach here of replacing dictionaries when keys are added or removed.
- // This means that we don't need to lock or copy them on iteration, which will be a much more
- // common operation after startup.
if (container == null)
container = new SortedDictionary();
--
cgit v1.1
From 7ce6430a86d3ea5a5acc541f25b7813da6796296 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Thu, 25 Aug 2016 04:55:01 +0100
Subject: put back the console comand i remove since it is not a repetion
---
OpenSim/Framework/Monitoring/StatsManager.cs | 7 +++++++
1 file changed, 7 insertions(+)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs
index 6277d44..30926d8 100644
--- a/OpenSim/Framework/Monitoring/StatsManager.cs
+++ b/OpenSim/Framework/Monitoring/StatsManager.cs
@@ -83,6 +83,13 @@ namespace OpenSim.Framework.Monitoring
+ "More than one name can be given separated by spaces.\n",
HandleShowStatsCommand);
+ console.Commands.AddCommand(
+ "General",
+ false,
+ "show stats",
+ "show stats [list|all|([.])+",
+ "Alias for 'stats show' command",
+ HandleShowStatsCommand);
StatsLogger.RegisterConsoleCommands(console);
}
--
cgit v1.1
From 991dd5f4712f7f6b61b4953f3f388f85992db67b Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Thu, 25 Aug 2016 06:56:13 +0100
Subject: first step changing Object Select code
---
OpenSim/Framework/IClientAPI.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index c046010..6f2f834 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Framework
public delegate void ObjectExtraParams(UUID agentID, uint localID, ushort type, bool inUse, byte[] data);
- public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
+ public delegate void ObjectSelect(List localID, IClientAPI remoteClient);
public delegate void ObjectRequest(uint localID, IClientAPI remoteClient);
--
cgit v1.1
From d5f376a4b10ffdb5acc17d4e350a0a523ba0e9f5 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Thu, 25 Aug 2016 09:51:34 +0100
Subject: send selected objects Proprieties udp part outside update queues and
as a physics single caps message per selection request
---
OpenSim/Framework/IClientAPI.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 6f2f834..cafbd1f 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1382,6 +1382,8 @@ namespace OpenSim.Framework
void SendObjectPropertiesReply(ISceneEntity Entity);
+ void SendSelectedPartsProprieties(List parts);
+
void SendPartPhysicsProprieties(ISceneEntity Entity);
void SendAgentOffline(UUID[] agentIDs);
--
cgit v1.1
From 38ba839eb35987e47b98f795fbdc6083ab48921c Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Thu, 25 Aug 2016 23:31:18 +0100
Subject: watchdog timeouts: replace a silly List copy i added doing it a
better way
---
OpenSim/Framework/Monitoring/Watchdog.cs | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs
index b2c1fb1..ff439f5 100644
--- a/OpenSim/Framework/Monitoring/Watchdog.cs
+++ b/OpenSim/Framework/Monitoring/Watchdog.cs
@@ -332,18 +332,18 @@ namespace OpenSim.Framework.Monitoring
if (callback != null)
{
List callbackInfos = null;
- List threadsInfo;
+ List threadsToRemove = null;
lock (m_threads)
{
- // get a copy since we may change m_threads
- threadsInfo = m_threads.Values.ToList();
-
- foreach(ThreadWatchdogInfo threadInfo in threadsInfo)
+ foreach(ThreadWatchdogInfo threadInfo in m_threads.Values)
{
if(threadInfo.Thread.ThreadState == ThreadState.Stopped)
{
- RemoveThread(threadInfo.Thread.ManagedThreadId);
+ if(threadsToRemove == null)
+ threadsToRemove = new List();
+
+ threadsToRemove.Add(threadInfo);
if(callbackInfos == null)
callbackInfos = new List();
@@ -365,6 +365,10 @@ namespace OpenSim.Framework.Monitoring
}
}
}
+
+ if(threadsToRemove != null)
+ foreach(ThreadWatchdogInfo twi in threadsToRemove)
+ RemoveThread(twi.Thread.ManagedThreadId);
}
if(callbackInfos != null)
--
cgit v1.1