aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2015-07-01 15:54:12 +0200
committerErlang/OTP <[email protected]>2015-07-01 15:54:12 +0200
commitfb794658ae54b304219c907648f230decf10d622 (patch)
tree1c6a10b4f956b70a6d3db9540be0fe9f055d5e05
parent0f3f8f5871a1ea503cc80ae17adc8dec96c79445 (diff)
parent77d6dfd57e87daf7d0f2a02f7c592574241ad2d2 (diff)
downloadotp-fb794658ae54b304219c907648f230decf10d622.tar.gz
otp-fb794658ae54b304219c907648f230decf10d622.tar.bz2
otp-fb794658ae54b304219c907648f230decf10d622.zip
Merge branch 'ia/inets/maint-15/fd/OTP-12874' into maint-r15
* ia/inets/maint-15/fd/OTP-12874: ssl: Fix appup inets: Prepare for release inets: Fix broken fd feature
-rw-r--r--lib/inets/src/http_server/httpd_sup.erl36
-rw-r--r--lib/inets/src/inets_app/inets.appup.src6
-rw-r--r--lib/inets/vsn.mk4
-rw-r--r--lib/ssl/src/ssl.appup.src12
-rw-r--r--lib/ssl/vsn.mk2
5 files changed, 40 insertions, 20 deletions
diff --git a/lib/inets/src/http_server/httpd_sup.erl b/lib/inets/src/http_server/httpd_sup.erl
index da641cf533..75a65fd576 100644
--- a/lib/inets/src/http_server/httpd_sup.erl
+++ b/lib/inets/src/http_server/httpd_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -196,12 +196,16 @@ httpd_child_spec(ConfigFile, AcceptTimeoutDef, DebugDef) ->
end.
httpd_child_spec(Config, AcceptTimeout, Debug, Addr, Port) ->
- Fd = proplists:get_value(fd, Config, undefined),
- case Port == 0 orelse Fd =/= undefined of
- true ->
- httpd_child_spec_listen(Config, AcceptTimeout, Debug, Addr, Port);
- false ->
- httpd_child_spec_nolisten(Config, AcceptTimeout, Debug, Addr, Port)
+ case get_fd(Port) of
+ {ok, Fd} ->
+ case Port == 0 orelse Fd =/= undefined of
+ true ->
+ httpd_child_spec_listen(Config, AcceptTimeout, Debug, Addr, Port);
+ false ->
+ httpd_child_spec_nolisten(Config, AcceptTimeout, Debug, Addr, Port)
+ end;
+ Error ->
+ Error
end.
httpd_child_spec_listen(Config, AcceptTimeout, Debug, Addr, Port) ->
@@ -247,7 +251,7 @@ listen(Address, Port, Config) ->
SocketType ->
case http_transport:start(SocketType) of
ok ->
- Fd = proplists:get_value(fd, Config),
+ {ok, Fd} = get_fd(Port),
IpFamily = proplists:get_value(ipfamily, Config, inet6fb4),
case http_transport:listen(SocketType, Address, Port, Fd, IpFamily) of
{ok, ListenSocket} ->
@@ -366,3 +370,19 @@ ssl_ca_certificate_file(Config) ->
File ->
[{cacertfile, File}]
end.
+
+get_fd(0) ->
+ {ok, undefined};
+get_fd(Port) ->
+ FdKey = list_to_atom("httpd_" ++ integer_to_list(Port)),
+ case init:get_argument(FdKey) of
+ {ok, [[Value]]} ->
+ case (catch list_to_integer(Value)) of
+ N when is_integer(N) ->
+ {ok, N};
+ _ ->
+ {error, {bad_descriptor, Value}}
+ end;
+ _ ->
+ {ok, undefined}
+ end.
diff --git a/lib/inets/src/inets_app/inets.appup.src b/lib/inets/src/inets_app/inets.appup.src
index d2475a0e48..da8791bff0 100644
--- a/lib/inets/src/inets_app/inets.appup.src
+++ b/lib/inets/src/inets_app/inets.appup.src
@@ -1,7 +1,7 @@
%% This is an -*- erlang -*- file.
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -18,8 +18,8 @@
{"%VSN%",
[
- {<<"5\\.*">>, [{restart_application, inets}]}
+ {<<"5\\..*">>, [{restart_application, inets}]}
],
[
- {<<"5\\.*">>, [{restart_application, inets}]}
+ {<<"5\\..*">>, [{restart_application, inets}]}
]}.
diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk
index cccfb7a44f..70bfb3ff58 100644
--- a/lib/inets/vsn.mk
+++ b/lib/inets/vsn.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2001-2014. All Rights Reserved.
+# Copyright Ericsson AB 2001-2015. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -18,7 +18,7 @@
# %CopyrightEnd%
APPLICATION = inets
-INETS_VSN = 5.9.8
+INETS_VSN = 5.9.8.1
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)"
diff --git a/lib/ssl/src/ssl.appup.src b/lib/ssl/src/ssl.appup.src
index 89eb5a240b..1687088e5e 100644
--- a/lib/ssl/src/ssl.appup.src
+++ b/lib/ssl/src/ssl.appup.src
@@ -1,13 +1,13 @@
%% -*- erlang -*-
{"%VSN%",
[
- {<<"5\\.*">>, [{restart_application, ssl}]},
- {<<"4\\.*">>, [{restart_application, ssl}]},
- {<<"3\\.*">>, [{restart_application, ssl}]}
+ {<<"5\\..*">>, [{restart_application, ssl}]},
+ {<<"4\\..*">>, [{restart_application, ssl}]},
+ {<<"3\\..*">>, [{restart_application, ssl}]}
],
[
- {<<"5\\.*">>, [{restart_application, ssl}]},
- {<<"4\\.*">>, [{restart_application, ssl}]},
- {<<"3\\.*">>, [{restart_application, ssl}]}
+ {<<"5\\..*">>, [{restart_application, ssl}]},
+ {<<"4\\..*">>, [{restart_application, ssl}]},
+ {<<"3\\..*">>, [{restart_application, ssl}]}
]}.
diff --git a/lib/ssl/vsn.mk b/lib/ssl/vsn.mk
index a4e1710696..02b94e0afc 100644
--- a/lib/ssl/vsn.mk
+++ b/lib/ssl/vsn.mk
@@ -1 +1 @@
-SSL_VSN = 5.2.1.3
+SSL_VSN = 5.2.1.4