aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
diff options
context:
space:
mode:
authorMelanie2010-09-05 18:14:31 +0100
committerMelanie2010-09-05 18:14:31 +0100
commit0ca48b2486e64cf0372d7190efdd1455e7158bad (patch)
tree8e9d963fe87a2714b6d41dbf5858d5f195770c06 /OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
parentFriends works differently, it' snot even a region module at all, but a connector (diff)
downloadopensim-SC_OLD-0ca48b2486e64cf0372d7190efdd1455e7158bad.zip
opensim-SC_OLD-0ca48b2486e64cf0372d7190efdd1455e7158bad.tar.gz
opensim-SC_OLD-0ca48b2486e64cf0372d7190efdd1455e7158bad.tar.bz2
opensim-SC_OLD-0ca48b2486e64cf0372d7190efdd1455e7158bad.tar.xz
Fix up Simian inentory
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs48
1 files changed, 30 insertions, 18 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
index 63aaad7..1862842 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
@@ -70,6 +70,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
70 private string m_serverUrl = String.Empty; 70 private string m_serverUrl = String.Empty;
71 private string m_userServerUrl = String.Empty; 71 private string m_userServerUrl = String.Empty;
72// private object m_gestureSyncRoot = new object(); 72// private object m_gestureSyncRoot = new object();
73 private bool m_Enabled = false;
73 74
74 #region ISharedRegionModule 75 #region ISharedRegionModule
75 76
@@ -80,8 +81,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
80 81
81 public SimianInventoryServiceConnector() { } 82 public SimianInventoryServiceConnector() { }
82 public string Name { get { return "SimianInventoryServiceConnector"; } } 83 public string Name { get { return "SimianInventoryServiceConnector"; } }
83 public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IInventoryService>(this); } } 84 public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IInventoryService>(this); } }
84 public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IInventoryService>(this); } } 85 public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IInventoryService>(this); } }
85 86
86 #endregion ISharedRegionModule 87 #endregion ISharedRegionModule
87 88
@@ -92,30 +93,41 @@ namespace OpenSim.Services.Connectors.SimianGrid
92 93
93 public void Initialise(IConfigSource source) 94 public void Initialise(IConfigSource source)
94 { 95 {
95 IConfig gridConfig = source.Configs["InventoryService"]; 96 IConfig moduleConfig = source.Configs["Modules"];
96 if (gridConfig != null) 97 if (moduleConfig != null)
97 { 98 {
98 string serviceUrl = gridConfig.GetString("InventoryServerURI"); 99 string name = moduleConfig.GetString("AssetServices", "");
99 if (!String.IsNullOrEmpty(serviceUrl)) 100 if (name == Name)
100 { 101 {
101 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) 102 IConfig gridConfig = source.Configs["InventoryService"];
102 serviceUrl = serviceUrl + '/';
103 m_serverUrl = serviceUrl;
104
105 gridConfig = source.Configs["UserAccountService"];
106 if (gridConfig != null) 103 if (gridConfig != null)
107 { 104 {
108 serviceUrl = gridConfig.GetString("UserAccountServerURI"); 105 string serviceUrl = gridConfig.GetString("InventoryServerURI");
109 if (!String.IsNullOrEmpty(serviceUrl)) 106 if (!String.IsNullOrEmpty(serviceUrl))
110 m_userServerUrl = serviceUrl; 107 {
108 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
109 serviceUrl = serviceUrl + '/';
110 m_serverUrl = serviceUrl;
111
112 gridConfig = source.Configs["UserAccountService"];
113 if (gridConfig != null)
114 {
115 serviceUrl = gridConfig.GetString("UserAccountServerURI");
116 if (!String.IsNullOrEmpty(serviceUrl))
117 {
118 m_userServerUrl = serviceUrl;
119 m_Enabled = true;
120 }
121 }
122 }
111 } 123 }
124
125 if (String.IsNullOrEmpty(m_serverUrl))
126 m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No InventoryServerURI specified, disabling connector");
127 else if (String.IsNullOrEmpty(m_userServerUrl))
128 m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No UserAccountServerURI specified, disabling connector");
112 } 129 }
113 } 130 }
114
115 if (String.IsNullOrEmpty(m_serverUrl))
116 m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No InventoryServerURI specified, disabling connector");
117 else if (String.IsNullOrEmpty(m_userServerUrl))
118 m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No UserAccountServerURI specified, disabling connector");
119 } 131 }
120 132
121 /// <summary> 133 /// <summary>