mod_posix: Some (perhaps temporary) changes to re-lock the pidfile after truncating...
[prosody.git] / prosody
diff --git a/prosody b/prosody
index 8e96eb46ac88d1cfdc42bf146a0570928686bd17..fd6a051c420fb5ef5936592fb44e4394961430c1 100755 (executable)
--- a/prosody
+++ b/prosody
@@ -144,6 +144,10 @@ function set_function_metatable()
                        debug.setupvalue(f, i, value);
                end
        end
+       function mt.__tostring(f)
+               local info = debug.getinfo(f);
+               return ("function(%s:%d)"):format(info.short_src:match("[^\\/]*$"), info.linedefined);
+       end
        debug.setmetatable(function() end, mt);
 end
 
@@ -281,6 +285,7 @@ end
 function load_secondary_libraries()
        --- Load and initialise core modules
        require "util.import"
+       require "util.xmppstream"
        require "core.xmlhandlers"
        require "core.rostermanager"
        require "core.hostmanager"