diff options
author | Melanie | 2010-09-05 18:24:16 +0100 |
---|---|---|
committer | Melanie | 2010-09-05 18:24:16 +0100 |
commit | 55d3c9891732d730ad91f5d5b65f7b39d6501029 (patch) | |
tree | 57717e9f9a3f9029a626cd75d9bbde0274540e0c /OpenSim/Services/Connectors | |
parent | Fix up Simian inentory (diff) | |
download | opensim-SC_OLD-55d3c9891732d730ad91f5d5b65f7b39d6501029.zip opensim-SC_OLD-55d3c9891732d730ad91f5d5b65f7b39d6501029.tar.gz opensim-SC_OLD-55d3c9891732d730ad91f5d5b65f7b39d6501029.tar.bz2 opensim-SC_OLD-55d3c9891732d730ad91f5d5b65f7b39d6501029.tar.xz |
Fix up presence connector in SimianGrid
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 778f3f4..fd667ed 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |||
@@ -59,6 +59,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
59 | 59 | ||
60 | private string m_serverUrl = String.Empty; | 60 | private string m_serverUrl = String.Empty; |
61 | private SimianActivityDetector m_activityDetector; | 61 | private SimianActivityDetector m_activityDetector; |
62 | private bool m_Enabled = false; | ||
62 | 63 | ||
63 | #region ISharedRegionModule | 64 | #region ISharedRegionModule |
64 | 65 | ||
@@ -71,7 +72,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
71 | public string Name { get { return "SimianPresenceServiceConnector"; } } | 72 | public string Name { get { return "SimianPresenceServiceConnector"; } } |
72 | public void AddRegion(Scene scene) | 73 | public void AddRegion(Scene scene) |
73 | { | 74 | { |
74 | if (!String.IsNullOrEmpty(m_serverUrl)) | 75 | if (m_Enabled) |
75 | { | 76 | { |
76 | scene.RegisterModuleInterface<IPresenceService>(this); | 77 | scene.RegisterModuleInterface<IPresenceService>(this); |
77 | scene.RegisterModuleInterface<IGridUserService>(this); | 78 | scene.RegisterModuleInterface<IGridUserService>(this); |
@@ -83,7 +84,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
83 | } | 84 | } |
84 | public void RemoveRegion(Scene scene) | 85 | public void RemoveRegion(Scene scene) |
85 | { | 86 | { |
86 | if (!String.IsNullOrEmpty(m_serverUrl)) | 87 | if (m_Enabled) |
87 | { | 88 | { |
88 | scene.UnregisterModuleInterface<IPresenceService>(this); | 89 | scene.UnregisterModuleInterface<IPresenceService>(this); |
89 | scene.UnregisterModuleInterface<IGridUserService>(this); | 90 | scene.UnregisterModuleInterface<IGridUserService>(this); |
@@ -103,20 +104,29 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
103 | 104 | ||
104 | public void Initialise(IConfigSource source) | 105 | public void Initialise(IConfigSource source) |
105 | { | 106 | { |
106 | IConfig gridConfig = source.Configs["PresenceService"]; | 107 | IConfig moduleConfig = source.Configs["Modules"]; |
107 | if (gridConfig != null) | 108 | if (moduleConfig != null) |
108 | { | 109 | { |
109 | string serviceUrl = gridConfig.GetString("PresenceServerURI"); | 110 | string name = moduleConfig.GetString("AssetServices", ""); |
110 | if (!String.IsNullOrEmpty(serviceUrl)) | 111 | if (name == Name) |
111 | { | 112 | { |
112 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | 113 | IConfig gridConfig = source.Configs["PresenceService"]; |
113 | serviceUrl = serviceUrl + '/'; | 114 | if (gridConfig != null) |
114 | m_serverUrl = serviceUrl; | 115 | { |
116 | string serviceUrl = gridConfig.GetString("PresenceServerURI"); | ||
117 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
118 | { | ||
119 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
120 | serviceUrl = serviceUrl + '/'; | ||
121 | m_serverUrl = serviceUrl; | ||
122 | m_Enabled = true; | ||
123 | } | ||
124 | } | ||
125 | |||
126 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
127 | m_log.Info("[SIMIAN PRESENCE CONNECTOR]: No PresenceServerURI specified, disabling connector"); | ||
115 | } | 128 | } |
116 | } | 129 | } |
117 | |||
118 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
119 | m_log.Info("[SIMIAN PRESENCE CONNECTOR]: No PresenceServerURI specified, disabling connector"); | ||
120 | } | 130 | } |
121 | 131 | ||
122 | #region IPresenceService | 132 | #region IPresenceService |