diff options
author | Loïc Hoguin <[email protected]> | 2019-03-10 10:59:20 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-03-10 10:59:20 +0100 |
commit | 729fe50b9c2c6e52acd33a43c52f3f15a24769e3 (patch) | |
tree | 34dff0310ec379e1f3404a02598e0c8746b5f084 | |
parent | bdf7e746f05112f4cc6dfea0fc59ec5a55797b28 (diff) | |
download | ct_helper-729fe50b9c2c6e52acd33a43c52f3f15a24769e3.tar.gz ct_helper-729fe50b9c2c6e52acd33a43c52f3f15a24769e3.tar.bz2 ct_helper-729fe50b9c2c6e52acd33a43c52f3f15a24769e3.zip |
Properly use the -if statement to work with older releases
-rw-r--r-- | src/ct_helper.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ct_helper.erl b/src/ct_helper.erl index 58fff09..8a08a50 100644 --- a/src/ct_helper.erl +++ b/src/ct_helper.erl @@ -144,6 +144,7 @@ get_remote_pid_tls(Socket) -> TLSPid = get_remote_pid_tcp(ssl:sockname(Socket)), get_tls_state(TLSPid). +-ifdef(OTP_RELEASE). -if(?OTP_RELEASE >= 22). get_tls_state(TLSPid) -> {_, #state{connection_env=#connection_env{user_application={_, UserPid}}}} = sys:get_state(TLSPid), @@ -153,6 +154,11 @@ get_tls_state(TLSPid) -> {_, #state{user_application={_, UserPid}}} = sys:get_state(TLSPid), UserPid. -endif. +-else. +get_tls_state(TLSPid) -> + {_, #state{user_application={_, UserPid}}} = sys:get_state(TLSPid), + UserPid. +-endif. %% @doc Ignore crashes from Pid occuring in M:F/A. |