@@ -444,7 +444,8 @@ handle_info({ac_application_run, AppName, Res}, S) ->
444444
445445handle_info ({ac_application_not_run , AppName }, S ) ->
446446 % % We ordered a stop, and now it has stopped
447- {value , Appl } = keysearch (AppName , # appl .name , Appls = S # state .appls ),
447+ Appls = S # state .appls ,
448+ {value , Appl } = keysearch (AppName , # appl .name , Appls ),
448449 % % Check if we have somebody waiting for the takeover result;
449450 % % if somebody called stop just before takeover was handled,
450451 NTReqs = del_t_reqs (AppName , S # state .t_reqs , {error , stopped }),
@@ -472,7 +473,8 @@ handle_info({ac_application_not_run, AppName}, S) ->
472473handle_info ({ac_application_stopped , AppName }, S ) ->
473474 % % Somebody called application:stop - reset state as it was before
474475 % % the application was started.
475- {value , Appl } = keysearch (AppName , # appl .name , Appls = S # state .appls ),
476+ Appls = S # state .appls ,
477+ {value , Appl } = keysearch (AppName , # appl .name , Appls ),
476478 % % Check if we have somebody waiting for the takeover result;
477479 % % if somebody called stop just before takeover was handled,
478480 NTReqs = del_t_reqs (AppName , S # state .t_reqs , {error , stopped }),
@@ -648,7 +650,8 @@ handle_info({nodedown, Node}, S) ->
648650
649651handle_info ({dist_ac_app_loaded , Node , Name , HisNodes , Permission , HeKnowsMe },
650652 S ) ->
651- Nodes = dist_find_nodes (Appls = S # state .appls , Name ),
653+ Appls = S # state .appls ,
654+ Nodes = dist_find_nodes (Appls , Name ),
652655 case is_loaded (Name , S ) of
653656 true ->
654657 case equal_nodes (Nodes , HisNodes ) of
@@ -721,7 +724,8 @@ code_change(_OldVsn, State, _Extra) ->
721724load (AppName , S ) ->
722725 Appls0 = S # state .appls ,
723726 % % Get the dist specification for the app on other nodes
724- DistLoaded = get_dist_loaded (AppName , Load1 = S # state .dist_loaded ),
727+ Load1 = S # state .dist_loaded ,
728+ DistLoaded = get_dist_loaded (AppName , Load1 ),
725729 % % Get the local dist specification
726730 Nodes = dist_find_nodes (Appls0 , AppName ),
727731 FNodes = flat_nodes (Nodes ),
@@ -783,7 +787,8 @@ start_appl(AppName, S, Type) ->
783787 % % Get nodes, and check if App is loaded on all involved nodes.
784788 % % If it is loaded everywhere, we know that we have the same picture
785789 % % of the nodes; otherwise the load wouldn't have succeeded.
786- Appl = case keysearch (AppName , # appl .name , Appls = S # state .appls ) of
790+ Appls = S # state .appls ,
791+ Appl = case keysearch (AppName , # appl .name , Appls ) of
787792 {value , A } -> A ;
788793 _ -> throw ({error , {unknown_application , AppName }})
789794 end ,
0 commit comments