aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
diff options
context:
space:
mode:
authorTeravus Ovares2007-11-27 13:46:52 +0000
committerTeravus Ovares2007-11-27 13:46:52 +0000
commit082f2baebe300e1313a34444c42dcc0a20c44baf (patch)
tree71616106c7a7dc1a3e21ea14c2f4b6d09fc642a5 /OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
parentMainMap workaround. Map still does not fill in automatically, but one click o... (diff)
downloadopensim-SC-082f2baebe300e1313a34444c42dcc0a20c44baf.zip
opensim-SC-082f2baebe300e1313a34444c42dcc0a20c44baf.tar.gz
opensim-SC-082f2baebe300e1313a34444c42dcc0a20c44baf.tar.bz2
opensim-SC-082f2baebe300e1313a34444c42dcc0a20c44baf.tar.xz
Fixed an event in the events chain in inter-region communications.
As a consequence, restarting sims in the same process instance now shows them when they come back up in grid mode and standalone mode.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs31
1 files changed, 29 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 18ce34d..0355a1b 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -22,25 +22,48 @@ namespace OpenSim.Region.Environment.Scenes
22 public event CloseAgentConnection OnCloseAgentConnection; 22 public event CloseAgentConnection OnCloseAgentConnection;
23 public event PrimCrossing OnPrimCrossingIntoRegion; 23 public event PrimCrossing OnPrimCrossingIntoRegion;
24 public event RegionUp OnRegionUp; 24 public event RegionUp OnRegionUp;
25 25 public string _debugRegionName = "";
26
27 public string debugRegionName
28 {
29 get { return _debugRegionName; }
30 set
31 {
32 _debugRegionName = value;
33
34
35
36 }
37 }
26 38
27 public SceneCommunicationService(CommunicationsManager commsMan) 39 public SceneCommunicationService(CommunicationsManager commsMan)
28 { 40 {
29 m_commsProvider = commsMan; 41 m_commsProvider = commsMan;
42 m_commsProvider.GridService.gdebugRegionName = _debugRegionName;
43 m_commsProvider.InterRegion.rdebugRegionName = _debugRegionName;
30 } 44 }
31 45
32 public void RegisterRegion(RegionInfo regionInfos) 46 public void RegisterRegion(RegionInfo regionInfos)
33 { 47 {
34 m_regionInfo = regionInfos; 48 m_regionInfo = regionInfos;
35 regionCommsHost = m_commsProvider.GridService.RegisterRegion(m_regionInfo); 49 regionCommsHost = m_commsProvider.GridService.RegisterRegion(m_regionInfo);
50
36 if (regionCommsHost != null) 51 if (regionCommsHost != null)
37 { 52 {
53 //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: registered with gridservice and got" + regionCommsHost.ToString());
54
55 regionCommsHost.debugRegionName = _debugRegionName;
38 regionCommsHost.OnExpectUser += NewUserConnection; 56 regionCommsHost.OnExpectUser += NewUserConnection;
39 regionCommsHost.OnAvatarCrossingIntoRegion += AgentCrossing; 57 regionCommsHost.OnAvatarCrossingIntoRegion += AgentCrossing;
40 regionCommsHost.OnPrimCrossingIntoRegion += PrimCrossing; 58 regionCommsHost.OnPrimCrossingIntoRegion += PrimCrossing;
41 regionCommsHost.OnCloseAgentConnection += CloseConnection; 59 regionCommsHost.OnCloseAgentConnection += CloseConnection;
42 regionCommsHost.OnRegionUp += newRegionUp; 60 regionCommsHost.OnRegionUp += newRegionUp;
43 61
62
63 }
64 else
65 {
66 //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: registered with gridservice and got null");
44 67
45 } 68 }
46 } 69 }
@@ -70,6 +93,7 @@ namespace OpenSim.Region.Environment.Scenes
70 { 93 {
71 if (OnExpectUser != null) 94 if (OnExpectUser != null)
72 { 95 {
96 //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname);
73 OnExpectUser(regionHandle, agent); 97 OnExpectUser(regionHandle, agent);
74 } 98 }
75 } 99 }
@@ -78,6 +102,7 @@ namespace OpenSim.Region.Environment.Scenes
78 { 102 {
79 if (OnRegionUp != null) 103 if (OnRegionUp != null)
80 { 104 {
105 //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: newRegionUp Fired for User:" + region.RegionName);
81 OnRegionUp(region); 106 OnRegionUp(region);
82 } 107 }
83 return true; 108 return true;
@@ -188,6 +213,7 @@ namespace OpenSim.Region.Environment.Scenes
188 /// <returns></returns> 213 /// <returns></returns>
189 public virtual RegionInfo RequestNeighbouringRegionInfo(ulong regionHandle) 214 public virtual RegionInfo RequestNeighbouringRegionInfo(ulong regionHandle)
190 { 215 {
216 //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionHandle.ToString());
191 return m_commsProvider.GridService.RequestNeighbourInfo(regionHandle); 217 return m_commsProvider.GridService.RequestNeighbourInfo(regionHandle);
192 } 218 }
193 219
@@ -275,6 +301,7 @@ namespace OpenSim.Region.Environment.Scenes
275 301
276 public void InformNeighborsThatRegionisUp(RegionInfo region) 302 public void InformNeighborsThatRegionisUp(RegionInfo region)
277 { 303 {
304 //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
278 bool val = m_commsProvider.InterRegion.RegionUp(region); 305 bool val = m_commsProvider.InterRegion.RegionUp(region);
279 } 306 }
280 307