Merge tag 'upstream/1.0.5'
Upstream version 1.0.5
Philipp Huebner
7 years ago
307 | 307 | enter_loop(Mod, Options, StateName, StateData, ServerName, Timeout) -> |
308 | 308 | Name = get_proc_name(ServerName), |
309 | 309 | Parent = get_parent(), |
310 | Debug = gen:debug_options(Options), | |
310 | Debug = debug_options(Options), | |
311 | 311 | Limits = limit_options(Options), |
312 | 312 | Queue = queue:new(), |
313 | 313 | QueueLen = 0, |
369 | 369 | init_it(Starter, self(), Name, Mod, Args, Options); |
370 | 370 | init_it(Starter, Parent, Name0, Mod, Args, Options) -> |
371 | 371 | Name = name(Name0), |
372 | Debug = gen:debug_options(Options), | |
372 | Debug = debug_options(Options), | |
373 | 373 | Limits = limit_options(Options), |
374 | 374 | Queue = queue:new(), |
375 | 375 | QueueLen = 0, |
904 | 904 | {badrpc, timeout} |
905 | 905 | end |
906 | 906 | end. |
907 | ||
908 | opt(Op, [{Op, Value}|_]) -> | |
909 | {ok, Value}; | |
910 | opt(Op, [_|Options]) -> | |
911 | opt(Op, Options); | |
912 | opt(_, []) -> | |
913 | false. | |
914 | ||
915 | debug_options(Opts) -> | |
916 | case opt(debug, Opts) of | |
917 | {ok, Options} -> sys:debug_options(Options); | |
918 | _ -> [] | |
919 | end. |