diff options
author | Sverker Eriksson <[email protected]> | 2019-04-03 21:16:59 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2019-04-17 19:09:12 +0200 |
commit | 6465de7e3a5393a80ed0e2c63f012fd126de706f (patch) | |
tree | f85198d2afe765a8f3b7c94ed31b36830346b006 /lib/erl_interface/src/connect | |
parent | 46aa940b9d771c4806aacaf065c2f637474e9815 (diff) | |
download | otp-6465de7e3a5393a80ed0e2c63f012fd126de706f.tar.gz otp-6465de7e3a5393a80ed0e2c63f012fd126de706f.tar.bz2 otp-6465de7e3a5393a80ed0e2c63f012fd126de706f.zip |
erl_interface: Add bitstring and export fun support
Diffstat (limited to 'lib/erl_interface/src/connect')
-rw-r--r-- | lib/erl_interface/src/connect/ei_connect.c | 12 | ||||
-rw-r--r-- | lib/erl_interface/src/connect/ei_connect_int.h | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c index e75c4aadb5..0cbad235cc 100644 --- a/lib/erl_interface/src/connect/ei_connect.c +++ b/lib/erl_interface/src/connect/ei_connect.c @@ -1846,6 +1846,7 @@ static int send_name_or_challenge(ei_socket_callbacks *cbs, const char* function[] = {"SEND_NAME", "SEND_CHALLENGE"}; int err; ssize_t len; + unsigned int flags; if (f_chall) siz += 4; @@ -1867,7 +1868,7 @@ static int send_name_or_challenge(ei_socket_callbacks *cbs, } put8(s, 'n'); put16be(s, version); - put32be(s, (DFLAG_EXTENDED_REFERENCES + flags = (DFLAG_EXTENDED_REFERENCES | DFLAG_DIST_MONITOR | DFLAG_EXTENDED_PIDS_PORTS | DFLAG_FUN_TAGS @@ -1876,7 +1877,14 @@ static int send_name_or_challenge(ei_socket_callbacks *cbs, | DFLAG_SMALL_ATOM_TAGS | DFLAG_UTF8_ATOMS | DFLAG_MAP_TAG - | DFLAG_BIG_CREATION)); + | DFLAG_BIG_CREATION + | DFLAG_EXPORT_PTR_TAG + | DFLAG_BIT_BINARIES); + if (ei_internal_use_21_bitstr_expfun()) { + flags &= ~(DFLAG_EXPORT_PTR_TAG + | DFLAG_BIT_BINARIES); + } + put32be(s, flags); if (f_chall) put32be(s, challenge); memcpy(s, nodename, strlen(nodename)); diff --git a/lib/erl_interface/src/connect/ei_connect_int.h b/lib/erl_interface/src/connect/ei_connect_int.h index 0bcccaa84b..b41a5f2b23 100644 --- a/lib/erl_interface/src/connect/ei_connect_int.h +++ b/lib/erl_interface/src/connect/ei_connect_int.h @@ -102,6 +102,8 @@ extern int h_errno; #define DFLAG_FUN_TAGS 16 #define DFLAG_NEW_FUN_TAGS 0x80 #define DFLAG_EXTENDED_PIDS_PORTS 0x100 +#define DFLAG_EXPORT_PTR_TAG 0x200 +#define DFLAG_BIT_BINARIES 0x400 #define DFLAG_NEW_FLOATS 0x800 #define DFLAG_SMALL_ATOM_TAGS 0x4000 #define DFLAG_UTF8_ATOMS 0x10000 |