From 4fd7ec27f5b81726ded44c27475a1133885d8f44 Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 18 Jun 2010 12:07:08 +0200 Subject: [PATCH] OTP doc says the Command in the open_port spawn tuple must be string() --- src/ejabberd_zlib/ejabberd_zlib.erl | 4 ++-- src/tls/tls.erl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ejabberd_zlib/ejabberd_zlib.erl b/src/ejabberd_zlib/ejabberd_zlib.erl index 663640c42..22a121d14 100644 --- a/src/ejabberd_zlib/ejabberd_zlib.erl +++ b/src/ejabberd_zlib/ejabberd_zlib.erl @@ -63,7 +63,7 @@ init([]) -> ok -> ok; {error, already_loaded} -> ok end, - Port = open_port({spawn, ejabberd_zlib_drv}, [binary]), + Port = open_port({spawn, "ejabberd_zlib_drv"}, [binary]), {ok, Port}. @@ -99,7 +99,7 @@ enable_zlib(SockMod, Socket) -> ok -> ok; {error, already_loaded} -> ok 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}}. disable_zlib(#zlibsock{sockmod = SockMod, socket = Socket, zlibport = Port}) -> diff --git a/src/tls/tls.erl b/src/tls/tls.erl index 17bd8f286..2b3359aef 100644 --- a/src/tls/tls.erl +++ b/src/tls/tls.erl @@ -74,7 +74,7 @@ init([]) -> ok -> ok; {error, already_loaded} -> ok 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]), case Res of <<0>> -> @@ -120,7 +120,7 @@ tcp_to_tls(TCPSocket, Options) -> ok -> ok; {error, already_loaded} -> ok end, - Port = open_port({spawn, tls_drv}, [binary]), + Port = open_port({spawn, "tls_drv"}, [binary]), Flags = case lists:member(verify_none, Options) of true -> @@ -252,7 +252,7 @@ test() -> ok -> ok; {error, already_loaded} -> ok end, - Port = open_port({spawn, tls_drv}, [binary]), + Port = open_port({spawn, "tls_drv"}, [binary]), ?PRINT("open_port: ~p~n", [Port]), PCRes = port_control(Port, ?SET_CERTIFICATE_FILE_ACCEPT, "./ssl.pem" ++ [0]),