~ubuntu-branches/ubuntu/lucid/erlang/lucid

« back to all changes in this revision

Viewing changes to lib/megaco/test/megaco_test_generic_transport.erl

  • Committer: Elliot Murphy
  • Date: 2009-12-22 02:56:21 UTC
  • mfrom: (3.3.5 sid)
  • Revision ID: elliot@elliotmurphy.com-20091222025621-qv3rja8gbpiabkbe
Tags: 1:13.b.3-dfsg-2ubuntu1
* Merge with Debian testing; remaining Ubuntu changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to. (LP #438365)
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
* Fixed dialyzer(1) manpage which was placed into section 3 and conflicted
  with dialyzer(3erl).
* New upstream release (it adds a new binary package erlang-erl-docgen).
* Refreshed patches, removed most of emacs.patch which is applied upstream.
* Linked run_test binary from erlang-common-test package to /usr/bin.
* Fixed VCS headers in debian/control.
* Moved from prebuilt manpages to generated from sources. This adds
  erlang-manpages binary package and xsltproc build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
-export([
31
31
         start_transport/0, 
 
32
         listen/2, 
32
33
         connect/2, 
33
34
         start/1,
34
35
         stop/0,
80
81
connect(Sup, Opts) ->
81
82
    call({connect, Sup, Opts}).
82
83
 
 
84
listen(Sup, Opts) ->
 
85
    call({listen, Sup, Opts}).
 
86
 
83
87
stop() ->
84
88
    call(stop).
85
89
 
136
140
    {reply, Reply, State#state{controller     = Controller,
137
141
                               receive_handle = ReceiveHandle}};
138
142
 
 
143
handle_call({listen, _Sup, Opts}, _From, State) ->
 
144
    d("handle_call(listen) -> entry with"
 
145
      "~n   Opts: ~p", [Opts]),
 
146
    {value, {_, ReceiveHandle}} = lists:keysearch(receive_handle, 1, Opts),
 
147
    {value, {_, Controller}}    = lists:keysearch(port, 1, Opts),
 
148
    SendHandle = self(), 
 
149
    ControlPid = self(),
 
150
    Reply  = {ok, SendHandle, ControlPid},
 
151
    Controller ! {listen, ReceiveHandle, SendHandle, ControlPid},  
 
152
    {reply, Reply, State#state{controller     = Controller,
 
153
                               receive_handle = ReceiveHandle}};
 
154
 
139
155
handle_call(stop, _From, State) ->
140
156
    d("handle_call(stop) -> entry"),
141
157
    Reply  = ok,