diff options
author | Rickard Green <[email protected]> | 2019-03-19 13:22:47 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2019-03-19 13:22:47 +0100 |
commit | ef67e6a44cf1c87b8221cb652995b82ea1c9e728 (patch) | |
tree | 45438da8aa3dda125c4eee6efb3e8f5a61e84dff /lib/erl_interface/src/prog/ei_fake_prog.c | |
parent | dbe7c4610f030997b9c22b3d5a06628933acc6e0 (diff) | |
parent | 543ca376a922c6dbe34e2207c4c512c5f6b5d624 (diff) | |
download | otp-ef67e6a44cf1c87b8221cb652995b82ea1c9e728.tar.gz otp-ef67e6a44cf1c87b8221cb652995b82ea1c9e728.tar.bz2 otp-ef67e6a44cf1c87b8221cb652995b82ea1c9e728.zip |
Merge branch 'rickard/erl_call/ERL-881/OTP-15676' into maint
* rickard/erl_call/ERL-881/OTP-15676:
Add smoke test for erl_call
Add new api functions to ei_fake_prog
Fix timeout value when waiting for emulator start
Fix initialization of erl_call
Diffstat (limited to 'lib/erl_interface/src/prog/ei_fake_prog.c')
-rw-r--r-- | lib/erl_interface/src/prog/ei_fake_prog.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/erl_interface/src/prog/ei_fake_prog.c b/lib/erl_interface/src/prog/ei_fake_prog.c index c7a16dc7c4..158464b385 100644 --- a/lib/erl_interface/src/prog/ei_fake_prog.c +++ b/lib/erl_interface/src/prog/ei_fake_prog.c @@ -98,11 +98,18 @@ int main(void) EI_ULONGLONG ulonglongx = 0; #endif erlang_char_encoding enc; + ei_socket_callbacks cbs; intx = erl_errno; + ei_init(); + + ei_close_connection(intx); + ei_connect_init(&xec, charp, charp, creation); + ei_connect_init_ussi(&xec, charp, charp, creation, &cbs, sizeof(cbs), NULL); ei_connect_xinit (&xec, charp, charp, charp, thisipaddr, charp, creation); + ei_connect_xinit_ussi(&xec, charp, charp, charp, thisipaddr, charp, creation, &cbs, sizeof(cbs), NULL); ei_connect(&xec, charp); ei_xconnect (&xec, thisipaddr, charp); @@ -121,6 +128,8 @@ int main(void) ei_publish(&xec, intx); ei_accept(&xec, intx, &conp); ei_unpublish(&xec); + ei_listen(&xec, intp, intx); + ei_xlisten(&xec, thisipaddr, intp, intx); ei_thisnodename(&xec); ei_thishostname(&xec); @@ -187,7 +196,7 @@ int main(void) ei_decode_char(charp, intp, charp); ei_decode_string(charp, intp, charp); ei_decode_atom(charp, intp, charp); - ei_decode_atom_as(charp, intp, charp, MAXATOMLEN_UTF8, ERLANG_WHATEVER, &enc, &enc); + ei_decode_atom_as(charp, intp, charp, MAXATOMLEN_UTF8, ERLANG_UTF8, &enc, &enc); ei_decode_binary(charp, intp, (void *)0, longp); ei_decode_fun(charp, intp, &efun); free_fun(&efun); |