diff options
author | lbsa71 | 2007-12-27 21:41:48 +0000 |
---|---|---|
committer | lbsa71 | 2007-12-27 21:41:48 +0000 |
commit | efd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch) | |
tree | bf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Region/Communications | |
parent | * removed always true if (diff) | |
download | opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2 opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz |
* Optimized usings
* shortened references
* Removed redundant 'this'
* Normalized EOF
Diffstat (limited to '')
9 files changed, 207 insertions, 166 deletions
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 937f7c4..575d9d5 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -50,4 +50,4 @@ namespace OpenSim.Region.Communications.Local | |||
50 | m_interRegion = interRegionService; | 50 | m_interRegion = interRegionService; |
51 | } | 51 | } |
52 | } | 52 | } |
53 | } | 53 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index f6137f7..4dec884 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -29,8 +29,8 @@ using System.Collections; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Framework.Console; | ||
33 | using OpenSim.Framework.Communications; | 32 | using OpenSim.Framework.Communications; |
33 | using OpenSim.Framework.Console; | ||
34 | 34 | ||
35 | namespace OpenSim.Region.Communications.Local | 35 | namespace OpenSim.Region.Communications.Local |
36 | { | 36 | { |
@@ -50,21 +50,17 @@ namespace OpenSim.Region.Communications.Local | |||
50 | public string gdebugRegionName | 50 | public string gdebugRegionName |
51 | { | 51 | { |
52 | get { return _gdebugRegionName; } | 52 | get { return _gdebugRegionName; } |
53 | set | 53 | set { _gdebugRegionName = value; } |
54 | { | ||
55 | _gdebugRegionName = value; | ||
56 | } | ||
57 | } | 54 | } |
55 | |||
58 | public string _rdebugRegionName = ""; | 56 | public string _rdebugRegionName = ""; |
59 | 57 | ||
60 | public string rdebugRegionName | 58 | public string rdebugRegionName |
61 | { | 59 | { |
62 | get { return _rdebugRegionName; } | 60 | get { return _rdebugRegionName; } |
63 | set | 61 | set { _rdebugRegionName = value; } |
64 | { | ||
65 | _rdebugRegionName = value; | ||
66 | } | ||
67 | } | 62 | } |
63 | |||
68 | public LocalBackEndServices() | 64 | public LocalBackEndServices() |
69 | { | 65 | { |
70 | } | 66 | } |
@@ -85,7 +81,8 @@ namespace OpenSim.Region.Communications.Local | |||
85 | RegionCommsListener regionHost = new RegionCommsListener(); | 81 | RegionCommsListener regionHost = new RegionCommsListener(); |
86 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) | 82 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) |
87 | { | 83 | { |
88 | MainLog.Instance.Error("INTERREGION", "Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up."); | 84 | MainLog.Instance.Error("INTERREGION", |
85 | "Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up."); | ||
89 | m_regionListeners.Remove(regionInfo.RegionHandle); | 86 | m_regionListeners.Remove(regionInfo.RegionHandle); |
90 | } | 87 | } |
91 | m_regionListeners.Add(regionInfo.RegionHandle, regionHost); | 88 | m_regionListeners.Add(regionInfo.RegionHandle, regionHost); |
@@ -195,7 +192,7 @@ namespace OpenSim.Region.Communications.Local | |||
195 | return mapBlocks; | 192 | return mapBlocks; |
196 | } | 193 | } |
197 | 194 | ||
198 | 195 | ||
199 | public virtual bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle) | 196 | public virtual bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle) |
200 | { | 197 | { |
201 | RegionInfo region = new RegionInfo(sregion); | 198 | RegionInfo region = new RegionInfo(sregion); |
@@ -203,7 +200,7 @@ namespace OpenSim.Region.Communications.Local | |||
203 | { | 200 | { |
204 | return m_regionListeners[regionhandle].TriggerRegionUp(region); | 201 | return m_regionListeners[regionhandle].TriggerRegionUp(region); |
205 | } | 202 | } |
206 | 203 | ||
207 | return false; | 204 | return false; |
208 | } | 205 | } |
209 | 206 | ||
@@ -224,7 +221,7 @@ namespace OpenSim.Region.Communications.Local | |||
224 | // It never gets called. | 221 | // It never gets called. |
225 | public virtual Dictionary<string, string> GetGridSettings() | 222 | public virtual Dictionary<string, string> GetGridSettings() |
226 | { | 223 | { |
227 | Dictionary<string,string> returnGridSettings = new Dictionary<string,string>(); | 224 | Dictionary<string, string> returnGridSettings = new Dictionary<string, string>(); |
228 | lock (m_queuedGridSettings) | 225 | lock (m_queuedGridSettings) |
229 | { | 226 | { |
230 | returnGridSettings = m_queuedGridSettings; | 227 | returnGridSettings = m_queuedGridSettings; |
@@ -237,7 +234,6 @@ namespace OpenSim.Region.Communications.Local | |||
237 | public virtual void SetForcefulBanlistsDisallowed(ulong regionHandle) | 234 | public virtual void SetForcefulBanlistsDisallowed(ulong regionHandle) |
238 | { | 235 | { |
239 | m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE"); | 236 | m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE"); |
240 | |||
241 | } | 237 | } |
242 | 238 | ||
243 | public bool TriggerRegionUp(RegionInfo region, ulong regionhandle) | 239 | public bool TriggerRegionUp(RegionInfo region, ulong regionhandle) |
@@ -254,7 +250,7 @@ namespace OpenSim.Region.Communications.Local | |||
254 | { | 250 | { |
255 | if (m_regionListeners.ContainsKey(regionHandle)) | 251 | if (m_regionListeners.ContainsKey(regionHandle)) |
256 | { | 252 | { |
257 | return m_regionListeners[regionHandle].TriggerChildAgentUpdate(regionHandle,cAgentData); | 253 | return m_regionListeners[regionHandle].TriggerChildAgentUpdate(regionHandle, cAgentData); |
258 | } | 254 | } |
259 | return false; | 255 | return false; |
260 | } | 256 | } |
@@ -282,7 +278,7 @@ namespace OpenSim.Region.Communications.Local | |||
282 | return false; | 278 | return false; |
283 | } | 279 | } |
284 | 280 | ||
285 | public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData) | 281 | public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData) |
286 | { | 282 | { |
287 | if (m_regionListeners.ContainsKey(regionHandle)) | 283 | if (m_regionListeners.ContainsKey(regionHandle)) |
288 | { | 284 | { |
@@ -291,6 +287,7 @@ namespace OpenSim.Region.Communications.Local | |||
291 | } | 287 | } |
292 | return false; | 288 | return false; |
293 | } | 289 | } |
290 | |||
294 | /// <summary> | 291 | /// <summary> |
295 | /// | 292 | /// |
296 | /// </summary> | 293 | /// </summary> |
@@ -308,6 +305,7 @@ namespace OpenSim.Region.Communications.Local | |||
308 | } | 305 | } |
309 | return false; | 306 | return false; |
310 | } | 307 | } |
308 | |||
311 | public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) | 309 | public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) |
312 | { | 310 | { |
313 | if (m_regionListeners.ContainsKey(regionHandle)) | 311 | if (m_regionListeners.ContainsKey(regionHandle)) |
@@ -322,7 +320,7 @@ namespace OpenSim.Region.Communications.Local | |||
322 | { | 320 | { |
323 | if (m_regionListeners.ContainsKey(regionHandle)) | 321 | if (m_regionListeners.ContainsKey(regionHandle)) |
324 | { | 322 | { |
325 | m_regionListeners[regionHandle].TriggerCloseAgentConnection(regionHandle, agentID); | 323 | m_regionListeners[regionHandle].TriggerCloseAgentConnection(regionHandle, agentID); |
326 | } | 324 | } |
327 | } | 325 | } |
328 | 326 | ||
@@ -334,6 +332,7 @@ namespace OpenSim.Region.Communications.Local | |||
334 | } | 332 | } |
335 | return false; | 333 | return false; |
336 | } | 334 | } |
335 | |||
337 | public bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primID) | 336 | public bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primID) |
338 | { | 337 | { |
339 | if (m_regionListeners.ContainsKey(regionHandle)) | 338 | if (m_regionListeners.ContainsKey(regionHandle)) |
@@ -415,14 +414,15 @@ namespace OpenSim.Region.Communications.Local | |||
415 | { | 414 | { |
416 | if (m_regionListeners.ContainsKey(regionHandle)) | 415 | if (m_regionListeners.ContainsKey(regionHandle)) |
417 | { | 416 | { |
418 | return m_regionListeners[regionHandle].TriggerExpectPrimCrossing(regionHandle, primID, position, isPhysical); | 417 | return |
418 | m_regionListeners[regionHandle].TriggerExpectPrimCrossing(regionHandle, primID, position, isPhysical); | ||
419 | } | 419 | } |
420 | return false; | 420 | return false; |
421 | } | 421 | } |
422 | 422 | ||
423 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) | 423 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) |
424 | { | 424 | { |
425 | // MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Other local region is sending child agent our way: " + agentData.firstname + " " + agentData.lastname); | 425 | // MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Other local region is sending child agent our way: " + agentData.firstname + " " + agentData.lastname); |
426 | 426 | ||
427 | if (m_regionListeners.ContainsKey(regionHandle)) | 427 | if (m_regionListeners.ContainsKey(regionHandle)) |
428 | { | 428 | { |
@@ -435,4 +435,4 @@ namespace OpenSim.Region.Communications.Local | |||
435 | return false; | 435 | return false; |
436 | } | 436 | } |
437 | } | 437 | } |
438 | } | 438 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index 08bd850..730c40f 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs | |||
@@ -82,14 +82,14 @@ namespace OpenSim.Region.Communications.Local | |||
82 | { | 82 | { |
83 | DeleteItem(item); | 83 | DeleteItem(item); |
84 | } | 84 | } |
85 | 85 | ||
86 | /// <summary> | 86 | /// <summary> |
87 | /// Send the given inventory folder and its item contents back to the requester. | 87 | /// Send the given inventory folder and its item contents back to the requester. |
88 | /// </summary> | 88 | /// </summary> |
89 | /// <param name="userID"></param> | 89 | /// <param name="userID"></param> |
90 | /// <param name="folder"></param> | 90 | /// <param name="folder"></param> |
91 | private InventoryFolderImpl RequestInventoryFolder(LLUUID userID, InventoryFolderBase folder, | 91 | private InventoryFolderImpl RequestInventoryFolder(LLUUID userID, InventoryFolderBase folder, |
92 | InventoryFolderInfo folderCallBack, | 92 | InventoryFolderInfo folderCallBack, |
93 | InventoryItemInfo itemCallBack) | 93 | InventoryItemInfo itemCallBack) |
94 | { | 94 | { |
95 | InventoryFolderImpl newFolder = new InventoryFolderImpl(folder); | 95 | InventoryFolderImpl newFolder = new InventoryFolderImpl(folder); |
@@ -99,9 +99,9 @@ namespace OpenSim.Region.Communications.Local | |||
99 | foreach (InventoryItemBase item in items) | 99 | foreach (InventoryItemBase item in items) |
100 | { | 100 | { |
101 | itemCallBack(userID, item); | 101 | itemCallBack(userID, item); |
102 | } | 102 | } |
103 | 103 | ||
104 | return newFolder; | 104 | return newFolder; |
105 | } | 105 | } |
106 | } | 106 | } |
107 | } | 107 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 2c08707..bf5f205 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.Communications.Local | |||
73 | if (!authUsers) | 73 | if (!authUsers) |
74 | { | 74 | { |
75 | //no current user account so make one | 75 | //no current user account so make one |
76 | MainLog.Instance.Notice("LOGIN", "No user account found so creating a new one."); | 76 | MainLog.Instance.Notice("LOGIN", "No user account found so creating a new one."); |
77 | 77 | ||
78 | m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); | 78 | m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); |
79 | 79 | ||
@@ -93,14 +93,14 @@ namespace OpenSim.Region.Communications.Local | |||
93 | if (!authUsers) | 93 | if (!authUsers) |
94 | { | 94 | { |
95 | //for now we will accept any password in sandbox mode | 95 | //for now we will accept any password in sandbox mode |
96 | MainLog.Instance.Notice("LOGIN", "Authorising user (no actual password check)"); | 96 | MainLog.Instance.Notice("LOGIN", "Authorising user (no actual password check)"); |
97 | 97 | ||
98 | return true; | 98 | return true; |
99 | } | 99 | } |
100 | else | 100 | else |
101 | { | 101 | { |
102 | MainLog.Instance.Notice( | 102 | MainLog.Instance.Notice( |
103 | "LOGIN", "Authenticating " + profile.username + " " + profile.surname); | 103 | "LOGIN", "Authenticating " + profile.username + " " + profile.surname); |
104 | 104 | ||
105 | password = password.Remove(0, 3); //remove $1$ | 105 | password = password.Remove(0, 3); //remove $1$ |
106 | 106 | ||
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Communications.Local | |||
134 | // response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/"; | 134 | // response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/"; |
135 | theUser.currentAgent.currentRegion = reg.RegionID; | 135 | theUser.currentAgent.currentRegion = reg.RegionID; |
136 | theUser.currentAgent.currentHandle = reg.RegionHandle; | 136 | theUser.currentAgent.currentHandle = reg.RegionHandle; |
137 | 137 | ||
138 | LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); | 138 | LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); |
139 | buddyList.AddNewBuddy(new LoginResponse.BuddyList.BuddyInfo("11111111-1111-0000-0000-000100bba000")); | 139 | buddyList.AddNewBuddy(new LoginResponse.BuddyList.BuddyInfo("11111111-1111-0000-0000-000100bba000")); |
140 | response.BuddList = buddyList; | 140 | response.BuddList = buddyList; |
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Communications.Local | |||
157 | } | 157 | } |
158 | else | 158 | else |
159 | { | 159 | { |
160 | MainLog.Instance.Warn("LOGIN", "Not found region " + currentRegion); | 160 | MainLog.Instance.Warn("LOGIN", "Not found region " + currentRegion); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
@@ -207,4 +207,4 @@ namespace OpenSim.Region.Communications.Local | |||
207 | } | 207 | } |
208 | } | 208 | } |
209 | } | 209 | } |
210 | } | 210 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index d8c4b1d..6269565 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using libsecondlife; | ||
30 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
31 | using OpenSim.Framework.Communications; | 32 | using OpenSim.Framework.Communications; |
32 | using OpenSim.Framework.UserManagement; | 33 | using OpenSim.Framework.UserManagement; |
@@ -82,7 +83,7 @@ namespace OpenSim.Region.Communications.Local | |||
82 | return profile; | 83 | return profile; |
83 | } | 84 | } |
84 | 85 | ||
85 | public override UserProfileData SetupMasterUser(libsecondlife.LLUUID uuid) | 86 | public override UserProfileData SetupMasterUser(LLUUID uuid) |
86 | { | 87 | { |
87 | UserProfileData data = GetUserProfile(uuid); | 88 | UserProfileData data = GetUserProfile(uuid); |
88 | if (data == null) | 89 | if (data == null) |
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 |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index 683c471..a0da07e 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
41 | 41 | ||
42 | public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData); | 42 | public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData); |
43 | 43 | ||
44 | public delegate bool RegionUp (SearializableRegionInfo region, ulong regionhandle); | 44 | public delegate bool RegionUp(SearializableRegionInfo region, ulong regionhandle); |
45 | 45 | ||
46 | public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate childUpdate); | 46 | public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate childUpdate); |
47 | 47 | ||
@@ -81,7 +81,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
81 | 81 | ||
82 | public bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle) | 82 | public bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle) |
83 | { | 83 | { |
84 | |||
85 | if (OnRegionUp != null) | 84 | if (OnRegionUp != null) |
86 | { | 85 | { |
87 | return OnRegionUp(sregion, regionhandle); | 86 | return OnRegionUp(sregion, regionhandle); |
@@ -106,6 +105,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
106 | } | 105 | } |
107 | return false; | 106 | return false; |
108 | } | 107 | } |
108 | |||
109 | public bool InformRegionPrim(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) | 109 | public bool InformRegionPrim(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) |
110 | { | 110 | { |
111 | if (OnPrimGroupNear != null) | 111 | if (OnPrimGroupNear != null) |
@@ -114,6 +114,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
114 | } | 114 | } |
115 | return false; | 115 | return false; |
116 | } | 116 | } |
117 | |||
117 | public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, string objData) | 118 | public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, string objData) |
118 | { | 119 | { |
119 | if (OnPrimGroupArrival != null) | 120 | if (OnPrimGroupArrival != null) |
@@ -134,7 +135,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
134 | { | 135 | { |
135 | try | 136 | try |
136 | { | 137 | { |
137 | return InterRegionSingleton.Instance.InformRegionOfChildAgent(regionHandle, new AgentCircuitData(agentData)); | 138 | return |
139 | InterRegionSingleton.Instance.InformRegionOfChildAgent(regionHandle, new AgentCircuitData(agentData)); | ||
138 | } | 140 | } |
139 | catch (RemotingException e) | 141 | catch (RemotingException e) |
140 | { | 142 | { |
@@ -142,7 +144,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
142 | return false; | 144 | return false; |
143 | } | 145 | } |
144 | } | 146 | } |
145 | public bool RegionUp(SearializableRegionInfo region, ulong regionhandle) | 147 | |
148 | public bool RegionUp(SearializableRegionInfo region, ulong regionhandle) | ||
146 | { | 149 | { |
147 | try | 150 | try |
148 | { | 151 | { |
@@ -155,25 +158,27 @@ namespace OpenSim.Region.Communications.OGS1 | |||
155 | } | 158 | } |
156 | } | 159 | } |
157 | 160 | ||
158 | public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) | 161 | public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) |
159 | { | 162 | { |
160 | try | 163 | try |
161 | { | 164 | { |
162 | return InterRegionSingleton.Instance.ChildAgentUpdate(regionHandle,cAgentData); | 165 | return InterRegionSingleton.Instance.ChildAgentUpdate(regionHandle, cAgentData); |
163 | } | 166 | } |
164 | catch (RemotingException e) | 167 | catch (RemotingException e) |
165 | { | 168 | { |
166 | Console.WriteLine("Remoting Error: Unable to send Child agent update to remote region.\n" + e.ToString()); | 169 | Console.WriteLine("Remoting Error: Unable to send Child agent update to remote region.\n" + e.ToString()); |
167 | return false; | 170 | return false; |
168 | } | 171 | } |
169 | |||
170 | } | 172 | } |
171 | 173 | ||
172 | public bool ExpectAvatarCrossing(ulong regionHandle, Guid agentID, sLLVector3 position, bool isFlying) | 174 | public bool ExpectAvatarCrossing(ulong regionHandle, Guid agentID, sLLVector3 position, bool isFlying) |
173 | { | 175 | { |
174 | try | 176 | try |
175 | { | 177 | { |
176 | return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, new LLUUID(agentID), new LLVector3(position.x,position.y,position.z), isFlying); | 178 | return |
179 | InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, new LLUUID(agentID), | ||
180 | new LLVector3(position.x, position.y, position.z), | ||
181 | isFlying); | ||
177 | } | 182 | } |
178 | catch (RemotingException e) | 183 | catch (RemotingException e) |
179 | { | 184 | { |
@@ -181,20 +186,24 @@ namespace OpenSim.Region.Communications.OGS1 | |||
181 | return false; | 186 | return false; |
182 | } | 187 | } |
183 | } | 188 | } |
189 | |||
184 | public bool InformRegionPrim(ulong regionHandle, Guid SceneObjectGroupID, sLLVector3 position, bool isPhysical) | 190 | public bool InformRegionPrim(ulong regionHandle, Guid SceneObjectGroupID, sLLVector3 position, bool isPhysical) |
185 | { | 191 | { |
186 | try | 192 | try |
187 | { | 193 | { |
188 | return InterRegionSingleton.Instance.InformRegionPrim(regionHandle, new LLUUID(SceneObjectGroupID), new LLVector3(position.x,position.y,position.z), isPhysical); | 194 | return |
195 | InterRegionSingleton.Instance.InformRegionPrim(regionHandle, new LLUUID(SceneObjectGroupID), | ||
196 | new LLVector3(position.x, position.y, position.z), | ||
197 | isPhysical); | ||
189 | } | 198 | } |
190 | catch (RemotingException e) | 199 | catch (RemotingException e) |
191 | { | 200 | { |
192 | Console.WriteLine("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); | 201 | Console.WriteLine("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); |
193 | return false; | 202 | return false; |
194 | } | 203 | } |
195 | |||
196 | } | 204 | } |
197 | public bool InformRegionOfPrimCrossing(ulong regionHandle,Guid primID, string objData) | 205 | |
206 | public bool InformRegionOfPrimCrossing(ulong regionHandle, Guid primID, string objData) | ||
198 | { | 207 | { |
199 | try | 208 | try |
200 | { | 209 | { |
@@ -206,6 +215,5 @@ namespace OpenSim.Region.Communications.OGS1 | |||
206 | return false; | 215 | return false; |
207 | } | 216 | } |
208 | } | 217 | } |
209 | |||
210 | } | 218 | } |
211 | } \ No newline at end of file | 219 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 0fb083a..0d97074 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | |||
@@ -29,10 +29,10 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Framework.Servers; | ||
33 | using OpenSim.Framework.Communications; | 32 | using OpenSim.Framework.Communications; |
34 | using OpenSim.Framework.Communications.Cache; | 33 | using OpenSim.Framework.Communications.Cache; |
35 | using OpenSim.Framework.Console; | 34 | using OpenSim.Framework.Console; |
35 | using OpenSim.Framework.Servers; | ||
36 | 36 | ||
37 | namespace OpenSim.Region.Communications.OGS1 | 37 | namespace OpenSim.Region.Communications.OGS1 |
38 | { | 38 | { |
@@ -51,7 +51,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
51 | // See IInventoryServices | 51 | // See IInventoryServices |
52 | public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, | 52 | public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, |
53 | InventoryItemInfo itemCallBack) | 53 | InventoryItemInfo itemCallBack) |
54 | { | 54 | { |
55 | if (!m_RequestingInventory.ContainsKey(userID)) | 55 | if (!m_RequestingInventory.ContainsKey(userID)) |
56 | { | 56 | { |
57 | InventoryRequest request = new InventoryRequest(userID, folderCallBack, itemCallBack); | 57 | InventoryRequest request = new InventoryRequest(userID, folderCallBack, itemCallBack); |
@@ -72,10 +72,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
72 | try | 72 | try |
73 | { | 73 | { |
74 | MainLog.Instance.Verbose( | 74 | MainLog.Instance.Verbose( |
75 | "INVENTORY", "Requesting inventory from {0}/GetInventory/ for user {1}", | 75 | "INVENTORY", "Requesting inventory from {0}/GetInventory/ for user {1}", |
76 | _inventoryServerUrl, userID); | 76 | _inventoryServerUrl, userID); |
77 | 77 | ||
78 | RestObjectPosterResponse<InventoryCollection> requester | 78 | RestObjectPosterResponse<InventoryCollection> requester |
79 | = new RestObjectPosterResponse<InventoryCollection>(); | 79 | = new RestObjectPosterResponse<InventoryCollection>(); |
80 | requester.ResponseCallback = InventoryResponse; | 80 | requester.ResponseCallback = InventoryResponse; |
81 | 81 | ||
@@ -96,10 +96,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
96 | LLUUID userID = response.UserID; | 96 | LLUUID userID = response.UserID; |
97 | if (m_RequestingInventory.ContainsKey(userID)) | 97 | if (m_RequestingInventory.ContainsKey(userID)) |
98 | { | 98 | { |
99 | MainLog.Instance.Verbose("INVENTORY", | 99 | MainLog.Instance.Verbose("INVENTORY", |
100 | "Received inventory response for user {0} containing {1} folders and {2} items", | 100 | "Received inventory response for user {0} containing {1} folders and {2} items", |
101 | userID, response.Folders.Count, response.AllItems.Count); | 101 | userID, response.Folders.Count, response.AllItems.Count); |
102 | 102 | ||
103 | InventoryFolderImpl rootFolder = null; | 103 | InventoryFolderImpl rootFolder = null; |
104 | InventoryRequest request = m_RequestingInventory[userID]; | 104 | InventoryRequest request = m_RequestingInventory[userID]; |
105 | foreach (InventoryFolderBase folder in response.Folders) | 105 | foreach (InventoryFolderBase folder in response.Folders) |
@@ -133,8 +133,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
133 | else | 133 | else |
134 | { | 134 | { |
135 | MainLog.Instance.Warn( | 135 | MainLog.Instance.Warn( |
136 | "INVENTORY", | 136 | "INVENTORY", |
137 | "Received inventory response for {0} for which we do not have a record of requesting!", | 137 | "Received inventory response for {0} for which we do not have a record of requesting!", |
138 | userID); | 138 | userID); |
139 | } | 139 | } |
140 | } | 140 | } |
@@ -150,7 +150,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
150 | SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>( | 150 | SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>( |
151 | "POST", _inventoryServerUrl + "/MoveFolder/", folder); | 151 | "POST", _inventoryServerUrl + "/MoveFolder/", folder); |
152 | } | 152 | } |
153 | 153 | ||
154 | public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) | 154 | public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) |
155 | { | 155 | { |
156 | SynchronousRestObjectPoster.BeginPostObject<InventoryItemBase, bool>( | 156 | SynchronousRestObjectPoster.BeginPostObject<InventoryItemBase, bool>( |
@@ -188,4 +188,4 @@ namespace OpenSim.Region.Communications.OGS1 | |||
188 | } | 188 | } |
189 | } | 189 | } |
190 | } | 190 | } |
191 | } | 191 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index c1e6ba6..3a2e138 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -30,6 +30,7 @@ using System; | |||
30 | using System.Collections; | 30 | using System.Collections; |
31 | using System.Collections.Generic; | 31 | using System.Collections.Generic; |
32 | using System.Net; | 32 | using System.Net; |
33 | using System.Text.RegularExpressions; | ||
33 | using libsecondlife; | 34 | using libsecondlife; |
34 | using Nwc.XmlRpc; | 35 | using Nwc.XmlRpc; |
35 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
@@ -50,7 +51,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
50 | { | 51 | { |
51 | if (data.Contains("error_type")) | 52 | if (data.Contains("error_type")) |
52 | { | 53 | { |
53 | MainLog.Instance.Warn("GRID", "Error sent by user server when trying to get user profile: (" + data["error_type"] + | 54 | MainLog.Instance.Warn("GRID", |
55 | "Error sent by user server when trying to get user profile: (" + | ||
56 | data["error_type"] + | ||
54 | "): " + data["error_desc"]); | 57 | "): " + data["error_desc"]); |
55 | return null; | 58 | return null; |
56 | } | 59 | } |
@@ -80,19 +83,19 @@ namespace OpenSim.Region.Communications.OGS1 | |||
80 | return userData; | 83 | return userData; |
81 | } | 84 | } |
82 | 85 | ||
83 | public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(LLUUID queryID,Hashtable data) | 86 | public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(LLUUID queryID, Hashtable data) |
84 | { | 87 | { |
85 | List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); | 88 | List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); |
86 | int pickercount = Convert.ToInt32((string)data["avcount"]); | 89 | int pickercount = Convert.ToInt32((string) data["avcount"]); |
87 | LLUUID respqueryID = new LLUUID((string)data["queryid"]); | 90 | LLUUID respqueryID = new LLUUID((string) data["queryid"]); |
88 | if (queryID == respqueryID) | 91 | if (queryID == respqueryID) |
89 | { | 92 | { |
90 | for (int i = 0; i < pickercount; i++) | 93 | for (int i = 0; i < pickercount; i++) |
91 | { | 94 | { |
92 | AvatarPickerAvatar apicker = new AvatarPickerAvatar(); | 95 | AvatarPickerAvatar apicker = new AvatarPickerAvatar(); |
93 | LLUUID avatarID = new LLUUID((string)data["avatarid" + i.ToString()]); | 96 | LLUUID avatarID = new LLUUID((string) data["avatarid" + i.ToString()]); |
94 | string firstname = (string)data["firstname" + i.ToString()]; | 97 | string firstname = (string) data["firstname" + i.ToString()]; |
95 | string lastname = (string)data["lastname" + i.ToString()]; | 98 | string lastname = (string) data["lastname" + i.ToString()]; |
96 | apicker.AvatarID = avatarID; | 99 | apicker.AvatarID = avatarID; |
97 | apicker.firstName = firstname; | 100 | apicker.firstName = firstname; |
98 | apicker.lastName = lastname; | 101 | apicker.lastName = lastname; |
@@ -114,18 +117,18 @@ namespace OpenSim.Region.Communications.OGS1 | |||
114 | public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) | 117 | public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) |
115 | { | 118 | { |
116 | List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); | 119 | List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); |
117 | System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9 ]"); | 120 | Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9 ]"); |
118 | try | 121 | try |
119 | { | 122 | { |
120 | Hashtable param = new Hashtable(); | 123 | Hashtable param = new Hashtable(); |
121 | param["queryid"] = (string)queryID.ToString(); | 124 | param["queryid"] = (string) queryID.ToString(); |
122 | param["avquery"] = objAlphaNumericPattern.Replace(query, ""); | 125 | param["avquery"] = objAlphaNumericPattern.Replace(query, ""); |
123 | IList parameters = new ArrayList(); | 126 | IList parameters = new ArrayList(); |
124 | parameters.Add(param); | 127 | parameters.Add(param); |
125 | XmlRpcRequest req = new XmlRpcRequest("get_avatar_picker_avatar", parameters); | 128 | XmlRpcRequest req = new XmlRpcRequest("get_avatar_picker_avatar", parameters); |
126 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000); | 129 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000); |
127 | Hashtable respData = (Hashtable)resp.Value; | 130 | Hashtable respData = (Hashtable) resp.Value; |
128 | pickerlist = ConvertXMLRPCDataToAvatarPickerList(queryID,respData); | 131 | pickerlist = ConvertXMLRPCDataToAvatarPickerList(queryID, respData); |
129 | } | 132 | } |
130 | catch (WebException e) | 133 | catch (WebException e) |
131 | { | 134 | { |
@@ -196,7 +199,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
196 | return profile; | 199 | return profile; |
197 | } | 200 | } |
198 | 201 | ||
199 | public UserProfileData SetupMasterUser(libsecondlife.LLUUID uuid) | 202 | public UserProfileData SetupMasterUser(LLUUID uuid) |
200 | { | 203 | { |
201 | UserProfileData data = GetUserProfile(uuid); | 204 | UserProfileData data = GetUserProfile(uuid); |
202 | if (data == null) | 205 | if (data == null) |
@@ -211,4 +214,4 @@ namespace OpenSim.Region.Communications.OGS1 | |||
211 | throw new Exception("The method or operation is not implemented."); | 214 | throw new Exception("The method or operation is not implemented."); |
212 | } | 215 | } |
213 | } | 216 | } |
214 | } | 217 | } \ No newline at end of file |