mod_ping: Add ad-hoc command
[prosody.git] / util / datamanager.lua
index 9d96e5b37a5f733ec00665454da4a623fc155588..57cd2594e954d81f9c9cc56310eb6434183a8caa 100644 (file)
@@ -145,7 +145,7 @@ function store(username, host, datastore, data)
        local f, msg = io_open(getpath(username, host, datastore, nil, true), "w+");
        if not f then
                log("error", "Unable to write to "..datastore.." storage ('"..msg.."') for user: "..(username or "nil").."@"..(host or "nil"));
-               return;
+               return nil, "Error saving to storage";
        end
        f:write("return ");
        append(f, data);