Software /
code /
prosody
Changeset
8128:c14513401d65
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 25 Apr 2017 01:42:59 +0200 |
parents | 8121:a33a87f13155 (current diff) 8127:3e443d6791e6 (diff) |
children | 8133:102e1ec8bee1 |
files | plugins/mod_admin_telnet.lua prosodyctl |
diffstat | 5 files changed, 21 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Mon Apr 24 14:19:49 2017 +0200 +++ b/plugins/mod_admin_telnet.lua Tue Apr 25 01:42:59 2017 +0200 @@ -325,7 +325,7 @@ function def_env.server:memory() if not has_pposix or not pposix.meminfo then - return true, "Lua is using "..collectgarbage("count"); + return true, "Lua is using "..human(collectgarbage("count")); end local mem, lua_mem = pposix.meminfo(), collectgarbage("count"); local print = self.session.print;
--- a/plugins/mod_pep.lua Mon Apr 24 14:19:49 2017 +0200 +++ b/plugins/mod_pep.lua Tue Apr 25 01:42:59 2017 +0200 @@ -182,7 +182,8 @@ payload.attr.id = id; session.send(st.reply(stanza)); module:fire_event("pep-publish-item", { - node = node, user = jid_bare(session.full_jid), actor = session.jid, id = id, session = session, item = st.clone(payload); + node = node, user = jid_bare(session.full_jid), actor = session.jid, + id = id, session = session, item = st.clone(payload); }); return true; else @@ -293,11 +294,21 @@ if user_data then for node, _ in pairs(user_data) do - reply:tag('item', {jid=bare, node=node}):up(); -- TODO we need to handle queries to these nodes + reply:tag('item', {jid=bare, node=node}):up(); end end end); +module:hook("account-disco-info-node", function (event) + local session, stanza, node = event.origin, event.stanza, event.node; + local user = stanza.attr.to; + local user_data = data[user]; + if user_data and user_data[node] then + event.exists = true; + event.reply:tag('identity', {category='pubsub', type='leaf'}):up(); + end +end); + module:hook("resource-unbind", function (event) local user_bare_jid = event.session.username.."@"..event.session.host; if not bare_sessions[user_bare_jid] then -- User went offline
--- a/prosodyctl Mon Apr 24 14:19:49 2017 +0200 +++ b/prosodyctl Tue Apr 25 01:42:59 2017 +0200 @@ -936,7 +936,7 @@ return cert_commands[subcmd](arg); end end - show_usage("cert config|request|generate|key", "Helpers for generating X.509 certificates and keys.") + show_usage("cert config|request|generate|key|import", "Helpers for generating X.509 certificates and keys.") end function commands.check(arg)
--- a/util-src/crand.c Mon Apr 24 14:19:49 2017 +0200 +++ b/util-src/crand.c Tue Apr 25 01:42:59 2017 +0200 @@ -29,6 +29,10 @@ #if defined(WITH_GETRANDOM) +#ifndef __GLIBC_PREREQ +#define __GLIBC_PREREQ(a,b) 0 +#endif + #if ! __GLIBC_PREREQ(2,25) #include <unistd.h> #include <sys/syscall.h>
--- a/util/prosodyctl.lua Mon Apr 24 14:19:49 2017 +0200 +++ b/util/prosodyctl.lua Tue Apr 25 01:42:59 2017 +0200 @@ -187,6 +187,8 @@ return false, "invalid-pidfile"; end + pidfile = config.resolve_relative_path(prosody.paths.data, pidfile); + local modules_enabled = set.new(config.get("*", "modules_disabled")); if prosody.platform ~= "posix" or modules_enabled:contains("posix") then return false, "no-posix";