24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-22 22:23:42 +02:00

get_room_options will not crash in case of query for a non-existent room

This commit is contained in:
oxpa 2015-08-28 03:34:51 -08:00
parent 832f6d39f9
commit 3d5d1ecbe4

View File

@ -816,8 +816,10 @@ change_option(Option, Value, Config) ->
%%----------------------------
get_room_options(Name, Service) ->
Pid = get_room_pid(Name, Service),
get_room_options(Pid).
case get_room_pid(Name, Service) of
room_not_found -> [];
Pid -> get_room_options(Pid)
end.
get_room_options(Pid) ->
Config = get_room_config(Pid),