aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
diff options
context:
space:
mode:
authorCharles Krinke2009-04-21 20:44:17 +0000
committerCharles Krinke2009-04-21 20:44:17 +0000
commit5ea4faa6f209fd5c6a48cc704c595fb029b790f2 (patch)
tree5e5c5fbb3c1d9916c8f6f6967b8f63b5c83f49e9 /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
parent* Comment out user profile cache update method for now (diff)
downloadopensim-SC-5ea4faa6f209fd5c6a48cc704c595fb029b790f2.zip
opensim-SC-5ea4faa6f209fd5c6a48cc704c595fb029b790f2.tar.gz
opensim-SC-5ea4faa6f209fd5c6a48cc704c595fb029b790f2.tar.bz2
opensim-SC-5ea4faa6f209fd5c6a48cc704c595fb029b790f2.tar.xz
Thank you kindly, MCortez, for a patch that:
* Refactors the xmlrpc calls to a single location to make it easier to debug and include alternative xmlrpc call mechanisms * Includes an alternative xmlrpc call mechanism that sets HTTP Keep-Alive to false which solves nearly all System.Net exceptions on some windows environments
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs31
1 files changed, 29 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
index a6f9ea1..ec26dff 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
@@ -53,14 +53,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
53 public class XmlRpcGroupsModule : INonSharedRegionModule, IGroupsModule 53 public class XmlRpcGroupsModule : INonSharedRegionModule, IGroupsModule
54 { 54 {
55 /// <summary> 55 /// <summary>
56 /// To use this module, you must specify the following in your OpenSim.ini 56 /// ; To use this module, you must specify the following in your OpenSim.ini
57 /// [GROUPS] 57 /// [GROUPS]
58 /// Enabled = true 58 /// Enabled = true
59 /// Module = XmlRpcGroups 59 /// Module = XmlRpcGroups
60 /// XmlRpcServiceURL = http://osflotsam.org/xmlrpc.php
60 /// XmlRpcMessagingEnabled = true 61 /// XmlRpcMessagingEnabled = true
61 /// XmlRpcNoticesEnabled = true 62 /// XmlRpcNoticesEnabled = true
62 /// XmlRpcDebugEnabled = true 63 /// XmlRpcDebugEnabled = true
63 /// 64 ///
65 /// ; Disables HTTP Keep-Alive for Groups Module HTTP Requests, work around for
66 /// ; a problem discovered on some Windows based region servers. Only disable
67 /// ; if you see a large number (dozens) of the following Exceptions:
68 /// ; System.Net.WebException: The request was aborted: The request was canceled.
69 ///
70 /// XmlRpcDisableKeepAlive = false
64 /// </summary> 71 /// </summary>
65 72
66 private static readonly ILog m_log = 73 private static readonly ILog m_log =
@@ -113,7 +120,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
113 } 120 }
114 121
115 string ServiceURL = groupsConfig.GetString("XmlRpcServiceURL", m_defaultXmlRpcServiceURL); 122 string ServiceURL = groupsConfig.GetString("XmlRpcServiceURL", m_defaultXmlRpcServiceURL);
116 m_groupData = new XmlRpcGroupDataProvider(ServiceURL); 123 bool DisableKeepAlive = groupsConfig.GetBoolean("XmlRpcDisableKeepAlive", false);
124
125 m_groupData = new XmlRpcGroupDataProvider(ServiceURL, DisableKeepAlive);
117 m_log.InfoFormat("[GROUPS]: XmlRpc Service URL set to: {0}", ServiceURL); 126 m_log.InfoFormat("[GROUPS]: XmlRpc Service URL set to: {0}", ServiceURL);
118 127
119 m_GroupNoticesEnabled = groupsConfig.GetBoolean("XmlRpcNoticesEnabled", true); 128 m_GroupNoticesEnabled = groupsConfig.GetBoolean("XmlRpcNoticesEnabled", true);
@@ -496,6 +505,24 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
496 505
497 // Trigger the above event handler 506 // Trigger the above event handler
498 OnInstantMessage(null, msg); 507 OnInstantMessage(null, msg);
508
509
510 // If a message from a group arrives here, it may need to be forwarded to a local client
511 if (msg.fromGroup == true)
512 {
513 switch( msg.dialog )
514 {
515 case (byte)InstantMessageDialog.GroupInvitation:
516 case (byte)InstantMessageDialog.GroupNotice:
517 UUID toAgentID = new UUID(msg.toAgentID);
518 if (m_ActiveClients.ContainsKey(toAgentID))
519 {
520 m_ActiveClients[toAgentID].SendInstantMessage(msg);
521 }
522 break;
523 }
524 }
525
499 } 526 }
500 527
501 528