diff options
author | Teravus Ovares | 2007-11-28 06:18:07 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-11-28 06:18:07 +0000 |
commit | b7d596a6af51bea7dba642cdc768ac5ff77af5f3 (patch) | |
tree | 967b749b10b548f6ed687d8ade4680e411793da4 /OpenSim/Region/Communications | |
parent | build ThrottleCheck function to clear up bits of the throttle (diff) | |
download | opensim-SC-b7d596a6af51bea7dba642cdc768ac5ff77af5f3.zip opensim-SC-b7d596a6af51bea7dba642cdc768ac5ff77af5f3.tar.gz opensim-SC-b7d596a6af51bea7dba642cdc768ac5ff77af5f3.tar.bz2 opensim-SC-b7d596a6af51bea7dba642cdc768ac5ff77af5f3.tar.xz |
* Restaring the sim works fine in grid mode now. Sims announce themselves to their neighbors when they start up. Neighbors get this message and tell their agents that there's a new sim up.
* Certain unrecoverable physics based crashes in ODE are now hooked up to the 'restart the sim' routine.
Diffstat (limited to 'OpenSim/Region/Communications')
3 files changed, 30 insertions, 29 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 6e807ec..0f3ec73 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -106,7 +106,6 @@ namespace OpenSim.Region.Communications.Local | |||
106 | 106 | ||
107 | return regionHost; | 107 | return regionHost; |
108 | } | 108 | } |
109 | return null; | ||
110 | } | 109 | } |
111 | 110 | ||
112 | public bool DeregisterRegion(RegionInfo regionInfo) | 111 | public bool DeregisterRegion(RegionInfo regionInfo) |
@@ -201,8 +200,9 @@ namespace OpenSim.Region.Communications.Local | |||
201 | /// <param name="agentData"></param> | 200 | /// <param name="agentData"></param> |
202 | /// <returns></returns> | 201 | /// <returns></returns> |
203 | /// | 202 | /// |
204 | public bool RegionUp(RegionInfo region) | 203 | public bool RegionUp(SearializableRegionInfo sregion) |
205 | { | 204 | { |
205 | RegionInfo region = new RegionInfo(sregion); | ||
206 | foreach (RegionCommsListener listener in m_regionListeners.Values) | 206 | foreach (RegionCommsListener listener in m_regionListeners.Values) |
207 | { | 207 | { |
208 | listener.TriggerRegionUp(region); | 208 | listener.TriggerRegionUp(region); |
@@ -213,8 +213,13 @@ namespace OpenSim.Region.Communications.Local | |||
213 | 213 | ||
214 | public bool TriggerRegionUp(RegionInfo region) | 214 | public bool TriggerRegionUp(RegionInfo region) |
215 | { | 215 | { |
216 | |||
217 | foreach (RegionCommsListener listener in m_regionListeners.Values) | ||
218 | { | ||
219 | listener.TriggerRegionUp(region); | ||
220 | } | ||
216 | 221 | ||
217 | return false; | 222 | return true; |
218 | } | 223 | } |
219 | 224 | ||
220 | public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) | 225 | public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 282b720..b0442d2 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -133,14 +133,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
133 | } | 133 | } |
134 | else | 134 | else |
135 | { | 135 | { |
136 | //m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY); | 136 | m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY); |
137 | 137 | ||
138 | 138 | ||
139 | } | 139 | } |
140 | //SimpleRegionInfo regiondata = new SimpleRegionInfo(); | ||
141 | //regiondata.RegionID = griddatahash["UUID"]; | ||
142 | //regiondata.RemotingAddress = | ||
143 | |||
144 | return m_localBackend.RegisterRegion(regionInfo); | 140 | return m_localBackend.RegisterRegion(regionInfo); |
145 | } | 141 | } |
146 | 142 | ||
@@ -458,7 +454,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
458 | InterRegionSingleton.Instance.OnPrimGroupArrival += IncomingPrim; | 454 | InterRegionSingleton.Instance.OnPrimGroupArrival += IncomingPrim; |
459 | InterRegionSingleton.Instance.OnPrimGroupNear += TriggerExpectPrimCrossing; | 455 | InterRegionSingleton.Instance.OnPrimGroupNear += TriggerExpectPrimCrossing; |
460 | InterRegionSingleton.Instance.OnRegionUp += TriggerRegionUp; | 456 | InterRegionSingleton.Instance.OnRegionUp += TriggerRegionUp; |
461 | InterRegionSingleton.Instance.OnRegionUp += RegionUp; | 457 | //InterRegionSingleton.Instance.OnRegionUp += RegionUp; |
462 | } | 458 | } |
463 | 459 | ||
464 | #region Methods called by regions in this instance | 460 | #region Methods called by regions in this instance |
@@ -541,11 +537,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
541 | MainLog.Instance.Debug(e.ToString()); | 537 | MainLog.Instance.Debug(e.ToString()); |
542 | return false; | 538 | return false; |
543 | } | 539 | } |
544 | return true; | ||
545 | } | 540 | } |
546 | 541 | ||
547 | // UGLY! | 542 | // UGLY! |
548 | public bool RegionUp(RegionInfo region) | 543 | public bool RegionUp(SearializableRegionInfo region) |
549 | { | 544 | { |
550 | 545 | ||
551 | // This is stupid. For this to work, when the region registers it must request nearby map blocks. | 546 | // This is stupid. For this to work, when the region registers it must request nearby map blocks. |
@@ -558,11 +553,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
558 | { | 553 | { |
559 | return true; | 554 | return true; |
560 | } | 555 | } |
561 | return true; | 556 | |
562 | foreach (SimpleRegionInfo knownregion in m_knownRegions) | 557 | foreach (SimpleRegionInfo knownregion in m_knownRegions) |
563 | { | 558 | { |
564 | // Wha? | 559 | |
565 | RegionInfo regInfo = RequestNeighbourInfo(knownregion.RegionID); | 560 | SearializableRegionInfo regInfo = new SearializableRegionInfo(RequestNeighbourInfo(knownregion.RegionID)); |
566 | 561 | ||
567 | try | 562 | try |
568 | { | 563 | { |
@@ -572,7 +567,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
572 | //don't want to be creating a new link to the remote instance every time like we are here | 567 | //don't want to be creating a new link to the remote instance every time like we are here |
573 | bool retValue = false; | 568 | bool retValue = false; |
574 | 569 | ||
575 | 570 | ||
576 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | 571 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( |
577 | typeof(OGS1InterRegionRemoting), | 572 | typeof(OGS1InterRegionRemoting), |
578 | "tcp://" + regInfo.RemotingAddress + | 573 | "tcp://" + regInfo.RemotingAddress + |
@@ -588,38 +583,38 @@ namespace OpenSim.Region.Communications.OGS1 | |||
588 | Console.WriteLine("remoting object not found"); | 583 | Console.WriteLine("remoting object not found"); |
589 | } | 584 | } |
590 | remObject = null; | 585 | remObject = null; |
591 | //MainLog.Instance.Verbose("INTER", gdebugRegionName + ": OGS1 tried to NotifyRegionUp for " + region.RegionName + " and got " + retValue.ToString()); | 586 | MainLog.Instance.Verbose("INTER", gdebugRegionName + ": OGS1 tried to NotifyRegionUp for " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
592 | 587 | ||
593 | } | 588 | } |
594 | 589 | ||
595 | } | 590 | } |
596 | catch (RemotingException e) | 591 | catch (RemotingException e) |
597 | { | 592 | { |
598 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 593 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
599 | MainLog.Instance.Debug(e.ToString()); | 594 | MainLog.Instance.Debug(e.ToString()); |
600 | //return false; | 595 | //return false; |
601 | } | 596 | } |
602 | catch (SocketException e) | 597 | catch (SocketException e) |
603 | { | 598 | { |
604 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 599 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
605 | MainLog.Instance.Debug(e.ToString()); | 600 | MainLog.Instance.Debug(e.ToString()); |
606 | //return false; | 601 | //return false; |
607 | } | 602 | } |
608 | catch (InvalidCredentialException e) | 603 | catch (InvalidCredentialException e) |
609 | { | 604 | { |
610 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 605 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
611 | MainLog.Instance.Debug(e.ToString()); | 606 | MainLog.Instance.Debug(e.ToString()); |
612 | //return false; | 607 | //return false; |
613 | } | 608 | } |
614 | catch (AuthenticationException e) | 609 | catch (AuthenticationException e) |
615 | { | 610 | { |
616 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 611 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
617 | MainLog.Instance.Debug(e.ToString()); | 612 | MainLog.Instance.Debug(e.ToString()); |
618 | //return false; | 613 | //return false; |
619 | } | 614 | } |
620 | catch (Exception e) | 615 | catch (Exception e) |
621 | { | 616 | { |
622 | MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 617 | MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
623 | MainLog.Instance.Debug(e.ToString()); | 618 | MainLog.Instance.Debug(e.ToString()); |
624 | //return false; | 619 | //return false; |
625 | } | 620 | } |
@@ -702,7 +697,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
702 | MainLog.Instance.Debug(e.ToString()); | 697 | MainLog.Instance.Debug(e.ToString()); |
703 | return false; | 698 | return false; |
704 | } | 699 | } |
705 | return true; | ||
706 | } | 700 | } |
707 | /// <summary> | 701 | /// <summary> |
708 | /// | 702 | /// |
@@ -843,13 +837,13 @@ namespace OpenSim.Region.Communications.OGS1 | |||
843 | } | 837 | } |
844 | } | 838 | } |
845 | 839 | ||
846 | public bool TriggerRegionUp(RegionInfo regionData) | 840 | public bool TriggerRegionUp(SearializableRegionInfo regionData) |
847 | { | 841 | { |
848 | //MainLog.Instance.Verbose("INTER", gdebugRegionName + ": Incoming OGS1 RegionUpReport " + regionData.RegionName); | 842 | MainLog.Instance.Verbose("INTER", gdebugRegionName + ": Incoming OGS1 RegionUpReport: " + regionData.RegionLocX + "," + regionData.RegionLocY); |
849 | 843 | ||
850 | try | 844 | try |
851 | { | 845 | { |
852 | return m_localBackend.TriggerRegionUp(regionData); | 846 | return m_localBackend.TriggerRegionUp(new RegionInfo(regionData)); |
853 | } | 847 | } |
854 | 848 | ||
855 | catch (RemotingException e) | 849 | catch (RemotingException e) |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index aa6f59a..2f7e591 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
41 | 41 | ||
42 | public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData); | 42 | public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData); |
43 | 43 | ||
44 | public delegate bool RegionUP (RegionInfo region); | 44 | public delegate bool RegionUp (SearializableRegionInfo region); |
45 | 45 | ||
46 | public sealed class InterRegionSingleton | 46 | public sealed class InterRegionSingleton |
47 | { | 47 | { |
@@ -76,11 +76,12 @@ namespace OpenSim.Region.Communications.OGS1 | |||
76 | return false; | 76 | return false; |
77 | } | 77 | } |
78 | 78 | ||
79 | public bool RegionUp(RegionInfo region) | 79 | public bool RegionUp(SearializableRegionInfo sregion) |
80 | { | 80 | { |
81 | |||
81 | if (OnRegionUp != null) | 82 | if (OnRegionUp != null) |
82 | { | 83 | { |
83 | return OnRegionUp(region); | 84 | return OnRegionUp(sregion); |
84 | } | 85 | } |
85 | return false; | 86 | return false; |
86 | } | 87 | } |
@@ -129,7 +130,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
129 | return false; | 130 | return false; |
130 | } | 131 | } |
131 | } | 132 | } |
132 | public bool RegionUp(RegionInfo region) | 133 | public bool RegionUp(SearializableRegionInfo region) |
133 | { | 134 | { |
134 | try | 135 | try |
135 | { | 136 | { |
@@ -141,6 +142,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
141 | return false; | 142 | return false; |
142 | } | 143 | } |
143 | } | 144 | } |
145 | |||
144 | public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) | 146 | public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) |
145 | { | 147 | { |
146 | try | 148 | try |