aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-09-05 14:21:06 +0200
committerRickard Green <[email protected]>2017-09-05 14:21:06 +0200
commit7636e282042f5ea1e8ffcd019ef2f4fae36c8fb7 (patch)
tree01b5dd9181bc89bad39519cd4fc2226226109be7 /erts/emulator/beam
parent5768dfd656c3fc0854226e102a7114d4fcf7f327 (diff)
parentb8870376d42b3f629d2dac394925e02f0e6e48ca (diff)
downloadotp-7636e282042f5ea1e8ffcd019ef2f4fae36c8fb7.tar.gz
otp-7636e282042f5ea1e8ffcd019ef2f4fae36c8fb7.tar.bz2
otp-7636e282042f5ea1e8ffcd019ef2f4fae36c8fb7.zip
Merge branch 'rickard/dist/OTP-14459'
* rickard/dist/OTP-14459: Fix setnode/3 and erts_net_message()
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/dist.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 10ec275922..bc168fc58d 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -1228,8 +1228,7 @@ int erts_net_message(Port *prt,
}
- if (hlen != 0)
- goto data_error;
+ ASSERT(hlen == 0);
if (len == 0) { /* HANDLE TICK !!! */
UnUseTmpHeapNoproc(DIST_CTL_DEFAULT_SIZE);
@@ -1249,11 +1248,6 @@ int erts_net_message(Port *prt,
len--;
}
- if (len == 0) {
- PURIFY_MSG("data error");
- goto data_error;
- }
-
res = erts_prepare_dist_ext(&ede, t, len, dep, dep->cache, &connection_id);
switch (res) {
@@ -3301,8 +3295,10 @@ BIF_RETTYPE setnode_3(BIF_ALIST_3)
if (ERTS_PROC_GET_DIST_ENTRY(proc)) {
if (dep == ERTS_PROC_GET_DIST_ENTRY(proc)
&& (proc->flags & F_DISTRIBUTION)
- && dep->cid == BIF_ARG_2)
+ && dep->cid == BIF_ARG_2) {
+ ERTS_BIF_PREP_RET(ret, erts_make_dhandle(BIF_P, dep));
goto done;
+ }
goto badarg;
}
@@ -3333,8 +3329,10 @@ BIF_RETTYPE setnode_3(BIF_ALIST_3)
if ((pp->drv_ptr->flags & ERL_DRV_FLAG_SOFT_BUSY) == 0)
goto badarg;
- if (dep->cid == BIF_ARG_2 && pp->dist_entry == dep)
+ if (dep->cid == BIF_ARG_2 && pp->dist_entry == dep) {
+ ERTS_BIF_PREP_RET(ret, erts_make_dhandle(BIF_P, dep));
goto done; /* Already set */
+ }
if (dep->status & ERTS_DE_SFLG_EXITING) {
/* Suspend on dist entry waiting for the exit to finish */