diff options
author | Melanie | 2010-12-12 01:20:46 +0000 |
---|---|---|
committer | Melanie | 2010-12-12 01:20:46 +0000 |
commit | 8aa63093b118f257eff87c003e668249c34f5162 (patch) | |
tree | a5ea5448482d899729c29079ed0dab8394bb9be4 /OpenSim/Services | |
parent | Fix border fence for physicals. Fix llRotLookAt() for Vehicles. (diff) | |
parent | Revert "Another stab at mantis #5256" (diff) | |
download | opensim-SC_OLD-8aa63093b118f257eff87c003e668249c34f5162.zip opensim-SC_OLD-8aa63093b118f257eff87c003e668249c34f5162.tar.gz opensim-SC_OLD-8aa63093b118f257eff87c003e668249c34f5162.tar.bz2 opensim-SC_OLD-8aa63093b118f257eff87c003e668249c34f5162.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Services')
6 files changed, 53 insertions, 68 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 0c41935..7ddcfa6 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -104,7 +104,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
104 | return false; | 104 | return false; |
105 | } | 105 | } |
106 | 106 | ||
107 | string uri = m_ServerURL + "/homeagent/" + aCircuit.AgentID + "/"; | 107 | string uri = m_ServerURL + "homeagent/" + aCircuit.AgentID + "/"; |
108 | 108 | ||
109 | Console.WriteLine(" >>> LoginAgentToGrid <<< " + uri); | 109 | Console.WriteLine(" >>> LoginAgentToGrid <<< " + uri); |
110 | 110 | ||
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index c2f43ca..4382005 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -235,6 +235,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
235 | m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); | 235 | m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); |
236 | return null; | 236 | return null; |
237 | } | 237 | } |
238 | |||
238 | // Add the input arguments | 239 | // Add the input arguments |
239 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); | 240 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); |
240 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); | 241 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index d5d0195..9863ba0 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.Linq; | 31 | using System.Linq; |
31 | using System.Net; | 32 | using System.Net; |
@@ -215,7 +216,9 @@ namespace OpenSim.Services.GridService | |||
215 | 216 | ||
216 | public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, string serverURI, UUID ownerID, out GridRegion regInfo, out string reason) | 217 | public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, string serverURI, UUID ownerID, out GridRegion regInfo, out string reason) |
217 | { | 218 | { |
218 | m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, remoteRegionName, xloc, yloc); | 219 | m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}, in {2}-{3}", |
220 | ((serverURI == null) ? (externalHostName + ":" + externalPort) : serverURI), | ||
221 | remoteRegionName, xloc / Constants.RegionSize, yloc / Constants.RegionSize); | ||
219 | 222 | ||
220 | reason = string.Empty; | 223 | reason = string.Empty; |
221 | regInfo = new GridRegion(); | 224 | regInfo = new GridRegion(); |
@@ -242,7 +245,9 @@ namespace OpenSim.Services.GridService | |||
242 | GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY); | 245 | GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY); |
243 | if (region != null) | 246 | if (region != null) |
244 | { | 247 | { |
245 | m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}", regInfo.RegionLocX, regInfo.RegionLocY, region.RegionName, region.RegionID); | 248 | m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}", |
249 | regInfo.RegionLocX / Constants.RegionSize, regInfo.RegionLocY / Constants.RegionSize, | ||
250 | region.RegionName, region.RegionID); | ||
246 | reason = "Coordinates are already in use"; | 251 | reason = "Coordinates are already in use"; |
247 | return false; | 252 | return false; |
248 | } | 253 | } |
@@ -271,7 +276,8 @@ namespace OpenSim.Services.GridService | |||
271 | region = m_GridService.GetRegionByUUID(scopeID, regionID); | 276 | region = m_GridService.GetRegionByUUID(scopeID, regionID); |
272 | if (region != null) | 277 | if (region != null) |
273 | { | 278 | { |
274 | m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", region.RegionLocX / Constants.RegionSize, region.RegionLocY / Constants.RegionSize); | 279 | m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", |
280 | region.RegionLocX / Constants.RegionSize, region.RegionLocY / Constants.RegionSize); | ||
275 | regInfo = region; | 281 | regInfo = region; |
276 | return true; | 282 | return true; |
277 | } | 283 | } |
@@ -423,15 +429,14 @@ namespace OpenSim.Services.GridService | |||
423 | return; | 429 | return; |
424 | } | 430 | } |
425 | 431 | ||
426 | MainConsole.Instance.Output("Region Name Region UUID"); | 432 | MainConsole.Instance.Output("Region Name"); |
427 | MainConsole.Instance.Output("Location URI"); | 433 | MainConsole.Instance.Output("Location Region UUID"); |
428 | MainConsole.Instance.Output("-------------------------------------------------------------------------------"); | 434 | MainConsole.Instance.Output(new string('-', 72)); |
429 | foreach (RegionData r in regions) | 435 | foreach (RegionData r in regions) |
430 | { | 436 | { |
431 | MainConsole.Instance.Output(String.Format("{0,-39} {1}\n{2,-39} {3}\n", | 437 | MainConsole.Instance.Output(String.Format("{0}\n{2,-32} {1}\n", |
432 | r.RegionName, r.RegionID, | 438 | r.RegionName, r.RegionID, String.Format("{0},{1} ({2},{3})", r.posX, r.posY, |
433 | String.Format("{0},{1} ({2},{3})", r.posX, r.posY, r.posX / 256, r.posY / 256), | 439 | r.posX / Constants.RegionSize, r.posY / Constants.RegionSize))); |
434 | "http://" + r.Data["serverIP"].ToString() + ":" + r.Data["serverHttpPort"].ToString())); | ||
435 | } | 440 | } |
436 | return; | 441 | return; |
437 | } | 442 | } |
@@ -459,11 +464,14 @@ namespace OpenSim.Services.GridService | |||
459 | xloc = Convert.ToInt32(cmdparams[0]) * (int)Constants.RegionSize; | 464 | xloc = Convert.ToInt32(cmdparams[0]) * (int)Constants.RegionSize; |
460 | yloc = Convert.ToInt32(cmdparams[1]) * (int)Constants.RegionSize; | 465 | yloc = Convert.ToInt32(cmdparams[1]) * (int)Constants.RegionSize; |
461 | serverURI = cmdparams[2]; | 466 | serverURI = cmdparams[2]; |
462 | if (cmdparams.Length == 4) | 467 | if (cmdparams.Length > 3) |
463 | remoteName = cmdparams[3]; | 468 | remoteName = string.Join(" ", cmdparams, 3, cmdparams.Length - 3); |
464 | string reason = string.Empty; | 469 | string reason = string.Empty; |
465 | GridRegion regInfo; | 470 | GridRegion regInfo; |
466 | TryCreateLink(UUID.Zero, xloc, yloc, remoteName, 0, null, serverURI, UUID.Zero, out regInfo, out reason); | 471 | if (TryCreateLink(UUID.Zero, xloc, yloc, remoteName, 0, null, serverURI, UUID.Zero, out regInfo, out reason)) |
472 | MainConsole.Instance.Output("Hyperlink established"); | ||
473 | else | ||
474 | MainConsole.Instance.Output("Failed to link region: " + reason); | ||
467 | } | 475 | } |
468 | 476 | ||
469 | private void RunHGCommand(string command, string[] cmdparams) | 477 | private void RunHGCommand(string command, string[] cmdparams) |
@@ -488,18 +496,6 @@ namespace OpenSim.Services.GridService | |||
488 | } | 496 | } |
489 | else if (command.Equals("link-region")) | 497 | else if (command.Equals("link-region")) |
490 | { | 498 | { |
491 | if (cmdparams.Length > 0 && cmdparams.Length < 5) | ||
492 | { | ||
493 | RunLinkRegionCommand(cmdparams); | ||
494 | } | ||
495 | else | ||
496 | { | ||
497 | LinkRegionCmdUsage(); | ||
498 | } | ||
499 | return; | ||
500 | } | ||
501 | else if (command.Equals("link-region")) | ||
502 | { | ||
503 | if (cmdparams.Length < 3) | 499 | if (cmdparams.Length < 3) |
504 | { | 500 | { |
505 | if ((cmdparams.Length == 1) || (cmdparams.Length == 2)) | 501 | if ((cmdparams.Length == 1) || (cmdparams.Length == 2)) |
@@ -514,40 +510,24 @@ namespace OpenSim.Services.GridService | |||
514 | } | 510 | } |
515 | 511 | ||
516 | //this should be the prefererred way of setting up hg links now | 512 | //this should be the prefererred way of setting up hg links now |
517 | if ( cmdparams[2].StartsWith("http") && ( cmdparams.Length >= 3 && cmdparams.Length <= 5 )) { | 513 | if (cmdparams[2].StartsWith("http")) |
514 | { | ||
518 | RunLinkRegionCommand(cmdparams); | 515 | RunLinkRegionCommand(cmdparams); |
519 | } | 516 | } |
520 | else if (cmdparams[2].Contains(":")) | 517 | else if (cmdparams[2].Contains(":")) |
521 | { | 518 | { |
522 | // New format | 519 | // New format |
523 | int xloc, yloc; | 520 | string[] parts = cmdparams[2].Split(':'); |
524 | string mapName; | 521 | if (parts.Length > 2) |
525 | try | ||
526 | { | ||
527 | xloc = Convert.ToInt32(cmdparams[0]); | ||
528 | yloc = Convert.ToInt32(cmdparams[1]); | ||
529 | mapName = cmdparams[2]; | ||
530 | if (cmdparams.Length > 3) | ||
531 | for (int i = 3; i < cmdparams.Length; i++) | ||
532 | mapName += " " + cmdparams[i]; | ||
533 | |||
534 | //m_log.Info(">> MapName: " + mapName); | ||
535 | } | ||
536 | catch (Exception e) | ||
537 | { | 522 | { |
538 | MainConsole.Instance.Output("[HGrid] Wrong format for link-region command: " + e.Message); | 523 | // Insert remote region name |
539 | LinkRegionCmdUsage(); | 524 | ArrayList parameters = new ArrayList(cmdparams); |
540 | return; | 525 | parameters.Insert(3, parts[2]); |
526 | cmdparams = (string[])parameters.ToArray(typeof(string)); | ||
541 | } | 527 | } |
528 | cmdparams[2] = "http://" + parts[0] + ':' + parts[1]; | ||
542 | 529 | ||
543 | // Convert cell coordinates given by the user to meters | 530 | RunLinkRegionCommand(cmdparams); |
544 | xloc = xloc * (int)Constants.RegionSize; | ||
545 | yloc = yloc * (int)Constants.RegionSize; | ||
546 | string reason = string.Empty; | ||
547 | if (TryLinkRegionToCoords(UUID.Zero, mapName, xloc, yloc, out reason) == null) | ||
548 | MainConsole.Instance.Output("Failed to link region: " + reason); | ||
549 | else | ||
550 | MainConsole.Instance.Output("Hyperlink established"); | ||
551 | } | 531 | } |
552 | else | 532 | else |
553 | { | 533 | { |
@@ -556,16 +536,12 @@ namespace OpenSim.Services.GridService | |||
556 | int xloc, yloc; | 536 | int xloc, yloc; |
557 | uint externalPort; | 537 | uint externalPort; |
558 | string externalHostName; | 538 | string externalHostName; |
559 | string serverURI; | ||
560 | try | 539 | try |
561 | { | 540 | { |
562 | xloc = Convert.ToInt32(cmdparams[0]); | 541 | xloc = Convert.ToInt32(cmdparams[0]); |
563 | yloc = Convert.ToInt32(cmdparams[1]); | 542 | yloc = Convert.ToInt32(cmdparams[1]); |
564 | externalPort = Convert.ToUInt32(cmdparams[3]); | 543 | externalPort = Convert.ToUInt32(cmdparams[3]); |
565 | externalHostName = cmdparams[2]; | 544 | externalHostName = cmdparams[2]; |
566 | if ( cmdparams.Length == 4 ) { | ||
567 | |||
568 | } | ||
569 | //internalPort = Convert.ToUInt32(cmdparams[4]); | 545 | //internalPort = Convert.ToUInt32(cmdparams[4]); |
570 | //remotingPort = Convert.ToUInt32(cmdparams[5]); | 546 | //remotingPort = Convert.ToUInt32(cmdparams[5]); |
571 | } | 547 | } |
@@ -582,27 +558,30 @@ namespace OpenSim.Services.GridService | |||
582 | string reason = string.Empty; | 558 | string reason = string.Empty; |
583 | if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) | 559 | if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) |
584 | { | 560 | { |
585 | if (cmdparams.Length >= 5) | 561 | // What is this? The GridRegion instance will be discarded anyway, |
586 | { | 562 | // which effectively ignores any local name given with the command. |
587 | regInfo.RegionName = ""; | 563 | //if (cmdparams.Length >= 5) |
588 | for (int i = 4; i < cmdparams.Length; i++) | 564 | //{ |
589 | regInfo.RegionName += cmdparams[i] + " "; | 565 | // regInfo.RegionName = ""; |
590 | } | 566 | // for (int i = 4; i < cmdparams.Length; i++) |
567 | // regInfo.RegionName += cmdparams[i] + " "; | ||
568 | //} | ||
591 | } | 569 | } |
592 | } | 570 | } |
593 | return; | 571 | return; |
594 | } | 572 | } |
595 | else if (command.Equals("unlink-region")) | 573 | else if (command.Equals("unlink-region")) |
596 | { | 574 | { |
597 | if (cmdparams.Length < 1 || cmdparams.Length > 1) | 575 | if (cmdparams.Length < 1) |
598 | { | 576 | { |
599 | UnlinkRegionCmdUsage(); | 577 | UnlinkRegionCmdUsage(); |
600 | return; | 578 | return; |
601 | } | 579 | } |
602 | if (TryUnlinkRegion(cmdparams[0])) | 580 | string region = string.Join(" ", cmdparams); |
603 | MainConsole.Instance.Output("Successfully unlinked " + cmdparams[0]); | 581 | if (TryUnlinkRegion(region)) |
582 | MainConsole.Instance.Output("Successfully unlinked " + region); | ||
604 | else | 583 | else |
605 | MainConsole.Instance.Output("Unable to unlink " + cmdparams[0] + ", region not found."); | 584 | MainConsole.Instance.Output("Unable to unlink " + region + ", region not found."); |
606 | } | 585 | } |
607 | } | 586 | } |
608 | 587 | ||
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 3519250..12dda48 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -101,7 +101,7 @@ namespace OpenSim.Services.HypergridService | |||
101 | serverConfig = config.Configs["GatekeeperService"]; | 101 | serverConfig = config.Configs["GatekeeperService"]; |
102 | m_GridName = serverConfig.GetString("ExternalName", string.Empty); | 102 | m_GridName = serverConfig.GetString("ExternalName", string.Empty); |
103 | } | 103 | } |
104 | else if (!m_GridName.EndsWith("/")) | 104 | if (!m_GridName.EndsWith("/")) |
105 | m_GridName = m_GridName + "/"; | 105 | m_GridName = m_GridName + "/"; |
106 | } | 106 | } |
107 | } | 107 | } |
diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs index 2c09a2e..80258d6 100644 --- a/OpenSim/Services/Interfaces/IUserAccountService.cs +++ b/OpenSim/Services/Interfaces/IUserAccountService.cs | |||
@@ -101,7 +101,7 @@ namespace OpenSim.Services.Interfaces | |||
101 | if (str != string.Empty) | 101 | if (str != string.Empty) |
102 | { | 102 | { |
103 | string[] parts = str.Split(new char[] { ';' }); | 103 | string[] parts = str.Split(new char[] { ';' }); |
104 | Dictionary<string, object> dic = new Dictionary<string, object>(); | 104 | // Dictionary<string, object> dic = new Dictionary<string, object>(); |
105 | foreach (string s in parts) | 105 | foreach (string s in parts) |
106 | { | 106 | { |
107 | string[] parts2 = s.Split(new char[] { '*' }); | 107 | string[] parts2 = s.Split(new char[] { '*' }); |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 1749836..93e4a8f 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -779,6 +779,8 @@ namespace OpenSim.Services.LLLoginService | |||
779 | { | 779 | { |
780 | aCircuit.ServiceURLs[kvp.Key] = kvp.Value; | 780 | aCircuit.ServiceURLs[kvp.Key] = kvp.Value; |
781 | } | 781 | } |
782 | if (!aCircuit.ServiceURLs[kvp.Key].ToString().EndsWith("/")) | ||
783 | aCircuit.ServiceURLs[kvp.Key] = aCircuit.ServiceURLs[kvp.Key] + "/"; | ||
782 | } | 784 | } |
783 | 785 | ||
784 | // New style: service keys start with SRV_; override the previous | 786 | // New style: service keys start with SRV_; override the previous |
@@ -791,6 +793,9 @@ namespace OpenSim.Services.LLLoginService | |||
791 | { | 793 | { |
792 | string keyName = serviceKey.Replace("SRV_", ""); | 794 | string keyName = serviceKey.Replace("SRV_", ""); |
793 | aCircuit.ServiceURLs[keyName] = m_LoginServerConfig.GetString(serviceKey, string.Empty); | 795 | aCircuit.ServiceURLs[keyName] = m_LoginServerConfig.GetString(serviceKey, string.Empty); |
796 | if (!aCircuit.ServiceURLs[keyName].ToString().EndsWith("/")) | ||
797 | aCircuit.ServiceURLs[keyName] = aCircuit.ServiceURLs[keyName] + "/"; | ||
798 | |||
794 | m_log.DebugFormat("[LLLOGIN SERVICE]: found new key {0} {1}", keyName, aCircuit.ServiceURLs[keyName]); | 799 | m_log.DebugFormat("[LLLOGIN SERVICE]: found new key {0} {1}", keyName, aCircuit.ServiceURLs[keyName]); |
795 | } | 800 | } |
796 | } | 801 | } |