# HG changeset patch # User Matthew Wild # Date 1467122083 -3600 # Node ID ced4e800f42a137ebb58c2806bc2105528e7c2ca # Parent 76a8456cf1e23cf6ca0063c324f4fc4189554e7e# Parent 72e48bddf6179830f5ef1695ef703e2fdc2c9d87 Merge 0.10->trunk diff -r 76a8456cf1e2 -r ced4e800f42a plugins/mod_privacy.lua diff -r 76a8456cf1e2 -r ced4e800f42a util/openssl.lua --- a/util/openssl.lua Sun Jun 12 20:06:30 2016 +0200 +++ b/util/openssl.lua Tue Jun 28 14:54:43 2016 +0100 @@ -166,7 +166,8 @@ setmetatable(_M, { __index = function(_, command) return function(opts) - return 0 == os_execute(serialize(command, type(opts) == "table" and opts or {})); + local ret = os_execute(serialize(command, type(opts) == "table" and opts or {})); + return ret == true or ret == 0; end; end; }); diff -r 76a8456cf1e2 -r ced4e800f42a util/prosodyctl.lua --- a/util/prosodyctl.lua Sun Jun 12 20:06:30 2016 +0200 +++ b/util/prosodyctl.lua Tue Jun 28 14:54:43 2016 +0100 @@ -44,7 +44,7 @@ local function getchar(n) local stty_ret = os.execute("stty raw -echo 2>/dev/null"); local ok, char; - if stty_ret == 0 then + if stty_ret == true or stty_ret == 0 then ok, char = pcall(io.read, n or 1); os.execute("stty sane"); else diff -r 76a8456cf1e2 -r ced4e800f42a util/time.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/time.lua Tue Jun 28 14:54:43 2016 +0100 @@ -0,0 +1,8 @@ +-- Import gettime() from LuaSocket, as a way to access high-resolution time +-- in a platform-independent way + +local socket_gettime = require "socket".gettime; + +return { + now = socket_gettime; +}