Changeset

1641:1fa25cfb0ad4

Merge
author Kim Alvefur <zash@zash.se>
date Tue, 31 Mar 2015 18:31:13 +0200
parents 1636:7fa0c41792c7 (current diff) 1640:1d96629f5dda (diff)
children 1642:a4a6b4be973a
files
diffstat 3 files changed, 21 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mod_log_events/mod_log_events.lua	Tue Mar 31 18:31:13 2015 +0200
@@ -0,0 +1,13 @@
+module:set_global();
+
+local helpers = require "util.helpers";
+
+helpers.log_events(prosody.events, "global", module._log);
+
+function module.add_host(module)
+	helpers.log_events(prosody.hosts[module.host].events, module.host, module._log);
+end
+
+function module.remove_host(module)
+	helpers.revert_log_events(prosody.hosts[module.host].events);
+end
--- a/mod_log_messages_sql/mod_log_messages_sql.lua	Mon Mar 30 01:17:35 2015 +0200
+++ b/mod_log_messages_sql/mod_log_messages_sql.lua	Tue Mar 31 18:31:13 2015 +0200
@@ -98,7 +98,11 @@
 	return ...;
 end
 function sql.commit(...)
-	if not connection:commit() then return nil, "SQL commit failed"; end
+	local ok, err = connection:commit();
+	if not ok then
+		module:log("error", "SQL commit failed: %s", tostring(err));
+		return nil, "SQL commit failed: "..tostring(err);
+	end
 	return ...;
 end
 
--- a/mod_smacks/mod_smacks.lua	Mon Mar 30 01:17:35 2015 +0200
+++ b/mod_smacks/mod_smacks.lua	Tue Mar 31 18:31:13 2015 +0200
@@ -315,7 +315,9 @@
 		original_session.ip = session.ip;
 		original_session.conn = session.conn;
 		original_session.send = session.send;
-		original_session.send.filter = original_session.filter;
+		original_session.filter = session.filter;
+		original_session.send.filter = session.filter;
+		original_session.data.filter = session.filter;
 		original_session.stream = session.stream;
 		original_session.secure = session.secure;
 		original_session.hibernating = nil;