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 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<string, object> 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<string, object> 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<string, object> 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<string>(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<string, object> 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<string>(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<string, object> 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;

View File

@ -108,12 +108,11 @@ namespace OpenSim.Services.Connectors.Friends
protected FriendInfo[] GetFriends(Dictionary<string, object> 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<string, object> 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<string, object> 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;
}

View File

@ -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<string, object> 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;

View File

@ -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<string, object> 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<GridRegion> rinfos = new List<GridRegion>();
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<GridRegion> rinfos = new List<GridRegion>();
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<GridRegion> rinfos = new List<GridRegion>();
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<GridRegion> rinfos = new List<GridRegion>();
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<GridRegion> rinfos = new List<GridRegion>();
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;
}

View File

@ -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<string, object> 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<GridUserInfo> rinfos = new List<GridUserInfo>();

View File

@ -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;
}

View File

@ -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
{

View File

@ -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<string, object> 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<PresenceInfo> rinfos = new List<PresenceInfo>();

View File

@ -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<UserAccount> accounts = new List<UserAccount>();
@ -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<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
@ -241,11 +243,12 @@ namespace OpenSim.Services.Connectors
private bool SendAndGetBoolReply(Dictionary<string, object> 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;