File 5101-Add-missing-callback-function-addres-0.patch of Package erlang
From bdbed305710528b87768c291fd49a879f98c3bae Mon Sep 17 00:00:00 2001
From: Raimo Niskanen <raimo@erlang.org>
Date: Wed, 14 Oct 2020 14:44:58 +0200
Subject: [PATCH] Add missing callback function addres/0
---
lib/ssl/src/inet6_tls_dist.erl | 7 +++++--
lib/ssl/src/inet_tls_dist.erl | 14 +++++++++++---
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/lib/ssl/src/inet6_tls_dist.erl b/lib/ssl/src/inet6_tls_dist.erl
index 9ce13ca281..5ca0cd6904 100644
--- a/lib/ssl/src/inet6_tls_dist.erl
+++ b/lib/ssl/src/inet6_tls_dist.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2015-2017. All Rights Reserved.
+%% Copyright Ericsson AB 2015-2020. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
-export([childspecs/0]).
-export([listen/2, accept/1, accept_connection/5,
- setup/5, close/1, select/1]).
+ setup/5, close/1, select/1, address/0]).
childspecs() ->
inet_tls_dist:childspecs().
@@ -31,6 +31,9 @@ childspecs() ->
select(Node) ->
inet_tls_dist:gen_select(inet6_tcp, Node).
+address() ->
+ inet_tls_dist:gen_address(inet6_tcp).
+
listen(Name, Host) ->
inet_tls_dist:gen_listen(inet6_tcp, Name, Host).
diff --git a/lib/ssl/src/inet_tls_dist.erl b/lib/ssl/src/inet_tls_dist.erl
index 9bf8e40b70..18119d9040 100644
--- a/lib/ssl/src/inet_tls_dist.erl
+++ b/lib/ssl/src/inet_tls_dist.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2019. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2020. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -23,11 +23,11 @@
-export([childspecs/0]).
-export([listen/2, accept/1, accept_connection/5,
- setup/5, close/1, select/1, is_node_name/1]).
+ setup/5, close/1, select/1, address/0, is_node_name/1]).
%% Generalized dist API
-export([gen_listen/3, gen_accept/2, gen_accept_connection/6,
- gen_setup/6, gen_close/2, gen_select/2]).
+ gen_setup/6, gen_close/2, gen_select/2, gen_address/1]).
-export([nodelay/0]).
@@ -54,6 +54,14 @@ gen_select(Driver, Node) ->
gen_select(Driver, Node) ->
inet_tcp_dist:gen_select(Driver, Node).
+%% ------------------------------------------------------------
+%% Get the address family that this distribution uses
+%% ------------------------------------------------------------
+address() ->
+ gen_address(inet_tcp).
+gen_address(Driver) ->
+ inet_tcp_dist:gen_address(Driver).
+
%% -------------------------------------------------------------------------
is_node_name(Node) ->
--
2.26.2