diff options
-rw-r--r-- | erts/emulator/nifs/common/socket_nif.c | 2 | ||||
-rw-r--r-- | erts/emulator/test/socket_SUITE.erl | 29 |
2 files changed, 13 insertions, 18 deletions
diff --git a/erts/emulator/nifs/common/socket_nif.c b/erts/emulator/nifs/common/socket_nif.c index d24edde1e0..a14d3c860b 100644 --- a/erts/emulator/nifs/common/socket_nif.c +++ b/erts/emulator/nifs/common/socket_nif.c @@ -16452,8 +16452,6 @@ char* encode_cmsghdr_data_ipv6(ErlNifEnv* env, #if defined(IPV6_PKTINFO) case IPV6_PKTINFO: { - char* xres; - struct in6_pktinfo* pktInfoP = (struct in6_pktinfo*) dataP; ERL_NIF_TERM ifIndex = MKI(env, pktInfoP->ipi6_ifindex); ERL_NIF_TERM addr; diff --git a/erts/emulator/test/socket_SUITE.erl b/erts/emulator/test/socket_SUITE.erl index d3ea02f166..0ec097836b 100644 --- a/erts/emulator/test/socket_SUITE.erl +++ b/erts/emulator/test/socket_SUITE.erl @@ -2703,8 +2703,7 @@ api_a_connect_tcp(InitState) -> %% *** Init part *** #{desc => "which local address", cmd => fun(#{domain := Domain} = State) -> - LAddr = which_local_addr(Domain), - LSA = #{family => Domain, addr => LAddr}, + LSA = which_local_socket_addr(Domain), {ok, State#{lsa => LSA}} end}, #{desc => "create listen socket", @@ -2835,10 +2834,8 @@ api_a_connect_tcp(InitState) -> %% *** The init part *** #{desc => "which server (local) address", cmd => fun(#{domain := Domain, server_port := Port} = State) -> - LAddr = which_local_addr(Domain), - LSA = #{family => Domain, - addr => LAddr}, - SSA = LSA#{port => Port}, + LSA = which_local_socket_addr(Domain), + SSA = LSA#{port => Port}, {ok, State#{local_sa => LSA, server_sa => SSA}} end}, #{desc => "create socket", @@ -4992,16 +4989,6 @@ api_a_recv_cancel_tcp(InitState) -> _MRef = erlang:monitor(process, Pid), ok end}, - #{desc => "monitor alt-server 1", - cmd => fun(#{alt_server1 := Pid} = _State) -> - _MRef = erlang:monitor(process, Pid), - ok - end}, - #{desc => "monitor alt-server 2", - cmd => fun(#{alt_server2 := Pid} = _State) -> - _MRef = erlang:monitor(process, Pid), - ok - end}, %% Start the server #{desc => "order server start", @@ -5371,6 +5358,16 @@ api_a_mrecv_cancel_udp(InitState) -> _MRef = erlang:monitor(process, Pid), ok end}, + #{desc => "monitor alt-server 1", + cmd => fun(#{alt_server1 := Pid} = _State) -> + _MRef = erlang:monitor(process, Pid), + ok + end}, + #{desc => "monitor alt-server 2", + cmd => fun(#{alt_server2 := Pid} = _State) -> + _MRef = erlang:monitor(process, Pid), + ok + end}, %% Start the server #{desc => "order server start", |