diff options
Diffstat (limited to 'OpenSim/Services')
6 files changed, 143 insertions, 66 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index ed87f3f..4e512e7 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs | |||
@@ -106,7 +106,10 @@ namespace OpenSim.Services.AssetService | |||
106 | return null; | 106 | return null; |
107 | 107 | ||
108 | AssetBase asset = m_Database.GetAsset(assetID); | 108 | AssetBase asset = m_Database.GetAsset(assetID); |
109 | return asset.Metadata; | 109 | if (asset != null) |
110 | return asset.Metadata; | ||
111 | |||
112 | return null; | ||
110 | } | 113 | } |
111 | 114 | ||
112 | public byte[] GetData(string id) | 115 | public byte[] GetData(string id) |
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs index 0cc1978..52294da 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs | |||
@@ -112,8 +112,15 @@ namespace OpenSim.Services.Connectors | |||
112 | 112 | ||
113 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | 113 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); |
114 | 114 | ||
115 | foreach (Object o in ret.Values) | 115 | try |
116 | folders.Add(BuildFolder((Dictionary<string,object>)o)); | 116 | { |
117 | foreach (Object o in ret.Values) | ||
118 | folders.Add(BuildFolder((Dictionary<string, object>)o)); | ||
119 | } | ||
120 | catch (Exception e) | ||
121 | { | ||
122 | m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception unwrapping folder list: {0}", e.Message); | ||
123 | } | ||
117 | 124 | ||
118 | return folders; | 125 | return folders; |
119 | } | 126 | } |
@@ -130,7 +137,7 @@ namespace OpenSim.Services.Connectors | |||
130 | if (ret.Count == 0) | 137 | if (ret.Count == 0) |
131 | return null; | 138 | return null; |
132 | 139 | ||
133 | return BuildFolder(ret); | 140 | return BuildFolder((Dictionary<string, object>)ret["folder"]); |
134 | } | 141 | } |
135 | 142 | ||
136 | public InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) | 143 | public InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) |
@@ -146,7 +153,7 @@ namespace OpenSim.Services.Connectors | |||
146 | if (ret.Count == 0) | 153 | if (ret.Count == 0) |
147 | return null; | 154 | return null; |
148 | 155 | ||
149 | return BuildFolder(ret); | 156 | return BuildFolder((Dictionary<string, object>)ret["folder"]); |
150 | } | 157 | } |
151 | 158 | ||
152 | public InventoryCollection GetFolderContent(UUID principalID, UUID folderID) | 159 | public InventoryCollection GetFolderContent(UUID principalID, UUID folderID) |
@@ -173,10 +180,17 @@ namespace OpenSim.Services.Connectors | |||
173 | Dictionary<string,object> items = | 180 | Dictionary<string,object> items = |
174 | (Dictionary<string,object>)ret["ITEMS"]; | 181 | (Dictionary<string,object>)ret["ITEMS"]; |
175 | 182 | ||
176 | foreach (Object o in folders.Values) | 183 | try |
177 | inventory.Folders.Add(BuildFolder((Dictionary<string,object>)o)); | 184 | { |
178 | foreach (Object o in items.Values) | 185 | foreach (Object o in folders.Values) // getting the values directly, we don't care about the keys folder_i |
179 | inventory.Items.Add(BuildItem((Dictionary<string,object>)o)); | 186 | inventory.Folders.Add(BuildFolder((Dictionary<string, object>)o)); |
187 | foreach (Object o in items.Values) // getting the values directly, we don't care about the keys item_i | ||
188 | inventory.Items.Add(BuildItem((Dictionary<string, object>)o)); | ||
189 | } | ||
190 | catch (Exception e) | ||
191 | { | ||
192 | m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception unwrapping content list: {0}", e.Message); | ||
193 | } | ||
180 | 194 | ||
181 | return inventory; | 195 | return inventory; |
182 | } | 196 | } |
@@ -194,13 +208,12 @@ namespace OpenSim.Services.Connectors | |||
194 | if (ret.Count == 0) | 208 | if (ret.Count == 0) |
195 | return null; | 209 | return null; |
196 | 210 | ||
197 | 211 | Dictionary<string, object> items = (Dictionary<string, object>)ret["ITEMS"]; | |
198 | List<InventoryItemBase> items = new List<InventoryItemBase>(); | 212 | List<InventoryItemBase> fitems = new List<InventoryItemBase>(); |
199 | 213 | foreach (Object o in items.Values) // getting the values directly, we don't care about the keys item_i | |
200 | foreach (Object o in ret.Values) | 214 | fitems.Add(BuildItem((Dictionary<string, object>)o)); |
201 | items.Add(BuildItem((Dictionary<string,object>)o)); | ||
202 | 215 | ||
203 | return items; | 216 | return fitems; |
204 | } | 217 | } |
205 | 218 | ||
206 | public bool AddFolder(InventoryFolderBase folder) | 219 | public bool AddFolder(InventoryFolderBase folder) |
@@ -405,7 +418,7 @@ namespace OpenSim.Services.Connectors | |||
405 | if (ret.Count == 0) | 418 | if (ret.Count == 0) |
406 | return null; | 419 | return null; |
407 | 420 | ||
408 | return BuildItem(ret); | 421 | return BuildItem((Dictionary<string, object>)ret["item"]); |
409 | } | 422 | } |
410 | 423 | ||
411 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) | 424 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) |
@@ -420,7 +433,7 @@ namespace OpenSim.Services.Connectors | |||
420 | if (ret.Count == 0) | 433 | if (ret.Count == 0) |
421 | return null; | 434 | return null; |
422 | 435 | ||
423 | return BuildFolder(ret); | 436 | return BuildFolder((Dictionary<string, object>)ret["folder"]); |
424 | } | 437 | } |
425 | 438 | ||
426 | public List<InventoryItemBase> GetActiveGestures(UUID principalID) | 439 | public List<InventoryItemBase> GetActiveGestures(UUID principalID) |
@@ -435,8 +448,8 @@ namespace OpenSim.Services.Connectors | |||
435 | 448 | ||
436 | List<InventoryItemBase> items = new List<InventoryItemBase>(); | 449 | List<InventoryItemBase> items = new List<InventoryItemBase>(); |
437 | 450 | ||
438 | foreach (Object o in ret.Values) | 451 | foreach (Object o in ret.Values) // getting the values directly, we don't care about the keys item_i |
439 | items.Add(BuildItem((Dictionary<string,object>)o)); | 452 | items.Add(BuildItem((Dictionary<string, object>)o)); |
440 | 453 | ||
441 | return items; | 454 | return items; |
442 | } | 455 | } |
@@ -455,6 +468,36 @@ namespace OpenSim.Services.Connectors | |||
455 | return int.Parse(ret["RESULT"].ToString()); | 468 | return int.Parse(ret["RESULT"].ToString()); |
456 | } | 469 | } |
457 | 470 | ||
471 | public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID) | ||
472 | { | ||
473 | Dictionary<string, object> ret = MakeRequest("GETSYSTEMFOLDERS", | ||
474 | new Dictionary<string, object> { | ||
475 | { "PRINCIPAL", userID.ToString() }, | ||
476 | }); | ||
477 | |||
478 | if (ret == null) | ||
479 | return new Dictionary<AssetType,InventoryFolderBase>(); | ||
480 | |||
481 | Dictionary<AssetType, InventoryFolderBase> sfolders = new Dictionary<AssetType, InventoryFolderBase>(); | ||
482 | |||
483 | try | ||
484 | { | ||
485 | Dictionary<string, object> folders = (Dictionary<string, object>)ret["FOLDERS"]; | ||
486 | |||
487 | foreach (Object o in folders.Values) // getting the values directly, we don't care about the keys folder_i | ||
488 | { | ||
489 | InventoryFolderBase folder = BuildFolder((Dictionary<string, object>)o); | ||
490 | sfolders.Add((AssetType)folder.Type, folder); | ||
491 | } | ||
492 | |||
493 | } | ||
494 | catch (Exception e) | ||
495 | { | ||
496 | m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: exception {0}", e.Message); | ||
497 | } | ||
498 | |||
499 | return sfolders; | ||
500 | } | ||
458 | 501 | ||
459 | // These are either obsolete or unused | 502 | // These are either obsolete or unused |
460 | // | 503 | // |
@@ -493,13 +536,20 @@ namespace OpenSim.Services.Connectors | |||
493 | { | 536 | { |
494 | InventoryFolderBase folder = new InventoryFolderBase(); | 537 | InventoryFolderBase folder = new InventoryFolderBase(); |
495 | 538 | ||
496 | folder.ParentID = new UUID(data["ParentID"].ToString()); | 539 | try |
497 | folder.Type = short.Parse(data["Type"].ToString()); | 540 | { |
498 | folder.Version = ushort.Parse(data["Version"].ToString()); | 541 | folder.ParentID = new UUID(data["ParentID"].ToString()); |
499 | folder.Name = data["Name"].ToString(); | 542 | folder.Type = short.Parse(data["Type"].ToString()); |
500 | folder.Owner = new UUID(data["Owner"].ToString()); | 543 | folder.Version = ushort.Parse(data["Version"].ToString()); |
501 | folder.ID = new UUID(data["ID"].ToString()); | 544 | folder.Name = data["Name"].ToString(); |
502 | 545 | folder.Owner = new UUID(data["Owner"].ToString()); | |
546 | folder.ID = new UUID(data["ID"].ToString()); | ||
547 | } | ||
548 | catch (Exception e) | ||
549 | { | ||
550 | m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception building folder: {0}", e.Message); | ||
551 | } | ||
552 | |||
503 | return folder; | 553 | return folder; |
504 | } | 554 | } |
505 | 555 | ||
@@ -507,26 +557,33 @@ namespace OpenSim.Services.Connectors | |||
507 | { | 557 | { |
508 | InventoryItemBase item = new InventoryItemBase(); | 558 | InventoryItemBase item = new InventoryItemBase(); |
509 | 559 | ||
510 | item.AssetID = new UUID(data["AssetID"].ToString()); | 560 | try |
511 | item.AssetType = int.Parse(data["AssetType"].ToString()); | 561 | { |
512 | item.Name = data["Name"].ToString(); | 562 | item.AssetID = new UUID(data["AssetID"].ToString()); |
513 | item.Owner = new UUID(data["Owner"].ToString()); | 563 | item.AssetType = int.Parse(data["AssetType"].ToString()); |
514 | item.ID = new UUID(data["ID"].ToString()); | 564 | item.Name = data["Name"].ToString(); |
515 | item.InvType = int.Parse(data["InvType"].ToString()); | 565 | item.Owner = new UUID(data["Owner"].ToString()); |
516 | item.Folder = new UUID(data["Folder"].ToString()); | 566 | item.ID = new UUID(data["ID"].ToString()); |
517 | item.CreatorId = data["CreatorId"].ToString(); | 567 | item.InvType = int.Parse(data["InvType"].ToString()); |
518 | item.Description = data["Description"].ToString(); | 568 | item.Folder = new UUID(data["Folder"].ToString()); |
519 | item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); | 569 | item.CreatorId = data["CreatorId"].ToString(); |
520 | item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); | 570 | item.Description = data["Description"].ToString(); |
521 | item.BasePermissions = uint.Parse(data["BasePermissions"].ToString()); | 571 | item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); |
522 | item.EveryOnePermissions = uint.Parse(data["EveryOnePermissions"].ToString()); | 572 | item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); |
523 | item.GroupPermissions = uint.Parse(data["GroupPermissions"].ToString()); | 573 | item.BasePermissions = uint.Parse(data["BasePermissions"].ToString()); |
524 | item.GroupID = new UUID(data["GroupID"].ToString()); | 574 | item.EveryOnePermissions = uint.Parse(data["EveryOnePermissions"].ToString()); |
525 | item.GroupOwned = bool.Parse(data["GroupOwned"].ToString()); | 575 | item.GroupPermissions = uint.Parse(data["GroupPermissions"].ToString()); |
526 | item.SalePrice = int.Parse(data["SalePrice"].ToString()); | 576 | item.GroupID = new UUID(data["GroupID"].ToString()); |
527 | item.SaleType = byte.Parse(data["SaleType"].ToString()); | 577 | item.GroupOwned = bool.Parse(data["GroupOwned"].ToString()); |
528 | item.Flags = uint.Parse(data["Flags"].ToString()); | 578 | item.SalePrice = int.Parse(data["SalePrice"].ToString()); |
529 | item.CreationDate = int.Parse(data["CreationDate"].ToString()); | 579 | item.SaleType = byte.Parse(data["SaleType"].ToString()); |
580 | item.Flags = uint.Parse(data["Flags"].ToString()); | ||
581 | item.CreationDate = int.Parse(data["CreationDate"].ToString()); | ||
582 | } | ||
583 | catch (Exception e) | ||
584 | { | ||
585 | m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception building item: {0}", e.Message); | ||
586 | } | ||
530 | 587 | ||
531 | return item; | 588 | return item; |
532 | } | 589 | } |
diff --git a/OpenSim/Services/Interfaces/ILoginService.cs b/OpenSim/Services/Interfaces/ILoginService.cs index 24bf342..49efbe2 100644 --- a/OpenSim/Services/Interfaces/ILoginService.cs +++ b/OpenSim/Services/Interfaces/ILoginService.cs | |||
@@ -31,6 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.Net; | 31 | using System.Net; |
32 | 32 | ||
33 | using OpenMetaverse.StructuredData; | 33 | using OpenMetaverse.StructuredData; |
34 | using OpenMetaverse; | ||
34 | 35 | ||
35 | namespace OpenSim.Services.Interfaces | 36 | namespace OpenSim.Services.Interfaces |
36 | { | 37 | { |
@@ -46,7 +47,7 @@ namespace OpenSim.Services.Interfaces | |||
46 | 47 | ||
47 | public interface ILoginService | 48 | public interface ILoginService |
48 | { | 49 | { |
49 | LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, IPEndPoint clientIP); | 50 | LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, IPEndPoint clientIP); |
50 | } | 51 | } |
51 | 52 | ||
52 | 53 | ||
diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index 0d6577e..fbcd663 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs | |||
@@ -109,7 +109,7 @@ namespace OpenSim.Services.InventoryService | |||
109 | { | 109 | { |
110 | existingRootFolder = GetRootFolder(user); | 110 | existingRootFolder = GetRootFolder(user); |
111 | } | 111 | } |
112 | catch (Exception e) | 112 | catch /*(Exception e)*/ |
113 | { | 113 | { |
114 | // Munch the exception, it has already been reported | 114 | // Munch the exception, it has already been reported |
115 | // | 115 | // |
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index bbd37d1..4d7103b 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -184,7 +184,7 @@ namespace OpenSim.Services.InventoryService | |||
184 | 184 | ||
185 | foreach (XInventoryFolder x in allFolders) | 185 | foreach (XInventoryFolder x in allFolders) |
186 | { | 186 | { |
187 | m_log.DebugFormat("[INVENTORY]: Adding folder {0} to skeleton", x.folderName); | 187 | //m_log.DebugFormat("[XINVENTORY]: Adding folder {0} to skeleton", x.folderName); |
188 | folders.Add(ConvertToOpenSim(x)); | 188 | folders.Add(ConvertToOpenSim(x)); |
189 | } | 189 | } |
190 | 190 | ||
@@ -221,7 +221,7 @@ namespace OpenSim.Services.InventoryService | |||
221 | // connector. So we disregard the principal and look | 221 | // connector. So we disregard the principal and look |
222 | // by ID. | 222 | // by ID. |
223 | // | 223 | // |
224 | m_log.DebugFormat("[INVENTORY]: Fetch contents for folder {0}", folderID.ToString()); | 224 | m_log.DebugFormat("[XINVENTORY]: Fetch contents for folder {0}", folderID.ToString()); |
225 | InventoryCollection inventory = new InventoryCollection(); | 225 | InventoryCollection inventory = new InventoryCollection(); |
226 | inventory.UserID = principalID; | 226 | inventory.UserID = principalID; |
227 | inventory.Folders = new List<InventoryFolderBase>(); | 227 | inventory.Folders = new List<InventoryFolderBase>(); |
@@ -233,7 +233,7 @@ namespace OpenSim.Services.InventoryService | |||
233 | 233 | ||
234 | foreach (XInventoryFolder x in folders) | 234 | foreach (XInventoryFolder x in folders) |
235 | { | 235 | { |
236 | m_log.DebugFormat("[INVENTORY]: Adding folder {0} to response", x.folderName); | 236 | //m_log.DebugFormat("[XINVENTORY]: Adding folder {0} to response", x.folderName); |
237 | inventory.Folders.Add(ConvertToOpenSim(x)); | 237 | inventory.Folders.Add(ConvertToOpenSim(x)); |
238 | } | 238 | } |
239 | 239 | ||
@@ -243,7 +243,7 @@ namespace OpenSim.Services.InventoryService | |||
243 | 243 | ||
244 | foreach (XInventoryItem i in items) | 244 | foreach (XInventoryItem i in items) |
245 | { | 245 | { |
246 | m_log.DebugFormat("[INVENTORY]: Adding item {0} to response", i.inventoryName); | 246 | //m_log.DebugFormat("[XINVENTORY]: Adding item {0} to response", i.inventoryName); |
247 | inventory.Items.Add(ConvertToOpenSim(i)); | 247 | inventory.Items.Add(ConvertToOpenSim(i)); |
248 | } | 248 | } |
249 | 249 | ||
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index c333b5c..4d7dfd1 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -147,7 +147,7 @@ namespace OpenSim.Services.LLLoginService | |||
147 | { | 147 | { |
148 | } | 148 | } |
149 | 149 | ||
150 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, IPEndPoint clientIP) | 150 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, IPEndPoint clientIP) |
151 | { | 151 | { |
152 | bool success = false; | 152 | bool success = false; |
153 | UUID session = UUID.Random(); | 153 | UUID session = UUID.Random(); |
@@ -157,7 +157,7 @@ namespace OpenSim.Services.LLLoginService | |||
157 | // | 157 | // |
158 | // Get the account and check that it exists | 158 | // Get the account and check that it exists |
159 | // | 159 | // |
160 | UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, firstName, lastName); | 160 | UserAccount account = m_UserAccountService.GetUserAccount(scopeID, firstName, lastName); |
161 | if (account == null) | 161 | if (account == null) |
162 | { | 162 | { |
163 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: user not found"); | 163 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: user not found"); |
@@ -170,6 +170,22 @@ namespace OpenSim.Services.LLLoginService | |||
170 | return LLFailedLoginResponse.LoginBlockedProblem; | 170 | return LLFailedLoginResponse.LoginBlockedProblem; |
171 | } | 171 | } |
172 | 172 | ||
173 | // If a scope id is requested, check that the account is in | ||
174 | // that scope, or unscoped. | ||
175 | // | ||
176 | if (scopeID != UUID.Zero) | ||
177 | { | ||
178 | if (account.ScopeID != scopeID && account.ScopeID != UUID.Zero) | ||
179 | { | ||
180 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: user not found"); | ||
181 | return LLFailedLoginResponse.UserProblem; | ||
182 | } | ||
183 | } | ||
184 | else | ||
185 | { | ||
186 | scopeID = account.ScopeID; | ||
187 | } | ||
188 | |||
173 | // | 189 | // |
174 | // Authenticate this user | 190 | // Authenticate this user |
175 | // | 191 | // |
@@ -219,7 +235,7 @@ namespace OpenSim.Services.LLLoginService | |||
219 | // Get the home region | 235 | // Get the home region |
220 | if ((presence.HomeRegionID != UUID.Zero) && m_GridService != null) | 236 | if ((presence.HomeRegionID != UUID.Zero) && m_GridService != null) |
221 | { | 237 | { |
222 | home = m_GridService.GetRegionByUUID(account.ScopeID, presence.HomeRegionID); | 238 | home = m_GridService.GetRegionByUUID(scopeID, presence.HomeRegionID); |
223 | } | 239 | } |
224 | } | 240 | } |
225 | 241 | ||
@@ -230,7 +246,7 @@ namespace OpenSim.Services.LLLoginService | |||
230 | Vector3 position = Vector3.Zero; | 246 | Vector3 position = Vector3.Zero; |
231 | Vector3 lookAt = Vector3.Zero; | 247 | Vector3 lookAt = Vector3.Zero; |
232 | GridRegion gatekeeper = null; | 248 | GridRegion gatekeeper = null; |
233 | GridRegion destination = FindDestination(account, presence, session, startLocation, out gatekeeper, out where, out position, out lookAt); | 249 | GridRegion destination = FindDestination(account, scopeID, presence, session, startLocation, out gatekeeper, out where, out position, out lookAt); |
234 | if (destination == null) | 250 | if (destination == null) |
235 | { | 251 | { |
236 | m_PresenceService.LogoutAgent(session, presence.Position, presence.LookAt); | 252 | m_PresenceService.LogoutAgent(session, presence.Position, presence.LookAt); |
@@ -286,7 +302,7 @@ namespace OpenSim.Services.LLLoginService | |||
286 | } | 302 | } |
287 | } | 303 | } |
288 | 304 | ||
289 | protected GridRegion FindDestination(UserAccount account, PresenceInfo pinfo, UUID sessionID, string startLocation, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt) | 305 | protected GridRegion FindDestination(UserAccount account, UUID scopeID, PresenceInfo pinfo, UUID sessionID, string startLocation, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt) |
290 | { | 306 | { |
291 | m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation); | 307 | m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation); |
292 | 308 | ||
@@ -318,7 +334,7 @@ namespace OpenSim.Services.LLLoginService | |||
318 | } | 334 | } |
319 | else | 335 | else |
320 | { | 336 | { |
321 | region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.HomeRegionID); | 337 | region = m_GridService.GetRegionByUUID(scopeID, pinfo.HomeRegionID); |
322 | 338 | ||
323 | if (null == region) | 339 | if (null == region) |
324 | { | 340 | { |
@@ -332,7 +348,7 @@ namespace OpenSim.Services.LLLoginService | |||
332 | 348 | ||
333 | if (tryDefaults) | 349 | if (tryDefaults) |
334 | { | 350 | { |
335 | List<GridRegion> defaults = m_GridService.GetDefaultRegions(account.ScopeID); | 351 | List<GridRegion> defaults = m_GridService.GetDefaultRegions(scopeID); |
336 | if (defaults != null && defaults.Count > 0) | 352 | if (defaults != null && defaults.Count > 0) |
337 | { | 353 | { |
338 | region = defaults[0]; | 354 | region = defaults[0]; |
@@ -342,7 +358,7 @@ namespace OpenSim.Services.LLLoginService | |||
342 | { | 358 | { |
343 | m_log.WarnFormat("[LLOGIN SERVICE]: User {0} {1} does not have a valid home and this grid does not have default locations. Attempting to find random region", | 359 | m_log.WarnFormat("[LLOGIN SERVICE]: User {0} {1} does not have a valid home and this grid does not have default locations. Attempting to find random region", |
344 | account.FirstName, account.LastName); | 360 | account.FirstName, account.LastName); |
345 | defaults = m_GridService.GetRegionsByName(account.ScopeID, "", 1); | 361 | defaults = m_GridService.GetRegionsByName(scopeID, "", 1); |
346 | if (defaults != null && defaults.Count > 0) | 362 | if (defaults != null && defaults.Count > 0) |
347 | { | 363 | { |
348 | region = defaults[0]; | 364 | region = defaults[0]; |
@@ -363,9 +379,9 @@ namespace OpenSim.Services.LLLoginService | |||
363 | 379 | ||
364 | GridRegion region = null; | 380 | GridRegion region = null; |
365 | 381 | ||
366 | if (pinfo.RegionID.Equals(UUID.Zero) || (region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.RegionID)) == null) | 382 | if (pinfo.RegionID.Equals(UUID.Zero) || (region = m_GridService.GetRegionByUUID(scopeID, pinfo.RegionID)) == null) |
367 | { | 383 | { |
368 | List<GridRegion> defaults = m_GridService.GetDefaultRegions(account.ScopeID); | 384 | List<GridRegion> defaults = m_GridService.GetDefaultRegions(scopeID); |
369 | if (defaults != null && defaults.Count > 0) | 385 | if (defaults != null && defaults.Count > 0) |
370 | { | 386 | { |
371 | region = defaults[0]; | 387 | region = defaults[0]; |
@@ -374,7 +390,7 @@ namespace OpenSim.Services.LLLoginService | |||
374 | else | 390 | else |
375 | { | 391 | { |
376 | m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region"); | 392 | m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region"); |
377 | defaults = m_GridService.GetRegionsByName(account.ScopeID, "", 1); | 393 | defaults = m_GridService.GetRegionsByName(scopeID, "", 1); |
378 | if (defaults != null && defaults.Count > 0) | 394 | if (defaults != null && defaults.Count > 0) |
379 | { | 395 | { |
380 | region = defaults[0]; | 396 | region = defaults[0]; |
@@ -414,11 +430,11 @@ namespace OpenSim.Services.LLLoginService | |||
414 | { | 430 | { |
415 | if (!regionName.Contains("@")) | 431 | if (!regionName.Contains("@")) |
416 | { | 432 | { |
417 | List<GridRegion> regions = m_GridService.GetRegionsByName(account.ScopeID, regionName, 1); | 433 | List<GridRegion> regions = m_GridService.GetRegionsByName(scopeID, regionName, 1); |
418 | if ((regions == null) || (regions != null && regions.Count == 0)) | 434 | if ((regions == null) || (regions != null && regions.Count == 0)) |
419 | { | 435 | { |
420 | m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}. Trying defaults.", startLocation, regionName); | 436 | m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}. Trying defaults.", startLocation, regionName); |
421 | regions = m_GridService.GetDefaultRegions(UUID.Zero); | 437 | regions = m_GridService.GetDefaultRegions(scopeID); |
422 | if (regions != null && regions.Count > 0) | 438 | if (regions != null && regions.Count > 0) |
423 | { | 439 | { |
424 | where = "safe"; | 440 | where = "safe"; |
@@ -461,7 +477,7 @@ namespace OpenSim.Services.LLLoginService | |||
461 | } | 477 | } |
462 | else | 478 | else |
463 | { | 479 | { |
464 | List<GridRegion> defaults = m_GridService.GetDefaultRegions(account.ScopeID); | 480 | List<GridRegion> defaults = m_GridService.GetDefaultRegions(scopeID); |
465 | if (defaults != null && defaults.Count > 0) | 481 | if (defaults != null && defaults.Count > 0) |
466 | { | 482 | { |
467 | where = "safe"; | 483 | where = "safe"; |