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

« back to all changes in this revision

Viewing changes to lib/orber/src/orber_env.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2010-03-09 17:34:57 UTC
  • mfrom: (10.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100309173457-4yd6hlcb2osfhx31
Tags: 1:13.b.4-dfsg-3
Manpages in section 1 are needed even if only arch-dependent packages are
built. So, re-enabled them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%--------------------------------------------------------------------
2
2
%%
3
3
%% %CopyrightBegin%
4
 
%% 
5
 
%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
6
 
%% 
 
4
%%
 
5
%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
 
6
%%
7
7
%% The contents of this file are subject to the Erlang Public License,
8
8
%% Version 1.1, (the "License"); you may not use this file except in
9
9
%% compliance with the License. You should have received a copy of the
10
10
%% Erlang Public License along with this software. If not, it can be
11
11
%% retrieved online at http://www.erlang.org/.
12
 
%% 
 
12
%%
13
13
%% Software distributed under the License is distributed on an "AS IS"
14
14
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15
15
%% the License for the specific language governing rights and limitations
16
16
%% under the License.
17
 
%% 
 
17
%%
18
18
%% %CopyrightEnd%
19
19
%%
20
20
%%
43
43
 
44
44
-export([iiop_acl/0, iiop_port/0, nat_iiop_port/0, nat_iiop_port/1, iiop_out_ports/0,
45
45
         domain/0, ip_address_variable_defined/0, nat_host/0, nat_host/1, host/0,
46
 
         ip_address/0, ip_address/1, giop_version/0, iiop_timeout/0,
47
 
         iiop_connection_timeout/0, iiop_setup_connection_timeout/0,
 
46
         ip_address/0, ip_address/1, giop_version/0, iiop_timeout/0, iiop_out_ports_random/0,
 
47
         iiop_connection_timeout/0, iiop_setup_connection_timeout/0, iiop_out_ports_attempts/0,
48
48
         iiop_in_connection_timeout/0, iiop_max_fragments/0, iiop_max_in_requests/0,
49
49
         iiop_max_in_connections/0, iiop_backlog/0, objectkeys_gc_time/0,
50
50
         get_ORBInitRef/0, get_ORBDefaultInitRef/0, get_interceptors/0,
234
234
                   "IIOP out connection timeout...: ~p msec~n"
235
235
                   "IIOP setup connection timeout.: ~p msec~n"
236
236
                   "IIOP out ports................: ~p~n"
 
237
                   "IIOP out ports attempts.......: ~p~n"
 
238
                   "IIOP out ports random.........: ~p~n"
237
239
                   "IIOP out connections..........: ~p~n"
238
240
                   "IIOP out connections (pending): ~p~n"
239
241
                   "IIOP out keepalive............: ~p~n"
256
258
                    nat_host(), ip_address_local(),
257
259
                    orber:orber_nodes(), Major, Minor,
258
260
                    iiop_timeout(), iiop_connection_timeout(), 
259
 
                    iiop_setup_connection_timeout(), iiop_out_ports(), 
 
261
                    iiop_setup_connection_timeout(), iiop_out_ports(),
 
262
                    iiop_out_ports_attempts(), iiop_out_ports_random(),
260
263
                    orber:iiop_connections(out), orber:iiop_connections_pending(), 
261
264
                    iiop_out_keepalive(), orber:iiop_connections(in), 
262
265
                    iiop_in_connection_timeout(), iiop_in_keepalive(), 
389
392
            0
390
393
    end.
391
394
 
 
395
iiop_out_ports_random() ->
 
396
    case application:get_env(orber, iiop_out_ports_random) of
 
397
        {ok, true} ->
 
398
            true;
 
399
        _ ->
 
400
            false
 
401
    end.
 
402
 
 
403
iiop_out_ports_attempts() ->
 
404
    case application:get_env(orber, iiop_out_ports_attempts) of
 
405
        {ok, No} when is_integer(No) andalso No > 0 ->
 
406
            No;
 
407
        _ ->
 
408
            1
 
409
    end.
 
410
   
 
411
 
392
412
domain() -> 
393
413
    case application:get_env(orber, domain) of
394
414
        {ok, Domain} when is_list(Domain) ->
1251
1271
%% Set the range of ports we may use on this machine when connecting to a server.
1252
1272
configure(iiop_out_ports, {Min, Max}, Status) when is_integer(Min) andalso is_integer(Max) ->
1253
1273
    do_safe_configure(iiop_out_ports, {Min, Max}, Status);
 
1274
configure(iiop_out_ports_attempts, Max, Status) when is_integer(Max) andalso Max > 0 ->
 
1275
    do_safe_configure(iiop_out_ports_attempts, Max, Status);
 
1276
configure(iiop_out_ports_random, true, Status) ->
 
1277
    do_safe_configure(iiop_out_ports_random, true, Status);
 
1278
configure(iiop_out_ports_random, false, Status) ->
 
1279
    do_safe_configure(iiop_out_ports_random, false, Status);
1254
1280
%% Set the lightweight option.
1255
1281
configure(lightweight, Value, Status) when is_list(Value) ->
1256
1282
    do_safe_configure(lightweight, Value, Status);