diff options
author | Justin Clark-Casey (justincc) | 2012-02-07 21:40:28 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-02-07 21:40:28 +0000 |
commit | 1f402fdf5e8ef53a07f98c4447946805791d26bc (patch) | |
tree | d7a0ea0ee0538e0a14bb69dd2e76cf9ac43e34b5 /OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs | |
parent | Add TestAddTaskInventoryItem() (diff) | |
download | opensim-SC-1f402fdf5e8ef53a07f98c4447946805791d26bc.zip opensim-SC-1f402fdf5e8ef53a07f98c4447946805791d26bc.tar.gz opensim-SC-1f402fdf5e8ef53a07f98c4447946805791d26bc.tar.bz2 opensim-SC-1f402fdf5e8ef53a07f98c4447946805791d26bc.tar.xz |
Add url to logging if SynchronousRestFormsRequester.MakRequest() throws an exception in service connectors
Diffstat (limited to 'OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs | 15 |
1 files changed, 9 insertions, 6 deletions
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 | |||
79 | sendData["SESSIONID"] = m_SessionID.ToString(); | 79 | sendData["SESSIONID"] = m_SessionID.ToString(); |
80 | 80 | ||
81 | string reqString = ServerUtils.BuildQueryString(sendData); | 81 | string reqString = ServerUtils.BuildQueryString(sendData); |
82 | string uri = m_ServerURI + "/hgfriends"; | ||
82 | 83 | ||
83 | try | 84 | try |
84 | { | 85 | { |
85 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 86 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
86 | m_ServerURI + "/hgfriends", | 87 | uri, |
87 | reqString); | 88 | reqString); |
88 | if (reply != string.Empty) | 89 | if (reply != string.Empty) |
89 | { | 90 | { |
@@ -103,7 +104,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
103 | } | 104 | } |
104 | catch (Exception e) | 105 | catch (Exception e) |
105 | { | 106 | { |
106 | m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server: {0}", e.Message); | 107 | m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); |
107 | } | 108 | } |
108 | 109 | ||
109 | return 0; | 110 | return 0; |
@@ -123,15 +124,16 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
123 | sendData["SESSIONID"] = m_SessionID.ToString(); | 124 | sendData["SESSIONID"] = m_SessionID.ToString(); |
124 | 125 | ||
125 | string reply = string.Empty; | 126 | string reply = string.Empty; |
127 | string uri = m_ServerURI + "/hgfriends"; | ||
126 | try | 128 | try |
127 | { | 129 | { |
128 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 130 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
129 | m_ServerURI + "/hgfriends", | 131 | uri, |
130 | ServerUtils.BuildQueryString(sendData)); | 132 | ServerUtils.BuildQueryString(sendData)); |
131 | } | 133 | } |
132 | catch (Exception e) | 134 | catch (Exception e) |
133 | { | 135 | { |
134 | m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server: {0}", e.Message); | 136 | m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); |
135 | return false; | 137 | return false; |
136 | } | 138 | } |
137 | 139 | ||
@@ -168,15 +170,16 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
168 | sendData["SECRET"] = secret; | 170 | sendData["SECRET"] = secret; |
169 | 171 | ||
170 | string reply = string.Empty; | 172 | string reply = string.Empty; |
173 | string uri = m_ServerURI + "/hgfriends"; | ||
171 | try | 174 | try |
172 | { | 175 | { |
173 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 176 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
174 | m_ServerURI + "/hgfriends", | 177 | uri, |
175 | ServerUtils.BuildQueryString(sendData)); | 178 | ServerUtils.BuildQueryString(sendData)); |
176 | } | 179 | } |
177 | catch (Exception e) | 180 | catch (Exception e) |
178 | { | 181 | { |
179 | m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server: {0}", e.Message); | 182 | m_log.DebugFormat("[HGFRIENDS CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); |
180 | return false; | 183 | return false; |
181 | } | 184 | } |
182 | 185 | ||