aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-05-16 17:22:38 +0100
committerMelanie2010-05-16 17:22:38 +0100
commitd8bf370fd641488292ff211e989897433f65638e (patch)
tree7f16dbae78ba14010860cddb0ded548f46bc0d6a
parentMerge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/va... (diff)
parentFixes mantis #4691 for real. This time I tested it, and it works. (diff)
downloadopensim-SC_OLD-d8bf370fd641488292ff211e989897433f65638e.zip
opensim-SC_OLD-d8bf370fd641488292ff211e989897433f65638e.tar.gz
opensim-SC_OLD-d8bf370fd641488292ff211e989897433f65638e.tar.bz2
opensim-SC_OLD-d8bf370fd641488292ff211e989897433f65638e.tar.xz
Merge branch 'master' into careminster-presence-refactor
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs37
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs2
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs20
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs6
4 files changed, 39 insertions, 26 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5973847..3d59615 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3383,7 +3383,6 @@ namespace OpenSim.Region.Framework.Scenes
3383 /// </summary> 3383 /// </summary>
3384 public void RegisterCommsEvents() 3384 public void RegisterCommsEvents()
3385 { 3385 {
3386 m_sceneGridService.OnExpectUser += HandleNewUserConnection;
3387 m_sceneGridService.OnAvatarCrossingIntoRegion += AgentCrossing; 3386 m_sceneGridService.OnAvatarCrossingIntoRegion += AgentCrossing;
3388 m_sceneGridService.OnCloseAgentConnection += IncomingCloseAgent; 3387 m_sceneGridService.OnCloseAgentConnection += IncomingCloseAgent;
3389 //m_eventManager.OnRegionUp += OtherRegionUp; 3388 //m_eventManager.OnRegionUp += OtherRegionUp;
@@ -3404,7 +3403,6 @@ namespace OpenSim.Region.Framework.Scenes
3404 //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar; 3403 //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar;
3405 //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate; 3404 //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate;
3406 //m_eventManager.OnRegionUp -= OtherRegionUp; 3405 //m_eventManager.OnRegionUp -= OtherRegionUp;
3407 m_sceneGridService.OnExpectUser -= HandleNewUserConnection;
3408 m_sceneGridService.OnAvatarCrossingIntoRegion -= AgentCrossing; 3406 m_sceneGridService.OnAvatarCrossingIntoRegion -= AgentCrossing;
3409 m_sceneGridService.OnCloseAgentConnection -= IncomingCloseAgent; 3407 m_sceneGridService.OnCloseAgentConnection -= IncomingCloseAgent;
3410 m_sceneGridService.OnGetLandData -= GetLandData; 3408 m_sceneGridService.OnGetLandData -= GetLandData;
@@ -3416,22 +3414,6 @@ namespace OpenSim.Region.Framework.Scenes
3416 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName); 3414 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName);
3417 } 3415 }
3418 3416
3419 /// <summary>
3420 /// A handler for the SceneCommunicationService event, to match that events return type of void.
3421 /// Use NewUserConnection() directly if possible so the return type can refuse connections.
3422 /// At the moment nothing actually seems to use this event,
3423 /// as everything is switching to calling the NewUserConnection method directly.
3424 ///
3425 /// Now obsoleting this because it doesn't handle teleportFlags propertly
3426 ///
3427 /// </summary>
3428 /// <param name="agent"></param>
3429 [Obsolete("Please call NewUserConnection directly.")]
3430 public void HandleNewUserConnection(AgentCircuitData agent)
3431 {
3432 string reason;
3433 NewUserConnection(agent, 0, out reason);
3434 }
3435 3417
3436 /// <summary> 3418 /// <summary>
3437 /// Do the work necessary to initiate a new user connection for a particular scene. 3419 /// Do the work necessary to initiate a new user connection for a particular scene.
@@ -3493,13 +3475,22 @@ namespace OpenSim.Region.Framework.Scenes
3493 ScenePresence sp = GetScenePresence(agent.AgentID); 3475 ScenePresence sp = GetScenePresence(agent.AgentID);
3494 if (sp != null) 3476 if (sp != null)
3495 { 3477 {
3496 m_log.DebugFormat( 3478 if (sp.IsChildAgent)
3497 "[SCENE]: Adjusting known seeds for existing agent {0} in {1}", 3479 {
3498 agent.AgentID, RegionInfo.RegionName); 3480 m_log.DebugFormat(
3481 "[SCENE]: Adjusting known seeds for existing agent {0} in {1}",
3482 agent.AgentID, RegionInfo.RegionName);
3499 3483
3500 sp.AdjustKnownSeeds(); 3484 sp.AdjustKnownSeeds();
3501 3485
3502 return true; 3486 return true;
3487 }
3488 else
3489 {
3490 // We have a zombie from a crashed session. Kill it.
3491 m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName);
3492 sp.ControllingClient.Close();
3493 }
3503 } 3494 }
3504 3495
3505 CapsModule.AddCapsHandler(agent.AgentID); 3496 CapsModule.AddCapsHandler(agent.AgentID);
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
386 XInventoryItem[] items = m_Database.GetActiveGestures(principalID); 386 XInventoryItem[] items = m_Database.GetActiveGestures(principalID);
387 387
388 if (items.Length == 0) 388 if (items.Length == 0)
389 return null; 389 return new List<InventoryItemBase>();
390 390
391 List<InventoryItemBase> ret = new List<InventoryItemBase>(); 391 List<InventoryItemBase> ret = new List<InventoryItemBase>();
392 392
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index dc5ca51..edf41bc 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -222,12 +222,14 @@ namespace OpenSim.Services.LLLoginService
222 222
223 public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, 223 public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
224 GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, 224 GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
225 string where, string startlocation, Vector3 position, Vector3 lookAt, string message, 225 string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
226 GridRegion home, IPEndPoint clientIP) 226 GridRegion home, IPEndPoint clientIP)
227 : this() 227 : this()
228 { 228 {
229 FillOutInventoryData(invSkel, libService); 229 FillOutInventoryData(invSkel, libService);
230 230
231 FillOutActiveGestures(gestures);
232
231 CircuitCode = (int)aCircuit.circuitcode; 233 CircuitCode = (int)aCircuit.circuitcode;
232 Lastname = account.LastName; 234 Lastname = account.LastName;
233 Firstname = account.FirstName; 235 Firstname = account.FirstName;
@@ -288,6 +290,22 @@ namespace OpenSim.Services.LLLoginService
288 } 290 }
289 } 291 }
290 292
293 private void FillOutActiveGestures(List<InventoryItemBase> gestures)
294 {
295 ArrayList list = new ArrayList();
296 if (gestures != null)
297 {
298 foreach (InventoryItemBase gesture in gestures)
299 {
300 Hashtable item = new Hashtable();
301 item["item_id"] = gesture.ID.ToString();
302 item["asset_id"] = gesture.AssetID.ToString();
303 list.Add(item);
304 }
305 }
306 ActiveGestures = list;
307 }
308
291 private void FillOutHomeData(GridUserInfo pinfo, GridRegion home) 309 private void FillOutHomeData(GridUserInfo pinfo, GridRegion home)
292 { 310 {
293 int x = 1000 * (int)Constants.RegionSize, y = 1000 * (int)Constants.RegionSize; 311 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 c85d35a..83f9ade 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -278,6 +278,10 @@ namespace OpenSim.Services.LLLoginService
278 return LLFailedLoginResponse.InventoryProblem; 278 return LLFailedLoginResponse.InventoryProblem;
279 } 279 }
280 280
281 // Get active gestures
282 List<InventoryItemBase> gestures = m_InventoryService.GetActiveGestures(account.PrincipalID);
283 m_log.DebugFormat("[LLOGIN SERVICE]: {0} active gestures", gestures.Count);
284
281 // 285 //
282 // Login the presence 286 // Login the presence
283 // 287 //
@@ -356,7 +360,7 @@ namespace OpenSim.Services.LLLoginService
356 // Finally, fill out the response and return it 360 // Finally, fill out the response and return it
357 // 361 //
358 LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, 362 LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
359 where, startLocation, position, lookAt, m_WelcomeMessage, home, clientIP); 363 where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP);
360 364
361 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client."); 365 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client.");
362 return response; 366 return response;