aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Addons/Groups/GroupsMessagingModule.cs38
-rw-r--r--OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs4
-rw-r--r--OpenSim/Framework/AgentCircuitData.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs24
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs9
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs34
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs44
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs19
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainCompressor.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs113
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs15
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs9
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs6
-rw-r--r--OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs3
-rw-r--r--OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs28
-rw-r--r--OpenSim/Services/Interfaces/ISimulationService.cs3
-rw-r--r--OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs24
-rw-r--r--bin/OpenSim.ini.example5
-rw-r--r--bin/OpenSimDefaults.ini5
27 files changed, 300 insertions, 126 deletions
diff --git a/OpenSim/Addons/Groups/GroupsMessagingModule.cs b/OpenSim/Addons/Groups/GroupsMessagingModule.cs
index bbb5e05..e6a4765 100644
--- a/OpenSim/Addons/Groups/GroupsMessagingModule.cs
+++ b/OpenSim/Addons/Groups/GroupsMessagingModule.cs
@@ -56,8 +56,8 @@ namespace OpenSim.Groups
56 private IGroupsServicesConnector m_groupData = null; 56 private IGroupsServicesConnector m_groupData = null;
57 57
58 // Config Options 58 // Config Options
59 private bool m_groupMessagingEnabled = false; 59 private bool m_groupMessagingEnabled;
60 private bool m_debugEnabled = true; 60 private bool m_debugEnabled;
61 61
62 /// <summary> 62 /// <summary>
63 /// If enabled, module only tries to send group IMs to online users by querying cached presence information. 63 /// If enabled, module only tries to send group IMs to online users by querying cached presence information.
@@ -120,7 +120,7 @@ namespace OpenSim.Groups
120 return; 120 return;
121 } 121 }
122 122
123 m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true); 123 m_debugEnabled = groupsConfig.GetBoolean("MessagingDebugEnabled", m_debugEnabled);
124 124
125 m_log.InfoFormat( 125 m_log.InfoFormat(
126 "[Groups.Messaging]: GroupsMessagingModule enabled with MessageOnlineOnly = {0}, DebugEnabled = {1}", 126 "[Groups.Messaging]: GroupsMessagingModule enabled with MessageOnlineOnly = {0}, DebugEnabled = {1}",
@@ -140,6 +140,14 @@ namespace OpenSim.Groups
140 scene.EventManager.OnMakeChildAgent += OnMakeChildAgent; 140 scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;
141 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 141 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
142 scene.EventManager.OnClientLogin += OnClientLogin; 142 scene.EventManager.OnClientLogin += OnClientLogin;
143
144 scene.AddCommand(
145 "Debug",
146 this,
147 "debug groups messaging verbose",
148 "debug groups messaging verbose <true|false>",
149 "This setting turns on very verbose groups messaging debugging",
150 HandleDebugGroupsMessagingVerbose);
143 } 151 }
144 152
145 public void RegionLoaded(Scene scene) 153 public void RegionLoaded(Scene scene)
@@ -227,6 +235,26 @@ namespace OpenSim.Groups
227 235
228 #endregion 236 #endregion
229 237
238 private void HandleDebugGroupsMessagingVerbose(object modules, string[] args)
239 {
240 if (args.Length < 5)
241 {
242 MainConsole.Instance.Output("Usage: debug groups messaging verbose <true|false>");
243 return;
244 }
245
246 bool verbose = false;
247 if (!bool.TryParse(args[4], out verbose))
248 {
249 MainConsole.Instance.Output("Usage: debug groups messaging verbose <true|false>");
250 return;
251 }
252
253 m_debugEnabled = verbose;
254
255 MainConsole.Instance.OutputFormat("{0} verbose logging set to {1}", Name, m_debugEnabled);
256 }
257
230 /// <summary> 258 /// <summary>
231 /// Not really needed, but does confirm that the group exists. 259 /// Not really needed, but does confirm that the group exists.
232 /// </summary> 260 /// </summary>
@@ -255,6 +283,8 @@ namespace OpenSim.Groups
255 public void SendMessageToGroup( 283 public void SendMessageToGroup(
256 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition) 284 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition)
257 { 285 {
286 int requestStartTick = Environment.TickCount;
287
258 UUID fromAgentID = new UUID(im.fromAgentID); 288 UUID fromAgentID = new UUID(im.fromAgentID);
259 289
260 // Unlike current XmlRpcGroups, Groups V2 can accept UUID.Zero when a perms check for the requesting agent 290 // Unlike current XmlRpcGroups, Groups V2 can accept UUID.Zero when a perms check for the requesting agent
@@ -287,8 +317,6 @@ namespace OpenSim.Groups
287// "[Groups.Messaging]: SendMessageToGroup called for group {0} with {1} visible members, {2} online", 317// "[Groups.Messaging]: SendMessageToGroup called for group {0} with {1} visible members, {2} online",
288// groupID, groupMembersCount, groupMembers.Count()); 318// groupID, groupMembersCount, groupMembers.Count());
289 319
290 int requestStartTick = Environment.TickCount;
291
292 im.imSessionID = groupID.Guid; 320 im.imSessionID = groupID.Guid;
293 im.fromGroup = true; 321 im.fromGroup = true;
294 IClientAPI thisClient = GetActiveClient(fromAgentID); 322 IClientAPI thisClient = GetActiveClient(fromAgentID);
diff --git a/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs b/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs
index 690c955..02084ff 100644
--- a/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs
+++ b/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs
@@ -104,7 +104,7 @@ namespace OpenSim.OfflineIM
104 using (MemoryStream mstream = new MemoryStream()) 104 using (MemoryStream mstream = new MemoryStream())
105 { 105 {
106 XmlWriterSettings settings = new XmlWriterSettings(); 106 XmlWriterSettings settings = new XmlWriterSettings();
107 settings.Encoding = Encoding.UTF8; 107 settings.Encoding = Util.UTF8NoBomEncoding;
108 108
109 using (XmlWriter writer = XmlWriter.Create(mstream, settings)) 109 using (XmlWriter writer = XmlWriter.Create(mstream, settings))
110 { 110 {
@@ -112,7 +112,7 @@ namespace OpenSim.OfflineIM
112 writer.Flush(); 112 writer.Flush();
113 } 113 }
114 114
115 imXml = Util.UTF8.GetString(mstream.ToArray()); 115 imXml = Util.UTF8NoBomEncoding.GetString(mstream.ToArray());
116 } 116 }
117 117
118 OfflineIMData data = new OfflineIMData(); 118 OfflineIMData data = new OfflineIMData();
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs
index f2fe494..0d053e4 100644
--- a/OpenSim/Framework/AgentCircuitData.cs
+++ b/OpenSim/Framework/AgentCircuitData.cs
@@ -321,6 +321,8 @@ namespace OpenSim.Framework
321 Mac = args["mac"].AsString(); 321 Mac = args["mac"].AsString();
322 if (args["id0"] != null) 322 if (args["id0"] != null)
323 Id0 = args["id0"].AsString(); 323 Id0 = args["id0"].AsString();
324 if (args["teleport_flags"] != null)
325 teleportFlags = args["teleport_flags"].AsUInteger();
324 326
325 if (args["start_pos"] != null) 327 if (args["start_pos"] != null)
326 Vector3.TryParse(args["start_pos"].AsString(), out startpos); 328 Vector3.TryParse(args["start_pos"].AsString(), out startpos);
diff --git a/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs
index ed6a14c..2fe1a7d 100644
--- a/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs
@@ -90,14 +90,14 @@ namespace OpenSim.Framework.Servers.HttpServer
90 } 90 }
91 catch (Exception e) 91 catch (Exception e)
92 { 92 {
93 m_log.Debug(string.Format("JsonRpc request '{0}' failed", method), e); 93 m_log.Debug(string.Format("JsonRpc request '{0}' to {1} failed", method, uri), e);
94 return false; 94 return false;
95 } 95 }
96 96
97 if (!response.ContainsKey("_Result")) 97 if (!response.ContainsKey("_Result"))
98 { 98 {
99 m_log.DebugFormat("JsonRpc request '{0}' returned an invalid response: {1}", 99 m_log.DebugFormat("JsonRpc request '{0}' to {1} returned an invalid response: {2}",
100 method, OSDParser.SerializeJsonString(response)); 100 method, uri, OSDParser.SerializeJsonString(response));
101 return false; 101 return false;
102 } 102 }
103 response = (OSDMap)response["_Result"]; 103 response = (OSDMap)response["_Result"];
@@ -107,15 +107,15 @@ namespace OpenSim.Framework.Servers.HttpServer
107 if (response.ContainsKey("error")) 107 if (response.ContainsKey("error"))
108 { 108 {
109 data = response["error"]; 109 data = response["error"];
110 m_log.DebugFormat("JsonRpc request '{0}' returned an error: {1}", 110 m_log.DebugFormat("JsonRpc request '{0}' to {1} returned an error: {2}",
111 method, OSDParser.SerializeJsonString(data)); 111 method, uri, OSDParser.SerializeJsonString(data));
112 return false; 112 return false;
113 } 113 }
114 114
115 if (!response.ContainsKey("result")) 115 if (!response.ContainsKey("result"))
116 { 116 {
117 m_log.DebugFormat("JsonRpc request '{0}' returned an invalid response: {1}", 117 m_log.DebugFormat("JsonRpc request '{0}' to {1} returned an invalid response: {2}",
118 method, OSDParser.SerializeJsonString(response)); 118 method, uri, OSDParser.SerializeJsonString(response));
119 return false; 119 return false;
120 } 120 }
121 121
@@ -161,14 +161,14 @@ namespace OpenSim.Framework.Servers.HttpServer
161 } 161 }
162 catch (Exception e) 162 catch (Exception e)
163 { 163 {
164 m_log.Debug(string.Format("JsonRpc request '{0}' failed", method), e); 164 m_log.Debug(string.Format("JsonRpc request '{0}' to {1} failed", method, uri), e);
165 return false; 165 return false;
166 } 166 }
167 167
168 if (!response.ContainsKey("_Result")) 168 if (!response.ContainsKey("_Result"))
169 { 169 {
170 m_log.DebugFormat("JsonRpc request '{0}' returned an invalid response: {1}", 170 m_log.DebugFormat("JsonRpc request '{0}' to {1} returned an invalid response: {2}",
171 method, OSDParser.SerializeJsonString(response)); 171 method, uri, OSDParser.SerializeJsonString(response));
172 return false; 172 return false;
173 } 173 }
174 response = (OSDMap)response["_Result"]; 174 response = (OSDMap)response["_Result"];
@@ -176,8 +176,8 @@ namespace OpenSim.Framework.Servers.HttpServer
176 if (response.ContainsKey("error")) 176 if (response.ContainsKey("error"))
177 { 177 {
178 data = response["error"]; 178 data = response["error"];
179 m_log.DebugFormat("JsonRpc request '{0}' returned an error: {1}", 179 m_log.DebugFormat("JsonRpc request '{0}' to {1} returned an error: {2}",
180 method, OSDParser.SerializeJsonString(data)); 180 method, uri, OSDParser.SerializeJsonString(data));
181 return false; 181 return false;
182 } 182 }
183 183
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index 1ee2a7b..c4b5aac 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -484,6 +484,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
484 { 484 {
485 remoteClient.SendAgentAlertMessage( 485 remoteClient.SendAgentAlertMessage(
486 "Error updating classified", false); 486 "Error updating classified", false);
487 return;
487 } 488 }
488 } 489 }
489 490
@@ -510,6 +511,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
510 { 511 {
511 remoteClient.SendAgentAlertMessage( 512 remoteClient.SendAgentAlertMessage(
512 "Error classified delete", false); 513 "Error classified delete", false);
514 return;
513 } 515 }
514 516
515 parameters = (OSDMap)Params; 517 parameters = (OSDMap)Params;
@@ -612,6 +614,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
612 { 614 {
613 remoteClient.SendAgentAlertMessage( 615 remoteClient.SendAgentAlertMessage(
614 "Error selecting pick", false); 616 "Error selecting pick", false);
617 return;
615 } 618 }
616 pick = (UserProfilePick) Pick; 619 pick = (UserProfilePick) Pick;
617 620
@@ -714,6 +717,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
714 { 717 {
715 remoteClient.SendAgentAlertMessage( 718 remoteClient.SendAgentAlertMessage(
716 "Error updating pick", false); 719 "Error updating pick", false);
720 return;
717 } 721 }
718 722
719 m_log.DebugFormat("[PROFILES]: Finish PickInfoUpdate {0} {1}", pick.Name, pick.PickId.ToString()); 723 m_log.DebugFormat("[PROFILES]: Finish PickInfoUpdate {0} {1}", pick.Name, pick.PickId.ToString());
@@ -740,6 +744,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
740 { 744 {
741 remoteClient.SendAgentAlertMessage( 745 remoteClient.SendAgentAlertMessage(
742 "Error picks delete", false); 746 "Error picks delete", false);
747 return;
743 } 748 }
744 } 749 }
745 #endregion Picks 750 #endregion Picks
@@ -807,6 +812,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
807 object Note = note; 812 object Note = note;
808 if(!rpc.JsonRpcRequest(ref Note, "avatar_notes_update", serverURI, UUID.Random().ToString())) 813 if(!rpc.JsonRpcRequest(ref Note, "avatar_notes_update", serverURI, UUID.Random().ToString()))
809 { 814 {
815 remoteClient.SendAgentAlertMessage(
816 "Error updating note", false);
810 return; 817 return;
811 } 818 }
812 } 819 }
@@ -916,6 +923,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
916 { 923 {
917 remoteClient.SendAgentAlertMessage( 924 remoteClient.SendAgentAlertMessage(
918 "Error updating interests", false); 925 "Error updating interests", false);
926 return;
919 } 927 }
920 } 928 }
921 929
@@ -1044,6 +1052,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1044 { 1052 {
1045 remoteClient.SendAgentAlertMessage( 1053 remoteClient.SendAgentAlertMessage(
1046 "Error updating properties", false); 1054 "Error updating properties", false);
1055 return;
1047 } 1056 }
1048 1057
1049 RequestAvatarProperties(remoteClient, newProfile.ID); 1058 RequestAvatarProperties(remoteClient, newProfile.ID);
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 539367d..e583590 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -761,12 +761,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
761 string reason; 761 string reason;
762 string version; 762 string version;
763 if (!Scene.SimulationService.QueryAccess( 763 if (!Scene.SimulationService.QueryAccess(
764 finalDestination, sp.ControllingClient.AgentId, homeURI, position, out version, out reason)) 764 finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, out version, out reason))
765 { 765 {
766 sp.ControllingClient.SendTeleportFailed(reason); 766 sp.ControllingClient.SendTeleportFailed(reason);
767 767
768 m_log.DebugFormat( 768 m_log.DebugFormat(
769 "[ENTITY TRANSFER MODULE]: {0} was stopped from teleporting from {1} to {2} because {3}", 769 "[ENTITY TRANSFER MODULE]: {0} was stopped from teleporting from {1} to {2} because: {3}",
770 sp.Name, sp.Scene.Name, finalDestination.RegionName, reason); 770 sp.Name, sp.Scene.Name, finalDestination.RegionName, reason);
771 771
772 return; 772 return;
@@ -1510,7 +1510,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1510 1510
1511 // Check to see if we have access to the target region. 1511 // Check to see if we have access to the target region.
1512 if (neighbourRegion != null 1512 if (neighbourRegion != null
1513 && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, newpos, out version, out failureReason)) 1513 && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, out version, out failureReason))
1514 { 1514 {
1515 // remember banned 1515 // remember banned
1516 m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID); 1516 m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID);
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 71570da..5e831cc 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -311,9 +311,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
311 SceneObjectGroup sog = base.RezObject(remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection, 311 SceneObjectGroup sog = base.RezObject(remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
312 RezSelected, RemoveItem, fromTaskID, attachment); 312 RezSelected, RemoveItem, fromTaskID, attachment);
313 313
314 if (sog == null)
315 remoteClient.SendAgentAlertMessage("Unable to rez: problem accessing inventory or locating assets", false);
316
317 return sog; 314 return sog;
318 315
319 } 316 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 6e48fcc..c4a42bc 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -797,12 +797,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
797 m_log.WarnFormat( 797 m_log.WarnFormat(
798 "[InventoryAccessModule]: Could not find asset {0} for item {1} {2} for {3} in RezObject()", 798 "[InventoryAccessModule]: Could not find asset {0} for item {1} {2} for {3} in RezObject()",
799 assetID, item.Name, item.ID, remoteClient.Name); 799 assetID, item.Name, item.ID, remoteClient.Name);
800 remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: could not find asset {0} for item {1}.", assetID, item.Name), false);
800 } 801 }
801 else 802 else
802 { 803 {
803 m_log.WarnFormat( 804 m_log.WarnFormat(
804 "[INVENTORY ACCESS MODULE]: Could not find asset {0} for {1} in RezObject()", 805 "[INVENTORY ACCESS MODULE]: Could not find asset {0} for {1} in RezObject()",
805 assetID, remoteClient.Name); 806 assetID, remoteClient.Name);
807 remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: could not find asset {0}.", assetID), false);
806 } 808 }
807 809
808 return null; 810 return null;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs
index 4470799..93dff1f 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs
@@ -89,35 +89,43 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
89 public bool IsAuthorizedForRegion( 89 public bool IsAuthorizedForRegion(
90 string user, string firstName, string lastName, string regionID, out string message) 90 string user, string firstName, string lastName, string regionID, out string message)
91 { 91 {
92 message = "authorized";
93
94 // This should not happen 92 // This should not happen
95 if (m_Scene.RegionInfo.RegionID.ToString() != regionID) 93 if (m_Scene.RegionInfo.RegionID.ToString() != regionID)
96 { 94 {
97 m_log.WarnFormat("[AuthorizationService]: Service for region {0} received request to authorize for region {1}", 95 m_log.WarnFormat("[AuthorizationService]: Service for region {0} received request to authorize for region {1}",
98 m_Scene.RegionInfo.RegionID, regionID); 96 m_Scene.RegionInfo.RegionID, regionID);
99 return true; 97 message = string.Format("Region {0} received request to authorize for region {1}", m_Scene.RegionInfo.RegionID, regionID);
98 return false;
100 } 99 }
101 100
102 if (m_accessValue == AccessFlags.None) 101 if (m_accessValue == AccessFlags.None)
102 {
103 message = "Authorized";
103 return true; 104 return true;
105 }
104 106
105 UUID userID = new UUID(user); 107 UUID userID = new UUID(user);
106 bool authorized = true; 108
107 if ((m_accessValue & AccessFlags.DisallowForeigners) == AccessFlags.DisallowForeigners) 109 if ((m_accessValue & AccessFlags.DisallowForeigners) != 0)
108 { 110 {
109 authorized = m_UserManagement.IsLocalGridUser(userID); 111 if (!m_UserManagement.IsLocalGridUser(userID))
110 if (!authorized) 112 {
111 message = "no foreigner users allowed in this region"; 113 message = "No foreign users allowed in this region";
114 return false;
115 }
112 } 116 }
113 if (authorized && (m_accessValue & AccessFlags.DisallowResidents) == AccessFlags.DisallowResidents) 117
118 if ((m_accessValue & AccessFlags.DisallowResidents) != 0)
114 { 119 {
115 authorized = m_Scene.Permissions.IsGod(userID) | m_Scene.Permissions.IsAdministrator(userID); 120 if (!(m_Scene.Permissions.IsGod(userID) || m_Scene.Permissions.IsAdministrator(userID)))
116 if (!authorized) 121 {
117 message = "only Admins and Managers allowed in this region"; 122 message = "Only Admins and Managers allowed in this region";
123 return false;
124 }
118 } 125 }
119 126
120 return authorized; 127 message = "Authorized";
128 return true;
121 } 129 }
122 130
123 } 131 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 3348b42..926ef05 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -264,7 +264,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
264 return true; 264 return true;
265 } 265 }
266 266
267 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason) 267 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
268 { 268 {
269 reason = "Communications failure"; 269 reason = "Communications failure";
270 version = ServiceVersion; 270 version = ServiceVersion;
@@ -277,7 +277,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
277// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", 277// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
278// s.RegionInfo.RegionName, destination.RegionHandle); 278// s.RegionInfo.RegionName, destination.RegionHandle);
279 279
280 return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, position, out reason); 280 return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, viaTeleport, position, out reason);
281 } 281 }
282 282
283 //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess"); 283 //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess");
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 8436488..0444e49 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -207,7 +207,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
207 return m_remoteConnector.UpdateAgent(destination, cAgentData); 207 return m_remoteConnector.UpdateAgent(destination, cAgentData);
208 } 208 }
209 209
210 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason) 210 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
211 { 211 {
212 reason = "Communications failure"; 212 reason = "Communications failure";
213 version = "Unknown"; 213 version = "Unknown";
@@ -216,12 +216,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
216 return false; 216 return false;
217 217
218 // Try local first 218 // Try local first
219 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, position, out version, out reason)) 219 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason))
220 return true; 220 return true;
221 221
222 // else do the remote thing 222 // else do the remote thing
223 if (!m_localBackend.IsLocalRegion(destination.RegionID)) 223 if (!m_localBackend.IsLocalRegion(destination.RegionID))
224 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, position, out version, out reason); 224 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason);
225 225
226 return false; 226 return false;
227 } 227 }
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
index c35f6b7..1437b1b 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
@@ -143,28 +143,32 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
143 } 143 }
144 144
145 145
146 //m_log.DebugFormat("MAP NAME=({0})", mapName); 146 List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
147 147
148 // Hack to get around the fact that ll V3 now drops the port from the
149 // map name. See https://jira.secondlife.com/browse/VWR-28570
150 //
151 // Caller, use this magic form instead:
152 // secondlife://http|!!mygrid.com|8002|Region+Name/128/128
153 // or url encode if possible.
154 // the hacks we do with this viewer...
155 //
156 string mapNameOrig = mapName; 148 string mapNameOrig = mapName;
157 if (mapName.Contains("|")) 149 if (regionInfos.Count == 0)
158 mapName = mapName.Replace('|', ':'); 150 {
159 if (mapName.Contains("+")) 151 // Hack to get around the fact that ll V3 now drops the port from the
160 mapName = mapName.Replace('+', ' '); 152 // map name. See https://jira.secondlife.com/browse/VWR-28570
161 if (mapName.Contains("!")) 153 //
162 mapName = mapName.Replace('!', '/'); 154 // Caller, use this magic form instead:
155 // secondlife://http|!!mygrid.com|8002|Region+Name/128/128
156 // or url encode if possible.
157 // the hacks we do with this viewer...
158 //
159 if (mapName.Contains("|"))
160 mapName = mapName.Replace('|', ':');
161 if (mapName.Contains("+"))
162 mapName = mapName.Replace('+', ' ');
163 if (mapName.Contains("!"))
164 mapName = mapName.Replace('!', '/');
165
166 if (mapName != mapNameOrig)
167 regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
168 }
163 169
164 // try to fetch from GridServer
165 List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
166
167 m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags); 170 m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags);
171
168 if (regionInfos.Count > 0) 172 if (regionInfos.Count > 0)
169 { 173 {
170 foreach (GridRegion info in regionInfos) 174 foreach (GridRegion info in regionInfos)
@@ -178,7 +182,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
178 data.MapImageId = info.TerrainImage; 182 data.MapImageId = info.TerrainImage;
179 // ugh! V2-3 is very sensitive about the result being 183 // ugh! V2-3 is very sensitive about the result being
180 // exactly the same as the requested name 184 // exactly the same as the requested name
181 if (regionInfos.Count == 1 && mapNameOrig.Contains("|") || mapNameOrig.Contains("+")) 185 if (regionInfos.Count == 1 && (mapName != mapNameOrig))
182 data.Name = mapNameOrig; 186 data.Name = mapNameOrig;
183 else 187 else
184 data.Name = info.RegionName; 188 data.Name = info.RegionName;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index e6887b4..3b8fbfd 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3865,7 +3865,7 @@ namespace OpenSim.Region.Framework.Scenes
3865 if (!AuthorizationService.IsAuthorizedForRegion( 3865 if (!AuthorizationService.IsAuthorizedForRegion(
3866 agent.AgentID.ToString(), agent.firstname, agent.lastname, RegionInfo.RegionID.ToString(), out reason)) 3866 agent.AgentID.ToString(), agent.firstname, agent.lastname, RegionInfo.RegionID.ToString(), out reason))
3867 { 3867 {
3868 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because {4}", 3868 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because: {4}",
3869 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName, reason); 3869 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName, reason);
3870 3870
3871 return false; 3871 return false;
@@ -5463,9 +5463,9 @@ namespace OpenSim.Region.Framework.Scenes
5463 /// <param name='position'></param> 5463 /// <param name='position'></param>
5464 /// <param name='reason'></param> 5464 /// <param name='reason'></param>
5465 /// <returns></returns> 5465 /// <returns></returns>
5466 public bool QueryAccess(UUID agentID, string agentHomeURI, Vector3 position, out string reason) 5466 public bool QueryAccess(UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string reason)
5467 { 5467 {
5468 reason = "You are banned from the region"; 5468 reason = string.Empty;
5469 5469
5470 if (Permissions.IsGod(agentID)) 5470 if (Permissions.IsGod(agentID))
5471 { 5471 {
@@ -5525,10 +5525,11 @@ namespace OpenSim.Region.Framework.Scenes
5525 catch (Exception e) 5525 catch (Exception e)
5526 { 5526 {
5527 m_log.DebugFormat("[SCENE]: Exception authorizing agent: {0} "+ e.StackTrace, e.Message); 5527 m_log.DebugFormat("[SCENE]: Exception authorizing agent: {0} "+ e.StackTrace, e.Message);
5528 reason = "Error authorizing agent: " + e.Message;
5528 return false; 5529 return false;
5529 } 5530 }
5530 5531
5531 if (position == Vector3.Zero) // Teleport 5532 if (viaTeleport)
5532 { 5533 {
5533 if (!RegionInfo.EstateSettings.AllowDirectTeleport) 5534 if (!RegionInfo.EstateSettings.AllowDirectTeleport)
5534 { 5535 {
@@ -5568,6 +5569,7 @@ namespace OpenSim.Region.Framework.Scenes
5568 if (!TestLandRestrictions(agentID, out reason, ref posX, ref posY)) 5569 if (!TestLandRestrictions(agentID, out reason, ref posX, ref posY))
5569 { 5570 {
5570 // m_log.DebugFormat("[SCENE]: Denying {0} because they are banned on all parcels", agentID); 5571 // m_log.DebugFormat("[SCENE]: Denying {0} because they are banned on all parcels", agentID);
5572 reason = "You are banned from the region on all parcels";
5571 return false; 5573 return false;
5572 } 5574 }
5573 } 5575 }
@@ -5575,13 +5577,22 @@ namespace OpenSim.Region.Framework.Scenes
5575 { 5577 {
5576 ILandObject land = LandChannel.GetLandObject(position.X, position.Y); 5578 ILandObject land = LandChannel.GetLandObject(position.X, position.Y);
5577 if (land == null) 5579 if (land == null)
5580 {
5581 reason = "No parcel found";
5578 return false; 5582 return false;
5583 }
5579 5584
5580 bool banned = land.IsBannedFromLand(agentID); 5585 bool banned = land.IsBannedFromLand(agentID);
5581 bool restricted = land.IsRestrictedFromLand(agentID); 5586 bool restricted = land.IsRestrictedFromLand(agentID);
5582 5587
5583 if (banned || restricted) 5588 if (banned || restricted)
5589 {
5590 if (banned)
5591 reason = "You are banned from the parcel";
5592 else
5593 reason = "The parcel is restricted";
5584 return false; 5594 return false;
5595 }
5585 } 5596 }
5586 5597
5587 reason = String.Empty; 5598 reason = String.Empty;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index fb8ecd5..75e1cbb 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -751,7 +751,7 @@ namespace OpenSim.Region.Framework.Scenes
751 Vector3 bbox; 751 Vector3 bbox;
752 float offsetHeight; 752 float offsetHeight;
753 753
754 bool single = m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight); 754 m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight);
755 755
756 for (int i = 0; i < objlist.Count; i++) 756 for (int i = 0; i < objlist.Count; i++)
757 { 757 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index dd4bbe9..398d394 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -208,7 +208,6 @@ namespace OpenSim.Region.Framework.Scenes
208// private int m_lastColCount = -1; //KF: Look for Collision chnages 208// private int m_lastColCount = -1; //KF: Look for Collision chnages
209// private int m_updateCount = 0; //KF: Update Anims for a while 209// private int m_updateCount = 0; //KF: Update Anims for a while
210// private static readonly int UPDATE_COUNT = 10; // how many frames to update for 210// private static readonly int UPDATE_COUNT = 10; // how many frames to update for
211 private List<uint> m_lastColliders = new List<uint>();
212 211
213 private TeleportFlags m_teleportFlags; 212 private TeleportFlags m_teleportFlags;
214 public TeleportFlags TeleportFlags 213 public TeleportFlags TeleportFlags
@@ -271,8 +270,6 @@ namespace OpenSim.Region.Framework.Scenes
271 //private int m_moveToPositionStateStatus; 270 //private int m_moveToPositionStateStatus;
272 //***************************************************** 271 //*****************************************************
273 272
274 private object m_collisionEventLock = new Object();
275
276 private int m_movementAnimationUpdateCounter = 0; 273 private int m_movementAnimationUpdateCounter = 0;
277 274
278 public Vector3 PrevSitOffset { get; set; } 275 public Vector3 PrevSitOffset { get; set; }
@@ -3777,10 +3774,15 @@ namespace OpenSim.Region.Framework.Scenes
3777 if (!IsChildAgent) 3774 if (!IsChildAgent)
3778 return; 3775 return;
3779 3776
3780 //m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY); 3777// m_log.DebugFormat(
3778// "[SCENE PRESENCE]: ChildAgentPositionUpdate for {0} in {1}, tRegion {2},{3}, rRegion {4},{5}, pos {6}",
3779// Name, Scene.Name, tRegionX, tRegionY, rRegionX, rRegionY, cAgentData.Position);
3780
3781 // Find the distance (in meters) between the two regions 3781 // Find the distance (in meters) between the two regions
3782 uint shiftx = Util.RegionToWorldLoc(rRegionX - tRegionX); 3782 // XXX: We cannot use Util.RegionLocToHandle() here because a negative value will silently overflow the
3783 uint shifty = Util.RegionToWorldLoc(rRegionY - tRegionY); 3783 // uint
3784 int shiftx = (int)(((int)rRegionX - (int)tRegionX) * Constants.RegionSize);
3785 int shifty = (int)(((int)rRegionY - (int)tRegionY) * Constants.RegionSize);
3784 3786
3785 Vector3 offset = new Vector3(shiftx, shifty, 0f); 3787 Vector3 offset = new Vector3(shiftx, shifty, 0f);
3786 3788
diff --git a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
index e797207..396f1e8 100644
--- a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
+++ b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
45{ 45{
46 public static class OpenSimTerrainCompressor 46 public static class OpenSimTerrainCompressor
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 49
50#pragma warning disable 414 50#pragma warning disable 414
51 private static string LogHeader = "[TERRAIN COMPRESSOR]"; 51 private static string LogHeader = "[TERRAIN COMPRESSOR]";
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
index 26b70a1..e1b6abb 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
@@ -55,8 +55,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
55 private IGroupsServicesConnector m_groupData = null; 55 private IGroupsServicesConnector m_groupData = null;
56 56
57 // Config Options 57 // Config Options
58 private bool m_groupMessagingEnabled = false; 58 private bool m_groupMessagingEnabled;
59 private bool m_debugEnabled = true; 59 private bool m_debugEnabled;
60 60
61 /// <summary> 61 /// <summary>
62 /// If enabled, module only tries to send group IMs to online users by querying cached presence information. 62 /// If enabled, module only tries to send group IMs to online users by querying cached presence information.
@@ -113,7 +113,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
113 if (m_messageOnlineAgentsOnly) 113 if (m_messageOnlineAgentsOnly)
114 m_usersOnlineCache = new ExpiringCache<UUID, PresenceInfo[]>(); 114 m_usersOnlineCache = new ExpiringCache<UUID, PresenceInfo[]>();
115 115
116 m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true); 116 m_debugEnabled = groupsConfig.GetBoolean("MessagingDebugEnabled", m_debugEnabled);
117 } 117 }
118 118
119 m_log.InfoFormat( 119 m_log.InfoFormat(
@@ -127,6 +127,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
127 return; 127 return;
128 128
129 scene.RegisterModuleInterface<IGroupsMessagingModule>(this); 129 scene.RegisterModuleInterface<IGroupsMessagingModule>(this);
130
131 scene.AddCommand(
132 "Debug",
133 this,
134 "debug groups messaging verbose",
135 "debug groups messaging verbose <true|false>",
136 "This setting turns on very verbose groups messaging debugging",
137 HandleDebugGroupsMessagingVerbose);
130 } 138 }
131 139
132 public void RegionLoaded(Scene scene) 140 public void RegionLoaded(Scene scene)
@@ -218,6 +226,26 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
218 226
219 #endregion 227 #endregion
220 228
229 private void HandleDebugGroupsMessagingVerbose(object modules, string[] args)
230 {
231 if (args.Length < 5)
232 {
233 MainConsole.Instance.Output("Usage: debug groups messaging verbose <true|false>");
234 return;
235 }
236
237 bool verbose = false;
238 if (!bool.TryParse(args[4], out verbose))
239 {
240 MainConsole.Instance.Output("Usage: debug groups messaging verbose <true|false>");
241 return;
242 }
243
244 m_debugEnabled = verbose;
245
246 MainConsole.Instance.OutputFormat("{0} verbose logging set to {1}", Name, m_debugEnabled);
247 }
248
221 /// <summary> 249 /// <summary>
222 /// Not really needed, but does confirm that the group exists. 250 /// Not really needed, but does confirm that the group exists.
223 /// </summary> 251 /// </summary>
@@ -246,6 +274,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
246 public void SendMessageToGroup( 274 public void SendMessageToGroup(
247 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition) 275 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition)
248 { 276 {
277 int requestStartTick = Environment.TickCount;
278
249 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(sendingAgentForGroupCalls, groupID); 279 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(sendingAgentForGroupCalls, groupID);
250 int groupMembersCount = groupMembers.Count; 280 int groupMembersCount = groupMembers.Count;
251 HashSet<string> attemptDeliveryUuidSet = null; 281 HashSet<string> attemptDeliveryUuidSet = null;
@@ -285,9 +315,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
285 m_log.DebugFormat( 315 m_log.DebugFormat(
286 "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members", 316 "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members",
287 groupID, groupMembers.Count); 317 groupID, groupMembers.Count);
288 } 318 }
289
290 int requestStartTick = Environment.TickCount;
291 319
292 foreach (GroupMembersData member in groupMembers) 320 foreach (GroupMembersData member in groupMembers)
293 { 321 {
@@ -315,7 +343,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
315 343
316 // Copy Message 344 // Copy Message
317 GridInstantMessage msg = new GridInstantMessage(); 345 GridInstantMessage msg = new GridInstantMessage();
318 msg.imSessionID = groupID.Guid; 346 msg.imSessionID = im.imSessionID;
319 msg.fromAgentName = im.fromAgentName; 347 msg.fromAgentName = im.fromAgentName;
320 msg.message = im.message; 348 msg.message = im.message;
321 msg.dialog = im.dialog; 349 msg.dialog = im.dialog;
@@ -336,27 +364,45 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
336 IClientAPI client = GetActiveClient(member.AgentID); 364 IClientAPI client = GetActiveClient(member.AgentID);
337 if (client == null) 365 if (client == null)
338 { 366 {
367 int startTick = Environment.TickCount;
368
339 // If they're not local, forward across the grid 369 // If they're not local, forward across the grid
340 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Delivering to {0} via Grid", member.AgentID);
341 m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { }); 370 m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { });
371
372 if (m_debugEnabled)
373 m_log.DebugFormat(
374 "[GROUPS-MESSAGING]: Delivering to {0} via grid took {1} ms",
375 member.AgentID, Environment.TickCount - startTick);
342 } 376 }
343 else 377 else
344 { 378 {
345 // Deliver locally, directly 379 int startTick = Environment.TickCount;
346 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Passing to ProcessMessageFromGroupSession to deliver to {0} locally", client.Name); 380
347 ProcessMessageFromGroupSession(msg, client); 381 ProcessMessageFromGroupSession(msg, client);
382
383 // Deliver locally, directly
384 if (m_debugEnabled)
385 m_log.DebugFormat(
386 "[GROUPS-MESSAGING]: Delivering to {0} locally took {1} ms",
387 member.AgentID, Environment.TickCount - startTick);
348 } 388 }
349 } 389 }
350 else 390 else
351 { 391 {
392 int startTick = Environment.TickCount;
393
352 m_msgTransferModule.HandleUndeliverableMessage(msg, delegate(bool success) { }); 394 m_msgTransferModule.HandleUndeliverableMessage(msg, delegate(bool success) { });
395
396 if (m_debugEnabled)
397 m_log.DebugFormat(
398 "[GROUPS-MESSAGING]: Handling undeliverable message for {0} took {1} ms",
399 member.AgentID, Environment.TickCount - startTick);
353 } 400 }
354 } 401 }
355 402
356 // Temporary for assessing how long it still takes to send messages to large online groups. 403 if (m_debugEnabled)
357 if (m_messageOnlineAgentsOnly)
358 m_log.DebugFormat( 404 m_log.DebugFormat(
359 "[GROUPS-MESSAGING]: SendMessageToGroup for group {0} with {1} members, {2} candidates for delivery took {3}ms", 405 "[GROUPS-MESSAGING]: Total SendMessageToGroup for group {0} with {1} members, {2} candidates for delivery took {3} ms",
360 groupID, groupMembersCount, attemptDeliveryUuidSet.Count(), Environment.TickCount - requestStartTick); 406 groupID, groupMembersCount, attemptDeliveryUuidSet.Count(), Environment.TickCount - requestStartTick);
361 } 407 }
362 408
@@ -420,7 +466,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
420 466
421 private void ProcessMessageFromGroupSession(GridInstantMessage msg, IClientAPI client) 467 private void ProcessMessageFromGroupSession(GridInstantMessage msg, IClientAPI client)
422 { 468 {
423 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Session message from {0} going to agent {1}", msg.fromAgentName, msg.toAgentID); 469 if (m_debugEnabled)
470 m_log.DebugFormat(
471 "[GROUPS-MESSAGING]: Session message from {0} going to agent {1}, sessionID {2}, type {3}",
472 msg.fromAgentName, msg.toAgentID, msg.imSessionID, (InstantMessageDialog)msg.dialog);
424 473
425 UUID AgentID = new UUID(msg.fromAgentID); 474 UUID AgentID = new UUID(msg.fromAgentID);
426 UUID GroupID = new UUID(msg.imSessionID); 475 UUID GroupID = new UUID(msg.imSessionID);
@@ -588,15 +637,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
588 // Don't log any normal IMs (privacy!) 637 // Don't log any normal IMs (privacy!)
589 if (m_debugEnabled && im.dialog != (byte)InstantMessageDialog.MessageFromAgent) 638 if (m_debugEnabled && im.dialog != (byte)InstantMessageDialog.MessageFromAgent)
590 { 639 {
591 m_log.WarnFormat("[GROUPS-MESSAGING]: IM: fromGroup({0})", im.fromGroup ? "True" : "False"); 640 m_log.DebugFormat("[GROUPS-MESSAGING]: IM: fromGroup({0})", im.fromGroup ? "True" : "False");
592 m_log.WarnFormat("[GROUPS-MESSAGING]: IM: Dialog({0})", (InstantMessageDialog)im.dialog); 641 m_log.DebugFormat("[GROUPS-MESSAGING]: IM: Dialog({0})", (InstantMessageDialog)im.dialog);
593 m_log.WarnFormat("[GROUPS-MESSAGING]: IM: fromAgentID({0})", im.fromAgentID); 642 m_log.DebugFormat("[GROUPS-MESSAGING]: IM: fromAgentID({0})", im.fromAgentID);
594 m_log.WarnFormat("[GROUPS-MESSAGING]: IM: fromAgentName({0})", im.fromAgentName); 643 m_log.DebugFormat("[GROUPS-MESSAGING]: IM: fromAgentName({0})", im.fromAgentName);
595 m_log.WarnFormat("[GROUPS-MESSAGING]: IM: imSessionID({0})", im.imSessionID); 644 m_log.DebugFormat("[GROUPS-MESSAGING]: IM: imSessionID({0})", im.imSessionID);
596 m_log.WarnFormat("[GROUPS-MESSAGING]: IM: message({0})", im.message); 645 m_log.DebugFormat("[GROUPS-MESSAGING]: IM: message({0})", im.message);
597 m_log.WarnFormat("[GROUPS-MESSAGING]: IM: offline({0})", im.offline); 646 m_log.DebugFormat("[GROUPS-MESSAGING]: IM: offline({0})", im.offline);
598 m_log.WarnFormat("[GROUPS-MESSAGING]: IM: toAgentID({0})", im.toAgentID); 647 m_log.DebugFormat("[GROUPS-MESSAGING]: IM: toAgentID({0})", im.toAgentID);
599 m_log.WarnFormat("[GROUPS-MESSAGING]: IM: binaryBucket({0})", OpenMetaverse.Utils.BytesToHexString(im.binaryBucket, "BinaryBucket")); 648 m_log.DebugFormat("[GROUPS-MESSAGING]: IM: binaryBucket({0})", OpenMetaverse.Utils.BytesToHexString(im.binaryBucket, "BinaryBucket"));
600 } 649 }
601 } 650 }
602 651
@@ -607,7 +656,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
607 /// </summary> 656 /// </summary>
608 private IClientAPI GetActiveClient(UUID agentID) 657 private IClientAPI GetActiveClient(UUID agentID)
609 { 658 {
610 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Looking for local client {0}", agentID); 659 if (m_debugEnabled)
660 m_log.DebugFormat("[GROUPS-MESSAGING]: Looking for local client {0}", agentID);
611 661
612 IClientAPI child = null; 662 IClientAPI child = null;
613 663
@@ -619,12 +669,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
619 { 669 {
620 if (!sp.IsChildAgent) 670 if (!sp.IsChildAgent)
621 { 671 {
622 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", sp.ControllingClient.Name); 672 if (m_debugEnabled)
673 m_log.DebugFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", sp.ControllingClient.Name);
674
623 return sp.ControllingClient; 675 return sp.ControllingClient;
624 } 676 }
625 else 677 else
626 { 678 {
627 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", sp.ControllingClient.Name); 679 if (m_debugEnabled)
680 m_log.DebugFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", sp.ControllingClient.Name);
681
628 child = sp.ControllingClient; 682 child = sp.ControllingClient;
629 } 683 }
630 } 684 }
@@ -633,12 +687,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
633 // If we didn't find a root, then just return whichever child we found, or null if none 687 // If we didn't find a root, then just return whichever child we found, or null if none
634 if (child == null) 688 if (child == null)
635 { 689 {
636 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Could not find local client for agent : {0}", agentID); 690 if (m_debugEnabled)
691 m_log.DebugFormat("[GROUPS-MESSAGING]: Could not find local client for agent : {0}", agentID);
637 } 692 }
638 else 693 else
639 { 694 {
640 if (m_debugEnabled) m_log.WarnFormat("[GROUPS-MESSAGING]: Returning child agent for client : {0}", child.Name); 695 if (m_debugEnabled)
696 m_log.DebugFormat("[GROUPS-MESSAGING]: Returning child agent for client : {0}", child.Name);
641 } 697 }
698
642 return child; 699 return child;
643 } 700 }
644 701
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index f34152c..8a9e4d2 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -357,7 +357,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
357 357
358 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) 358 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
359 { 359 {
360 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 360 if (m_debugEnabled)
361 m_log.DebugFormat(
362 "[GROUPS]: {0} called for {1}, message type {2}",
363 System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name, (InstantMessageDialog)im.dialog);
361 364
362 // Group invitations 365 // Group invitations
363 if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline)) 366 if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline))
@@ -551,6 +554,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
551 554
552 UUID noticeID = new UUID(im.imSessionID); 555 UUID noticeID = new UUID(im.imSessionID);
553 556
557 if (m_debugEnabled)
558 m_log.DebugFormat("[GROUPS]: Requesting notice {0} for {1}", noticeID, remoteClient.AgentId);
559
554 GroupNoticeInfo notice = m_groupData.GetGroupNotice(GetRequestingAgentID(remoteClient), noticeID); 560 GroupNoticeInfo notice = m_groupData.GetGroupNotice(GetRequestingAgentID(remoteClient), noticeID);
555 if (notice != null) 561 if (notice != null)
556 { 562 {
@@ -572,6 +578,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
572 578
573 remoteClient.SendInventoryItemCreateUpdate(itemCopy, 0); 579 remoteClient.SendInventoryItemCreateUpdate(itemCopy, 0);
574 } 580 }
581 else
582 {
583 if (m_debugEnabled)
584 m_log.DebugFormat(
585 "[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.",
586 noticeID, remoteClient.AgentId);
587 }
575 } 588 }
576 589
577 // Interop, received special 210 code for ejecting a group member 590 // Interop, received special 210 code for ejecting a group member
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
index b5a10af..d944087 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
@@ -132,6 +132,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
132 MessageTransferModule mtm = new MessageTransferModule(); 132 MessageTransferModule mtm = new MessageTransferModule();
133 GroupsModule gm = new GroupsModule(); 133 GroupsModule gm = new GroupsModule();
134 GroupsMessagingModule gmm = new GroupsMessagingModule(); 134 GroupsMessagingModule gmm = new GroupsMessagingModule();
135 MockGroupsServicesConnector mgsc = new MockGroupsServicesConnector();
135 136
136 IConfigSource configSource = new IniConfigSource(); 137 IConfigSource configSource = new IniConfigSource();
137 138
@@ -149,7 +150,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
149 config.Set("MessagingEnabled", true); 150 config.Set("MessagingEnabled", true);
150 } 151 }
151 152
152 SceneHelpers.SetupSceneModules(scene, configSource, new MockGroupsServicesConnector(), mtm, gm, gmm); 153 SceneHelpers.SetupSceneModules(scene, configSource, mgsc, mtm, gm, gmm);
153 154
154 UUID userId = TestHelpers.ParseTail(0x1); 155 UUID userId = TestHelpers.ParseTail(0x1);
155 string subjectText = "newman"; 156 string subjectText = "newman";
@@ -185,6 +186,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
185 Assert.That(spReceivedMessages.Count, Is.EqualTo(1)); 186 Assert.That(spReceivedMessages.Count, Is.EqualTo(1));
186 Assert.That(spReceivedMessages[0].message, Is.EqualTo(combinedSubjectMessage)); 187 Assert.That(spReceivedMessages[0].message, Is.EqualTo(combinedSubjectMessage));
187 188
189 List<GroupNoticeData> notices = mgsc.GetGroupNotices(UUID.Zero, groupID);
190 Assert.AreEqual(1, notices.Count);
191
192 // OpenSimulator (possibly also SL) transport the notice ID as the session ID!
193 Assert.AreEqual(notices[0].NoticeID.Guid, spReceivedMessages[0].imSessionID);
194
188 Assert.That(sp2ReceivedMessages.Count, Is.EqualTo(0)); 195 Assert.That(sp2ReceivedMessages.Count, Is.EqualTo(0));
189 } 196 }
190 197
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 06392f7..7291931 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -132,6 +132,10 @@ namespace OpenSim.Server.Handlers.Simulation
132 // m_log.DebugFormat("[AGENT HANDLER]: Received QUERYACCESS with {0}", (string)request["body"]); 132 // m_log.DebugFormat("[AGENT HANDLER]: Received QUERYACCESS with {0}", (string)request["body"]);
133 OSDMap args = Utils.GetOSDMap((string)request["body"]); 133 OSDMap args = Utils.GetOSDMap((string)request["body"]);
134 134
135 bool viaTeleport = true;
136 if (args.ContainsKey("viaTeleport"))
137 viaTeleport = args["viaTeleport"].AsBoolean();
138
135 Vector3 position = Vector3.Zero; 139 Vector3 position = Vector3.Zero;
136 if (args.ContainsKey("position")) 140 if (args.ContainsKey("position"))
137 position = Vector3.Parse(args["position"].AsString()); 141 position = Vector3.Parse(args["position"].AsString());
@@ -145,7 +149,7 @@ namespace OpenSim.Server.Handlers.Simulation
145 149
146 string reason; 150 string reason;
147 string version; 151 string version;
148 bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, position, out version, out reason); 152 bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason);
149 153
150 responsedata["int_response_code"] = HttpStatusCode.OK; 154 responsedata["int_response_code"] = HttpStatusCode.OK;
151 155
diff --git a/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs b/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs
index 35b7109..63730b3 100644
--- a/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Services.Connectors
105 catch (Exception e) 105 catch (Exception e)
106 { 106 {
107 m_log.WarnFormat("[AUTHORIZATION CONNECTOR]: Unable to send authorize {0} for region {1} error thrown during comms with remote server. Reason: {2}", userID, regionID, e.Message); 107 m_log.WarnFormat("[AUTHORIZATION CONNECTOR]: Unable to send authorize {0} for region {1} error thrown during comms with remote server. Reason: {2}", userID, regionID, e.Message);
108 message = ""; 108 message = e.Message;
109 return m_ResponseOnFailure; 109 return m_ResponseOnFailure;
110 } 110 }
111 if (response == null) 111 if (response == null)
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index d9fe5a0..099ba98 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -282,7 +282,7 @@ namespace OpenSim.Services.Connectors.Simulation
282 } 282 }
283 283
284 284
285 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason) 285 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
286 { 286 {
287 reason = "Failed to contact destination"; 287 reason = "Failed to contact destination";
288 version = "Unknown"; 288 version = "Unknown";
@@ -296,6 +296,7 @@ namespace OpenSim.Services.Connectors.Simulation
296 string uri = destination.ServerURI + AgentPath() + agentID + "/" + destination.RegionID.ToString() + "/"; 296 string uri = destination.ServerURI + AgentPath() + agentID + "/" + destination.RegionID.ToString() + "/";
297 297
298 OSDMap request = new OSDMap(); 298 OSDMap request = new OSDMap();
299 request.Add("viaTeleport", OSD.FromBoolean(viaTeleport));
299 request.Add("position", OSD.FromString(position.ToString())); 300 request.Add("position", OSD.FromString(position.ToString()));
300 if (agentHomeURI != null) 301 if (agentHomeURI != null)
301 request.Add("agent_home_uri", OSD.FromString(agentHomeURI)); 302 request.Add("agent_home_uri", OSD.FromString(agentHomeURI));
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index 4416995..649e66c 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -249,7 +249,7 @@ namespace OpenSim.Services.HypergridService
249 249
250 if (!IsWithinSuitcaseTree(principalID, folderID)) 250 if (!IsWithinSuitcaseTree(principalID, folderID))
251 { 251 {
252 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetFolderContent: folder {0} is not within Suitcase tree", folderID); 252 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetFolderContent: folder {0} (user {1}) is not within Suitcase tree", folderID, principalID);
253 return new InventoryCollection(); 253 return new InventoryCollection();
254 } 254 }
255 255
@@ -269,7 +269,7 @@ namespace OpenSim.Services.HypergridService
269 // make sure the given folder exists under the suitcase tree of this user 269 // make sure the given folder exists under the suitcase tree of this user
270 if (!IsWithinSuitcaseTree(principalID, folderID)) 270 if (!IsWithinSuitcaseTree(principalID, folderID))
271 { 271 {
272 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetFolderItems: folder {0} is not within Suitcase tree", folderID); 272 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetFolderItems: folder {0} (user {1}) is not within Suitcase tree", folderID, principalID);
273 return new List<InventoryItemBase>(); 273 return new List<InventoryItemBase>();
274 } 274 }
275 275
@@ -284,7 +284,7 @@ namespace OpenSim.Services.HypergridService
284 284
285 if (!IsWithinSuitcaseTree(folder.Owner, folder.ParentID)) 285 if (!IsWithinSuitcaseTree(folder.Owner, folder.ParentID))
286 { 286 {
287 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: AddFolder: folder {0} is not within Suitcase tree", folder.ParentID); 287 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: AddFolder: folder {0} (user {1}) is not within Suitcase tree", folder.ParentID, folder.Owner);
288 return false; 288 return false;
289 } 289 }
290 290
@@ -306,7 +306,7 @@ namespace OpenSim.Services.HypergridService
306 //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Update folder {0}, version {1}", folder.ID, folder.Version); 306 //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Update folder {0}, version {1}", folder.ID, folder.Version);
307 if (!IsWithinSuitcaseTree(folder.Owner, folder.ID)) 307 if (!IsWithinSuitcaseTree(folder.Owner, folder.ID))
308 { 308 {
309 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: UpdateFolder: folder {0}/{1} is not within Suitcase tree", folder.Name, folder.ID); 309 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: UpdateFolder: folder {0}/{1} (user {2}) is not within Suitcase tree", folder.Name, folder.ID, folder.Owner);
310 return false; 310 return false;
311 } 311 }
312 312
@@ -318,13 +318,13 @@ namespace OpenSim.Services.HypergridService
318 { 318 {
319 if (!IsWithinSuitcaseTree(folder.Owner, folder.ID)) 319 if (!IsWithinSuitcaseTree(folder.Owner, folder.ID))
320 { 320 {
321 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} is not within Suitcase tree", folder.ID); 321 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} (user {1}) is not within Suitcase tree", folder.ID, folder.Owner);
322 return false; 322 return false;
323 } 323 }
324 324
325 if (!IsWithinSuitcaseTree(folder.Owner, folder.ParentID)) 325 if (!IsWithinSuitcaseTree(folder.Owner, folder.ParentID))
326 { 326 {
327 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} is not within Suitcase tree", folder.ParentID); 327 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} (user {1}) is not within Suitcase tree", folder.ParentID, folder.Owner);
328 return false; 328 return false;
329 } 329 }
330 330
@@ -349,7 +349,7 @@ namespace OpenSim.Services.HypergridService
349 // make sure the given folder's parent folder exists under the suitcase tree of this user 349 // make sure the given folder's parent folder exists under the suitcase tree of this user
350 if (!IsWithinSuitcaseTree(item.Owner, item.Folder)) 350 if (!IsWithinSuitcaseTree(item.Owner, item.Folder))
351 { 351 {
352 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: AddItem: folder {0} is not within Suitcase tree", item.Folder); 352 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: AddItem: folder {0} (user {1}) is not within Suitcase tree", item.Folder, item.Owner);
353 return false; 353 return false;
354 } 354 }
355 355
@@ -362,7 +362,7 @@ namespace OpenSim.Services.HypergridService
362 { 362 {
363 if (!IsWithinSuitcaseTree(item.Owner, item.Folder)) 363 if (!IsWithinSuitcaseTree(item.Owner, item.Folder))
364 { 364 {
365 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: UpdateItem: folder {0} is not within Suitcase tree", item.Folder); 365 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: UpdateItem: folder {0} (user {1}) is not within Suitcase tree", item.Folder, item.Owner);
366 return false; 366 return false;
367 } 367 }
368 368
@@ -378,7 +378,7 @@ namespace OpenSim.Services.HypergridService
378 { 378 {
379 if (!IsWithinSuitcaseTree(item.Owner, item.Folder)) 379 if (!IsWithinSuitcaseTree(item.Owner, item.Folder))
380 { 380 {
381 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveItems: folder {0} is not within Suitcase tree", item.Folder); 381 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveItems: folder {0} (user {1}) is not within Suitcase tree", item.Folder, item.Owner);
382 return false; 382 return false;
383 } 383 }
384 } 384 }
@@ -389,7 +389,7 @@ namespace OpenSim.Services.HypergridService
389 InventoryItemBase originalItem = base.GetItem(item); 389 InventoryItemBase originalItem = base.GetItem(item);
390 if (!IsWithinSuitcaseTree(originalItem.Owner, originalItem.Folder)) 390 if (!IsWithinSuitcaseTree(originalItem.Owner, originalItem.Folder))
391 { 391 {
392 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveItems: folder {0} is not within Suitcase tree", originalItem.Folder); 392 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveItems: folder {0} (user {1}) is not within Suitcase tree", item.Folder, item.Owner);
393 return false; 393 return false;
394 } 394 }
395 } 395 }
@@ -414,8 +414,8 @@ namespace OpenSim.Services.HypergridService
414 414
415 if (!IsWithinSuitcaseTree(it.Owner, it.Folder) && !IsPartOfAppearance(it.Owner, it.ID)) 415 if (!IsWithinSuitcaseTree(it.Owner, it.Folder) && !IsPartOfAppearance(it.Owner, it.ID))
416 { 416 {
417 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Item {0}/{1} (folder {2}) is not within Suitcase tree or Appearance", 417 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetItem: item {0}/{1} (folder {2}) (user {3}) is not within Suitcase tree or Appearance",
418 it.Name, it.ID, it.Folder); 418 it.Name, it.ID, it.Folder, it.Owner);
419 return null; 419 return null;
420 } 420 }
421 421
@@ -437,8 +437,8 @@ namespace OpenSim.Services.HypergridService
437 { 437 {
438 if (!IsWithinSuitcaseTree(f.Owner, f.ID)) 438 if (!IsWithinSuitcaseTree(f.Owner, f.ID))
439 { 439 {
440 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Folder {0}/{1} is not within Suitcase tree", 440 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetFolder: folder {0}/{1} (user {2}) is not within Suitcase tree",
441 f.Name, f.ID); 441 f.Name, f.ID, f.Owner);
442 return null; 442 return null;
443 } 443 }
444 } 444 }
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 375a35c..8b87ac0 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -83,11 +83,12 @@ namespace OpenSim.Services.Interfaces
83 /// <param name="destination">Desired destination</param> 83 /// <param name="destination">Desired destination</param>
84 /// <param name="agentID">The visitor's User ID</param> 84 /// <param name="agentID">The visitor's User ID</param>
85 /// <param name="agentHomeURI">The visitor's Home URI. Will be missing (null) in older OpenSims.</param> 85 /// <param name="agentHomeURI">The visitor's Home URI. Will be missing (null) in older OpenSims.</param>
86 /// <param name="viaTeleport">True: via teleport; False: via cross (walking)</param>
86 /// <param name="position">Position in the region</param> 87 /// <param name="position">Position in the region</param>
87 /// <param name="version"></param> 88 /// <param name="version"></param>
88 /// <param name="reason">[out] Optional error message</param> 89 /// <param name="reason">[out] Optional error message</param>
89 /// <returns>True: ok; False: not allowed</returns> 90 /// <returns>True: ok; False: not allowed</returns>
90 bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason); 91 bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason);
91 92
92 /// <summary> 93 /// <summary>
93 /// Message from receiving region to departing region, telling it got contacted by the client. 94 /// Message from receiving region to departing region, telling it got contacted by the client.
diff --git a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
index b3f8c36..5a257e9 100644
--- a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
+++ b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
@@ -324,7 +324,29 @@ namespace OpenSim.Tests.Common.Mock
324 324
325 public List<GroupNoticeData> GetGroupNotices(UUID requestingAgentID, UUID groupID) 325 public List<GroupNoticeData> GetGroupNotices(UUID requestingAgentID, UUID groupID)
326 { 326 {
327 return null; 327 XGroup group = GetXGroup(groupID, null);
328
329 if (group == null)
330 return null;
331
332 List<GroupNoticeData> notices = new List<GroupNoticeData>();
333
334 foreach (XGroupNotice notice in group.notices.Values)
335 {
336 GroupNoticeData gnd = new GroupNoticeData()
337 {
338 NoticeID = notice.noticeID,
339 Timestamp = notice.timestamp,
340 FromName = notice.fromName,
341 Subject = notice.subject,
342 HasAttachment = notice.hasAttachment,
343 AssetType = (byte)notice.assetType
344 };
345
346 notices.Add(gnd);
347 }
348
349 return notices;
328 } 350 }
329 351
330 public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID) 352 public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID)
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 7f2cba6..f3cd603 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -1033,9 +1033,12 @@
1033 ; Applies Flotsam Group only. V2 has this always on, no other option 1033 ; Applies Flotsam Group only. V2 has this always on, no other option
1034 ; MessageOnlineUsersOnly = false 1034 ; MessageOnlineUsersOnly = false
1035 1035
1036 ;; This makes the Groups modules very chatty on the console. 1036 ;; This makes the Group module very chatty on the console.
1037 ; DebugEnabled = false 1037 ; DebugEnabled = false
1038 1038
1039 ; This makes the Group Messaging module very chatty on the console.
1040 ; DebugMessagingEnabled = false
1041
1039 ;; XmlRpc Security settings. These must match those set on your backend 1042 ;; XmlRpc Security settings. These must match those set on your backend
1040 ;; groups service if the service is using these keys 1043 ;; groups service if the service is using these keys
1041 ; XmlRpcServiceReadKey = 1234 1044 ; XmlRpcServiceReadKey = 1234
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index cae2958..fd6e8b7 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -1661,9 +1661,12 @@
1661 ; Enable Group Notices 1661 ; Enable Group Notices
1662 ;NoticesEnabled = true 1662 ;NoticesEnabled = true
1663 1663
1664 ; This makes the Groups modules very chatty on the console. 1664 ; This makes the Group module very chatty on the console.
1665 DebugEnabled = false 1665 DebugEnabled = false
1666 1666
1667 ; This makes the Groups Messaging module very chatty on the console.
1668 DebugMessagingEnabled = false
1669
1667 ; Groups data is cached for this number of seconds before another request is made to the groups service 1670 ; Groups data is cached for this number of seconds before another request is made to the groups service
1668 ; Set to 0 to disable the cache. 1671 ; Set to 0 to disable the cache.
1669 ; Default is 30 seconds 1672 ; Default is 30 seconds