diff options
author | Melanie | 2013-09-01 22:49:31 +0100 |
---|---|---|
committer | Melanie | 2013-09-01 22:49:31 +0100 |
commit | 008c98a9748ba7deadb80c435ddd372002b6c844 (patch) | |
tree | 9458b87c1d28d741ee6c2384eb1028375cb703ab /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Profiles: Clean up some log entries caused when visiting HG avatar is using l... (diff) | |
download | opensim-SC-008c98a9748ba7deadb80c435ddd372002b6c844.zip opensim-SC-008c98a9748ba7deadb80c435ddd372002b6c844.tar.gz opensim-SC-008c98a9748ba7deadb80c435ddd372002b6c844.tar.bz2 opensim-SC-008c98a9748ba7deadb80c435ddd372002b6c844.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/World/Region/RestartModule.cs
OpenSim/Region/Framework/Scenes/SceneGraph.cs
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
Diffstat (limited to 'OpenSim/Region/CoreModules')
4 files changed, 53 insertions, 29 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index cef6177..ea660bd 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | |||
@@ -538,7 +538,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
538 | } | 538 | } |
539 | catch (Exception e) | 539 | catch (Exception e) |
540 | { | 540 | { |
541 | m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e.Message); | 541 | m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e); |
542 | return null; | 542 | return null; |
543 | } | 543 | } |
544 | */ | 544 | */ |
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 966a05c..bf1cffb 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -309,6 +309,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
309 | string serverURI = string.Empty; | 309 | string serverURI = string.Empty; |
310 | GetUserProfileServerURI(targetID, out serverURI); | 310 | GetUserProfileServerURI(targetID, out serverURI); |
311 | UUID creatorId = UUID.Zero; | 311 | UUID creatorId = UUID.Zero; |
312 | Dictionary<UUID, string> classifieds = new Dictionary<UUID, string>(); | ||
312 | 313 | ||
313 | OSDMap parameters= new OSDMap(); | 314 | OSDMap parameters= new OSDMap(); |
314 | UUID.TryParse(args[0], out creatorId); | 315 | UUID.TryParse(args[0], out creatorId); |
@@ -316,15 +317,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
316 | OSD Params = (OSD)parameters; | 317 | OSD Params = (OSD)parameters; |
317 | if(!JsonRpcRequest(ref Params, "avatarclassifiedsrequest", serverURI, UUID.Random().ToString())) | 318 | if(!JsonRpcRequest(ref Params, "avatarclassifiedsrequest", serverURI, UUID.Random().ToString())) |
318 | { | 319 | { |
319 | // Error Handling here! | 320 | remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), classifieds); |
320 | // if(parameters.ContainsKey("message") | 321 | return; |
321 | } | 322 | } |
322 | 323 | ||
323 | parameters = (OSDMap)Params; | 324 | parameters = (OSDMap)Params; |
324 | 325 | ||
325 | OSDArray list = (OSDArray)parameters["result"]; | 326 | OSDArray list = (OSDArray)parameters["result"]; |
326 | 327 | ||
327 | Dictionary<UUID, string> classifieds = new Dictionary<UUID, string>(); | ||
328 | 328 | ||
329 | foreach(OSD map in list) | 329 | foreach(OSD map in list) |
330 | { | 330 | { |
@@ -441,7 +441,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
441 | Vector3 pos = remoteClient.SceneAgent.AbsolutePosition; | 441 | Vector3 pos = remoteClient.SceneAgent.AbsolutePosition; |
442 | ILandObject land = s.LandChannel.GetLandObject(pos.X, pos.Y); | 442 | ILandObject land = s.LandChannel.GetLandObject(pos.X, pos.Y); |
443 | ScenePresence p = FindPresence(remoteClient.AgentId); | 443 | ScenePresence p = FindPresence(remoteClient.AgentId); |
444 | // Vector3 avaPos = p.AbsolutePosition; | ||
445 | 444 | ||
446 | string serverURI = string.Empty; | 445 | string serverURI = string.Empty; |
447 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); | 446 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); |
@@ -542,14 +541,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
542 | 541 | ||
543 | string serverURI = string.Empty; | 542 | string serverURI = string.Empty; |
544 | GetUserProfileServerURI(targetId, out serverURI); | 543 | GetUserProfileServerURI(targetId, out serverURI); |
544 | |||
545 | Dictionary<UUID, string> picks = new Dictionary<UUID, string>(); | ||
545 | 546 | ||
546 | OSDMap parameters= new OSDMap(); | 547 | OSDMap parameters= new OSDMap(); |
547 | parameters.Add("creatorId", OSD.FromUUID(targetId)); | 548 | parameters.Add("creatorId", OSD.FromUUID(targetId)); |
548 | OSD Params = (OSD)parameters; | 549 | OSD Params = (OSD)parameters; |
549 | if(!JsonRpcRequest(ref Params, "avatarpicksrequest", serverURI, UUID.Random().ToString())) | 550 | if(!JsonRpcRequest(ref Params, "avatarpicksrequest", serverURI, UUID.Random().ToString())) |
550 | { | 551 | { |
551 | remoteClient.SendAgentAlertMessage( | 552 | remoteClient.SendAvatarPicksReply(new UUID(args[0]), picks); |
552 | "Error requesting picks", false); | ||
553 | return; | 553 | return; |
554 | } | 554 | } |
555 | 555 | ||
@@ -557,8 +557,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
557 | 557 | ||
558 | OSDArray list = (OSDArray)parameters["result"]; | 558 | OSDArray list = (OSDArray)parameters["result"]; |
559 | 559 | ||
560 | Dictionary<UUID, string> picks = new Dictionary<UUID, string>(); | ||
561 | |||
562 | foreach(OSD map in list) | 560 | foreach(OSD map in list) |
563 | { | 561 | { |
564 | OSDMap m = (OSDMap)map; | 562 | OSDMap m = (OSDMap)map; |
@@ -762,8 +760,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
762 | object Note = (object)note; | 760 | object Note = (object)note; |
763 | if(!JsonRpcRequest(ref Note, "avatarnotesrequest", serverURI, UUID.Random().ToString())) | 761 | if(!JsonRpcRequest(ref Note, "avatarnotesrequest", serverURI, UUID.Random().ToString())) |
764 | { | 762 | { |
765 | remoteClient.SendAgentAlertMessage( | 763 | remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes); |
766 | "Error requesting note", false); | 764 | return; |
767 | } | 765 | } |
768 | note = (UserProfileNotes) Note; | 766 | note = (UserProfileNotes) Note; |
769 | 767 | ||
@@ -796,8 +794,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
796 | object Note = note; | 794 | object Note = note; |
797 | if(!JsonRpcRequest(ref Note, "avatar_notes_update", serverURI, UUID.Random().ToString())) | 795 | if(!JsonRpcRequest(ref Note, "avatar_notes_update", serverURI, UUID.Random().ToString())) |
798 | { | 796 | { |
799 | remoteClient.SendAgentAlertMessage( | 797 | return; |
800 | "Error updating note", false); | ||
801 | } | 798 | } |
802 | } | 799 | } |
803 | #endregion Notes | 800 | #endregion Notes |
@@ -1033,8 +1030,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
1033 | OSD Params = (OSD)parameters; | 1030 | OSD Params = (OSD)parameters; |
1034 | if(!JsonRpcRequest(ref Params, "image_assets_request", profileServerURI, UUID.Random().ToString())) | 1031 | if(!JsonRpcRequest(ref Params, "image_assets_request", profileServerURI, UUID.Random().ToString())) |
1035 | { | 1032 | { |
1036 | // Error Handling here! | ||
1037 | // if(parameters.ContainsKey("message") | ||
1038 | return false; | 1033 | return false; |
1039 | } | 1034 | } |
1040 | 1035 | ||
@@ -1224,7 +1219,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
1224 | byte[] content = Encoding.UTF8.GetBytes(jsonRequestData); | 1219 | byte[] content = Encoding.UTF8.GetBytes(jsonRequestData); |
1225 | 1220 | ||
1226 | HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(uri); | 1221 | HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(uri); |
1227 | // webRequest.Credentials = new NetworkCredential(rpcUser, rpcPass); | 1222 | |
1228 | webRequest.ContentType = "application/json-rpc"; | 1223 | webRequest.ContentType = "application/json-rpc"; |
1229 | webRequest.Method = "POST"; | 1224 | webRequest.Method = "POST"; |
1230 | 1225 | ||
@@ -1245,7 +1240,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
1245 | } | 1240 | } |
1246 | 1241 | ||
1247 | Stream rstream = webResponse.GetResponseStream(); | 1242 | Stream rstream = webResponse.GetResponseStream(); |
1248 | OSDMap mret = (OSDMap)OSDParser.DeserializeJson(rstream); | 1243 | if (rstream.Length < 1) |
1244 | return false; | ||
1245 | |||
1246 | OSDMap mret = new OSDMap(); | ||
1247 | try | ||
1248 | { | ||
1249 | mret = (OSDMap)OSDParser.DeserializeJson(rstream); | ||
1250 | } | ||
1251 | catch (Exception e) | ||
1252 | { | ||
1253 | m_log.DebugFormat("[PROFILES]: JsonRpcRequest Error {0} - remote user with legacy profiles?", e.Message); | ||
1254 | return false; | ||
1255 | } | ||
1256 | |||
1249 | 1257 | ||
1250 | if (mret.ContainsKey("error")) | 1258 | if (mret.ContainsKey("error")) |
1251 | return false; | 1259 | return false; |
@@ -1310,6 +1318,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
1310 | } | 1318 | } |
1311 | 1319 | ||
1312 | Stream rstream = webResponse.GetResponseStream(); | 1320 | Stream rstream = webResponse.GetResponseStream(); |
1321 | if (rstream.Length < 1) | ||
1322 | return false; | ||
1313 | 1323 | ||
1314 | OSDMap response = new OSDMap(); | 1324 | OSDMap response = new OSDMap(); |
1315 | try | 1325 | try |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 6ff9988..1f3e7a1 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -837,8 +837,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
837 | } | 837 | } |
838 | 838 | ||
839 | m_log.WarnFormat( | 839 | m_log.WarnFormat( |
840 | "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", | 840 | "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1}. Keeping avatar in {2}", |
841 | sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); | 841 | sp.Name, finalDestination.RegionName, sp.Scene.Name); |
842 | 842 | ||
843 | Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established."); | 843 | Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established."); |
844 | return; | 844 | return; |
@@ -1058,8 +1058,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1058 | } | 1058 | } |
1059 | 1059 | ||
1060 | m_log.WarnFormat( | 1060 | m_log.WarnFormat( |
1061 | "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", | 1061 | "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1}. Keeping avatar in {2}", |
1062 | sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); | 1062 | sp.Name, finalDestination.RegionName, sp.Scene.Name); |
1063 | 1063 | ||
1064 | Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established."); | 1064 | Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established."); |
1065 | return; | 1065 | return; |
diff --git a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs index 9c441ed..0c74b49 100644 --- a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs +++ b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs | |||
@@ -48,8 +48,8 @@ namespace OpenSim.Region.CoreModules.World.Region | |||
48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RestartModule")] | 48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RestartModule")] |
49 | public class RestartModule : INonSharedRegionModule, IRestartModule | 49 | public class RestartModule : INonSharedRegionModule, IRestartModule |
50 | { | 50 | { |
51 | // private static readonly ILog m_log = | 51 | private static readonly ILog m_log = |
52 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 52 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
53 | 53 | ||
54 | protected Scene m_Scene; | 54 | protected Scene m_Scene; |
55 | protected Timer m_CountdownTimer = null; | 55 | protected Timer m_CountdownTimer = null; |
@@ -223,11 +223,25 @@ namespace OpenSim.Region.CoreModules.World.Region | |||
223 | 223 | ||
224 | public void SetTimer(int intervalSeconds) | 224 | public void SetTimer(int intervalSeconds) |
225 | { | 225 | { |
226 | m_CountdownTimer = new Timer(); | 226 | if (intervalSeconds > 0) |
227 | m_CountdownTimer.AutoReset = false; | 227 | { |
228 | m_CountdownTimer.Interval = intervalSeconds * 1000; | 228 | m_CountdownTimer = new Timer(); |
229 | m_CountdownTimer.Elapsed += OnTimer; | 229 | m_CountdownTimer.AutoReset = false; |
230 | m_CountdownTimer.Start(); | 230 | m_CountdownTimer.Interval = intervalSeconds * 1000; |
231 | m_CountdownTimer.Elapsed += OnTimer; | ||
232 | m_CountdownTimer.Start(); | ||
233 | } | ||
234 | else if (m_CountdownTimer != null) | ||
235 | { | ||
236 | m_CountdownTimer.Stop(); | ||
237 | m_CountdownTimer = null; | ||
238 | } | ||
239 | else | ||
240 | { | ||
241 | m_log.WarnFormat( | ||
242 | "[RESTART MODULE]: Tried to set restart timer to {0} in {1}, which is not a valid interval", | ||
243 | intervalSeconds, m_Scene.Name); | ||
244 | } | ||
231 | } | 245 | } |
232 | 246 | ||
233 | private void OnTimer(object source, ElapsedEventArgs e) | 247 | private void OnTimer(object source, ElapsedEventArgs e) |
@@ -332,4 +346,4 @@ namespace OpenSim.Region.CoreModules.World.Region | |||
332 | } | 346 | } |
333 | } | 347 | } |
334 | } | 348 | } |
335 | } \ No newline at end of file | 349 | } |