ei_rpc vs. erl_rpc
Peter Strand
d98peter@REDACTED
Fri Dec 6 18:14:05 CET 2002
Hi,
I'm playing around a bit with erl_interface and have some
trouble with the ei_rpc function, it failes with -1 and
erl_errno == EIO when used as follows:
ei_cnode ec;
int fd, n;
ei_x_buff x, x2;
ei_init();
ei_connect_init(&ec, "test", "cookie", 2);
fd = ei_connect(&ec, "foo@REDACTED");
ei_x_new(&x); ei_x_new(&x2);
ei_x_format(&x, "[]");
ei_rpc(&ec, fd, "net_adm", "localhost", x.buff, x.index, &x2);
Am I doing anything wrong here?
If I strace the server it seems to close the connection right
after rpc-request is received..
However, this works just fine:
int fd;
ETERM *args;
erl_init(0,0);
erl_connect_init(1, "cookie", 2);
fd = erl_connect("foo@REDACTED");
args = erl_format("[]");
erl_rpc(fd, "net_adm", "localhost", args);
/Peter
More information about the erlang-questions
mailing list