~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/megaco/src/tcp/megaco_tcp_accept_sup.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
-behaviour(supervisor).
26
26
 
 
27
 
27
28
%%-----------------------------------------------------------------
28
29
%% External exports
29
30
%%-----------------------------------------------------------------
30
31
-export([
31
 
         start_link/0
 
32
         start_link/0,
 
33
         start_child/4
32
34
        ]).
33
35
 
34
36
%%-----------------------------------------------------------------
42
44
%%-----------------------------------------------------------------
43
45
%% External interface functions
44
46
%%-----------------------------------------------------------------
 
47
 
45
48
%%-----------------------------------------------------------------
46
49
%% Func: start_link/1
47
 
%% Description: Starts the proces that keeps track of the TCP 
 
50
%% Description: Starts the process that keeps track of the TCP 
48
51
%%              accept processes
49
52
%%-----------------------------------------------------------------
50
53
start_link() ->
51
54
    supervisor:start_link(?MODULE, []).
52
55
 
 
56
 
 
57
%%-----------------------------------------------------------------
 
58
%% Func: start_link/1
 
59
%% Description: Starts the acceptor process (the TCP accept 
 
60
%%              processes)
 
61
%%-----------------------------------------------------------------
 
62
start_child(Pid, Rec, Ref, Listen) ->
 
63
    ChildSpec = [{Rec, Ref, Listen}],  % Simple one-for-one
 
64
    supervisor:start_child(Pid, ChildSpec).
 
65
 
 
66
 
53
67
%%-----------------------------------------------------------------
54
68
%% Server functions
55
69
%%-----------------------------------------------------------------