summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-03-14 14:16:07 +0100
committerLoïc Hoguin <[email protected]>2019-03-14 14:16:07 +0100
commit2d982bc31f58ba09783af3f89af47c36153de431 (patch)
tree2e206b27de105e26c93211a28fbf922424c07488
parent729fe50b9c2c6e52acd33a43c52f3f15a24769e3 (diff)
downloadct_helper-2d982bc31f58ba09783af3f89af47c36153de431.tar.gz
ct_helper-2d982bc31f58ba09783af3f89af47c36153de431.tar.bz2
ct_helper-2d982bc31f58ba09783af3f89af47c36153de431.zip
Support OTP-21.3
-rw-r--r--src/ct_helper.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ct_helper.erl b/src/ct_helper.erl
index 8a08a50..044d4f4 100644
--- a/src/ct_helper.erl
+++ b/src/ct_helper.erl
@@ -150,10 +150,17 @@ get_tls_state(TLSPid) ->
{_, #state{connection_env=#connection_env{user_application={_, UserPid}}}} = sys:get_state(TLSPid),
UserPid.
-else.
+%% This is defined in ssl_record.hrl starting from OTP-21.3.
+-ifdef(KNOWN_RECORD_TYPE).
+get_tls_state(TLSPid) ->
+ {_, #state{connection_env=#connection_env{user_application={_, UserPid}}}} = sys:get_state(TLSPid),
+ UserPid.
+-else.
get_tls_state(TLSPid) ->
{_, #state{user_application={_, UserPid}}} = sys:get_state(TLSPid),
UserPid.
-endif.
+-endif.
-else.
get_tls_state(TLSPid) ->
{_, #state{user_application={_, UserPid}}} = sys:get_state(TLSPid),