Merge branch 'master' into httptests

This commit is contained in:
UbitUmarov
2017-06-16 02:43:36 +01:00
10 changed files with 53 additions and 208 deletions

View File

@@ -36,14 +36,8 @@ namespace OpenSim.Framework
public readonly DateTime StartedTime = DateTime.Now;
public AgentCircuitData agentcircuit = null;
public Dictionary<uint, byte[]> needAck;
public List<byte[]> out_packets = new List<byte[]>();
public Dictionary<uint, uint> pendingAcks = new Dictionary<uint,uint>();
public EndPoint proxyEP;
public uint sequence;
public byte[] usecircuit;
public EndPoint userEP;
public int resendThrottle;
@@ -59,9 +53,5 @@ namespace OpenSim.Framework
public int targetThrottle;
public int maxThrottle;
public Dictionary<string, int> SyncRequests = new Dictionary<string,int>();
public Dictionary<string, int> AsyncRequests = new Dictionary<string,int>();
public Dictionary<string, int> GenericRequests = new Dictionary<string,int>();
}
}

View File

@@ -2617,7 +2617,7 @@ namespace OpenSim.Framework
public static void FireAndForget(System.Threading.WaitCallback callback, object obj, string context, bool dotimeout = true)
{
Interlocked.Increment(ref numTotalThreadFuncsCalled);
/*
if (context != null)
{
if (!m_fireAndForgetCallsMade.ContainsKey(context))
@@ -2630,7 +2630,7 @@ namespace OpenSim.Framework
else
m_fireAndForgetCallsInProgress[context]++;
}
*/
WaitCallback realCallback;
bool loggingEnabled = LogThreadPool > 0;
@@ -2647,8 +2647,8 @@ namespace OpenSim.Framework
Culture.SetCurrentCulture();
callback(o);
if (context != null)
m_fireAndForgetCallsInProgress[context]--;
// if (context != null)
// m_fireAndForgetCallsInProgress[context]--;
};
}
else
@@ -2688,8 +2688,8 @@ namespace OpenSim.Framework
if ((loggingEnabled || (threadFuncOverloadMode == 1)) && threadInfo.LogThread)
m_log.DebugFormat("Exit threadfunc {0} ({1})", threadFuncNum, FormatDuration(threadInfo.Elapsed()));
if (context != null)
m_fireAndForgetCallsInProgress[context]--;
// if (context != null)
// m_fireAndForgetCallsInProgress[context]--;
}
};
}
@@ -2967,7 +2967,8 @@ namespace OpenSim.Framework
/// <returns></returns>
public static Int32 EnvironmentTickCount()
{
return Environment.TickCount & EnvironmentTickCountMask;
double now = GetTimeStampMS();
return (int)now;
}
const Int32 EnvironmentTickCountMask = 0x3fffffff;
@@ -2993,7 +2994,8 @@ namespace OpenSim.Framework
/// <returns>subtraction of passed prevValue from current Environment.TickCount</returns>
public static Int32 EnvironmentTickCountSubtract(Int32 prevValue)
{
return EnvironmentTickCountSubtract(EnvironmentTickCount(), prevValue);
double now = GetTimeStampMS();
return EnvironmentTickCountSubtract((int)now, prevValue);
}
// Returns value of Tick Count A - TickCount B accounting for wrapping of TickCount