From 1f402fdf5e8ef53a07f98c4447946805791d26bc Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 7 Feb 2012 21:40:28 +0000 Subject: Add url to logging if SynchronousRestFormsRequester.MakRequest() throws an exception in service connectors --- .../Connectors/Avatar/AvatarServiceConnector.cs | 40 ++++++------ .../Connectors/Friends/FriendsServiceConnector.cs | 22 +++---- .../Connectors/Friends/FriendsSimConnector.cs | 9 ++- .../Connectors/Grid/GridServiceConnector.cs | 72 ++++++++++++---------- .../GridUser/GridUserServiceConnector.cs | 15 +++-- .../Hypergrid/HGFriendsServiceConnector.cs | 15 +++-- .../MapImage/MapImageServiceConnector.cs | 5 +- .../Presence/PresenceServiceConnector.cs | 30 +++++---- .../UserAccounts/UserAccountServiceConnector.cs | 15 +++-- 9 files changed, 120 insertions(+), 103 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs b/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs index 8fdb4d0..ddfca57 100644 --- a/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs @@ -110,12 +110,11 @@ namespace OpenSim.Services.Connectors string reply = string.Empty; string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/avatar"; // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); try { - reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/avatar", - reqString); + reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); if (reply == null || (reply != null && reply == string.Empty)) { m_log.DebugFormat("[AVATAR CONNECTOR]: GetAgent received null or empty reply"); @@ -124,7 +123,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server: {0}", e.Message); + m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); } Dictionary replyData = ServerUtils.ParseXmlResponse(reply); @@ -159,12 +158,11 @@ namespace OpenSim.Services.Connectors string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/avatar"; //m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); try { - string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/avatar", - reqString); + string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); if (reply != string.Empty) { Dictionary replyData = ServerUtils.ParseXmlResponse(reply); @@ -177,15 +175,18 @@ namespace OpenSim.Services.Connectors return false; } else + { m_log.DebugFormat("[AVATAR CONNECTOR]: SetAvatar reply data does not contain result field"); - + } } else + { m_log.DebugFormat("[AVATAR CONNECTOR]: SetAvatar received empty reply"); + } } catch (Exception e) { - m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting avatar server: {0}", e.Message); + m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); } return false; @@ -202,12 +203,11 @@ namespace OpenSim.Services.Connectors sendData["UserID"] = userID.ToString(); string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/avatar"; // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); try { - string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/avatar", - reqString); + string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); if (reply != string.Empty) { Dictionary replyData = ServerUtils.ParseXmlResponse(reply); @@ -228,7 +228,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting avatar server: {0}", e.Message); + m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); } return false; @@ -246,12 +246,11 @@ namespace OpenSim.Services.Connectors sendData["Values"] = new List(values); string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/avatar"; // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); try { - string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/avatar", - reqString); + string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); if (reply != string.Empty) { Dictionary replyData = ServerUtils.ParseXmlResponse(reply); @@ -272,7 +271,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting avatar server: {0}", e.Message); + m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); } return false; @@ -290,12 +289,11 @@ namespace OpenSim.Services.Connectors sendData["Names"] = new List(names); string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/avatar"; // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); try { - string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/avatar", - reqString); + string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); if (reply != string.Empty) { Dictionary replyData = ServerUtils.ParseXmlResponse(reply); @@ -316,7 +314,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting avatar server: {0}", e.Message); + m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); } return false; diff --git a/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs index 41361ab..44138c9 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs @@ -108,12 +108,11 @@ namespace OpenSim.Services.Connectors.Friends protected FriendInfo[] GetFriends(Dictionary sendData, string PrincipalID) { string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/friends"; try { - string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/friends", - reqString); + string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); if (reply != string.Empty) { Dictionary replyData = ServerUtils.ParseXmlResponse(reply); @@ -143,7 +142,6 @@ namespace OpenSim.Services.Connectors.Friends // Success return finfos.ToArray(); } - else m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: GetFriends {0} received null response", PrincipalID); @@ -152,7 +150,7 @@ namespace OpenSim.Services.Connectors.Friends } catch (Exception e) { - m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server: {0}", e.Message); + m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); } return new FriendInfo[0]; @@ -167,15 +165,14 @@ namespace OpenSim.Services.Connectors.Friends sendData["METHOD"] = "storefriend"; string reply = string.Empty; + string uri = m_ServerURI + "/friends"; try { - reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/friends", - ServerUtils.BuildQueryString(sendData)); + reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData)); } catch (Exception e) { - m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server: {0}", e.Message); + m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); return false; } @@ -223,15 +220,14 @@ namespace OpenSim.Services.Connectors.Friends public bool Delete(Dictionary sendData, string PrincipalID, string Friend) { string reply = string.Empty; + string uri = m_ServerURI = "/friends"; try { - reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/friends", - ServerUtils.BuildQueryString(sendData)); + reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData)); } catch (Exception e) { - m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server: {0}", e.Message); + m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); return false; } diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs index d0a20fc..eea9853 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs @@ -139,12 +139,11 @@ namespace OpenSim.Services.Connectors.Friends return false; m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: region: {0}", region.ExternalHostName + ":" + region.HttpPort); + string uri = "http://" + region.ExternalHostName + ":" + region.HttpPort + "/friends"; + try { - string url = "http://" + region.ExternalHostName + ":" + region.HttpPort; - string reply = SynchronousRestFormsRequester.MakeRequest("POST", - url + "/friends", - reqString); + string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); if (reply != string.Empty) { Dictionary replyData = ServerUtils.ParseXmlResponse(reply); @@ -165,7 +164,7 @@ namespace OpenSim.Services.Connectors.Friends } catch (Exception e) { - m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: Exception when contacting remote sim: {0}", e.ToString()); + m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: Exception when contacting remote sim at {0}: {1}", uri, e.Message); } return false; diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index e57f28b..1599a56 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs @@ -98,12 +98,11 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "register"; string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/grid"; // m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString); try { - string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", - reqString); + string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); if (reply != string.Empty) { Dictionary replyData = ServerUtils.ParseXmlResponse(reply); @@ -133,7 +132,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); } return "Error communicating with grid service"; @@ -147,11 +146,12 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "deregister"; + string uri = m_ServerURI + "/grid"; + try { - string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", - ServerUtils.BuildQueryString(sendData)); + string reply + = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData)); if (reply != string.Empty) { @@ -165,7 +165,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); } return false; @@ -184,15 +184,15 @@ namespace OpenSim.Services.Connectors string reqString = ServerUtils.BuildQueryString(sendData); string reply = string.Empty; + string uri = m_ServerURI + "/grid"; + try { - reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", - reqString); + reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); return rinfos; } @@ -228,15 +228,14 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "get_region_by_uuid"; string reply = string.Empty; + string uri = m_ServerURI + "/grid"; try { - reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", - ServerUtils.BuildQueryString(sendData)); + reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData)); } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); return null; } @@ -274,15 +273,16 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "get_region_by_position"; string reply = string.Empty; + string uri = m_ServerURI + "/grid"; try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", + uri, ServerUtils.BuildQueryString(sendData)); } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); return null; } @@ -318,15 +318,16 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "get_region_by_name"; string reply = string.Empty; + string uri = m_ServerURI + "/grid"; try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", + uri, ServerUtils.BuildQueryString(sendData)); } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); return null; } @@ -361,15 +362,16 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "get_regions_by_name"; List rinfos = new List(); string reply = string.Empty; + string uri = m_ServerURI + "/grid"; try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", + uri, ServerUtils.BuildQueryString(sendData)); } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); return rinfos; } @@ -413,17 +415,19 @@ namespace OpenSim.Services.Connectors List rinfos = new List(); string reply = string.Empty; + string uri = m_ServerURI + "/grid"; + try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", + uri, ServerUtils.BuildQueryString(sendData)); //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); return rinfos; } @@ -463,17 +467,18 @@ namespace OpenSim.Services.Connectors List rinfos = new List(); string reply = string.Empty; + string uri = m_ServerURI + "/grid"; try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", + uri, ServerUtils.BuildQueryString(sendData)); //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); return rinfos; } @@ -515,17 +520,18 @@ namespace OpenSim.Services.Connectors List rinfos = new List(); string reply = string.Empty; + string uri = m_ServerURI + "/grid"; try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", + uri, ServerUtils.BuildQueryString(sendData)); //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); return rinfos; } @@ -565,17 +571,18 @@ namespace OpenSim.Services.Connectors List rinfos = new List(); string reply = string.Empty; + string uri = m_ServerURI + "/grid"; try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", + uri, ServerUtils.BuildQueryString(sendData)); //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); return rinfos; } @@ -615,15 +622,16 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "get_region_flags"; string reply = string.Empty; + string uri = m_ServerURI + "/grid"; try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/grid", + uri, ServerUtils.BuildQueryString(sendData)); } catch (Exception e) { - m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); return -1; } diff --git a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs index aa98b5d..20d7eaf 100644 --- a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs +++ b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs @@ -156,11 +156,12 @@ namespace OpenSim.Services.Connectors sendData["LookAt"] = lookAt.ToString(); string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/griduser"; // m_log.DebugFormat("[GRID USER CONNECTOR]: queryString = {0}", reqString); try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/griduser", + uri, reqString); if (reply != string.Empty) { @@ -182,7 +183,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[GRID USER CONNECTOR]: Exception when contacting grid user server: {0}", e.Message); + m_log.DebugFormat("[GRID USER CONNECTOR]: Exception when contacting grid user server at {0}: {1}", uri, e.Message); } return false; @@ -191,11 +192,12 @@ namespace OpenSim.Services.Connectors protected GridUserInfo Get(Dictionary sendData) { string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/griduser"; // m_log.DebugFormat("[GRID USER CONNECTOR]: queryString = {0}", reqString); try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/griduser", + uri, reqString); if (reply != string.Empty) { @@ -216,7 +218,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[GRID USER CONNECTOR]: Exception when contacting grid user server: {0}", e.Message); + m_log.DebugFormat("[GRID USER CONNECTOR]: Exception when contacting grid user server at {0}: {1}", uri, e.Message); } return null; @@ -235,11 +237,12 @@ namespace OpenSim.Services.Connectors string reply = string.Empty; string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/griduser"; //m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/griduser", + uri, reqString); if (reply == null || (reply != null && reply == string.Empty)) { @@ -249,7 +252,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[GRID USER CONNECTOR]: Exception when contacting grid user server: {0}", e.Message); + m_log.DebugFormat("[GRID USER CONNECTOR]: Exception when contacting grid user server at {0}: {1}", uri, e.Message); } List rinfos = new List(); diff --git a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs index d699f59..af4b0da 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs @@ -79,11 +79,12 @@ namespace OpenSim.Services.Connectors.Hypergrid sendData["SESSIONID"] = m_SessionID.ToString(); string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/hgfriends"; try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/hgfriends", + uri, reqString); if (reply != string.Empty) { @@ -103,7 +104,7 @@ namespace OpenSim.Services.Connectors.Hypergrid } catch (Exception e) { - m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server: {0}", e.Message); + m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); } return 0; @@ -123,15 +124,16 @@ namespace OpenSim.Services.Connectors.Hypergrid sendData["SESSIONID"] = m_SessionID.ToString(); string reply = string.Empty; + string uri = m_ServerURI + "/hgfriends"; try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/hgfriends", + uri, ServerUtils.BuildQueryString(sendData)); } catch (Exception e) { - m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server: {0}", e.Message); + m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); return false; } @@ -168,15 +170,16 @@ namespace OpenSim.Services.Connectors.Hypergrid sendData["SECRET"] = secret; string reply = string.Empty; + string uri = m_ServerURI + "/hgfriends"; try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/hgfriends", + uri, ServerUtils.BuildQueryString(sendData)); } catch (Exception e) { - m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server: {0}", e.Message); + m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); return false; } diff --git a/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs b/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs index e46714e..30bfb70 100644 --- a/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs +++ b/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs @@ -97,11 +97,12 @@ namespace OpenSim.Services.Connectors sendData["DATA"] = Convert.ToBase64String(jpgData); string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/map"; try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/map", + uri, reqString); if (reply != string.Empty) { @@ -135,7 +136,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[MAP IMAGE CONNECTOR]: Exception when contacting grid server: {0}", e.Message); + m_log.DebugFormat("[MAP IMAGE CONNECTOR]: Exception when contacting map server at {0}: {1}", uri, e.Message); } finally { diff --git a/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs b/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs index 7238afc..f7d8c53 100644 --- a/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs @@ -98,11 +98,12 @@ namespace OpenSim.Services.Connectors sendData["SecureSessionID"] = secureSessionID.ToString(); string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/presence"; // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/presence", + uri, reqString); if (reply != string.Empty) { @@ -124,7 +125,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server: {0}", e.Message); + m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); } return false; @@ -142,11 +143,12 @@ namespace OpenSim.Services.Connectors sendData["SessionID"] = sessionID.ToString(); string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/presence"; // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/presence", + uri, reqString); if (reply != string.Empty) { @@ -168,7 +170,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server: {0}", e.Message); + m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); } return false; @@ -185,11 +187,12 @@ namespace OpenSim.Services.Connectors sendData["RegionID"] = regionID.ToString(); string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/presence"; // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/presence", + uri, reqString); if (reply != string.Empty) { @@ -211,7 +214,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server: {0}", e.Message); + m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); } return false; @@ -229,11 +232,12 @@ namespace OpenSim.Services.Connectors sendData["RegionID"] = regionID.ToString(); string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/presence"; // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/presence", + uri, reqString); if (reply != string.Empty) { @@ -255,7 +259,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server: {0}", e.Message); + m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); } return false; @@ -273,11 +277,12 @@ namespace OpenSim.Services.Connectors string reply = string.Empty; string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/presence"; // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/presence", + uri, reqString); if (reply == null || (reply != null && reply == string.Empty)) { @@ -287,7 +292,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server: {0}", e.Message); + m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); } Dictionary replyData = ServerUtils.ParseXmlResponse(reply); @@ -316,11 +321,12 @@ namespace OpenSim.Services.Connectors string reply = string.Empty; string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/presence"; //m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/presence", + uri, reqString); if (reply == null || (reply != null && reply == string.Empty)) { @@ -330,7 +336,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server: {0}", e.Message); + m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); } List rinfos = new List(); diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs index f6835b9..609dafe 100644 --- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs @@ -138,11 +138,12 @@ namespace OpenSim.Services.Connectors string reply = string.Empty; string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/accounts"; // m_log.DebugFormat("[ACCOUNTS CONNECTOR]: queryString = {0}", reqString); try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/accounts", + uri, reqString); if (reply == null || (reply != null && reply == string.Empty)) { @@ -152,7 +153,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[ACCOUNT CONNECTOR]: Exception when contacting accounts server: {0}", e.Message); + m_log.DebugFormat("[ACCOUNT CONNECTOR]: Exception when contacting user accounts server at {0}: {1}", uri, e.Message); } List accounts = new List(); @@ -206,11 +207,12 @@ namespace OpenSim.Services.Connectors { string reply = string.Empty; string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/accounts"; // m_log.DebugFormat("[ACCOUNTS CONNECTOR]: queryString = {0}", reqString); try { reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/accounts", + uri, reqString); if (reply == null || (reply != null && reply == string.Empty)) { @@ -220,7 +222,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[ACCOUNT CONNECTOR]: Exception when contacting user account server: {0}", e.Message); + m_log.DebugFormat("[ACCOUNT CONNECTOR]: Exception when contacting user accounts server at {0}: {1}", uri, e.Message); } Dictionary replyData = ServerUtils.ParseXmlResponse(reply); @@ -241,11 +243,12 @@ namespace OpenSim.Services.Connectors private bool SendAndGetBoolReply(Dictionary sendData) { string reqString = ServerUtils.BuildQueryString(sendData); + string uri = m_ServerURI + "/accounts"; // m_log.DebugFormat("[ACCOUNTS CONNECTOR]: queryString = {0}", reqString); try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", - m_ServerURI + "/accounts", + uri, reqString); if (reply != string.Empty) { @@ -267,7 +270,7 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { - m_log.DebugFormat("[ACCOUNTS CONNECTOR]: Exception when contacting user account server: {0}", e.Message); + m_log.DebugFormat("[ACCOUNT CONNECTOR]: Exception when contacting user accounts server at {0}: {1}", uri, e.Message); } return false; -- cgit v1.1