@@ -446,7 +446,8 @@ handle_info({ac_application_run, AppName, Res}, S) ->
446446
447447handle_info ({ac_application_not_run , AppName }, S ) ->
448448 % % We ordered a stop, and now it has stopped
449- {value , Appl } = keysearch (AppName , # appl .name , Appls = S # state .appls ),
449+ Appls = S # state .appls ,
450+ {value , Appl } = keysearch (AppName , # appl .name , Appls ),
450451 % % Check if we have somebody waiting for the takeover result;
451452 % % if somebody called stop just before takeover was handled,
452453 NTReqs = del_t_reqs (AppName , S # state .t_reqs , {error , stopped }),
@@ -474,7 +475,8 @@ handle_info({ac_application_not_run, AppName}, S) ->
474475handle_info ({ac_application_stopped , AppName }, S ) ->
475476 % % Somebody called application:stop - reset state as it was before
476477 % % the application was started.
477- {value , Appl } = keysearch (AppName , # appl .name , Appls = S # state .appls ),
478+ Appls = S # state .appls ,
479+ {value , Appl } = keysearch (AppName , # appl .name , Appls ),
478480 % % Check if we have somebody waiting for the takeover result;
479481 % % if somebody called stop just before takeover was handled,
480482 NTReqs = del_t_reqs (AppName , S # state .t_reqs , {error , stopped }),
@@ -650,7 +652,8 @@ handle_info({nodedown, Node}, S) ->
650652
651653handle_info ({dist_ac_app_loaded , Node , Name , HisNodes , Permission , HeKnowsMe },
652654 S ) ->
653- Nodes = dist_find_nodes (Appls = S # state .appls , Name ),
655+ Appls = S # state .appls ,
656+ Nodes = dist_find_nodes (Appls , Name ),
654657 case is_loaded (Name , S ) of
655658 true ->
656659 case equal_nodes (Nodes , HisNodes ) of
@@ -723,7 +726,8 @@ code_change(_OldVsn, State, _Extra) ->
723726load (AppName , S ) ->
724727 Appls0 = S # state .appls ,
725728 % % Get the dist specification for the app on other nodes
726- DistLoaded = get_dist_loaded (AppName , Load1 = S # state .dist_loaded ),
729+ Load1 = S # state .dist_loaded ,
730+ DistLoaded = get_dist_loaded (AppName , Load1 ),
727731 % % Get the local dist specification
728732 Nodes = dist_find_nodes (Appls0 , AppName ),
729733 FNodes = flat_nodes (Nodes ),
@@ -785,7 +789,8 @@ start_appl(AppName, S, Type) ->
785789 % % Get nodes, and check if App is loaded on all involved nodes.
786790 % % If it is loaded everywhere, we know that we have the same picture
787791 % % of the nodes; otherwise the load wouldn't have succeeded.
788- Appl = case keysearch (AppName , # appl .name , Appls = S # state .appls ) of
792+ Appls = S # state .appls ,
793+ Appl = case keysearch (AppName , # appl .name , Appls ) of
789794 {value , A } -> A ;
790795 _ -> throw ({error , {unknown_application , AppName }})
791796 end ,
0 commit comments