diff options
author | Ingela Anderton Andin <[email protected]> | 2013-12-03 11:04:16 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2013-12-19 09:07:10 +0100 |
commit | 940e213d07ed34ac6ea6e07bf6fcf97d4a88a64e (patch) | |
tree | fd94c81e786496272b784df88a43a8014afd8f24 /lib/inets/test/httpd_block.erl | |
parent | 25237481ccccd3ddfa74582dc267632ad618ba30 (diff) | |
download | otp-940e213d07ed34ac6ea6e07bf6fcf97d4a88a64e.tar.gz otp-940e213d07ed34ac6ea6e07bf6fcf97d4a88a64e.tar.bz2 otp-940e213d07ed34ac6ea6e07bf6fcf97d4a88a64e.zip |
inets: Remove use of default gen_server timeout
If you need a timeout between client and server use a server side
timeout instead of the default gen_server:call/2 timeout that is quite
useless. Also remove legacy code that has no further use.
Diffstat (limited to 'lib/inets/test/httpd_block.erl')
-rw-r--r-- | lib/inets/test/httpd_block.erl | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/inets/test/httpd_block.erl b/lib/inets/test/httpd_block.erl index ac1bf43ff5..2f56096f75 100644 --- a/lib/inets/test/httpd_block.erl +++ b/lib/inets/test/httpd_block.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2010. All Rights Reserved. +%% Copyright Ericsson AB 2005-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -297,9 +297,12 @@ httpd_restart(Addr, Port) -> make_name(Addr, Port) -> httpd_util:make_name("httpd", Addr, Port). -get_admin_state(Node, _Host, Port) -> - Addr = undefined, - rpc:call(Node, httpd, get_admin_state, [Addr, Port]). +get_admin_state(_, _Host, Port) -> + Name = make_name(undefined, Port), + {status, _, _, StatusInfo} = sys:get_status(whereis(Name)), + [_, _,_, _, Prop] = StatusInfo, + State = state(Prop), + element(6, State). validate_admin_state(Node, Host, Port, Expect) -> io:format("try validating server admin state: ~p~n", [Expect]), @@ -363,6 +366,9 @@ do_long_poll(Type, Host, Port, Node, StatusCode, Timeout) -> end. - - - +state([{data,[{"State", State}]} | _]) -> + State; +state([{data,[{"StateData", State}]} | _]) -> + State; +state([_ | Rest]) -> + state(Rest). |