diff options
Diffstat (limited to 'OpenSim/Services/LLLoginService')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginResponse.cs | 22 | ||||
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 125 | ||||
-rw-r--r-- | OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs | 2 |
3 files changed, 120 insertions, 29 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index da351b9..92d93ee 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs | |||
@@ -197,6 +197,7 @@ namespace OpenSim.Services.LLLoginService | |||
197 | 197 | ||
198 | private string currency; | 198 | private string currency; |
199 | private string classifiedFee; | 199 | private string classifiedFee; |
200 | private int maxAgentGroups; | ||
200 | 201 | ||
201 | static LLLoginResponse() | 202 | static LLLoginResponse() |
202 | { | 203 | { |
@@ -233,8 +234,13 @@ namespace OpenSim.Services.LLLoginService | |||
233 | public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, | 234 | public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, |
234 | GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, | 235 | GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, |
235 | string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, | 236 | string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, |
237 | <<<<<<< HEAD | ||
238 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency, | ||
239 | string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee, int maxAgentGroups) | ||
240 | ======= | ||
236 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, | 241 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, |
237 | string DSTZone, string destinationsURL, string avatarsURL, UUID realID, string classifiedFee) | 242 | string DSTZone, string destinationsURL, string avatarsURL, UUID realID, string classifiedFee) |
243 | >>>>>>> avn/ubitvar | ||
238 | : this() | 244 | : this() |
239 | { | 245 | { |
240 | FillOutInventoryData(invSkel, libService); | 246 | FillOutInventoryData(invSkel, libService); |
@@ -260,12 +266,13 @@ namespace OpenSim.Services.LLLoginService | |||
260 | SearchURL = searchURL; | 266 | SearchURL = searchURL; |
261 | Currency = currency; | 267 | Currency = currency; |
262 | ClassifiedFee = classifiedFee; | 268 | ClassifiedFee = classifiedFee; |
269 | MaxAgentGroups = maxAgentGroups; | ||
263 | 270 | ||
264 | FillOutHomeData(pinfo, home); | 271 | FillOutHomeData(pinfo, home); |
265 | LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); | 272 | LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); |
266 | 273 | ||
267 | FillOutRegionData(destination); | 274 | FillOutRegionData(destination); |
268 | // m_log.DebugFormat("[LOGIN RESPONSE] LLLoginResponse create. sizeX=<{0},{1}>", RegionSizeX, RegionSizeY); | 275 | m_log.DebugFormat("[LOGIN RESPONSE] LLLoginResponse create. sizeX={0}, sizeY={1}", RegionSizeX, RegionSizeY); |
269 | 276 | ||
270 | FillOutSeedCap(aCircuit, destination, clientIP); | 277 | FillOutSeedCap(aCircuit, destination, clientIP); |
271 | 278 | ||
@@ -492,6 +499,7 @@ namespace OpenSim.Services.LLLoginService | |||
492 | 499 | ||
493 | currency = String.Empty; | 500 | currency = String.Empty; |
494 | ClassifiedFee = "0"; | 501 | ClassifiedFee = "0"; |
502 | MaxAgentGroups = 42; | ||
495 | } | 503 | } |
496 | 504 | ||
497 | 505 | ||
@@ -552,12 +560,13 @@ namespace OpenSim.Services.LLLoginService | |||
552 | responseData["seed_capability"] = seedCapability; | 560 | responseData["seed_capability"] = seedCapability; |
553 | responseData["home"] = home; | 561 | responseData["home"] = home; |
554 | responseData["look_at"] = lookAt; | 562 | responseData["look_at"] = lookAt; |
563 | responseData["max-agent-groups"] = MaxAgentGroups; | ||
555 | responseData["message"] = welcomeMessage; | 564 | responseData["message"] = welcomeMessage; |
556 | responseData["region_x"] = (Int32)(RegionX); | 565 | responseData["region_x"] = (Int32)(RegionX); |
557 | responseData["region_y"] = (Int32)(RegionY); | 566 | responseData["region_y"] = (Int32)(RegionY); |
558 | responseData["region_size_x"] = (Int32)RegionSizeX; | 567 | responseData["region_size_x"] = (Int32)RegionSizeX; |
559 | responseData["region_size_y"] = (Int32)RegionSizeY; | 568 | responseData["region_size_y"] = (Int32)RegionSizeY; |
560 | // m_log.DebugFormat("[LOGIN RESPONSE] returning sizeX=<{0},{1}>", RegionSizeX, RegionSizeY); | 569 | m_log.DebugFormat("[LOGIN RESPONSE] returning sizeX={0}, sizeY={1}", RegionSizeX, RegionSizeY); |
561 | 570 | ||
562 | if (searchURL != String.Empty) | 571 | if (searchURL != String.Empty) |
563 | responseData["search"] = searchURL; | 572 | responseData["search"] = searchURL; |
@@ -680,6 +689,7 @@ namespace OpenSim.Services.LLLoginService | |||
680 | map["seed_capability"] = OSD.FromString(seedCapability); | 689 | map["seed_capability"] = OSD.FromString(seedCapability); |
681 | map["home"] = OSD.FromString(home); | 690 | map["home"] = OSD.FromString(home); |
682 | map["look_at"] = OSD.FromString(lookAt); | 691 | map["look_at"] = OSD.FromString(lookAt); |
692 | map["max-agent-groups"] = OSD.FromInteger(MaxAgentGroups); | ||
683 | map["message"] = OSD.FromString(welcomeMessage); | 693 | map["message"] = OSD.FromString(welcomeMessage); |
684 | map["region_x"] = OSD.FromInteger(RegionX); | 694 | map["region_x"] = OSD.FromInteger(RegionX); |
685 | map["region_y"] = OSD.FromInteger(RegionY); | 695 | map["region_y"] = OSD.FromInteger(RegionY); |
@@ -794,7 +804,7 @@ namespace OpenSim.Services.LLLoginService | |||
794 | Hashtable TempHash; | 804 | Hashtable TempHash; |
795 | foreach (InventoryFolderBase InvFolder in folders) | 805 | foreach (InventoryFolderBase InvFolder in folders) |
796 | { | 806 | { |
797 | if (InvFolder.ParentID == UUID.Zero && InvFolder.Name == "My Inventory") | 807 | if (InvFolder.ParentID == UUID.Zero && InvFolder.Name == InventoryFolderBase.ROOT_FOLDER_NAME) |
798 | { | 808 | { |
799 | rootID = InvFolder.ID; | 809 | rootID = InvFolder.ID; |
800 | } | 810 | } |
@@ -1119,6 +1129,12 @@ namespace OpenSim.Services.LLLoginService | |||
1119 | set { classifiedFee = value; } | 1129 | set { classifiedFee = value; } |
1120 | } | 1130 | } |
1121 | 1131 | ||
1132 | public int MaxAgentGroups | ||
1133 | { | ||
1134 | get { return maxAgentGroups; } | ||
1135 | set { maxAgentGroups = value; } | ||
1136 | } | ||
1137 | |||
1122 | public string DestinationsURL | 1138 | public string DestinationsURL |
1123 | { | 1139 | { |
1124 | get; set; | 1140 | get; set; |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index b009e64..ba69e95 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -58,6 +58,7 @@ namespace OpenSim.Services.LLLoginService | |||
58 | protected IGridUserService m_GridUserService; | 58 | protected IGridUserService m_GridUserService; |
59 | protected IAuthenticationService m_AuthenticationService; | 59 | protected IAuthenticationService m_AuthenticationService; |
60 | protected IInventoryService m_InventoryService; | 60 | protected IInventoryService m_InventoryService; |
61 | protected IInventoryService m_HGInventoryService; | ||
61 | protected IGridService m_GridService; | 62 | protected IGridService m_GridService; |
62 | protected IPresenceService m_PresenceService; | 63 | protected IPresenceService m_PresenceService; |
63 | protected ISimulationService m_LocalSimulationService; | 64 | protected ISimulationService m_LocalSimulationService; |
@@ -76,17 +77,15 @@ namespace OpenSim.Services.LLLoginService | |||
76 | protected string m_GatekeeperURL; | 77 | protected string m_GatekeeperURL; |
77 | protected bool m_AllowRemoteSetLoginLevel; | 78 | protected bool m_AllowRemoteSetLoginLevel; |
78 | protected string m_MapTileURL; | 79 | protected string m_MapTileURL; |
79 | protected string m_ProfileURL; | ||
80 | protected string m_OpenIDURL; | ||
81 | protected string m_SearchURL; | 80 | protected string m_SearchURL; |
82 | protected string m_Currency; | 81 | protected string m_Currency; |
83 | protected string m_ClassifiedFee; | 82 | protected string m_ClassifiedFee; |
83 | protected int m_MaxAgentGroups; | ||
84 | protected string m_DestinationGuide; | 84 | protected string m_DestinationGuide; |
85 | protected string m_AvatarPicker; | 85 | protected string m_AvatarPicker; |
86 | |||
87 | protected string m_AllowedClients; | 86 | protected string m_AllowedClients; |
88 | protected string m_DeniedClients; | 87 | protected string m_DeniedClients; |
89 | 88 | protected string m_MessageUrl; | |
90 | protected string m_DSTZone; | 89 | protected string m_DSTZone; |
91 | 90 | ||
92 | IConfig m_LoginServerConfig; | 91 | IConfig m_LoginServerConfig; |
@@ -118,8 +117,6 @@ namespace OpenSim.Services.LLLoginService | |||
118 | m_GatekeeperURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", | 117 | m_GatekeeperURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
119 | new string[] { "Startup", "Hypergrid", "LoginService" }, String.Empty); | 118 | new string[] { "Startup", "Hypergrid", "LoginService" }, String.Empty); |
120 | m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); | 119 | m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); |
121 | m_ProfileURL = m_LoginServerConfig.GetString("ProfileServerURL", string.Empty); | ||
122 | m_OpenIDURL = m_LoginServerConfig.GetString("OpenIDServerURL", String.Empty); | ||
123 | m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty); | 120 | m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty); |
124 | m_Currency = m_LoginServerConfig.GetString("Currency", string.Empty); | 121 | m_Currency = m_LoginServerConfig.GetString("Currency", string.Empty); |
125 | m_ClassifiedFee = m_LoginServerConfig.GetString("ClassifiedFee", string.Empty); | 122 | m_ClassifiedFee = m_LoginServerConfig.GetString("ClassifiedFee", string.Empty); |
@@ -128,9 +125,14 @@ namespace OpenSim.Services.LLLoginService | |||
128 | 125 | ||
129 | m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty); | 126 | m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty); |
130 | m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty); | 127 | m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty); |
131 | 128 | m_MessageUrl = m_LoginServerConfig.GetString("MessageUrl", string.Empty); | |
132 | m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time"); | 129 | m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time"); |
133 | 130 | ||
131 | IConfig groupConfig = config.Configs["Groups"]; | ||
132 | if (groupConfig != null) | ||
133 | m_MaxAgentGroups = groupConfig.GetInt("MaxAgentGroups", 42); | ||
134 | |||
135 | |||
134 | // Clean up some of these vars | 136 | // Clean up some of these vars |
135 | if (m_MapTileURL != String.Empty) | 137 | if (m_MapTileURL != String.Empty) |
136 | { | 138 | { |
@@ -166,6 +168,15 @@ namespace OpenSim.Services.LLLoginService | |||
166 | if (agentService != string.Empty) | 168 | if (agentService != string.Empty) |
167 | m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(agentService, args); | 169 | m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(agentService, args); |
168 | 170 | ||
171 | // Get the Hypergrid inventory service (exists only if Hypergrid is enabled) | ||
172 | string hgInvServicePlugin = m_LoginServerConfig.GetString("HGInventoryServicePlugin", String.Empty); | ||
173 | if (hgInvServicePlugin != string.Empty) | ||
174 | { | ||
175 | string hgInvServiceArg = m_LoginServerConfig.GetString("HGInventoryServiceConstructorArg", String.Empty); | ||
176 | Object[] args2 = new Object[] { config, hgInvServiceArg }; | ||
177 | m_HGInventoryService = ServerUtils.LoadPlugin<IInventoryService>(hgInvServicePlugin, args2); | ||
178 | } | ||
179 | |||
169 | // | 180 | // |
170 | // deal with the services given as argument | 181 | // deal with the services given as argument |
171 | // | 182 | // |
@@ -251,8 +262,12 @@ namespace OpenSim.Services.LLLoginService | |||
251 | { | 262 | { |
252 | bool success = false; | 263 | bool success = false; |
253 | UUID session = UUID.Random(); | 264 | UUID session = UUID.Random(); |
265 | <<<<<<< HEAD | ||
266 | string processedMessage; | ||
267 | ======= | ||
254 | if (clientVersion.Contains("Radegast")) | 268 | if (clientVersion.Contains("Radegast")) |
255 | LibOMVclient = false; | 269 | LibOMVclient = false; |
270 | >>>>>>> avn/ubitvar | ||
256 | 271 | ||
257 | 272 | ||
258 | m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ", | 273 | m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ", |
@@ -361,6 +376,13 @@ namespace OpenSim.Services.LLLoginService | |||
361 | return LLFailedLoginResponse.InventoryProblem; | 376 | return LLFailedLoginResponse.InventoryProblem; |
362 | } | 377 | } |
363 | 378 | ||
379 | if (m_HGInventoryService != null) | ||
380 | { | ||
381 | // Give the Suitcase service a chance to create the suitcase folder. | ||
382 | // (If we're not using the Suitcase inventory service then this won't do anything.) | ||
383 | m_HGInventoryService.GetRootFolder(account.PrincipalID); | ||
384 | } | ||
385 | |||
364 | List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID); | 386 | List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID); |
365 | if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0))) | 387 | if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0))) |
366 | { | 388 | { |
@@ -395,11 +417,30 @@ namespace OpenSim.Services.LLLoginService | |||
395 | // | 417 | // |
396 | GridRegion home = null; | 418 | GridRegion home = null; |
397 | GridUserInfo guinfo = m_GridUserService.LoggedIn(account.PrincipalID.ToString()); | 419 | GridUserInfo guinfo = m_GridUserService.LoggedIn(account.PrincipalID.ToString()); |
398 | if (guinfo != null && (guinfo.HomeRegionID != UUID.Zero) && m_GridService != null) | 420 | |
421 | // We are only going to complain about no home if the user actually tries to login there, to avoid | ||
422 | // spamming the console. | ||
423 | if (guinfo != null) | ||
399 | { | 424 | { |
400 | home = m_GridService.GetRegionByUUID(scopeID, guinfo.HomeRegionID); | 425 | if (guinfo.HomeRegionID == UUID.Zero && startLocation == "home") |
426 | { | ||
427 | m_log.WarnFormat( | ||
428 | "[LLOGIN SERVICE]: User {0} tried to login to a 'home' start location but they have none set", | ||
429 | account.Name); | ||
430 | } | ||
431 | else if (m_GridService != null) | ||
432 | { | ||
433 | home = m_GridService.GetRegionByUUID(scopeID, guinfo.HomeRegionID); | ||
434 | |||
435 | if (home == null && startLocation == "home") | ||
436 | { | ||
437 | m_log.WarnFormat( | ||
438 | "[LLOGIN SERVICE]: User {0} tried to login to a 'home' start location with ID {1} but this was not found.", | ||
439 | account.Name, guinfo.HomeRegionID); | ||
440 | } | ||
441 | } | ||
401 | } | 442 | } |
402 | if (guinfo == null) | 443 | else |
403 | { | 444 | { |
404 | // something went wrong, make something up, so that we don't have to test this anywhere else | 445 | // something went wrong, make something up, so that we don't have to test this anywhere else |
405 | m_log.DebugFormat("{0} Failed to fetch GridUserInfo. Creating empty GridUserInfo as home", LogHeader); | 446 | m_log.DebugFormat("{0} Failed to fetch GridUserInfo. Creating empty GridUserInfo as home", LogHeader); |
@@ -469,17 +510,36 @@ namespace OpenSim.Services.LLLoginService | |||
469 | // | 510 | // |
470 | // Finally, fill out the response and return it | 511 | // Finally, fill out the response and return it |
471 | // | 512 | // |
513 | if (m_MessageUrl != String.Empty) | ||
514 | { | ||
515 | WebClient client = new WebClient(); | ||
516 | processedMessage = client.DownloadString(m_MessageUrl); | ||
517 | } | ||
518 | else | ||
519 | { | ||
520 | processedMessage = m_WelcomeMessage; | ||
521 | } | ||
522 | processedMessage = processedMessage.Replace("\\n", "\n").Replace("<USERNAME>", firstName + " " + lastName); | ||
523 | |||
472 | LLLoginResponse response | 524 | LLLoginResponse response |
525 | <<<<<<< HEAD | ||
526 | = new LLLoginResponse( | ||
527 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, | ||
528 | where, startLocation, position, lookAt, gestures, processedMessage, home, clientIP, | ||
529 | m_MapTileURL, m_SearchURL, m_Currency, m_DSTZone, | ||
530 | m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee, m_MaxAgentGroups); | ||
531 | ======= | ||
473 | = new LLLoginResponse( | 532 | = new LLLoginResponse( |
474 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, | 533 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, |
475 | where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, | 534 | where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, |
476 | m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, | 535 | m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, |
477 | m_DestinationGuide, m_AvatarPicker, realID, m_ClassifiedFee); | 536 | m_DestinationGuide, m_AvatarPicker, realID, m_ClassifiedFee); |
537 | >>>>>>> avn/ubitvar | ||
478 | 538 | ||
479 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); | 539 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); |
480 | 540 | ||
481 | return response; | 541 | return response; |
482 | } | 542 | } |
483 | catch (Exception e) | 543 | catch (Exception e) |
484 | { | 544 | { |
485 | m_log.WarnFormat("[LLOGIN SERVICE]: Exception processing login for {0} {1}: {2} {3}", firstName, lastName, e.ToString(), e.StackTrace); | 545 | m_log.WarnFormat("[LLOGIN SERVICE]: Exception processing login for {0} {1}: {2} {3}", firstName, lastName, e.ToString(), e.StackTrace); |
@@ -520,10 +580,6 @@ namespace OpenSim.Services.LLLoginService | |||
520 | 580 | ||
521 | if (home == null) | 581 | if (home == null) |
522 | { | 582 | { |
523 | m_log.WarnFormat( | ||
524 | "[LLOGIN SERVICE]: User {0} {1} tried to login to a 'home' start location but they have none set", | ||
525 | account.FirstName, account.LastName); | ||
526 | |||
527 | tryDefaults = true; | 583 | tryDefaults = true; |
528 | } | 584 | } |
529 | else | 585 | else |
@@ -598,7 +654,7 @@ namespace OpenSim.Services.LLLoginService | |||
598 | // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 | 654 | // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 |
599 | where = "url"; | 655 | where = "url"; |
600 | GridRegion region = null; | 656 | GridRegion region = null; |
601 | Regex reURI = new Regex(@"^uri:(?<region>[^&]+)&(?<x>\d+)&(?<y>\d+)&(?<z>\d+)$"); | 657 | Regex reURI = new Regex(@"^uri:(?<region>[^&]+)&(?<x>\d+[.]?\d*)&(?<y>\d+[.]?\d*)&(?<z>\d+[.]?\d*)$"); |
602 | Match uriMatch = reURI.Match(startLocation); | 658 | Match uriMatch = reURI.Match(startLocation); |
603 | if (uriMatch == null) | 659 | if (uriMatch == null) |
604 | { | 660 | { |
@@ -667,8 +723,7 @@ namespace OpenSim.Services.LLLoginService | |||
667 | if (parts.Length > 1) | 723 | if (parts.Length > 1) |
668 | UInt32.TryParse(parts[1], out port); | 724 | UInt32.TryParse(parts[1], out port); |
669 | 725 | ||
670 | // GridRegion region = FindForeignRegion(domainName, port, regionName, out gatekeeper); | 726 | region = FindForeignRegion(domainName, port, regionName, account, out gatekeeper); |
671 | region = FindForeignRegion(domainName, port, regionName, out gatekeeper); | ||
672 | return region; | 727 | return region; |
673 | } | 728 | } |
674 | } | 729 | } |
@@ -717,7 +772,7 @@ namespace OpenSim.Services.LLLoginService | |||
717 | return null; | 772 | return null; |
718 | } | 773 | } |
719 | 774 | ||
720 | private GridRegion FindForeignRegion(string domainName, uint port, string regionName, out GridRegion gatekeeper) | 775 | private GridRegion FindForeignRegion(string domainName, uint port, string regionName, UserAccount account, out GridRegion gatekeeper) |
721 | { | 776 | { |
722 | m_log.Debug("[LLLOGIN SERVICE]: attempting to findforeignregion " + domainName + ":" + port.ToString() + ":" + regionName); | 777 | m_log.Debug("[LLLOGIN SERVICE]: attempting to findforeignregion " + domainName + ":" + port.ToString() + ":" + regionName); |
723 | gatekeeper = new GridRegion(); | 778 | gatekeeper = new GridRegion(); |
@@ -729,9 +784,14 @@ namespace OpenSim.Services.LLLoginService | |||
729 | UUID regionID; | 784 | UUID regionID; |
730 | ulong handle; | 785 | ulong handle; |
731 | string imageURL = string.Empty, reason = string.Empty; | 786 | string imageURL = string.Empty, reason = string.Empty; |
787 | string message; | ||
732 | if (m_GatekeeperConnector.LinkRegion(gatekeeper, out regionID, out handle, out domainName, out imageURL, out reason)) | 788 | if (m_GatekeeperConnector.LinkRegion(gatekeeper, out regionID, out handle, out domainName, out imageURL, out reason)) |
733 | { | 789 | { |
734 | GridRegion destination = m_GatekeeperConnector.GetHyperlinkRegion(gatekeeper, regionID); | 790 | string homeURI = null; |
791 | if (account.ServiceURLs != null && account.ServiceURLs.ContainsKey("HomeURI")) | ||
792 | homeURI = (string)account.ServiceURLs["HomeURI"]; | ||
793 | |||
794 | GridRegion destination = m_GatekeeperConnector.GetHyperlinkRegion(gatekeeper, regionID, account.PrincipalID, homeURI, out message); | ||
735 | return destination; | 795 | return destination; |
736 | } | 796 | } |
737 | 797 | ||
@@ -924,6 +984,13 @@ namespace OpenSim.Services.LLLoginService | |||
924 | m_log.DebugFormat("[LLLOGIN SERVICE]: found new key {0} {1}", keyName, aCircuit.ServiceURLs[keyName]); | 984 | m_log.DebugFormat("[LLLOGIN SERVICE]: found new key {0} {1}", keyName, aCircuit.ServiceURLs[keyName]); |
925 | } | 985 | } |
926 | 986 | ||
987 | if (!account.ServiceURLs.ContainsKey("GatekeeperURI") && !string.IsNullOrEmpty(m_GatekeeperURL)) | ||
988 | { | ||
989 | m_log.DebugFormat("[LLLOGIN SERVICE]: adding gatekeeper uri {0}", m_GatekeeperURL); | ||
990 | account.ServiceURLs["GatekeeperURI"] = m_GatekeeperURL; | ||
991 | newUrls = true; | ||
992 | } | ||
993 | |||
927 | // The grid operator decided to override the defaults in the | 994 | // The grid operator decided to override the defaults in the |
928 | // [LoginService] configuration. Let's store the correct ones. | 995 | // [LoginService] configuration. Let's store the correct ones. |
929 | if (newUrls) | 996 | if (newUrls) |
@@ -934,13 +1001,21 @@ namespace OpenSim.Services.LLLoginService | |||
934 | 1001 | ||
935 | private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) | 1002 | private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) |
936 | { | 1003 | { |
937 | return simConnector.CreateAgent(region, aCircuit, (uint)flags, out reason); | 1004 | string version; |
1005 | |||
1006 | if ( | ||
1007 | !simConnector.QueryAccess( | ||
1008 | region, aCircuit.AgentID, null, true, aCircuit.startpos, "SIMULATION/0.3", new List<UUID>(), out version, out reason)) | ||
1009 | return false; | ||
1010 | |||
1011 | return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); | ||
938 | } | 1012 | } |
939 | 1013 | ||
940 | private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) | 1014 | private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) |
941 | { | 1015 | { |
942 | m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName); | 1016 | m_log.Debug("[LLOGIN SERVICE]: Launching agent at " + destination.RegionName); |
943 | if (m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, true, out reason)) | 1017 | |
1018 | if (m_UserAgentService.LoginAgentToGrid(null, aCircuit, gatekeeper, destination, true, out reason)) | ||
944 | return true; | 1019 | return true; |
945 | return false; | 1020 | return false; |
946 | } | 1021 | } |
diff --git a/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs b/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs index c373351..4dc492a 100644 --- a/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.8.0.*")] | 32 | [assembly: AssemblyVersion("0.8.2.*")] |
33 | 33 | ||