aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/dist.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-04-11 14:06:39 +0200
committerSverker Eriksson <[email protected]>2019-04-11 14:06:39 +0200
commit508738f4dcd3c8c83fffb55c2ad5c365f80dc7c4 (patch)
tree6617cc0ba929f7b736be2750dfbb4e0da4ffac09 /erts/emulator/beam/dist.c
parent0e635324b19dd203454f41b41df7a7bb799bc40a (diff)
parent1ba8bf12eddb363481b1b5856af7c4d7c3313e52 (diff)
downloadotp-508738f4dcd3c8c83fffb55c2ad5c365f80dc7c4.tar.gz
otp-508738f4dcd3c8c83fffb55c2ad5c365f80dc7c4.tar.bz2
otp-508738f4dcd3c8c83fffb55c2ad5c365f80dc7c4.zip
Merge branch 'sverker/revert-big-creation'
* sverker/revert-big-creation: Revert "erts: Make DFLAG_BIG_CREATION mandatory" Revert "erts: Remove old encoding of pids, ports and refs" Revert "erl_interface: Remove old encoding of pid,port,refs" Revert "epmd: Support 32-bit creation values in local node" Revert "jinterface: Remove old encoding of pid,port,refs" Revert "erl_interface: Support 32-bit creation local cnode" Revert "erts: Document new EPMD response ALIVE2_X_RESP"
Diffstat (limited to 'erts/emulator/beam/dist.c')
-rw-r--r--erts/emulator/beam/dist.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 456b6fdac0..30fe13fad3 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -3756,10 +3756,12 @@ int distribution_info(fmtfn_t to, void *arg) /* Called by break handler */
BIF_RETTYPE setnode_2(BIF_ALIST_2)
{
Process *net_kernel;
- Uint32 creation;
+ Uint creation;
/* valid creation ? */
- if(!term_to_Uint32(BIF_ARG_2, &creation))
+ if(!term_to_Uint(BIF_ARG_2, &creation))
+ goto error;
+ if(creation > 3)
goto error;
/* valid node name ? */
@@ -3803,7 +3805,7 @@ BIF_RETTYPE setnode_2(BIF_ALIST_2)
erts_proc_unlock(BIF_P, ERTS_PROC_LOCK_MAIN);
erts_thr_progress_block();
inc_no_nodes();
- erts_set_this_node(BIF_ARG_1, creation);
+ erts_set_this_node(BIF_ARG_1, (Uint32) creation);
erts_is_alive = 1;
send_nodes_mon_msgs(NULL, am_nodeup, BIF_ARG_1, am_visible, NIL);
erts_thr_progress_unblock();