diff options
author | UbitUmarov | 2015-09-02 19:54:53 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-02 19:54:53 +0100 |
commit | a11edceb00b5b86f825bd957bdac9edb91f893dd (patch) | |
tree | c192eae26f3aadf365a66f32fc6d9ade2f0a0c61 /OpenSim/Region/CoreModules/Avatar | |
parent | bad merge? (diff) | |
download | opensim-SC-a11edceb00b5b86f825bd957bdac9edb91f893dd.zip opensim-SC-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.gz opensim-SC-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.bz2 opensim-SC-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.xz |
seems to compile ( tests comented out)
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
10 files changed, 104 insertions, 174 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index b24dc0c..92beed2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -406,25 +406,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
406 | 406 | ||
407 | Dictionary<SceneObjectGroup, string> scriptStates = new Dictionary<SceneObjectGroup, string>(); | 407 | Dictionary<SceneObjectGroup, string> scriptStates = new Dictionary<SceneObjectGroup, string>(); |
408 | 408 | ||
409 | <<<<<<< HEAD | ||
410 | foreach (SceneObjectGroup so in attachments) | ||
411 | { | ||
412 | // Scripts MUST be snapshotted before the object is | ||
413 | // removed from the scene because doing otherwise will | ||
414 | // clobber the run flag | ||
415 | // This must be done outside the sp.AttachmentSyncLock so that there is no risk of a deadlock from | ||
416 | // scripts performing attachment operations at the same time. Getting object states stops the scripts. | ||
417 | scriptStates[so] = PrepareScriptInstanceForSave(so, false); | ||
418 | |||
419 | // m_log.DebugFormat( | ||
420 | // "[ATTACHMENTS MODULE]: For object {0} for {1} in {2} got saved state {3}", | ||
421 | // so.Name, sp.Name, m_scene.Name, scriptStates[so]); | ||
422 | } | ||
423 | 409 | ||
424 | lock (sp.AttachmentsSyncLock) | ||
425 | ======= | ||
426 | if (sp.PresenceType != PresenceType.Npc) | 410 | if (sp.PresenceType != PresenceType.Npc) |
427 | >>>>>>> avn/ubitvar | ||
428 | { | 411 | { |
429 | foreach (SceneObjectGroup so in attachments) | 412 | foreach (SceneObjectGroup so in attachments) |
430 | { | 413 | { |
@@ -477,18 +460,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
477 | if (!Enabled) | 460 | if (!Enabled) |
478 | return false; | 461 | return false; |
479 | 462 | ||
480 | <<<<<<< HEAD | ||
481 | group.DetachFromBackup(); | ||
482 | |||
483 | bool success = AttachObjectInternal(sp, group, attachmentPt, silent, addToInventory, false, append); | ||
484 | |||
485 | if (!success) | ||
486 | group.AttachToBackup(); | ||
487 | |||
488 | return success; | ||
489 | ======= | ||
490 | return AttachObjectInternal(sp, group, attachmentPt, silent, useAttachData, addToInventory, false, append); | 463 | return AttachObjectInternal(sp, group, attachmentPt, silent, useAttachData, addToInventory, false, append); |
491 | >>>>>>> avn/ubitvar | ||
492 | } | 464 | } |
493 | 465 | ||
494 | /// <summary> | 466 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 1e9cfba..0d3b39e 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -229,7 +229,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
229 | private void SendAppearance(ScenePresence sp) | 229 | private void SendAppearance(ScenePresence sp) |
230 | { | 230 | { |
231 | // Send the appearance to everyone in the scene | 231 | // Send the appearance to everyone in the scene |
232 | sp.SendAppearanceToAllOtherClients(); | 232 | sp.SendAppearanceToAllOtherAgents(); |
233 | 233 | ||
234 | // Send animations back to the avatar as well | 234 | // Send animations back to the avatar as well |
235 | sp.Animator.SendAnimPack(); | 235 | sp.Animator.SendAnimPack(); |
@@ -460,7 +460,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
460 | { | 460 | { |
461 | m_log.Debug("[UpdateBakedCache] uploading to bakedModule cache"); | 461 | m_log.Debug("[UpdateBakedCache] uploading to bakedModule cache"); |
462 | 462 | ||
463 | m_BakedTextureModule.Store(sp.UUID); | 463 | m_BakedTextureModule.Store(sp.UUID, wearableCache); |
464 | } | 464 | } |
465 | } | 465 | } |
466 | 466 | ||
@@ -529,12 +529,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
529 | ); | 529 | ); |
530 | } | 530 | } |
531 | } | 531 | } |
532 | <<<<<<< HEAD | ||
533 | |||
534 | // m_log.DebugFormat( | ||
535 | // "[AVFACTORY]: Looking for texture {0}, id {1} for {2} {3}", | ||
536 | // face.TextureID, idx, client.Name, client.AgentId); | ||
537 | ======= | ||
538 | */ | 532 | */ |
539 | bool wearableCacheValid = false; | 533 | bool wearableCacheValid = false; |
540 | if (wearableCache == null) | 534 | if (wearableCache == null) |
@@ -577,15 +571,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
577 | if (wearableCacheValid) | 571 | if (wearableCacheValid) |
578 | m_log.Debug("[ValidateBakedCache] have valid local cache"); | 572 | m_log.Debug("[ValidateBakedCache] have valid local cache"); |
579 | } | 573 | } |
580 | >>>>>>> avn/ubitvar | ||
581 | 574 | ||
582 | bool checkExternal = false; | 575 | bool checkExternal = false; |
583 | 576 | ||
584 | <<<<<<< HEAD | ||
585 | if (m_scene.AssetService.Get(face.TextureID.ToString()) == null) | ||
586 | return false; | ||
587 | } | ||
588 | ======= | ||
589 | if (!wearableCacheValid) | 577 | if (!wearableCacheValid) |
590 | { | 578 | { |
591 | // only use external bake module on login condition check | 579 | // only use external bake module on login condition check |
@@ -658,7 +646,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
658 | } | 646 | } |
659 | } | 647 | } |
660 | } | 648 | } |
661 | >>>>>>> avn/ubitvar | ||
662 | 649 | ||
663 | sp.Appearance.WearableCacheItems = wearableCache; | 650 | sp.Appearance.WearableCacheItems = wearableCache; |
664 | 651 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs index b7ff4e0..dd93449 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs | |||
@@ -132,7 +132,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
132 | for (byte i = 0; i < visualParams.Length; i++) | 132 | for (byte i = 0; i < visualParams.Length; i++) |
133 | visualParams[i] = i; | 133 | visualParams[i] = i; |
134 | 134 | ||
135 | <<<<<<< HEAD | ||
136 | Primitive.TextureEntry bakedTextureEntry = new Primitive.TextureEntry(TestHelpers.ParseTail(0x10)); | 135 | Primitive.TextureEntry bakedTextureEntry = new Primitive.TextureEntry(TestHelpers.ParseTail(0x10)); |
137 | uint eyesFaceIndex = (uint)AppearanceManager.BakeTypeToAgentTextureIndex(BakeType.Eyes); | 136 | uint eyesFaceIndex = (uint)AppearanceManager.BakeTypeToAgentTextureIndex(BakeType.Eyes); |
138 | Primitive.TextureEntryFace eyesFace = bakedTextureEntry.CreateFace(eyesFaceIndex); | 137 | Primitive.TextureEntryFace eyesFace = bakedTextureEntry.CreateFace(eyesFaceIndex); |
@@ -145,12 +144,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
145 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); | 144 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); |
146 | 145 | ||
147 | Assert.That(rebakeRequestsReceived, Is.EqualTo(0)); | 146 | Assert.That(rebakeRequestsReceived, Is.EqualTo(0)); |
148 | ======= | ||
149 | afm.SetAppearance(sp, new Primitive.TextureEntry(TestHelpers.ParseTail(0x10)), visualParams, new WearableCacheItem[0]); | ||
150 | |||
151 | // TODO: Check baked texture | ||
152 | Assert.AreEqual(visualParams, sp.Appearance.VisualParams); | ||
153 | >>>>>>> avn/ubitvar | ||
154 | } | 147 | } |
155 | 148 | ||
156 | [Test] | 149 | [Test] |
@@ -188,11 +181,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
188 | Primitive.TextureEntryFace eyesFace = bakedTextureEntry.CreateFace(eyesFaceIndex); | 181 | Primitive.TextureEntryFace eyesFace = bakedTextureEntry.CreateFace(eyesFaceIndex); |
189 | eyesFace.TextureID = eyesTextureId; | 182 | eyesFace.TextureID = eyesTextureId; |
190 | 183 | ||
191 | <<<<<<< HEAD | ||
192 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); | ||
193 | ======= | ||
194 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, new WearableCacheItem[0]); | 184 | afm.SetAppearance(sp, bakedTextureEntry, visualParams, new WearableCacheItem[0]); |
195 | >>>>>>> avn/ubitvar | ||
196 | afm.SaveBakedTextures(userId); | 185 | afm.SaveBakedTextures(userId); |
197 | // Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures = afm.GetBakedTextureFaces(userId); | 186 | // Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures = afm.GetBakedTextureFaces(userId); |
198 | 187 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs index 7d2cad6..b8a1dba 100644 --- a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs | |||
@@ -151,6 +151,14 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures | |||
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
154 | public void Store(UUID agentId) | ||
155 | { | ||
156 | } | ||
157 | public void UpdateMeshAvatar(UUID agentId) | ||
158 | { | ||
159 | } | ||
160 | |||
161 | |||
154 | public void Store(UUID agentId, WearableCacheItem[] data) | 162 | public void Store(UUID agentId, WearableCacheItem[] data) |
155 | { | 163 | { |
156 | if (m_URL == String.Empty) | 164 | if (m_URL == String.Empty) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 2801ef0..0b5d95b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -214,13 +214,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
214 | UUID destination = c.Destination; | 214 | UUID destination = c.Destination; |
215 | Vector3 fromPos = c.Position; | 215 | Vector3 fromPos = c.Position; |
216 | Vector3 regionPos = new Vector3(scene.RegionInfo.WorldLocX, scene.RegionInfo.WorldLocY, 0); | 216 | Vector3 regionPos = new Vector3(scene.RegionInfo.WorldLocX, scene.RegionInfo.WorldLocY, 0); |
217 | <<<<<<< HEAD | ||
218 | ======= | ||
219 | 217 | ||
220 | bool checkParcelHide = false; | 218 | bool checkParcelHide = false; |
221 | UUID sourceParcelID = UUID.Zero; | 219 | UUID sourceParcelID = UUID.Zero; |
222 | Vector3 hidePos = fromPos; | 220 | Vector3 hidePos = fromPos; |
223 | >>>>>>> avn/ubitvar | ||
224 | 221 | ||
225 | if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel; | 222 | if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel; |
226 | 223 | ||
@@ -377,27 +374,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
377 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); | 374 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); |
378 | HashSet<UUID> receiverIDs = new HashSet<UUID>(); | 375 | HashSet<UUID> receiverIDs = new HashSet<UUID>(); |
379 | 376 | ||
380 | <<<<<<< HEAD | ||
381 | ((Scene)c.Scene).ForEachRootClient( | ||
382 | delegate(IClientAPI client) | ||
383 | { | ||
384 | // don't forward SayOwner chat from objects to | ||
385 | // non-owner agents | ||
386 | if ((c.Type == ChatTypeEnum.Owner) && | ||
387 | (null != c.SenderObject) && | ||
388 | (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId)) | ||
389 | return; | ||
390 | |||
391 | client.SendChatMessage( | ||
392 | c.Message, (byte)cType, CenterOfRegion, fromName, fromID, ownerID, | ||
393 | (byte)sourceType, (byte)ChatAudibleLevel.Fully); | ||
394 | |||
395 | receiverIDs.Add(client.AgentId); | ||
396 | }); | ||
397 | |||
398 | (c.Scene as Scene).EventManager.TriggerOnChatToClients( | ||
399 | fromID, receiverIDs, c.Message, cType, CenterOfRegion, fromName, sourceType, ChatAudibleLevel.Fully); | ||
400 | ======= | ||
401 | if (c.Scene != null) | 377 | if (c.Scene != null) |
402 | { | 378 | { |
403 | ((Scene)c.Scene).ForEachRootClient | 379 | ((Scene)c.Scene).ForEachRootClient |
@@ -419,7 +395,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
419 | (c.Scene as Scene).EventManager.TriggerOnChatToClients( | 395 | (c.Scene as Scene).EventManager.TriggerOnChatToClients( |
420 | fromID, receiverIDs, c.Message, cType, CenterOfRegion, fromName, sourceType, ChatAudibleLevel.Fully); | 396 | fromID, receiverIDs, c.Message, cType, CenterOfRegion, fromName, sourceType, ChatAudibleLevel.Fully); |
421 | } | 397 | } |
422 | >>>>>>> avn/ubitvar | ||
423 | } | 398 | } |
424 | 399 | ||
425 | /// <summary> | 400 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index b0b7054..4e1958a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -183,15 +183,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
183 | try | 183 | try |
184 | { | 184 | { |
185 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 185 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
186 | <<<<<<< HEAD | ||
187 | |||
188 | if (obj == null) | ||
189 | return; | ||
190 | |||
191 | ======= | ||
192 | if (obj == null) | 186 | if (obj == null) |
193 | return; | 187 | return; |
194 | >>>>>>> avn/ubitvar | ||
195 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 | 188 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 |
196 | || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) | 189 | || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) |
197 | { | 190 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 5573c94..3c82fd9 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -188,7 +188,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
188 | SendGridInstantMessageViaXMLRPC(im, result); | 188 | SendGridInstantMessageViaXMLRPC(im, result); |
189 | } | 189 | } |
190 | 190 | ||
191 | public void HandleUndeliverableMessage(GridInstantMessage im, MessageResultNotification result) | 191 | public virtual void HandleUndeliverableMessage(GridInstantMessage im, MessageResultNotification result) |
192 | { | 192 | { |
193 | UndeliveredMessage handlerUndeliveredMessage = OnUndeliveredMessage; | 193 | UndeliveredMessage handlerUndeliveredMessage = OnUndeliveredMessage; |
194 | 194 | ||
@@ -445,14 +445,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
445 | return resp; | 445 | return resp; |
446 | } | 446 | } |
447 | 447 | ||
448 | <<<<<<< HEAD | 448 | |
449 | /// <summary> | 449 | /// <summary> |
450 | /// delegate for sending a grid instant message asynchronously | 450 | /// delegate for sending a grid instant message asynchronously |
451 | /// </summary> | 451 | /// </summary> |
452 | public delegate void GridInstantMessageDelegate(GridInstantMessage im, MessageResultNotification result); | ||
453 | ======= | ||
454 | private delegate void GridInstantMessageDelegate(GridInstantMessage im, MessageResultNotification result); | 452 | private delegate void GridInstantMessageDelegate(GridInstantMessage im, MessageResultNotification result); |
455 | >>>>>>> avn/ubitvar | ||
456 | 453 | ||
457 | private class GIM { | 454 | private class GIM { |
458 | public GridInstantMessage im; | 455 | public GridInstantMessage im; |
@@ -479,31 +476,22 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
479 | } | 476 | } |
480 | } | 477 | } |
481 | 478 | ||
482 | <<<<<<< HEAD | 479 | |
483 | d.BeginInvoke(im, result, GridInstantMessageCompleted, d); | ||
484 | ======= | ||
485 | private void GridInstantMessageCompleted(IAsyncResult iar) | 480 | private void GridInstantMessageCompleted(IAsyncResult iar) |
486 | { | 481 | { |
487 | GridInstantMessageDelegate d = (GridInstantMessageDelegate)iar.AsyncState; | 482 | GridInstantMessageDelegate d = (GridInstantMessageDelegate)iar.AsyncState; |
488 | d.EndInvoke(iar); | 483 | d.EndInvoke(iar); |
489 | >>>>>>> avn/ubitvar | ||
490 | } | 484 | } |
491 | 485 | ||
492 | /// <summary> | 486 | /// <summary> |
493 | /// Internal SendGridInstantMessage over XMLRPC method. | 487 | /// Internal SendGridInstantMessage over XMLRPC method. |
494 | /// </summary> | 488 | /// </summary> |
495 | <<<<<<< HEAD | 489 | |
496 | /// <remarks> | ||
497 | /// This is called from within a dedicated thread. | ||
498 | /// </remarks> | ||
499 | private void SendGridInstantMessageViaXMLRPCAsync(GridInstantMessage im, MessageResultNotification result) | ||
500 | ======= | ||
501 | /// <param name="prevRegionHandle"> | 490 | /// <param name="prevRegionHandle"> |
502 | /// Pass in 0 the first time this method is called. It will be called recursively with the last | 491 | /// Pass in 0 the first time this method is called. It will be called recursively with the last |
503 | /// regionhandle tried | 492 | /// regionhandle tried |
504 | /// </param> | 493 | /// </param> |
505 | private void SendGridInstantMessageViaXMLRPCAsyncMain(GridInstantMessage im, MessageResultNotification result) | 494 | private void SendGridInstantMessageViaXMLRPCAsyncMain(GridInstantMessage im, MessageResultNotification result) |
506 | >>>>>>> avn/ubitvar | ||
507 | { | 495 | { |
508 | GIM gim; | 496 | GIM gim; |
509 | do { | 497 | do { |
@@ -525,87 +513,124 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
525 | } | 513 | } |
526 | } while (gim != null); | 514 | } while (gim != null); |
527 | } | 515 | } |
516 | |||
528 | private void SendGridInstantMessageViaXMLRPCAsync(GridInstantMessage im, MessageResultNotification result, UUID prevRegionID) | 517 | private void SendGridInstantMessageViaXMLRPCAsync(GridInstantMessage im, MessageResultNotification result, UUID prevRegionID) |
529 | { | 518 | { |
530 | 519 | ||
531 | UUID toAgentID = new UUID(im.toAgentID); | 520 | UUID toAgentID = new UUID(im.toAgentID); |
521 | PresenceInfo upd = null; | ||
532 | UUID regionID; | 522 | UUID regionID; |
533 | bool needToLookupAgent; | 523 | bool lookupAgent = false; |
534 | 524 | ||
535 | lock (m_UserRegionMap) | 525 | lock (m_UserRegionMap) |
536 | needToLookupAgent = !m_UserRegionMap.TryGetValue(toAgentID, out regionID); | ||
537 | |||
538 | while (true) | ||
539 | { | 526 | { |
540 | if (needToLookupAgent) | 527 | if (m_UserRegionMap.ContainsKey(toAgentID)) |
541 | { | 528 | { |
542 | PresenceInfo[] presences = PresenceService.GetAgents(new string[] { toAgentID.ToString() }); | 529 | upd = new PresenceInfo(); |
530 | upd.RegionID = m_UserRegionMap[toAgentID]; | ||
531 | |||
532 | // We need to compare the current regionhandle with the previous region handle | ||
533 | // or the recursive loop will never end because it will never try to lookup the agent again | ||
534 | if (prevRegionID == upd.RegionID) | ||
535 | { | ||
536 | lookupAgent = true; | ||
537 | } | ||
538 | } | ||
539 | else | ||
540 | { | ||
541 | lookupAgent = true; | ||
542 | } | ||
543 | } | ||
543 | 544 | ||
544 | UUID foundRegionID = UUID.Zero; | ||
545 | 545 | ||
546 | if (presences != null) | 546 | // Are we needing to look-up an agent? |
547 | if (lookupAgent) | ||
548 | { | ||
549 | // Non-cached user agent lookup. | ||
550 | PresenceInfo[] presences = PresenceService.GetAgents(new string[] { toAgentID.ToString() }); | ||
551 | if (presences != null && presences.Length > 0) | ||
552 | { | ||
553 | foreach (PresenceInfo p in presences) | ||
547 | { | 554 | { |
548 | foreach (PresenceInfo p in presences) | 555 | if (p.RegionID != UUID.Zero) |
549 | { | 556 | { |
550 | if (p.RegionID != UUID.Zero) | 557 | upd = p; |
551 | { | 558 | break; |
552 | foundRegionID = p.RegionID; | ||
553 | break; | ||
554 | } | ||
555 | } | 559 | } |
556 | } | 560 | } |
557 | |||
558 | // If not found or the found region is the same as the last lookup, then message is undeliverable | ||
559 | if (foundRegionID == UUID.Zero || foundRegionID == regionID) | ||
560 | break; | ||
561 | else | ||
562 | regionID = foundRegionID; | ||
563 | } | 561 | } |
564 | 562 | ||
565 | GridRegion reginfo = m_Scenes[0].GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, regionID); | 563 | if (upd != null) |
566 | if (reginfo == null) | ||
567 | { | 564 | { |
568 | m_log.WarnFormat("[GRID INSTANT MESSAGE]: Unable to find region {0}", regionID); | 565 | // check if we've tried this before.. |
569 | break; | 566 | // This is one way to end the recursive loop |
567 | // | ||
568 | if (upd.RegionID == prevRegionID) | ||
569 | { | ||
570 | // m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message"); | ||
571 | HandleUndeliverableMessage(im, result); | ||
572 | return; | ||
573 | } | ||
570 | } | 574 | } |
575 | else | ||
576 | { | ||
577 | // m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message"); | ||
578 | HandleUndeliverableMessage(im, result); | ||
579 | return; | ||
580 | } | ||
581 | } | ||
571 | 582 | ||
572 | <<<<<<< HEAD | ||
573 | // Try to send the message to the agent via the retrieved region. | ||
574 | Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(im); | ||
575 | msgdata["region_handle"] = 0; | ||
576 | bool imresult = doIMSending(reginfo, msgdata); | ||
577 | |||
578 | // If the message delivery was successful, then cache the entry. | ||
579 | if (imresult) | ||
580 | ======= | ||
581 | if (upd != null) | 583 | if (upd != null) |
582 | { | 584 | { |
583 | GridRegion reginfo = m_Scenes[0].GridService.GetRegionByUUID(UUID.Zero, | 585 | GridRegion reginfo = m_Scenes[0].GridService.GetRegionByUUID(UUID.Zero, |
584 | upd.RegionID); | 586 | upd.RegionID); |
585 | if (reginfo != null) | 587 | if (reginfo != null) |
586 | >>>>>>> avn/ubitvar | ||
587 | { | 588 | { |
588 | lock (m_UserRegionMap) | 589 | Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(im); |
590 | // Not actually used anymore, left in for compatibility | ||
591 | // Remove at next interface change | ||
592 | // | ||
593 | msgdata["region_handle"] = 0; | ||
594 | bool imresult = doIMSending(reginfo, msgdata); | ||
595 | if (imresult) | ||
596 | { | ||
597 | // IM delivery successful, so store the Agent's location in our local cache. | ||
598 | lock (m_UserRegionMap) | ||
599 | { | ||
600 | if (m_UserRegionMap.ContainsKey(toAgentID)) | ||
601 | { | ||
602 | m_UserRegionMap[toAgentID] = upd.RegionID; | ||
603 | } | ||
604 | else | ||
605 | { | ||
606 | m_UserRegionMap.Add(toAgentID, upd.RegionID); | ||
607 | } | ||
608 | } | ||
609 | result(true); | ||
610 | } | ||
611 | else | ||
589 | { | 612 | { |
590 | m_UserRegionMap[toAgentID] = regionID; | 613 | // try again, but lookup user this time. |
614 | // Warning, this must call the Async version | ||
615 | // of this method or we'll be making thousands of threads | ||
616 | // The version within the spawned thread is SendGridInstantMessageViaXMLRPCAsync | ||
617 | // The version that spawns the thread is SendGridInstantMessageViaXMLRPC | ||
618 | |||
619 | // This is recursive!!!!! | ||
620 | SendGridInstantMessageViaXMLRPCAsync(im, result, | ||
621 | upd.RegionID); | ||
591 | } | 622 | } |
592 | result(true); | ||
593 | return; | ||
594 | } | 623 | } |
595 | 624 | else | |
596 | // If we reach this point in the first iteration of the while, then we may have unsuccessfully tried | 625 | { |
597 | // to use a locally cached region ID. All subsequent attempts need to lookup agent details from | 626 | m_log.WarnFormat("[GRID INSTANT MESSAGE]: Unable to find region {0}", upd.RegionID); |
598 | // the presence service. | 627 | HandleUndeliverableMessage(im, result); |
599 | needToLookupAgent = true; | 628 | } |
629 | } | ||
630 | else | ||
631 | { | ||
632 | HandleUndeliverableMessage(im, result); | ||
600 | } | 633 | } |
601 | |||
602 | // If we reached this point then the message was not deliverable. Remove the bad cache entry and | ||
603 | // signal the delivery failure. | ||
604 | lock (m_UserRegionMap) | ||
605 | m_UserRegionMap.Remove(toAgentID); | ||
606 | |||
607 | // m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message"); | ||
608 | HandleUndeliverableMessage(im, result); | ||
609 | } | 634 | } |
610 | 635 | ||
611 | /// <summary> | 636 | /// <summary> |
@@ -709,6 +734,5 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
709 | gim["message_key"] = m_MessageKey; | 734 | gim["message_key"] = m_MessageKey; |
710 | return gim; | 735 | return gim; |
711 | } | 736 | } |
712 | |||
713 | } | 737 | } |
714 | } | 738 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 76023bd..1650097 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -238,7 +238,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
238 | return; | 238 | return; |
239 | } | 239 | } |
240 | 240 | ||
241 | <<<<<<< HEAD | ||
242 | if (!m_ForwardOfflineGroupMessages) | 241 | if (!m_ForwardOfflineGroupMessages) |
243 | { | 242 | { |
244 | if (im.dialog == (byte)InstantMessageDialog.GroupNotice || | 243 | if (im.dialog == (byte)InstantMessageDialog.GroupNotice || |
@@ -246,9 +245,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
246 | return; | 245 | return; |
247 | } | 246 | } |
248 | 247 | ||
249 | bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( | ||
250 | "POST", m_RestURL+"/SaveMessage/", im, 10000); | ||
251 | ======= | ||
252 | Scene scene = FindScene(new UUID(im.fromAgentID)); | 248 | Scene scene = FindScene(new UUID(im.fromAgentID)); |
253 | if (scene == null) | 249 | if (scene == null) |
254 | scene = m_SceneList[0]; | 250 | scene = m_SceneList[0]; |
@@ -256,7 +252,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
256 | SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>( | 252 | SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>( |
257 | "POST", m_RestURL+"/SaveMessage/?scope=" + | 253 | "POST", m_RestURL+"/SaveMessage/?scope=" + |
258 | scene.RegionInfo.ScopeID.ToString(), im); | 254 | scene.RegionInfo.ScopeID.ToString(), im); |
259 | >>>>>>> avn/ubitvar | ||
260 | 255 | ||
261 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) | 256 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) |
262 | { | 257 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 18e18a9..2d15b47 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -180,13 +180,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
180 | "[INVENTORY TRANSFER]: Inserting original folder {0} into agent {1}'s inventory", | 180 | "[INVENTORY TRANSFER]: Inserting original folder {0} into agent {1}'s inventory", |
181 | folderID, new UUID(im.toAgentID)); | 181 | folderID, new UUID(im.toAgentID)); |
182 | 182 | ||
183 | <<<<<<< HEAD | ||
184 | InventoryFolderBase folderCopy | 183 | InventoryFolderBase folderCopy |
185 | = scene.GiveInventoryFolder(client, receipientID, client.AgentId, folderID, UUID.Zero); | 184 | = scene.GiveInventoryFolder(client, recipientID, client.AgentId, folderID, UUID.Zero); |
186 | ======= | ||
187 | InventoryFolderBase folderCopy | ||
188 | = scene.GiveInventoryFolder(recipientID, client.AgentId, folderID, UUID.Zero); | ||
189 | >>>>>>> avn/ubitvar | ||
190 | 185 | ||
191 | if (folderCopy == null) | 186 | if (folderCopy == null) |
192 | { | 187 | { |
@@ -475,7 +470,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
475 | /// <param name="im"></param> | 470 | /// <param name="im"></param> |
476 | private void OnGridInstantMessage(GridInstantMessage im) | 471 | private void OnGridInstantMessage(GridInstantMessage im) |
477 | { | 472 | { |
478 | <<<<<<< HEAD | ||
479 | // Check if it's a type of message that we should handle | 473 | // Check if it's a type of message that we should handle |
480 | if (!((im.dialog == (byte) InstantMessageDialog.InventoryOffered) | 474 | if (!((im.dialog == (byte) InstantMessageDialog.InventoryOffered) |
481 | || (im.dialog == (byte) InstantMessageDialog.TaskInventoryOffered) | 475 | || (im.dialog == (byte) InstantMessageDialog.TaskInventoryOffered) |
@@ -488,8 +482,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
488 | "[INVENTORY TRANSFER]: {0} IM type received from grid. From={1} ({2}), To={3}", | 482 | "[INVENTORY TRANSFER]: {0} IM type received from grid. From={1} ({2}), To={3}", |
489 | (InstantMessageDialog)im.dialog, im.fromAgentID, im.fromAgentName, im.toAgentID); | 483 | (InstantMessageDialog)im.dialog, im.fromAgentID, im.fromAgentName, im.toAgentID); |
490 | 484 | ||
491 | ======= | ||
492 | >>>>>>> avn/ubitvar | ||
493 | // Check if this is ours to handle | 485 | // Check if this is ours to handle |
494 | // | 486 | // |
495 | Scene scene = FindClientScene(new UUID(im.toAgentID)); | 487 | Scene scene = FindClientScene(new UUID(im.toAgentID)); |
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index bea2834..4d1611c 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -869,7 +869,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
869 | } | 869 | } |
870 | #endregion Notes | 870 | #endregion Notes |
871 | 871 | ||
872 | <<<<<<< HEAD | 872 | |
873 | #region User Preferences | 873 | #region User Preferences |
874 | /// <summary> | 874 | /// <summary> |
875 | /// Updates the user preferences. | 875 | /// Updates the user preferences. |
@@ -933,8 +933,6 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
933 | } | 933 | } |
934 | #endregion User Preferences | 934 | #endregion User Preferences |
935 | 935 | ||
936 | ======= | ||
937 | >>>>>>> avn/ubitvar | ||
938 | #region Avatar Properties | 936 | #region Avatar Properties |
939 | /// <summary> | 937 | /// <summary> |
940 | /// Update the avatars interests . | 938 | /// Update the avatars interests . |
@@ -1401,8 +1399,6 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1401 | return null; | 1399 | return null; |
1402 | } | 1400 | } |
1403 | #endregion Util | 1401 | #endregion Util |
1404 | <<<<<<< HEAD | ||
1405 | ======= | ||
1406 | 1402 | ||
1407 | #region Web Util | 1403 | #region Web Util |
1408 | /// <summary> | 1404 | /// <summary> |
@@ -1580,6 +1576,5 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1580 | return true; | 1576 | return true; |
1581 | } | 1577 | } |
1582 | #endregion Web Util | 1578 | #endregion Web Util |
1583 | >>>>>>> avn/ubitvar | ||
1584 | } | 1579 | } |
1585 | } | 1580 | } |