mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 03:15:41 +08:00
'cosmetics'
This commit is contained in:
@@ -100,9 +100,8 @@ namespace OpenSim.Capabilities.Handlers
|
||||
string assetStr = string.Empty;
|
||||
foreach (KeyValuePair<string,string> kvp in queries)
|
||||
{
|
||||
if (queryTypes.ContainsKey(kvp.Key))
|
||||
if (queryTypes.TryGetValue(kvp.Key, out type))
|
||||
{
|
||||
type = queryTypes[kvp.Key];
|
||||
assetStr = kvp.Value;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -427,14 +427,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
lock (m_rpcHandlers)
|
||||
{
|
||||
if (m_rpcHandlers.ContainsKey(method))
|
||||
{
|
||||
return m_rpcHandlers[method];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return (m_rpcHandlers.TryGetValue(method, out XmlRpcMethod xm)) ? xm : null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,10 +435,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
lock (m_rpcHandlers)
|
||||
{
|
||||
if(m_rpcHandlers.TryGetValue(method, out handler))
|
||||
return true;
|
||||
return (m_rpcHandlers.TryGetValue(method, out handler));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<string> GetXmlRpcHandlerKeys()
|
||||
@@ -468,14 +459,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
lock (jsonRpcHandlers)
|
||||
{
|
||||
if (jsonRpcHandlers.ContainsKey(method))
|
||||
{
|
||||
return jsonRpcHandlers[method];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return jsonRpcHandlers.TryGetValue(method, out JsonRPCMethod jm) ? jm : null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OSHttpServer
|
||||
private static int m_ActiveSendingCount;
|
||||
private static double m_lastTimeOutCheckTime = 0;
|
||||
|
||||
const int m_maxConcurrenSend = 32;
|
||||
const int m_maxConcurrentSend = 32;
|
||||
|
||||
static ContextTimeoutManager()
|
||||
{
|
||||
@@ -156,7 +156,7 @@ namespace OSHttpServer
|
||||
|
||||
const int curbytesLimit = 128 * 1024;
|
||||
|
||||
int curConcurrentLimit = m_maxConcurrenSend - m_ActiveSendingCount;
|
||||
int curConcurrentLimit = m_maxConcurrentSend - m_ActiveSendingCount;
|
||||
if(curConcurrentLimit <= 0)
|
||||
return;
|
||||
|
||||
|
||||
@@ -327,11 +327,11 @@ namespace OSHttpServer
|
||||
}
|
||||
|
||||
m_headerBytes = GetHeaders();
|
||||
/*
|
||||
if (RawBuffer != null)
|
||||
|
||||
if (RawBuffer != null && RawBufferLen > 0)
|
||||
{
|
||||
int tlen = m_headerBytes.Length + RawBufferLen;
|
||||
if(RawBufferLen > 0 && tlen < 16384)
|
||||
if(tlen < 8 * 1024)
|
||||
{
|
||||
byte[] tmp = new byte[tlen];
|
||||
Buffer.BlockCopy(m_headerBytes, 0, tmp, 0, m_headerBytes.Length);
|
||||
@@ -342,7 +342,7 @@ namespace OSHttpServer
|
||||
RawBufferLen = tlen;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
m_context.StartSendResponse(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,10 +135,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
if (responsedata.ContainsKey("keepaliveTimeout"))
|
||||
response.KeepAliveTimeout = (int)responsedata["keepaliveTimeout"];
|
||||
|
||||
|
||||
if (responsedata.ContainsKey("prio"))
|
||||
response.Priority = (int)responsedata["prio"];
|
||||
|
||||
if (responsedata.ContainsKey("error_status_text"))
|
||||
response.StatusDescription = (string)responsedata["error_status_text"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user