mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
OTP doc says the Command in the open_port spawn tuple must be string()
This commit is contained in:
parent
19a8b79342
commit
4fd7ec27f5
@ -63,7 +63,7 @@ init([]) ->
|
|||||||
ok -> ok;
|
ok -> ok;
|
||||||
{error, already_loaded} -> ok
|
{error, already_loaded} -> ok
|
||||||
end,
|
end,
|
||||||
Port = open_port({spawn, ejabberd_zlib_drv}, [binary]),
|
Port = open_port({spawn, "ejabberd_zlib_drv"}, [binary]),
|
||||||
{ok, Port}.
|
{ok, Port}.
|
||||||
|
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ enable_zlib(SockMod, Socket) ->
|
|||||||
ok -> ok;
|
ok -> ok;
|
||||||
{error, already_loaded} -> ok
|
{error, already_loaded} -> ok
|
||||||
end,
|
end,
|
||||||
Port = open_port({spawn, ejabberd_zlib_drv}, [binary]),
|
Port = open_port({spawn, "ejabberd_zlib_drv"}, [binary]),
|
||||||
{ok, #zlibsock{sockmod = SockMod, socket = Socket, zlibport = Port}}.
|
{ok, #zlibsock{sockmod = SockMod, socket = Socket, zlibport = Port}}.
|
||||||
|
|
||||||
disable_zlib(#zlibsock{sockmod = SockMod, socket = Socket, zlibport = Port}) ->
|
disable_zlib(#zlibsock{sockmod = SockMod, socket = Socket, zlibport = Port}) ->
|
||||||
|
@ -74,7 +74,7 @@ init([]) ->
|
|||||||
ok -> ok;
|
ok -> ok;
|
||||||
{error, already_loaded} -> ok
|
{error, already_loaded} -> ok
|
||||||
end,
|
end,
|
||||||
Port = open_port({spawn, tls_drv}, [binary]),
|
Port = open_port({spawn, "tls_drv"}, [binary]),
|
||||||
Res = port_control(Port, ?SET_CERTIFICATE_FILE_ACCEPT, "./ssl.pem" ++ [0]),
|
Res = port_control(Port, ?SET_CERTIFICATE_FILE_ACCEPT, "./ssl.pem" ++ [0]),
|
||||||
case Res of
|
case Res of
|
||||||
<<0>> ->
|
<<0>> ->
|
||||||
@ -120,7 +120,7 @@ tcp_to_tls(TCPSocket, Options) ->
|
|||||||
ok -> ok;
|
ok -> ok;
|
||||||
{error, already_loaded} -> ok
|
{error, already_loaded} -> ok
|
||||||
end,
|
end,
|
||||||
Port = open_port({spawn, tls_drv}, [binary]),
|
Port = open_port({spawn, "tls_drv"}, [binary]),
|
||||||
Flags =
|
Flags =
|
||||||
case lists:member(verify_none, Options) of
|
case lists:member(verify_none, Options) of
|
||||||
true ->
|
true ->
|
||||||
@ -252,7 +252,7 @@ test() ->
|
|||||||
ok -> ok;
|
ok -> ok;
|
||||||
{error, already_loaded} -> ok
|
{error, already_loaded} -> ok
|
||||||
end,
|
end,
|
||||||
Port = open_port({spawn, tls_drv}, [binary]),
|
Port = open_port({spawn, "tls_drv"}, [binary]),
|
||||||
?PRINT("open_port: ~p~n", [Port]),
|
?PRINT("open_port: ~p~n", [Port]),
|
||||||
PCRes = port_control(Port, ?SET_CERTIFICATE_FILE_ACCEPT,
|
PCRes = port_control(Port, ?SET_CERTIFICATE_FILE_ACCEPT,
|
||||||
"./ssl.pem" ++ [0]),
|
"./ssl.pem" ++ [0]),
|
||||||
|
Loading…
Reference in New Issue
Block a user