aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
diff options
context:
space:
mode:
authorMelanie2009-08-07 19:01:27 +0100
committerMelanie2009-08-07 19:01:27 +0100
commit7811bceb8f5e49ac8abf24cff5785e0c2b6ef5af (patch)
treed396a21ba49d2e17a5e8a57c225532eca16d622d /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
parentMake the opensim.ini logfile option really work (port of a fix from ROBUST) (diff)
parentignore .svn directories, useful for the mirror (diff)
downloadopensim-SC-7811bceb8f5e49ac8abf24cff5785e0c2b6ef5af.zip
opensim-SC-7811bceb8f5e49ac8abf24cff5785e0c2b6ef5af.tar.gz
opensim-SC-7811bceb8f5e49ac8abf24cff5785e0c2b6ef5af.tar.bz2
opensim-SC-7811bceb8f5e49ac8abf24cff5785e0c2b6ef5af.tar.xz
Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs (renamed from OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs)57
1 files changed, 34 insertions, 23 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 2cbc571..725c303 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -31,6 +31,7 @@ using System.Reflection;
31using System.Timers; 31using System.Timers;
32 32
33using log4net; 33using log4net;
34using Mono.Addins;
34using Nini.Config; 35using Nini.Config;
35 36
36using OpenMetaverse; 37using OpenMetaverse;
@@ -49,20 +50,26 @@ using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags;
49 50
50namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups 51namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
51{ 52{
52 public class XmlRpcGroupsModule : ISharedRegionModule, IGroupsModule 53 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
54 public class GroupsModule : ISharedRegionModule, IGroupsModule
53 { 55 {
54 /// <summary> 56 /// <summary>
55 /// ; To use this module, you must specify the following in your OpenSim.ini 57 /// ; To use this module, you must specify the following in your OpenSim.ini
56 /// [GROUPS] 58 /// [GROUPS]
57 /// Enabled = true 59 /// Enabled = true
58 /// Module = XmlRpcGroups 60 ///
59 /// XmlRpcServiceURL = http://osflotsam.org/xmlrpc.php 61 /// Module = GroupsModule
60 /// XmlRpcMessagingEnabled = true 62 /// NoticesEnabled = true
61 /// XmlRpcNoticesEnabled = true 63 /// DebugEnabled = true
62 /// XmlRpcDebugEnabled = true 64 ///
63 /// XmlRpcServiceReadKey = 1234 65 /// GroupsServicesConnectorModule = XmlRpcGroupsServicesConnector
66 /// XmlRpcServiceURL = http://osflotsam.org/xmlrpc.php
67 /// XmlRpcServiceReadKey = 1234
64 /// XmlRpcServiceWriteKey = 1234 68 /// XmlRpcServiceWriteKey = 1234
65 /// 69 ///
70 /// MessagingModule = GroupsMessagingModule
71 /// MessagingEnabled = true
72 ///
66 /// ; Disables HTTP Keep-Alive for Groups Module HTTP Requests, work around for 73 /// ; Disables HTTP Keep-Alive for Groups Module HTTP Requests, work around for
67 /// ; a problem discovered on some Windows based region servers. Only disable 74 /// ; a problem discovered on some Windows based region servers. Only disable
68 /// ; if you see a large number (dozens) of the following Exceptions: 75 /// ; if you see a large number (dozens) of the following Exceptions:
@@ -78,7 +85,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
78 85
79 private IMessageTransferModule m_msgTransferModule = null; 86 private IMessageTransferModule m_msgTransferModule = null;
80 87
81 private IGroupDataProvider m_groupData = null; 88 private IGroupsServicesConnector m_groupData = null;
82 89
83 class GroupRequestIDInfo 90 class GroupRequestIDInfo
84 { 91 {
@@ -91,7 +98,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
91 98
92 99
93 // Configuration settings 100 // Configuration settings
94 private const string m_defaultXmlRpcServiceURL = "http://osflotsam.org/xmlrpc.php";
95 private bool m_groupsEnabled = false; 101 private bool m_groupsEnabled = false;
96 private bool m_groupNoticesEnabled = true; 102 private bool m_groupNoticesEnabled = true;
97 private bool m_debugEnabled = true; 103 private bool m_debugEnabled = true;
@@ -115,7 +121,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
115 return; 121 return;
116 } 122 }
117 123
118 if (groupsConfig.GetString("Module", "Default") != "XmlRpcGroups") 124 if (groupsConfig.GetString("Module", "Default") != Name)
119 { 125 {
120 m_groupsEnabled = false; 126 m_groupsEnabled = false;
121 127
@@ -124,17 +130,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
124 130
125 m_log.InfoFormat("[GROUPS]: Initializing {0}", this.Name); 131 m_log.InfoFormat("[GROUPS]: Initializing {0}", this.Name);
126 132
127 string ServiceURL = groupsConfig.GetString("XmlRpcServiceURL", m_defaultXmlRpcServiceURL); 133 m_groupNoticesEnabled = groupsConfig.GetBoolean("NoticesEnabled", true);
128 bool DisableKeepAlive = groupsConfig.GetBoolean("XmlRpcDisableKeepAlive", false); 134 m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true);
129
130 string ServiceReadKey = groupsConfig.GetString("XmlRpcServiceReadKey", string.Empty);
131 string ServiceWriteKey = groupsConfig.GetString("XmlRpcServiceWriteKey", string.Empty);
132
133 m_groupData = new XmlRpcGroupDataProvider(ServiceURL, DisableKeepAlive, ServiceReadKey, ServiceWriteKey);
134 m_log.InfoFormat("[GROUPS]: XmlRpc Service URL set to: {0}", ServiceURL);
135
136 m_groupNoticesEnabled = groupsConfig.GetBoolean("XmlRpcNoticesEnabled", true);
137 m_debugEnabled = groupsConfig.GetBoolean("XmlRpcDebugEnabled", true);
138 135
139 m_clientRequestIDFlushTimer.Interval = m_clientRequestIDFlushTimeOut; 136 m_clientRequestIDFlushTimer.Interval = m_clientRequestIDFlushTimeOut;
140 m_clientRequestIDFlushTimer.Elapsed += FlushClientRequestIDInfoCache; 137 m_clientRequestIDFlushTimer.Elapsed += FlushClientRequestIDInfoCache;
@@ -172,6 +169,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
172 169
173 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 170 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
174 171
172 if (m_groupData == null)
173 {
174 m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();
175
176 // No Groups Service Connector, then nothing works...
177 if (m_groupData == null)
178 {
179 m_groupsEnabled = false;
180 m_log.Error("[GROUPS]: Could not get IGroupsServicesConnector");
181 Close();
182 return;
183 }
184 }
185
175 if (m_msgTransferModule == null) 186 if (m_msgTransferModule == null)
176 { 187 {
177 m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>(); 188 m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
@@ -218,7 +229,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
218 if (!m_groupsEnabled) 229 if (!m_groupsEnabled)
219 return; 230 return;
220 231
221 if (m_debugEnabled) m_log.Debug("[GROUPS]: Shutting down XmlRpcGroups module."); 232 if (m_debugEnabled) m_log.Debug("[GROUPS]: Shutting down Groups module.");
222 233
223 m_clientRequestIDFlushTimer.Stop(); 234 m_clientRequestIDFlushTimer.Stop();
224 } 235 }
@@ -230,7 +241,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
230 241
231 public string Name 242 public string Name
232 { 243 {
233 get { return "XmlRpcGroupsModule"; } 244 get { return "GroupsModule"; }
234 } 245 }
235 246
236 #endregion 247 #endregion