diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules')
12 files changed, 172 insertions, 67 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 4a2d7b5..605645b 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -601,7 +601,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
601 | if (names.Length > 1) | 601 | if (names.Length > 1) |
602 | return names[1]; | 602 | return names[1]; |
603 | return names[0]; | 603 | return names[0]; |
604 | } | 604 | } |
605 | } | 605 | } |
606 | 606 | ||
607 | public IScene Scene | 607 | public IScene Scene |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs index c49d942..773507c 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs | |||
@@ -351,7 +351,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
351 | { | 351 | { |
352 | m_log.DebugFormat("[IRC-Region {0}] dropping message {1} on channel {2}", Region, msg, msg.Channel); | 352 | m_log.DebugFormat("[IRC-Region {0}] dropping message {1} on channel {2}", Region, msg, msg.Channel); |
353 | return; | 353 | return; |
354 | } | 354 | } |
355 | 355 | ||
356 | ScenePresence avatar = null; | 356 | ScenePresence avatar = null; |
357 | string fromName = msg.From; | 357 | string fromName = msg.From; |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs index 9ba09ed..46ad30f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs | |||
@@ -97,8 +97,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
97 | </document>", Context, Realm); | 97 | </document>", Context, Realm); |
98 | } | 98 | } |
99 | 99 | ||
100 | return response; | 100 | return response; |
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
104 | } | 104 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs index 5d90a8f..df6e0e7 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs | |||
@@ -138,7 +138,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
138 | response["str_response_string"] = ""; | 138 | response["str_response_string"] = ""; |
139 | } | 139 | } |
140 | } | 140 | } |
141 | return response; | 141 | return response; |
142 | } | 142 | } |
143 | 143 | ||
144 | private Hashtable HandleRegister(string Context, string Realm, Hashtable request) | 144 | private Hashtable HandleRegister(string Context, string Realm, Hashtable request) |
@@ -309,17 +309,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
309 | "</document>\r\n", | 309 | "</document>\r\n", |
310 | domain, Context); | 310 | domain, Context); |
311 | 311 | ||
312 | return response; | 312 | return response; |
313 | } | 313 | } |
314 | 314 | ||
315 | 315 | ||
316 | // private Hashtable HandleLoadNetworkLists(Hashtable request) | 316 | // private Hashtable HandleLoadNetworkLists(Hashtable request) |
317 | // { | 317 | // { |
318 | // m_log.Info("[FreeSwitchDirectory] HandleLoadNetworkLists called"); | 318 | // m_log.Info("[FreeSwitchDirectory] HandleLoadNetworkLists called"); |
319 | // | 319 | // |
320 | // // TODO the password we return needs to match that sent in the request, this is hard coded for now | 320 | // // TODO the password we return needs to match that sent in the request, this is hard coded for now |
321 | // string domain = (string) request["domain"]; | 321 | // string domain = (string) request["domain"]; |
322 | // | 322 | // |
323 | // Hashtable response = new Hashtable(); | 323 | // Hashtable response = new Hashtable(); |
324 | // response["content_type"] = "text/xml"; | 324 | // response["content_type"] = "text/xml"; |
325 | // response["keepalive"] = false; | 325 | // response["keepalive"] = false; |
@@ -340,9 +340,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
340 | // "</section>\r\n" + | 340 | // "</section>\r\n" + |
341 | // "</document>\r\n", | 341 | // "</document>\r\n", |
342 | // domain); | 342 | // domain); |
343 | // | 343 | // |
344 | // | 344 | // |
345 | // return response; | 345 | // return response; |
346 | // } | 346 | // } |
347 | } | 347 | } |
348 | } | 348 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 65c5274..c7bb56a 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -53,7 +53,7 @@ using System.Text.RegularExpressions; | |||
53 | 53 | ||
54 | namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | 54 | namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice |
55 | { | 55 | { |
56 | public class FreeSwitchVoiceModule : IRegionModule | 56 | public class FreeSwitchVoiceModule : IRegionModule, IVoiceModule |
57 | { | 57 | { |
58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
59 | 59 | ||
@@ -101,13 +101,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
101 | private FreeSwitchDialplan m_FreeSwitchDialplan; | 101 | private FreeSwitchDialplan m_FreeSwitchDialplan; |
102 | 102 | ||
103 | private readonly Dictionary<string, string> m_UUIDName = new Dictionary<string, string>(); | 103 | private readonly Dictionary<string, string> m_UUIDName = new Dictionary<string, string>(); |
104 | private Dictionary<string, string> m_ParcelAddress = new Dictionary<string, string>(); | ||
105 | |||
106 | private Scene m_scene; | ||
104 | 107 | ||
105 | 108 | ||
106 | private IConfig m_config; | 109 | private IConfig m_config; |
107 | 110 | ||
108 | public void Initialise(Scene scene, IConfigSource config) | 111 | public void Initialise(Scene scene, IConfigSource config) |
109 | { | 112 | { |
110 | 113 | m_scene = scene; | |
111 | m_config = config.Configs["FreeSwitchVoice"]; | 114 | m_config = config.Configs["FreeSwitchVoice"]; |
112 | 115 | ||
113 | if (null == m_config) | 116 | if (null == m_config) |
@@ -230,6 +233,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
230 | { | 233 | { |
231 | OnRegisterCaps(scene, agentID, caps); | 234 | OnRegisterCaps(scene, agentID, caps); |
232 | }; | 235 | }; |
236 | |||
237 | |||
233 | 238 | ||
234 | try | 239 | try |
235 | { | 240 | { |
@@ -255,6 +260,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
255 | 260 | ||
256 | public void PostInitialise() | 261 | public void PostInitialise() |
257 | { | 262 | { |
263 | if (m_pluginEnabled) | ||
264 | { | ||
265 | m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene"); | ||
266 | |||
267 | // register the voice interface for this module, so the script engine can call us | ||
268 | m_scene.RegisterModuleInterface<IVoiceModule>(this); | ||
269 | } | ||
258 | } | 270 | } |
259 | 271 | ||
260 | public void Close() | 272 | public void Close() |
@@ -270,7 +282,27 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
270 | { | 282 | { |
271 | get { return true; } | 283 | get { return true; } |
272 | } | 284 | } |
273 | 285 | ||
286 | // <summary> | ||
287 | // implementation of IVoiceModule, called by osSetParcelSIPAddress script function | ||
288 | // </summary> | ||
289 | public void setLandSIPAddress(string SIPAddress,UUID GlobalID) | ||
290 | { | ||
291 | m_log.DebugFormat("[FreeSwitchVoice]: setLandSIPAddress parcel id {0}: setting sip address {1}", | ||
292 | GlobalID, SIPAddress); | ||
293 | |||
294 | lock (m_ParcelAddress) | ||
295 | { | ||
296 | if (m_ParcelAddress.ContainsKey(GlobalID.ToString())) | ||
297 | { | ||
298 | m_ParcelAddress[GlobalID.ToString()] = SIPAddress; | ||
299 | } | ||
300 | else | ||
301 | { | ||
302 | m_ParcelAddress.Add(GlobalID.ToString(), SIPAddress); | ||
303 | } | ||
304 | } | ||
305 | } | ||
274 | 306 | ||
275 | // <summary> | 307 | // <summary> |
276 | // OnRegisterCaps is invoked via the scene.EventManager | 308 | // OnRegisterCaps is invoked via the scene.EventManager |
@@ -776,6 +808,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
776 | 808 | ||
777 | // Create parcel voice channel. If no parcel exists, then the voice channel ID is the same | 809 | // Create parcel voice channel. If no parcel exists, then the voice channel ID is the same |
778 | // as the directory ID. Otherwise, it reflects the parcel's ID. | 810 | // as the directory ID. Otherwise, it reflects the parcel's ID. |
811 | |||
812 | lock (m_ParcelAddress) | ||
813 | { | ||
814 | if (m_ParcelAddress.ContainsKey(land.GlobalID.ToString())) | ||
815 | { | ||
816 | m_log.DebugFormat("[FreeSwitchVoice]: parcel id {0}: using sip address {1}", | ||
817 | land.GlobalID, m_ParcelAddress[land.GlobalID.ToString()]); | ||
818 | return m_ParcelAddress[land.GlobalID.ToString()]; | ||
819 | } | ||
820 | } | ||
779 | 821 | ||
780 | if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0) | 822 | if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0) |
781 | { | 823 | { |
@@ -797,6 +839,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
797 | // the personal speech indicators as well unless some siren14-3d codec magic happens. we dont have siren143d so we'll settle for the personal speech indicator. | 839 | // the personal speech indicators as well unless some siren14-3d codec magic happens. we dont have siren143d so we'll settle for the personal speech indicator. |
798 | channelUri = String.Format("sip:conf-{0}@{1}", "x" + Convert.ToBase64String(encoding.GetBytes(landUUID)), m_freeSwitchRealm); | 840 | channelUri = String.Format("sip:conf-{0}@{1}", "x" + Convert.ToBase64String(encoding.GetBytes(landUUID)), m_freeSwitchRealm); |
799 | 841 | ||
842 | lock (m_ParcelAddress) | ||
843 | { | ||
844 | if (!m_ParcelAddress.ContainsKey(land.GlobalID.ToString())) | ||
845 | { | ||
846 | m_ParcelAddress.Add(land.GlobalID.ToString(),channelUri); | ||
847 | } | ||
848 | } | ||
800 | 849 | ||
801 | return channelUri; | 850 | return channelUri; |
802 | } | 851 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index febb491..cb76200 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | |||
@@ -226,7 +226,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
226 | m_log.DebugFormat("[VivoxVoice] plugin initialization failed: {0}", e.ToString()); | 226 | m_log.DebugFormat("[VivoxVoice] plugin initialization failed: {0}", e.ToString()); |
227 | return; | 227 | return; |
228 | } | 228 | } |
229 | } | 229 | } |
230 | 230 | ||
231 | 231 | ||
232 | // Called to indicate that the module has been added to the region | 232 | // Called to indicate that the module has been added to the region |
@@ -1144,7 +1144,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
1144 | // Otherwise prepare the request | 1144 | // Otherwise prepare the request |
1145 | m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); | 1145 | m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); |
1146 | 1146 | ||
1147 | HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); | 1147 | HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); |
1148 | HttpWebResponse rsp = null; | 1148 | HttpWebResponse rsp = null; |
1149 | 1149 | ||
1150 | // We are sending just parameters, no content | 1150 | // We are sending just parameters, no content |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 37e1ed4..9ce4e1a 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -281,7 +281,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
281 | 281 | ||
282 | private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID) | 282 | private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID) |
283 | { | 283 | { |
284 | GroupMembershipData[] avatarGroups = m_groupData.GetAgentGroupMemberships(GetClientGroupRequestID(remoteClient), avatarID).ToArray(); | 284 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
285 | |||
286 | //GroupMembershipData[] avatarGroups = m_groupData.GetAgentGroupMemberships(GetClientGroupRequestID(remoteClient), avatarID).ToArray(); | ||
287 | GroupMembershipData[] avatarGroups = GetProfileListedGroupMemberships(remoteClient, avatarID); | ||
285 | remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups); | 288 | remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups); |
286 | } | 289 | } |
287 | 290 | ||
@@ -474,7 +477,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
474 | foreach (string key in binBucketOSD.Keys) | 477 | foreach (string key in binBucketOSD.Keys) |
475 | { | 478 | { |
476 | m_log.WarnFormat("{0}: {1}", key, binBucketOSD[key].ToString()); | 479 | m_log.WarnFormat("{0}: {1}", key, binBucketOSD[key].ToString()); |
477 | } | 480 | } |
478 | } | 481 | } |
479 | 482 | ||
480 | // treat as if no attachment | 483 | // treat as if no attachment |
@@ -485,6 +488,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
485 | bucket[18] = 0; //dunno | 488 | bucket[18] = 0; //dunno |
486 | } | 489 | } |
487 | 490 | ||
491 | |||
488 | m_groupData.AddGroupNotice(GetClientGroupRequestID(remoteClient), GroupID, NoticeID, im.fromAgentName, Subject, Message, bucket); | 492 | m_groupData.AddGroupNotice(GetClientGroupRequestID(remoteClient), GroupID, NoticeID, im.fromAgentName, Subject, Message, bucket); |
489 | if (OnNewGroupNotice != null) | 493 | if (OnNewGroupNotice != null) |
490 | { | 494 | { |
@@ -494,7 +498,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
494 | // Send notice out to everyone that wants notices | 498 | // Send notice out to everyone that wants notices |
495 | foreach (GroupMembersData member in m_groupData.GetGroupMembers(GetClientGroupRequestID(remoteClient), GroupID)) | 499 | foreach (GroupMembersData member in m_groupData.GetGroupMembers(GetClientGroupRequestID(remoteClient), GroupID)) |
496 | { | 500 | { |
497 | if (member.AcceptNotices) | 501 | if (m_debugEnabled) |
502 | { | ||
503 | UserProfileData targetUserProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(member.AgentID); | ||
504 | if (targetUserProfile != null) | ||
505 | { | ||
506 | m_log.DebugFormat("[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, targetUserProfile.Name, member.AcceptNotices); | ||
507 | } | ||
508 | else | ||
509 | { | ||
510 | m_log.DebugFormat("[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, member.AgentID, member.AcceptNotices); | ||
511 | } | ||
512 | } | ||
513 | |||
514 | if (member.AcceptNotices) | ||
498 | { | 515 | { |
499 | // Build notice IIM | 516 | // Build notice IIM |
500 | GridInstantMessage msg = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); | 517 | GridInstantMessage msg = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); |
@@ -614,13 +631,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
614 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 631 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
615 | 632 | ||
616 | List<GroupMembersData> data = m_groupData.GetGroupMembers(GetClientGroupRequestID(remoteClient), groupID); | 633 | List<GroupMembersData> data = m_groupData.GetGroupMembers(GetClientGroupRequestID(remoteClient), groupID); |
617 | if (m_debugEnabled) | ||
618 | { | ||
619 | foreach (GroupMembersData member in data) | ||
620 | { | ||
621 | m_log.DebugFormat("[GROUPS]: {0} {1}", member.AgentID, member.Title); | ||
622 | } | ||
623 | } | ||
624 | 634 | ||
625 | return data; | 635 | return data; |
626 | 636 | ||
@@ -632,14 +642,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
632 | 642 | ||
633 | List<GroupRolesData> data = m_groupData.GetGroupRoles(GetClientGroupRequestID(remoteClient), groupID); | 643 | List<GroupRolesData> data = m_groupData.GetGroupRoles(GetClientGroupRequestID(remoteClient), groupID); |
634 | 644 | ||
635 | if (m_debugEnabled) | ||
636 | { | ||
637 | foreach (GroupRolesData member in data) | ||
638 | { | ||
639 | m_log.DebugFormat("[GROUPS]: {0} {1}", member.Title, member.Members); | ||
640 | } | ||
641 | } | ||
642 | |||
643 | return data; | 645 | return data; |
644 | 646 | ||
645 | } | 647 | } |
@@ -650,14 +652,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
650 | 652 | ||
651 | List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetClientGroupRequestID(remoteClient), groupID); | 653 | List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetClientGroupRequestID(remoteClient), groupID); |
652 | 654 | ||
653 | if (m_debugEnabled) | ||
654 | { | ||
655 | foreach (GroupRoleMembersData member in data) | ||
656 | { | ||
657 | m_log.DebugFormat("[GROUPS]: Av: {0} Role: {1}", member.MemberID, member.RoleID); | ||
658 | } | ||
659 | } | ||
660 | |||
661 | return data; | 655 | return data; |
662 | 656 | ||
663 | 657 | ||
@@ -808,7 +802,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
808 | { | 802 | { |
809 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 803 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
810 | 804 | ||
811 | // TODO: Security Checks? | 805 | // Security Checks are handled in the Groups Service. |
812 | 806 | ||
813 | GroupRequestID grID = GetClientGroupRequestID(remoteClient); | 807 | GroupRequestID grID = GetClientGroupRequestID(remoteClient); |
814 | 808 | ||
@@ -825,6 +819,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
825 | case OpenMetaverse.GroupRoleUpdate.UpdateAll: | 819 | case OpenMetaverse.GroupRoleUpdate.UpdateAll: |
826 | case OpenMetaverse.GroupRoleUpdate.UpdateData: | 820 | case OpenMetaverse.GroupRoleUpdate.UpdateData: |
827 | case OpenMetaverse.GroupRoleUpdate.UpdatePowers: | 821 | case OpenMetaverse.GroupRoleUpdate.UpdatePowers: |
822 | if (m_debugEnabled) | ||
823 | { | ||
824 | GroupPowers gp = (GroupPowers)powers; | ||
825 | m_log.DebugFormat("[GROUPS]: Role ({0}) updated with Powers ({1}) ({2})", name, powers.ToString(), gp.ToString()); | ||
826 | } | ||
828 | m_groupData.UpdateGroupRole(grID, groupID, roleID, name, description, title, powers); | 827 | m_groupData.UpdateGroupRole(grID, groupID, roleID, name, description, title, powers); |
829 | break; | 828 | break; |
830 | 829 | ||
@@ -1195,6 +1194,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1195 | 1194 | ||
1196 | foreach (GroupMembershipData membership in data) | 1195 | foreach (GroupMembershipData membership in data) |
1197 | { | 1196 | { |
1197 | if (remoteClient.AgentId != dataForAgentID) | ||
1198 | { | ||
1199 | if (!membership.ListInProfile) | ||
1200 | { | ||
1201 | // If we're sending group info to remoteclient about another agent, | ||
1202 | // filter out groups the other agent doesn't want to share. | ||
1203 | continue; | ||
1204 | } | ||
1205 | } | ||
1206 | |||
1198 | OSDMap GroupDataMap = new OSDMap(6); | 1207 | OSDMap GroupDataMap = new OSDMap(6); |
1199 | OSDMap NewGroupDataMap = new OSDMap(1); | 1208 | OSDMap NewGroupDataMap = new OSDMap(1); |
1200 | 1209 | ||
@@ -1281,11 +1290,46 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1281 | // to the core Groups Stub | 1290 | // to the core Groups Stub |
1282 | remoteClient.SendGroupMembership(new GroupMembershipData[0]); | 1291 | remoteClient.SendGroupMembership(new GroupMembershipData[0]); |
1283 | 1292 | ||
1284 | GroupMembershipData[] membershipData = m_groupData.GetAgentGroupMemberships(GetClientGroupRequestID(remoteClient), dataForAgentID).ToArray(); | 1293 | GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, dataForAgentID); |
1294 | SendGroupMembershipInfoViaCaps(remoteClient, dataForAgentID, membershipArray); | ||
1295 | remoteClient.SendAvatarGroupsReply(dataForAgentID, membershipArray); | ||
1285 | 1296 | ||
1286 | SendGroupMembershipInfoViaCaps(remoteClient, dataForAgentID, membershipData); | 1297 | } |
1287 | remoteClient.SendAvatarGroupsReply(dataForAgentID, membershipData); | 1298 | |
1299 | /// <summary> | ||
1300 | /// Get a list of groups memberships for the agent that are marked "ListInProfile" | ||
1301 | /// </summary> | ||
1302 | /// <param name="dataForAgentID"></param> | ||
1303 | /// <returns></returns> | ||
1304 | private GroupMembershipData[] GetProfileListedGroupMemberships(IClientAPI requestingClient, UUID dataForAgentID) | ||
1305 | { | ||
1306 | List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(GetClientGroupRequestID(requestingClient), dataForAgentID); | ||
1307 | GroupMembershipData[] membershipArray; | ||
1308 | |||
1309 | if (requestingClient.AgentId != dataForAgentID) | ||
1310 | { | ||
1311 | Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership) | ||
1312 | { | ||
1313 | return membership.ListInProfile; | ||
1314 | }; | ||
1315 | |||
1316 | membershipArray = membershipData.FindAll(showInProfile).ToArray(); | ||
1317 | } | ||
1318 | else | ||
1319 | { | ||
1320 | membershipArray = membershipData.ToArray(); | ||
1321 | } | ||
1322 | |||
1323 | if (m_debugEnabled) | ||
1324 | { | ||
1325 | m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId); | ||
1326 | foreach (GroupMembershipData membership in membershipArray) | ||
1327 | { | ||
1328 | m_log.InfoFormat("[GROUPS]: {0} :: {1} - {2}", dataForAgentID, membership.GroupName, membership.GroupTitle); | ||
1329 | } | ||
1330 | } | ||
1288 | 1331 | ||
1332 | return membershipArray; | ||
1289 | } | 1333 | } |
1290 | 1334 | ||
1291 | private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle) | 1335 | private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle) |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index b3eaa37..964d0bb 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | |||
@@ -855,16 +855,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
855 | IList parameters = new ArrayList(); | 855 | IList parameters = new ArrayList(); |
856 | parameters.Add(param); | 856 | parameters.Add(param); |
857 | 857 | ||
858 | XmlRpcRequest req; | 858 | ConfigurableKeepAliveXmlRpcRequest req; |
859 | if (!m_disableKeepAlive) | 859 | req = new ConfigurableKeepAliveXmlRpcRequest(function, parameters, m_disableKeepAlive); |
860 | { | ||
861 | req = new XmlRpcRequest(function, parameters); | ||
862 | } | ||
863 | else | ||
864 | { | ||
865 | // This seems to solve a major problem on some windows servers | ||
866 | req = new NoKeepAliveXmlRpcRequest(function, parameters); | ||
867 | } | ||
868 | 860 | ||
869 | XmlRpcResponse resp = null; | 861 | XmlRpcResponse resp = null; |
870 | 862 | ||
@@ -874,10 +866,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
874 | } | 866 | } |
875 | catch (Exception e) | 867 | catch (Exception e) |
876 | { | 868 | { |
869 | |||
870 | |||
877 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function); | 871 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function); |
878 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString()); | 872 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString()); |
879 | 873 | ||
880 | 874 | foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine },StringSplitOptions.None)) | |
875 | { | ||
876 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", ResponseLine); | ||
877 | } | ||
878 | |||
881 | foreach (string key in param.Keys) | 879 | foreach (string key in param.Keys) |
882 | { | 880 | { |
883 | m_log.WarnFormat("[XMLRPCGROUPDATA]: {0} :: {1}", key, param[key].ToString()); | 881 | m_log.WarnFormat("[XMLRPCGROUPDATA]: {0} :: {1}", key, param[key].ToString()); |
@@ -961,20 +959,24 @@ namespace Nwc.XmlRpc | |||
961 | using System.Reflection; | 959 | using System.Reflection; |
962 | 960 | ||
963 | /// <summary>Class supporting the request side of an XML-RPC transaction.</summary> | 961 | /// <summary>Class supporting the request side of an XML-RPC transaction.</summary> |
964 | public class NoKeepAliveXmlRpcRequest : XmlRpcRequest | 962 | public class ConfigurableKeepAliveXmlRpcRequest : XmlRpcRequest |
965 | { | 963 | { |
966 | private Encoding _encoding = new ASCIIEncoding(); | 964 | private Encoding _encoding = new ASCIIEncoding(); |
967 | private XmlRpcRequestSerializer _serializer = new XmlRpcRequestSerializer(); | 965 | private XmlRpcRequestSerializer _serializer = new XmlRpcRequestSerializer(); |
968 | private XmlRpcResponseDeserializer _deserializer = new XmlRpcResponseDeserializer(); | 966 | private XmlRpcResponseDeserializer _deserializer = new XmlRpcResponseDeserializer(); |
967 | private bool _disableKeepAlive = true; | ||
968 | |||
969 | public string RequestResponse = String.Empty; | ||
969 | 970 | ||
970 | /// <summary>Instantiate an <c>XmlRpcRequest</c> for a specified method and parameters.</summary> | 971 | /// <summary>Instantiate an <c>XmlRpcRequest</c> for a specified method and parameters.</summary> |
971 | /// <param name="methodName"><c>String</c> designating the <i>object.method</i> on the server the request | 972 | /// <param name="methodName"><c>String</c> designating the <i>object.method</i> on the server the request |
972 | /// should be directed to.</param> | 973 | /// should be directed to.</param> |
973 | /// <param name="parameters"><c>ArrayList</c> of XML-RPC type parameters to invoke the request with.</param> | 974 | /// <param name="parameters"><c>ArrayList</c> of XML-RPC type parameters to invoke the request with.</param> |
974 | public NoKeepAliveXmlRpcRequest(String methodName, IList parameters) | 975 | public ConfigurableKeepAliveXmlRpcRequest(String methodName, IList parameters, bool disableKeepAlive) |
975 | { | 976 | { |
976 | MethodName = methodName; | 977 | MethodName = methodName; |
977 | _params = parameters; | 978 | _params = parameters; |
979 | _disableKeepAlive = disableKeepAlive; | ||
978 | } | 980 | } |
979 | 981 | ||
980 | /// <summary>Send the request to the server.</summary> | 982 | /// <summary>Send the request to the server.</summary> |
@@ -989,7 +991,7 @@ namespace Nwc.XmlRpc | |||
989 | request.Method = "POST"; | 991 | request.Method = "POST"; |
990 | request.ContentType = "text/xml"; | 992 | request.ContentType = "text/xml"; |
991 | request.AllowWriteStreamBuffering = true; | 993 | request.AllowWriteStreamBuffering = true; |
992 | request.KeepAlive = false; | 994 | request.KeepAlive = !_disableKeepAlive; |
993 | 995 | ||
994 | Stream stream = request.GetRequestStream(); | 996 | Stream stream = request.GetRequestStream(); |
995 | XmlTextWriter xml = new XmlTextWriter(stream, _encoding); | 997 | XmlTextWriter xml = new XmlTextWriter(stream, _encoding); |
@@ -1000,7 +1002,17 @@ namespace Nwc.XmlRpc | |||
1000 | HttpWebResponse response = (HttpWebResponse)request.GetResponse(); | 1002 | HttpWebResponse response = (HttpWebResponse)request.GetResponse(); |
1001 | StreamReader input = new StreamReader(response.GetResponseStream()); | 1003 | StreamReader input = new StreamReader(response.GetResponseStream()); |
1002 | 1004 | ||
1003 | XmlRpcResponse resp = (XmlRpcResponse)_deserializer.Deserialize(input); | 1005 | string inputXml = input.ReadToEnd(); |
1006 | XmlRpcResponse resp; | ||
1007 | try | ||
1008 | { | ||
1009 | resp = (XmlRpcResponse)_deserializer.Deserialize(inputXml); | ||
1010 | } | ||
1011 | catch (Exception e) | ||
1012 | { | ||
1013 | RequestResponse = inputXml; | ||
1014 | throw e; | ||
1015 | } | ||
1004 | input.Close(); | 1016 | input.Close(); |
1005 | response.Close(); | 1017 | response.Close(); |
1006 | return resp; | 1018 | return resp; |
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/CMController.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/CMController.cs index b5da6f7..7202601 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/CMController.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/CMController.cs | |||
@@ -208,7 +208,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
208 | // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened | 208 | // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened |
209 | m_log.ErrorFormat( | 209 | m_log.ErrorFormat( |
210 | "[CONTENT MANAGEMENT]: Content management thread terminating with exception. PLEASE REBOOT YOUR SIM - CONTENT MANAGEMENT WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", | 210 | "[CONTENT MANAGEMENT]: Content management thread terminating with exception. PLEASE REBOOT YOUR SIM - CONTENT MANAGEMENT WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", |
211 | e); | 211 | e); |
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/CMModel.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/CMModel.cs index 52c4e03..0dc78c0 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/CMModel.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/CMModel.cs | |||
@@ -102,7 +102,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
102 | { | 102 | { |
103 | if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID)) | 103 | if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID)) |
104 | continue; | 104 | continue; |
105 | newList.Add(m_MetaEntityCollection.CreateAuraForNewlyCreatedEntity((SceneObjectPart)missingPart)); | 105 | newList.Add(m_MetaEntityCollection.CreateAuraForNewlyCreatedEntity((SceneObjectPart)missingPart)); |
106 | } | 106 | } |
107 | m_log.Info("Number of missing objects found: " + newList.Count); | 107 | m_log.Info("Number of missing objects found: " + newList.Count); |
108 | return newList; | 108 | return newList; |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index bf523dd..ce50f9e 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | |||
@@ -136,7 +136,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
136 | /// </exception> | 136 | /// </exception> |
137 | /// <returns>AppDomain with a restricted security policy</returns> | 137 | /// <returns>AppDomain with a restricted security policy</returns> |
138 | /// <remarks>Substantial portions of this function from: http://blogs.msdn.com/shawnfa/archive/2004/10/25/247379.aspx | 138 | /// <remarks>Substantial portions of this function from: http://blogs.msdn.com/shawnfa/archive/2004/10/25/247379.aspx |
139 | /// Valid permissionSetName values are: | 139 | /// Valid permissionSetName values are: |
140 | /// * FullTrust | 140 | /// * FullTrust |
141 | /// * SkipVerification | 141 | /// * SkipVerification |
142 | /// * Execution | 142 | /// * Execution |
diff --git a/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs index c539280..fc1c608 100644 --- a/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs +++ b/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs | |||
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser | |||
117 | public void LoadRegion(Scene scene) | 117 | public void LoadRegion(Scene scene) |
118 | { | 118 | { |
119 | IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>(); | 119 | IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>(); |
120 | if (serialiser != null) | 120 | if (serialiser != null) |
121 | { | 121 | { |
122 | serialiser.LoadPrimsFromXml2( | 122 | serialiser.LoadPrimsFromXml2( |
123 | scene, | 123 | scene, |