aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 a50072fe98..0e4361308f 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -1230,8 +1230,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);
@@ -1251,11 +1250,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) {
@@ -3303,8 +3297,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;
}
@@ -3335,8 +3331,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 */