diff options
author | Oren Hurvitz | 2014-01-05 18:04:55 +0200 |
---|---|---|
committer | Oren Hurvitz | 2014-03-25 09:37:18 +0100 |
commit | 368b29a68006d5e4cda2e0a7663c3978725f4276 (patch) | |
tree | 9cee0b8c76cf1548734030ebec24f2e617ccf83c /OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |
parent | Always throw an exception if MakeRequest (used for HTTP POST) fails. (Previou... (diff) | |
download | opensim-SC_OLD-368b29a68006d5e4cda2e0a7663c3978725f4276.zip opensim-SC_OLD-368b29a68006d5e4cda2e0a7663c3978725f4276.tar.gz opensim-SC_OLD-368b29a68006d5e4cda2e0a7663c3978725f4276.tar.bz2 opensim-SC_OLD-368b29a68006d5e4cda2e0a7663c3978725f4276.tar.xz |
In Core Profiles: as a fallback, try to get profiles from foreign grids using the OpenProfile protocol
Resolves http://opensimulator.org/mantis/view.php?id=6954
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index bb2a258..d949d70 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -47,7 +47,7 @@ using OpenSim.Services.Interfaces; | |||
47 | using Mono.Addins; | 47 | using Mono.Addins; |
48 | using OpenSim.Services.Connectors.Hypergrid; | 48 | using OpenSim.Services.Connectors.Hypergrid; |
49 | 49 | ||
50 | namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | 50 | namespace OpenSim.Region.CoreModules.Avatar.UserProfiles |
51 | { | 51 | { |
52 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UserProfilesModule")] | 52 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UserProfilesModule")] |
53 | public class UserProfileModule : IProfileModule, INonSharedRegionModule | 53 | public class UserProfileModule : IProfileModule, INonSharedRegionModule |
@@ -999,7 +999,31 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
999 | string result = string.Empty; | 999 | string result = string.Empty; |
1000 | 1000 | ||
1001 | props.UserId = avatarID; | 1001 | props.UserId = avatarID; |
1002 | GetProfileData(ref props, out result); | 1002 | |
1003 | try | ||
1004 | { | ||
1005 | GetProfileData(ref props, out result); | ||
1006 | } | ||
1007 | catch (Exception e) | ||
1008 | { | ||
1009 | if (foreign) | ||
1010 | { | ||
1011 | // Check if the foreign grid is using OpenProfile. | ||
1012 | // If any error occurs then discard it, and report the original error. | ||
1013 | try | ||
1014 | { | ||
1015 | OpenProfileClient client = new OpenProfileClient(serverURI); | ||
1016 | if (!client.RequestAvatarPropertiesUsingOpenProfile(ref props)) | ||
1017 | throw e; | ||
1018 | } | ||
1019 | catch (Exception) | ||
1020 | { | ||
1021 | throw e; | ||
1022 | } | ||
1023 | } | ||
1024 | else | ||
1025 | throw; | ||
1026 | } | ||
1003 | 1027 | ||
1004 | remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, charterMember , props.FirstLifeText, flags, | 1028 | remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, charterMember , props.FirstLifeText, flags, |
1005 | props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId); | 1029 | props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId); |