mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
get_room_options will not crash in case of query for a non-existent room
This commit is contained in:
parent
832f6d39f9
commit
3d5d1ecbe4
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user