Software /
code /
prosody
Changeset
1002:5265657d7c12
Merge
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 17 Apr 2009 16:16:17 +0100 |
parents | 1001:4bd375bde3cb (diff) 998:c2000160938d (current diff) |
children | 1003:afae75e37ceb |
files | |
diffstat | 3 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/core/configmanager.lua Tue Apr 14 20:07:45 2009 +0100 +++ b/core/configmanager.lua Fri Apr 17 16:16:17 2009 +0100 @@ -12,6 +12,8 @@ local setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile, type = setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile, type; +local eventmanager = require "core.eventmanager"; + module "configmanager" local parsers = {}; @@ -68,6 +70,9 @@ if f then local ok, err = parsers[format].load(f:read("*a")); f:close(); + if ok then + eventmanager.fire_event("config-reloaded", { filename = filename, format = format }); + end return ok, "parser", err; end return f, "file", err;
--- a/net/server.lua Tue Apr 14 20:07:45 2009 +0100 +++ b/net/server.lua Fri Apr 17 16:16:17 2009 +0100 @@ -325,7 +325,9 @@ if not ( forced or fatalerror ) then handler.sendbuffer( ) if bufferqueuelen ~= 0 then -- try again... - handler.write = nil -- ... but no further writing allowed + if handler then + handler.write = nil -- ... but no further writing allowed + end toclose = true return false end @@ -337,9 +339,11 @@ socket:close( ) _sendlistlen = removesocket( _sendlist, socket, _sendlistlen ) _socketlist[ socket ] = nil - _writetimes[ handler ] = nil - _closelist[ handler ] = nil - handler = nil + if handler then + _writetimes[ handler ] = nil + _closelist[ handler ] = nil + handler = nil + end socket = nil mem_free( ) if server then
--- a/prosody Tue Apr 14 20:07:45 2009 +0100 +++ b/prosody Fri Apr 17 16:16:17 2009 +0100 @@ -38,7 +38,7 @@ -- Use lfs? Make a new conf/ dir? local ok, level, err = config.load((CFG_CONFIGDIR or ".").."/prosody.cfg.lua"); if not ok then - print(""); + print("\n"); print("**************************"); if level == "parser" then print("A problem occured while reading the config file "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua");