diff options
author | UbitUmarov | 2014-09-17 17:25:07 +0100 |
---|---|---|
committer | UbitUmarov | 2014-09-17 17:25:07 +0100 |
commit | ce8ea55f4e863acad6597f5c199eecaa8726b117 (patch) | |
tree | cc489f536660113bd35a9f1503db2affd10a1d69 /OpenSim/Region/CoreModules/Avatar/UserProfiles | |
parent | and another one (diff) | |
download | opensim-SC_OLD-ce8ea55f4e863acad6597f5c199eecaa8726b117.zip opensim-SC_OLD-ce8ea55f4e863acad6597f5c199eecaa8726b117.tar.gz opensim-SC_OLD-ce8ea55f4e863acad6597f5c199eecaa8726b117.tar.bz2 opensim-SC_OLD-ce8ea55f4e863acad6597f5c199eecaa8726b117.tar.xz |
... and a few more..
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/UserProfiles')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | 49 |
1 files changed, 31 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index d359ebc..db8405b 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -1239,19 +1239,25 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
1239 | return false; | 1239 | return false; |
1240 | } | 1240 | } |
1241 | 1241 | ||
1242 | Stream rstream = webResponse.GetResponseStream(); | ||
1243 | |||
1244 | OSDMap mret = new OSDMap(); | 1242 | OSDMap mret = new OSDMap(); |
1245 | try | 1243 | |
1246 | { | 1244 | using (Stream rstream = webResponse.GetResponseStream()) |
1247 | mret = (OSDMap)OSDParser.DeserializeJson(rstream); | ||
1248 | } | ||
1249 | catch (Exception e) | ||
1250 | { | 1245 | { |
1251 | m_log.DebugFormat("[PROFILES]: JsonRpcRequest Error {0} - remote user with legacy profiles?", e.Message); | 1246 | try |
1252 | return false; | 1247 | { |
1248 | mret = (OSDMap)OSDParser.DeserializeJson(rstream); | ||
1249 | } | ||
1250 | catch (Exception e) | ||
1251 | { | ||
1252 | m_log.DebugFormat("[PROFILES]: JsonRpcRequest Error {0} - remote user with legacy profiles?", e.Message); | ||
1253 | if (webResponse != null) | ||
1254 | webResponse.Close(); | ||
1255 | return false; | ||
1256 | } | ||
1253 | } | 1257 | } |
1254 | 1258 | ||
1259 | if (webResponse != null) | ||
1260 | webResponse.Close(); | ||
1255 | 1261 | ||
1256 | if (mret.ContainsKey("error")) | 1262 | if (mret.ContainsKey("error")) |
1257 | return false; | 1263 | return false; |
@@ -1315,19 +1321,26 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
1315 | return false; | 1321 | return false; |
1316 | } | 1322 | } |
1317 | 1323 | ||
1318 | Stream rstream = webResponse.GetResponseStream(); | ||
1319 | |||
1320 | OSDMap response = new OSDMap(); | 1324 | OSDMap response = new OSDMap(); |
1321 | try | 1325 | |
1322 | { | 1326 | using (Stream rstream = webResponse.GetResponseStream()) |
1323 | response = (OSDMap)OSDParser.DeserializeJson(rstream); | ||
1324 | } | ||
1325 | catch (Exception e) | ||
1326 | { | 1327 | { |
1327 | m_log.DebugFormat("[PROFILES]: JsonRpcRequest Error {0} - remote user with legacy profiles?", e.Message); | 1328 | try |
1328 | return false; | 1329 | { |
1330 | response = (OSDMap)OSDParser.DeserializeJson(rstream); | ||
1331 | } | ||
1332 | catch (Exception e) | ||
1333 | { | ||
1334 | m_log.DebugFormat("[PROFILES]: JsonRpcRequest Error {0} - remote user with legacy profiles?", e.Message); | ||
1335 | if (webResponse != null) | ||
1336 | webResponse.Close(); | ||
1337 | return false; | ||
1338 | } | ||
1329 | } | 1339 | } |
1330 | 1340 | ||
1341 | if (webResponse != null) | ||
1342 | webResponse.Close(); | ||
1343 | |||
1331 | if(response.ContainsKey("error")) | 1344 | if(response.ContainsKey("error")) |
1332 | { | 1345 | { |
1333 | data = response["error"]; | 1346 | data = response["error"]; |