~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%
2
2
%% %CopyrightBegin%
3
3
%%
4
 
%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
 
4
%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
5
5
%%
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
23
23
 
24
24
-include("ssh_connect.hrl").
25
25
 
 
26
%%% Optional callbacks handle_call/3, handle_cast/2, handle_msg/2,
 
27
%%% code_change/3
 
28
%% Should be further specified later
 
29
-callback init(Options::list()) ->
 
30
    {ok, State::term()} | {ok, State::term(), Timeout::timeout()} | 
 
31
    {stop, Reason ::term()}. 
 
32
 
 
33
-callback terminate(term(), term()) -> term().
 
34
 
 
35
-callback handle_ssh_msg({ssh_cm, ConnectionRef::term(), SshMsg::term()}, 
 
36
                         State::term()) -> {ok, State::term()} | 
 
37
                                           {stop, ChannelId::integer(), 
 
38
                                            State::term()}.
26
39
-behaviour(gen_server).
27
40
 
28
41
%%% API
29
 
-export([behaviour_info/1, start/4, start/5, start_link/4, start_link/5, call/2, call/3,
 
42
-export([start/4, start/5, start_link/4, start_link/5, call/2, call/3,
30
43
         cast/2, reply/2, enter_loop/1]).
31
44
 
32
45
%% gen_server callbacks
50
63
%% API
51
64
%%====================================================================
52
65
 
53
 
%%% Optionel callbacks handle_call/3, handle_cast/2, handle_msg/2,
54
 
%%% code_change/3
55
 
behaviour_info(callbacks) ->
56
 
    [
57
 
     {init, 1}, 
58
 
     {terminate, 2}, 
59
 
     {handle_ssh_msg, 2},
60
 
     {handle_msg, 2}
61
 
     ].
62
 
 
63
 
 
64
66
call(ChannelPid, Msg) ->
65
67
    call(ChannelPid, Msg, infinity).
66
68