diff options
author | Jeff Ames | 2008-03-18 14:51:42 +0000 |
---|---|---|
committer | Jeff Ames | 2008-03-18 14:51:42 +0000 |
commit | bf8b5844f24d294c459f54147bd511e7112288bf (patch) | |
tree | 1b6a1ba4e9888d43694a8a33c21beb6913ce2d3a /OpenSim | |
parent | * Applied Grumly57 patch for #781; Thanks, Grumly! (diff) | |
download | opensim-SC-bf8b5844f24d294c459f54147bd511e7112288bf.zip opensim-SC-bf8b5844f24d294c459f54147bd511e7112288bf.tar.gz opensim-SC-bf8b5844f24d294c459f54147bd511e7112288bf.tar.bz2 opensim-SC-bf8b5844f24d294c459f54147bd511e7112288bf.tar.xz |
Formatting cleanup. Minor refactoring.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/LoginResponse.cs | 10 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/LoginService.cs | 7 | ||||
-rw-r--r-- | OpenSim/Framework/Data.DB4o/DB4oGridData.cs | 1 | ||||
-rw-r--r-- | OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs | 7 | ||||
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLGridData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteGridData.cs | 7 | ||||
-rw-r--r-- | OpenSim/Framework/Data/RegionProfileData.cs | 9 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 50 | ||||
-rw-r--r-- | OpenSim/Grid/GridServer/GridManager.cs | 108 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalBackEndServices.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalLoginService.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 190 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsActor.cs | 45 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs | 4 |
16 files changed, 197 insertions, 276 deletions
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs index a815662..4a31986 100644 --- a/OpenSim/Framework/Communications/LoginResponse.cs +++ b/OpenSim/Framework/Communications/LoginResponse.cs | |||
@@ -170,7 +170,6 @@ namespace OpenSim.Framework.UserManagement | |||
170 | AddClassifiedCategory((Int32) 8, "Service"); | 170 | AddClassifiedCategory((Int32) 8, "Service"); |
171 | AddClassifiedCategory((Int32) 9, "Personal"); | 171 | AddClassifiedCategory((Int32) 9, "Personal"); |
172 | 172 | ||
173 | |||
174 | SessionID = LLUUID.Random(); | 173 | SessionID = LLUUID.Random(); |
175 | SecureSessionID = LLUUID.Random(); | 174 | SecureSessionID = LLUUID.Random(); |
176 | AgentID = LLUUID.Random(); | 175 | AgentID = LLUUID.Random(); |
@@ -244,7 +243,10 @@ namespace OpenSim.Framework.UserManagement | |||
244 | { | 243 | { |
245 | return | 244 | return |
246 | (GenerateFailureResponse("presence", | 245 | (GenerateFailureResponse("presence", |
247 | "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner. Please wait 5 minutes if you are going to connect to a region nearby to the region you were at previously.", | 246 | "You appear to be already logged in. " + |
247 | "If this is not the case please wait for your session to timeout. " + | ||
248 | "If this takes longer than a few minutes please contact the grid owner. " + | ||
249 | "Please wait 5 minutes if you are going to connect to a region nearby to the region you were at previously.", | ||
248 | "false")); | 250 | "false")); |
249 | } | 251 | } |
250 | 252 | ||
@@ -252,7 +254,9 @@ namespace OpenSim.Framework.UserManagement | |||
252 | { | 254 | { |
253 | return GenerateFailureResponseLLSD( | 255 | return GenerateFailureResponseLLSD( |
254 | "presence", | 256 | "presence", |
255 | "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner", | 257 | "You appear to be already logged in. " + |
258 | "If this is not the case please wait for your session to timeout. " + | ||
259 | "If this takes longer than a few minutes please contact the grid owner", | ||
256 | "false"); | 260 | "false"); |
257 | } | 261 | } |
258 | 262 | ||
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 72b408b..be47258 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs | |||
@@ -121,6 +121,7 @@ namespace OpenSim.Framework.UserManagement | |||
121 | 121 | ||
122 | return logResponse.CreateLoginFailedResponse(); | 122 | return logResponse.CreateLoginFailedResponse(); |
123 | } | 123 | } |
124 | |||
124 | if (requestData.Contains("passwd")) | 125 | if (requestData.Contains("passwd")) |
125 | { | 126 | { |
126 | string passwd = (string)requestData["passwd"]; | 127 | string passwd = (string)requestData["passwd"]; |
@@ -494,8 +495,8 @@ namespace OpenSim.Framework.UserManagement | |||
494 | } | 495 | } |
495 | 496 | ||
496 | public string GetLoginForm(string firstname, string lastname, string location, string region, | 497 | public string GetLoginForm(string firstname, string lastname, string location, string region, |
497 | string grid, string channel, string version, string lang, | 498 | string grid, string channel, string version, string lang, |
498 | string password, string errormessages) | 499 | string password, string errormessages) |
499 | { | 500 | { |
500 | // inject our values in the form at the markers | 501 | // inject our values in the form at the markers |
501 | 502 | ||
@@ -522,6 +523,7 @@ namespace OpenSim.Framework.UserManagement | |||
522 | loginform = loginform.Replace("[$lang]", lang); | 523 | loginform = loginform.Replace("[$lang]", lang); |
523 | loginform = loginform.Replace("[$password]", password); | 524 | loginform = loginform.Replace("[$password]", password); |
524 | loginform = loginform.Replace("[$errors]", errormessages); | 525 | loginform = loginform.Replace("[$errors]", errormessages); |
526 | |||
525 | return loginform; | 527 | return loginform; |
526 | } | 528 | } |
527 | 529 | ||
@@ -588,6 +590,7 @@ namespace OpenSim.Framework.UserManagement | |||
588 | responseString += "</div>"; | 590 | responseString += "</div>"; |
589 | responseString += "</body>"; | 591 | responseString += "</body>"; |
590 | responseString += "</html>"; | 592 | responseString += "</html>"; |
593 | |||
591 | return responseString; | 594 | return responseString; |
592 | } | 595 | } |
593 | 596 | ||
diff --git a/OpenSim/Framework/Data.DB4o/DB4oGridData.cs b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs index 999d4f8..9320ef9 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oGridData.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs | |||
@@ -103,6 +103,7 @@ namespace OpenSim.Framework.Data.DB4o | |||
103 | throw new Exception("GetProfileByString Not supported in DB4oGridData"); | 103 | throw new Exception("GetProfileByString Not supported in DB4oGridData"); |
104 | //return null; | 104 | //return null; |
105 | } | 105 | } |
106 | |||
106 | /// <summary> | 107 | /// <summary> |
107 | /// Adds a new specified region to the database | 108 | /// Adds a new specified region to the database |
108 | /// </summary> | 109 | /// </summary> |
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs index 38a1d08..5a0f3f5 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs | |||
@@ -180,7 +180,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
180 | return row; | 180 | return row; |
181 | } | 181 | } |
182 | 182 | ||
183 | |||
184 | /// <summary> | 183 | /// <summary> |
185 | /// Returns a sim profile from it's Region name string | 184 | /// Returns a sim profile from it's Region name string |
186 | /// </summary> | 185 | /// </summary> |
@@ -222,7 +221,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
222 | } | 221 | } |
223 | } | 222 | } |
224 | 223 | ||
225 | |||
226 | /// <summary> | 224 | /// <summary> |
227 | /// Adds a new specified region to the database | 225 | /// Adds a new specified region to the database |
228 | /// </summary> | 226 | /// </summary> |
@@ -242,7 +240,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
242 | System.Console.WriteLine("No regions found. Create new one."); | 240 | System.Console.WriteLine("No regions found. Create new one."); |
243 | } | 241 | } |
244 | 242 | ||
245 | if ( insertRegionRow(profile)) | 243 | if (insertRegionRow(profile)) |
246 | { | 244 | { |
247 | return DataResponse.RESPONSE_OK; | 245 | return DataResponse.RESPONSE_OK; |
248 | } | 246 | } |
@@ -252,7 +250,6 @@ namespace OpenSim.Framework.Data.MSSQL | |||
252 | } | 250 | } |
253 | } | 251 | } |
254 | 252 | ||
255 | |||
256 | /// <summary> | 253 | /// <summary> |
257 | /// Creates a new region in the database | 254 | /// Creates a new region in the database |
258 | /// </summary> | 255 | /// </summary> |
@@ -324,7 +321,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
324 | } | 321 | } |
325 | 322 | ||
326 | /// <summary> | 323 | /// <summary> |
327 | /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret. | 324 | /// DEPRECATED. Attempts to authenticate a region by comparing a shared secret. |
328 | /// </summary> | 325 | /// </summary> |
329 | /// <param name="uuid">The UUID of the challenger</param> | 326 | /// <param name="uuid">The UUID of the challenger</param> |
330 | /// <param name="handle">The attempted regionHandle of the challenger</param> | 327 | /// <param name="handle">The attempted regionHandle of the challenger</param> |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs index 3855d99..0cba9f0 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs | |||
@@ -331,7 +331,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
331 | } | 331 | } |
332 | 332 | ||
333 | /// <summary> | 333 | /// <summary> |
334 | /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret. | 334 | /// DEPRECATED. Attempts to authenticate a region by comparing a shared secret. |
335 | /// </summary> | 335 | /// </summary> |
336 | /// <param name="uuid">The UUID of the challenger</param> | 336 | /// <param name="uuid">The UUID of the challenger</param> |
337 | /// <param name="handle">The attempted regionHandle of the challenger</param> | 337 | /// <param name="handle">The attempted regionHandle of the challenger</param> |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs index 4d42f19..397ef82 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs | |||
@@ -114,13 +114,12 @@ namespace OpenSim.Framework.Data.SQLite | |||
114 | /// <summary> | 114 | /// <summary> |
115 | /// Returns a sim profile from it's Region name string | 115 | /// Returns a sim profile from it's Region name string |
116 | /// </summary> | 116 | /// </summary> |
117 | /// <param name="uuid">The region name search query</param> | 117 | /// <param name="regionName">The region name search query</param> |
118 | /// <returns>The sim profile</returns> | 118 | /// <returns>The sim profile</returns> |
119 | public RegionProfileData GetProfileByString(string regionName) | 119 | public RegionProfileData GetProfileByString(string regionName) |
120 | { | 120 | { |
121 | if (regionName.Length > 2) | 121 | if (regionName.Length > 2) |
122 | { | 122 | { |
123 | |||
124 | Dictionary<string, string> param = new Dictionary<string, string>(); | 123 | Dictionary<string, string> param = new Dictionary<string, string>(); |
125 | // Add % because this is a like query. | 124 | // Add % because this is a like query. |
126 | param["?regionName"] = regionName + "%"; | 125 | param["?regionName"] = regionName + "%"; |
@@ -133,7 +132,6 @@ namespace OpenSim.Framework.Data.SQLite | |||
133 | result.Dispose(); | 132 | result.Dispose(); |
134 | 133 | ||
135 | return row; | 134 | return row; |
136 | |||
137 | } | 135 | } |
138 | else | 136 | else |
139 | { | 137 | { |
@@ -142,7 +140,6 @@ namespace OpenSim.Framework.Data.SQLite | |||
142 | } | 140 | } |
143 | } | 141 | } |
144 | 142 | ||
145 | |||
146 | /// <summary> | 143 | /// <summary> |
147 | /// Returns a sim profile from it's UUID | 144 | /// Returns a sim profile from it's UUID |
148 | /// </summary> | 145 | /// </summary> |
@@ -191,7 +188,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
191 | } | 188 | } |
192 | 189 | ||
193 | /// <summary> | 190 | /// <summary> |
194 | /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret. | 191 | /// DEPRECATED. Attempts to authenticate a region by comparing a shared secret. |
195 | /// </summary> | 192 | /// </summary> |
196 | /// <param name="uuid">The UUID of the challenger</param> | 193 | /// <param name="uuid">The UUID of the challenger</param> |
197 | /// <param name="handle">The attempted regionHandle of the challenger</param> | 194 | /// <param name="handle">The attempted regionHandle of the challenger</param> |
diff --git a/OpenSim/Framework/Data/RegionProfileData.cs b/OpenSim/Framework/Data/RegionProfileData.cs index f736571..84713b4 100644 --- a/OpenSim/Framework/Data/RegionProfileData.cs +++ b/OpenSim/Framework/Data/RegionProfileData.cs | |||
@@ -56,7 +56,6 @@ namespace OpenSim.Framework.Data | |||
56 | /// Coordinates of the region | 56 | /// Coordinates of the region |
57 | /// </summary> | 57 | /// </summary> |
58 | public uint regionLocX; | 58 | public uint regionLocX; |
59 | |||
60 | public uint regionLocY; | 59 | public uint regionLocY; |
61 | public uint regionLocZ; // Reserved (round-robin, layers, etc) | 60 | public uint regionLocZ; // Reserved (round-robin, layers, etc) |
62 | 61 | ||
@@ -65,7 +64,6 @@ namespace OpenSim.Framework.Data | |||
65 | /// </summary> | 64 | /// </summary> |
66 | /// <remarks>Not very secure, needs improvement.</remarks> | 65 | /// <remarks>Not very secure, needs improvement.</remarks> |
67 | public string regionSendKey = String.Empty; | 66 | public string regionSendKey = String.Empty; |
68 | |||
69 | public string regionRecvKey = String.Empty; | 67 | public string regionRecvKey = String.Empty; |
70 | public string regionSecret = String.Empty; | 68 | public string regionSecret = String.Empty; |
71 | 69 | ||
@@ -78,7 +76,6 @@ namespace OpenSim.Framework.Data | |||
78 | /// Information about the server that the region is currently hosted on | 76 | /// Information about the server that the region is currently hosted on |
79 | /// </summary> | 77 | /// </summary> |
80 | public string serverIP = String.Empty; | 78 | public string serverIP = String.Empty; |
81 | |||
82 | public uint serverPort; | 79 | public uint serverPort; |
83 | public string serverURI = String.Empty; | 80 | public string serverURI = String.Empty; |
84 | 81 | ||
@@ -90,7 +87,6 @@ namespace OpenSim.Framework.Data | |||
90 | /// Set of optional overrides. Can be used to create non-eulicidean spaces. | 87 | /// Set of optional overrides. Can be used to create non-eulicidean spaces. |
91 | /// </summary> | 88 | /// </summary> |
92 | public ulong regionNorthOverrideHandle; | 89 | public ulong regionNorthOverrideHandle; |
93 | |||
94 | public ulong regionSouthOverrideHandle; | 90 | public ulong regionSouthOverrideHandle; |
95 | public ulong regionEastOverrideHandle; | 91 | public ulong regionEastOverrideHandle; |
96 | public ulong regionWestOverrideHandle; | 92 | public ulong regionWestOverrideHandle; |
@@ -133,7 +129,6 @@ namespace OpenSim.Framework.Data | |||
133 | /// </summary> | 129 | /// </summary> |
134 | public LLUUID originUUID; | 130 | public LLUUID originUUID; |
135 | 131 | ||
136 | |||
137 | /// <summary> | 132 | /// <summary> |
138 | /// Get Sim profile data from grid server when in grid mode | 133 | /// Get Sim profile data from grid server when in grid mode |
139 | /// </summary> | 134 | /// </summary> |
@@ -184,7 +179,7 @@ namespace OpenSim.Framework.Data | |||
184 | /// <param name="gridserver_recvkey"></param> | 179 | /// <param name="gridserver_recvkey"></param> |
185 | /// <returns>The sim profile. Null if there was a request failure</returns> | 180 | /// <returns>The sim profile. Null if there was a request failure</returns> |
186 | public static RegionProfileData RequestSimProfileData(ulong region_handle, string gridserver_url, | 181 | public static RegionProfileData RequestSimProfileData(ulong region_handle, string gridserver_url, |
187 | string gridserver_sendkey, string gridserver_recvkey) | 182 | string gridserver_sendkey, string gridserver_recvkey) |
188 | { | 183 | { |
189 | Hashtable requestData = new Hashtable(); | 184 | Hashtable requestData = new Hashtable(); |
190 | requestData["region_handle"] = region_handle.ToString(); | 185 | requestData["region_handle"] = region_handle.ToString(); |
@@ -226,7 +221,7 @@ namespace OpenSim.Framework.Data | |||
226 | /// <param name="gridserver_recvkey"></param> | 221 | /// <param name="gridserver_recvkey"></param> |
227 | /// <returns>The sim profile. Null if there was a request failure</returns> | 222 | /// <returns>The sim profile. Null if there was a request failure</returns> |
228 | public static RegionProfileData RequestSimProfileData(string regionName, string gridserver_url, | 223 | public static RegionProfileData RequestSimProfileData(string regionName, string gridserver_url, |
229 | string gridserver_sendkey, string gridserver_recvkey) | 224 | string gridserver_sendkey, string gridserver_recvkey) |
230 | { | 225 | { |
231 | Hashtable requestData = new Hashtable(); | 226 | Hashtable requestData = new Hashtable(); |
232 | requestData["region_name_search"] = regionName; | 227 | requestData["region_name_search"] = regionName; |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 37ddb3e..e16d15e 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -52,7 +52,6 @@ namespace OpenSim.Framework | |||
52 | // Get a list of invalid file characters (OS dependent) | 52 | // Get a list of invalid file characters (OS dependent) |
53 | private static string regexInvalidFileChars = "[" + new String(Path.GetInvalidFileNameChars()) + "]"; | 53 | private static string regexInvalidFileChars = "[" + new String(Path.GetInvalidFileNameChars()) + "]"; |
54 | 54 | ||
55 | |||
56 | #region Vector Equasions | 55 | #region Vector Equasions |
57 | /// <summary> | 56 | /// <summary> |
58 | /// Get the distance between two 3d vectors | 57 | /// Get the distance between two 3d vectors |
@@ -106,6 +105,7 @@ namespace OpenSim.Framework | |||
106 | 105 | ||
107 | return false; | 106 | return false; |
108 | } | 107 | } |
108 | |||
109 | # endregion | 109 | # endregion |
110 | 110 | ||
111 | public static ulong UIntsToLong(uint X, uint Y) | 111 | public static ulong UIntsToLong(uint X, uint Y) |
@@ -384,8 +384,6 @@ namespace OpenSim.Framework | |||
384 | return System.Text.RegularExpressions.Regex.Replace(filename, @regexInvalidFileChars, string.Empty); ; | 384 | return System.Text.RegularExpressions.Regex.Replace(filename, @regexInvalidFileChars, string.Empty); ; |
385 | } | 385 | } |
386 | 386 | ||
387 | |||
388 | |||
389 | // | 387 | // |
390 | // directory locations | 388 | // directory locations |
391 | // | 389 | // |
@@ -411,23 +409,17 @@ namespace OpenSim.Framework | |||
411 | 409 | ||
412 | public static string configDir() | 410 | public static string configDir() |
413 | { | 411 | { |
414 | string temp; | 412 | return "."; |
415 | temp = "."; | ||
416 | return temp; | ||
417 | } | 413 | } |
418 | 414 | ||
419 | public static string dataDir() | 415 | public static string dataDir() |
420 | { | 416 | { |
421 | string temp; | 417 | return "."; |
422 | temp = "."; | ||
423 | return temp; | ||
424 | } | 418 | } |
425 | 419 | ||
426 | public static string logDir() | 420 | public static string logDir() |
427 | { | 421 | { |
428 | string temp; | 422 | return "."; |
429 | temp = "."; | ||
430 | return temp; | ||
431 | } | 423 | } |
432 | 424 | ||
433 | public static string GetCapsURL(LLUUID userID) | 425 | public static string GetCapsURL(LLUUID userID) |
@@ -549,8 +541,8 @@ namespace OpenSim.Framework | |||
549 | try | 541 | try |
550 | { | 542 | { |
551 | stream = new FileStream( | 543 | stream = new FileStream( |
552 | filename, FileMode.Create, | 544 | filename, FileMode.Create, |
553 | FileAccess.Write, FileShare.None); | 545 | FileAccess.Write, FileShare.None); |
554 | 546 | ||
555 | formatter.Serialize(stream, obj); | 547 | formatter.Serialize(stream, obj); |
556 | } | 548 | } |
@@ -577,8 +569,8 @@ namespace OpenSim.Framework | |||
577 | try | 569 | try |
578 | { | 570 | { |
579 | stream = new FileStream( | 571 | stream = new FileStream( |
580 | filename, FileMode.Open, | 572 | filename, FileMode.Open, |
581 | FileAccess.Read, FileShare.None); | 573 | FileAccess.Read, FileShare.None); |
582 | 574 | ||
583 | ret = formatter.Deserialize(stream); | 575 | ret = formatter.Deserialize(stream); |
584 | } | 576 | } |
@@ -597,6 +589,7 @@ namespace OpenSim.Framework | |||
597 | 589 | ||
598 | return ret; | 590 | return ret; |
599 | } | 591 | } |
592 | |||
600 | public static string[] ParseStartLocationRequest(string startLocationRequest) | 593 | public static string[] ParseStartLocationRequest(string startLocationRequest) |
601 | { | 594 | { |
602 | string[] returnstring = new string[4]; | 595 | string[] returnstring = new string[4]; |
@@ -617,33 +610,22 @@ namespace OpenSim.Framework | |||
617 | 610 | ||
618 | if (splitstr.GetLength(0) == 2) | 611 | if (splitstr.GetLength(0) == 2) |
619 | { | 612 | { |
620 | |||
621 | string[] splitstr2 = splitstr[1].Split('&');//, 4, StringSplitOptions.RemoveEmptyEntries); | 613 | string[] splitstr2 = splitstr[1].Split('&');//, 4, StringSplitOptions.RemoveEmptyEntries); |
622 | 614 | ||
623 | //System.Console.WriteLine("Found " + splitstr2.GetLength(0) + " elements in 2nd split result"); | 615 | //System.Console.WriteLine("Found " + splitstr2.GetLength(0) + " elements in 2nd split result"); |
624 | 616 | ||
625 | if (splitstr2.GetLength(0) >= 1) | 617 | int len = Math.Min(splitstr2.GetLength(0), 4); |
626 | { | 618 | |
627 | returnstring[0] = splitstr2[0]; | 619 | for (int i = 0; i < 4; ++i) |
628 | } | ||
629 | if (splitstr2.GetLength(0) >= 2) | ||
630 | { | ||
631 | returnstring[1] = splitstr2[1]; | ||
632 | } | ||
633 | if (splitstr2.GetLength(0) >= 3) | ||
634 | { | ||
635 | returnstring[2] = splitstr2[2]; | ||
636 | } | ||
637 | if (splitstr2.GetLength(0) >= 4) | ||
638 | { | 620 | { |
639 | returnstring[3] = splitstr2[3]; | 621 | if (len > i) |
622 | { | ||
623 | returnstring[i] = splitstr2[i]; | ||
624 | } | ||
640 | } | 625 | } |
641 | } | 626 | } |
642 | |||
643 | } | 627 | } |
644 | return returnstring; | 628 | return returnstring; |
645 | |||
646 | |||
647 | } | 629 | } |
648 | } | 630 | } |
649 | } | 631 | } |
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 86fc445..56f294c 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -219,6 +219,7 @@ namespace OpenSim.Grid.GridServer | |||
219 | RegionProfileData central_region = getRegion(reqhandle); | 219 | RegionProfileData central_region = getRegion(reqhandle); |
220 | RegionProfileData neighbour; | 220 | RegionProfileData neighbour; |
221 | for (int x = -1; x < 2; x++) | 221 | for (int x = -1; x < 2; x++) |
222 | { | ||
222 | for (int y = -1; y < 2; y++) | 223 | for (int y = -1; y < 2; y++) |
223 | { | 224 | { |
224 | if ( | 225 | if ( |
@@ -230,6 +231,7 @@ namespace OpenSim.Grid.GridServer | |||
230 | getRegion( | 231 | getRegion( |
231 | Util.UIntsToLong((uint)((central_region.regionLocX + x) * Constants.RegionSize), | 232 | Util.UIntsToLong((uint)((central_region.regionLocX + x) * Constants.RegionSize), |
232 | (uint)(central_region.regionLocY + y) * Constants.RegionSize)); | 233 | (uint)(central_region.regionLocY + y) * Constants.RegionSize)); |
234 | |||
233 | response += "<neighbour>"; | 235 | response += "<neighbour>"; |
234 | response += "<sim_ip>" + neighbour.serverIP + "</sim_ip>"; | 236 | response += "<sim_ip>" + neighbour.serverIP + "</sim_ip>"; |
235 | response += "<sim_port>" + neighbour.serverPort.ToString() + "</sim_port>"; | 237 | response += "<sim_port>" + neighbour.serverPort.ToString() + "</sim_port>"; |
@@ -239,23 +241,20 @@ namespace OpenSim.Grid.GridServer | |||
239 | response += "</neighbour>"; | 241 | response += "</neighbour>"; |
240 | } | 242 | } |
241 | } | 243 | } |
244 | } | ||
242 | return response; | 245 | return response; |
243 | } | 246 | } |
244 | 247 | ||
245 | protected virtual bool ValidateOverwrite(RegionProfileData sim, RegionProfileData existingSim) | 248 | protected virtual bool ValidateOverwrite(RegionProfileData sim, RegionProfileData existingSim) |
246 | { | 249 | { |
247 | bool validated; | 250 | return (existingSim.regionRecvKey == sim.regionRecvKey && |
248 | validated = (existingSim.regionRecvKey == sim.regionRecvKey && | 251 | existingSim.regionSendKey == sim.regionSendKey); |
249 | existingSim.regionSendKey == sim.regionSendKey); | ||
250 | return validated; | ||
251 | } | 252 | } |
252 | 253 | ||
253 | protected virtual bool ValidateNewRegion(RegionProfileData sim) | 254 | protected virtual bool ValidateNewRegion(RegionProfileData sim) |
254 | { | 255 | { |
255 | bool validated; | 256 | return (sim.regionRecvKey == Config.SimSendKey && |
256 | validated = (sim.regionRecvKey == Config.SimSendKey && | 257 | sim.regionSendKey == Config.SimRecvKey); |
257 | sim.regionSendKey == Config.SimRecvKey); | ||
258 | return validated; | ||
259 | } | 258 | } |
260 | 259 | ||
261 | private XmlRpcResponse ErrorResponse(string error) | 260 | private XmlRpcResponse ErrorResponse(string error) |
@@ -274,17 +273,13 @@ namespace OpenSim.Grid.GridServer | |||
274 | /// <returns>Startup parameters</returns> | 273 | /// <returns>Startup parameters</returns> |
275 | public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request) | 274 | public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request) |
276 | { | 275 | { |
277 | |||
278 | RegionProfileData sim; | 276 | RegionProfileData sim; |
279 | RegionProfileData existingSim; | 277 | RegionProfileData existingSim; |
280 | 278 | ||
281 | Hashtable requestData = (Hashtable)request.Params[0]; | 279 | Hashtable requestData = (Hashtable)request.Params[0]; |
282 | LLUUID uuid; | 280 | LLUUID uuid; |
283 | 281 | ||
284 | if (requestData.ContainsKey("UUID") && LLUUID.TryParse((string)requestData["UUID"], out uuid)) | 282 | if (!requestData.ContainsKey("UUID") || !LLUUID.TryParse((string)requestData["UUID"], out uuid)) |
285 | { | ||
286 | } | ||
287 | else | ||
288 | { | 283 | { |
289 | m_log.Info("[GRID]: Region connected without a UUID, ignoring."); | 284 | m_log.Info("[GRID]: Region connected without a UUID, ignoring."); |
290 | return ErrorResponse("No UUID passed to grid server - unable to connect you"); | 285 | return ErrorResponse("No UUID passed to grid server - unable to connect you"); |
@@ -459,6 +454,7 @@ namespace OpenSim.Grid.GridServer | |||
459 | else | 454 | else |
460 | { | 455 | { |
461 | for (int x = -1; x < 2; x++) | 456 | for (int x = -1; x < 2; x++) |
457 | { | ||
462 | for (int y = -1; y < 2; y++) | 458 | for (int y = -1; y < 2; y++) |
463 | { | 459 | { |
464 | if ( | 460 | if ( |
@@ -482,6 +478,7 @@ namespace OpenSim.Grid.GridServer | |||
482 | if (neighbour.UUID != sim.UUID) SimNeighboursData.Add(NeighbourBlock); | 478 | if (neighbour.UUID != sim.UUID) SimNeighboursData.Add(NeighbourBlock); |
483 | } | 479 | } |
484 | } | 480 | } |
481 | } | ||
485 | } | 482 | } |
486 | return SimNeighboursData; | 483 | return SimNeighboursData; |
487 | } | 484 | } |
@@ -505,7 +502,6 @@ namespace OpenSim.Grid.GridServer | |||
505 | sim.regionUserSendKey = Config.UserSendKey; | 502 | sim.regionUserSendKey = Config.UserSendKey; |
506 | sim.regionUserRecvKey = Config.UserRecvKey; | 503 | sim.regionUserRecvKey = Config.UserRecvKey; |
507 | 504 | ||
508 | |||
509 | sim.serverIP = (string)requestData["sim_ip"]; | 505 | sim.serverIP = (string)requestData["sim_ip"]; |
510 | sim.serverPort = Convert.ToUInt32((string)requestData["sim_port"]); | 506 | sim.serverPort = Convert.ToUInt32((string)requestData["sim_port"]); |
511 | sim.httpPort = Convert.ToUInt32((string)requestData["http_port"]); | 507 | sim.httpPort = Convert.ToUInt32((string)requestData["http_port"]); |
@@ -514,7 +510,6 @@ namespace OpenSim.Grid.GridServer | |||
514 | sim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]); | 510 | sim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]); |
515 | sim.regionLocZ = 0; | 511 | sim.regionLocZ = 0; |
516 | 512 | ||
517 | |||
518 | LLUUID textureID; | 513 | LLUUID textureID; |
519 | if (LLUUID.TryParse((string)requestData["map-image-id"], out textureID)) | 514 | if (LLUUID.TryParse((string)requestData["map-image-id"], out textureID)) |
520 | { | 515 | { |
@@ -650,7 +645,7 @@ namespace OpenSim.Grid.GridServer | |||
650 | else | 645 | else |
651 | { | 646 | { |
652 | m_log.Info("[DATA]: found " + (string)simData.regionName + " regionHandle = " + | 647 | m_log.Info("[DATA]: found " + (string)simData.regionName + " regionHandle = " + |
653 | (string)requestData["region_handle"]); | 648 | (string)requestData["region_handle"]); |
654 | responseData["sim_ip"] = Util.GetHostFromDNS(simData.serverIP).ToString(); | 649 | responseData["sim_ip"] = Util.GetHostFromDNS(simData.serverIP).ToString(); |
655 | responseData["sim_port"] = simData.serverPort.ToString(); | 650 | responseData["sim_port"] = simData.serverPort.ToString(); |
656 | responseData["server_uri"] = simData.serverURI; | 651 | responseData["server_uri"] = simData.serverURI; |
@@ -730,7 +725,7 @@ namespace OpenSim.Grid.GridServer | |||
730 | simProfileList.Add(simProfileBlock); | 725 | simProfileList.Add(simProfileBlock); |
731 | } | 726 | } |
732 | m_log.Info("[MAP]: Fast map " + simProfileList.Count.ToString() + | 727 | m_log.Info("[MAP]: Fast map " + simProfileList.Count.ToString() + |
733 | " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")"); | 728 | " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")"); |
734 | } | 729 | } |
735 | else | 730 | else |
736 | { | 731 | { |
@@ -765,7 +760,7 @@ namespace OpenSim.Grid.GridServer | |||
765 | } | 760 | } |
766 | } | 761 | } |
767 | m_log.Info("[MAP]: Std map " + simProfileList.Count.ToString() + | 762 | m_log.Info("[MAP]: Std map " + simProfileList.Count.ToString() + |
768 | " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")"); | 763 | " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")"); |
769 | } | 764 | } |
770 | 765 | ||
771 | responseData["sim-profiles"] = simProfileList; | 766 | responseData["sim-profiles"] = simProfileList; |
@@ -852,14 +847,14 @@ namespace OpenSim.Grid.GridServer | |||
852 | public string RestSetSimMethod(string request, string path, string param) | 847 | public string RestSetSimMethod(string request, string path, string param) |
853 | { | 848 | { |
854 | Console.WriteLine("Processing region update via REST method"); | 849 | Console.WriteLine("Processing region update via REST method"); |
855 | RegionProfileData TheSim; | 850 | RegionProfileData theSim; |
856 | TheSim = getRegion(new LLUUID(param)); | 851 | theSim = getRegion(new LLUUID(param)); |
857 | if ((TheSim) == null) | 852 | if (theSim == null) |
858 | { | 853 | { |
859 | TheSim = new RegionProfileData(); | 854 | theSim = new RegionProfileData(); |
860 | LLUUID UUID = new LLUUID(param); | 855 | LLUUID UUID = new LLUUID(param); |
861 | TheSim.UUID = UUID; | 856 | theSim.UUID = UUID; |
862 | TheSim.regionRecvKey = Config.SimRecvKey; | 857 | theSim.regionRecvKey = Config.SimRecvKey; |
863 | } | 858 | } |
864 | 859 | ||
865 | XmlDocument doc = new XmlDocument(); | 860 | XmlDocument doc = new XmlDocument(); |
@@ -877,59 +872,59 @@ namespace OpenSim.Grid.GridServer | |||
877 | return "ERROR! bad XML - expected sim tag"; | 872 | return "ERROR! bad XML - expected sim tag"; |
878 | } | 873 | } |
879 | 874 | ||
880 | //TheSim.regionSendKey = Cfg; | 875 | //theSim.regionSendKey = Cfg; |
881 | TheSim.regionRecvKey = Config.SimRecvKey; | 876 | theSim.regionRecvKey = Config.SimRecvKey; |
882 | TheSim.regionSendKey = Config.SimSendKey; | 877 | theSim.regionSendKey = Config.SimSendKey; |
883 | TheSim.regionSecret = Config.SimRecvKey; | 878 | theSim.regionSecret = Config.SimRecvKey; |
884 | TheSim.regionDataURI = String.Empty; | 879 | theSim.regionDataURI = String.Empty; |
885 | TheSim.regionAssetURI = Config.DefaultAssetServer; | 880 | theSim.regionAssetURI = Config.DefaultAssetServer; |
886 | TheSim.regionAssetRecvKey = Config.AssetRecvKey; | 881 | theSim.regionAssetRecvKey = Config.AssetRecvKey; |
887 | TheSim.regionAssetSendKey = Config.AssetSendKey; | 882 | theSim.regionAssetSendKey = Config.AssetSendKey; |
888 | TheSim.regionUserURI = Config.DefaultUserServer; | 883 | theSim.regionUserURI = Config.DefaultUserServer; |
889 | TheSim.regionUserSendKey = Config.UserSendKey; | 884 | theSim.regionUserSendKey = Config.UserSendKey; |
890 | TheSim.regionUserRecvKey = Config.UserRecvKey; | 885 | theSim.regionUserRecvKey = Config.UserRecvKey; |
891 | 886 | ||
892 | for (int i = 0; i < simnode.ChildNodes.Count; i++) | 887 | for (int i = 0; i < simnode.ChildNodes.Count; i++) |
893 | { | 888 | { |
894 | switch (simnode.ChildNodes[i].Name) | 889 | switch (simnode.ChildNodes[i].Name) |
895 | { | 890 | { |
896 | case "regionname": | 891 | case "regionname": |
897 | TheSim.regionName = simnode.ChildNodes[i].InnerText; | 892 | theSim.regionName = simnode.ChildNodes[i].InnerText; |
898 | break; | 893 | break; |
899 | 894 | ||
900 | case "sim_ip": | 895 | case "sim_ip": |
901 | TheSim.serverIP = simnode.ChildNodes[i].InnerText; | 896 | theSim.serverIP = simnode.ChildNodes[i].InnerText; |
902 | break; | 897 | break; |
903 | 898 | ||
904 | case "sim_port": | 899 | case "sim_port": |
905 | TheSim.serverPort = Convert.ToUInt32(simnode.ChildNodes[i].InnerText); | 900 | theSim.serverPort = Convert.ToUInt32(simnode.ChildNodes[i].InnerText); |
906 | break; | 901 | break; |
907 | 902 | ||
908 | case "region_locx": | 903 | case "region_locx": |
909 | TheSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText); | 904 | theSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText); |
910 | TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * Constants.RegionSize), (TheSim.regionLocY * Constants.RegionSize)); | 905 | theSim.regionHandle = Helpers.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize)); |
911 | break; | 906 | break; |
912 | 907 | ||
913 | case "region_locy": | 908 | case "region_locy": |
914 | TheSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText); | 909 | theSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText); |
915 | TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * Constants.RegionSize), (TheSim.regionLocY * Constants.RegionSize)); | 910 | theSim.regionHandle = Helpers.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize)); |
916 | break; | 911 | break; |
917 | } | 912 | } |
918 | } | 913 | } |
919 | 914 | ||
920 | TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/"; | 915 | theSim.serverURI = "http://" + theSim.serverIP + ":" + theSim.serverPort + "/"; |
921 | bool requirePublic = false; | 916 | bool requirePublic = false; |
922 | bool requireValid = true; | 917 | bool requireValid = true; |
923 | 918 | ||
924 | if (requirePublic && | 919 | if (requirePublic && |
925 | (TheSim.serverIP.StartsWith("172.16") || TheSim.serverIP.StartsWith("192.168") || | 920 | (theSim.serverIP.StartsWith("172.16") || theSim.serverIP.StartsWith("192.168") || |
926 | TheSim.serverIP.StartsWith("10.") || TheSim.serverIP.StartsWith("0.") || | 921 | theSim.serverIP.StartsWith("10.") || theSim.serverIP.StartsWith("0.") || |
927 | TheSim.serverIP.StartsWith("255."))) | 922 | theSim.serverIP.StartsWith("255."))) |
928 | { | 923 | { |
929 | return "ERROR! Servers must register with public addresses."; | 924 | return "ERROR! Servers must register with public addresses."; |
930 | } | 925 | } |
931 | 926 | ||
932 | if (requireValid && (TheSim.serverIP.StartsWith("0.") || TheSim.serverIP.StartsWith("255."))) | 927 | if (requireValid && (theSim.serverIP.StartsWith("0.") || theSim.serverIP.StartsWith("255."))) |
933 | { | 928 | { |
934 | return "ERROR! 0.*.*.* / 255.*.*.* Addresses are invalid, please check your server config and try again"; | 929 | return "ERROR! 0.*.*.* / 255.*.*.* Addresses are invalid, please check your server config and try again"; |
935 | } | 930 | } |
@@ -937,27 +932,28 @@ namespace OpenSim.Grid.GridServer | |||
937 | try | 932 | try |
938 | { | 933 | { |
939 | m_log.Info("[DATA]: " + | 934 | m_log.Info("[DATA]: " + |
940 | "Updating / adding via " + _plugins.Count + " storage provider(s) registered."); | 935 | "Updating / adding via " + _plugins.Count + " storage provider(s) registered."); |
936 | |||
941 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) | 937 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) |
942 | { | 938 | { |
943 | try | 939 | try |
944 | { | 940 | { |
945 | //Check reservations | 941 | //Check reservations |
946 | ReservationData reserveData = | 942 | ReservationData reserveData = |
947 | kvp.Value.GetReservationAtPoint(TheSim.regionLocX, TheSim.regionLocY); | 943 | kvp.Value.GetReservationAtPoint(theSim.regionLocX, theSim.regionLocY); |
948 | if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || | 944 | if ((reserveData != null && reserveData.gridRecvKey == theSim.regionRecvKey) || |
949 | (reserveData == null && authkeynode.InnerText != TheSim.regionRecvKey)) | 945 | (reserveData == null && authkeynode.InnerText != theSim.regionRecvKey)) |
950 | { | 946 | { |
951 | kvp.Value.AddProfile(TheSim); | 947 | kvp.Value.AddProfile(theSim); |
952 | m_log.Info("[grid]: New sim added to grid (" + TheSim.regionName + ")"); | 948 | m_log.Info("[grid]: New sim added to grid (" + theSim.regionName + ")"); |
953 | logToDB(TheSim.UUID.ToString(), "RestSetSimMethod", String.Empty, 5, | 949 | logToDB(theSim.UUID.ToString(), "RestSetSimMethod", String.Empty, 5, |
954 | "Region successfully updated and connected to grid."); | 950 | "Region successfully updated and connected to grid."); |
955 | } | 951 | } |
956 | else | 952 | else |
957 | { | 953 | { |
958 | m_log.Warn("[grid]: " + | 954 | m_log.Warn("[grid]: " + |
959 | "Unable to update region (RestSetSimMethod): Incorrect reservation auth key."); | 955 | "Unable to update region (RestSetSimMethod): Incorrect reservation auth key."); |
960 | // Wanted: " + reserveData.gridRecvKey + ", Got: " + TheSim.regionRecvKey + "."); | 956 | // Wanted: " + reserveData.gridRecvKey + ", Got: " + theSim.regionRecvKey + "."); |
961 | return "Unable to update region (RestSetSimMethod): Incorrect auth key."; | 957 | return "Unable to update region (RestSetSimMethod): Incorrect auth key."; |
962 | } | 958 | } |
963 | } | 959 | } |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 6cc34d5..823733f 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -64,8 +64,6 @@ namespace OpenSim.Grid.UserServer | |||
64 | m_config = config; | 64 | m_config = config; |
65 | } | 65 | } |
66 | 66 | ||
67 | |||
68 | |||
69 | /// <summary> | 67 | /// <summary> |
70 | /// Customises the login response and fills in missing values. | 68 | /// Customises the login response and fills in missing values. |
71 | /// </summary> | 69 | /// </summary> |
@@ -93,7 +91,6 @@ namespace OpenSim.Grid.UserServer | |||
93 | RegionProfileData.RequestSimProfileData( | 91 | RegionProfileData.RequestSimProfileData( |
94 | theUser.homeRegion, m_config.GridServerURL, | 92 | theUser.homeRegion, m_config.GridServerURL, |
95 | m_config.GridSendKey, m_config.GridRecvKey); | 93 | m_config.GridSendKey, m_config.GridRecvKey); |
96 | |||
97 | } | 94 | } |
98 | else | 95 | else |
99 | { | 96 | { |
@@ -123,7 +120,6 @@ namespace OpenSim.Grid.UserServer | |||
123 | theUser.homeRegion, m_config.GridServerURL, | 120 | theUser.homeRegion, m_config.GridServerURL, |
124 | m_config.GridSendKey, m_config.GridRecvKey); | 121 | m_config.GridSendKey, m_config.GridRecvKey); |
125 | } | 122 | } |
126 | |||
127 | } | 123 | } |
128 | } | 124 | } |
129 | 125 | ||
@@ -178,7 +174,6 @@ namespace OpenSim.Grid.UserServer | |||
178 | 174 | ||
179 | // Update agent with target sim | 175 | // Update agent with target sim |
180 | 176 | ||
181 | |||
182 | m_log.Info("[LOGIN]: Telling " | 177 | m_log.Info("[LOGIN]: Telling " |
183 | + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " + | 178 | + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " + |
184 | SimInfo.regionLocX + "," + SimInfo.regionLocY + " to expect user connection"); | 179 | SimInfo.regionLocX + "," + SimInfo.regionLocY + " to expect user connection"); |
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 8cc1312..de891a2 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -212,6 +212,7 @@ namespace OpenSim.Region.Communications.Local | |||
212 | } | 212 | } |
213 | return mapBlocks; | 213 | return mapBlocks; |
214 | } | 214 | } |
215 | |||
215 | public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) | 216 | public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) |
216 | { | 217 | { |
217 | if (m_regionListeners.ContainsKey(regionHandle)) | 218 | if (m_regionListeners.ContainsKey(regionHandle)) |
@@ -245,7 +246,7 @@ namespace OpenSim.Region.Communications.Local | |||
245 | return false; | 246 | return false; |
246 | } | 247 | } |
247 | 248 | ||
248 | // This function Is only here to keep this class in line with the Grid Interface. | 249 | // This function is only here to keep this class in line with the Grid Interface. |
249 | // It never gets called. | 250 | // It never gets called. |
250 | public virtual Dictionary<string, string> GetGridSettings() | 251 | public virtual Dictionary<string, string> GetGridSettings() |
251 | { | 252 | { |
@@ -291,14 +292,15 @@ namespace OpenSim.Region.Communications.Local | |||
291 | } | 292 | } |
292 | return false; | 293 | return false; |
293 | } | 294 | } |
294 | /// <summary> | 295 | |
296 | /// <summary> | ||
297 | /// | ||
295 | /// </summary> | 298 | /// </summary> |
296 | /// <param name="regionHandle"></param> | 299 | /// <param name="regionHandle"></param> |
297 | /// <param name="agentData"></param> | 300 | /// <param name="agentData"></param> |
298 | /// <returns></returns> | 301 | /// <returns></returns> |
299 | /// | ||
300 | public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) | 302 | public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) |
301 | //should change from agentCircuitData | 303 | // TODO: should change from agentCircuitData |
302 | { | 304 | { |
303 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); | 305 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); |
304 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname); | 306 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname); |
@@ -352,8 +354,6 @@ namespace OpenSim.Region.Communications.Local | |||
352 | return false; | 354 | return false; |
353 | } | 355 | } |
354 | 356 | ||
355 | |||
356 | |||
357 | public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId) | 357 | public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId) |
358 | { | 358 | { |
359 | if (m_regionListeners.ContainsKey(regionHandle)) | 359 | if (m_regionListeners.ContainsKey(regionHandle)) |
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index eff597e..dca8e65 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -68,7 +68,6 @@ namespace OpenSim.Region.Communications.Local | |||
68 | authUsers = authenticate; | 68 | authUsers = authenticate; |
69 | } | 69 | } |
70 | 70 | ||
71 | |||
72 | public override UserProfileData GetTheUser(string firstname, string lastname) | 71 | public override UserProfileData GetTheUser(string firstname, string lastname) |
73 | { | 72 | { |
74 | UserProfileData profile = m_userManager.GetUserProfile(firstname, lastname); | 73 | UserProfileData profile = m_userManager.GetUserProfile(firstname, lastname); |
@@ -189,6 +188,7 @@ namespace OpenSim.Region.Communications.Local | |||
189 | m_log.Warn("[LOGIN]: Not found region " + currentRegion); | 188 | m_log.Warn("[LOGIN]: Not found region " + currentRegion); |
190 | } | 189 | } |
191 | } | 190 | } |
191 | |||
192 | private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) | 192 | private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) |
193 | { | 193 | { |
194 | LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList(); | 194 | LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList(); |
@@ -199,10 +199,10 @@ namespace OpenSim.Region.Communications.Local | |||
199 | buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms; | 199 | buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms; |
200 | buddyitem.BuddyRightsGiven = (int)fl.FriendPerms; | 200 | buddyitem.BuddyRightsGiven = (int)fl.FriendPerms; |
201 | buddylistreturn.AddNewBuddy(buddyitem); | 201 | buddylistreturn.AddNewBuddy(buddyitem); |
202 | |||
203 | } | 202 | } |
204 | return buddylistreturn; | 203 | return buddylistreturn; |
205 | } | 204 | } |
205 | |||
206 | protected override InventoryData CreateInventoryData(LLUUID userID) | 206 | protected override InventoryData CreateInventoryData(LLUUID userID) |
207 | { | 207 | { |
208 | List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID); | 208 | List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID); |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index b7fae65..f324886 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -134,7 +134,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
134 | { | 134 | { |
135 | GridReq = new XmlRpcRequest("simulator_login", SendParams); | 135 | GridReq = new XmlRpcRequest("simulator_login", SendParams); |
136 | GridResp = GridReq.Send(serversInfo.GridURL, 16000); | 136 | GridResp = GridReq.Send(serversInfo.GridURL, 16000); |
137 | } catch (Exception ex) | 137 | } |
138 | catch (Exception ex) | ||
138 | { | 139 | { |
139 | m_log.Error("Unable to connect to grid. Grid server not running?"); | 140 | m_log.Error("Unable to connect to grid. Grid server not running?"); |
140 | throw(ex); | 141 | throw(ex); |
@@ -182,7 +183,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
182 | Hashtable griddatahash = GridRespData; | 183 | Hashtable griddatahash = GridRespData; |
183 | 184 | ||
184 | // Process Response | 185 | // Process Response |
185 | if (GridRespData.ContainsKey("error")) { | 186 | if (GridRespData.ContainsKey("error")) |
187 | { | ||
186 | string errorstring = (string)GridRespData["error"]; | 188 | string errorstring = (string)GridRespData["error"]; |
187 | m_log.Error("Unable to connect to grid: " + errorstring); | 189 | m_log.Error("Unable to connect to grid: " + errorstring); |
188 | return false; | 190 | return false; |
@@ -202,7 +204,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
202 | returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]); | 204 | returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]); |
203 | } | 205 | } |
204 | 206 | ||
205 | |||
206 | m_queuedGridSettings.Clear(); | 207 | m_queuedGridSettings.Clear(); |
207 | } | 208 | } |
208 | 209 | ||
@@ -308,10 +309,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
308 | return regionInfo; | 309 | return regionInfo; |
309 | } | 310 | } |
310 | 311 | ||
311 | if (m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo)) | 312 | if (!m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo)) |
312 | { | ||
313 | } | ||
314 | else | ||
315 | { | 313 | { |
316 | try | 314 | try |
317 | { | 315 | { |
@@ -366,54 +364,51 @@ namespace OpenSim.Region.Communications.OGS1 | |||
366 | // Don't use this method. It's only for SLURLS and Logins | 364 | // Don't use this method. It's only for SLURLS and Logins |
367 | RegionInfo regionInfo = null; | 365 | RegionInfo regionInfo = null; |
368 | try | 366 | try |
369 | { | 367 | { |
370 | Hashtable requestData = new Hashtable(); | 368 | Hashtable requestData = new Hashtable(); |
371 | requestData["region_name_search"] = regionName; | 369 | requestData["region_name_search"] = regionName; |
372 | requestData["authkey"] = serversInfo.GridSendKey; | 370 | requestData["authkey"] = serversInfo.GridSendKey; |
373 | ArrayList SendParams = new ArrayList(); | 371 | ArrayList SendParams = new ArrayList(); |
374 | SendParams.Add(requestData); | 372 | SendParams.Add(requestData); |
375 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); | 373 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); |
376 | XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); | 374 | XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); |
377 | 375 | ||
378 | Hashtable responseData = (Hashtable) GridResp.Value; | 376 | Hashtable responseData = (Hashtable) GridResp.Value; |
379 | 377 | ||
380 | if (responseData.ContainsKey("error")) | 378 | if (responseData.ContainsKey("error")) |
381 | { | 379 | { |
382 | m_log.Error("[OGS1 GRID SERVICES]: Error received from grid server" + responseData["error"]); | 380 | m_log.Error("[OGS1 GRID SERVICES]: Error received from grid server" + responseData["error"]); |
383 | return null; | 381 | return null; |
384 | } | 382 | } |
385 | 383 | ||
386 | uint regX = Convert.ToUInt32((string) responseData["region_locx"]); | 384 | uint regX = Convert.ToUInt32((string) responseData["region_locx"]); |
387 | uint regY = Convert.ToUInt32((string) responseData["region_locy"]); | 385 | uint regY = Convert.ToUInt32((string) responseData["region_locy"]); |
388 | string internalIpStr = (string) responseData["sim_ip"]; | 386 | string internalIpStr = (string) responseData["sim_ip"]; |
389 | uint port = Convert.ToUInt32(responseData["sim_port"]); | 387 | uint port = Convert.ToUInt32(responseData["sim_port"]); |
390 | string externalUri = (string) responseData["sim_uri"]; | 388 | string externalUri = (string) responseData["sim_uri"]; |
391 | 389 | ||
392 | IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port); | 390 | IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port); |
393 | string neighbourExternalUri = externalUri; | 391 | string neighbourExternalUri = externalUri; |
394 | regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr); | 392 | regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr); |
395 | 393 | ||
396 | regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); | 394 | regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
397 | regionInfo.RemotingAddress = internalIpStr; | 395 | regionInfo.RemotingAddress = internalIpStr; |
398 | 396 | ||
399 | regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); | 397 | regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); |
400 | regionInfo.RegionName = (string) responseData["region_name"]; | 398 | regionInfo.RegionName = (string) responseData["region_name"]; |
401 | 399 | ||
402 | m_remoteRegionInfoCache.Add(regionInfo.RegionHandle, regionInfo); | 400 | m_remoteRegionInfoCache.Add(regionInfo.RegionHandle, regionInfo); |
403 | } | 401 | } |
404 | catch (WebException) | 402 | catch (WebException) |
405 | { | 403 | { |
406 | m_log.Error("[OGS1 GRID SERVICES]: " + | 404 | m_log.Error("[OGS1 GRID SERVICES]: " + |
407 | "Region lookup failed for: " + regionName + | 405 | "Region lookup failed for: " + regionName + |
408 | " - Is the GridServer down?"); | 406 | " - Is the GridServer down?"); |
409 | } | 407 | } |
410 | |||
411 | 408 | ||
412 | return regionInfo; | 409 | return regionInfo; |
413 | |||
414 | } | 410 | } |
415 | 411 | ||
416 | |||
417 | /// <summary> | 412 | /// <summary> |
418 | /// | 413 | /// |
419 | /// </summary> | 414 | /// </summary> |
@@ -465,9 +460,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
465 | return neighbours; | 460 | return neighbours; |
466 | } | 461 | } |
467 | 462 | ||
468 | |||
469 | |||
470 | |||
471 | /// <summary> | 463 | /// <summary> |
472 | /// Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates | 464 | /// Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates |
473 | /// </summary> | 465 | /// </summary> |
@@ -519,7 +511,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
519 | return response; | 511 | return response; |
520 | } | 512 | } |
521 | 513 | ||
522 | |||
523 | // Grid Request Processing | 514 | // Grid Request Processing |
524 | /// <summary> | 515 | /// <summary> |
525 | /// Received from the user server when a user starts logging in. This call allows | 516 | /// Received from the user server when a user starts logging in. This call allows |
@@ -596,7 +587,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
596 | InterRegionSingleton.Instance.OnRegionUp += TriggerRegionUp; | 587 | InterRegionSingleton.Instance.OnRegionUp += TriggerRegionUp; |
597 | InterRegionSingleton.Instance.OnChildAgentUpdate += TriggerChildAgentUpdate; | 588 | InterRegionSingleton.Instance.OnChildAgentUpdate += TriggerChildAgentUpdate; |
598 | InterRegionSingleton.Instance.OnTellRegionToCloseChildConnection += TriggerTellRegionToCloseChildConnection; | 589 | InterRegionSingleton.Instance.OnTellRegionToCloseChildConnection += TriggerTellRegionToCloseChildConnection; |
599 | |||
600 | } | 590 | } |
601 | 591 | ||
602 | #region Methods called by regions in this instance | 592 | #region Methods called by regions in this instance |
@@ -629,10 +619,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
629 | 619 | ||
630 | 620 | ||
631 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | 621 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( |
632 | typeof(OGS1InterRegionRemoting), | 622 | typeof(OGS1InterRegionRemoting), |
633 | "tcp://" + regInfo.RemotingAddress + | 623 | "tcp://" + regInfo.RemotingAddress + |
634 | ":" + regInfo.RemotingPort + | 624 | ":" + regInfo.RemotingPort + |
635 | "/InterRegions"); | 625 | "/InterRegions"); |
636 | 626 | ||
637 | if (remObject != null) | 627 | if (remObject != null) |
638 | { | 628 | { |
@@ -738,29 +728,27 @@ namespace OpenSim.Region.Communications.OGS1 | |||
738 | //don't want to be creating a new link to the remote instance every time like we are here | 728 | //don't want to be creating a new link to the remote instance every time like we are here |
739 | bool retValue = false; | 729 | bool retValue = false; |
740 | 730 | ||
731 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | ||
732 | typeof(OGS1InterRegionRemoting), | ||
733 | "tcp://" + regInfo.RemotingAddress + | ||
734 | ":" + regInfo.RemotingPort + | ||
735 | "/InterRegions"); | ||
741 | 736 | ||
742 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | 737 | if (remObject != null) |
743 | typeof(OGS1InterRegionRemoting), | 738 | { |
744 | "tcp://" + regInfo.RemotingAddress + | 739 | retValue = remObject.InformRegionOfChildAgent(regionHandle, new sAgentCircuitData(agentData)); |
745 | ":" + regInfo.RemotingPort + | 740 | } |
746 | "/InterRegions"); | 741 | else |
747 | 742 | { | |
748 | if (remObject != null) | 743 | m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found"); |
749 | { | 744 | } |
750 | retValue = remObject.InformRegionOfChildAgent(regionHandle, new sAgentCircuitData(agentData)); | 745 | remObject = null; |
751 | } | 746 | m_log.Info("[OGS1 GRID SERVICES]: " + |
752 | else | 747 | gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " + |
753 | { | 748 | agentData.firstname + " " + agentData.lastname + " and got " + |
754 | m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found"); | 749 | retValue.ToString()); |
755 | } | ||
756 | remObject = null; | ||
757 | m_log.Info("[OGS1 GRID SERVICES]: " + | ||
758 | gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " + | ||
759 | agentData.firstname + " " + agentData.lastname + " and got " + | ||
760 | retValue.ToString()); | ||
761 | |||
762 | return retValue; | ||
763 | 750 | ||
751 | return retValue; | ||
764 | } | 752 | } |
765 | NoteDeadRegion(regionHandle); | 753 | NoteDeadRegion(regionHandle); |
766 | return false; | 754 | return false; |
@@ -849,14 +837,12 @@ namespace OpenSim.Region.Communications.OGS1 | |||
849 | //don't want to be creating a new link to the remote instance every time like we are here | 837 | //don't want to be creating a new link to the remote instance every time like we are here |
850 | bool retValue = false; | 838 | bool retValue = false; |
851 | 839 | ||
852 | |||
853 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( | 840 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( |
854 | typeof ( | 841 | typeof(OGS1InterRegionRemoting), |
855 | OGS1InterRegionRemoting), | 842 | "tcp://" + |
856 | "tcp://" + | 843 | regInfo.RemotingAddress + |
857 | regInfo.RemotingAddress + | 844 | ":" + regInfo.RemotingPort + |
858 | ":" + regInfo.RemotingPort + | 845 | "/InterRegions"); |
859 | "/InterRegions"); | ||
860 | 846 | ||
861 | if (remObject != null) | 847 | if (remObject != null) |
862 | { | 848 | { |
@@ -939,7 +925,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
939 | /// <returns></returns> | 925 | /// <returns></returns> |
940 | public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData) | 926 | public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData) |
941 | { | 927 | { |
942 | int failures = 0; | 928 | int failures = 0; |
943 | lock (m_deadRegionCache) | 929 | lock (m_deadRegionCache) |
944 | { | 930 | { |
945 | if (m_deadRegionCache.ContainsKey(regionHandle)) | 931 | if (m_deadRegionCache.ContainsKey(regionHandle)) |
@@ -963,12 +949,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
963 | //don't want to be creating a new link to the remote instance every time like we are here | 949 | //don't want to be creating a new link to the remote instance every time like we are here |
964 | bool retValue = false; | 950 | bool retValue = false; |
965 | 951 | ||
966 | |||
967 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | 952 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( |
968 | typeof(OGS1InterRegionRemoting), | 953 | typeof(OGS1InterRegionRemoting), |
969 | "tcp://" + regInfo.RemotingAddress + | 954 | "tcp://" + regInfo.RemotingAddress + |
970 | ":" + regInfo.RemotingPort + | 955 | ":" + regInfo.RemotingPort + |
971 | "/InterRegions"); | 956 | "/InterRegions"); |
972 | 957 | ||
973 | if (remObject != null) | 958 | if (remObject != null) |
974 | { | 959 | { |
@@ -980,7 +965,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
980 | } | 965 | } |
981 | remObject = null; | 966 | remObject = null; |
982 | 967 | ||
983 | |||
984 | return retValue; | 968 | return retValue; |
985 | } | 969 | } |
986 | NoteDeadRegion(regionHandle); | 970 | NoteDeadRegion(regionHandle); |
@@ -1050,10 +1034,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1050 | { | 1034 | { |
1051 | bool retValue = false; | 1035 | bool retValue = false; |
1052 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( | 1036 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( |
1053 | typeof (OGS1InterRegionRemoting), | 1037 | typeof (OGS1InterRegionRemoting), |
1054 | "tcp://" + regInfo.RemotingAddress + | 1038 | "tcp://" + regInfo.RemotingAddress + |
1055 | ":" + regInfo.RemotingPort + | 1039 | ":" + regInfo.RemotingPort + |
1056 | "/InterRegions"); | 1040 | "/InterRegions"); |
1041 | |||
1057 | if (remObject != null) | 1042 | if (remObject != null) |
1058 | { | 1043 | { |
1059 | retValue = | 1044 | retValue = |
@@ -1106,10 +1091,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1106 | { | 1091 | { |
1107 | bool retValue = false; | 1092 | bool retValue = false; |
1108 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( | 1093 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( |
1109 | typeof (OGS1InterRegionRemoting), | 1094 | typeof (OGS1InterRegionRemoting), |
1110 | "tcp://" + regInfo.RemotingAddress + | 1095 | "tcp://" + regInfo.RemotingAddress + |
1111 | ":" + regInfo.RemotingPort + | 1096 | ":" + regInfo.RemotingPort + |
1112 | "/InterRegions"); | 1097 | "/InterRegions"); |
1098 | |||
1113 | if (remObject != null) | 1099 | if (remObject != null) |
1114 | { | 1100 | { |
1115 | retValue = | 1101 | retValue = |
@@ -1181,10 +1167,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1181 | { | 1167 | { |
1182 | bool retValue = false; | 1168 | bool retValue = false; |
1183 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( | 1169 | OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( |
1184 | typeof(OGS1InterRegionRemoting), | 1170 | typeof(OGS1InterRegionRemoting), |
1185 | "tcp://" + regInfo.RemotingAddress + | 1171 | "tcp://" + regInfo.RemotingAddress + |
1186 | ":" + regInfo.RemotingPort + | 1172 | ":" + regInfo.RemotingPort + |
1187 | "/InterRegions"); | 1173 | "/InterRegions"); |
1174 | |||
1188 | if (remObject != null) | 1175 | if (remObject != null) |
1189 | { | 1176 | { |
1190 | retValue = | 1177 | retValue = |
@@ -1211,7 +1198,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1211 | //m_log.Debug(e.ToString()); | 1198 | //m_log.Debug(e.ToString()); |
1212 | return false; | 1199 | return false; |
1213 | } | 1200 | } |
1214 | |||
1215 | catch (SocketException e) | 1201 | catch (SocketException e) |
1216 | { | 1202 | { |
1217 | NoteDeadRegion(regionHandle); | 1203 | NoteDeadRegion(regionHandle); |
@@ -1312,7 +1298,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1312 | { | 1298 | { |
1313 | if (m_deadRegionCache.ContainsKey(regionData.RegionHandle)) | 1299 | if (m_deadRegionCache.ContainsKey(regionData.RegionHandle)) |
1314 | { | 1300 | { |
1315 | |||
1316 | m_deadRegionCache.Remove(regionData.RegionHandle); | 1301 | m_deadRegionCache.Remove(regionData.RegionHandle); |
1317 | } | 1302 | } |
1318 | } | 1303 | } |
@@ -1356,7 +1341,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1356 | m_localBackend.TriggerExpectPrim(regionHandle, primID, objData); | 1341 | m_localBackend.TriggerExpectPrim(regionHandle, primID, objData); |
1357 | return true; | 1342 | return true; |
1358 | //m_localBackend. | 1343 | //m_localBackend. |
1359 | |||
1360 | } | 1344 | } |
1361 | catch (RemotingException e) | 1345 | catch (RemotingException e) |
1362 | { | 1346 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 61e1af3..11e94e0 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -177,7 +177,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
177 | 177 | ||
178 | public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result) | 178 | public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result) |
179 | { | 179 | { |
180 | m_log.Warn("Terrain commands have been depreciated."); | 180 | m_log.Warn("Terrain commands have been deprecated."); |
181 | return false; | 181 | return false; |
182 | } | 182 | } |
183 | 183 | ||
@@ -332,11 +332,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
332 | public void SetCurrentSceneTimePhase(int timePhase) | 332 | public void SetCurrentSceneTimePhase(int timePhase) |
333 | { | 333 | { |
334 | ForEachCurrentScene(delegate(Scene scene) | 334 | ForEachCurrentScene(delegate(Scene scene) |
335 | { | 335 | { |
336 | scene.SetTimePhase( | 336 | scene.SetTimePhase( |
337 | timePhase) | 337 | timePhase) |
338 | ; | 338 | ; |
339 | }); | 339 | }); |
340 | } | 340 | } |
341 | 341 | ||
342 | public void ForceCurrentSceneClientUpdate() | 342 | public void ForceCurrentSceneClientUpdate() |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 1119db5..c63e1f7 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -33,9 +33,7 @@ using OpenSim.Framework; | |||
33 | namespace OpenSim.Region.Physics.Manager | 33 | namespace OpenSim.Region.Physics.Manager |
34 | { | 34 | { |
35 | public delegate void PositionUpdate(PhysicsVector position); | 35 | public delegate void PositionUpdate(PhysicsVector position); |
36 | |||
37 | public delegate void VelocityUpdate(PhysicsVector velocity); | 36 | public delegate void VelocityUpdate(PhysicsVector velocity); |
38 | |||
39 | public delegate void OrientationUpdate(Quaternion orientation); | 37 | public delegate void OrientationUpdate(Quaternion orientation); |
40 | 38 | ||
41 | public enum ActorTypes : int | 39 | public enum ActorTypes : int |
@@ -50,7 +48,6 @@ namespace OpenSim.Region.Physics.Manager | |||
50 | { | 48 | { |
51 | // Raising the event on the object, so don't need to provide location.. further up the tree knows that info. | 49 | // Raising the event on the object, so don't need to provide location.. further up the tree knows that info. |
52 | 50 | ||
53 | |||
54 | public int m_colliderType; | 51 | public int m_colliderType; |
55 | public int m_GenericStartEnd; | 52 | public int m_GenericStartEnd; |
56 | //public uint m_LocalID; | 53 | //public uint m_LocalID; |
@@ -88,13 +85,10 @@ namespace OpenSim.Region.Physics.Manager | |||
88 | } | 85 | } |
89 | } | 86 | } |
90 | 87 | ||
91 | |||
92 | public abstract class PhysicsActor | 88 | public abstract class PhysicsActor |
93 | { | 89 | { |
94 | public delegate void RequestTerseUpdate(); | 90 | public delegate void RequestTerseUpdate(); |
95 | |||
96 | public delegate void CollisionUpdate(EventArgs e); | 91 | public delegate void CollisionUpdate(EventArgs e); |
97 | |||
98 | public delegate void OutOfBounds(PhysicsVector pos); | 92 | public delegate void OutOfBounds(PhysicsVector pos); |
99 | 93 | ||
100 | #pragma warning disable 67 | 94 | #pragma warning disable 67 |
@@ -138,9 +132,7 @@ namespace OpenSim.Region.Physics.Manager | |||
138 | 132 | ||
139 | if (handler != null) | 133 | if (handler != null) |
140 | { | 134 | { |
141 | 135 | handler(); | |
142 | handler(); | ||
143 | |||
144 | } | 136 | } |
145 | } | 137 | } |
146 | 138 | ||
@@ -150,9 +142,10 @@ namespace OpenSim.Region.Physics.Manager | |||
150 | // a race condition if the last subscriber unsubscribes | 142 | // a race condition if the last subscriber unsubscribes |
151 | // immediately after the null check and before the event is raised. | 143 | // immediately after the null check and before the event is raised. |
152 | OutOfBounds handler = OnOutOfBounds; | 144 | OutOfBounds handler = OnOutOfBounds; |
145 | |||
153 | if (handler != null) | 146 | if (handler != null) |
154 | { | 147 | { |
155 | handler(pos); | 148 | handler(pos); |
156 | } | 149 | } |
157 | } | 150 | } |
158 | 151 | ||
@@ -162,54 +155,34 @@ namespace OpenSim.Region.Physics.Manager | |||
162 | 155 | ||
163 | if (handler != null) | 156 | if (handler != null) |
164 | { | 157 | { |
165 | handler(e); | 158 | handler(e); |
166 | } | 159 | } |
167 | |||
168 | } | 160 | } |
169 | 161 | ||
170 | |||
171 | public abstract PhysicsVector Position { get; set; } | 162 | public abstract PhysicsVector Position { get; set; } |
172 | |||
173 | public abstract float Mass { get; } | 163 | public abstract float Mass { get; } |
174 | |||
175 | public abstract PhysicsVector Force { get; } | 164 | public abstract PhysicsVector Force { get; } |
176 | |||
177 | public abstract PhysicsVector GeometricCenter { get; } | 165 | public abstract PhysicsVector GeometricCenter { get; } |
178 | |||
179 | public abstract PhysicsVector CenterOfMass { get; } | 166 | public abstract PhysicsVector CenterOfMass { get; } |
180 | |||
181 | public abstract PhysicsVector Velocity { get; set; } | 167 | public abstract PhysicsVector Velocity { get; set; } |
182 | |||
183 | public abstract float CollisionScore { get;} | 168 | public abstract float CollisionScore { get;} |
184 | |||
185 | public abstract PhysicsVector Acceleration { get; } | 169 | public abstract PhysicsVector Acceleration { get; } |
186 | |||
187 | public abstract Quaternion Orientation { get; set; } | 170 | public abstract Quaternion Orientation { get; set; } |
188 | public abstract int PhysicsActorType { get; set; } | 171 | public abstract int PhysicsActorType { get; set; } |
189 | |||
190 | public abstract bool IsPhysical { get; set; } | 172 | public abstract bool IsPhysical { get; set; } |
191 | |||
192 | public abstract bool Flying { get; set; } | 173 | public abstract bool Flying { get; set; } |
193 | public abstract bool SetAlwaysRun { get; set; } | 174 | public abstract bool SetAlwaysRun { get; set; } |
194 | public abstract bool ThrottleUpdates { get; set; } | 175 | public abstract bool ThrottleUpdates { get; set; } |
195 | |||
196 | public abstract bool IsColliding { get; set; } | 176 | public abstract bool IsColliding { get; set; } |
197 | public abstract bool CollidingGround { get; set; } | 177 | public abstract bool CollidingGround { get; set; } |
198 | public abstract bool CollidingObj { get; set; } | 178 | public abstract bool CollidingObj { get; set; } |
199 | |||
200 | public abstract bool FloatOnWater { set; } | 179 | public abstract bool FloatOnWater { set; } |
201 | |||
202 | public abstract PhysicsVector RotationalVelocity { get; set; } | 180 | public abstract PhysicsVector RotationalVelocity { get; set; } |
203 | |||
204 | public abstract bool Kinematic { get; set; } | 181 | public abstract bool Kinematic { get; set; } |
205 | |||
206 | public abstract float Buoyancy { get; set; } | 182 | public abstract float Buoyancy { get; set; } |
207 | 183 | ||
208 | public abstract void AddForce(PhysicsVector force); | 184 | public abstract void AddForce(PhysicsVector force); |
209 | |||
210 | public abstract void SetMomentum(PhysicsVector momentum); | 185 | public abstract void SetMomentum(PhysicsVector momentum); |
211 | |||
212 | |||
213 | } | 186 | } |
214 | 187 | ||
215 | public class NullPhysicsActor : PhysicsActor | 188 | public class NullPhysicsActor : PhysicsActor |
@@ -246,7 +219,8 @@ namespace OpenSim.Region.Physics.Manager | |||
246 | set { return; } | 219 | set { return; } |
247 | } | 220 | } |
248 | 221 | ||
249 | public override float Buoyancy { | 222 | public override float Buoyancy |
223 | { | ||
250 | get { return 0f; } | 224 | get { return 0f; } |
251 | set { return; } | 225 | set { return; } |
252 | } | 226 | } |
@@ -256,7 +230,6 @@ namespace OpenSim.Region.Physics.Manager | |||
256 | set { return; } | 230 | set { return; } |
257 | } | 231 | } |
258 | 232 | ||
259 | |||
260 | public override bool CollidingGround | 233 | public override bool CollidingGround |
261 | { | 234 | { |
262 | get { return false; } | 235 | get { return false; } |
@@ -313,10 +286,8 @@ namespace OpenSim.Region.Physics.Manager | |||
313 | 286 | ||
314 | public override void CrossingFailure() | 287 | public override void CrossingFailure() |
315 | { | 288 | { |
316 | |||
317 | } | 289 | } |
318 | 290 | ||
319 | |||
320 | public override Quaternion Orientation | 291 | public override Quaternion Orientation |
321 | { | 292 | { |
322 | get { return Quaternion.Identity; } | 293 | get { return Quaternion.Identity; } |
@@ -366,17 +337,14 @@ namespace OpenSim.Region.Physics.Manager | |||
366 | 337 | ||
367 | public override void link(PhysicsActor obj) | 338 | public override void link(PhysicsActor obj) |
368 | { | 339 | { |
369 | |||
370 | } | 340 | } |
371 | 341 | ||
372 | public override void delink() | 342 | public override void delink() |
373 | { | 343 | { |
374 | |||
375 | } | 344 | } |
376 | 345 | ||
377 | public override void AddForce(PhysicsVector force) | 346 | public override void AddForce(PhysicsVector force) |
378 | { | 347 | { |
379 | return; | ||
380 | } | 348 | } |
381 | 349 | ||
382 | public override PhysicsVector RotationalVelocity | 350 | public override PhysicsVector RotationalVelocity |
@@ -387,7 +355,6 @@ namespace OpenSim.Region.Physics.Manager | |||
387 | 355 | ||
388 | public override void SetMomentum(PhysicsVector momentum) | 356 | public override void SetMomentum(PhysicsVector momentum) |
389 | { | 357 | { |
390 | return; | ||
391 | } | 358 | } |
392 | } | 359 | } |
393 | } | 360 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index 8fea3a3..c025b5b 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs | |||
@@ -142,7 +142,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
142 | } | 142 | } |
143 | 143 | ||
144 | public void SenseOnce(uint m_localID, LLUUID m_itemID, | 144 | public void SenseOnce(uint m_localID, LLUUID m_itemID, |
145 | string name, LLUUID keyID, int type, double range, double arc, SceneObjectPart host) | 145 | string name, LLUUID keyID, int type, |
146 | double range, double arc, SceneObjectPart host) | ||
146 | { | 147 | { |
147 | // Add to timer | 148 | // Add to timer |
148 | SenseRepeatClass ts = new SenseRepeatClass(); | 149 | SenseRepeatClass ts = new SenseRepeatClass(); |
@@ -210,7 +211,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
210 | 211 | ||
211 | foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values) | 212 | foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values) |
212 | { | 213 | { |
213 | |||
214 | LLVector3 toRegionPos = ent.AbsolutePosition + regionPos; | 214 | LLVector3 toRegionPos = ent.AbsolutePosition + regionPos; |
215 | double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos)); | 215 | double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos)); |
216 | if (dis <= ts.range) | 216 | if (dis <= ts.range) |