From 6dd31299cf783db9dd014fc490071a5bbec1080a Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Wed, 23 Oct 2013 12:22:17 +1000 Subject: [PATCH] Avoid case clause crash when loading permanent rooms --- src/mod_muc.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod_muc.erl b/src/mod_muc.erl index cfed60a3c..b8d6876b0 100644 --- a/src/mod_muc.erl +++ b/src/mod_muc.erl @@ -624,14 +624,14 @@ get_rooms(LServer, Host, odbc) -> [<<"select name, opts from muc_room ">>, <<"where host='">>, SHost, <<"';">>]) of - {'EXIT', Reason} -> ?ERROR_MSG("~p", [Reason]), []; {selected, [<<"name">>, <<"opts">>], RoomOpts} -> lists:map(fun ([Room, Opts]) -> #muc_room{name_host = {Room, Host}, opts = opts_to_binary( ejabberd_odbc:decode_term(Opts))} end, - RoomOpts) + RoomOpts); + Err -> ?ERROR_MSG("failed to get rooms: ~p", [Err]), [] end. load_permanent_rooms(Host, ServerHost, Access, HistorySize, RoomShaper) ->