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/Avatar | |
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/Avatar')
-rw-r--r-- | OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs | 40 |
1 files changed, 19 insertions, 21 deletions
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 | |||
110 | 110 | ||
111 | string reply = string.Empty; | 111 | string reply = string.Empty; |
112 | string reqString = ServerUtils.BuildQueryString(sendData); | 112 | string reqString = ServerUtils.BuildQueryString(sendData); |
113 | string uri = m_ServerURI + "/avatar"; | ||
113 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); | 114 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); |
114 | try | 115 | try |
115 | { | 116 | { |
116 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 117 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); |
117 | m_ServerURI + "/avatar", | ||
118 | reqString); | ||
119 | if (reply == null || (reply != null && reply == string.Empty)) | 118 | if (reply == null || (reply != null && reply == string.Empty)) |
120 | { | 119 | { |
121 | m_log.DebugFormat("[AVATAR CONNECTOR]: GetAgent received null or empty reply"); | 120 | m_log.DebugFormat("[AVATAR CONNECTOR]: GetAgent received null or empty reply"); |
@@ -124,7 +123,7 @@ namespace OpenSim.Services.Connectors | |||
124 | } | 123 | } |
125 | catch (Exception e) | 124 | catch (Exception e) |
126 | { | 125 | { |
127 | m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server: {0}", e.Message); | 126 | m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); |
128 | } | 127 | } |
129 | 128 | ||
130 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 129 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -159,12 +158,11 @@ namespace OpenSim.Services.Connectors | |||
159 | 158 | ||
160 | 159 | ||
161 | string reqString = ServerUtils.BuildQueryString(sendData); | 160 | string reqString = ServerUtils.BuildQueryString(sendData); |
161 | string uri = m_ServerURI + "/avatar"; | ||
162 | //m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); | 162 | //m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); |
163 | try | 163 | try |
164 | { | 164 | { |
165 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 165 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); |
166 | m_ServerURI + "/avatar", | ||
167 | reqString); | ||
168 | if (reply != string.Empty) | 166 | if (reply != string.Empty) |
169 | { | 167 | { |
170 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 168 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -177,15 +175,18 @@ namespace OpenSim.Services.Connectors | |||
177 | return false; | 175 | return false; |
178 | } | 176 | } |
179 | else | 177 | else |
178 | { | ||
180 | m_log.DebugFormat("[AVATAR CONNECTOR]: SetAvatar reply data does not contain result field"); | 179 | m_log.DebugFormat("[AVATAR CONNECTOR]: SetAvatar reply data does not contain result field"); |
181 | 180 | } | |
182 | } | 181 | } |
183 | else | 182 | else |
183 | { | ||
184 | m_log.DebugFormat("[AVATAR CONNECTOR]: SetAvatar received empty reply"); | 184 | m_log.DebugFormat("[AVATAR CONNECTOR]: SetAvatar received empty reply"); |
185 | } | ||
185 | } | 186 | } |
186 | catch (Exception e) | 187 | catch (Exception e) |
187 | { | 188 | { |
188 | m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting avatar server: {0}", e.Message); | 189 | m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); |
189 | } | 190 | } |
190 | 191 | ||
191 | return false; | 192 | return false; |
@@ -202,12 +203,11 @@ namespace OpenSim.Services.Connectors | |||
202 | sendData["UserID"] = userID.ToString(); | 203 | sendData["UserID"] = userID.ToString(); |
203 | 204 | ||
204 | string reqString = ServerUtils.BuildQueryString(sendData); | 205 | string reqString = ServerUtils.BuildQueryString(sendData); |
206 | string uri = m_ServerURI + "/avatar"; | ||
205 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); | 207 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); |
206 | try | 208 | try |
207 | { | 209 | { |
208 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 210 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); |
209 | m_ServerURI + "/avatar", | ||
210 | reqString); | ||
211 | if (reply != string.Empty) | 211 | if (reply != string.Empty) |
212 | { | 212 | { |
213 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 213 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -228,7 +228,7 @@ namespace OpenSim.Services.Connectors | |||
228 | } | 228 | } |
229 | catch (Exception e) | 229 | catch (Exception e) |
230 | { | 230 | { |
231 | m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting avatar server: {0}", e.Message); | 231 | m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); |
232 | } | 232 | } |
233 | 233 | ||
234 | return false; | 234 | return false; |
@@ -246,12 +246,11 @@ namespace OpenSim.Services.Connectors | |||
246 | sendData["Values"] = new List<string>(values); | 246 | sendData["Values"] = new List<string>(values); |
247 | 247 | ||
248 | string reqString = ServerUtils.BuildQueryString(sendData); | 248 | string reqString = ServerUtils.BuildQueryString(sendData); |
249 | string uri = m_ServerURI + "/avatar"; | ||
249 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); | 250 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); |
250 | try | 251 | try |
251 | { | 252 | { |
252 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 253 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); |
253 | m_ServerURI + "/avatar", | ||
254 | reqString); | ||
255 | if (reply != string.Empty) | 254 | if (reply != string.Empty) |
256 | { | 255 | { |
257 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 256 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -272,7 +271,7 @@ namespace OpenSim.Services.Connectors | |||
272 | } | 271 | } |
273 | catch (Exception e) | 272 | catch (Exception e) |
274 | { | 273 | { |
275 | m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting avatar server: {0}", e.Message); | 274 | m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); |
276 | } | 275 | } |
277 | 276 | ||
278 | return false; | 277 | return false; |
@@ -290,12 +289,11 @@ namespace OpenSim.Services.Connectors | |||
290 | sendData["Names"] = new List<string>(names); | 289 | sendData["Names"] = new List<string>(names); |
291 | 290 | ||
292 | string reqString = ServerUtils.BuildQueryString(sendData); | 291 | string reqString = ServerUtils.BuildQueryString(sendData); |
292 | string uri = m_ServerURI + "/avatar"; | ||
293 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); | 293 | // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); |
294 | try | 294 | try |
295 | { | 295 | { |
296 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 296 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); |
297 | m_ServerURI + "/avatar", | ||
298 | reqString); | ||
299 | if (reply != string.Empty) | 297 | if (reply != string.Empty) |
300 | { | 298 | { |
301 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 299 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -316,7 +314,7 @@ namespace OpenSim.Services.Connectors | |||
316 | } | 314 | } |
317 | catch (Exception e) | 315 | catch (Exception e) |
318 | { | 316 | { |
319 | m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting avatar server: {0}", e.Message); | 317 | m_log.DebugFormat("[AVATAR CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); |
320 | } | 318 | } |
321 | 319 | ||
322 | return false; | 320 | return false; |