From ee354a405ba01a18ef85a8adae08c585cf2f13e7 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 27 Apr 2014 12:37:08 -0700 Subject: Fixed OnPluginMessage hook not exiting early. OnPluginMessage hook would call all plugins even after one returned true. Fixes CID 43512 --- src/Bindings/PluginLua.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp index dcc816839..cb55715a6 100644 --- a/src/Bindings/PluginLua.cpp +++ b/src/Bindings/PluginLua.cpp @@ -1042,7 +1042,7 @@ bool cPluginLua::OnPluginMessage(cClientHandle & a_Client, const AString & a_Cha cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_PLUGIN_MESSAGE]; for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr) { - m_LuaState.Call((int)(**itr), &a_Client, a_Channel, a_Message); + m_LuaState.Call((int)(**itr), &a_Client, a_Channel, a_Message, cLuaState::Return, res); if (res) { return true; -- cgit v1.2.3 From d15743df1c734aa44f791a180fe041e95590c97b Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 27 Apr 2014 12:41:22 -0700 Subject: Removed old unused code --- src/WebAdmin.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp index a3b3cc5be..737705d7c 100644 --- a/src/WebAdmin.cpp +++ b/src/WebAdmin.cpp @@ -285,11 +285,6 @@ void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPReque Content = GetDefaultPage(); } - if (ShouldWrapInTemplate && (URL.size() > 1)) - { - Content += "\n

Go back

"; - } - int MemUsageKiB = cRoot::GetPhysicalRAMUsage(); if (MemUsageKiB > 0) { -- cgit v1.2.3 From 35dc88e4ff6ea3e1076b4ac167cb19002b182977 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 27 Apr 2014 12:42:29 -0700 Subject: Removed Old Asserts Removed asserts about non-negative numbers on what are now unsigned types Fixes CID 43608 --- src/ByteBuffer.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp index c634dc308..24f91b195 100644 --- a/src/ByteBuffer.cpp +++ b/src/ByteBuffer.cpp @@ -887,9 +887,7 @@ void cByteBuffer::AdvanceReadPos(size_t a_Count) void cByteBuffer::CheckValid(void) const { - ASSERT(m_ReadPos >= 0); ASSERT(m_ReadPos < m_BufferSize); - ASSERT(m_WritePos >= 0); ASSERT(m_WritePos < m_BufferSize); } -- cgit v1.2.3