# HG changeset patch # User Waqas Hussain # Date 1274489447 -18000 # Node ID 9b31e36528e080205befe20a1c71cb82a95f1220 # Parent 931acb1188b1bd9574b149ad71a7c6318cbb2f46 rostermanager: When loading the roster, also return a datamanager error if available. diff -r 931acb1188b1 -r 9b31e36528e0 core/rostermanager.lua --- a/core/rostermanager.lua Sat May 22 05:49:21 2010 +0500 +++ b/core/rostermanager.lua Sat May 22 05:50:47 2010 +0500 @@ -93,7 +93,8 @@ else -- Attempt to load roster for non-loaded user log("debug", "load_roster: loading for offline user: "..username.."@"..host); end - roster = datamanager.load(username, host, "roster") or {}; + local data, err = datamanager.load(username, host, "roster"); + roster = data or {}; if user then user.roster = roster; end if not roster[false] then roster[false] = { }; end if roster[jid] then @@ -101,7 +102,7 @@ log("warn", "roster for "..jid.." has a self-contact"); end hosts[host].events.fire_event("roster-load", username, host, roster); - return roster; + return roster, err; end function save_roster(username, host, roster)