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

« back to all changes in this revision

Viewing changes to lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/src/a.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
%% ``The contents of this file are subject to the Erlang Public License,
 
2
%% Version 1.1, (the "License"); you may not use this file except in
 
3
%% compliance with the License. You should have received a copy of the
 
4
%% Erlang Public License along with this software. If not, it can be
 
5
%% retrieved via the world wide web at http://www.erlang.org/.
 
6
%%
 
7
%% Software distributed under the License is distributed on an "AS IS"
 
8
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
9
%% the License for the specific language governing rights and limitations
 
10
%% under the License.
 
11
%%
 
12
%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
 
13
%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
 
14
%% AB. All Rights Reserved.''
 
15
%%
 
16
%%     $Id$
 
17
%%
 
18
-module(a).
 
19
 
 
20
 
 
21
-behaviour(gen_server).
 
22
 
 
23
%% External exports
 
24
-export([start_link/0, a/0, b/0]).
 
25
%% Internal exports
 
26
-export([init/1, handle_call/3, handle_info/2, terminate/2, code_change/3]).
 
27
 
 
28
start_link() -> gen_server:start_link({local, aa}, a, [], []).
 
29
 
 
30
a() -> gen_server:call(aa, a).
 
31
b() -> gen_server:call(aa, b).
 
32
 
 
33
%%-----------------------------------------------------------------
 
34
%% Callback functions from gen_server
 
35
%%-----------------------------------------------------------------
 
36
init([]) ->
 
37
    process_flag(trap_exit, true),
 
38
    {ok, {state, bval}}.
 
39
 
 
40
handle_call(a, _From, State) ->
 
41
    X = application:get_all_env(a),
 
42
    {reply, X, State};
 
43
 
 
44
handle_call(b, _From, State) ->
 
45
    {reply, {ok, element(2, State)}, State}.
 
46
 
 
47
handle_info(_, State) ->
 
48
    {noreply, State}.
 
49
 
 
50
terminate(_Reason, _State) ->
 
51
    ok.
 
52
 
 
53
code_change(1, Extra, State) ->
 
54
    {ok, {state, bval}}.