Changeset

5759:767e29b2cd3a

Merge 0.9->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 24 Jul 2013 21:50:38 +0200
parents 5756:61521ce49aae (current diff) 5758:ebc074918173 (diff)
children 5760:e599d9a367cf
files plugins/mod_c2s.lua
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/adhoc/adhoc.lib.lua	Mon Jul 22 20:29:41 2013 +0200
+++ b/plugins/adhoc/adhoc.lib.lua	Wed Jul 24 21:50:38 2013 +0200
@@ -34,7 +34,6 @@
 
 	local data, state = command:handler(dataIn, states[sessionid]);
 	states[sessionid] = state;
-	local stanza = st.reply(stanza);
 	local cmdtag;
 	if data.status == "completed" then
 		states[sessionid] = nil;
@@ -44,8 +43,8 @@
 		cmdtag = command:cmdtag("canceled", sessionid);
 	elseif data.status == "error" then
 		states[sessionid] = nil;
-		stanza = st.error_reply(stanza, data.error.type, data.error.condition, data.error.message);
-		origin.send(stanza);
+		local reply = st.error_reply(stanza, data.error.type, data.error.condition, data.error.message);
+		origin.send(reply);
 		return true;
 	else
 		cmdtag = command:cmdtag("executing", sessionid);
@@ -78,8 +77,9 @@
 			cmdtag:add_child(content);
 		end
 	end
-	stanza:add_child(cmdtag);
-	origin.send(stanza);
+	local reply = st.reply(stanza);
+	reply:add_child(cmdtag);
+	origin.send(reply);
 
 	return true;
 end
--- a/plugins/mod_c2s.lua	Mon Jul 22 20:29:41 2013 +0200
+++ b/plugins/mod_c2s.lua	Wed Jul 24 21:50:38 2013 +0200
@@ -25,7 +25,7 @@
 
 local c2s_timeout = module:get_option_number("c2s_timeout");
 local stream_close_timeout = module:get_option_number("c2s_close_timeout", 5);
-local opt_keepalives = module:get_option_boolean("tcp_keepalives", false);
+local opt_keepalives = module:get_option_boolean("c2s_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true));
 
 local sessions = module:shared("sessions");
 local core_process_stanza = prosody.core_process_stanza;