at last we can login and see objects ( friends is dead and disable in

scenepresence)
This commit is contained in:
UbitUmarov
2015-09-03 18:39:08 +01:00
parent a11edceb00
commit cdaed11387
25 changed files with 116 additions and 251 deletions

View File

@@ -388,10 +388,6 @@ namespace OpenSim.Framework.Communications
m_log.Error(string.Format("[REST CLIENT] Error fetching resource from server: {0} ", _request.Address.ToString()), e);
}
}
if (_response != null)
_response.Close();
return null;
}
@@ -417,7 +413,7 @@ namespace OpenSim.Framework.Communications
_request = (HttpWebRequest) WebRequest.Create(buildUri());
_request.KeepAlive = false;
_request.ContentType = "application/xml";
_request.Timeout = 30000;
_request.Timeout = 90000;
_request.Method = RequestMethod;
_asyncException = null;
_request.ContentLength = src.Length;
@@ -476,8 +472,6 @@ namespace OpenSim.Framework.Communications
}
}
_response.Close();
if (_response != null)
_response.Close();

View File

@@ -83,7 +83,7 @@ namespace OpenSim.Framework.Console
= "To enter an argument that contains spaces, surround the argument with double quotes.\nFor example, show object name \"My long object name\"\n";
public const string ItemHelpText
= @"For more information, type 'help' to get a list of all commands,
= @"For more information, type 'help ' to get a list of all commands,
or type help <item>' where <item> is one of the following:";
/// <value>

View File

@@ -281,10 +281,10 @@ namespace OpenSim.Framework.Monitoring
activeScripts = stats.StatsBlock[19].StatValue;
scriptLinesPerSecond = stats.StatsBlock[20].StatValue;
m_frameDilation = stats.StatsBlock[22].StatValue;
m_usersLoggingIn = stats.StatsBlock[23].StatValue;
m_totalGeoPrims = stats.StatsBlock[24].StatValue;
m_totalMeshes = stats.StatsBlock[25].StatValue;
m_inUseThreads = stats.StatsBlock[26].StatValue;
// m_usersLoggingIn = stats.StatsBlock[23].StatValue;
// m_totalGeoPrims = stats.StatsBlock[24].StatValue;
// m_totalMeshes = stats.StatsBlock[25].StatValue;
// m_inUseThreads = stats.StatsBlock[26].StatValue;
}
/// <summary>

View File

@@ -44,25 +44,6 @@ namespace OpenSim.Framework.Servers.HttpServer
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// Is the poll service request manager running?
/// </summary>
/// <remarks>
/// Can be running either synchronously or asynchronously
/// </remarks>
public bool IsRunning { get; private set; }
/// <summary>
/// Is the poll service performing responses asynchronously (with its own threads) or synchronously (via
/// external calls)?
/// </summary>
public bool PerformResponsesAsync { get; private set; }
/// <summary>
/// Number of responses actually processed and sent to viewer (or aborted due to error).
/// </summary>
public int ResponsesProcessed { get; private set; }
private readonly BaseHttpServer m_server;
private Dictionary<PollServiceHttpRequest, Queue<PollServiceHttpRequest>> m_bycontext;
@@ -74,7 +55,7 @@ namespace OpenSim.Framework.Servers.HttpServer
private Thread[] m_workerThreads;
private Thread m_retrysThread;
private bool m_running = true;
private bool m_running = false;
private int slowCount = 0;
private SmartThreadPool m_threadPool;
@@ -84,37 +65,9 @@ namespace OpenSim.Framework.Servers.HttpServer
BaseHttpServer pSrv, bool performResponsesAsync, uint pWorkerThreadCount, int pTimeout)
{
m_server = pSrv;
PerformResponsesAsync = performResponsesAsync;
m_WorkerThreadCount = pWorkerThreadCount;
m_workerThreads = new Thread[m_WorkerThreadCount];
/*
StatsManager.RegisterStat(
new Stat(
"QueuedPollResponses",
"Number of poll responses queued for processing.",
"",
"",
"httpserver",
m_server.Port.ToString(),
StatType.Pull,
MeasuresOfInterest.AverageChangeOverTime,
stat => stat.Value = m_requests.Count(),
StatVerbosity.Debug));
StatsManager.RegisterStat(
new Stat(
"ProcessedPollResponses",
"Number of poll responses processed.",
"",
"",
"httpserver",
m_server.Port.ToString(),
StatType.Pull,
MeasuresOfInterest.AverageChangeOverTime,
stat => stat.Value = ResponsesProcessed,
StatVerbosity.Debug));
*/
PollServiceHttpRequestComparer preqCp = new PollServiceHttpRequestComparer();
m_bycontext = new Dictionary<PollServiceHttpRequest, Queue<PollServiceHttpRequest>>(preqCp);
@@ -127,10 +80,12 @@ namespace OpenSim.Framework.Servers.HttpServer
startInfo.ThreadPoolName = "PoolService";
m_threadPool = new SmartThreadPool(startInfo);
}
public void Start()
{
m_running = true;
m_threadPool.Start();
//startup worker threads
for (uint i = 0; i < m_WorkerThreadCount; i++)
@@ -154,12 +109,13 @@ namespace OpenSim.Framework.Servers.HttpServer
true,
null,
1000 * 60 * 10);
}
private void ReQueueEvent(PollServiceHttpRequest req)
{
if (IsRunning)
if (m_running)
{
lock (m_retryRequests)
m_retryRequests.Enqueue(req);
@@ -207,7 +163,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void EnqueueInt(PollServiceHttpRequest req)
{
if (IsRunning)
if (m_running)
{
if (req.PollServiceArgs.Type != PollServiceEventArgs.EventType.LongPoll)
{

View File

@@ -29,7 +29,7 @@ namespace OpenSim
{
public class VersionInfo
{
public const string VersionNumber = "0.8.2.0CM";
public const string VersionNumber = "0.8.2.0";
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
public enum Flavour

View File

@@ -86,7 +86,7 @@ namespace OpenSim.Framework
/// Number of milliseconds a call can take before it is considered
/// a "long" call for warning & debugging purposes
/// </summary>
public const int LongCallTime = 500;
public const int LongCallTime = 3000;
/// <summary>
/// The maximum length of any data logged because of a long request time.
@@ -418,7 +418,7 @@ namespace OpenSim.Framework
/// </summary>
public static OSDMap PostToService(string url, NameValueCollection data)
{
return ServiceFormRequest(url,data, 20000);
return ServiceFormRequest(url,data, 30000);
}
public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout)
@@ -808,7 +808,7 @@ namespace OpenSim.Framework
/// <param name="requestUrl"></param>
/// <param name="obj"></param>
/// <param name="pTimeout">
/// Request timeout in milliseconds. Timeout.Infinite indicates no timeout. If 0 is passed then the default HttpWebRequest timeout is used (100 seconds)
/// Request timeout in seconds. Timeout.Infinite indicates no timeout. If 0 is passed then the default HttpWebRequest timeout is used (100 seconds)
/// </param>
/// <param name="maxConnections"></param>
/// <returns>
@@ -877,7 +877,7 @@ namespace OpenSim.Framework
requestStream.Write(data, 0, length);
// capture how much time was spent writing
// tickdata = Util.EnvironmentTickCountSubtract(tickstart);
tickdata = Util.EnvironmentTickCountSubtract(tickstart);
request.BeginGetResponse(delegate(IAsyncResult ar)
{
@@ -992,9 +992,9 @@ namespace OpenSim.Framework
}
else if (WebUtil.DebugLevel >= 4)
{
m_log.DebugFormat(
"[WEB UTIL]: HTTP OUT {0} took {1}ms",
reqnum, tickdiff);
m_log.DebugFormat("[LOGHTTP]: HTTP OUT {0} took {1}ms, {2}ms writing",
reqnum, tickdiff, tickdata);
}
}
finally
@@ -1054,8 +1054,6 @@ namespace OpenSim.Framework
{
writer.Write(obj);
writer.Flush();
if (WebUtil.DebugLevel >= 5)
WebUtil.LogOutgoingDetail(buffer);
}
length = (int)obj.Length;
@@ -1248,7 +1246,7 @@ namespace OpenSim.Framework
auth.AddAuthorization(ht.Headers);
if (pTimeout != 0)
ht.Timeout = pTimeout;
request.Timeout = pTimeout * 1000;
if (maxConnections > 0 && ht.ServicePoint.ConnectionLimit < maxConnections)
ht.ServicePoint.ConnectionLimit = maxConnections;