Permalink
Browse files

Make sure update_info returns atoms only (EJAB-1595) (Thanks to Jose …

…M Herrero)
  • Loading branch information...
1 parent d5506a3 commit d47dee8009826d6a43bc5ceaf74ed3899fadf599 @zinid zinid committed Jan 3, 2013
Showing with 20 additions and 17 deletions.
  1. +20 −17 src/ejabberd_update.erl
View
@@ -142,23 +142,26 @@ build_script(Dir, UpdatedBeams) ->
release_handler_1:check_script(
LowLevelScript,
[{ejabberd, "", filename:join(Dir, "..")}]),
- case Check of
- ok ->
- %% This clause is for OTP R14B03 and older.
- %% Newer Dialyzer reports a never match pattern; don't worry.
- ?DEBUG("script: ~p~n", [Script]),
- ?DEBUG("low level script: ~p~n", [LowLevelScript]),
- ?DEBUG("check: ~p~n", [Check]);
- {ok, []} ->
- ?DEBUG("script: ~p~n", [Script]),
- ?DEBUG("low level script: ~p~n", [LowLevelScript]),
- ?DEBUG("check: ~p~n", [Check]);
- _ ->
- ?ERROR_MSG("script: ~p~n", [Script]),
- ?ERROR_MSG("low level script: ~p~n", [LowLevelScript]),
- ?ERROR_MSG("check: ~p~n", [Check])
- end,
- {Script, LowLevelScript, Check}.
+ Check1 = case Check of
+ ok ->
+ %% This clause is for OTP R14B03 and older.
+ %% Newer Dialyzer reports a never match pattern; don't worry.
+ ?DEBUG("script: ~p~n", [Script]),
+ ?DEBUG("low level script: ~p~n", [LowLevelScript]),
+ ?DEBUG("check: ~p~n", [Check]),
+ ok;
+ {ok, []} ->
+ ?DEBUG("script: ~p~n", [Script]),
+ ?DEBUG("low level script: ~p~n", [LowLevelScript]),
+ ?DEBUG("check: ~p~n", [Check]),
+ ok;
+ _ ->
+ ?ERROR_MSG("script: ~p~n", [Script]),
+ ?ERROR_MSG("low level script: ~p~n", [LowLevelScript]),
+ ?ERROR_MSG("check: ~p~n", [Check]),
+ error
+ end,
+ {Script, LowLevelScript, Check1}.
%% Copied from Erlang/OTP file: lib/sasl/src/systools.hrl
-record(application,

0 comments on commit d47dee8

Please sign in to comment.