diff options
author | Justin Clark-Casey | 2014-05-27 23:29:54 +0100 |
---|---|---|
committer | Justin Clark-Casey | 2014-05-27 23:29:54 +0100 |
commit | 3f703ae1cb02cbcb0efaff061d495bacca941de0 (patch) | |
tree | 3221068b4bc4119023b3dfa621c19e126c2eb3f3 /OpenSim/Services | |
parent | Merge branch 'master' into 0.8-post-fixes (diff) | |
parent | minor: Comment out 2 error level debugging message in authentication code (diff) | |
download | opensim-SC_OLD-3f703ae1cb02cbcb0efaff061d495bacca941de0.zip opensim-SC_OLD-3f703ae1cb02cbcb0efaff061d495bacca941de0.tar.gz opensim-SC_OLD-3f703ae1cb02cbcb0efaff061d495bacca941de0.tar.bz2 opensim-SC_OLD-3f703ae1cb02cbcb0efaff061d495bacca941de0.tar.xz |
Merge branch 'master' into 0.8-post-fixes
Diffstat (limited to 'OpenSim/Services')
17 files changed, 189 insertions, 104 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index ee047e0..0996acb 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | |||
@@ -39,7 +39,7 @@ using OpenMetaverse; | |||
39 | 39 | ||
40 | namespace OpenSim.Services.Connectors | 40 | namespace OpenSim.Services.Connectors |
41 | { | 41 | { |
42 | public class AssetServicesConnector : IAssetService | 42 | public class AssetServicesConnector : BaseServiceConnector, IAssetService |
43 | { | 43 | { |
44 | private static readonly ILog m_log = | 44 | private static readonly ILog m_log = |
45 | LogManager.GetLogger( | 45 | LogManager.GetLogger( |
@@ -71,6 +71,7 @@ namespace OpenSim.Services.Connectors | |||
71 | } | 71 | } |
72 | 72 | ||
73 | public AssetServicesConnector(IConfigSource source) | 73 | public AssetServicesConnector(IConfigSource source) |
74 | : base(source, "AssetService") | ||
74 | { | 75 | { |
75 | Initialise(source); | 76 | Initialise(source); |
76 | } | 77 | } |
@@ -117,8 +118,16 @@ namespace OpenSim.Services.Connectors | |||
117 | 118 | ||
118 | if (asset == null) | 119 | if (asset == null) |
119 | { | 120 | { |
120 | asset = SynchronousRestObjectRequester. | 121 | // XXX: Commented out for now since this has either never been properly operational or not for some time |
121 | MakeRequest<int, AssetBase>("GET", uri, 0, m_maxAssetRequestConcurrency); | 122 | // as m_maxAssetRequestConcurrency was being passed as the timeout, not a concurrency limiting option. |
123 | // Wasn't noticed before because timeout wasn't actually used. | ||
124 | // Not attempting concurrency setting for now as this omission was discovered in release candidate | ||
125 | // phase for OpenSimulator 0.8. Need to revisit afterwards. | ||
126 | // asset | ||
127 | // = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>( | ||
128 | // "GET", uri, 0, m_maxAssetRequestConcurrency); | ||
129 | |||
130 | asset = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, m_Auth); | ||
122 | 131 | ||
123 | if (m_Cache != null) | 132 | if (m_Cache != null) |
124 | m_Cache.Cache(asset); | 133 | m_Cache.Cache(asset); |
@@ -148,8 +157,7 @@ namespace OpenSim.Services.Connectors | |||
148 | 157 | ||
149 | string uri = m_ServerURI + "/assets/" + id + "/metadata"; | 158 | string uri = m_ServerURI + "/assets/" + id + "/metadata"; |
150 | 159 | ||
151 | AssetMetadata asset = SynchronousRestObjectRequester. | 160 | AssetMetadata asset = SynchronousRestObjectRequester.MakeRequest<int, AssetMetadata>("GET", uri, 0, m_Auth); |
152 | MakeRequest<int, AssetMetadata>("GET", uri, 0); | ||
153 | return asset; | 161 | return asset; |
154 | } | 162 | } |
155 | 163 | ||
@@ -170,7 +178,7 @@ namespace OpenSim.Services.Connectors | |||
170 | 178 | ||
171 | rc.RequestMethod = "GET"; | 179 | rc.RequestMethod = "GET"; |
172 | 180 | ||
173 | Stream s = rc.Request(); | 181 | Stream s = rc.Request(m_Auth); |
174 | 182 | ||
175 | if (s == null) | 183 | if (s == null) |
176 | return null; | 184 | return null; |
@@ -231,7 +239,7 @@ namespace OpenSim.Services.Connectors | |||
231 | m_AssetHandlers.Remove(id); | 239 | m_AssetHandlers.Remove(id); |
232 | } | 240 | } |
233 | handlers.Invoke(a); | 241 | handlers.Invoke(a); |
234 | }, m_maxAssetRequestConcurrency); | 242 | }, m_maxAssetRequestConcurrency, m_Auth); |
235 | 243 | ||
236 | success = true; | 244 | success = true; |
237 | } | 245 | } |
@@ -261,7 +269,7 @@ namespace OpenSim.Services.Connectors | |||
261 | bool[] exist = null; | 269 | bool[] exist = null; |
262 | try | 270 | try |
263 | { | 271 | { |
264 | exist = SynchronousRestObjectRequester.MakeRequest<string[], bool[]>("POST", uri, ids); | 272 | exist = SynchronousRestObjectRequester.MakeRequest<string[], bool[]>("POST", uri, ids, m_Auth); |
265 | } | 273 | } |
266 | catch (Exception) | 274 | catch (Exception) |
267 | { | 275 | { |
@@ -290,8 +298,7 @@ namespace OpenSim.Services.Connectors | |||
290 | string newID; | 298 | string newID; |
291 | try | 299 | try |
292 | { | 300 | { |
293 | newID = SynchronousRestObjectRequester. | 301 | newID = SynchronousRestObjectRequester.MakeRequest<AssetBase, string>("POST", uri, asset, m_Auth); |
294 | MakeRequest<AssetBase, string>("POST", uri, asset); | ||
295 | } | 302 | } |
296 | catch (Exception e) | 303 | catch (Exception e) |
297 | { | 304 | { |
@@ -337,8 +344,7 @@ namespace OpenSim.Services.Connectors | |||
337 | 344 | ||
338 | string uri = m_ServerURI + "/assets/" + id; | 345 | string uri = m_ServerURI + "/assets/" + id; |
339 | 346 | ||
340 | if (SynchronousRestObjectRequester. | 347 | if (SynchronousRestObjectRequester.MakeRequest<AssetBase, bool>("POST", uri, asset, m_Auth)) |
341 | MakeRequest<AssetBase, bool>("POST", uri, asset)) | ||
342 | { | 348 | { |
343 | if (m_Cache != null) | 349 | if (m_Cache != null) |
344 | m_Cache.Cache(asset); | 350 | m_Cache.Cache(asset); |
@@ -352,8 +358,7 @@ namespace OpenSim.Services.Connectors | |||
352 | { | 358 | { |
353 | string uri = m_ServerURI + "/assets/" + id; | 359 | string uri = m_ServerURI + "/assets/" + id; |
354 | 360 | ||
355 | if (SynchronousRestObjectRequester. | 361 | if (SynchronousRestObjectRequester.MakeRequest<int, bool>("DELETE", uri, 0, m_Auth)) |
356 | MakeRequest<int, bool>("DELETE", uri, 0)) | ||
357 | { | 362 | { |
358 | if (m_Cache != null) | 363 | if (m_Cache != null) |
359 | m_Cache.Expire(id); | 364 | m_Cache.Expire(id); |
diff --git a/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs b/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs index 2b77154..c8a4912 100644 --- a/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs +++ b/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs | |||
@@ -32,14 +32,14 @@ using System.IO; | |||
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework.ServiceAuth; |
36 | using OpenSim.Services.Interfaces; | 36 | using OpenSim.Services.Interfaces; |
37 | using OpenSim.Server.Base; | 37 | using OpenSim.Server.Base; |
38 | using OpenMetaverse; | 38 | using OpenMetaverse; |
39 | 39 | ||
40 | namespace OpenSim.Services.Connectors | 40 | namespace OpenSim.Services.Connectors |
41 | { | 41 | { |
42 | public class AuthenticationServicesConnector : IAuthenticationService | 42 | public class AuthenticationServicesConnector : BaseServiceConnector, IAuthenticationService |
43 | { | 43 | { |
44 | private static readonly ILog m_log = | 44 | private static readonly ILog m_log = |
45 | LogManager.GetLogger( | 45 | LogManager.GetLogger( |
@@ -57,6 +57,7 @@ namespace OpenSim.Services.Connectors | |||
57 | } | 57 | } |
58 | 58 | ||
59 | public AuthenticationServicesConnector(IConfigSource source) | 59 | public AuthenticationServicesConnector(IConfigSource source) |
60 | : base(source, "AuthenticationService") | ||
60 | { | 61 | { |
61 | Initialise(source); | 62 | Initialise(source); |
62 | } | 63 | } |
@@ -79,6 +80,8 @@ namespace OpenSim.Services.Connectors | |||
79 | throw new Exception("Authentication connector init error"); | 80 | throw new Exception("Authentication connector init error"); |
80 | } | 81 | } |
81 | m_ServerURI = serviceURI; | 82 | m_ServerURI = serviceURI; |
83 | |||
84 | base.Initialise(source, "AuthenticationService"); | ||
82 | } | 85 | } |
83 | 86 | ||
84 | public string Authenticate(UUID principalID, string password, int lifetime) | 87 | public string Authenticate(UUID principalID, string password, int lifetime) |
@@ -92,7 +95,7 @@ namespace OpenSim.Services.Connectors | |||
92 | 95 | ||
93 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 96 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
94 | m_ServerURI + "/auth/plain", | 97 | m_ServerURI + "/auth/plain", |
95 | ServerUtils.BuildQueryString(sendData)); | 98 | ServerUtils.BuildQueryString(sendData), m_Auth); |
96 | 99 | ||
97 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( | 100 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( |
98 | reply); | 101 | reply); |
@@ -105,6 +108,7 @@ namespace OpenSim.Services.Connectors | |||
105 | 108 | ||
106 | public bool Verify(UUID principalID, string token, int lifetime) | 109 | public bool Verify(UUID principalID, string token, int lifetime) |
107 | { | 110 | { |
111 | // m_log.Error("[XXX]: Verify"); | ||
108 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | 112 | Dictionary<string, object> sendData = new Dictionary<string, object>(); |
109 | sendData["LIFETIME"] = lifetime.ToString(); | 113 | sendData["LIFETIME"] = lifetime.ToString(); |
110 | sendData["PRINCIPAL"] = principalID.ToString(); | 114 | sendData["PRINCIPAL"] = principalID.ToString(); |
@@ -114,7 +118,7 @@ namespace OpenSim.Services.Connectors | |||
114 | 118 | ||
115 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 119 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
116 | m_ServerURI + "/auth/plain", | 120 | m_ServerURI + "/auth/plain", |
117 | ServerUtils.BuildQueryString(sendData)); | 121 | ServerUtils.BuildQueryString(sendData), m_Auth); |
118 | 122 | ||
119 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( | 123 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( |
120 | reply); | 124 | reply); |
@@ -135,7 +139,7 @@ namespace OpenSim.Services.Connectors | |||
135 | 139 | ||
136 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 140 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
137 | m_ServerURI + "/auth/plain", | 141 | m_ServerURI + "/auth/plain", |
138 | ServerUtils.BuildQueryString(sendData)); | 142 | ServerUtils.BuildQueryString(sendData), m_Auth); |
139 | 143 | ||
140 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( | 144 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( |
141 | reply); | 145 | reply); |
diff --git a/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs b/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs index 35b7109..63730b3 100644 --- a/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs +++ b/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs | |||
@@ -105,7 +105,7 @@ namespace OpenSim.Services.Connectors | |||
105 | catch (Exception e) | 105 | catch (Exception e) |
106 | { | 106 | { |
107 | m_log.WarnFormat("[AUTHORIZATION CONNECTOR]: Unable to send authorize {0} for region {1} error thrown during comms with remote server. Reason: {2}", userID, regionID, e.Message); | 107 | m_log.WarnFormat("[AUTHORIZATION CONNECTOR]: Unable to send authorize {0} for region {1} error thrown during comms with remote server. Reason: {2}", userID, regionID, e.Message); |
108 | message = ""; | 108 | message = e.Message; |
109 | return m_ResponseOnFailure; | 109 | return m_ResponseOnFailure; |
110 | } | 110 | } |
111 | if (response == null) | 111 | if (response == null) |
diff --git a/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs b/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs index ddfca57..3f44efa 100644 --- a/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs +++ b/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs | |||
@@ -32,7 +32,7 @@ using System.IO; | |||
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework.ServiceAuth; |
36 | using OpenSim.Services.Interfaces; | 36 | using OpenSim.Services.Interfaces; |
37 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 37 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
38 | using IAvatarService = OpenSim.Services.Interfaces.IAvatarService; | 38 | using IAvatarService = OpenSim.Services.Interfaces.IAvatarService; |
@@ -41,7 +41,7 @@ using OpenMetaverse; | |||
41 | 41 | ||
42 | namespace OpenSim.Services.Connectors | 42 | namespace OpenSim.Services.Connectors |
43 | { | 43 | { |
44 | public class AvatarServicesConnector : IAvatarService | 44 | public class AvatarServicesConnector : BaseServiceConnector, IAvatarService |
45 | { | 45 | { |
46 | private static readonly ILog m_log = | 46 | private static readonly ILog m_log = |
47 | LogManager.GetLogger( | 47 | LogManager.GetLogger( |
@@ -59,6 +59,7 @@ namespace OpenSim.Services.Connectors | |||
59 | } | 59 | } |
60 | 60 | ||
61 | public AvatarServicesConnector(IConfigSource source) | 61 | public AvatarServicesConnector(IConfigSource source) |
62 | : base(source, "AvatarService") | ||
62 | { | 63 | { |
63 | Initialise(source); | 64 | Initialise(source); |
64 | } | 65 | } |
@@ -81,6 +82,8 @@ namespace OpenSim.Services.Connectors | |||
81 | throw new Exception("Avatar connector init error"); | 82 | throw new Exception("Avatar connector init error"); |
82 | } | 83 | } |
83 | m_ServerURI = serviceURI; | 84 | m_ServerURI = serviceURI; |
85 | |||
86 | base.Initialise(source, "AvatarService"); | ||
84 | } | 87 | } |
85 | 88 | ||
86 | 89 | ||
@@ -114,7 +117,7 @@ namespace OpenSim.Services.Connectors | |||
114 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); | 117 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); |
115 | try | 118 | try |
116 | { | 119 | { |
117 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); | 120 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth); |
118 | if (reply == null || (reply != null && reply == string.Empty)) | 121 | if (reply == null || (reply != null && reply == string.Empty)) |
119 | { | 122 | { |
120 | m_log.DebugFormat("[AVATAR CONNECTOR]: GetAgent received null or empty reply"); | 123 | m_log.DebugFormat("[AVATAR CONNECTOR]: GetAgent received null or empty reply"); |
@@ -162,7 +165,7 @@ namespace OpenSim.Services.Connectors | |||
162 | //m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); | 165 | //m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); |
163 | try | 166 | try |
164 | { | 167 | { |
165 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); | 168 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth); |
166 | if (reply != string.Empty) | 169 | if (reply != string.Empty) |
167 | { | 170 | { |
168 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 171 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -207,7 +210,7 @@ namespace OpenSim.Services.Connectors | |||
207 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); | 210 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); |
208 | try | 211 | try |
209 | { | 212 | { |
210 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); | 213 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth); |
211 | if (reply != string.Empty) | 214 | if (reply != string.Empty) |
212 | { | 215 | { |
213 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 216 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -250,7 +253,7 @@ namespace OpenSim.Services.Connectors | |||
250 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); | 253 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); |
251 | try | 254 | try |
252 | { | 255 | { |
253 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); | 256 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth); |
254 | if (reply != string.Empty) | 257 | if (reply != string.Empty) |
255 | { | 258 | { |
256 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 259 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -293,7 +296,7 @@ namespace OpenSim.Services.Connectors | |||
293 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); | 296 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); |
294 | try | 297 | try |
295 | { | 298 | { |
296 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); | 299 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth); |
297 | if (reply != string.Empty) | 300 | if (reply != string.Empty) |
298 | { | 301 | { |
299 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 302 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
diff --git a/OpenSim/Services/Connectors/BaseServiceConnector.cs b/OpenSim/Services/Connectors/BaseServiceConnector.cs new file mode 100644 index 0000000..98cd489 --- /dev/null +++ b/OpenSim/Services/Connectors/BaseServiceConnector.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using System; | ||
2 | using OpenSim.Framework; | ||
3 | using OpenSim.Framework.ServiceAuth; | ||
4 | |||
5 | using Nini.Config; | ||
6 | |||
7 | namespace OpenSim.Services.Connectors | ||
8 | { | ||
9 | public class BaseServiceConnector | ||
10 | { | ||
11 | protected IServiceAuth m_Auth; | ||
12 | |||
13 | public BaseServiceConnector() { } | ||
14 | |||
15 | public BaseServiceConnector(IConfigSource config, string section) | ||
16 | { | ||
17 | Initialise(config, section); | ||
18 | } | ||
19 | |||
20 | public void Initialise(IConfigSource config, string section) | ||
21 | { | ||
22 | string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None"); | ||
23 | |||
24 | switch (authType) | ||
25 | { | ||
26 | case "BasicHttpAuthentication": | ||
27 | m_Auth = new BasicHttpAuthentication(config, section); | ||
28 | break; | ||
29 | } | ||
30 | |||
31 | } | ||
32 | } | ||
33 | } | ||
diff --git a/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs index b1dd84e..74851a9 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs | |||
@@ -32,6 +32,7 @@ using System.IO; | |||
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.ServiceAuth; | ||
35 | using OpenSim.Framework.Communications; | 36 | using OpenSim.Framework.Communications; |
36 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
37 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; | 38 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; |
@@ -40,7 +41,7 @@ using OpenMetaverse; | |||
40 | 41 | ||
41 | namespace OpenSim.Services.Connectors.Friends | 42 | namespace OpenSim.Services.Connectors.Friends |
42 | { | 43 | { |
43 | public class FriendsServicesConnector : IFriendsService | 44 | public class FriendsServicesConnector : BaseServiceConnector, IFriendsService |
44 | { | 45 | { |
45 | private static readonly ILog m_log = | 46 | private static readonly ILog m_log = |
46 | LogManager.GetLogger( | 47 | LogManager.GetLogger( |
@@ -80,6 +81,7 @@ namespace OpenSim.Services.Connectors.Friends | |||
80 | throw new Exception("Friends connector init error"); | 81 | throw new Exception("Friends connector init error"); |
81 | } | 82 | } |
82 | m_ServerURI = serviceURI; | 83 | m_ServerURI = serviceURI; |
84 | base.Initialise(source, "FriendsService"); | ||
83 | } | 85 | } |
84 | 86 | ||
85 | 87 | ||
@@ -112,7 +114,7 @@ namespace OpenSim.Services.Connectors.Friends | |||
112 | 114 | ||
113 | try | 115 | try |
114 | { | 116 | { |
115 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); | 117 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth); |
116 | if (reply != string.Empty) | 118 | if (reply != string.Empty) |
117 | { | 119 | { |
118 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 120 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -168,7 +170,7 @@ namespace OpenSim.Services.Connectors.Friends | |||
168 | string uri = m_ServerURI + "/friends"; | 170 | string uri = m_ServerURI + "/friends"; |
169 | try | 171 | try |
170 | { | 172 | { |
171 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData)); | 173 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData), m_Auth); |
172 | } | 174 | } |
173 | catch (Exception e) | 175 | catch (Exception e) |
174 | { | 176 | { |
@@ -223,7 +225,7 @@ namespace OpenSim.Services.Connectors.Friends | |||
223 | string uri = m_ServerURI + "/friends"; | 225 | string uri = m_ServerURI + "/friends"; |
224 | try | 226 | try |
225 | { | 227 | { |
226 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData)); | 228 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData), m_Auth); |
227 | } | 229 | } |
228 | catch (Exception e) | 230 | catch (Exception e) |
229 | { | 231 | { |
diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs index 0f5a613..7f86cff 100644 --- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs | |||
@@ -33,6 +33,7 @@ using System.Reflection; | |||
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework.Communications; |
36 | using OpenSim.Framework.ServiceAuth; | ||
36 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
37 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
38 | using OpenSim.Server.Base; | 39 | using OpenSim.Server.Base; |
@@ -40,7 +41,7 @@ using OpenMetaverse; | |||
40 | 41 | ||
41 | namespace OpenSim.Services.Connectors | 42 | namespace OpenSim.Services.Connectors |
42 | { | 43 | { |
43 | public class GridServicesConnector : IGridService | 44 | public class GridServicesConnector : BaseServiceConnector, IGridService |
44 | { | 45 | { |
45 | private static readonly ILog m_log = | 46 | private static readonly ILog m_log = |
46 | LogManager.GetLogger( | 47 | LogManager.GetLogger( |
@@ -80,6 +81,8 @@ namespace OpenSim.Services.Connectors | |||
80 | throw new Exception("Grid connector init error"); | 81 | throw new Exception("Grid connector init error"); |
81 | } | 82 | } |
82 | m_ServerURI = serviceURI; | 83 | m_ServerURI = serviceURI; |
84 | |||
85 | base.Initialise(source, "GridService"); | ||
83 | } | 86 | } |
84 | 87 | ||
85 | 88 | ||
@@ -102,7 +105,7 @@ namespace OpenSim.Services.Connectors | |||
102 | // m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString); | 105 | // m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString); |
103 | try | 106 | try |
104 | { | 107 | { |
105 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); | 108 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth); |
106 | if (reply != string.Empty) | 109 | if (reply != string.Empty) |
107 | { | 110 | { |
108 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 111 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -158,7 +161,7 @@ namespace OpenSim.Services.Connectors | |||
158 | try | 161 | try |
159 | { | 162 | { |
160 | string reply | 163 | string reply |
161 | = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData)); | 164 | = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData), m_Auth); |
162 | 165 | ||
163 | if (reply != string.Empty) | 166 | if (reply != string.Empty) |
164 | { | 167 | { |
@@ -195,7 +198,7 @@ namespace OpenSim.Services.Connectors | |||
195 | 198 | ||
196 | try | 199 | try |
197 | { | 200 | { |
198 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); | 201 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth); |
199 | } | 202 | } |
200 | catch (Exception e) | 203 | catch (Exception e) |
201 | { | 204 | { |
@@ -238,7 +241,7 @@ namespace OpenSim.Services.Connectors | |||
238 | string uri = m_ServerURI + "/grid"; | 241 | string uri = m_ServerURI + "/grid"; |
239 | try | 242 | try |
240 | { | 243 | { |
241 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData)); | 244 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData), m_Auth); |
242 | } | 245 | } |
243 | catch (Exception e) | 246 | catch (Exception e) |
244 | { | 247 | { |
@@ -285,7 +288,7 @@ namespace OpenSim.Services.Connectors | |||
285 | { | 288 | { |
286 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 289 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
287 | uri, | 290 | uri, |
288 | ServerUtils.BuildQueryString(sendData)); | 291 | ServerUtils.BuildQueryString(sendData), m_Auth); |
289 | } | 292 | } |
290 | catch (Exception e) | 293 | catch (Exception e) |
291 | { | 294 | { |
@@ -330,7 +333,7 @@ namespace OpenSim.Services.Connectors | |||
330 | { | 333 | { |
331 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 334 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
332 | uri, | 335 | uri, |
333 | ServerUtils.BuildQueryString(sendData)); | 336 | ServerUtils.BuildQueryString(sendData), m_Auth); |
334 | } | 337 | } |
335 | catch (Exception e) | 338 | catch (Exception e) |
336 | { | 339 | { |
@@ -374,7 +377,7 @@ namespace OpenSim.Services.Connectors | |||
374 | { | 377 | { |
375 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 378 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
376 | uri, | 379 | uri, |
377 | ServerUtils.BuildQueryString(sendData)); | 380 | ServerUtils.BuildQueryString(sendData), m_Auth); |
378 | } | 381 | } |
379 | catch (Exception e) | 382 | catch (Exception e) |
380 | { | 383 | { |
@@ -428,7 +431,7 @@ namespace OpenSim.Services.Connectors | |||
428 | { | 431 | { |
429 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 432 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
430 | uri, | 433 | uri, |
431 | ServerUtils.BuildQueryString(sendData)); | 434 | ServerUtils.BuildQueryString(sendData), m_Auth); |
432 | 435 | ||
433 | //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); | 436 | //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); |
434 | } | 437 | } |
@@ -479,7 +482,7 @@ namespace OpenSim.Services.Connectors | |||
479 | { | 482 | { |
480 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 483 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
481 | uri, | 484 | uri, |
482 | ServerUtils.BuildQueryString(sendData)); | 485 | ServerUtils.BuildQueryString(sendData), m_Auth); |
483 | 486 | ||
484 | //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); | 487 | //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); |
485 | } | 488 | } |
@@ -530,7 +533,7 @@ namespace OpenSim.Services.Connectors | |||
530 | { | 533 | { |
531 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 534 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
532 | uri, | 535 | uri, |
533 | ServerUtils.BuildQueryString(sendData)); | 536 | ServerUtils.BuildQueryString(sendData), m_Auth); |
534 | 537 | ||
535 | //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); | 538 | //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); |
536 | } | 539 | } |
@@ -583,7 +586,7 @@ namespace OpenSim.Services.Connectors | |||
583 | { | 586 | { |
584 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 587 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
585 | uri, | 588 | uri, |
586 | ServerUtils.BuildQueryString(sendData)); | 589 | ServerUtils.BuildQueryString(sendData), m_Auth); |
587 | 590 | ||
588 | //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); | 591 | //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); |
589 | } | 592 | } |
@@ -634,7 +637,7 @@ namespace OpenSim.Services.Connectors | |||
634 | { | 637 | { |
635 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 638 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
636 | uri, | 639 | uri, |
637 | ServerUtils.BuildQueryString(sendData)); | 640 | ServerUtils.BuildQueryString(sendData), m_Auth); |
638 | 641 | ||
639 | //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); | 642 | //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); |
640 | } | 643 | } |
@@ -685,7 +688,7 @@ namespace OpenSim.Services.Connectors | |||
685 | { | 688 | { |
686 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 689 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
687 | uri, | 690 | uri, |
688 | ServerUtils.BuildQueryString(sendData)); | 691 | ServerUtils.BuildQueryString(sendData), m_Auth); |
689 | } | 692 | } |
690 | catch (Exception e) | 693 | catch (Exception e) |
691 | { | 694 | { |
diff --git a/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs b/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs index 1a62d2f..ffdd94a 100644 --- a/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs +++ b/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs | |||
@@ -33,6 +33,7 @@ using System.Reflection; | |||
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework.Communications; |
36 | using OpenSim.Framework.ServiceAuth; | ||
36 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
37 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
38 | using OpenSim.Server.Base; | 39 | using OpenSim.Server.Base; |
@@ -40,7 +41,7 @@ using OpenMetaverse; | |||
40 | 41 | ||
41 | namespace OpenSim.Services.Connectors | 42 | namespace OpenSim.Services.Connectors |
42 | { | 43 | { |
43 | public class GridUserServicesConnector : IGridUserService | 44 | public class GridUserServicesConnector : BaseServiceConnector, IGridUserService |
44 | { | 45 | { |
45 | private static readonly ILog m_log = | 46 | private static readonly ILog m_log = |
46 | LogManager.GetLogger( | 47 | LogManager.GetLogger( |
@@ -80,6 +81,7 @@ namespace OpenSim.Services.Connectors | |||
80 | throw new Exception("GridUser connector init error"); | 81 | throw new Exception("GridUser connector init error"); |
81 | } | 82 | } |
82 | m_ServerURI = serviceURI; | 83 | m_ServerURI = serviceURI; |
84 | base.Initialise(source, "GridUserService"); | ||
83 | } | 85 | } |
84 | 86 | ||
85 | 87 | ||
@@ -162,7 +164,8 @@ namespace OpenSim.Services.Connectors | |||
162 | { | 164 | { |
163 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 165 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
164 | uri, | 166 | uri, |
165 | reqString); | 167 | reqString, |
168 | m_Auth); | ||
166 | if (reply != string.Empty) | 169 | if (reply != string.Empty) |
167 | { | 170 | { |
168 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 171 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -198,7 +201,8 @@ namespace OpenSim.Services.Connectors | |||
198 | { | 201 | { |
199 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 202 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
200 | uri, | 203 | uri, |
201 | reqString); | 204 | reqString, |
205 | m_Auth); | ||
202 | if (reply != string.Empty) | 206 | if (reply != string.Empty) |
203 | { | 207 | { |
204 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 208 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -243,7 +247,8 @@ namespace OpenSim.Services.Connectors | |||
243 | { | 247 | { |
244 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 248 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
245 | uri, | 249 | uri, |
246 | reqString); | 250 | reqString, |
251 | m_Auth); | ||
247 | if (reply == null || (reply != null && reply == string.Empty)) | 252 | if (reply == null || (reply != null && reply == string.Empty)) |
248 | { | 253 | { |
249 | m_log.DebugFormat("[GRID USER CONNECTOR]: GetGridUserInfo received null or empty reply"); | 254 | m_log.DebugFormat("[GRID USER CONNECTOR]: GetGridUserInfo received null or empty reply"); |
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs index 85d105e..f86d2f1 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | |||
@@ -40,7 +40,7 @@ using OpenMetaverse; | |||
40 | 40 | ||
41 | namespace OpenSim.Services.Connectors | 41 | namespace OpenSim.Services.Connectors |
42 | { | 42 | { |
43 | public class XInventoryServicesConnector : IInventoryService | 43 | public class XInventoryServicesConnector : BaseServiceConnector, IInventoryService |
44 | { | 44 | { |
45 | private static readonly ILog m_log = | 45 | private static readonly ILog m_log = |
46 | LogManager.GetLogger( | 46 | LogManager.GetLogger( |
@@ -60,6 +60,7 @@ namespace OpenSim.Services.Connectors | |||
60 | } | 60 | } |
61 | 61 | ||
62 | public XInventoryServicesConnector(IConfigSource source) | 62 | public XInventoryServicesConnector(IConfigSource source) |
63 | : base(source, "InventoryService") | ||
63 | { | 64 | { |
64 | Initialise(source); | 65 | Initialise(source); |
65 | } | 66 | } |
@@ -505,7 +506,7 @@ namespace OpenSim.Services.Connectors | |||
505 | lock (m_Lock) | 506 | lock (m_Lock) |
506 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 507 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
507 | m_ServerURI + "/xinventory", | 508 | m_ServerURI + "/xinventory", |
508 | ServerUtils.BuildQueryString(sendData)); | 509 | ServerUtils.BuildQueryString(sendData), m_Auth); |
509 | 510 | ||
510 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( | 511 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( |
511 | reply); | 512 | reply); |
diff --git a/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs b/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs index 725204d..677825e 100644 --- a/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs +++ b/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs | |||
@@ -36,6 +36,7 @@ using Nini.Config; | |||
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Console; | 37 | using OpenSim.Framework.Console; |
38 | using OpenSim.Framework.Communications; | 38 | using OpenSim.Framework.Communications; |
39 | using OpenSim.Framework.ServiceAuth; | ||
39 | using OpenSim.Server.Base; | 40 | using OpenSim.Server.Base; |
40 | using OpenSim.Services.Interfaces; | 41 | using OpenSim.Services.Interfaces; |
41 | using OpenMetaverse; | 42 | using OpenMetaverse; |
@@ -43,7 +44,7 @@ using OpenMetaverse.StructuredData; | |||
43 | 44 | ||
44 | namespace OpenSim.Services.Connectors | 45 | namespace OpenSim.Services.Connectors |
45 | { | 46 | { |
46 | public class MapImageServicesConnector : IMapImageService | 47 | public class MapImageServicesConnector : BaseServiceConnector, IMapImageService |
47 | { | 48 | { |
48 | private static readonly ILog m_log = | 49 | private static readonly ILog m_log = |
49 | LogManager.GetLogger( | 50 | LogManager.GetLogger( |
@@ -84,6 +85,7 @@ namespace OpenSim.Services.Connectors | |||
84 | } | 85 | } |
85 | m_ServerURI = serviceURI; | 86 | m_ServerURI = serviceURI; |
86 | m_ServerURI = serviceURI.TrimEnd('/'); | 87 | m_ServerURI = serviceURI.TrimEnd('/'); |
88 | base.Initialise(source, "MapImageService"); | ||
87 | } | 89 | } |
88 | 90 | ||
89 | public bool RemoveMapTile(int x, int y, out string reason) | 91 | public bool RemoveMapTile(int x, int y, out string reason) |
@@ -101,7 +103,8 @@ namespace OpenSim.Services.Connectors | |||
101 | { | 103 | { |
102 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 104 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
103 | uri, | 105 | uri, |
104 | reqString); | 106 | reqString, |
107 | m_Auth); | ||
105 | if (reply != string.Empty) | 108 | if (reply != string.Empty) |
106 | { | 109 | { |
107 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 110 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -163,7 +166,8 @@ namespace OpenSim.Services.Connectors | |||
163 | { | 166 | { |
164 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 167 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
165 | uri, | 168 | uri, |
166 | reqString); | 169 | reqString, |
170 | m_Auth); | ||
167 | if (reply != string.Empty) | 171 | if (reply != string.Empty) |
168 | { | 172 | { |
169 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 173 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
diff --git a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs index f7d8c53..aade714 100644 --- a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs +++ b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs | |||
@@ -33,6 +33,7 @@ using System.Reflection; | |||
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework.Communications; |
36 | using OpenSim.Framework.ServiceAuth; | ||
36 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
37 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
38 | using OpenSim.Server.Base; | 39 | using OpenSim.Server.Base; |
@@ -40,7 +41,7 @@ using OpenMetaverse; | |||
40 | 41 | ||
41 | namespace OpenSim.Services.Connectors | 42 | namespace OpenSim.Services.Connectors |
42 | { | 43 | { |
43 | public class PresenceServicesConnector : IPresenceService | 44 | public class PresenceServicesConnector : BaseServiceConnector, IPresenceService |
44 | { | 45 | { |
45 | private static readonly ILog m_log = | 46 | private static readonly ILog m_log = |
46 | LogManager.GetLogger( | 47 | LogManager.GetLogger( |
@@ -80,6 +81,8 @@ namespace OpenSim.Services.Connectors | |||
80 | throw new Exception("Presence connector init error"); | 81 | throw new Exception("Presence connector init error"); |
81 | } | 82 | } |
82 | m_ServerURI = serviceURI; | 83 | m_ServerURI = serviceURI; |
84 | |||
85 | base.Initialise(source, "PresenceService"); | ||
83 | } | 86 | } |
84 | 87 | ||
85 | 88 | ||
@@ -104,7 +107,8 @@ namespace OpenSim.Services.Connectors | |||
104 | { | 107 | { |
105 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 108 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
106 | uri, | 109 | uri, |
107 | reqString); | 110 | reqString, |
111 | m_Auth); | ||
108 | if (reply != string.Empty) | 112 | if (reply != string.Empty) |
109 | { | 113 | { |
110 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 114 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -149,7 +153,8 @@ namespace OpenSim.Services.Connectors | |||
149 | { | 153 | { |
150 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 154 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
151 | uri, | 155 | uri, |
152 | reqString); | 156 | reqString, |
157 | m_Auth); | ||
153 | if (reply != string.Empty) | 158 | if (reply != string.Empty) |
154 | { | 159 | { |
155 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 160 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -193,7 +198,8 @@ namespace OpenSim.Services.Connectors | |||
193 | { | 198 | { |
194 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 199 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
195 | uri, | 200 | uri, |
196 | reqString); | 201 | reqString, |
202 | m_Auth); | ||
197 | if (reply != string.Empty) | 203 | if (reply != string.Empty) |
198 | { | 204 | { |
199 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 205 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -238,7 +244,8 @@ namespace OpenSim.Services.Connectors | |||
238 | { | 244 | { |
239 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 245 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
240 | uri, | 246 | uri, |
241 | reqString); | 247 | reqString, |
248 | m_Auth); | ||
242 | if (reply != string.Empty) | 249 | if (reply != string.Empty) |
243 | { | 250 | { |
244 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 251 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -283,7 +290,8 @@ namespace OpenSim.Services.Connectors | |||
283 | { | 290 | { |
284 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 291 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
285 | uri, | 292 | uri, |
286 | reqString); | 293 | reqString, |
294 | m_Auth); | ||
287 | if (reply == null || (reply != null && reply == string.Empty)) | 295 | if (reply == null || (reply != null && reply == string.Empty)) |
288 | { | 296 | { |
289 | m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgent received null or empty reply"); | 297 | m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgent received null or empty reply"); |
@@ -327,7 +335,8 @@ namespace OpenSim.Services.Connectors | |||
327 | { | 335 | { |
328 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 336 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
329 | uri, | 337 | uri, |
330 | reqString); | 338 | reqString, |
339 | m_Auth); | ||
331 | if (reply == null || (reply != null && reply == string.Empty)) | 340 | if (reply == null || (reply != null && reply == string.Empty)) |
332 | { | 341 | { |
333 | m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgents received null or empty reply"); | 342 | m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgents received null or empty reply"); |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index d9fe5a0..099ba98 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -282,7 +282,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
282 | } | 282 | } |
283 | 283 | ||
284 | 284 | ||
285 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason) | 285 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason) |
286 | { | 286 | { |
287 | reason = "Failed to contact destination"; | 287 | reason = "Failed to contact destination"; |
288 | version = "Unknown"; | 288 | version = "Unknown"; |
@@ -296,6 +296,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
296 | string uri = destination.ServerURI + AgentPath() + agentID + "/" + destination.RegionID.ToString() + "/"; | 296 | string uri = destination.ServerURI + AgentPath() + agentID + "/" + destination.RegionID.ToString() + "/"; |
297 | 297 | ||
298 | OSDMap request = new OSDMap(); | 298 | OSDMap request = new OSDMap(); |
299 | request.Add("viaTeleport", OSD.FromBoolean(viaTeleport)); | ||
299 | request.Add("position", OSD.FromString(position.ToString())); | 300 | request.Add("position", OSD.FromString(position.ToString())); |
300 | if (agentHomeURI != null) | 301 | if (agentHomeURI != null) |
301 | request.Add("agent_home_uri", OSD.FromString(agentHomeURI)); | 302 | request.Add("agent_home_uri", OSD.FromString(agentHomeURI)); |
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs index 8110fe5..3f61d9a 100644 --- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs +++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs | |||
@@ -33,13 +33,14 @@ using System.Reflection; | |||
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework.Communications; |
36 | using OpenSim.Framework.ServiceAuth; | ||
36 | using OpenSim.Server.Base; | 37 | using OpenSim.Server.Base; |
37 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
38 | using OpenMetaverse; | 39 | using OpenMetaverse; |
39 | 40 | ||
40 | namespace OpenSim.Services.Connectors | 41 | namespace OpenSim.Services.Connectors |
41 | { | 42 | { |
42 | public class UserAccountServicesConnector : IUserAccountService | 43 | public class UserAccountServicesConnector : BaseServiceConnector, IUserAccountService |
43 | { | 44 | { |
44 | private static readonly ILog m_log = | 45 | private static readonly ILog m_log = |
45 | LogManager.GetLogger( | 46 | LogManager.GetLogger( |
@@ -79,6 +80,8 @@ namespace OpenSim.Services.Connectors | |||
79 | throw new Exception("User account connector init error"); | 80 | throw new Exception("User account connector init error"); |
80 | } | 81 | } |
81 | m_ServerURI = serviceURI; | 82 | m_ServerURI = serviceURI; |
83 | |||
84 | base.Initialise(source, "UserAccountService"); | ||
82 | } | 85 | } |
83 | 86 | ||
84 | public virtual UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) | 87 | public virtual UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) |
@@ -144,7 +147,8 @@ namespace OpenSim.Services.Connectors | |||
144 | { | 147 | { |
145 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 148 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
146 | uri, | 149 | uri, |
147 | reqString); | 150 | reqString, |
151 | m_Auth); | ||
148 | if (reply == null || (reply != null && reply == string.Empty)) | 152 | if (reply == null || (reply != null && reply == string.Empty)) |
149 | { | 153 | { |
150 | m_log.DebugFormat("[ACCOUNT CONNECTOR]: GetUserAccounts received null or empty reply"); | 154 | m_log.DebugFormat("[ACCOUNT CONNECTOR]: GetUserAccounts received null or empty reply"); |
@@ -224,7 +228,8 @@ namespace OpenSim.Services.Connectors | |||
224 | { | 228 | { |
225 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 229 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
226 | uri, | 230 | uri, |
227 | reqString); | 231 | reqString, |
232 | m_Auth); | ||
228 | if (reply == null || (reply != null && reply == string.Empty)) | 233 | if (reply == null || (reply != null && reply == string.Empty)) |
229 | { | 234 | { |
230 | m_log.DebugFormat("[ACCOUNT CONNECTOR]: GetUserAccount received null or empty reply"); | 235 | m_log.DebugFormat("[ACCOUNT CONNECTOR]: GetUserAccount received null or empty reply"); |
@@ -260,7 +265,8 @@ namespace OpenSim.Services.Connectors | |||
260 | { | 265 | { |
261 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 266 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
262 | uri, | 267 | uri, |
263 | reqString); | 268 | reqString, |
269 | m_Auth); | ||
264 | if (reply != string.Empty) | 270 | if (reply != string.Empty) |
265 | { | 271 | { |
266 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 272 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index c6d2ee3..09c7938 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -156,18 +156,18 @@ namespace OpenSim.Services.GridService | |||
156 | 156 | ||
157 | if (MainConsole.Instance != null) | 157 | if (MainConsole.Instance != null) |
158 | { | 158 | { |
159 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", | 159 | MainConsole.Instance.Commands.AddCommand("Hypergrid", false, "link-region", |
160 | "link-region <Xloc> <Yloc> <ServerURI> [<RemoteRegionName>]", | 160 | "link-region <Xloc> <Yloc> <ServerURI> [<RemoteRegionName>]", |
161 | "Link a HyperGrid Region. Examples for <ServerURI>: http://grid.net:8002/ or http://example.org/path/foo.php", RunCommand); | 161 | "Link a HyperGrid Region. Examples for <ServerURI>: http://grid.net:8002/ or http://example.org/path/foo.php", RunCommand); |
162 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", | 162 | MainConsole.Instance.Commands.AddCommand("Hypergrid", false, "link-region", |
163 | "link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RemoteRegionName>]", | 163 | "link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RemoteRegionName>]", |
164 | "Link a hypergrid region (deprecated)", RunCommand); | 164 | "Link a hypergrid region (deprecated)", RunCommand); |
165 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", | 165 | MainConsole.Instance.Commands.AddCommand("Hypergrid", false, "unlink-region", |
166 | "unlink-region <local name>", | 166 | "unlink-region <local name>", |
167 | "Unlink a hypergrid region", RunCommand); | 167 | "Unlink a hypergrid region", RunCommand); |
168 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>]", | 168 | MainConsole.Instance.Commands.AddCommand("Hypergrid", false, "link-mapping", "link-mapping [<x> <y>]", |
169 | "Set local coordinate to map HG regions to", RunCommand); | 169 | "Set local coordinate to map HG regions to", RunCommand); |
170 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks", | 170 | MainConsole.Instance.Commands.AddCommand("Hypergrid", false, "show hyperlinks", "show hyperlinks", |
171 | "List the HG regions", HandleShow); | 171 | "List the HG regions", HandleShow); |
172 | } | 172 | } |
173 | } | 173 | } |
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index 3de2330..d158537 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | |||
@@ -122,7 +122,7 @@ namespace OpenSim.Services.HypergridService | |||
122 | } | 122 | } |
123 | 123 | ||
124 | List<XInventoryFolder> tree = GetFolderTree(principalID, suitcase.folderID); | 124 | List<XInventoryFolder> tree = GetFolderTree(principalID, suitcase.folderID); |
125 | if (tree == null || (tree != null && tree.Count == 0)) | 125 | if (tree.Count == 0) |
126 | return null; | 126 | return null; |
127 | 127 | ||
128 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | 128 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); |
@@ -164,8 +164,6 @@ namespace OpenSim.Services.HypergridService | |||
164 | m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder"); | 164 | m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder"); |
165 | return null; | 165 | return null; |
166 | } | 166 | } |
167 | |||
168 | m_Database.StoreFolder(suitcase); | ||
169 | 167 | ||
170 | CreateSystemFolders(principalID, suitcase.folderID); | 168 | CreateSystemFolders(principalID, suitcase.folderID); |
171 | } | 169 | } |
@@ -188,6 +186,10 @@ namespace OpenSim.Services.HypergridService | |||
188 | CreateFolder(principalID, rootID, (int)AssetType.CallingCard, "Calling Cards"); | 186 | CreateFolder(principalID, rootID, (int)AssetType.CallingCard, "Calling Cards"); |
189 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Clothing) return true; return false; })) | 187 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Clothing) return true; return false; })) |
190 | CreateFolder(principalID, rootID, (int)AssetType.Clothing, "Clothing"); | 188 | CreateFolder(principalID, rootID, (int)AssetType.Clothing, "Clothing"); |
189 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.CurrentOutfitFolder) return true; return false; })) | ||
190 | CreateFolder(principalID, rootID, (int)AssetType.CurrentOutfitFolder, "Current Outfit"); | ||
191 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.FavoriteFolder) return true; return false; })) | ||
192 | CreateFolder(principalID, rootID, (int)AssetType.FavoriteFolder, "Favorites"); | ||
191 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Gesture) return true; return false; })) | 193 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Gesture) return true; return false; })) |
192 | CreateFolder(principalID, rootID, (int)AssetType.Gesture, "Gestures"); | 194 | CreateFolder(principalID, rootID, (int)AssetType.Gesture, "Gestures"); |
193 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Landmark) return true; return false; })) | 195 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Landmark) return true; return false; })) |
@@ -208,11 +210,6 @@ namespace OpenSim.Services.HypergridService | |||
208 | CreateFolder(principalID, rootID, (int)AssetType.Texture, "Textures"); | 210 | CreateFolder(principalID, rootID, (int)AssetType.Texture, "Textures"); |
209 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.TrashFolder) return true; return false; })) | 211 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.TrashFolder) return true; return false; })) |
210 | CreateFolder(principalID, rootID, (int)AssetType.TrashFolder, "Trash"); | 212 | CreateFolder(principalID, rootID, (int)AssetType.TrashFolder, "Trash"); |
211 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.FavoriteFolder) return true; return false; })) | ||
212 | CreateFolder(principalID, rootID, (int)AssetType.FavoriteFolder, "Favorites"); | ||
213 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.CurrentOutfitFolder) return true; return false; })) | ||
214 | CreateFolder(principalID, rootID, (int)AssetType.CurrentOutfitFolder, "Current Outfit"); | ||
215 | |||
216 | } | 213 | } |
217 | 214 | ||
218 | public override InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) | 215 | public override InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) |
@@ -249,7 +246,7 @@ namespace OpenSim.Services.HypergridService | |||
249 | 246 | ||
250 | if (!IsWithinSuitcaseTree(principalID, folderID)) | 247 | if (!IsWithinSuitcaseTree(principalID, folderID)) |
251 | { | 248 | { |
252 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetFolderContent: folder {0} is not within Suitcase tree", folderID); | 249 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetFolderContent: folder {0} (user {1}) is not within Suitcase tree", folderID, principalID); |
253 | return new InventoryCollection(); | 250 | return new InventoryCollection(); |
254 | } | 251 | } |
255 | 252 | ||
@@ -269,7 +266,7 @@ namespace OpenSim.Services.HypergridService | |||
269 | // make sure the given folder exists under the suitcase tree of this user | 266 | // make sure the given folder exists under the suitcase tree of this user |
270 | if (!IsWithinSuitcaseTree(principalID, folderID)) | 267 | if (!IsWithinSuitcaseTree(principalID, folderID)) |
271 | { | 268 | { |
272 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetFolderItems: folder {0} is not within Suitcase tree", folderID); | 269 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetFolderItems: folder {0} (user {1}) is not within Suitcase tree", folderID, principalID); |
273 | return new List<InventoryItemBase>(); | 270 | return new List<InventoryItemBase>(); |
274 | } | 271 | } |
275 | 272 | ||
@@ -284,7 +281,7 @@ namespace OpenSim.Services.HypergridService | |||
284 | 281 | ||
285 | if (!IsWithinSuitcaseTree(folder.Owner, folder.ParentID)) | 282 | if (!IsWithinSuitcaseTree(folder.Owner, folder.ParentID)) |
286 | { | 283 | { |
287 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: AddFolder: folder {0} is not within Suitcase tree", folder.ParentID); | 284 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: AddFolder: folder {0} (user {1}) is not within Suitcase tree", folder.ParentID, folder.Owner); |
288 | return false; | 285 | return false; |
289 | } | 286 | } |
290 | 287 | ||
@@ -306,7 +303,7 @@ namespace OpenSim.Services.HypergridService | |||
306 | //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Update folder {0}, version {1}", folder.ID, folder.Version); | 303 | //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Update folder {0}, version {1}", folder.ID, folder.Version); |
307 | if (!IsWithinSuitcaseTree(folder.Owner, folder.ID)) | 304 | if (!IsWithinSuitcaseTree(folder.Owner, folder.ID)) |
308 | { | 305 | { |
309 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: UpdateFolder: folder {0}/{1} is not within Suitcase tree", folder.Name, folder.ID); | 306 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: UpdateFolder: folder {0}/{1} (user {2}) is not within Suitcase tree", folder.Name, folder.ID, folder.Owner); |
310 | return false; | 307 | return false; |
311 | } | 308 | } |
312 | 309 | ||
@@ -318,13 +315,13 @@ namespace OpenSim.Services.HypergridService | |||
318 | { | 315 | { |
319 | if (!IsWithinSuitcaseTree(folder.Owner, folder.ID)) | 316 | if (!IsWithinSuitcaseTree(folder.Owner, folder.ID)) |
320 | { | 317 | { |
321 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} is not within Suitcase tree", folder.ID); | 318 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} (user {1}) is not within Suitcase tree", folder.ID, folder.Owner); |
322 | return false; | 319 | return false; |
323 | } | 320 | } |
324 | 321 | ||
325 | if (!IsWithinSuitcaseTree(folder.Owner, folder.ParentID)) | 322 | if (!IsWithinSuitcaseTree(folder.Owner, folder.ParentID)) |
326 | { | 323 | { |
327 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} is not within Suitcase tree", folder.ParentID); | 324 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} (user {1}) is not within Suitcase tree", folder.ParentID, folder.Owner); |
328 | return false; | 325 | return false; |
329 | } | 326 | } |
330 | 327 | ||
@@ -349,7 +346,7 @@ namespace OpenSim.Services.HypergridService | |||
349 | // make sure the given folder's parent folder exists under the suitcase tree of this user | 346 | // make sure the given folder's parent folder exists under the suitcase tree of this user |
350 | if (!IsWithinSuitcaseTree(item.Owner, item.Folder)) | 347 | if (!IsWithinSuitcaseTree(item.Owner, item.Folder)) |
351 | { | 348 | { |
352 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: AddItem: folder {0} is not within Suitcase tree", item.Folder); | 349 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: AddItem: folder {0} (user {1}) is not within Suitcase tree", item.Folder, item.Owner); |
353 | return false; | 350 | return false; |
354 | } | 351 | } |
355 | 352 | ||
@@ -362,7 +359,7 @@ namespace OpenSim.Services.HypergridService | |||
362 | { | 359 | { |
363 | if (!IsWithinSuitcaseTree(item.Owner, item.Folder)) | 360 | if (!IsWithinSuitcaseTree(item.Owner, item.Folder)) |
364 | { | 361 | { |
365 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: UpdateItem: folder {0} is not within Suitcase tree", item.Folder); | 362 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: UpdateItem: folder {0} (user {1}) is not within Suitcase tree", item.Folder, item.Owner); |
366 | return false; | 363 | return false; |
367 | } | 364 | } |
368 | 365 | ||
@@ -378,7 +375,7 @@ namespace OpenSim.Services.HypergridService | |||
378 | { | 375 | { |
379 | if (!IsWithinSuitcaseTree(item.Owner, item.Folder)) | 376 | if (!IsWithinSuitcaseTree(item.Owner, item.Folder)) |
380 | { | 377 | { |
381 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveItems: folder {0} is not within Suitcase tree", item.Folder); | 378 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveItems: folder {0} (user {1}) is not within Suitcase tree", item.Folder, item.Owner); |
382 | return false; | 379 | return false; |
383 | } | 380 | } |
384 | } | 381 | } |
@@ -389,7 +386,7 @@ namespace OpenSim.Services.HypergridService | |||
389 | InventoryItemBase originalItem = base.GetItem(item); | 386 | InventoryItemBase originalItem = base.GetItem(item); |
390 | if (!IsWithinSuitcaseTree(originalItem.Owner, originalItem.Folder)) | 387 | if (!IsWithinSuitcaseTree(originalItem.Owner, originalItem.Folder)) |
391 | { | 388 | { |
392 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveItems: folder {0} is not within Suitcase tree", originalItem.Folder); | 389 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveItems: folder {0} (user {1}) is not within Suitcase tree", item.Folder, item.Owner); |
393 | return false; | 390 | return false; |
394 | } | 391 | } |
395 | } | 392 | } |
@@ -414,8 +411,8 @@ namespace OpenSim.Services.HypergridService | |||
414 | 411 | ||
415 | if (!IsWithinSuitcaseTree(it.Owner, it.Folder) && !IsPartOfAppearance(it.Owner, it.ID)) | 412 | if (!IsWithinSuitcaseTree(it.Owner, it.Folder) && !IsPartOfAppearance(it.Owner, it.ID)) |
416 | { | 413 | { |
417 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Item {0}/{1} (folder {2}) is not within Suitcase tree or Appearance", | 414 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetItem: item {0}/{1} (folder {2}) (user {3}) is not within Suitcase tree or Appearance", |
418 | it.Name, it.ID, it.Folder); | 415 | it.Name, it.ID, it.Folder, it.Owner); |
419 | return null; | 416 | return null; |
420 | } | 417 | } |
421 | 418 | ||
@@ -437,8 +434,8 @@ namespace OpenSim.Services.HypergridService | |||
437 | { | 434 | { |
438 | if (!IsWithinSuitcaseTree(f.Owner, f.ID)) | 435 | if (!IsWithinSuitcaseTree(f.Owner, f.ID)) |
439 | { | 436 | { |
440 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Folder {0}/{1} is not within Suitcase tree", | 437 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetFolder: folder {0}/{1} (user {2}) is not within Suitcase tree", |
441 | f.Name, f.ID); | 438 | f.Name, f.ID, f.Owner); |
442 | return null; | 439 | return null; |
443 | } | 440 | } |
444 | } | 441 | } |
@@ -537,13 +534,13 @@ namespace OpenSim.Services.HypergridService | |||
537 | 534 | ||
538 | private List<XInventoryFolder> GetFolderTree(UUID principalID, UUID folder) | 535 | private List<XInventoryFolder> GetFolderTree(UUID principalID, UUID folder) |
539 | { | 536 | { |
540 | List<XInventoryFolder> t = null; | 537 | List<XInventoryFolder> t; |
541 | if (m_SuitcaseTrees.TryGetValue(principalID, out t)) | 538 | if (m_SuitcaseTrees.TryGetValue(principalID, out t)) |
542 | return t; | 539 | return t; |
543 | 540 | ||
544 | // Get the tree of the suitcase folder | 541 | // Get the tree of the suitcase folder |
545 | t = GetFolderTreeRecursive(folder); | 542 | t = GetFolderTreeRecursive(folder); |
546 | m_SuitcaseTrees.AddOrUpdate(principalID, t, 5*60); // 5minutes | 543 | m_SuitcaseTrees.AddOrUpdate(principalID, t, 5*60); // 5 minutes |
547 | return t; | 544 | return t; |
548 | } | 545 | } |
549 | 546 | ||
@@ -554,8 +551,10 @@ namespace OpenSim.Services.HypergridService | |||
554 | new string[] { "parentFolderID" }, | 551 | new string[] { "parentFolderID" }, |
555 | new string[] { root.ToString() }); | 552 | new string[] { root.ToString() }); |
556 | 553 | ||
557 | if (folders == null || (folders != null && folders.Length == 0)) | 554 | if (folders == null || folders.Length == 0) |
555 | { | ||
558 | return tree; // empty tree | 556 | return tree; // empty tree |
557 | } | ||
559 | else | 558 | else |
560 | { | 559 | { |
561 | foreach (XInventoryFolder f in folders) | 560 | foreach (XInventoryFolder f in folders) |
@@ -588,17 +587,18 @@ namespace OpenSim.Services.HypergridService | |||
588 | List<XInventoryFolder> tree = new List<XInventoryFolder>(); | 587 | List<XInventoryFolder> tree = new List<XInventoryFolder>(); |
589 | tree.Add(suitcase); // Warp! the tree is the real root folder plus the children of the suitcase folder | 588 | tree.Add(suitcase); // Warp! the tree is the real root folder plus the children of the suitcase folder |
590 | tree.AddRange(GetFolderTree(principalID, suitcase.folderID)); | 589 | tree.AddRange(GetFolderTree(principalID, suitcase.folderID)); |
590 | |||
591 | // Also add the Current Outfit folder to the list of available folders | 591 | // Also add the Current Outfit folder to the list of available folders |
592 | tree.Add(GetCurrentOutfitXFolder(principalID)); | 592 | XInventoryFolder folder = GetCurrentOutfitXFolder(principalID); |
593 | if (folder != null) | ||
594 | tree.Add(folder); | ||
593 | 595 | ||
594 | XInventoryFolder f = tree.Find(delegate(XInventoryFolder fl) | 596 | XInventoryFolder f = tree.Find(delegate(XInventoryFolder fl) |
595 | { | 597 | { |
596 | if (fl.folderID == folderID) return true; | 598 | return (fl.folderID == folderID); |
597 | else return false; | ||
598 | }); | 599 | }); |
599 | 600 | ||
600 | if (f == null) return false; | 601 | return (f != null); |
601 | else return true; | ||
602 | } | 602 | } |
603 | #endregion | 603 | #endregion |
604 | 604 | ||
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index 375a35c..8b87ac0 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs | |||
@@ -83,11 +83,12 @@ namespace OpenSim.Services.Interfaces | |||
83 | /// <param name="destination">Desired destination</param> | 83 | /// <param name="destination">Desired destination</param> |
84 | /// <param name="agentID">The visitor's User ID</param> | 84 | /// <param name="agentID">The visitor's User ID</param> |
85 | /// <param name="agentHomeURI">The visitor's Home URI. Will be missing (null) in older OpenSims.</param> | 85 | /// <param name="agentHomeURI">The visitor's Home URI. Will be missing (null) in older OpenSims.</param> |
86 | /// <param name="viaTeleport">True: via teleport; False: via cross (walking)</param> | ||
86 | /// <param name="position">Position in the region</param> | 87 | /// <param name="position">Position in the region</param> |
87 | /// <param name="version"></param> | 88 | /// <param name="version"></param> |
88 | /// <param name="reason">[out] Optional error message</param> | 89 | /// <param name="reason">[out] Optional error message</param> |
89 | /// <returns>True: ok; False: not allowed</returns> | 90 | /// <returns>True: ok; False: not allowed</returns> |
90 | bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason); | 91 | bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason); |
91 | 92 | ||
92 | /// <summary> | 93 | /// <summary> |
93 | /// Message from receiving region to departing region, telling it got contacted by the client. | 94 | /// Message from receiving region to departing region, telling it got contacted by the client. |
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index 7c16ca9..362ff8f 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -122,10 +122,18 @@ namespace OpenSim.Services.InventoryService | |||
122 | if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Bodypart) return true; return false; })) | 122 | if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Bodypart) return true; return false; })) |
123 | CreateFolder(principalID, rootFolder.ID, (int)AssetType.Bodypart, "Body Parts"); | 123 | CreateFolder(principalID, rootFolder.ID, (int)AssetType.Bodypart, "Body Parts"); |
124 | if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.CallingCard) return true; return false; })) | 124 | if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.CallingCard) return true; return false; })) |
125 | CreateFolder(principalID, rootFolder.ID, (int)AssetType.CallingCard, "Calling Cards"); | 125 | { |
126 | XInventoryFolder folder = CreateFolder(principalID, rootFolder.ID, (int)AssetType.CallingCard, "Calling Cards"); | ||
127 | folder = CreateFolder(principalID, folder.folderID, (int)AssetType.CallingCard, "Friends"); | ||
128 | CreateFolder(principalID, folder.folderID, (int)AssetType.CallingCard, "All"); | ||
129 | } | ||
126 | if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Clothing) return true; return false; })) | 130 | if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Clothing) return true; return false; })) |
127 | CreateFolder(principalID, rootFolder.ID, (int)AssetType.Clothing, "Clothing"); | 131 | CreateFolder(principalID, rootFolder.ID, (int)AssetType.Clothing, "Clothing"); |
128 | if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Gesture) return true; return false; })) | 132 | if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.CurrentOutfitFolder) return true; return false; })) |
133 | CreateFolder(principalID, rootFolder.ID, (int)AssetType.CurrentOutfitFolder, "Current Outfit"); | ||
134 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.FavoriteFolder) return true; return false; })) | ||
135 | CreateFolder(principalID, rootFolder.ID, (int)AssetType.FavoriteFolder, "Favorites"); | ||
136 | if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Gesture) return true; return false; })) | ||
129 | CreateFolder(principalID, rootFolder.ID, (int)AssetType.Gesture, "Gestures"); | 137 | CreateFolder(principalID, rootFolder.ID, (int)AssetType.Gesture, "Gestures"); |
130 | if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Landmark) return true; return false; })) | 138 | if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Landmark) return true; return false; })) |
131 | CreateFolder(principalID, rootFolder.ID, (int)AssetType.Landmark, "Landmarks"); | 139 | CreateFolder(principalID, rootFolder.ID, (int)AssetType.Landmark, "Landmarks"); |