From 9f72fbcb7533bd960c38082cbd6956cd01fa6919 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 1 Jul 2011 21:25:40 +0100
Subject: Add an async inventory details sender to respond to FetchInventory
packets.
If a user with a very large inventory right-clicks on their "My Inventory" folder, viewer 1 code will send a massive number of Fetchinventory requests.
Even though each is handled asynchronously via a pool thread, the sheer frequency of requests overwhelms the pool and freezes inbound packet handling.
This change makes the first Fetchinventory thread also handle subsequent requests, freeing up the other threads.
Further efficiencies could be made by handling all the items in a particular FetchInventory request together, rather than separately.
---
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 659d42f..f6e2977 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -737,7 +737,7 @@ namespace OpenSim.Framework
bool IsActive { get; set; }
///
- /// Determines whether the client is logging out or not.
+ /// Determines whether the client is or has been removed from a given scene
///
bool IsLoggingOut { get; set; }
--
cgit v1.1
From 759e855566a08d965059ca08d4f4510d335f1c7d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 1 Jul 2011 21:47:30 +0100
Subject: refactor: rename gitCommitFileName to manualVersionFileName since
bin/.version doesn't necessary have to be a git hash
---
OpenSim/Framework/Servers/BaseOpenSimServer.cs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 21e1e09..98a92dd 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -460,21 +460,20 @@ namespace OpenSim.Framework.Servers
// elsewhere as well
string svnRevisionFileName = "svn_revision";
string svnFileName = ".svn/entries";
- string gitCommitFileName = ".version";
+ string manualVersionFileName = ".version";
string inputLine;
int strcmp;
- if (File.Exists(gitCommitFileName))
+ if (File.Exists(manualVersionFileName))
{
- StreamReader CommitFile = File.OpenText(gitCommitFileName);
+ StreamReader CommitFile = File.OpenText(manualVersionFileName);
buildVersion = CommitFile.ReadLine();
CommitFile.Close();
m_version += buildVersion ?? "";
}
-
- // Remove the else logic when subversion mirror is no longer used
else
{
+ // Remove the else logic when subversion mirror is no longer used
if (File.Exists(svnRevisionFileName))
{
StreamReader RevisionFile = File.OpenText(svnRevisionFileName);
--
cgit v1.1
From e765759f504b86a643fd8843e41b0283422f7980 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 1 Jul 2011 22:48:00 +0100
Subject: If OpenSim has been built from a git tree, then include version
information automatically by dereferencing .git/HEAD
A blank bin/.version file will stop this being displayed.
---
OpenSim/Framework/Servers/BaseOpenSimServer.cs | 43 +++++++++++++++++++++++---
1 file changed, 39 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 98a92dd..d4c3d08 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -31,6 +31,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text;
+using System.Text.RegularExpressions;
using System.Threading;
using System.Timers;
using log4net;
@@ -124,7 +125,6 @@ namespace OpenSim.Framework.Servers
m_logFileAppender = appender;
}
}
-
}
///
@@ -458,6 +458,9 @@ namespace OpenSim.Framework.Servers
// This allows to make the revision available in simulators not running from the source tree.
// FIXME: Making an assumption about the directory we're currently in - we do this all over the place
// elsewhere as well
+ string gitDir = "../.git/";
+ string gitRefPointerPath = gitDir + "HEAD";
+
string svnRevisionFileName = "svn_revision";
string svnFileName = ".svn/entries";
string manualVersionFileName = ".version";
@@ -466,13 +469,45 @@ namespace OpenSim.Framework.Servers
if (File.Exists(manualVersionFileName))
{
- StreamReader CommitFile = File.OpenText(manualVersionFileName);
- buildVersion = CommitFile.ReadLine();
- CommitFile.Close();
+ using (StreamReader CommitFile = File.OpenText(manualVersionFileName))
+ buildVersion = CommitFile.ReadLine();
+
m_version += buildVersion ?? "";
}
+ else if (File.Exists(gitRefPointerPath))
+ {
+// m_log.DebugFormat("[OPENSIM]: Found {0}", gitRefPointerPath);
+
+ string rawPointer = "";
+
+ using (StreamReader pointerFile = File.OpenText(gitRefPointerPath))
+ rawPointer = pointerFile.ReadLine();
+
+// m_log.DebugFormat("[OPENSIM]: rawPointer [{0}]", rawPointer);
+
+ Match m = Regex.Match(rawPointer, "^ref: (.+)$");
+
+ if (m.Success)
+ {
+// m_log.DebugFormat("[OPENSIM]: Matched [{0}]", m.Groups[1].Value);
+
+ string gitRef = m.Groups[1].Value;
+ string gitRefPath = gitDir + gitRef;
+ if (File.Exists(gitRefPath))
+ {
+// m_log.DebugFormat("[OPENSIM]: Found gitRefPath [{0}]", gitRefPath);
+
+ using (StreamReader refFile = File.OpenText(gitRefPath))
+ {
+ string gitHash = refFile.ReadLine();
+ m_version += gitHash.Substring(0, 7);
+ }
+ }
+ }
+ }
else
{
+ m_log.DebugFormat("[OPENSIM]: Looking for SVN");
// Remove the else logic when subversion mirror is no longer used
if (File.Exists(svnRevisionFileName))
{
--
cgit v1.1
From fba961c63f2168eb560eec84b66203b1a875b952 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 1 Jul 2011 23:06:46 +0100
Subject: Make default serverside_object_permissions = true since this better
matches user expectations.
It also matches the default setting in the OpenSim.ini.example file
---
OpenSim/Framework/Servers/BaseOpenSimServer.cs | 11 -----------
1 file changed, 11 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index d4c3d08..688be3f 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -443,15 +443,6 @@ namespace OpenSim.Framework.Servers
{
string buildVersion = string.Empty;
- // Add commit hash and date information if available
- // The commit hash and date are stored in a file bin/.version
- // This file can automatically created by a post
- // commit script in the opensim git master repository or
- // by issuing the follwoing command from the top level
- // directory of the opensim repository
- // git log -n 1 --pretty="format:%h: %ci" >bin/.version
- // For the full git commit hash use %H instead of %h
- //
// The subversion information is deprecated and will be removed at a later date
// Add subversion revision information if available
// Try file "svn_revision" in the current directory first, then the .svn info.
@@ -507,7 +498,6 @@ namespace OpenSim.Framework.Servers
}
else
{
- m_log.DebugFormat("[OPENSIM]: Looking for SVN");
// Remove the else logic when subversion mirror is no longer used
if (File.Exists(svnRevisionFileName))
{
@@ -515,7 +505,6 @@ namespace OpenSim.Framework.Servers
buildVersion = RevisionFile.ReadLine();
buildVersion.Trim();
RevisionFile.Close();
-
}
if (string.IsNullOrEmpty(buildVersion) && File.Exists(svnFileName))
--
cgit v1.1
From 46f5893d559f87982e510d02a37856951eb1e088 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 4 Jul 2011 21:35:15 +0100
Subject: Add basic flotsam asset cache test for retrieved cached asset.
Disabled temporarily since file system caching disrupts subsequent test runs
---
OpenSim/Framework/AssetBase.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs
index 5f68cda..e8c85c9 100644
--- a/OpenSim/Framework/AssetBase.cs
+++ b/OpenSim/Framework/AssetBase.cs
@@ -273,6 +273,7 @@ namespace OpenSim.Framework
return m_id;
}
+
set
{
UUID uuid = UUID.Zero;
--
cgit v1.1