Permalink
Browse files

added a set of infinity to several gen_server:calls

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1245 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
klacke committed May 17, 2008
1 parent 5207102 commit aa815f2d41d35a9fbfcd140c81fd232b41dff3d2
Showing with 20 additions and 20 deletions.
  1. +1 −1 src/yaws_api.erl
  2. +1 −1 src/yaws_compile.erl
  3. +2 −2 src/yaws_config.erl
  4. +3 −3 src/yaws_ctl.erl
  5. +3 −3 src/yaws_log.erl
  6. +2 −2 src/yaws_pam.erl
  7. +2 −2 src/yaws_server.erl
  8. +3 −3 src/yaws_session_server.erl
  9. +3 −3 src/yaws_soap_srv.erl
View
@@ -880,7 +880,7 @@ set_access_log(Bool) ->
%% interactively turn on|off tracing to the tty (as well)
%% typically useful in embedded mode
set_tty_trace(Bool) ->
- gen_server:call(yaws_log, {trace_tty, Bool}).
+ gen_server:call(yaws_log, {trace_tty, Bool}, infinity).
View
@@ -276,7 +276,7 @@ is_exported(Fun, A, Mod) ->
new_out_file_module(Tail) ->
case Tail of
">" ++ _ ->
- Mnum = case catch gen_server:call(yaws_server, mnum) of
+ Mnum = case catch gen_server:call(yaws_server, mnum, infinity) of
{'EXIT', _} ->
1;
Other ->
View
@@ -1502,14 +1502,14 @@ is_list_of_scs(_) ->
add_sconf(SC) ->
ok= gen_server:call(yaws_server, {add_sconf, SC}, infinity),
- ok = gen_server:call(yaws_log, {soft_add_sc, SC}).
+ ok = gen_server:call(yaws_log, {soft_add_sc, SC}, infinity).
update_sconf(SC) ->
ok = gen_server:call(yaws_server, {update_sconf, SC}, infinity).
delete_sconf(SC) ->
ok = gen_server:call(yaws_server, {delete_sconf, SC}, infinity),
- ok = gen_server:call(yaws_log, {soft_del_sc, SC}).
+ ok = gen_server:call(yaws_log, {soft_del_sc, SC}, infinity).
update_gconf(GC) ->
ok = gen_server:call(yaws_server, {update_gconf, GC}, infinity).
View
@@ -20,7 +20,7 @@
-export([ls/1,hup/1,stop/1,status/1,load/1,
check/1,trace/1, debug_dump/1]).
%% internal
--export([run/1, aloop/3]).
+-export([run/1, aloop/3, handle_a/3]).
%% assumes the appropriate file structures
@@ -122,7 +122,7 @@ w_ctl_file(Sid, Port, Key) ->
aloop(L, GC, Key) ->
case gen_tcp:accept(L) of
{ok, A} ->
- handle_a(A, GC, Key);
+ proc_lib:spawn (?MODULE, handle_a, [A, GC, Key]);
Err ->
error_logger:format("yaws_ctl failed to accept: ~p~n",
[Err]),
@@ -212,7 +212,7 @@ f(Fmt, As) ->
a_id(Sock) ->
- ID = gen_server:call(yaws_server, id, []),
+ ID = gen_server:call(yaws_server, id, [], infinity),
gen_tcp:send(Sock, ID),
ok.
View
@@ -69,10 +69,10 @@ accesslog(ServerName, Ip, User, Req, Status, Length, Referrer, UserAgent) ->
gen_server:cast(?MODULE, {access, ServerName, Ip, User, Req,
Status, Length, Referrer, UserAgent}).
setdir(GC, Sconfs) ->
- gen_server:call(?MODULE, {setdir, GC, Sconfs}).
+ gen_server:call(?MODULE, {setdir, GC, Sconfs}, infinity).
open_trace(What) ->
- gen_server:call(?MODULE, {open_trace, What}).
+ gen_server:call(?MODULE, {open_trace, What}, infinity).
trace_traffic(ServerOrClient , Data) ->
gen_server:cast(?MODULE, {trace, ServerOrClient, Data}).
@@ -81,7 +81,7 @@ authlog(ServerName, IP, Path, Item) ->
%% from external ctl prog
actl_trace(What) ->
- gen_server:call(?MODULE, {actl_trace, What}).
+ gen_server:call(?MODULE, {actl_trace, What}, infinity).
View
@@ -50,10 +50,10 @@ start_link(Service, UseAccounting, UseSess) ->
gen_server:start_link({local, ?MODULE}, ?MODULE, Args, []).
auth(User, Password) ->
- gen_server:call(?MODULE, {auth, User, Password}).
+ gen_server:call(?MODULE, {auth, User, Password}, infinity).
%% yaws never use close, ... no session mgmt in yaws
close(Handle) ->
- gen_server:call(?MODULE, {close, Handle}).
+ gen_server:call(?MODULE, {close, Handle}, infinity).
View
@@ -77,14 +77,14 @@ start_link(A) ->
status() ->
gen_server:call(?MODULE, status, 10000).
gs_status() ->
- [_|Pids] = gen_server:call(?MODULE, pids),
+ [_|Pids] = gen_server:call(?MODULE, pids, 10000),
lists:map(
fun(P) ->
P ! {self(), status},
receive {P, Stat} -> Stat end
end, Pids).
getconf() ->
- gen_server:call(?MODULE,getconf).
+ gen_server:call(?MODULE,getconf, infinity).
stats() ->
{_S, Time} = status(),
@@ -50,15 +50,15 @@ start() ->
gen_server:start({local, yaws_session_server},
yaws_session_server, [], []).
stop() ->
- gen_server:call(?MODULE, stop).
+ gen_server:call(?MODULE, stop, infinity).
%% will return a new cookie as a string
new_session(Opaque) ->
- gen_server:call(?MODULE, {new_session, Opaque, ?TTL}).
+ gen_server:call(?MODULE, {new_session, Opaque, ?TTL}, infinity).
new_session(Opaque, TTL) ->
- gen_server:call(?MODULE, {new_session, Opaque, TTL}).
+ gen_server:call(?MODULE, {new_session, Opaque, TTL}, infinity).
cookieval_to_opaque(CookieString) ->
case ets:lookup(?MODULE, CookieString) of
View
@@ -58,7 +58,7 @@ handler(Args, Id, Payload, SessionValue) ->
Headers = Args#arg.headers,
SoapAction = yaws_soap_lib:findHeader("SOAPAction", Headers#headers.other),
case gen_server:call(?SERVER, {request, Id, Payload,
- SessionValue, SoapAction}) of
+ SessionValue, SoapAction}, infinity) of
{ok, XmlDoc, ResCode, undefined} ->
{false, XmlDoc, ResCode};
{ok, XmlDoc, ResCode, SessVal} ->
@@ -75,12 +75,12 @@ setup(_ConfigFile) ->
setup(Id, WsdlFile) when tuple(Id),size(Id)==2 ->
Wsdl = yaws_soap_lib:initModel(WsdlFile),
- gen_server:call(?SERVER, {add_wsdl, Id, Wsdl}).
+ gen_server:call(?SERVER, {add_wsdl, Id, Wsdl}, infinity).
setup(Id, WsdlFile, Prefix) when tuple(Id),size(Id)==2 ->
Wsdl = yaws_soap_lib:initModel(WsdlFile, Prefix),
- gen_server:call(?SERVER, {add_wsdl, Id, Wsdl}).
+ gen_server:call(?SERVER, {add_wsdl, Id, Wsdl}, infinity).

0 comments on commit aa815f2

Please sign in to comment.