Skip to content
Snippets Groups Projects
Commit c9908fea authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Use ffi bindings instead of box.info for uptime/version.

parent 33394ea8
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,10 @@ local ffi = require('ffi')
ffi.cdef[[
char *
tarantool_error_message(void);
const char *
tarantool_version(void);
double
tarantool_uptime(void);
]]
local pcall_lua = pcall
......@@ -31,6 +35,6 @@ end
-- This function automatically called by the server for
-- any new admin client.
function motd()
return "Tarantool " .. box.info.version,
"Uptime: " .. box.info.uptime
return "Tarantool " .. ffi.string(ffi.C.tarantool_version()),
"Uptime: " .. math.floor(ffi.C.tarantool_uptime())
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment