# HG changeset patch # User Matthew Wild # Date 1389525577 18000 # Node ID d21ea6001bba22c3dd3a9b1d5473d93b66839db9 # Parent 6dc73be95213ad283221554652ec0272ebd79418# Parent 3f22f0de30f8178fb547cf456bbf9068f0b7ccec Merge 0.9->0.10 diff -r 6dc73be95213 -r d21ea6001bba .hgtags --- a/.hgtags Wed Dec 18 18:36:54 2013 +0100 +++ b/.hgtags Sun Jan 12 06:19:37 2014 -0500 @@ -50,3 +50,4 @@ 49e3c49eb0d8f33e94e2bf37e5421deacac5f499 0.9.2 49e3c49eb0d8f33e94e2bf37e5421deacac5f499 0.9.2 56b1f151f4a31fcc7dbde49e064a288715077ece 0.9.2 +872ff4851c9b6cd662aac4b1a056ac2a97c85ce5 0.9.3 diff -r 6dc73be95213 -r d21ea6001bba plugins/mod_s2s/mod_s2s.lua --- a/plugins/mod_s2s/mod_s2s.lua Wed Dec 18 18:36:54 2013 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Sun Jan 12 06:19:37 2014 -0500 @@ -366,7 +366,7 @@ if to then hosts[to].events.fire_event("s2s-stream-features", { origin = session, features = features }); else - (session.log or log)("warn", "No 'to' on stream header from %s means we can't offer any features", from or "unknown host"); + (session.log or log)("warn", "No 'to' on stream header from %s means we can't offer any features", from or session.ip or "unknown host"); end log("debug", "Sending stream features: %s", tostring(features)); @@ -467,7 +467,7 @@ end if reason then -- nil == no err, initiated by us, false == initiated by remote if type(reason) == "string" then -- assume stream error - log("debug", "Disconnecting %s[%s], is: %s", session.host or "(unknown host)", session.type, reason); + log("debug", "Disconnecting %s[%s], is: %s", session.host or session.ip or "(unknown host)", session.type, reason); session.sends2s(st.stanza("stream:error"):tag(reason, {xmlns = 'urn:ietf:params:xml:ns:xmpp-streams' })); elseif type(reason) == "table" then if reason.condition then @@ -478,7 +478,7 @@ if reason.extra then stanza:add_child(reason.extra); end - log("debug", "Disconnecting %s[%s], is: %s", session.host or "(unknown host)", session.type, tostring(stanza)); + log("debug", "Disconnecting %s[%s], is: %s", session.host or session.ip or "(unknown host)", session.type, tostring(stanza)); session.sends2s(stanza); elseif reason.name then -- a stanza log("debug", "Disconnecting %s->%s[%s], is: %s", session.from_host or "(unknown host)", session.to_host or "(unknown host)", session.type, tostring(reason)); @@ -660,7 +660,7 @@ end if must_secure and (session.cert_chain_status ~= "valid" or session.cert_identity_status ~= "valid") then - module:log("warn", "Forbidding insecure connection to/from %s", host); + module:log("warn", "Forbidding insecure connection to/from %s", host or session.ip or "(unknown host)"); if session.direction == "incoming" then session:close({ condition = "not-authorized", text = "Your server's certificate is invalid, expired, or not trusted by "..session.to_host }); else -- Close outgoing connections without warning diff -r 6dc73be95213 -r d21ea6001bba plugins/mod_tls.lua diff -r 6dc73be95213 -r d21ea6001bba tools/migration/migrator/prosody_files.lua --- a/tools/migration/migrator/prosody_files.lua Wed Dec 18 18:36:54 2013 +0100 +++ b/tools/migration/migrator/prosody_files.lua Sun Jan 12 06:19:37 2014 -0500 @@ -13,6 +13,7 @@ local pairs = pairs; local json = require "util.json"; local os_getenv = os.getenv; +local error = error; prosody = {}; local dm = require "util.datamanager" @@ -95,15 +96,18 @@ local iter = mtools.sorted { reader = function() local x = iter(); - if x then + while x do dm.set_data_path(path); local err; x.data, err = dm.load(x.user, x.host, x.store); if x.data == nil and err then - error(("Error loading data at path %s for %s@%s (%s store)") - :format(path, x.user or "", x.host or "", x.store or ""), 0); + local p = dm.getpath(x.user, x.host, x.store); + print(("Error loading data at path %s for %s@%s (%s store): %s") + :format(p, x.user or "", x.host or "", x.store or "", err or "")); + else + return x; end - return x; + x = iter(); end end; sorter = function(a, b)