aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2016-07-31 00:04:35 +0100
committerUbitUmarov2016-07-31 00:04:35 +0100
commit62d0e50ca48db9f450dafbaa97d2f4ba824b3e61 (patch)
tree3ac6725f9fdf06084052551149f69cd4ec824305 /OpenSim/Region
parentMerge branch 'master' into httptests (diff)
parent cleanup to go break something else (diff)
downloadopensim-SC-62d0e50ca48db9f450dafbaa97d2f4ba824b3e61.zip
opensim-SC-62d0e50ca48db9f450dafbaa97d2f4ba824b3e61.tar.gz
opensim-SC-62d0e50ca48db9f450dafbaa97d2f4ba824b3e61.tar.bz2
opensim-SC-62d0e50ca48db9f450dafbaa97d2f4ba824b3e61.tar.xz
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs21
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs5
2 files changed, 18 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
index 58bd4ea..d38ac9b 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
51 private static string LogHeader = "[LOCAL GRID SERVICE CONNECTOR]"; 51 private static string LogHeader = "[LOCAL GRID SERVICE CONNECTOR]";
52 52
53 private IGridService m_GridService; 53 private IGridService m_GridService;
54 private RegionInfoCache m_RegionInfoCache = null; 54 private RegionInfoCache m_RegionInfoCache;
55 55
56 private bool m_Enabled; 56 private bool m_Enabled;
57 57
@@ -60,9 +60,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
60 m_log.DebugFormat("{0} LocalGridServicesConnector no parms.", LogHeader); 60 m_log.DebugFormat("{0} LocalGridServicesConnector no parms.", LogHeader);
61 } 61 }
62 62
63 public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache) 63 public LocalGridServicesConnector(IConfigSource source)
64 { 64 {
65 m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader); 65 m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader);
66 InitialiseService(source, null);
67 }
68
69 public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache)
70 {
71 m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly witj cache.", LogHeader);
66 InitialiseService(source, regionInfoCache); 72 InitialiseService(source, regionInfoCache);
67 } 73 }
68 74
@@ -85,9 +91,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
85 { 91 {
86 string name = moduleConfig.GetString("GridServices", ""); 92 string name = moduleConfig.GetString("GridServices", "");
87 if (name == Name) 93 if (name == Name)
88 { 94 {
89 95 if(InitialiseService(source, null))
90 if(InitialiseService(source,null))
91 m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled"); 96 m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled");
92 } 97 }
93 } 98 }
@@ -95,7 +100,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
95 100
96 private bool InitialiseService(IConfigSource source, RegionInfoCache ric) 101 private bool InitialiseService(IConfigSource source, RegionInfoCache ric)
97 { 102 {
98 if(ric == null) 103 if(ric == null && m_RegionInfoCache == null)
99 m_RegionInfoCache = new RegionInfoCache(); 104 m_RegionInfoCache = new RegionInfoCache();
100 else 105 else
101 m_RegionInfoCache = ric; 106 m_RegionInfoCache = ric;
@@ -150,7 +155,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
150 155
151 scene.RegisterModuleInterface<IGridService>(this); 156 scene.RegisterModuleInterface<IGridService>(this);
152 157
153 m_RegionInfoCache.CacheLocal(new GridRegion(scene.RegionInfo)); 158 GridRegion r = new GridRegion(scene.RegionInfo);
159 m_RegionInfoCache.CacheLocal(r);
160
154 scene.EventManager.OnRegionUp += OnRegionUp; 161 scene.EventManager.OnRegionUp += OnRegionUp;
155 } 162 }
156 163
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
index 21f7567..96ff4b3 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
56 private IGridService m_LocalGridService; 56 private IGridService m_LocalGridService;
57 private IGridService m_RemoteGridService; 57 private IGridService m_RemoteGridService;
58 58
59 private RegionInfoCache m_RegionInfoCache = new RegionInfoCache(); 59 private RegionInfoCache m_RegionInfoCache;
60 60
61 public RemoteGridServicesConnector() 61 public RemoteGridServicesConnector()
62 { 62 {
@@ -122,6 +122,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
122 return false; 122 return false;
123 } 123 }
124 124
125 if(m_RegionInfoCache == null)
126 m_RegionInfoCache = new RegionInfoCache();
127
125 return true; 128 return true;
126 } 129 }
127 130