aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorBlueWall2013-08-29 16:54:13 -0400
committerBlueWall2013-08-29 16:54:13 -0400
commit56f565b601c527a1b6fd345813972ee32e2e103d (patch)
tree0c0bc133941741480a8308f1fae155ab34079b84 /OpenSim/Region
parentInitialization: move key expansion out to operate on all sources and not just... (diff)
downloadopensim-SC-56f565b601c527a1b6fd345813972ee32e2e103d.zip
opensim-SC-56f565b601c527a1b6fd345813972ee32e2e103d.tar.gz
opensim-SC-56f565b601c527a1b6fd345813972ee32e2e103d.tar.bz2
opensim-SC-56f565b601c527a1b6fd345813972ee32e2e103d.tar.xz
Profiles: Clean up some log entries caused when visiting HG avatar is using legacy profiles
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs42
1 files changed, 26 insertions, 16 deletions
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