aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorMelanie2010-09-05 15:06:00 +0100
committerMelanie2010-09-05 15:06:00 +0100
commite4c2b44e5cb756b957a96d13ad9a611dfba12df4 (patch)
treed7978fc31ce346cae467df7a81737cfa323ae6c1 /OpenSim/Services
parentRemove "Dwell" support from core and replace it with calls to methods (diff)
parentRemove "Dwell" support from core and replace it with calls to methods (diff)
downloadopensim-SC_OLD-e4c2b44e5cb756b957a96d13ad9a611dfba12df4.zip
opensim-SC_OLD-e4c2b44e5cb756b957a96d13ad9a611dfba12df4.tar.gz
opensim-SC_OLD-e4c2b44e5cb756b957a96d13ad9a611dfba12df4.tar.bz2
opensim-SC_OLD-e4c2b44e5cb756b957a96d13ad9a611dfba12df4.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs43
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs25
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs29
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs25
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs41
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs14
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs22
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs44
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs22
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs42
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs25
-rw-r--r--OpenSim/Services/InventoryService/HGInventoryService.cs2
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs2
13 files changed, 140 insertions, 196 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index 7fa086a..6d3c64a 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -66,20 +66,34 @@ namespace OpenSim.Services.Connectors.Hypergrid
66 { 66 {
67 m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", m_ServerURL, e.Message); 67 m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", m_ServerURL, e.Message);
68 } 68 }
69 m_log.DebugFormat("[USER AGENT CONNECTOR]: new connector to {0} ({1})", url, m_ServerURL);
69 } 70 }
70 71
71 public UserAgentServiceConnector(IConfigSource config) 72 public UserAgentServiceConnector(IConfigSource config)
72 { 73 {
73 } 74 IConfig serviceConfig = config.Configs["UserAgentService"];
75 if (serviceConfig == null)
76 {
77 m_log.Error("[USER AGENT CONNECTOR]: UserAgentService missing from ini");
78 throw new Exception("UserAgent connector init error");
79 }
74 80
75 public bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, IPEndPoint ipaddress, out string reason) 81 string serviceURI = serviceConfig.GetString("UserAgentServerURI",
76 { 82 String.Empty);
77 // not available over remote calls 83
78 reason = "Method not available over remote calls"; 84 if (serviceURI == String.Empty)
79 return false; 85 {
86 m_log.Error("[USER AGENT CONNECTOR]: No Server URI named in section UserAgentService");
87 throw new Exception("UserAgent connector init error");
88 }
89 m_ServerURL = serviceURI;
90
91 m_log.DebugFormat("[USER AGENT CONNECTOR]: UserAgentServiceConnector started for {0}", m_ServerURL);
80 } 92 }
81 93
82 public bool LoginAgentToGrid(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, out string reason) 94
95 // The Login service calls this interface with a non-null [client] ipaddress
96 public bool LoginAgentToGrid(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, IPEndPoint ipaddress, out string reason)
83 { 97 {
84 reason = String.Empty; 98 reason = String.Empty;
85 99
@@ -90,7 +104,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
90 return false; 104 return false;
91 } 105 }
92 106
93 string uri = m_ServerURL + "/homeagent/" + aCircuit.AgentID + "/"; 107 string uri = m_ServerURL + "/homeagent/" + aCircuit.AgentID + "/";
94 108
95 Console.WriteLine(" >>> LoginAgentToGrid <<< " + uri); 109 Console.WriteLine(" >>> LoginAgentToGrid <<< " + uri);
96 110
@@ -102,7 +116,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
102 //AgentCreateRequest.Headers.Add("Authorization", authKey); 116 //AgentCreateRequest.Headers.Add("Authorization", authKey);
103 117
104 // Fill it in 118 // Fill it in
105 OSDMap args = PackCreateAgentArguments(aCircuit, gatekeeper, destination); 119 OSDMap args = PackCreateAgentArguments(aCircuit, gatekeeper, destination, ipaddress);
106 120
107 string strBuffer = ""; 121 string strBuffer = "";
108 byte[] buffer = new byte[1]; 122 byte[] buffer = new byte[1];
@@ -199,7 +213,14 @@ namespace OpenSim.Services.Connectors.Hypergrid
199 213
200 } 214 }
201 215
202 protected OSDMap PackCreateAgentArguments(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination) 216
217 // The simulators call this interface
218 public bool LoginAgentToGrid(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, out string reason)
219 {
220 return LoginAgentToGrid(aCircuit, gatekeeper, destination, null, out reason);
221 }
222
223 protected OSDMap PackCreateAgentArguments(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, IPEndPoint ipaddress)
203 { 224 {
204 OSDMap args = null; 225 OSDMap args = null;
205 try 226 try
@@ -217,6 +238,8 @@ namespace OpenSim.Services.Connectors.Hypergrid
217 args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); 238 args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
218 args["destination_name"] = OSD.FromString(destination.RegionName); 239 args["destination_name"] = OSD.FromString(destination.RegionName);
219 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 240 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
241 if (ipaddress != null)
242 args["client_ip"] = OSD.FromString(ipaddress.Address.ToString());
220 243
221 return args; 244 return args;
222 } 245 }
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index 616b5a7..3a4f84f 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -85,27 +85,20 @@ namespace OpenSim.Services.Connectors.SimianGrid
85 85
86 public void Initialise(IConfigSource source) 86 public void Initialise(IConfigSource source)
87 { 87 {
88 if (Simian.IsSimianEnabled(source, "AssetServices", this.Name)) 88 IConfig gridConfig = source.Configs["AssetService"];
89 if (gridConfig != null)
89 { 90 {
90 IConfig gridConfig = source.Configs["AssetService"];
91 if (gridConfig == null)
92 {
93 m_log.Error("[SIMIAN ASSET CONNECTOR]: AssetService missing from OpenSim.ini");
94 throw new Exception("Asset connector init error");
95 }
96
97 string serviceUrl = gridConfig.GetString("AssetServerURI"); 91 string serviceUrl = gridConfig.GetString("AssetServerURI");
98 if (String.IsNullOrEmpty(serviceUrl)) 92 if (!String.IsNullOrEmpty(serviceUrl))
99 { 93 {
100 m_log.Error("[SIMIAN ASSET CONNECTOR]: No AssetServerURI in section AssetService"); 94 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
101 throw new Exception("Asset connector init error"); 95 serviceUrl = serviceUrl + '/';
96 m_serverUrl = serviceUrl;
102 } 97 }
103
104 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
105 serviceUrl = serviceUrl + '/';
106
107 m_serverUrl = serviceUrl;
108 } 98 }
99
100 if (String.IsNullOrEmpty(m_serverUrl))
101 m_log.Info("[SIMIAN ASSET CONNECTOR]: No AssetServerURI specified, disabling connector");
109 } 102 }
110 103
111 #region IAssetService 104 #region IAssetService
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
index 7a96a05..f1c2575 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -73,24 +73,20 @@ namespace OpenSim.Services.Connectors.SimianGrid
73 73
74 public void Initialise(IConfigSource source) 74 public void Initialise(IConfigSource source)
75 { 75 {
76 if (Simian.IsSimianEnabled(source, "AuthenticationServices", this.Name)) 76 IConfig gridConfig = source.Configs["AuthenticationService"];
77 if (gridConfig != null)
77 { 78 {
78 IConfig assetConfig = source.Configs["AuthenticationService"]; 79 string serviceUrl = gridConfig.GetString("AuthenticationServerURI");
79 if (assetConfig == null) 80 if (!String.IsNullOrEmpty(serviceUrl))
80 { 81 {
81 m_log.Error("[SIMIAN AUTH CONNECTOR]: AuthenticationService missing from OpenSim.ini"); 82 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
82 throw new Exception("Authentication connector init error"); 83 serviceUrl = serviceUrl + '/';
84 m_serverUrl = serviceUrl;
83 } 85 }
84
85 string serviceURI = assetConfig.GetString("AuthenticationServerURI");
86 if (String.IsNullOrEmpty(serviceURI))
87 {
88 m_log.Error("[SIMIAN AUTH CONNECTOR]: No Server URI named in section AuthenticationService");
89 throw new Exception("Authentication connector init error");
90 }
91
92 m_serverUrl = serviceURI;
93 } 86 }
87
88 if (String.IsNullOrEmpty(m_serverUrl))
89 m_log.Info("[SIMIAN AUTH CONNECTOR]: No AuthenticationServerURI specified, disabling connector");
94 } 90 }
95 91
96 public string Authenticate(UUID principalID, string password, int lifetime) 92 public string Authenticate(UUID principalID, string password, int lifetime)
@@ -253,7 +249,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
253 if (password == simianGridCredential || 249 if (password == simianGridCredential ||
254 "$1$" + password == simianGridCredential || 250 "$1$" + password == simianGridCredential ||
255 "$1$" + Utils.MD5String(password) == simianGridCredential || 251 "$1$" + Utils.MD5String(password) == simianGridCredential ||
256 Utils.MD5String(password) == simianGridCredential) 252 Utils.MD5String(password) == simianGridCredential ||
253 "$1$" + Utils.MD5String(password + ":") == simianGridCredential)
257 { 254 {
258 authorizeResult = Authorize(userID); 255 authorizeResult = Authorize(userID);
259 return true; 256 return true;
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
index 734bdd2..c2e20a3 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
@@ -78,27 +78,20 @@ namespace OpenSim.Services.Connectors.SimianGrid
78 78
79 public void Initialise(IConfigSource source) 79 public void Initialise(IConfigSource source)
80 { 80 {
81 if (Simian.IsSimianEnabled(source, "AvatarServices", this.Name)) 81 IConfig gridConfig = source.Configs["AvatarService"];
82 if (gridConfig != null)
82 { 83 {
83 IConfig gridConfig = source.Configs["AvatarService"];
84 if (gridConfig == null)
85 {
86 m_log.Error("[SIMIAN AVATAR CONNECTOR]: AvatarService missing from OpenSim.ini");
87 throw new Exception("Avatar connector init error");
88 }
89
90 string serviceUrl = gridConfig.GetString("AvatarServerURI"); 84 string serviceUrl = gridConfig.GetString("AvatarServerURI");
91 if (String.IsNullOrEmpty(serviceUrl)) 85 if (!String.IsNullOrEmpty(serviceUrl))
92 { 86 {
93 m_log.Error("[SIMIAN AVATAR CONNECTOR]: No AvatarServerURI in section AvatarService"); 87 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
94 throw new Exception("Avatar connector init error"); 88 serviceUrl = serviceUrl + '/';
89 m_serverUrl = serviceUrl;
95 } 90 }
96
97 if (!serviceUrl.EndsWith("/"))
98 serviceUrl = serviceUrl + '/';
99
100 m_serverUrl = serviceUrl;
101 } 91 }
92
93 if (String.IsNullOrEmpty(m_serverUrl))
94 m_log.Info("[SIMIAN AVATAR CONNECTOR]: No AvatarServerURI specified, disabling connector");
102 } 95 }
103 96
104 #region IAvatarService 97 #region IAvatarService
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs
index 89f3594..1afb1e1 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs
@@ -76,38 +76,29 @@ namespace OpenSim.Services.Connectors.SimianGrid
76 76
77 public void Initialise(IConfigSource source) 77 public void Initialise(IConfigSource source)
78 { 78 {
79 bool isSimianEnabled = false; 79 IConfig gridConfig = source.Configs["FriendsService"];
80 80 if (gridConfig != null)
81 if (source.Configs["Friends"] != null)
82 {
83 string module = source.Configs["Friends"].GetString("Connector");
84 isSimianEnabled = !String.IsNullOrEmpty(module) && module.EndsWith(this.Name);
85 }
86
87 if (isSimianEnabled)
88 { 81 {
89 IConfig assetConfig = source.Configs["FriendsService"]; 82 string serviceUrl = gridConfig.GetString("FriendsServerURI");
90 if (assetConfig == null) 83 if (!String.IsNullOrEmpty(serviceUrl))
91 {
92 m_log.Error("[SIMIAN FRIENDS CONNECTOR]: FriendsService missing from OpenSim.ini");
93 throw new Exception("Friends connector init error");
94 }
95
96 string serviceURI = assetConfig.GetString("FriendsServerURI");
97 if (String.IsNullOrEmpty(serviceURI))
98 { 84 {
99 m_log.Error("[SIMIAN FRIENDS CONNECTOR]: No Server URI named in section FriendsService"); 85 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
100 throw new Exception("Friends connector init error"); 86 serviceUrl = serviceUrl + '/';
87 m_serverUrl = serviceUrl;
101 } 88 }
102
103 m_serverUrl = serviceURI;
104 } 89 }
90
91 if (String.IsNullOrEmpty(m_serverUrl))
92 m_log.Info("[SIMIAN FRIENDS CONNECTOR]: No FriendsServerURI specified, disabling connector");
105 } 93 }
106 94
107 #region IFriendsService 95 #region IFriendsService
108 96
109 public FriendInfo[] GetFriends(UUID principalID) 97 public FriendInfo[] GetFriends(UUID principalID)
110 { 98 {
99 if (String.IsNullOrEmpty(m_serverUrl))
100 return new FriendInfo[0];
101
111 Dictionary<UUID, FriendInfo> friends = new Dictionary<UUID, FriendInfo>(); 102 Dictionary<UUID, FriendInfo> friends = new Dictionary<UUID, FriendInfo>();
112 103
113 OSDArray friendsArray = GetFriended(principalID); 104 OSDArray friendsArray = GetFriended(principalID);
@@ -156,6 +147,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
156 147
157 public bool StoreFriend(UUID principalID, string friend, int flags) 148 public bool StoreFriend(UUID principalID, string friend, int flags)
158 { 149 {
150 if (String.IsNullOrEmpty(m_serverUrl))
151 return true;
152
159 NameValueCollection requestArgs = new NameValueCollection 153 NameValueCollection requestArgs = new NameValueCollection
160 { 154 {
161 { "RequestMethod", "AddGeneric" }, 155 { "RequestMethod", "AddGeneric" },
@@ -176,6 +170,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
176 170
177 public bool Delete(UUID principalID, string friend) 171 public bool Delete(UUID principalID, string friend)
178 { 172 {
173 if (String.IsNullOrEmpty(m_serverUrl))
174 return true;
175
179 NameValueCollection requestArgs = new NameValueCollection 176 NameValueCollection requestArgs = new NameValueCollection
180 { 177 {
181 { "RequestMethod", "RemoveGeneric" }, 178 { "RequestMethod", "RemoveGeneric" },
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs
index 7d97aaa..847319c 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs
@@ -31,17 +31,3 @@ using Nini.Config;
31 31
32[assembly: Addin("SimianGrid", "1.0")] 32[assembly: Addin("SimianGrid", "1.0")]
33[assembly: AddinDependency("OpenSim", "0.5")] 33[assembly: AddinDependency("OpenSim", "0.5")]
34
35public static class Simian
36{
37 public static bool IsSimianEnabled(IConfigSource config, string moduleName, string connectorName)
38 {
39 if (config.Configs["Modules"] != null)
40 {
41 string module = config.Configs["Modules"].GetString(moduleName);
42 return !String.IsNullOrEmpty(module) && module.EndsWith(connectorName);
43 }
44
45 return false;
46 }
47} \ No newline at end of file
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index 1ddcc75..204dbe5 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -98,24 +98,20 @@ namespace OpenSim.Services.Connectors.SimianGrid
98 98
99 public void Initialise(IConfigSource source) 99 public void Initialise(IConfigSource source)
100 { 100 {
101 if (Simian.IsSimianEnabled(source, "GridServices", this.Name)) 101 IConfig gridConfig = source.Configs["GridService"];
102 if (gridConfig != null)
102 { 103 {
103 IConfig gridConfig = source.Configs["GridService"];
104 if (gridConfig == null)
105 {
106 m_log.Error("[SIMIAN GRID CONNECTOR]: GridService missing from OpenSim.ini");
107 throw new Exception("Grid connector init error");
108 }
109
110 string serviceUrl = gridConfig.GetString("GridServerURI"); 104 string serviceUrl = gridConfig.GetString("GridServerURI");
111 if (String.IsNullOrEmpty(serviceUrl)) 105 if (!String.IsNullOrEmpty(serviceUrl))
112 { 106 {
113 m_log.Error("[SIMIAN GRID CONNECTOR]: No Server URI named in section GridService"); 107 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
114 throw new Exception("Grid connector init error"); 108 serviceUrl = serviceUrl + '/';
109 m_serverUrl = serviceUrl;
115 } 110 }
116
117 m_serverUrl = serviceUrl;
118 } 111 }
112
113 if (String.IsNullOrEmpty(m_serverUrl))
114 m_log.Info("[SIMIAN GRID CONNECTOR]: No GridServerURI specified, disabling connector");
119 } 115 }
120 116
121 #region IGridService 117 #region IGridService
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
index 89c1a5a..63aaad7 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
@@ -92,38 +92,30 @@ namespace OpenSim.Services.Connectors.SimianGrid
92 92
93 public void Initialise(IConfigSource source) 93 public void Initialise(IConfigSource source)
94 { 94 {
95 if (Simian.IsSimianEnabled(source, "InventoryServices", this.Name)) 95 IConfig gridConfig = source.Configs["InventoryService"];
96 if (gridConfig != null)
96 { 97 {
97 IConfig gridConfig = source.Configs["InventoryService"];
98 if (gridConfig == null)
99 {
100 m_log.Error("[SIMIAN INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini");
101 throw new Exception("Inventory connector init error");
102 }
103
104 string serviceUrl = gridConfig.GetString("InventoryServerURI"); 98 string serviceUrl = gridConfig.GetString("InventoryServerURI");
105 if (String.IsNullOrEmpty(serviceUrl)) 99 if (!String.IsNullOrEmpty(serviceUrl))
106 { 100 {
107 m_log.Error("[SIMIAN INVENTORY CONNECTOR]: No Server URI named in section InventoryService"); 101 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
108 throw new Exception("Inventory connector init error"); 102 serviceUrl = serviceUrl + '/';
109 } 103 m_serverUrl = serviceUrl;
110 104
111 m_serverUrl = serviceUrl; 105 gridConfig = source.Configs["UserAccountService"];
112 106 if (gridConfig != null)
113 gridConfig = source.Configs["UserAccountService"]; 107 {
114 if (gridConfig != null) 108 serviceUrl = gridConfig.GetString("UserAccountServerURI");
115 { 109 if (!String.IsNullOrEmpty(serviceUrl))
116 serviceUrl = gridConfig.GetString("UserAccountServerURI"); 110 m_userServerUrl = serviceUrl;
117 if (!String.IsNullOrEmpty(serviceUrl)) 111 }
118 m_userServerUrl = serviceUrl;
119 else
120 m_log.Info("[SIMIAN INVENTORY CONNECTOR]: No Server URI named in section UserAccountService");
121 }
122 else
123 {
124 m_log.Warn("[SIMIAN INVENTORY CONNECTOR]: UserAccountService missing from OpenSim.ini");
125 } 112 }
126 } 113 }
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");
127 } 119 }
128 120
129 /// <summary> 121 /// <summary>
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
index ca23e27..778f3f4 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
@@ -103,24 +103,20 @@ namespace OpenSim.Services.Connectors.SimianGrid
103 103
104 public void Initialise(IConfigSource source) 104 public void Initialise(IConfigSource source)
105 { 105 {
106 if (Simian.IsSimianEnabled(source, "PresenceServices", this.Name)) 106 IConfig gridConfig = source.Configs["PresenceService"];
107 if (gridConfig != null)
107 { 108 {
108 IConfig gridConfig = source.Configs["PresenceService"];
109 if (gridConfig == null)
110 {
111 m_log.Error("[SIMIAN PRESENCE CONNECTOR]: PresenceService missing from OpenSim.ini");
112 throw new Exception("Presence connector init error");
113 }
114
115 string serviceUrl = gridConfig.GetString("PresenceServerURI"); 109 string serviceUrl = gridConfig.GetString("PresenceServerURI");
116 if (String.IsNullOrEmpty(serviceUrl)) 110 if (!String.IsNullOrEmpty(serviceUrl))
117 { 111 {
118 m_log.Error("[SIMIAN PRESENCE CONNECTOR]: No PresenceServerURI in section PresenceService"); 112 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
119 throw new Exception("Presence connector init error"); 113 serviceUrl = serviceUrl + '/';
114 m_serverUrl = serviceUrl;
120 } 115 }
121
122 m_serverUrl = serviceUrl;
123 } 116 }
117
118 if (String.IsNullOrEmpty(m_serverUrl))
119 m_log.Info("[SIMIAN PRESENCE CONNECTOR]: No PresenceServerURI specified, disabling connector");
124 } 120 }
125 121
126 #region IPresenceService 122 #region IPresenceService
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
index d30d880..a817d7c 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
@@ -88,44 +88,20 @@ namespace OpenSim.Services.Connectors.SimianGrid
88 88
89 public void Initialise(IConfigSource source) 89 public void Initialise(IConfigSource source)
90 { 90 {
91 if (Simian.IsSimianEnabled(source, "UserAccountServices", "SimianUserAccountServiceConnector")) 91 IConfig gridConfig = source.Configs["UserAccountService"];
92 if (gridConfig != null)
92 { 93 {
93 IConfig gridConfig = source.Configs["UserAccountService"];
94 if (gridConfig == null)
95 {
96 m_log.Error("[SIMIAN PROFILES]: UserAccountService missing from OpenSim.ini");
97 throw new Exception("Profiles init error");
98 }
99
100 string serviceUrl = gridConfig.GetString("UserAccountServerURI"); 94 string serviceUrl = gridConfig.GetString("UserAccountServerURI");
101 if (String.IsNullOrEmpty(serviceUrl)) 95 if (!String.IsNullOrEmpty(serviceUrl))
102 {
103 m_log.Error("[SIMIAN PROFILES]: No UserAccountServerURI in section UserAccountService");
104 throw new Exception("Profiles init error");
105 }
106
107 if (!serviceUrl.EndsWith("/"))
108 serviceUrl = serviceUrl + '/';
109
110 m_serverUrl = serviceUrl;
111 IConfig profilesConfig = source.Configs["Profiles"];
112 if (profilesConfig == null)
113 { 96 {
114 // Do not run this module by default. 97 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
115 return; 98 serviceUrl = serviceUrl + '/';
116 } 99 m_serverUrl = serviceUrl;
117 else
118 {
119 // if profiles aren't enabled, we're not needed.
120 // if we're not specified as the connector to use, then we're not wanted
121 if (profilesConfig.GetString("Module", String.Empty) != Name)
122 {
123
124 return;
125 }
126 m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Initializing {0}", this.Name);
127 } 100 }
128 } 101 }
102
103 if (String.IsNullOrEmpty(m_serverUrl))
104 m_log.Info("[SIMIAN PROFILES]: No UserAccountServerURI specified, disabling connector");
129 } 105 }
130 106
131 private void ClientConnectHandler(IClientCore clientCore) 107 private void ClientConnectHandler(IClientCore clientCore)
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
index 56c73ec..4c8662f 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
@@ -77,25 +77,20 @@ namespace OpenSim.Services.Connectors.SimianGrid
77 77
78 public void Initialise(IConfigSource source) 78 public void Initialise(IConfigSource source)
79 { 79 {
80 if (Simian.IsSimianEnabled(source, "UserAccountServices", this.Name)) 80 IConfig gridConfig = source.Configs["UserAccountService"];
81 if (gridConfig != null)
81 { 82 {
82 IConfig assetConfig = source.Configs["UserAccountService"]; 83 string serviceUrl = gridConfig.GetString("UserAccountServerURI");
83 if (assetConfig == null) 84 if (!String.IsNullOrEmpty(serviceUrl))
84 { 85 {
85 m_log.Error("[SIMIAN ACCOUNT CONNECTOR]: UserAccountService missing from OpenSim.ini"); 86 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
86 throw new Exception("User account connector init error"); 87 serviceUrl = serviceUrl + '/';
88 m_serverUrl = serviceUrl;
87 } 89 }
88
89 string serviceURI = assetConfig.GetString("UserAccountServerURI");
90 if (String.IsNullOrEmpty(serviceURI))
91 {
92 m_log.Error("[SIMIAN ACCOUNT CONNECTOR]: No UserAccountServerURI in section UserAccountService, skipping SimianUserAccountServiceConnector");
93 throw new Exception("User account connector init error");
94 }
95
96 m_accountCache = new ExpiringCache<UUID, UserAccount>();
97 m_serverUrl = serviceURI;
98 } 90 }
91
92 if (String.IsNullOrEmpty(m_serverUrl))
93 m_log.Info("[SIMIAN ACCOUNT CONNECTOR]: No UserAccountServerURI specified, disabling connector");
99 } 94 }
100 95
101 public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) 96 public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName)
diff --git a/OpenSim/Services/InventoryService/HGInventoryService.cs b/OpenSim/Services/InventoryService/HGInventoryService.cs
index 6e6b019..d62c008 100644
--- a/OpenSim/Services/InventoryService/HGInventoryService.cs
+++ b/OpenSim/Services/InventoryService/HGInventoryService.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Services.InventoryService
44 LogManager.GetLogger( 44 LogManager.GetLogger(
45 MethodBase.GetCurrentMethod().DeclaringType); 45 MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 protected IXInventoryData m_Database; 47 protected new IXInventoryData m_Database;
48 48
49 public HGInventoryService(IConfigSource config) 49 public HGInventoryService(IConfigSource config)
50 : base(config) 50 : base(config)
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 09be4a2..5ccb912 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -104,7 +104,7 @@ namespace OpenSim.Services.LLLoginService
104 m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty); 104 m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty);
105 m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); 105 m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty);
106 m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty); 106 m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty);
107 107
108 // These are required; the others aren't 108 // These are required; the others aren't
109 if (accountService == string.Empty || authService == string.Empty) 109 if (accountService == string.Empty || authService == string.Empty)
110 throw new Exception("LoginService is missing service specifications"); 110 throw new Exception("LoginService is missing service specifications");