Add url to logging if SynchronousRestFormsRequester.MakRequest() throws an exception in service connectors

iar_mods
Justin Clark-Casey (justincc) 2012-02-07 21:40:28 +00:00
parent bd928218dd
commit 1f402fdf5e
9 changed files with 120 additions and 103 deletions

View File

@ -110,12 +110,11 @@ namespace OpenSim.Services.Connectors
string reply = string.Empty; string reply = string.Empty;
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/avatar";
// m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString);
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString);
m_ServerURI + "/avatar",
reqString);
if (reply == null || (reply != null && reply == string.Empty)) if (reply == null || (reply != null && reply == string.Empty))
{ {
m_log.DebugFormat("[AVATAR CONNECTOR]: GetAgent received null or empty reply"); m_log.DebugFormat("[AVATAR CONNECTOR]: GetAgent received null or empty reply");
@ -124,7 +123,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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<string, object> replyData = ServerUtils.ParseXmlResponse(reply); Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
@ -159,12 +158,11 @@ namespace OpenSim.Services.Connectors
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/avatar";
//m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); //m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString);
m_ServerURI + "/avatar",
reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
@ -177,15 +175,18 @@ namespace OpenSim.Services.Connectors
return false; return false;
} }
else else
{
m_log.DebugFormat("[AVATAR CONNECTOR]: SetAvatar reply data does not contain result field"); m_log.DebugFormat("[AVATAR CONNECTOR]: SetAvatar reply data does not contain result field");
}
} }
else else
{
m_log.DebugFormat("[AVATAR CONNECTOR]: SetAvatar received empty reply"); m_log.DebugFormat("[AVATAR CONNECTOR]: SetAvatar received empty reply");
}
} }
catch (Exception e) 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; return false;
@ -202,12 +203,11 @@ namespace OpenSim.Services.Connectors
sendData["UserID"] = userID.ToString(); sendData["UserID"] = userID.ToString();
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/avatar";
// m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString);
m_ServerURI + "/avatar",
reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
@ -228,7 +228,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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; return false;
@ -246,12 +246,11 @@ namespace OpenSim.Services.Connectors
sendData["Values"] = new List<string>(values); sendData["Values"] = new List<string>(values);
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/avatar";
// m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString);
m_ServerURI + "/avatar",
reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
@ -272,7 +271,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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; return false;
@ -290,12 +289,11 @@ namespace OpenSim.Services.Connectors
sendData["Names"] = new List<string>(names); sendData["Names"] = new List<string>(names);
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/avatar";
// m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString);
m_ServerURI + "/avatar",
reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
@ -316,7 +314,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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; return false;

View File

@ -108,12 +108,11 @@ namespace OpenSim.Services.Connectors.Friends
protected FriendInfo[] GetFriends(Dictionary<string, object> sendData, string PrincipalID) protected FriendInfo[] GetFriends(Dictionary<string, object> sendData, string PrincipalID)
{ {
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/friends";
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString);
m_ServerURI + "/friends",
reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
@ -143,7 +142,6 @@ namespace OpenSim.Services.Connectors.Friends
// Success // Success
return finfos.ToArray(); return finfos.ToArray();
} }
else else
m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: GetFriends {0} received null response", m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: GetFriends {0} received null response",
PrincipalID); PrincipalID);
@ -152,7 +150,7 @@ namespace OpenSim.Services.Connectors.Friends
} }
catch (Exception e) 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]; return new FriendInfo[0];
@ -167,15 +165,14 @@ namespace OpenSim.Services.Connectors.Friends
sendData["METHOD"] = "storefriend"; sendData["METHOD"] = "storefriend";
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/friends";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData));
m_ServerURI + "/friends",
ServerUtils.BuildQueryString(sendData));
} }
catch (Exception e) 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; return false;
} }
@ -223,15 +220,14 @@ namespace OpenSim.Services.Connectors.Friends
public bool Delete(Dictionary<string, object> sendData, string PrincipalID, string Friend) public bool Delete(Dictionary<string, object> sendData, string PrincipalID, string Friend)
{ {
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI = "/friends";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData));
m_ServerURI + "/friends",
ServerUtils.BuildQueryString(sendData));
} }
catch (Exception e) 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; return false;
} }

View File

@ -139,12 +139,11 @@ namespace OpenSim.Services.Connectors.Friends
return false; return false;
m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: region: {0}", region.ExternalHostName + ":" + region.HttpPort); m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: region: {0}", region.ExternalHostName + ":" + region.HttpPort);
string uri = "http://" + region.ExternalHostName + ":" + region.HttpPort + "/friends";
try try
{ {
string url = "http://" + region.ExternalHostName + ":" + region.HttpPort; string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString);
string reply = SynchronousRestFormsRequester.MakeRequest("POST",
url + "/friends",
reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
@ -165,7 +164,7 @@ namespace OpenSim.Services.Connectors.Friends
} }
catch (Exception e) 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; return false;

View File

@ -98,12 +98,11 @@ namespace OpenSim.Services.Connectors
sendData["METHOD"] = "register"; sendData["METHOD"] = "register";
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/grid";
// m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString);
m_ServerURI + "/grid",
reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
@ -133,7 +132,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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"; return "Error communicating with grid service";
@ -147,11 +146,12 @@ namespace OpenSim.Services.Connectors
sendData["METHOD"] = "deregister"; sendData["METHOD"] = "deregister";
string uri = m_ServerURI + "/grid";
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply
m_ServerURI + "/grid", = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData));
ServerUtils.BuildQueryString(sendData));
if (reply != string.Empty) if (reply != string.Empty)
{ {
@ -165,7 +165,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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; return false;
@ -184,15 +184,15 @@ namespace OpenSim.Services.Connectors
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/grid";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString);
m_ServerURI + "/grid",
reqString);
} }
catch (Exception e) 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; return rinfos;
} }
@ -228,15 +228,14 @@ namespace OpenSim.Services.Connectors
sendData["METHOD"] = "get_region_by_uuid"; sendData["METHOD"] = "get_region_by_uuid";
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/grid";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData));
m_ServerURI + "/grid",
ServerUtils.BuildQueryString(sendData));
} }
catch (Exception e) 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; return null;
} }
@ -274,15 +273,16 @@ namespace OpenSim.Services.Connectors
sendData["METHOD"] = "get_region_by_position"; sendData["METHOD"] = "get_region_by_position";
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/grid";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/grid", uri,
ServerUtils.BuildQueryString(sendData)); ServerUtils.BuildQueryString(sendData));
} }
catch (Exception e) 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; return null;
} }
@ -318,15 +318,16 @@ namespace OpenSim.Services.Connectors
sendData["METHOD"] = "get_region_by_name"; sendData["METHOD"] = "get_region_by_name";
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/grid";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/grid", uri,
ServerUtils.BuildQueryString(sendData)); ServerUtils.BuildQueryString(sendData));
} }
catch (Exception e) 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; return null;
} }
@ -361,15 +362,16 @@ namespace OpenSim.Services.Connectors
sendData["METHOD"] = "get_regions_by_name"; sendData["METHOD"] = "get_regions_by_name";
List<GridRegion> rinfos = new List<GridRegion>(); List<GridRegion> rinfos = new List<GridRegion>();
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/grid";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/grid", uri,
ServerUtils.BuildQueryString(sendData)); ServerUtils.BuildQueryString(sendData));
} }
catch (Exception e) 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; return rinfos;
} }
@ -413,17 +415,19 @@ namespace OpenSim.Services.Connectors
List<GridRegion> rinfos = new List<GridRegion>(); List<GridRegion> rinfos = new List<GridRegion>();
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/grid";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/grid", uri,
ServerUtils.BuildQueryString(sendData)); ServerUtils.BuildQueryString(sendData));
//m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply);
} }
catch (Exception e) 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; return rinfos;
} }
@ -463,17 +467,18 @@ namespace OpenSim.Services.Connectors
List<GridRegion> rinfos = new List<GridRegion>(); List<GridRegion> rinfos = new List<GridRegion>();
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/grid";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/grid", uri,
ServerUtils.BuildQueryString(sendData)); ServerUtils.BuildQueryString(sendData));
//m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply);
} }
catch (Exception e) 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; return rinfos;
} }
@ -515,17 +520,18 @@ namespace OpenSim.Services.Connectors
List<GridRegion> rinfos = new List<GridRegion>(); List<GridRegion> rinfos = new List<GridRegion>();
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/grid";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/grid", uri,
ServerUtils.BuildQueryString(sendData)); ServerUtils.BuildQueryString(sendData));
//m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply);
} }
catch (Exception e) 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; return rinfos;
} }
@ -565,17 +571,18 @@ namespace OpenSim.Services.Connectors
List<GridRegion> rinfos = new List<GridRegion>(); List<GridRegion> rinfos = new List<GridRegion>();
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/grid";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/grid", uri,
ServerUtils.BuildQueryString(sendData)); ServerUtils.BuildQueryString(sendData));
//m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply);
} }
catch (Exception e) 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; return rinfos;
} }
@ -615,15 +622,16 @@ namespace OpenSim.Services.Connectors
sendData["METHOD"] = "get_region_flags"; sendData["METHOD"] = "get_region_flags";
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/grid";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/grid", uri,
ServerUtils.BuildQueryString(sendData)); ServerUtils.BuildQueryString(sendData));
} }
catch (Exception e) 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; return -1;
} }

View File

@ -156,11 +156,12 @@ namespace OpenSim.Services.Connectors
sendData["LookAt"] = lookAt.ToString(); sendData["LookAt"] = lookAt.ToString();
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/griduser";
// m_log.DebugFormat("[GRID USER CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[GRID USER CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/griduser", uri,
reqString); reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
@ -182,7 +183,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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; return false;
@ -191,11 +192,12 @@ namespace OpenSim.Services.Connectors
protected GridUserInfo Get(Dictionary<string, object> sendData) protected GridUserInfo Get(Dictionary<string, object> sendData)
{ {
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/griduser";
// m_log.DebugFormat("[GRID USER CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[GRID USER CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/griduser", uri,
reqString); reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
@ -216,7 +218,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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; return null;
@ -235,11 +237,12 @@ namespace OpenSim.Services.Connectors
string reply = string.Empty; string reply = string.Empty;
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/griduser";
//m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); //m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString);
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/griduser", uri,
reqString); reqString);
if (reply == null || (reply != null && reply == string.Empty)) if (reply == null || (reply != null && reply == string.Empty))
{ {
@ -249,7 +252,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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<GridUserInfo> rinfos = new List<GridUserInfo>(); List<GridUserInfo> rinfos = new List<GridUserInfo>();

View File

@ -79,11 +79,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
sendData["SESSIONID"] = m_SessionID.ToString(); sendData["SESSIONID"] = m_SessionID.ToString();
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/hgfriends";
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/hgfriends", uri,
reqString); reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
@ -103,7 +104,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
} }
catch (Exception e) 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; return 0;
@ -123,15 +124,16 @@ namespace OpenSim.Services.Connectors.Hypergrid
sendData["SESSIONID"] = m_SessionID.ToString(); sendData["SESSIONID"] = m_SessionID.ToString();
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/hgfriends";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/hgfriends", uri,
ServerUtils.BuildQueryString(sendData)); ServerUtils.BuildQueryString(sendData));
} }
catch (Exception e) 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; return false;
} }
@ -168,15 +170,16 @@ namespace OpenSim.Services.Connectors.Hypergrid
sendData["SECRET"] = secret; sendData["SECRET"] = secret;
string reply = string.Empty; string reply = string.Empty;
string uri = m_ServerURI + "/hgfriends";
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/hgfriends", uri,
ServerUtils.BuildQueryString(sendData)); ServerUtils.BuildQueryString(sendData));
} }
catch (Exception e) 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; return false;
} }

View File

@ -97,11 +97,12 @@ namespace OpenSim.Services.Connectors
sendData["DATA"] = Convert.ToBase64String(jpgData); sendData["DATA"] = Convert.ToBase64String(jpgData);
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/map";
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/map", uri,
reqString); reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
@ -135,7 +136,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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 finally
{ {

View File

@ -98,11 +98,12 @@ namespace OpenSim.Services.Connectors
sendData["SecureSessionID"] = secureSessionID.ToString(); sendData["SecureSessionID"] = secureSessionID.ToString();
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/presence";
// m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/presence", uri,
reqString); reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
@ -124,7 +125,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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; return false;
@ -142,11 +143,12 @@ namespace OpenSim.Services.Connectors
sendData["SessionID"] = sessionID.ToString(); sendData["SessionID"] = sessionID.ToString();
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/presence";
// m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/presence", uri,
reqString); reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
@ -168,7 +170,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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; return false;
@ -185,11 +187,12 @@ namespace OpenSim.Services.Connectors
sendData["RegionID"] = regionID.ToString(); sendData["RegionID"] = regionID.ToString();
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/presence";
// m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/presence", uri,
reqString); reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
@ -211,7 +214,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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; return false;
@ -229,11 +232,12 @@ namespace OpenSim.Services.Connectors
sendData["RegionID"] = regionID.ToString(); sendData["RegionID"] = regionID.ToString();
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/presence";
// m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/presence", uri,
reqString); reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
@ -255,7 +259,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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; return false;
@ -273,11 +277,12 @@ namespace OpenSim.Services.Connectors
string reply = string.Empty; string reply = string.Empty;
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/presence";
// m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString);
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/presence", uri,
reqString); reqString);
if (reply == null || (reply != null && reply == string.Empty)) if (reply == null || (reply != null && reply == string.Empty))
{ {
@ -287,7 +292,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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<string, object> replyData = ServerUtils.ParseXmlResponse(reply); Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
@ -316,11 +321,12 @@ namespace OpenSim.Services.Connectors
string reply = string.Empty; string reply = string.Empty;
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/presence";
//m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); //m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString);
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/presence", uri,
reqString); reqString);
if (reply == null || (reply != null && reply == string.Empty)) if (reply == null || (reply != null && reply == string.Empty))
{ {
@ -330,7 +336,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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<PresenceInfo> rinfos = new List<PresenceInfo>(); List<PresenceInfo> rinfos = new List<PresenceInfo>();

View File

@ -138,11 +138,12 @@ namespace OpenSim.Services.Connectors
string reply = string.Empty; string reply = string.Empty;
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/accounts";
// m_log.DebugFormat("[ACCOUNTS CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[ACCOUNTS CONNECTOR]: queryString = {0}", reqString);
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/accounts", uri,
reqString); reqString);
if (reply == null || (reply != null && reply == string.Empty)) if (reply == null || (reply != null && reply == string.Empty))
{ {
@ -152,7 +153,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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<UserAccount> accounts = new List<UserAccount>(); List<UserAccount> accounts = new List<UserAccount>();
@ -206,11 +207,12 @@ namespace OpenSim.Services.Connectors
{ {
string reply = string.Empty; string reply = string.Empty;
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/accounts";
// m_log.DebugFormat("[ACCOUNTS CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[ACCOUNTS CONNECTOR]: queryString = {0}", reqString);
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/accounts", uri,
reqString); reqString);
if (reply == null || (reply != null && reply == string.Empty)) if (reply == null || (reply != null && reply == string.Empty))
{ {
@ -220,7 +222,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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<string, object> replyData = ServerUtils.ParseXmlResponse(reply); Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
@ -241,11 +243,12 @@ namespace OpenSim.Services.Connectors
private bool SendAndGetBoolReply(Dictionary<string, object> sendData) private bool SendAndGetBoolReply(Dictionary<string, object> sendData)
{ {
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
string uri = m_ServerURI + "/accounts";
// m_log.DebugFormat("[ACCOUNTS CONNECTOR]: queryString = {0}", reqString); // m_log.DebugFormat("[ACCOUNTS CONNECTOR]: queryString = {0}", reqString);
try try
{ {
string reply = SynchronousRestFormsRequester.MakeRequest("POST", string reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/accounts", uri,
reqString); reqString);
if (reply != string.Empty) if (reply != string.Empty)
{ {
@ -267,7 +270,7 @@ namespace OpenSim.Services.Connectors
} }
catch (Exception e) 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; return false;