Questions tagged [erlang-driver]
21 questions
6
votes
1 answer
Short Circuit Erlang Port Mapper Daemon
Given a known TCP port and name for a remote beam.smp service, as well as a known cookie, is it possible to short circuit the Erlang Port Mapper Daemon handshake phase of the Erlang distribution protocol and establish an Erlang shell directly to the…

Anthony Roe
- 143
- 1
- 5
3
votes
2 answers
errors in a loop
Given the following loop on each element of a list:
lists:foldl(fun(X) -> ... end,N,Y),
How to catch the errors and continue to loop on the elements ?
Same question if this code is in a gen_server and if process_flag(trap_exit, true) ?

Bertaud
- 2,888
- 5
- 35
- 48
3
votes
1 answer
What is the best way of doing computationally intensive tasks in Erlang w/o scalability sacrifices?
Erlang Interoperability guide discusses different interoperability mechanisms. Here are my conclusions:
Ports and Erl_Interface programs: OS scheduled, limit scalability.
Port Drivers: dangerous because a crash in the port driver brings…

spc16670
- 504
- 6
- 15
3
votes
0 answers
'Bad Connection Handle' in aerospike ejabberd integration
tried to integrate the Aerospike with Ejabberd, and after little bit of struggle and I had hit another issue which says
" DEBUG:[util_extract_common_lead_parms()]:Connection Handle is bad C(0) DEBUG:[util_extract_common_lead_parms()]:Connection…

LIL
- 51
- 1
2
votes
2 answers
Profiling linked-in drivers in Erlang
How can I profile a linked-in port driver? OTP tools (fprof, etc.) apparently only profile Erlang code, and I don't have a C executable file to feed to gprof.

Alexey Romanov
- 167,066
- 35
- 309
- 487
2
votes
2 answers
Erlang - Parse data from the enclosed curly braces
Erlang experts, I am getting a data like the following from ejabberd server
I(<0.397.0>:mod_http_offline:38) : Data of Fromu {jid,"timok","localhost",
"25636221451404911062246700",
…

Timothy Rajan
- 1,947
- 8
- 38
- 62
1
vote
1 answer
Sending terms instead of iolists to an Erlang driver
Is there an equivalent of driver_output_term in the other direction, i.e. sending an Erlang term to the driver without converting it to an iolist first? If not, I presumably should convert my term using term_to_binary and parse it on the C side with…

Alexey Romanov
- 167,066
- 35
- 309
- 487
1
vote
1 answer
Erlang driver erl_errno issue
I am playing with erl_driver. Start callback of my driver is below:
ErlDrvData drv_start(ErlDrvPort port, char* command) {
char* file_name = command + sizeof(drv_name);
GenTtyData* port_data = (GenTtyData*)driver_alloc(sizeof(GenTtyData));
…

Viacheslav Kovalev
- 1,745
- 12
- 17
1
vote
1 answer
Are there macros which can be used to test Erlang version in driver C code?
Erlang R15B added ErlDrvSSizeT typedef, and R16B added erl_drv_output_term function and deprecated the old equivalent. Is there a way to test for these differences with preprocessor macros in order to support older Erlang versions with the same…

Alexey Romanov
- 167,066
- 35
- 309
- 487
1
vote
0 answers
How to continue last session, after network disconnect?
I am working in android application using ejabberd as a server.I make call to user using VOIP. I disconnected from server when my internet connection goes down.After internet connection come, I need to continue last session,before timeout occurs.I…

BABU K
- 917
- 13
- 35
1
vote
1 answer
Could not install mysql driver Erlang : src/mysql_auth.erl:178: crypto:sha/1 is deprecated and will be removed in in a future
I ve been trying to install mysql driver using https://github.com/dizzyd/erlang-mysql-driver
==> mysql (compile)
compile: warnings being treated as errors
src/mysql_auth.erl:178: crypto:sha/1 is deprecated and will be removed in in a future release;…

channa ly
- 9,479
- 14
- 53
- 86
1
vote
1 answer
How to compile an Erlang driver?
I am trying to better understand how Erlang drivers work, and I started with a simple example from a book, but when I went to compile the C file containing the native Erlang driver code I got the following compile error…

user2864661
- 11
- 1
1
vote
1 answer
How to read erlang term from redis by using java client?
e.g. I save the tuple T = {k1, v1, k2, v2} to the redis by jedis:
eredis:q(Conn, ["SET", <<"mykey">>, term_to_binary(T)]).
I am trying to use the code below to read this erlang term:
Jedis j = Redis.pool.getResource();
byte[] t =…

Mark_H
- 770
- 1
- 6
- 19
1
vote
1 answer
Strange thing about mongodb-erlang driver when using replica set
My code is like this:
Replset = {<<"rs1">>, [{localhost, 27017}, {localhost, 27018}, {localhost, 27019}]},
Conn_Pool = resource_pool:new (mongo:rs_connect_factory(Replset), 10),
...
Conn = resource_pool:get(Conn_Pool)
case mongo:do(safe,…

Mark_H
- 770
- 1
- 6
- 19
1
vote
1 answer
glpkerl (glpk erlang library) compile error
I am trying to compile the glpkerl library on Ubuntu 11.10, but without success so far.
Since I am getting errors all the way, maybe there is something crucial that I am missing:
What I tried
My installed Erlang version is R14B02 (installed via the…

Andor Goetzendorff
- 338
- 2
- 10