aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs34
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