aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
diff options
context:
space:
mode:
authorTeravus Ovares2007-11-28 06:18:07 +0000
committerTeravus Ovares2007-11-28 06:18:07 +0000
commitb7d596a6af51bea7dba642cdc768ac5ff77af5f3 (patch)
tree967b749b10b548f6ed687d8ade4680e411793da4 /OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
parentbuild ThrottleCheck function to clear up bits of the throttle (diff)
downloadopensim-SC_OLD-b7d596a6af51bea7dba642cdc768ac5ff77af5f3.zip
opensim-SC_OLD-b7d596a6af51bea7dba642cdc768ac5ff77af5f3.tar.gz
opensim-SC_OLD-b7d596a6af51bea7dba642cdc768ac5ff77af5f3.tar.bz2
opensim-SC_OLD-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/OGS1/OGS1GridServices.cs')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs38
1 files changed, 16 insertions, 22 deletions
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)