From ef87370cf14ca6a23698c0af10d1535f4d0e4f43 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 14 Jun 2017 15:58:02 +0100 Subject: [PATCH 1/6] remove options about script compilers the got back somehow --- bin/OpenSim.ini.example | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 543b7f8916..05a43f4b90 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -930,17 +930,6 @@ ;; it is more usefull if there are no previously compiled scripts DLLs (as with DeleteScriptsOnStartup = true) ;CompactMemOnLoad = false - ;# {DefaultCompileLanguage} {Enabled:true} {Default script language?} {lsl vb cs} lsl - ;; Default language for scripts - ; DefaultCompileLanguage = "lsl" - - ;# {AllowedCompilers} {Enabled:true} {Languages to allow (comma separated)?} {} lsl - ;; List of allowed languages (lsl,vb,cs) - ;; AllowedCompilers=lsl,cs,vb - ;; *warning*, non lsl languages have access to static methods such as - ;; System.IO.File. Enable at your own risk. - ; AllowedCompilers = "lsl" - ;; Compile debug info (line numbers) into the script assemblies ; CompileWithDebugInformation = true From 8e3a50212c194472f2dbcacbeeb5caae3b90fff1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 14 Jun 2017 16:03:03 +0100 Subject: [PATCH 2/6] remove options about script compilers the got back somehow on defaults also --- bin/OpenSimDefaults.ini | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 83bf9d7088..d35f535778 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -1778,14 +1778,6 @@ ; Save the source of all compiled scripts WriteScriptSourceToDebugFile = false - ; Default language for scripts - DefaultCompileLanguage = lsl - - ; List of allowed languages (lsl,vb,cs) - ; AllowedCompilers=lsl,cs,vb - ; *warning*, non lsl languages have access to static methods such as System.IO.File. Enable at your own risk. - AllowedCompilers=lsl - ; Compile debug info (line numbers) into the script assemblies CompileWithDebugInformation = true From d9a300fa8e680ec3f41f966e87408e58f3aa0e39 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 14 Jun 2017 20:19:13 +0100 Subject: [PATCH 3/6] some cleanup.. remove some stats that only some do look at once on a lifetime --- OpenSim/Framework/ClientInfo.cs | 10 -- .../ClientStack/Linden/UDP/LLClientView.cs | 65 ++--------- .../Avatar/Friends/FriendsModule.cs | 5 +- .../Avatar/Friends/HGFriendsModule.cs | 4 +- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 110 ------------------ 5 files changed, 13 insertions(+), 181 deletions(-) diff --git a/OpenSim/Framework/ClientInfo.cs b/OpenSim/Framework/ClientInfo.cs index 98e4465cf8..a1ca9bc32b 100644 --- a/OpenSim/Framework/ClientInfo.cs +++ b/OpenSim/Framework/ClientInfo.cs @@ -36,14 +36,8 @@ namespace OpenSim.Framework public readonly DateTime StartedTime = DateTime.Now; public AgentCircuitData agentcircuit = null; - public Dictionary needAck; - - public List out_packets = new List(); - public Dictionary pendingAcks = new Dictionary(); 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 SyncRequests = new Dictionary(); - public Dictionary AsyncRequests = new Dictionary(); - public Dictionary GenericRequests = new Dictionary(); } } diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 54359eb733..01c1fb90bd 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -705,29 +705,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// true if the handler was added. This is currently always the case. public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler, bool doAsync) - { - return AddLocalPacketHandler(packetType, handler, doAsync, false); - } - - /// - /// Add a handler for the given packet type. - /// - /// - /// - /// - /// If true, when the packet is received handle it on a different thread. Whether this is given direct to - /// a threadpool thread or placed in a queue depends on the inEngine parameter. - /// - /// - /// If async is false then this parameter is ignored. - /// If async is true and inEngine is false, then the packet is sent directly to a - /// threadpool thread. - /// If async is true and inEngine is true, then the packet is sent to the IncomingPacketAsyncHandlingEngine. - /// This may result in slower handling but reduces the risk of overloading the simulator when there are many - /// simultaneous async requests. - /// - /// true if the handler was added. This is currently always the case. - public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler, bool doAsync, bool inEngine) { bool result = false; lock (m_packetHandlers) @@ -735,7 +712,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (!m_packetHandlers.ContainsKey(packetType)) { m_packetHandlers.Add( - packetType, new PacketProcessor() { method = handler, Async = doAsync, InEngine = inEngine }); + packetType, new PacketProcessor() { method = handler, Async = doAsync}); result = true; } } @@ -770,31 +747,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP PacketProcessor pprocessor; if (m_packetHandlers.TryGetValue(packet.Type, out pprocessor)) { - ClientInfo cinfo = UDPClient.GetClientInfo(); //there is a local handler for this packet type if (pprocessor.Async) { - if (!cinfo.AsyncRequests.ContainsKey(packet.Type.ToString())) - cinfo.AsyncRequests[packet.Type.ToString()] = 0; - cinfo.AsyncRequests[packet.Type.ToString()]++; - object obj = new AsyncPacketProcess(this, pprocessor.method, packet); -/* - if (pprocessor.InEngine) - m_udpServer.IpahEngine.QueueJob(packet.Type.ToString(), () => ProcessSpecificPacketAsync(obj)); - else - Util.FireAndForget(ProcessSpecificPacketAsync, obj, packet.Type.ToString()); -*/ m_asyncPacketProcess.QueueJob(packet.Type.ToString(), () => ProcessSpecificPacketAsync(obj)); result = true; } else { - if (!cinfo.SyncRequests.ContainsKey(packet.Type.ToString())) - cinfo.SyncRequests[packet.Type.ToString()] = 0; - cinfo.SyncRequests[packet.Type.ToString()]++; - result = pprocessor.method(this, packet); } } @@ -809,11 +771,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP } if (found) { - ClientInfo cinfo = UDPClient.GetClientInfo(); - if (!cinfo.GenericRequests.ContainsKey(packet.Type.ToString())) - cinfo.GenericRequests[packet.Type.ToString()] = 0; - cinfo.GenericRequests[packet.Type.ToString()]++; - result = method(this, packet); } } @@ -5995,10 +5952,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP AddLocalPacketHandler(PacketType.ParcelBuy, HandleParcelBuyRequest, false); AddLocalPacketHandler(PacketType.UUIDGroupNameRequest, HandleUUIDGroupNameRequest); AddLocalPacketHandler(PacketType.ObjectGroup, HandleObjectGroupRequest); - AddLocalPacketHandler(PacketType.GenericMessage, HandleGenericMessage, true, true); - AddLocalPacketHandler(PacketType.AvatarPropertiesRequest, HandleAvatarPropertiesRequest, true, true); + AddLocalPacketHandler(PacketType.GenericMessage, HandleGenericMessage); + AddLocalPacketHandler(PacketType.AvatarPropertiesRequest, HandleAvatarPropertiesRequest); AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer); - AddLocalPacketHandler(PacketType.AvatarPropertiesUpdate, HandlerAvatarPropertiesUpdate, true, true); + AddLocalPacketHandler(PacketType.AvatarPropertiesUpdate, HandlerAvatarPropertiesUpdate); AddLocalPacketHandler(PacketType.ScriptDialogReply, HandlerScriptDialogReply); AddLocalPacketHandler(PacketType.ImprovedInstantMessage, HandlerImprovedInstantMessage); AddLocalPacketHandler(PacketType.AcceptFriendship, HandlerAcceptFriendship); @@ -6040,8 +5997,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP AddLocalPacketHandler(PacketType.ObjectExtraParams, HandleObjectExtraParams); AddLocalPacketHandler(PacketType.ObjectDuplicate, HandleObjectDuplicate); AddLocalPacketHandler(PacketType.RequestMultipleObjects, HandleRequestMultipleObjects); - AddLocalPacketHandler(PacketType.ObjectSelect, HandleObjectSelect, true, true); - AddLocalPacketHandler(PacketType.ObjectDeselect, HandleObjectDeselect, true, true); + AddLocalPacketHandler(PacketType.ObjectSelect, HandleObjectSelect); + AddLocalPacketHandler(PacketType.ObjectDeselect, HandleObjectDeselect); AddLocalPacketHandler(PacketType.ObjectPosition, HandleObjectPosition); AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale); AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation); @@ -6185,8 +6142,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP AddLocalPacketHandler(PacketType.PickDelete, HandlePickDelete); AddLocalPacketHandler(PacketType.PickGodDelete, HandlePickGodDelete); AddLocalPacketHandler(PacketType.PickInfoUpdate, HandlePickInfoUpdate); - AddLocalPacketHandler(PacketType.AvatarNotesUpdate, HandleAvatarNotesUpdate, true, true); - AddLocalPacketHandler(PacketType.AvatarInterestsUpdate, HandleAvatarInterestsUpdate, true, true); + AddLocalPacketHandler(PacketType.AvatarNotesUpdate, HandleAvatarNotesUpdate); + AddLocalPacketHandler(PacketType.AvatarInterestsUpdate, HandleAvatarInterestsUpdate); AddLocalPacketHandler(PacketType.GrantUserRights, HandleGrantUserRights); AddLocalPacketHandler(PacketType.PlacesQuery, HandlePlacesQuery); AddLocalPacketHandler(PacketType.UpdateMuteListEntry, HandleUpdateMuteListEntry); @@ -13436,7 +13393,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP SendAssetNotFound(req); return; } - } if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) @@ -13513,11 +13469,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// public bool Async { get; set; } - /// - /// If async is true, should this packet be handled in the async engine or given directly to a threadpool - /// thread? - /// - public bool InEngine { get; set; } } public class AsyncPacketProcess diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 91f19e3ced..772485cfeb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -247,11 +247,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends { FriendInfo[] friends = GetFriendsFromCache(principalID); FriendInfo finfo = GetFriend(friends, friendID); - if (finfo != null) + if (finfo != null && finfo.TheirFlags != -1) { return finfo.TheirFlags; } - return 0; } @@ -756,7 +755,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends if (friend == null) return; - if((friend.TheirFlags & (int)FriendRights.CanSeeOnMap) == 0) + if(friend.TheirFlags == -1 || (friend.TheirFlags & (int)FriendRights.CanSeeOnMap) == 0) return; Scene hunterScene = (Scene)remoteClient.Scene; diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index 82154bcc9e..fae1e05349 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs @@ -214,7 +214,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends FriendInfo[] friends = GetFriendsFromCache(client.AgentId); foreach (FriendInfo f in friends) { - client.SendChangeUserRights(new UUID(f.Friend), client.AgentId, f.TheirFlags); + int rights = f.TheirFlags; + if(rights != -1 ) + client.SendChangeUserRights(new UUID(f.Friend), client.AgentId, rights); } } } diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 3be5a07d27..490809eae1 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -124,15 +124,6 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "Without the 'full' option, only root agents are shown." + " With the 'full' option child agents are also shown.", (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); - - scene.AddCommand( - "Comms", this, "show client stats", - "show client stats [first_name last_name]", - "Show client request stats", - "Without the 'first_name last_name' option, all clients are shown." - + " With the 'first_name last_name' option only a specific client is shown.", - (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd))); - } public void RemoveRegion(Scene scene) @@ -540,107 +531,6 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden return report.ToString(); } - /// - /// Show client stats data - /// - /// - /// - protected string HandleClientStatsReport(string[] showParams) - { - // NOTE: This writes to m_log on purpose. We want to store this information - // in case we need to analyze it later. - // - if (showParams.Length <= 4) - { - m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", "Region", "Name", "Root", "Time", "Reqs/min", "AgentUpdates"); - foreach (Scene scene in m_scenes.Values) - { - scene.ForEachClient( - delegate(IClientAPI client) - { - if (client is LLClientView) - { - LLClientView llClient = client as LLClientView; - ClientInfo cinfo = llClient.UDPClient.GetClientInfo(); - int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); - avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); - - string childAgentStatus; - - if (llClient.SceneAgent != null) - childAgentStatus = llClient.SceneAgent.IsChildAgent ? "N" : "Y"; - else - childAgentStatus = "Off!"; - - m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", - scene.RegionInfo.RegionName, llClient.Name, - childAgentStatus, - (DateTime.Now - cinfo.StartedTime).Minutes, - avg_reqs, - string.Format( - "{0} ({1:0.00}%)", - llClient.TotalAgentUpdates, - cinfo.SyncRequests.ContainsKey("AgentUpdate") - ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100 - : 0)); - } - }); - } - return string.Empty; - } - - string fname = "", lname = ""; - - if (showParams.Length > 3) - fname = showParams[3]; - if (showParams.Length > 4) - lname = showParams[4]; - - foreach (Scene scene in m_scenes.Values) - { - scene.ForEachClient( - delegate(IClientAPI client) - { - if (client is LLClientView) - { - LLClientView llClient = client as LLClientView; - - if (llClient.Name == fname + " " + lname) - { - - ClientInfo cinfo = llClient.GetClientInfo(); - AgentCircuitData aCircuit = scene.AuthenticateHandler.GetAgentCircuitData(llClient.CircuitCode); - if (aCircuit == null) // create a dummy one - aCircuit = new AgentCircuitData(); - - if (!llClient.SceneAgent.IsChildAgent) - m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, Util.GetViewerName(aCircuit), aCircuit.Id0); - - int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); - avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); - - m_log.InfoFormat("[INFO]:"); - m_log.InfoFormat("[INFO]: {0} # {1} # Time: {2}min # Avg Reqs/min: {3}", scene.RegionInfo.RegionName, - (llClient.SceneAgent.IsChildAgent ? "Child" : "Root"), (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs); - - Dictionary sortedDict = (from entry in cinfo.AsyncRequests orderby entry.Value descending select entry) - .ToDictionary(pair => pair.Key, pair => pair.Value); - PrintRequests("TOP ASYNC", sortedDict, cinfo.AsyncRequests.Values.Sum()); - - sortedDict = (from entry in cinfo.SyncRequests orderby entry.Value descending select entry) - .ToDictionary(pair => pair.Key, pair => pair.Value); - PrintRequests("TOP SYNC", sortedDict, cinfo.SyncRequests.Values.Sum()); - - sortedDict = (from entry in cinfo.GenericRequests orderby entry.Value descending select entry) - .ToDictionary(pair => pair.Key, pair => pair.Value); - PrintRequests("TOP GENERIC", sortedDict, cinfo.GenericRequests.Values.Sum()); - } - } - }); - } - return string.Empty; - } - private void PrintRequests(string type, Dictionary sortedDict, int sum) { m_log.InfoFormat("[INFO]:"); From 1c64b5018ac93abf7ffc150fb66066041c9a0902 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 14 Jun 2017 22:05:53 +0100 Subject: [PATCH 4/6] fix llsd DeserialiseOSDMap cast from boolean to int, this seems to fix alchemy beta 5.0 scripts upload, but this viewer seems to be of no use for opensim, sice it does crash.. insists lbsa is at second life etc --- OpenSim/Capabilities/LLSDHelpers.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenSim/Capabilities/LLSDHelpers.cs b/OpenSim/Capabilities/LLSDHelpers.cs index 8f1a40e632..d5822675ae 100644 --- a/OpenSim/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Capabilities/LLSDHelpers.cs @@ -157,6 +157,11 @@ namespace OpenSim.Framework.Capabilities // the LLSD map/array types in the array need to be deserialised // but first we need to know the right class to deserialise them into. } + else if(enumerator.Value is Boolean && field.FieldType == typeof(int) ) + { + int i = (bool)enumerator.Value ? 1 : 0; + field.SetValue(obj, (object)i); + } else { field.SetValue(obj, enumerator.Value); From 969d5f742cc3721a4eb53125410660dd7410ce45 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 15 Jun 2017 04:20:32 +0100 Subject: [PATCH 5/6] update inventory item permissions on deattach --- .../Avatar/Attachments/AttachmentsModule.cs | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index cf188aacd3..5bca482af3 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -42,6 +42,7 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Serialization; using OpenSim.Services.Interfaces; +using PermissionMask = OpenSim.Framework.PermissionMask; namespace OpenSim.Region.CoreModules.Avatar.Attachments { @@ -896,6 +897,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments if (item != null) { + // attach is rez, need to update permissions + item.Flags &= ~(uint)(InventoryItemFlags.ObjectSlamPerm | InventoryItemFlags.ObjectOverwriteBase | + InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | + InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner); + + uint permsBase = (uint)(PermissionMask.Copy | PermissionMask.Transfer | + PermissionMask.Modify | PermissionMask.Move | + PermissionMask.Export | PermissionMask.FoldedMask); + + permsBase &= grp.CurrentAndFoldedNextPermissions(); + permsBase |= (uint)PermissionMask.Move; + item.BasePermissions = permsBase; + item.CurrentPermissions = permsBase; + item.NextPermissions = permsBase & grp.RootPart.NextOwnerMask | (uint)PermissionMask.Move; + item.EveryOnePermissions = permsBase & grp.RootPart.EveryoneMask; + item.GroupPermissions = permsBase & grp.RootPart.GroupMask; + item.CurrentPermissions &= + ((uint)PermissionMask.Copy | + (uint)PermissionMask.Transfer | + (uint)PermissionMask.Modify | + (uint)PermissionMask.Move | + (uint)PermissionMask.Export | + (uint)PermissionMask.FoldedMask); // Preserve folded permissions ?? + AssetBase asset = m_scene.CreateAsset( grp.GetPartName(grp.LocalId), grp.GetPartDescription(grp.LocalId), From 822574df9f3889c877035d302f9060769ed27e70 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 15 Jun 2017 20:28:20 +0100 Subject: [PATCH 6/6] change the clock source for EnvironmentTickCount so it does get a bit more resolution if avaiable (1ms) specially on windows. This until all calls to this are removed. Coment out some stats in workpool/threads creation path --- OpenSim/Framework/Util.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 9a1e34842f..a85576786d 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -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 /// 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 /// subtraction of passed prevValue from current Environment.TickCount 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