Instrument the heck out of offline messages. THIS IS VERY VERBOSE.

bulletsim
Diva Canto 2011-05-12 19:56:59 -07:00
parent 691283c44e
commit 301321c853
2 changed files with 19 additions and 0 deletions

View File

@ -940,6 +940,8 @@ namespace OpenSim.Framework
WebRequest request = WebRequest.Create(requestUrl); WebRequest request = WebRequest.Create(requestUrl);
request.Method = verb; request.Method = verb;
m_log.DebugFormat("[XXX] 1");
if ((verb == "POST") || (verb == "PUT")) if ((verb == "POST") || (verb == "PUT"))
{ {
request.ContentType = "text/xml"; request.ContentType = "text/xml";
@ -959,11 +961,14 @@ namespace OpenSim.Framework
int length = (int)buffer.Length; int length = (int)buffer.Length;
request.ContentLength = length; request.ContentLength = length;
m_log.DebugFormat("[XXX] 2");
Stream requestStream = null; Stream requestStream = null;
try try
{ {
requestStream = request.GetRequestStream(); requestStream = request.GetRequestStream();
requestStream.Write(buffer.ToArray(), 0, length); requestStream.Write(buffer.ToArray(), 0, length);
m_log.DebugFormat("[XXX] Wrote to stream ok");
} }
catch (Exception e) catch (Exception e)
{ {
@ -977,6 +982,8 @@ namespace OpenSim.Framework
} }
} }
m_log.DebugFormat("[XXX] Getting response now... {0}", requestUrl);
try try
{ {
using (WebResponse resp = request.GetResponse()) using (WebResponse resp = request.GetResponse())
@ -988,6 +995,9 @@ namespace OpenSim.Framework
deserial = (TResponse)deserializer.Deserialize(respStream); deserial = (TResponse)deserializer.Deserialize(respStream);
respStream.Close(); respStream.Close();
} }
else
m_log.DebugFormat("[SynchronousRestObjectRequester]: Oops! no content found in response stream from {0} {1}", requestUrl, verb);
} }
} }
catch (System.InvalidOperationException) catch (System.InvalidOperationException)
@ -995,6 +1005,12 @@ namespace OpenSim.Framework
// This is what happens when there is invalid XML // This is what happens when there is invalid XML
m_log.WarnFormat("[SynchronousRestObjectRequester]: Invalid XML {0} {1}", requestUrl, typeof(TResponse).ToString()); m_log.WarnFormat("[SynchronousRestObjectRequester]: Invalid XML {0} {1}", requestUrl, typeof(TResponse).ToString());
} }
catch (Exception e)
{
m_log.WarnFormat("[SynchronousRestObjectRequester]: Exception on response from {0} {1}", requestUrl, e);
}
m_log.DebugFormat("[XXX] reply is null? {0}", (deserial == null) ? "yes": "no");
return deserial; return deserial;
} }
} }

View File

@ -178,6 +178,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
List<GridInstantMessage> msglist = SynchronousRestObjectPoster.BeginPostObject<UUID, List<GridInstantMessage>>( List<GridInstantMessage> msglist = SynchronousRestObjectPoster.BeginPostObject<UUID, List<GridInstantMessage>>(
"POST", m_RestURL + "/RetrieveMessages/", client.AgentId); "POST", m_RestURL + "/RetrieveMessages/", client.AgentId);
if (msglist == null)
m_log.WarnFormat("[OFFLINE MESSAGING]: WARNING null message list.");
foreach (GridInstantMessage im in msglist) foreach (GridInstantMessage im in msglist)
{ {
// client.SendInstantMessage(im); // client.SendInstantMessage(im);