aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-07-24 21:50:38 +0200
committerKim Alvefur <zash@zash.se>2013-07-24 21:50:38 +0200
commite2d04faa20852946634b527c097a0315d6621d73 (patch)
treec0aecb236310c4962c4623ca3ce901dd2238f3d3 /plugins
parent663e0d48ce37c968671d5c6ff4fa13d9b84dec69 (diff)
parent0354320299a86703cc332543f050389aa4c229eb (diff)
downloadprosody-e2d04faa20852946634b527c097a0315d6621d73.tar.gz
prosody-e2d04faa20852946634b527c097a0315d6621d73.zip
Merge 0.9->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/adhoc/adhoc.lib.lua10
-rw-r--r--plugins/mod_c2s.lua2
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/adhoc/adhoc.lib.lua b/plugins/adhoc/adhoc.lib.lua
index ecddcd1d..b544ddc8 100644
--- a/plugins/adhoc/adhoc.lib.lua
+++ b/plugins/adhoc/adhoc.lib.lua
@@ -34,7 +34,6 @@ function _M.handle_cmd(command, origin, stanza)
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 @@ function _M.handle_cmd(command, origin, stanza)
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 @@ function _M.handle_cmd(command, origin, stanza)
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
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index d667e781..3eb9e975 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -25,7 +25,7 @@ local log = module._log;
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;