aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
diff options
context:
space:
mode:
authorlbsa712007-12-27 21:41:48 +0000
committerlbsa712007-12-27 21:41:48 +0000
commitefd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch)
treebf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
parent* removed always true if (diff)
downloadopensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz
* Optimized usings
* shortened references * Removed redundant 'this' * Normalized EOF
Diffstat (limited to 'OpenSim/Region/Communications/OGS1/OGS1GridServices.cs')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs219
1 files changed, 124 insertions, 95 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index 2754c4e..8d52eeb 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -60,23 +60,17 @@ namespace OpenSim.Region.Communications.OGS1
60 public string gdebugRegionName 60 public string gdebugRegionName
61 { 61 {
62 get { return _gdebugRegionName; } 62 get { return _gdebugRegionName; }
63 set 63 set { _gdebugRegionName = value; }
64 {
65 _gdebugRegionName = value;
66
67 }
68 } 64 }
65
69 public string _rdebugRegionName = ""; 66 public string _rdebugRegionName = "";
70 67
71 public string rdebugRegionName 68 public string rdebugRegionName
72 { 69 {
73 get { return _rdebugRegionName; } 70 get { return _rdebugRegionName; }
74 set 71 set { _rdebugRegionName = value; }
75 {
76 _rdebugRegionName = value;
77
78 }
79 } 72 }
73
80 /// <summary> 74 /// <summary>
81 /// 75 ///
82 /// </summary> 76 /// </summary>
@@ -128,7 +122,7 @@ namespace OpenSim.Region.Communications.OGS1
128 // Process Response 122 // Process Response
129 if (GridRespData.ContainsKey("error")) 123 if (GridRespData.ContainsKey("error"))
130 { 124 {
131 string errorstring = (string)GridRespData["error"]; 125 string errorstring = (string) GridRespData["error"];
132 MainLog.Instance.Error("Unable to connect to grid: " + errorstring); 126 MainLog.Instance.Error("Unable to connect to grid: " + errorstring);
133 return null; 127 return null;
134 } 128 }
@@ -137,14 +131,12 @@ namespace OpenSim.Region.Communications.OGS1
137 m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY); 131 m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY);
138 if (GridRespData.ContainsKey("allow_forceful_banlines")) 132 if (GridRespData.ContainsKey("allow_forceful_banlines"))
139 { 133 {
140 134 if ((string) GridRespData["allow_forceful_banlines"] != "TRUE")
141 if ((string)GridRespData["allow_forceful_banlines"] != "TRUE")
142 { 135 {
143 //m_localBackend.SetForcefulBanlistsDisallowed(regionInfo.RegionHandle); 136 //m_localBackend.SetForcefulBanlistsDisallowed(regionInfo.RegionHandle);
144 m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE"); 137 m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE");
145 } 138 }
146 } 139 }
147
148 } 140 }
149 return m_localBackend.RegisterRegion(regionInfo); 141 return m_localBackend.RegisterRegion(regionInfo);
150 } 142 }
@@ -153,6 +145,7 @@ namespace OpenSim.Region.Communications.OGS1
153 { 145 {
154 return false; 146 return false;
155 } 147 }
148
156 public virtual Dictionary<string, string> GetGridSettings() 149 public virtual Dictionary<string, string> GetGridSettings()
157 { 150 {
158 Dictionary<string, string> returnGridSettings = new Dictionary<string, string>(); 151 Dictionary<string, string> returnGridSettings = new Dictionary<string, string>();
@@ -161,15 +154,15 @@ namespace OpenSim.Region.Communications.OGS1
161 foreach (string Dictkey in m_queuedGridSettings.Keys) 154 foreach (string Dictkey in m_queuedGridSettings.Keys)
162 { 155 {
163 returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]); 156 returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]);
164
165 } 157 }
166 158
167 159
168 m_queuedGridSettings.Clear(); 160 m_queuedGridSettings.Clear();
169 } 161 }
170 162
171 return returnGridSettings; 163 return returnGridSettings;
172 } 164 }
165
173 /// <summary> 166 /// <summary>
174 /// 167 ///
175 /// </summary> 168 /// </summary>
@@ -223,7 +216,7 @@ namespace OpenSim.Region.Communications.OGS1
223 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); 216 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
224 XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); 217 XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000);
225 218
226 Hashtable responseData = (Hashtable)GridResp.Value; 219 Hashtable responseData = (Hashtable) GridResp.Value;
227 220
228 if (responseData.ContainsKey("error")) 221 if (responseData.ContainsKey("error"))
229 { 222 {
@@ -231,29 +224,30 @@ namespace OpenSim.Region.Communications.OGS1
231 return null; 224 return null;
232 } 225 }
233 226
234 uint regX = Convert.ToUInt32((string)responseData["region_locx"]); 227 uint regX = Convert.ToUInt32((string) responseData["region_locx"]);
235 uint regY = Convert.ToUInt32((string)responseData["region_locy"]); 228 uint regY = Convert.ToUInt32((string) responseData["region_locy"]);
236 string internalIpStr = (string)responseData["sim_ip"]; 229 string internalIpStr = (string) responseData["sim_ip"];
237 uint port = Convert.ToUInt32(responseData["sim_port"]); 230 uint port = Convert.ToUInt32(responseData["sim_port"]);
238 string externalUri = (string)responseData["sim_uri"]; 231 string externalUri = (string) responseData["sim_uri"];
239 232
240 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int)port); 233 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port);
241 string neighbourExternalUri = externalUri; 234 string neighbourExternalUri = externalUri;
242 regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr); 235 regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr);
243 236
244 regionInfo.RemotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); 237 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
245 regionInfo.RemotingAddress = internalIpStr; 238 regionInfo.RemotingAddress = internalIpStr;
246 239
247 regionInfo.RegionID = new LLUUID((string)responseData["region_UUID"]); 240 regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]);
248 regionInfo.RegionName = (string)responseData["region_name"]; 241 regionInfo.RegionName = (string) responseData["region_name"];
249 242
250 if (requestData.ContainsKey("regionHandle")) 243 if (requestData.ContainsKey("regionHandle"))
251 { 244 {
252 m_remoteRegionInfoCache.Add(Convert.ToUInt64((string)requestData["regionHandle"]), regionInfo); 245 m_remoteRegionInfoCache.Add(Convert.ToUInt64((string) requestData["regionHandle"]), regionInfo);
253 } 246 }
254 247
255 return regionInfo; 248 return regionInfo;
256 } 249 }
250
257 /// <summary> 251 /// <summary>
258 /// 252 ///
259 /// </summary> 253 /// </summary>
@@ -283,7 +277,7 @@ namespace OpenSim.Region.Communications.OGS1
283 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); 277 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
284 XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); 278 XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000);
285 279
286 Hashtable responseData = (Hashtable)GridResp.Value; 280 Hashtable responseData = (Hashtable) GridResp.Value;
287 281
288 if (responseData.ContainsKey("error")) 282 if (responseData.ContainsKey("error"))
289 { 283 {
@@ -291,27 +285,29 @@ namespace OpenSim.Region.Communications.OGS1
291 return null; 285 return null;
292 } 286 }
293 287
294 uint regX = Convert.ToUInt32((string)responseData["region_locx"]); 288 uint regX = Convert.ToUInt32((string) responseData["region_locx"]);
295 uint regY = Convert.ToUInt32((string)responseData["region_locy"]); 289 uint regY = Convert.ToUInt32((string) responseData["region_locy"]);
296 string internalIpStr = (string)responseData["sim_ip"]; 290 string internalIpStr = (string) responseData["sim_ip"];
297 uint port = Convert.ToUInt32(responseData["sim_port"]); 291 uint port = Convert.ToUInt32(responseData["sim_port"]);
298 string externalUri = (string)responseData["sim_uri"]; 292 string externalUri = (string) responseData["sim_uri"];
299 293
300 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int)port); 294 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port);
301 string neighbourExternalUri = externalUri; 295 string neighbourExternalUri = externalUri;
302 regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr); 296 regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr);
303 297
304 regionInfo.RemotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); 298 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
305 regionInfo.RemotingAddress = internalIpStr; 299 regionInfo.RemotingAddress = internalIpStr;
306 300
307 regionInfo.RegionID = new LLUUID((string)responseData["region_UUID"]); 301 regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]);
308 regionInfo.RegionName = (string)responseData["region_name"]; 302 regionInfo.RegionName = (string) responseData["region_name"];
309 303
310 m_remoteRegionInfoCache.Add(regionHandle, regionInfo); 304 m_remoteRegionInfoCache.Add(regionHandle, regionInfo);
311 } 305 }
312 catch (System.Net.WebException) 306 catch (WebException)
313 { 307 {
314 MainLog.Instance.Error("GRID", "Region lookup failed for: " + regionHandle.ToString() + " - Is the GridServer down?"); 308 MainLog.Instance.Error("GRID",
309 "Region lookup failed for: " + regionHandle.ToString() +
310 " - Is the GridServer down?");
315 return null; 311 return null;
316 } 312 }
317 } 313 }
@@ -462,12 +458,7 @@ namespace OpenSim.Region.Communications.OGS1
462 458
463 return new XmlRpcResponse(); 459 return new XmlRpcResponse();
464 } 460 }
465
466 461
467
468
469
470
471 #region m_interRegion Comms 462 #region m_interRegion Comms
472 463
473 /// <summary> 464 /// <summary>
@@ -510,8 +501,8 @@ namespace OpenSim.Region.Communications.OGS1
510 bool retValue = false; 501 bool retValue = false;
511 502
512 503
513 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( 504 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject(
514 typeof(OGS1InterRegionRemoting), 505 typeof (OGS1InterRegionRemoting),
515 "tcp://" + regInfo.RemotingAddress + 506 "tcp://" + regInfo.RemotingAddress +
516 ":" + regInfo.RemotingPort + 507 ":" + regInfo.RemotingPort +
517 "/InterRegions"); 508 "/InterRegions");
@@ -525,7 +516,10 @@ namespace OpenSim.Region.Communications.OGS1
525 Console.WriteLine("remoting object not found"); 516 Console.WriteLine("remoting object not found");
526 } 517 }
527 remObject = null; 518 remObject = null;
528 MainLog.Instance.Verbose("INTER", gdebugRegionName + ": OGS1 tried to Update Child Agent data on outside region and got " + retValue.ToString()); 519 MainLog.Instance.Verbose("INTER",
520 gdebugRegionName +
521 ": OGS1 tried to Update Child Agent data on outside region and got " +
522 retValue.ToString());
529 523
530 return retValue; 524 return retValue;
531 } 525 }
@@ -534,35 +528,39 @@ namespace OpenSim.Region.Communications.OGS1
534 } 528 }
535 catch (RemotingException e) 529 catch (RemotingException e)
536 { 530 {
537 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 531 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
532 " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
538 MainLog.Instance.Debug(e.ToString()); 533 MainLog.Instance.Debug(e.ToString());
539 return false; 534 return false;
540 } 535 }
541 catch (SocketException e) 536 catch (SocketException e)
542 { 537 {
543 MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 538 MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
539 regInfo.RegionLocX + "," + regInfo.RegionLocY);
544 MainLog.Instance.Debug(e.ToString()); 540 MainLog.Instance.Debug(e.ToString());
545 return false; 541 return false;
546 } 542 }
547 catch (InvalidCredentialException e) 543 catch (InvalidCredentialException e)
548 { 544 {
549 MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 545 MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
546 " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
550 MainLog.Instance.Debug(e.ToString()); 547 MainLog.Instance.Debug(e.ToString());
551 return false; 548 return false;
552 } 549 }
553 catch (AuthenticationException e) 550 catch (AuthenticationException e)
554 { 551 {
555 MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 552 MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
553 regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
556 MainLog.Instance.Debug(e.ToString()); 554 MainLog.Instance.Debug(e.ToString());
557 return false; 555 return false;
558 } 556 }
559 catch (Exception e) 557 catch (Exception e)
560 { 558 {
561 MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 559 MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
560 " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
562 MainLog.Instance.Debug(e.ToString()); 561 MainLog.Instance.Debug(e.ToString());
563 return false; 562 return false;
564 } 563 }
565
566 } 564 }
567 565
568 /// <summary> 566 /// <summary>
@@ -571,7 +569,6 @@ namespace OpenSim.Region.Communications.OGS1
571 /// <param name="regionHandle"></param> 569 /// <param name="regionHandle"></param>
572 /// <param name="agentData"></param> 570 /// <param name="agentData"></param>
573 /// <returns></returns> 571 /// <returns></returns>
574
575 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) 572 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
576 { 573 {
577 RegionInfo regInfo = null; 574 RegionInfo regInfo = null;
@@ -604,7 +601,10 @@ namespace OpenSim.Region.Communications.OGS1
604 Console.WriteLine("remoting object not found"); 601 Console.WriteLine("remoting object not found");
605 } 602 }
606 remObject = null; 603 remObject = null;
607 MainLog.Instance.Verbose("INTER", gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " + agentData.firstname + " " + agentData.lastname + " and got " + retValue.ToString()); 604 MainLog.Instance.Verbose("INTER",
605 gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " +
606 agentData.firstname + " " + agentData.lastname + " and got " +
607 retValue.ToString());
608 608
609 return retValue; 609 return retValue;
610 } 610 }
@@ -613,31 +613,36 @@ namespace OpenSim.Region.Communications.OGS1
613 } 613 }
614 catch (RemotingException e) 614 catch (RemotingException e)
615 { 615 {
616 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 616 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
617 " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
617 MainLog.Instance.Debug(e.ToString()); 618 MainLog.Instance.Debug(e.ToString());
618 return false; 619 return false;
619 } 620 }
620 catch (SocketException e) 621 catch (SocketException e)
621 { 622 {
622 MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 623 MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
624 regInfo.RegionLocX + "," + regInfo.RegionLocY);
623 MainLog.Instance.Debug(e.ToString()); 625 MainLog.Instance.Debug(e.ToString());
624 return false; 626 return false;
625 } 627 }
626 catch (InvalidCredentialException e) 628 catch (InvalidCredentialException e)
627 { 629 {
628 MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 630 MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
631 " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
629 MainLog.Instance.Debug(e.ToString()); 632 MainLog.Instance.Debug(e.ToString());
630 return false; 633 return false;
631 } 634 }
632 catch (AuthenticationException e) 635 catch (AuthenticationException e)
633 { 636 {
634 MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 637 MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
638 regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
635 MainLog.Instance.Debug(e.ToString()); 639 MainLog.Instance.Debug(e.ToString());
636 return false; 640 return false;
637 } 641 }
638 catch (Exception e) 642 catch (Exception e)
639 { 643 {
640 MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 644 MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
645 " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
641 MainLog.Instance.Debug(e.ToString()); 646 MainLog.Instance.Debug(e.ToString());
642 return false; 647 return false;
643 } 648 }
@@ -656,7 +661,7 @@ namespace OpenSim.Region.Communications.OGS1
656 region = new SearializableRegionInfo(RequestNeighbourInfo(region.RegionHandle)); 661 region = new SearializableRegionInfo(RequestNeighbourInfo(region.RegionHandle));
657 region.RemotingAddress = region.ExternalHostName; 662 region.RemotingAddress = region.ExternalHostName;
658 region.RemotingPort = NetworkServersInfo.RemotingListenerPort; 663 region.RemotingPort = NetworkServersInfo.RemotingListenerPort;
659 if (m_localBackend.RegionUp(region,regionhandle)) 664 if (m_localBackend.RegionUp(region, regionhandle))
660 { 665 {
661 return true; 666 return true;
662 } 667 }
@@ -671,9 +676,11 @@ namespace OpenSim.Region.Communications.OGS1
671 bool retValue = false; 676 bool retValue = false;
672 677
673 678
674 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( 679 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject(
675 typeof(OGS1InterRegionRemoting), 680 typeof (
676 "tcp://" + regInfo.RemotingAddress + 681 OGS1InterRegionRemoting),
682 "tcp://" +
683 regInfo.RemotingAddress +
677 ":" + regInfo.RemotingPort + 684 ":" + regInfo.RemotingPort +
678 "/InterRegions"); 685 "/InterRegions");
679 686
@@ -703,33 +710,39 @@ namespace OpenSim.Region.Communications.OGS1
703 } 710 }
704 catch (RemotingException e) 711 catch (RemotingException e)
705 { 712 {
706 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + 713 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" +
707 ":" + regInfo.RemotingPort + 714 regInfo.RemotingAddress +
708 "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - Is this neighbor up?"); 715 ":" + regInfo.RemotingPort +
716 "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
717 " - Is this neighbor up?");
709 MainLog.Instance.Debug(e.ToString()); 718 MainLog.Instance.Debug(e.ToString());
710 return false; 719 return false;
711 } 720 }
712 catch (SocketException e) 721 catch (SocketException e)
713 { 722 {
714 MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + 723 MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region using tcp://" +
715 ":" + regInfo.RemotingPort + 724 regInfo.RemotingAddress +
716 "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - Is this neighbor up?"); 725 ":" + regInfo.RemotingPort +
726 "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
727 " - Is this neighbor up?");
717 MainLog.Instance.Debug(e.ToString()); 728 MainLog.Instance.Debug(e.ToString());
718 return false; 729 return false;
719 } 730 }
720 catch (InvalidCredentialException e) 731 catch (InvalidCredentialException e)
721 { 732 {
722 MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + 733 MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" +
723 ":" + regInfo.RemotingPort + 734 regInfo.RemotingAddress +
724 "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 735 ":" + regInfo.RemotingPort +
736 "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
725 MainLog.Instance.Debug(e.ToString()); 737 MainLog.Instance.Debug(e.ToString());
726 return false; 738 return false;
727 } 739 }
728 catch (AuthenticationException e) 740 catch (AuthenticationException e)
729 { 741 {
730 MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + 742 MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" +
731 ":" + regInfo.RemotingPort + 743 regInfo.RemotingAddress +
732 "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 744 ":" + regInfo.RemotingPort +
745 "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
733 MainLog.Instance.Debug(e.ToString()); 746 MainLog.Instance.Debug(e.ToString());
734 return false; 747 return false;
735 } 748 }
@@ -737,25 +750,25 @@ namespace OpenSim.Region.Communications.OGS1
737 { 750 {
738 // This line errors with a Null Reference Exception.. Why? @.@ 751 // This line errors with a Null Reference Exception.. Why? @.@
739 //MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + 752 //MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress +
740 // ":" + regInfo.RemotingPort + 753 // ":" + regInfo.RemotingPort +
741 //"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one"); 754 //"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one");
742 MainLog.Instance.Debug(e.ToString()); 755 MainLog.Instance.Debug(e.ToString());
743 return false; 756 return false;
744 } 757 }
745 } 758 }
759
746 /// <summary> 760 /// <summary>
747 /// 761 ///
748 /// </summary> 762 /// </summary>
749 /// <param name="regionHandle"></param> 763 /// <param name="regionHandle"></param>
750 /// <param name="agentData"></param> 764 /// <param name="agentData"></param>
751 /// <returns></returns> 765 /// <returns></returns>
752
753 public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData) 766 public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData)
754 { 767 {
755 RegionInfo regInfo = null; 768 RegionInfo regInfo = null;
756 try 769 try
757 { 770 {
758 if (m_localBackend.InformRegionOfPrimCrossing(regionHandle,primID, objData)) 771 if (m_localBackend.InformRegionOfPrimCrossing(regionHandle, primID, objData))
759 { 772 {
760 return true; 773 return true;
761 } 774 }
@@ -775,7 +788,7 @@ namespace OpenSim.Region.Communications.OGS1
775 788
776 if (remObject != null) 789 if (remObject != null)
777 { 790 {
778 retValue = remObject.InformRegionOfPrimCrossing(regionHandle,primID.UUID, objData); 791 retValue = remObject.InformRegionOfPrimCrossing(regionHandle, primID.UUID, objData);
779 } 792 }
780 else 793 else
781 { 794 {
@@ -791,35 +804,41 @@ namespace OpenSim.Region.Communications.OGS1
791 } 804 }
792 catch (RemotingException e) 805 catch (RemotingException e)
793 { 806 {
794 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 807 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
808 " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
795 MainLog.Instance.Debug(e.ToString()); 809 MainLog.Instance.Debug(e.ToString());
796 return false; 810 return false;
797 } 811 }
798 catch (SocketException e) 812 catch (SocketException e)
799 { 813 {
800 MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 814 MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
815 regInfo.RegionLocX + "," + regInfo.RegionLocY);
801 MainLog.Instance.Debug(e.ToString()); 816 MainLog.Instance.Debug(e.ToString());
802 return false; 817 return false;
803 } 818 }
804 catch (InvalidCredentialException e) 819 catch (InvalidCredentialException e)
805 { 820 {
806 MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 821 MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
822 " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
807 MainLog.Instance.Debug(e.ToString()); 823 MainLog.Instance.Debug(e.ToString());
808 return false; 824 return false;
809 } 825 }
810 catch (AuthenticationException e) 826 catch (AuthenticationException e)
811 { 827 {
812 MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 828 MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
829 regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
813 MainLog.Instance.Debug(e.ToString()); 830 MainLog.Instance.Debug(e.ToString());
814 return false; 831 return false;
815 } 832 }
816 catch (Exception e) 833 catch (Exception e)
817 { 834 {
818 MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 835 MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
836 " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
819 MainLog.Instance.Debug(e.ToString()); 837 MainLog.Instance.Debug(e.ToString());
820 return false; 838 return false;
821 } 839 }
822 } 840 }
841
823 /// <summary> 842 /// <summary>
824 /// 843 ///
825 /// </summary> 844 /// </summary>
@@ -848,7 +867,9 @@ namespace OpenSim.Region.Communications.OGS1
848 "/InterRegions"); 867 "/InterRegions");
849 if (remObject != null) 868 if (remObject != null)
850 { 869 {
851 retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID.UUID, new sLLVector3(position), isFlying); 870 retValue =
871 remObject.ExpectAvatarCrossing(regionHandle, agentID.UUID, new sLLVector3(position),
872 isFlying);
852 } 873 }
853 else 874 else
854 { 875 {
@@ -864,7 +885,8 @@ namespace OpenSim.Region.Communications.OGS1
864 } 885 }
865 catch (RemotingException e) 886 catch (RemotingException e)
866 { 887 {
867 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 888 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
889 " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
868 MainLog.Instance.Debug(e.ToString()); 890 MainLog.Instance.Debug(e.ToString());
869 return false; 891 return false;
870 } 892 }
@@ -873,6 +895,7 @@ namespace OpenSim.Region.Communications.OGS1
873 return false; 895 return false;
874 } 896 }
875 } 897 }
898
876 public bool ExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical) 899 public bool ExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical)
877 { 900 {
878 RegionInfo regInfo = null; 901 RegionInfo regInfo = null;
@@ -887,14 +910,16 @@ namespace OpenSim.Region.Communications.OGS1
887 if (regInfo != null) 910 if (regInfo != null)
888 { 911 {
889 bool retValue = false; 912 bool retValue = false;
890 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( 913 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject(
891 typeof(OGS1InterRegionRemoting), 914 typeof (OGS1InterRegionRemoting),
892 "tcp://" + regInfo.RemotingAddress + 915 "tcp://" + regInfo.RemotingAddress +
893 ":" + regInfo.RemotingPort + 916 ":" + regInfo.RemotingPort +
894 "/InterRegions"); 917 "/InterRegions");
895 if (remObject != null) 918 if (remObject != null)
896 { 919 {
897 retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID.UUID, new sLLVector3(position), isPhysical); 920 retValue =
921 remObject.ExpectAvatarCrossing(regionHandle, agentID.UUID, new sLLVector3(position),
922 isPhysical);
898 } 923 }
899 else 924 else
900 { 925 {
@@ -910,7 +935,8 @@ namespace OpenSim.Region.Communications.OGS1
910 } 935 }
911 catch (RemotingException e) 936 catch (RemotingException e)
912 { 937 {
913 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); 938 MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
939 " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
914 MainLog.Instance.Debug(e.ToString()); 940 MainLog.Instance.Debug(e.ToString());
915 return false; 941 return false;
916 } 942 }
@@ -922,7 +948,6 @@ namespace OpenSim.Region.Communications.OGS1
922 948
923 public void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) 949 public void TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID)
924 { 950 {
925
926 } 951 }
927 952
928 public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId) 953 public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId)
@@ -934,6 +959,7 @@ namespace OpenSim.Region.Communications.OGS1
934 { 959 {
935 return m_localBackend.AcknowledgePrimCrossed(regionHandle, primId); 960 return m_localBackend.AcknowledgePrimCrossed(regionHandle, primId);
936 } 961 }
962
937 #endregion 963 #endregion
938 964
939 #region Methods triggered by calls from external instances 965 #region Methods triggered by calls from external instances
@@ -961,8 +987,9 @@ namespace OpenSim.Region.Communications.OGS1
961 987
962 public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle) 988 public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle)
963 { 989 {
964 990 MainLog.Instance.Verbose("INTER",
965 MainLog.Instance.Verbose("INTER", gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX + "," + regionData.RegionLocY + ")"); 991 gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX +
992 "," + regionData.RegionLocY + ")");
966 993
967 try 994 try
968 { 995 {
@@ -975,6 +1002,7 @@ namespace OpenSim.Region.Communications.OGS1
975 return false; 1002 return false;
976 } 1003 }
977 } 1004 }
1005
978 public bool TriggerChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) 1006 public bool TriggerChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
979 { 1007 {
980 MainLog.Instance.Verbose("INTER", "Incoming OGS1 Child Agent Data Update"); 1008 MainLog.Instance.Verbose("INTER", "Incoming OGS1 Child Agent Data Update");
@@ -988,7 +1016,6 @@ namespace OpenSim.Region.Communications.OGS1
988 MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); 1016 MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
989 return false; 1017 return false;
990 } 1018 }
991
992 } 1019 }
993 1020
994 /// <summary> 1021 /// <summary>
@@ -1012,6 +1039,7 @@ namespace OpenSim.Region.Communications.OGS1
1012 return false; 1039 return false;
1013 } 1040 }
1014 } 1041 }
1042
1015 /// <summary> 1043 /// <summary>
1016 /// 1044 ///
1017 /// </summary> 1045 /// </summary>
@@ -1031,6 +1059,7 @@ namespace OpenSim.Region.Communications.OGS1
1031 return false; 1059 return false;
1032 } 1060 }
1033 } 1061 }
1062
1034 public bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical) 1063 public bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical)
1035 { 1064 {
1036 try 1065 try
@@ -1048,4 +1077,4 @@ namespace OpenSim.Region.Communications.OGS1
1048 1077
1049 #endregion 1078 #endregion
1050 } 1079 }
1051} 1080} \ No newline at end of file