aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2019-01-29 16:58:13 +0100
committerRickard Green <[email protected]>2019-02-04 17:31:14 +0100
commit50bf9f5d8403b9903ea63867611ac16ffec1c14c (patch)
treeeae818b5455b067c4be655106dacbff02a92e392 /lib
parentd443097778e22c51173aaa22b71303b05a89cf84 (diff)
downloadotp-50bf9f5d8403b9903ea63867611ac16ffec1c14c.tar.gz
otp-50bf9f5d8403b9903ea63867611ac16ffec1c14c.tar.bz2
otp-50bf9f5d8403b9903ea63867611ac16ffec1c14c.zip
Fix bug in ei_accept_tmo
Diffstat (limited to 'lib')
-rw-r--r--lib/erl_interface/src/connect/ei_connect.c1
-rw-r--r--lib/erl_interface/src/misc/ei_portio.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c
index 206b185e96..e8ecb7011f 100644
--- a/lib/erl_interface/src/connect/ei_connect.c
+++ b/lib/erl_interface/src/connect/ei_connect.c
@@ -1277,7 +1277,6 @@ int ei_accept_tmo(ei_cnode* ec, int lfd, ErlConnect *conp, unsigned ms)
}
if (conp) {
memcpy((void *) conp->ipadr, (void *) &addr.sin_addr, sizeof(conp->ipadr));
- strcpy(&conp->nodename[0], her_name);
}
if (cbs->accept_handshake_complete) {
diff --git a/lib/erl_interface/src/misc/ei_portio.c b/lib/erl_interface/src/misc/ei_portio.c
index 368c56546b..bccc86c1b1 100644
--- a/lib/erl_interface/src/misc/ei_portio.c
+++ b/lib/erl_interface/src/misc/ei_portio.c
@@ -249,7 +249,7 @@ static int tcp_accept(void **ctx, void *addr, int *len, unsigned unused)
if (res)
return res;
- res = accept(fd, (struct sockaddr*) &addr, &addr_len);
+ res = accept(fd, (struct sockaddr*) addr, &addr_len);
if (MEANS_SOCKET_ERROR(res))
return get_error();