Skip to content

Commit

Permalink
update xmlrpc.dll with a send variant using httpclint and used it
Browse files Browse the repository at this point in the history
  • Loading branch information
UbitUmarov committed May 24, 2023
1 parent 2bd08a1 commit 5e0c644
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 14 deletions.
3 changes: 1 addition & 2 deletions OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,7 @@ private Dictionary<string, object> MakeRequest(string method, Dictionary<string,
if (string.IsNullOrEmpty(reply))
return null;

Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
reply);
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);

return replyData;
}
Expand Down
2 changes: 1 addition & 1 deletion OpenSim/Framework/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2202,7 +2202,7 @@ public static XmlRpcResponse XmlRpcCommand(string url, string methodName, params
public static XmlRpcResponse SendXmlRpcCommand(string url, string methodName, object[] args)
{
XmlRpcRequest client = new(methodName, args);
return client.Send(url, 6000);
return client.Send(url, WebUtil.SharedHttpClientWithRedir, 6000);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion OpenSim/Framework/WebUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@ public static Hashtable SendRequest(Hashtable ReqParams, string method, string u
WebUtil.LogOutgoingDetail("SEND", reqnum, str);
}

XmlRpcResponse Resp = Req.Send(url, 30000);
XmlRpcResponse Resp = Req.Send(url, WebUtil.SharedHttpClientWithRedir, 30000);

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ protected virtual bool doIMSending(GridRegion reginfo, Hashtable xmlrpcdata)
XmlRpcRequest GridReq = new XmlRpcRequest("grid_instant_message", SendParams);
try
{
XmlRpcResponse GridResp = GridReq.Send(reginfo.ServerURI, 3000);
XmlRpcResponse GridResp = GridReq.Send(reginfo.ServerURI, WebUtil.SharedHttpClientWithRedir, 6000);
Hashtable responseData = (Hashtable)GridResp.Value;
if (responseData.ContainsKey("success"))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ public void SendRequest()
XmlRpcRequest req = new XmlRpcRequest(mName, parameters);
try
{
XmlRpcResponse resp = req.Send(DestURL, 30000);
XmlRpcResponse resp = req.Send(DestURL, WebUtil.SharedHttpClientWithRedir, 30000);
if (resp != null)
{
Hashtable respParms;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle,
XmlRpcResponse response = null;
try
{
response = request.Send(info.ServerURI, 10000);
response = request.Send(info.ServerURI, WebUtil.SharedHttpClientWithRedir, 10000);
}
catch (Exception e)
{
Expand Down Expand Up @@ -230,7 +230,7 @@ public GridRegion GetHyperlinkRegion(GridRegion gatekeeper, UUID regionID, UUID
XmlRpcResponse response = null;
try
{
response = request.Send(gatekeeper.ServerURI, 10000);
response = request.Send(gatekeeper.ServerURI, WebUtil.SharedHttpClientWithRedir, 10000);
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private Hashtable CallServer(string methodName, Hashtable hash)
XmlRpcResponse response = null;
try
{
response = request.Send(m_ServerURL, 10000);
response = request.Send(m_ServerURL, WebUtil.SharedHttpClientWithRedir, 10000);
}
catch (Exception e)
{
Expand Down Expand Up @@ -336,7 +336,7 @@ public List<UUID> StatusNotification(List<string> friends, UUID userID, bool onl
XmlRpcResponse response = null;
try
{
response = request.Send(m_ServerURL, 6000);
response = request.Send(m_ServerURL, WebUtil.SharedHttpClientWithRedir, 6000);
}
catch
{
Expand Down Expand Up @@ -408,7 +408,7 @@ public List<UUID> GetOnlineFriends(UUID userID, List<string> friends)
XmlRpcResponse response = null;
try
{
response = request.Send(m_ServerURL, 10000);
response = request.Send(m_ServerURL, WebUtil.SharedHttpClientWithRedir, 10000);
}
catch
{
Expand Down Expand Up @@ -558,7 +558,7 @@ private bool GetBoolResponse(XmlRpcRequest request, out string reason)
XmlRpcResponse response = null;
try
{
response = request.Send(m_ServerURL, 10000);
response = request.Send(m_ServerURL, WebUtil.SharedHttpClientWithRedir, 10000);
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static bool SendInstantMessage(string url, GridInstantMessage im, string
try
{

XmlRpcResponse GridResp = GridReq.Send(url, 10000);
XmlRpcResponse GridResp = GridReq.Send(url, WebUtil.SharedHttpClientWithRedir, 10000);

Hashtable responseData = (Hashtable)GridResp.Value;

Expand Down
2 changes: 1 addition & 1 deletion OpenSim/Services/Connectors/Land/LandServicesConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public virtual LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, ui
paramList.Add(hash);

XmlRpcRequest request = new XmlRpcRequest("land_data", paramList);
XmlRpcResponse response = request.Send(info.ServerURI, 10000);
XmlRpcResponse response = request.Send(info.ServerURI, WebUtil.SharedHttpClientWithRedir, 10000);
if (response.IsFault)
{
m_log.ErrorFormat("[LAND CONNECTOR]: remote call returned an error: {0}", response.FaultString);
Expand Down
Binary file modified bin/XMLRPC.dll
Binary file not shown.

0 comments on commit 5e0c644

Please sign in to comment.