Question about ei_x_encode_atom

Salonee Sinha Roy ssroy1979@REDACTED
Tue Jun 16 04:46:02 CEST 2009


Hi All
I have written a port driver which has the following snippet of code in the
control method. I think that ei_x_encode_atom does not work properly. Any
help would be appreciated.


ei_x_buff  x_buff;
ei_set_compat_rel(rel);
ei_x_new_with_version(&x_buff);
ret = 0
ei_x_encode_atom(&x_buff,"failed");
*rbuf = (char*)ei_x_to_new_binary(&x_buff);
ei_x_free(&x_buff);
return ret;


The erlang code is
binary_to_term(control(?COMPOSE,list_to_binary(Txtfile))).

I get the following error
compmagick:compose("/home/owner/Desktop/erlang/yaws/mask/www/resources/temp_files/5HHA3atk.txt").

** exception exit: badarg
     in function  port_control/3
        called as port_control(#Port<0.418>,1,

<<"/home/owner/Desktop/erlang/yaws/mask/www/resources/temp_files/5HHA3atk.txt">>)
     in call from compmagick:control/2
     in call from compmagick:compose/1


More information about the erlang-questions mailing list