-
Notifications
You must be signed in to change notification settings - Fork 6
PS-10045: fix compiler warnings in kmipcore/kmipclient and tighten ma… #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,24 +72,24 @@ namespace kmipclient { | |
| } | ||
|
|
||
| KmipClient::KmipClient( | ||
| NetClient &net_client, | ||
| NetClient &transport, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to be just name change? was there a conflict with the variable name? net_client used elsewehre? |
||
| const std::shared_ptr<kmipcore::Logger> &logger, | ||
| kmipcore::ProtocolVersion version, | ||
| bool close_on_destroy | ||
| ) | ||
| : net_client(&net_client), | ||
| io(std::make_unique<IOUtils>(net_client, logger)), | ||
| : net_client(&transport), | ||
| io(std::make_unique<IOUtils>(transport, logger)), | ||
| version_(version), | ||
| close_on_destroy_(close_on_destroy) {}; | ||
|
|
||
| KmipClient::KmipClient( | ||
| std::shared_ptr<NetClient> net_client, | ||
| std::shared_ptr<NetClient> transport, | ||
| const std::shared_ptr<kmipcore::Logger> &logger, | ||
| kmipcore::ProtocolVersion version, | ||
| bool close_on_destroy | ||
| ) | ||
| : net_client(net_client.get()), | ||
| net_client_owner_(std::move(net_client)), | ||
| : net_client(transport.get()), | ||
| net_client_owner_(std::move(transport)), | ||
| io(), | ||
| version_(version), | ||
| close_on_destroy_(close_on_destroy) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -428,8 +428,8 @@ namespace kmipclient { | |
| configure_tls_verification(new_ctx.get(), ssl, m_host, m_tls_verification); | ||
|
|
||
| SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); | ||
| BIO_set_conn_hostname(new_bio.get(), m_host.c_str()); | ||
| BIO_set_conn_port(new_bio.get(), m_port.c_str()); | ||
| BIO_set_conn_hostname(new_bio.get(), m_host.data()); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how does it know to use how many bytes without explicit length being passed? |
||
| BIO_set_conn_port(new_bio.get(), m_port.data()); | ||
|
|
||
| if (m_timeout_ms > 0) { | ||
| if (BIO_set_nbio(new_bio.get(), 1) != 1) { | ||
|
|
@@ -443,7 +443,7 @@ namespace kmipclient { | |
| std::chrono::milliseconds(m_timeout_ms); | ||
| for (;;) { | ||
| ERR_clear_error(); | ||
| const int connect_ret = BIO_do_connect(new_bio.get()); | ||
| const auto connect_ret = BIO_do_connect(new_bio.get()); | ||
| if (connect_ret == 1) { | ||
| break; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the jump from 1 to 3? skipping 2