From 5ef2da39d81c038c087b493330497856ed18325d Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Mon, 13 Sep 2010 11:23:45 -0700
Subject: * Fixing length calculations for HTTP texture downloads (the end byte
is inclusive in Range: headers)
---
OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
index 8aa87fd..a3238df 100644
--- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
@@ -187,18 +187,20 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
int start, end;
if (TryParseRange(range, out start, out end))
{
- end = Utils.Clamp(end, 1, texture.Data.Length);
+ end = Utils.Clamp(end, 1, texture.Data.Length - 1);
start = Utils.Clamp(start, 0, end - 1);
+ int len = end - start + 1;
//m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
- if (end - start < texture.Data.Length)
+ if (len < texture.Data.Length)
response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent;
- response.ContentLength = end - start;
+ response.ContentLength = len;
response.ContentType = texture.Metadata.ContentType;
+ response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length));
- response.Body.Write(texture.Data, start, end - start);
+ response.Body.Write(texture.Data, start, len);
}
else
{
--
cgit v1.1
From ff098ae110bb3175fe6a7bf37a03e3f22eb829e3 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 13 Sep 2010 20:44:32 +0100
Subject: minor: Clean up log messages generated when an item is attached
---
.../CoreModules/Avatar/Attachments/AttachmentsModule.cs | 6 ++++--
.../CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 2 +-
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 12 +++---------
3 files changed, 8 insertions(+), 12 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 5604f49..a3712d1 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -218,14 +218,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
public UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
{
- m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing single attachment from item {0} for {1}", itemID, remoteClient.Name);
-
return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true);
}
public UUID RezSingleAttachmentFromInventory(
IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus)
{
+ m_log.DebugFormat(
+ "[ATTACHMENTS MODULE]: Rezzing attachment to point {0} from item {1} for {2}",
+ (AttachmentPoint)AttachmentPt, itemID, remoteClient.Name);
+
SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt);
if (updateInventoryStatus)
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 7e5a8ec..22c8937 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
public void UpdateDatabase(UUID user, AvatarAppearance appearance)
{
- m_log.DebugFormat("[APPEARANCE]: UpdateDatabase");
+ //m_log.DebugFormat("[APPEARANCE]: UpdateDatabase");
AvatarData adata = new AvatarData(appearance);
m_scene.AvatarService.SetAvatar(user, adata);
}
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 177cf1e..51a0f2a 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3727,8 +3727,8 @@ namespace OpenSim.Region.Framework.Scenes
return;
UUID itemID = m_appearance.GetAttachedItem(p);
- UUID assetID = m_appearance.GetAttachedAsset(p);
+ //UUID assetID = m_appearance.GetAttachedAsset(p);
// For some reason assetIDs are being written as Zero's in the DB -- need to track tat down
// But they're not used anyway, the item is being looked up for now, so let's proceed.
//if (UUID.Zero == assetID)
@@ -3739,17 +3739,11 @@ namespace OpenSim.Region.Framework.Scenes
try
{
- // Rez from inventory
- UUID asset
- = m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p);
-
- m_log.InfoFormat(
- "[ATTACHMENT]: Rezzed attachment in point {0} from item {1} and asset {2} ({3})",
- p, itemID, assetID, asset);
+ m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p);
}
catch (Exception e)
{
- m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}", e.ToString());
+ m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}{1}", e.Message, e.StackTrace);
}
}
}
--
cgit v1.1
From 366de0a7b57919625429db571f4ed4a231f043da Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 13 Sep 2010 20:58:50 +0100
Subject: If attachment fails (e.g. because asset wasn't found) then don't try
to set attachment as shown in inventory
Doing this results in a null reference exception
---
OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index a3712d1..b7ecb55 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -233,11 +233,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (updateInventoryStatus)
{
if (att == null)
- {
ShowDetachInUserInventory(itemID, remoteClient);
- }
-
- SetAttachmentInventoryStatus(att, remoteClient, itemID, AttachmentPt);
+ else
+ SetAttachmentInventoryStatus(att, remoteClient, itemID, AttachmentPt);
}
if (null == att)
--
cgit v1.1
From cd153a20b7e50edfa6a8c0098a456876b3088adf Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 13 Sep 2010 21:05:03 +0100
Subject: Remove IAttachmentsModule.SetAttachmentInventoryStatus() from public
interface
No core module is calling and it makes more sense to call methods such as AttachObject() which attach both to the avatar and update inventory appropriately
---
.../Avatar/Attachments/AttachmentsModule.cs | 18 +++++++++++++-----
.../Region/Framework/Interfaces/IAttachmentsModule.cs | 11 -----------
2 files changed, 13 insertions(+), 16 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index b7ecb55..fe19099 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -300,12 +300,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
return null;
}
- public UUID SetAttachmentInventoryStatus(
+ ///
+ /// Update the user inventory to the attachment of an item
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected UUID SetAttachmentInventoryStatus(
SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
{
- m_log.DebugFormat(
- "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})",
- remoteClient.Name, att.Name, itemID);
+// m_log.DebugFormat(
+// "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})",
+// remoteClient.Name, att.Name, itemID);
if (!att.IsDeleted)
AttachmentPt = att.RootPart.AttachmentPoint;
@@ -387,7 +395,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// Save avatar attachment information
if (m_scene.AvatarFactory != null)
{
- m_log.Debug("[ATTACHMENTS MODULE]: Dettaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID);
+ m_log.Debug("[ATTACHMENTS MODULE]: Detaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID);
m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
}
}
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index 1140b9b..24e481b 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -109,17 +109,6 @@ namespace OpenSim.Region.Framework.Interfaces
///
///
void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient);
-
- ///
- /// Update the user inventory to the attachment of an item
- ///
- ///
- ///
- ///
- ///
- ///
- UUID SetAttachmentInventoryStatus(
- SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt);
///
/// Update the user inventory to show a detach.
--
cgit v1.1
From ae1a0150a1951d8cee67b253aa63301fdafbff89 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 13 Sep 2010 21:15:12 +0100
Subject: Rename now protected method SetAttachmentInventoryStatus() to
ShowAttachInUserInventory() to match ShowDetachInUserInventory()
---
.../Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index fe19099..1ebac42 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -190,7 +190,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
itemID = group.GetFromItemID();
}
- SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemID, group);
+ ShowAttachInUserInventory(remoteClient, AttachmentPt, itemID, group);
AttachToAgent(sp, group, AttachmentPt, attachPos, silent);
}
@@ -235,7 +235,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (att == null)
ShowDetachInUserInventory(itemID, remoteClient);
else
- SetAttachmentInventoryStatus(att, remoteClient, itemID, AttachmentPt);
+ ShowAttachInUserInventory(att, remoteClient, itemID, AttachmentPt);
}
if (null == att)
@@ -308,7 +308,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
///
///
///
- protected UUID SetAttachmentInventoryStatus(
+ protected UUID ShowAttachInUserInventory(
SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
{
// m_log.DebugFormat(
@@ -337,7 +337,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
///
///
///
- public void SetAttachmentInventoryStatus(
+ protected void ShowAttachInUserInventory(
IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
{
// m_log.DebugFormat(
--
cgit v1.1
From 7ae926618612a76bf143b1cbcd6e420828becb5a Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 13 Sep 2010 21:20:31 +0100
Subject: Remove SceneGraph.DetachObject() which was accidentally left around
after being migrated to AttachmentsModule
---
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 10 ----------
1 file changed, 10 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 5ac8ff5..85ff32e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -522,16 +522,6 @@ namespace OpenSim.Region.Framework.Scenes
m_parentScene.AttachmentsModule.DetachSingleAttachmentToGround(group.UUID, remoteClient);
}
- protected internal void DetachObject(uint objectLocalID, IClientAPI remoteClient)
- {
- SceneObjectGroup group = GetGroupByPrim(objectLocalID);
- if (group != null)
- {
- //group.DetachToGround();
- m_parentScene.AttachmentsModule.ShowDetachInUserInventory(group.GetFromItemID(), remoteClient);
- }
- }
-
protected internal void HandleUndo(IClientAPI remoteClient, UUID primId)
{
if (primId != UUID.Zero)
--
cgit v1.1
From e4858b0eeb25c6a43d615c241d1566a92ae278a5 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 13 Sep 2010 21:28:42 +0100
Subject: Add client name to packet resend log messages to make them a bit more
informative
---
OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index ca5a297..56e8c9b 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -695,9 +695,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (packet.Header.Reliable && !udpClient.PacketArchive.TryEnqueue(packet.Header.Sequence))
{
if (packet.Header.Resent)
- m_log.Debug("[LLUDPSERVER]: Received a resend of already processed packet #" + packet.Header.Sequence + ", type: " + packet.Type);
- else
- m_log.Warn("[LLUDPSERVER]: Received a duplicate (not marked as resend) of packet #" + packet.Header.Sequence + ", type: " + packet.Type);
+ m_log.DebugFormat(
+ "[LLUDPSERVER]: Received a resend of already processed packet #{0}, type {1} from {2}",
+ packet.Header.Sequence, packet.Type, client.Name);
+ else
+ m_log.WarnFormat(
+ "[LLUDPSERVER]: Received a duplicate (not marked as resend) of packet #{0}, type {1} from {2}",
+ packet.Header.Sequence, packet.Type, client.Name);
// Avoid firing a callback twice for the same packet
return;
--
cgit v1.1
From fbe72e30ebc46f07da912bbeabdf252150f7effc Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 13 Sep 2010 21:52:36 +0100
Subject: Improve generic message exception logging. Quieten down complaints
about unhandled GenericMessages
---
OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index f35691a..0aa670a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -5199,11 +5199,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
catch (Exception e)
{
- m_log.Error("[GENERICMESSAGE] " + e);
+ m_log.ErrorFormat(
+ "[LLCLIENTVIEW]: Exeception when handling generic message {0}{1}", e.Message, e.StackTrace);
}
}
}
- m_log.Error("[GENERICMESSAGE] Not handling GenericMessage with method-type of: " + method);
+
+ //m_log.Debug("[LLCLIENTVIEW]: Not handling GenericMessage with method-type of: " + method);
return false;
}
--
cgit v1.1
From dd803b4f0c50c4ac1eda5ae7622dc91b2a63db3f Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 13 Sep 2010 21:53:25 +0100
Subject: minor: Add comments which explain what's going on wrt avatar
movements at various points in the main scene loop and associated methods
---
OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++++
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 ++
2 files changed, 6 insertions(+)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 6d2ae5a..ef97dfc 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1319,6 +1319,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_frame % m_update_presences == 0)
m_sceneGraph.UpdatePresences();
+ // Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client)
if (m_frame % m_update_coarse_locations == 0)
{
List coarseLocations;
@@ -1336,9 +1337,12 @@ namespace OpenSim.Region.Framework.Scenes
m_sceneGraph.UpdatePreparePhysics();
physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2);
+ // Apply any pending avatar force input to the avatar's velocity
if (m_frame % m_update_entitymovement == 0)
m_sceneGraph.UpdateScenePresenceMovement();
+ // Perform the main physics update. This will do the actual work of moving objects and avatars according to their
+ // velocity
int tmpPhysicsMS = Util.EnvironmentTickCount();
if (m_frame % m_update_physics == 0)
{
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 51a0f2a..a77f38c 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1522,6 +1522,8 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ // If the agent update does move the avatar, then calculate the force ready for the velocity update,
+ // which occurs later in the main scene loop
if (update_movementflag || (update_rotation && DCFlagKeyPressed))
{
// m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed));
--
cgit v1.1
From 8febba7717d019afbc4695989cbc83b1bc1d2ba1 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 13 Sep 2010 23:12:48 +0100
Subject: Make the inimaster option default to OpenSimDefaults.ini.
---
OpenSim/Region/Application/ConfigurationLoader.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index e2e0640..31ce500 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -83,7 +83,7 @@ namespace OpenSim
List sources = new List();
string masterFileName =
- startupConfig.GetString("inimaster", String.Empty);
+ startupConfig.GetString("inimaster", "OpenSimDefaults.ini");
if (IsUri(masterFileName))
{
--
cgit v1.1
From 2cf98e77fc331f6032f6eb600139771085629bbf Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 13 Sep 2010 23:17:42 +0100
Subject: Output an error and quit if the master file is missing. Also rename
OpenSim.ini.example to bin/OpenSimDefaults.ini.example
---
OpenSim/Region/Application/ConfigurationLoader.cs | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 31ce500..9d6fef7 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -85,6 +85,9 @@ namespace OpenSim
string masterFileName =
startupConfig.GetString("inimaster", "OpenSimDefaults.ini");
+ if (masterFileName == "none")
+ masterFileName = String.Empty;
+
if (IsUri(masterFileName))
{
if (!sources.Contains(masterFileName))
@@ -95,10 +98,19 @@ namespace OpenSim
string masterFilePath = Path.GetFullPath(
Path.Combine(Util.configDir(), masterFileName));
- if (masterFileName != String.Empty &&
- File.Exists(masterFilePath) &&
- (!sources.Contains(masterFilePath)))
- sources.Add(masterFilePath);
+ if (masterFileName != String.Empty)
+ {
+ if (File.Exists(masterFilePath)
+ {
+ if (!sources.Contains(masterFilePath))
+ sources.Add(masterFilePath);
+ }
+ else
+ {
+ m_log.ErrorFormat("Master ini file {0} not found", masterFilePath);
+ Environment.Exit(1);
+ }
+ }
}
--
cgit v1.1
From 4aadfc300705e494c710ac1f96e887c1cf43ff16 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 13 Sep 2010 23:22:25 +0100
Subject: Change the help message to point to copying
OpenSimDefaults.ini.example. Provide a mostly empty OpenSim.ini.example
---
OpenSim/Region/Application/ConfigurationLoader.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 9d6fef7..b76e85d 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -172,7 +172,7 @@ namespace OpenSim
if (sources.Count == 0)
{
m_log.FatalFormat("[CONFIG]: Could not load any configuration");
- m_log.FatalFormat("[CONFIG]: Did you copy the OpenSim.ini.example file to OpenSim.ini?");
+ m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?");
Environment.Exit(1);
}
--
cgit v1.1
From 96a2ce5db0b1e7d8c448cd5f247d6939c6e58f1b Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 13 Sep 2010 23:12:48 +0100
Subject: Add a missing parenthesis
---
OpenSim/Region/Application/ConfigurationLoader.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index b76e85d..6e3d6af 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -100,7 +100,7 @@ namespace OpenSim
if (masterFileName != String.Empty)
{
- if (File.Exists(masterFilePath)
+ if (File.Exists(masterFilePath))
{
if (!sources.Contains(masterFilePath))
sources.Add(masterFilePath);
--
cgit v1.1
From 36f81c66e51e84d8ce7bd40860ed78e9c2a108c2 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 14 Sep 2010 00:05:38 +0100
Subject: Comment out SOG storing debug log message
This can get very spammy with regularly changing objects. Please uncomment if required.
---
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 2c1f207..dc6509d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1430,9 +1430,9 @@ namespace OpenSim.Region.Framework.Scenes
// don't backup while it's selected or you're asking for changes mid stream.
if (isTimeToPersist() || forcedBackup)
{
- m_log.DebugFormat(
- "[SCENE]: Storing {0}, {1} in {2}",
- Name, UUID, m_scene.RegionInfo.RegionName);
+// m_log.DebugFormat(
+// "[SCENE]: Storing {0}, {1} in {2}",
+// Name, UUID, m_scene.RegionInfo.RegionName);
SceneObjectGroup backup_group = Copy(false);
backup_group.RootPart.Velocity = RootPart.Velocity;
--
cgit v1.1
From c3259e9c26f198b5fe0e7ed6c29c17c27c60ecb1 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 14 Sep 2010 01:38:53 +0100
Subject: Move OpenSimDefaults,ini into config-include in order to put it with
all the other default files
---
OpenSim/Region/Application/ConfigurationLoader.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 6e3d6af..f4a97d5 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -83,7 +83,7 @@ namespace OpenSim
List sources = new List();
string masterFileName =
- startupConfig.GetString("inimaster", "OpenSimDefaults.ini");
+ startupConfig.GetString("inimaster", "config-include/OpenSimDefaults.ini");
if (masterFileName == "none")
masterFileName = String.Empty;
--
cgit v1.1
From 5d48e3c0bbfffc99a0bba4b2da86b18ed6803aa4 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 14 Sep 2010 03:30:07 +0100
Subject: Revert "Move OpenSimDefaults,ini into config-include in order to put
it with all the other default files"
This reverts commit c3259e9c26f198b5fe0e7ed6c29c17c27c60ecb1.
Reverted by agreement.
---
OpenSim/Region/Application/ConfigurationLoader.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index f4a97d5..6e3d6af 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -83,7 +83,7 @@ namespace OpenSim
List sources = new List();
string masterFileName =
- startupConfig.GetString("inimaster", "config-include/OpenSimDefaults.ini");
+ startupConfig.GetString("inimaster", "OpenSimDefaults.ini");
if (masterFileName == "none")
masterFileName = String.Empty;
--
cgit v1.1
From 095d400f5b058b23d0ebc715f5527964a09f05fc Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 14 Sep 2010 17:01:53 +0100
Subject: fix OpenSim.Tests.ConfigurationLoaderTest to satisfy requirement that
OpenSimDefaults.ini is present
this should allow the testsuite to run again and the autobuild to complete
---
OpenSim/Tests/ConfigurationLoaderTest.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Tests/ConfigurationLoaderTest.cs b/OpenSim/Tests/ConfigurationLoaderTest.cs
index 4262c95..c777acc 100644
--- a/OpenSim/Tests/ConfigurationLoaderTest.cs
+++ b/OpenSim/Tests/ConfigurationLoaderTest.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Tests
[Test]
public void IncludeTests()
{
- const string mainIniFile = "OpenSim.ini";
+ const string mainIniFile = "OpenSimDefaults.ini";
m_config = new IniConfigSource();
// Create ini files in a directory structure
--
cgit v1.1
From 609375bf3723b6bd33c22dff60176b5ba8f2f81c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 14 Sep 2010 22:24:11 +0100
Subject: Fix "show threads" to show threads now being managed by
OpenSim.Framework.Watchdog
---
OpenSim/Framework/Servers/BaseOpenSimServer.cs | 26 ++++++++++----------------
OpenSim/Framework/Watchdog.cs | 14 ++++++++++++--
2 files changed, 22 insertions(+), 18 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index f0f8d01..cbab2db 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -37,6 +37,7 @@ using log4net;
using log4net.Appender;
using log4net.Core;
using log4net.Repository;
+using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
@@ -234,26 +235,19 @@ namespace OpenSim.Framework.Servers
protected string GetThreadsReport()
{
StringBuilder sb = new StringBuilder();
+ Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreads();
- ProcessThreadCollection threads = ThreadTracker.GetThreads();
- if (threads == null)
+ sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine);
+ foreach (Watchdog.ThreadWatchdogInfo twi in threads)
{
- sb.Append("OpenSim thread tracking is only enabled in DEBUG mode.");
+ Thread t = twi.Thread;
+
+ sb.Append(
+ "ID: " + t.ManagedThreadId + ", Name: " + t.Name + ", TimeRunning: "
+ + "Pri: " + t.Priority + ", State: " + t.ThreadState);
+ sb.Append(Environment.NewLine);
}
- else
- {
- sb.Append(threads.Count + " threads are being tracked:" + Environment.NewLine);
- foreach (ProcessThread t in threads)
- {
- sb.Append("ID: " + t.Id + ", TotalProcessorTime: " + t.TotalProcessorTime + ", TimeRunning: " +
- (DateTime.Now - t.StartTime) + ", Pri: " + t.CurrentPriority + ", State: " + t.ThreadState);
- if (t.ThreadState == System.Diagnostics.ThreadState.Wait)
- sb.Append(", Reason: " + t.WaitReason + Environment.NewLine);
- else
- sb.Append(Environment.NewLine);
- }
- }
int workers = 0, ports = 0, maxWorkers = 0, maxPorts = 0;
ThreadPool.GetAvailableThreads(out workers, out ports);
ThreadPool.GetMaxThreads(out maxWorkers, out maxPorts);
diff --git a/OpenSim/Framework/Watchdog.cs b/OpenSim/Framework/Watchdog.cs
index 5d46905..0f34e83 100644
--- a/OpenSim/Framework/Watchdog.cs
+++ b/OpenSim/Framework/Watchdog.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -27,6 +27,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Threading;
using log4net;
@@ -43,7 +44,7 @@ namespace OpenSim.Framework
const int WATCHDOG_TIMEOUT_MS = 5000;
[System.Diagnostics.DebuggerDisplay("{Thread.Name}")]
- private class ThreadWatchdogInfo
+ public class ThreadWatchdogInfo
{
public Thread Thread;
public int LastTick;
@@ -149,6 +150,15 @@ namespace OpenSim.Framework
}
catch { }
}
+
+ ///
+ /// Get currently watched threads for diagnostic purposes
+ ///
+ ///
+ public static ThreadWatchdogInfo[] GetThreads()
+ {
+ return m_threads.Values.ToArray();
+ }
private static void WatchdogTimerElapsed(object sender, System.Timers.ElapsedEventArgs e)
{
--
cgit v1.1