~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/ssh/src/sshd_sup.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-08-05 20:54:29 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090805205429-pm4pnwew8axraosl
Tags: 1:13.b.1-dfsg-5
* Fixed parentheses in Emacs mode (closes: #536891).
* Removed unnecessary conflicts with erlang-manpages package.
* Added workaround for #475459: disabled threads on sparc architecture.
  This breaks wxErlang, so it's only a temporary solution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
%% 
17
17
%% %CopyrightEnd%
18
18
%%
19
 
 
20
19
%%
21
20
%%----------------------------------------------------------------------
22
21
%% Purpose: The top supervisor for ssh servers hangs under 
45
44
    case ssh_system_sup:system_supervisor(Address, Port) of
46
45
       undefined ->
47
46
            Spec =  child_spec(Address, Port, ServerOpts),    
48
 
            supervisor:start_child(?MODULE, Spec);
 
47
            case supervisor:start_child(?MODULE, Spec) of
 
48
                {error, already_present} ->
 
49
                    Name = id(Address, Port),
 
50
                    supervisor:delete_child(?MODULE, Name),
 
51
                    supervisor:start_child(?MODULE, Spec);
 
52
                Reply ->
 
53
                    Reply
 
54
            end;
49
55
        Pid ->
50
56
            AccPid = ssh_system_sup:acceptor_supervisor(Pid),
51
57
            ssh_acceptor_sup:start_child(AccPid, ServerOpts)