diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Services/Connectors/Neighbour | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Services/Connectors/Neighbour')
-rw-r--r-- | OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs index 7429293..925364a 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs | |||
@@ -35,7 +35,7 @@ using System.Reflection; | |||
35 | using System.Text; | 35 | using System.Text; |
36 | using Nini.Config; | 36 | using Nini.Config; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Communications; | 38 | |
39 | using OpenSim.Services.Interfaces; | 39 | using OpenSim.Services.Interfaces; |
40 | using OpenMetaverse; | 40 | using OpenMetaverse; |
41 | using OpenMetaverse.StructuredData; | 41 | using OpenMetaverse.StructuredData; |
@@ -69,7 +69,7 @@ namespace OpenSim.Services.Connectors | |||
69 | public virtual GridRegion HelloNeighbour(ulong regionHandle, RegionInfo thisRegion) | 69 | public virtual GridRegion HelloNeighbour(ulong regionHandle, RegionInfo thisRegion) |
70 | { | 70 | { |
71 | uint x = 0, y = 0; | 71 | uint x = 0, y = 0; |
72 | Utils.LongToUInts(regionHandle, out x, out y); | 72 | Util.RegionHandleToWorldLoc(regionHandle, out x, out y); |
73 | GridRegion regInfo = m_GridService.GetRegionByPosition(thisRegion.ScopeID, (int)x, (int)y); | 73 | GridRegion regInfo = m_GridService.GetRegionByPosition(thisRegion.ScopeID, (int)x, (int)y); |
74 | if ((regInfo != null) && | 74 | if ((regInfo != null) && |
75 | // Don't remote-call this instance; that's a startup hickup | 75 | // Don't remote-call this instance; that's a startup hickup |
@@ -97,9 +97,9 @@ namespace OpenSim.Services.Connectors | |||
97 | } | 97 | } |
98 | catch (Exception e) | 98 | catch (Exception e) |
99 | { | 99 | { |
100 | m_log.WarnFormat( | 100 | m_log.Warn(string.Format( |
101 | "[NEIGHBOUR SERVICE CONNCTOR]: Unable to parse uri {0} to send HelloNeighbour from {1} to {2}. Exception {3}{4}", | 101 | "[NEIGHBOUR SERVICES CONNECTOR]: Unable to parse uri {0} to send HelloNeighbour from {1} to {2}. Exception {3} ", |
102 | uri, thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace); | 102 | uri, thisRegion.RegionName, region.RegionName, e.Message), e); |
103 | 103 | ||
104 | return false; | 104 | return false; |
105 | } | 105 | } |
@@ -116,9 +116,9 @@ namespace OpenSim.Services.Connectors | |||
116 | } | 116 | } |
117 | catch (Exception e) | 117 | catch (Exception e) |
118 | { | 118 | { |
119 | m_log.WarnFormat( | 119 | m_log.Warn(string.Format( |
120 | "[NEIGHBOUR SERVICE CONNCTOR]: PackRegionInfoData failed for HelloNeighbour from {0} to {1}. Exception {2}{3}", | 120 | "[NEIGHBOUR SERVICES CONNECTOR]: PackRegionInfoData failed for HelloNeighbour from {0} to {1}. Exception {2} ", |
121 | thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace); | 121 | thisRegion.RegionName, region.RegionName, e.Message), e); |
122 | 122 | ||
123 | return false; | 123 | return false; |
124 | } | 124 | } |
@@ -136,9 +136,9 @@ namespace OpenSim.Services.Connectors | |||
136 | } | 136 | } |
137 | catch (Exception e) | 137 | catch (Exception e) |
138 | { | 138 | { |
139 | m_log.WarnFormat( | 139 | m_log.Warn(string.Format( |
140 | "[NEIGHBOUR SERVICE CONNCTOR]: Exception thrown on serialization of HelloNeighbour from {0} to {1}. Exception {2}{3}", | 140 | "[NEIGHBOUR SERVICES CONNECTOR]: Exception thrown on serialization of HelloNeighbour from {0} to {1}. Exception {2} ", |
141 | thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace); | 141 | thisRegion.RegionName, region.RegionName, e.Message), e); |
142 | 142 | ||
143 | return false; | 143 | return false; |
144 | } | 144 | } |
@@ -153,53 +153,53 @@ namespace OpenSim.Services.Connectors | |||
153 | } | 153 | } |
154 | catch (Exception e) | 154 | catch (Exception e) |
155 | { | 155 | { |
156 | m_log.WarnFormat( | 156 | m_log.Warn(string.Format( |
157 | "[NEIGHBOUR SERVICE CONNCTOR]: Unable to send HelloNeighbour from {0} to {1}. Exception {2}{3}", | 157 | "[NEIGHBOUR SERVICES CONNECTOR]: Unable to send HelloNeighbour from {0} to {1} (uri {2}). Exception {3} ", |
158 | thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace); | 158 | thisRegion.RegionName, region.RegionName, uri, e.Message), e); |
159 | 159 | ||
160 | return false; | 160 | return false; |
161 | } | 161 | } |
162 | finally | 162 | finally |
163 | { | 163 | { |
164 | if (os != null) | 164 | if (os != null) |
165 | os.Close(); | 165 | os.Dispose(); |
166 | } | 166 | } |
167 | 167 | ||
168 | // Let's wait for the response | 168 | // Let's wait for the response |
169 | //m_log.Info("[REST COMMS]: Waiting for a reply after DoHelloNeighbourCall"); | 169 | //m_log.Info("[REST COMMS]: Waiting for a reply after DoHelloNeighbourCall"); |
170 | 170 | ||
171 | StreamReader sr = null; | ||
172 | try | 171 | try |
173 | { | 172 | { |
174 | WebResponse webResponse = helloNeighbourRequest.GetResponse(); | 173 | using (WebResponse webResponse = helloNeighbourRequest.GetResponse()) |
175 | if (webResponse == null) | ||
176 | { | 174 | { |
177 | m_log.DebugFormat( | 175 | if (webResponse == null) |
178 | "[REST COMMS]: Null reply on DoHelloNeighbourCall post from {0} to {1}", | 176 | { |
179 | thisRegion.RegionName, region.RegionName); | 177 | m_log.DebugFormat( |
178 | "[NEIGHBOUR SERVICES CONNECTOR]: Null reply on DoHelloNeighbourCall post from {0} to {1}", | ||
179 | thisRegion.RegionName, region.RegionName); | ||
180 | } | ||
181 | |||
182 | using (Stream s = webResponse.GetResponseStream()) | ||
183 | { | ||
184 | using (StreamReader sr = new StreamReader(s)) | ||
185 | { | ||
186 | //reply = sr.ReadToEnd().Trim(); | ||
187 | sr.ReadToEnd().Trim(); | ||
188 | //m_log.InfoFormat("[REST COMMS]: DoHelloNeighbourCall reply was {0} ", reply); | ||
189 | } | ||
190 | } | ||
180 | } | 191 | } |
181 | |||
182 | sr = new StreamReader(webResponse.GetResponseStream()); | ||
183 | //reply = sr.ReadToEnd().Trim(); | ||
184 | sr.ReadToEnd().Trim(); | ||
185 | //m_log.InfoFormat("[REST COMMS]: DoHelloNeighbourCall reply was {0} ", reply); | ||
186 | |||
187 | } | 192 | } |
188 | catch (Exception e) | 193 | catch (Exception e) |
189 | { | 194 | { |
190 | m_log.WarnFormat( | 195 | m_log.Warn(string.Format( |
191 | "[NEIGHBOUR SERVICE CONNCTOR]: Exception on reply of DoHelloNeighbourCall from {0} back to {1}. Exception {2}{3}", | 196 | "[NEIGHBOUR SERVICES CONNECTOR]: Exception on reply of DoHelloNeighbourCall from {0} back to {1}. Exception {2} ", |
192 | region.RegionName, thisRegion.RegionName, e.Message, e.StackTrace); | 197 | region.RegionName, thisRegion.RegionName, e.Message), e); |
193 | 198 | ||
194 | return false; | 199 | return false; |
195 | } | 200 | } |
196 | finally | ||
197 | { | ||
198 | if (sr != null) | ||
199 | sr.Close(); | ||
200 | } | ||
201 | 201 | ||
202 | return true; | 202 | return true; |
203 | } | 203 | } |
204 | } | 204 | } |
205 | } \ No newline at end of file | 205 | } |