diff options
author | Melanie | 2010-09-05 17:53:15 +0100 |
---|---|---|
committer | Melanie | 2010-09-05 17:53:15 +0100 |
commit | 1238b27d6473cc7f258c6ca08b71446fb69a20ad (patch) | |
tree | b766d3c8cb7abc0d4cfd62dd8b98d3c401a1c585 /OpenSim/Services/Connectors | |
parent | Add the m_Enabled pattern to Simian Auth (diff) | |
download | opensim-SC_OLD-1238b27d6473cc7f258c6ca08b71446fb69a20ad.zip opensim-SC_OLD-1238b27d6473cc7f258c6ca08b71446fb69a20ad.tar.gz opensim-SC_OLD-1238b27d6473cc7f258c6ca08b71446fb69a20ad.tar.bz2 opensim-SC_OLD-1238b27d6473cc7f258c6ca08b71446fb69a20ad.tar.xz |
And the avatar services :)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index c2e20a3..97cb9e3 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | |||
@@ -56,6 +56,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
56 | // private static string ZeroID = UUID.Zero.ToString(); | 56 | // private static string ZeroID = UUID.Zero.ToString(); |
57 | 57 | ||
58 | private string m_serverUrl = String.Empty; | 58 | private string m_serverUrl = String.Empty; |
59 | private bool m_Enabled = false; | ||
59 | 60 | ||
60 | #region ISharedRegionModule | 61 | #region ISharedRegionModule |
61 | 62 | ||
@@ -66,8 +67,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
66 | 67 | ||
67 | public SimianAvatarServiceConnector() { } | 68 | public SimianAvatarServiceConnector() { } |
68 | public string Name { get { return "SimianAvatarServiceConnector"; } } | 69 | public string Name { get { return "SimianAvatarServiceConnector"; } } |
69 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAvatarService>(this); } } | 70 | public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAvatarService>(this); } } |
70 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAvatarService>(this); } } | 71 | public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAvatarService>(this); } } |
71 | 72 | ||
72 | #endregion ISharedRegionModule | 73 | #endregion ISharedRegionModule |
73 | 74 | ||
@@ -78,20 +79,29 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
78 | 79 | ||
79 | public void Initialise(IConfigSource source) | 80 | public void Initialise(IConfigSource source) |
80 | { | 81 | { |
81 | IConfig gridConfig = source.Configs["AvatarService"]; | 82 | IConfig moduleConfig = source.Configs["Modules"]; |
82 | if (gridConfig != null) | 83 | if (moduleConfig != null) |
83 | { | 84 | { |
84 | string serviceUrl = gridConfig.GetString("AvatarServerURI"); | 85 | string name = moduleConfig.GetString("AssetServices", ""); |
85 | if (!String.IsNullOrEmpty(serviceUrl)) | 86 | if (name == Name) |
86 | { | 87 | { |
87 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | 88 | IConfig gridConfig = source.Configs["AvatarService"]; |
88 | serviceUrl = serviceUrl + '/'; | 89 | if (gridConfig != null) |
89 | m_serverUrl = serviceUrl; | 90 | { |
91 | string serviceUrl = gridConfig.GetString("AvatarServerURI"); | ||
92 | if (!String.IsNullOrEmpty(serviceUrl)) | ||
93 | { | ||
94 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) | ||
95 | serviceUrl = serviceUrl + '/'; | ||
96 | m_serverUrl = serviceUrl; | ||
97 | m_Enabled = true; | ||
98 | } | ||
99 | } | ||
100 | |||
101 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
102 | m_log.Info("[SIMIAN AVATAR CONNECTOR]: No AvatarServerURI specified, disabling connector"); | ||
90 | } | 103 | } |
91 | } | 104 | } |
92 | |||
93 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
94 | m_log.Info("[SIMIAN AVATAR CONNECTOR]: No AvatarServerURI specified, disabling connector"); | ||
95 | } | 105 | } |
96 | 106 | ||
97 | #region IAvatarService | 107 | #region IAvatarService |