JosiahWI commented on code in PR #11631:
URL: https://github.com/apache/trafficserver/pull/11631#discussion_r1697756276
##########
src/api/InkAPI.cc:
##########
@@ -7921,11 +7921,10 @@ TSVConnTunnel(TSVConn sslp)
TSSslConnection
TSVConnSslConnectionGet(TSVConn sslp)
{
- TSSslConnection ssl = nullptr;
- NetVConnection *vc = reinterpret_cast<NetVConnection *>(sslp);
- SSLNetVConnection *ssl_vc = dynamic_cast<SSLNetVConnection *>(vc);
- if (ssl_vc != nullptr) {
- ssl = reinterpret_cast<TSSslConnection>(ssl_vc->ssl);
+ TSSslConnection ssl = nullptr;
+ NetVConnection *netvc = reinterpret_cast<NetVConnection *>(sslp);
+ if (auto tbs = netvc->get_service<TLSBasicSupport>(); tbs) {
+ ssl = reinterpret_cast<TSSslConnection>(tbs->get_tls_handle());
Review Comment:
Does this have to be a `reinterpret_cast`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]