mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-02 21:17:12 +02:00
Change argument of open_port/2 to string in order to shut up the dialyzer
This commit is contained in:
parent
2434be4803
commit
1994c8a174
|
@ -110,7 +110,7 @@ init() ->
|
||||||
ok -> ok;
|
ok -> ok;
|
||||||
{error, already_loaded} -> ok
|
{error, already_loaded} -> ok
|
||||||
end,
|
end,
|
||||||
Port = open_port({spawn, expat_erl}, [binary]),
|
Port = open_port({spawn, "expat_erl"}, [binary]),
|
||||||
loop(Port).
|
loop(Port).
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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}) ->
|
||||||
|
|
|
@ -52,7 +52,7 @@ init([]) ->
|
||||||
ok -> ok;
|
ok -> ok;
|
||||||
{error, already_loaded} -> ok
|
{error, already_loaded} -> ok
|
||||||
end,
|
end,
|
||||||
Port = open_port({spawn, iconv_erl}, []),
|
Port = open_port({spawn, "iconv_erl"}, []),
|
||||||
ets:new(iconv_table, [set, public, named_table]),
|
ets:new(iconv_table, [set, public, named_table]),
|
||||||
ets:insert(iconv_table, {port, Port}),
|
ets:insert(iconv_table, {port, Port}),
|
||||||
{ok, Port}.
|
{ok, Port}.
|
||||||
|
|
|
@ -47,7 +47,7 @@ start() ->
|
||||||
end,
|
end,
|
||||||
case Res of
|
case Res of
|
||||||
ok ->
|
ok ->
|
||||||
Port = open_port({spawn, ?DRIVER}, [binary]),
|
Port = open_port({spawn, atom_to_list(?DRIVER)}, [binary]),
|
||||||
register(?DRIVER, Port);
|
register(?DRIVER, Port);
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
?CRITICAL_MSG("unable to load driver '~s': ~s",
|
?CRITICAL_MSG("unable to load driver '~s': ~s",
|
||||||
|
|
|
@ -60,7 +60,7 @@ init([]) ->
|
||||||
ok -> ok;
|
ok -> ok;
|
||||||
{error, already_loaded} -> ok
|
{error, already_loaded} -> ok
|
||||||
end,
|
end,
|
||||||
Port = open_port({spawn, stringprep_drv}, []),
|
Port = open_port({spawn, "stringprep_drv"}, []),
|
||||||
register(?STRINGPREP_PORT, Port),
|
register(?STRINGPREP_PORT, Port),
|
||||||
{ok, Port}.
|
{ok, Port}.
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,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>> ->
|
||||||
|
@ -130,7 +130,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 ->
|
||||||
|
@ -267,7 +267,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]),
|
||||||
|
|
|
@ -99,7 +99,7 @@ new(CallbackPid) ->
|
||||||
new(CallbackPid, infinity).
|
new(CallbackPid, infinity).
|
||||||
|
|
||||||
new(CallbackPid, MaxSize) ->
|
new(CallbackPid, MaxSize) ->
|
||||||
Port = open_port({spawn, expat_erl}, [binary]),
|
Port = open_port({spawn, "expat_erl"}, [binary]),
|
||||||
#xml_stream_state{callback_pid = CallbackPid,
|
#xml_stream_state{callback_pid = CallbackPid,
|
||||||
port = Port,
|
port = Port,
|
||||||
stack = [],
|
stack = [],
|
||||||
|
@ -140,7 +140,7 @@ close(#xml_stream_state{port = Port}) ->
|
||||||
|
|
||||||
|
|
||||||
parse_element(Str) ->
|
parse_element(Str) ->
|
||||||
Port = open_port({spawn, expat_erl}, [binary]),
|
Port = open_port({spawn, "expat_erl"}, [binary]),
|
||||||
Res = port_control(Port, ?PARSE_FINAL_COMMAND, Str),
|
Res = port_control(Port, ?PARSE_FINAL_COMMAND, Str),
|
||||||
port_close(Port),
|
port_close(Port),
|
||||||
process_element_events(binary_to_term(Res)).
|
process_element_events(binary_to_term(Res)).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user