# HG changeset patch # User Kim Alvefur # Date 1493077379 -7200 # Node ID c14513401d65a1c3f83f6820bdb1cd072d7f6dfc # Parent a33a87f1315574ebf7f7e02f7e567ef264b2fc03# Parent 3e443d6791e677be1ac09d1e84418e49eed17a7d Merge 0.10->trunk diff -r a33a87f13155 -r c14513401d65 plugins/mod_admin_telnet.lua --- 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; diff -r a33a87f13155 -r c14513401d65 plugins/mod_pep.lua --- 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 diff -r a33a87f13155 -r c14513401d65 prosodyctl --- 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) diff -r a33a87f13155 -r c14513401d65 util-src/crand.c --- 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 #include diff -r a33a87f13155 -r c14513401d65 util/prosodyctl.lua --- 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";