mod_c2s: Remove connection object from session object when connection disconnected...
[prosody.git] / plugins / mod_posix.lua
index e871e5cf4d8c9ab825f6b13b0eb8d1a5a95fe95a..b289fa44b29adf5bad14812f63e48514f5af7bd7 100644 (file)
@@ -7,10 +7,12 @@
 --
 
 
-local want_pposix_version = "0.3.5";
+local want_pposix_version = "0.3.6";
 
 local pposix = assert(require "util.pposix");
-if pposix._VERSION ~= want_pposix_version then module:log("warn", "Unknown version (%s) of binary pposix module, expected %s", tostring(pposix._VERSION), want_pposix_version); end
+if pposix._VERSION ~= want_pposix_version then
+       module:log("warn", "Unknown version (%s) of binary pposix module, expected %s. Perhaps you need to recompile?", tostring(pposix._VERSION), want_pposix_version);
+end
 
 local signal = select(2, pcall(require, "util.signal"));
 if type(signal) == "string" then
@@ -78,7 +80,7 @@ local function write_pidfile()
        if pidfile_handle then
                remove_pidfile();
        end
-       pidfile = module:get_option("pidfile");
+       pidfile = module:get_option_string("pidfile");
        if pidfile then
                local err;
                local mode = stat(pidfile) and "r+" or "w+";
@@ -118,9 +120,9 @@ function syslog_sink_maker(config)
        local syslog, format = pposix.syslog_log, string.format;
        return function (name, level, message, ...)
                if ... then
-                       syslog(level, format(message, ...));
+                       syslog(level, name, format(message, ...));
                else
-                       syslog(level, message);
+                       syslog(level, name, message);
                end
        end;
 end