Repository: kudu Updated Branches: refs/heads/master fea449ace -> 758cf8b8d
[client, server]_negotiation: replace gscoped_ptr with unique_ptr Change-Id: Ibe0151aeb54af4f54b7dbb8e019127329cdd526b Reviewed-on: http://gerrit.cloudera.org:8080/6136 Reviewed-by: Alexey Serbin <[email protected]> Reviewed-by: Todd Lipcon <[email protected]> Tested-by: Kudu Jenkins Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/f76facd4 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/f76facd4 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/f76facd4 Branch: refs/heads/master Commit: f76facd40f3473733f6c7c7f2f268bb799c44c3b Parents: fea449a Author: Dan Burkert <[email protected]> Authored: Thu Feb 23 13:57:51 2017 -0800 Committer: Dan Burkert <[email protected]> Committed: Fri Feb 24 23:35:39 2017 +0000 ---------------------------------------------------------------------- src/kudu/rpc/client_negotiation.cc | 1 + src/kudu/rpc/client_negotiation.h | 6 +++--- src/kudu/rpc/server_negotiation.h | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/f76facd4/src/kudu/rpc/client_negotiation.cc ---------------------------------------------------------------------- diff --git a/src/kudu/rpc/client_negotiation.cc b/src/kudu/rpc/client_negotiation.cc index 95efa7d..ec27855 100644 --- a/src/kudu/rpc/client_negotiation.cc +++ b/src/kudu/rpc/client_negotiation.cc @@ -111,6 +111,7 @@ ClientNegotiation::ClientNegotiation(unique_ptr<Socket> socket, tls_context_(tls_context), tls_negotiated_(false), authn_token_(authn_token), + psecret_(nullptr, std::free), negotiated_authn_(AuthenticationType::INVALID), negotiated_mech_(SaslMechanism::INVALID), deadline_(MonoTime::Max()) { http://git-wip-us.apache.org/repos/asf/kudu/blob/f76facd4/src/kudu/rpc/client_negotiation.h ---------------------------------------------------------------------- diff --git a/src/kudu/rpc/client_negotiation.h b/src/kudu/rpc/client_negotiation.h index c68e9ec..dc92204 100644 --- a/src/kudu/rpc/client_negotiation.h +++ b/src/kudu/rpc/client_negotiation.h @@ -17,6 +17,7 @@ #pragma once +#include <cstdlib> #include <memory> #include <set> #include <string> @@ -25,7 +26,6 @@ #include <boost/optional.hpp> #include <sasl/sasl.h> -#include "kudu/gutil/gscoped_ptr.h" #include "kudu/rpc/negotiation.h" #include "kudu/rpc/rpc_header.pb.h" #include "kudu/rpc/sasl_common.h" @@ -201,7 +201,7 @@ class ClientNegotiation { // SASL state. std::vector<sasl_callback_t> callbacks_; - gscoped_ptr<sasl_conn_t, SaslDeleter> sasl_conn_; + std::unique_ptr<sasl_conn_t, SaslDeleter> sasl_conn_; SaslHelper helper_; // TLS state. @@ -215,7 +215,7 @@ class ClientNegotiation { // Authentication state. std::string plain_auth_user_; std::string plain_pass_; - gscoped_ptr<sasl_secret_t, FreeDeleter> psecret_; + std::unique_ptr<sasl_secret_t, decltype(std::free)*> psecret_; // The set of features advertised by the client. Filled in when we send // the first message. This is not necessarily constant since some features http://git-wip-us.apache.org/repos/asf/kudu/blob/f76facd4/src/kudu/rpc/server_negotiation.h ---------------------------------------------------------------------- diff --git a/src/kudu/rpc/server_negotiation.h b/src/kudu/rpc/server_negotiation.h index 38202c3..23c9c34 100644 --- a/src/kudu/rpc/server_negotiation.h +++ b/src/kudu/rpc/server_negotiation.h @@ -24,7 +24,6 @@ #include <sasl/sasl.h> -#include "kudu/gutil/gscoped_ptr.h" #include "kudu/rpc/negotiation.h" #include "kudu/rpc/remote_user.h" #include "kudu/rpc/rpc_header.pb.h" @@ -212,7 +211,7 @@ class ServerNegotiation { // SASL state. std::vector<sasl_callback_t> callbacks_; - gscoped_ptr<sasl_conn_t, SaslDeleter> sasl_conn_; + std::unique_ptr<sasl_conn_t, SaslDeleter> sasl_conn_; SaslHelper helper_; // TLS state.
