From b7e6b58857b147ac526669b38535b13c75d0dbd3 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 16 May 2010 09:01:27 -0700
Subject: Fixes mantis #4622.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 37 ++++++++++++--------------------
1 file changed, 14 insertions(+), 23 deletions(-)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 401551d..de8ecc2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3355,7 +3355,6 @@ namespace OpenSim.Region.Framework.Scenes
///
public void RegisterCommsEvents()
{
- m_sceneGridService.OnExpectUser += HandleNewUserConnection;
m_sceneGridService.OnAvatarCrossingIntoRegion += AgentCrossing;
m_sceneGridService.OnCloseAgentConnection += IncomingCloseAgent;
//m_eventManager.OnRegionUp += OtherRegionUp;
@@ -3376,7 +3375,6 @@ namespace OpenSim.Region.Framework.Scenes
//m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar;
//m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate;
//m_eventManager.OnRegionUp -= OtherRegionUp;
- m_sceneGridService.OnExpectUser -= HandleNewUserConnection;
m_sceneGridService.OnAvatarCrossingIntoRegion -= AgentCrossing;
m_sceneGridService.OnCloseAgentConnection -= IncomingCloseAgent;
m_sceneGridService.OnGetLandData -= GetLandData;
@@ -3388,22 +3386,6 @@ namespace OpenSim.Region.Framework.Scenes
m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName);
}
- ///
- /// A handler for the SceneCommunicationService event, to match that events return type of void.
- /// Use NewUserConnection() directly if possible so the return type can refuse connections.
- /// At the moment nothing actually seems to use this event,
- /// as everything is switching to calling the NewUserConnection method directly.
- ///
- /// Now obsoleting this because it doesn't handle teleportFlags propertly
- ///
- ///
- ///
- [Obsolete("Please call NewUserConnection directly.")]
- public void HandleNewUserConnection(AgentCircuitData agent)
- {
- string reason;
- NewUserConnection(agent, 0, out reason);
- }
///
/// Do the work necessary to initiate a new user connection for a particular scene.
@@ -3465,13 +3447,22 @@ namespace OpenSim.Region.Framework.Scenes
ScenePresence sp = GetScenePresence(agent.AgentID);
if (sp != null)
{
- m_log.DebugFormat(
- "[SCENE]: Adjusting known seeds for existing agent {0} in {1}",
- agent.AgentID, RegionInfo.RegionName);
+ if (sp.IsChildAgent)
+ {
+ m_log.DebugFormat(
+ "[SCENE]: Adjusting known seeds for existing agent {0} in {1}",
+ agent.AgentID, RegionInfo.RegionName);
- sp.AdjustKnownSeeds();
+ sp.AdjustKnownSeeds();
- return true;
+ return true;
+ }
+ else
+ {
+ // We have a zombie from a crashed session. Kill it.
+ m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName);
+ sp.ControllingClient.Close();
+ }
}
CapsModule.AddCapsHandler(agent.AgentID);
--
cgit v1.1
From 0b43b263d48b576df12fd88fc303ce9cfe2066ec Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 16 May 2010 09:12:40 -0700
Subject: Fixes mantis #4691
---
OpenSim/Services/InventoryService/XInventoryService.cs | 2 +-
OpenSim/Services/LLLoginService/LLLoginResponse.cs | 4 +++-
OpenSim/Services/LLLoginService/LLLoginService.cs | 5 ++++-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 4d7103b..974caf0 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -386,7 +386,7 @@ namespace OpenSim.Services.InventoryService
XInventoryItem[] items = m_Database.GetActiveGestures(principalID);
if (items.Length == 0)
- return null;
+ return new List();
List ret = new List();
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index d1dcfe7..32809ca 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -217,12 +217,14 @@ namespace OpenSim.Services.LLLoginService
public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
GridRegion destination, List invSkel, FriendInfo[] friendsList, ILibraryService libService,
- string where, string startlocation, Vector3 position, Vector3 lookAt, string message,
+ string where, string startlocation, Vector3 position, Vector3 lookAt, List gestures, string message,
GridRegion home, IPEndPoint clientIP)
: this()
{
FillOutInventoryData(invSkel, libService);
+ ActiveGestures = new ArrayList(gestures);
+
CircuitCode = (int)aCircuit.circuitcode;
Lastname = account.LastName;
Firstname = account.FirstName;
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 712b899..535cf42 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -272,6 +272,9 @@ namespace OpenSim.Services.LLLoginService
return LLFailedLoginResponse.InventoryProblem;
}
+ // Get active gestures
+ List gestures = m_InventoryService.GetActiveGestures(account.PrincipalID);
+
//
// Login the presence
//
@@ -350,7 +353,7 @@ namespace OpenSim.Services.LLLoginService
// Finally, fill out the response and return it
//
LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
- where, startLocation, position, lookAt, m_WelcomeMessage, home, clientIP);
+ where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP);
m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client.");
return response;
--
cgit v1.1
From 2fb79646c6622b7a6318d9971e0462c559e4ccfd Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 16 May 2010 10:32:57 -0700
Subject: Fixes mantis #4691 for real. This time I tested it, and it works.
---
OpenSim/Services/LLLoginService/LLLoginResponse.cs | 18 +++++++++++++++++-
OpenSim/Services/LLLoginService/LLLoginService.cs | 1 +
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index 32809ca..54d53fb 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -223,7 +223,7 @@ namespace OpenSim.Services.LLLoginService
{
FillOutInventoryData(invSkel, libService);
- ActiveGestures = new ArrayList(gestures);
+ FillOutActiveGestures(gestures);
CircuitCode = (int)aCircuit.circuitcode;
Lastname = account.LastName;
@@ -285,6 +285,22 @@ namespace OpenSim.Services.LLLoginService
}
}
+ private void FillOutActiveGestures(List gestures)
+ {
+ ArrayList list = new ArrayList();
+ if (gestures != null)
+ {
+ foreach (InventoryItemBase gesture in gestures)
+ {
+ Hashtable item = new Hashtable();
+ item["item_id"] = gesture.ID.ToString();
+ item["asset_id"] = gesture.AssetID.ToString();
+ list.Add(item);
+ }
+ }
+ ActiveGestures = list;
+ }
+
private void FillOutHomeData(GridUserInfo pinfo, GridRegion home)
{
int x = 1000 * (int)Constants.RegionSize, y = 1000 * (int)Constants.RegionSize;
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 535cf42..6319cc4 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -274,6 +274,7 @@ namespace OpenSim.Services.LLLoginService
// Get active gestures
List gestures = m_InventoryService.GetActiveGestures(account.PrincipalID);
+ m_log.DebugFormat("[LLOGIN SERVICE]: {0} active gestures", gestures.Count);
//
// Login the presence
--
cgit v1.1