diff options
-rw-r--r-- | include/grpc++/security/auth_metadata_processor.h | 2 | ||||
-rw-r--r-- | include/grpc++/security/credentials.h | 2 | ||||
-rw-r--r-- | src/core/channel/channel_args.h | 2 | ||||
-rw-r--r-- | src/core/iomgr/tcp_client_windows.c | 4 | ||||
-rw-r--r-- | src/core/iomgr/tcp_server_windows.c | 8 | ||||
-rw-r--r-- | src/cpp/client/secure_credentials.cc | 2 | ||||
-rw-r--r-- | test/cpp/end2end/end2end_test.cc | 8 |
7 files changed, 14 insertions, 14 deletions
diff --git a/include/grpc++/security/auth_metadata_processor.h b/include/grpc++/security/auth_metadata_processor.h index 18ad922321..9b9c06e3b6 100644 --- a/include/grpc++/security/auth_metadata_processor.h +++ b/include/grpc++/security/auth_metadata_processor.h @@ -45,7 +45,7 @@ namespace grpc { class AuthMetadataProcessor { public: typedef std::multimap<grpc::string_ref, grpc::string_ref> InputMetadata; - typedef std::multimap<grpc::string, grpc::string_ref> OutputMetadata; + typedef std::multimap<grpc::string, grpc::string> OutputMetadata; virtual ~AuthMetadataProcessor() {} diff --git a/include/grpc++/security/credentials.h b/include/grpc++/security/credentials.h index fafcfdc906..ff41bc597e 100644 --- a/include/grpc++/security/credentials.h +++ b/include/grpc++/security/credentials.h @@ -180,7 +180,7 @@ class MetadataCredentialsPlugin { // Gets the auth metatada produced by this plugin. virtual Status GetMetadata( grpc::string_ref service_url, - std::multimap<grpc::string, grpc::string_ref>* metadata) = 0; + std::multimap<grpc::string, grpc::string>* metadata) = 0; }; std::shared_ptr<Credentials> MetadataCredentialsFromPlugin( diff --git a/src/core/channel/channel_args.h b/src/core/channel/channel_args.h index f9e7b05860..480cc9aec2 100644 --- a/src/core/channel/channel_args.h +++ b/src/core/channel/channel_args.h @@ -71,7 +71,7 @@ grpc_channel_args *grpc_channel_args_set_compression_algorithm( * compression algorithms are enabled. It's an error to disable an algorithm set * by grpc_channel_args_set_compression_algorithm. * - * Returns an instance will the updated algorithm states. The \a a pointer is + * Returns an instance with the updated algorithm states. The \a a pointer is * modified to point to the returned instance (which may be different from the * input value of \a a). */ grpc_channel_args *grpc_channel_args_compression_algorithm_set_state( diff --git a/src/core/iomgr/tcp_client_windows.c b/src/core/iomgr/tcp_client_windows.c index 28f1bc96c8..73aeec3f4f 100644 --- a/src/core/iomgr/tcp_client_windows.c +++ b/src/core/iomgr/tcp_client_windows.c @@ -121,7 +121,7 @@ static void on_connect(void *acp, int from_iocp) { notification request for the connection, and one timeout alert. */ void grpc_tcp_client_connect(void (*cb)(void *arg, grpc_endpoint *tcp), void *arg, grpc_pollset_set *interested_parties, - const struct sockaddr *addr, int addr_len, + const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline) { SOCKET sock = INVALID_SOCKET; BOOL success; @@ -176,7 +176,7 @@ void grpc_tcp_client_connect(void (*cb)(void *arg, grpc_endpoint *tcp), socket = grpc_winsocket_create(sock, "client"); info = &socket->write_info; - success = ConnectEx(sock, addr, addr_len, NULL, 0, NULL, &info->overlapped); + success = ConnectEx(sock, addr, (int)addr_len, NULL, 0, NULL, &info->overlapped); /* It wouldn't be unusual to get a success immediately. But we'll still get an IOCP notification, so let's ignore it. */ diff --git a/src/core/iomgr/tcp_server_windows.c b/src/core/iomgr/tcp_server_windows.c index be2c0055db..42ab24696b 100644 --- a/src/core/iomgr/tcp_server_windows.c +++ b/src/core/iomgr/tcp_server_windows.c @@ -155,7 +155,7 @@ void grpc_tcp_server_destroy(grpc_tcp_server *s, /* Prepare (bind) a recently-created socket for listening. */ static int prepare_socket(SOCKET sock, const struct sockaddr *addr, - int addr_len) { + size_t addr_len) { struct sockaddr_storage sockname_temp; socklen_t sockname_len; @@ -168,7 +168,7 @@ static int prepare_socket(SOCKET sock, const struct sockaddr *addr, goto error; } - if (bind(sock, addr, addr_len) == SOCKET_ERROR) { + if (bind(sock, addr, (int)addr_len) == SOCKET_ERROR) { char *addr_str; char *utf8_message = gpr_format_message(WSAGetLastError()); grpc_sockaddr_to_string(&addr_str, addr, 0); @@ -355,7 +355,7 @@ static void on_accept(void *arg, int from_iocp) { } static int add_socket_to_server(grpc_tcp_server *s, SOCKET sock, - const struct sockaddr *addr, int addr_len) { + const struct sockaddr *addr, size_t addr_len) { server_port *sp; int port; int status; @@ -402,7 +402,7 @@ static int add_socket_to_server(grpc_tcp_server *s, SOCKET sock, } int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, - int addr_len) { + size_t addr_len) { int allocated_port = -1; unsigned i; SOCKET sock; diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 99b7468e86..1693cf740b 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -173,7 +173,7 @@ void MetadataCredentialsPluginWrapper::GetMetadata( void MetadataCredentialsPluginWrapper::InvokePlugin( const char* service_url, grpc_credentials_plugin_metadata_cb cb, void* user_data) { - std::multimap<grpc::string, grpc::string_ref> metadata; + std::multimap<grpc::string, grpc::string> metadata; Status status = plugin_->GetMetadata(service_url, &metadata); std::vector<grpc_metadata> md; for (auto it = metadata.begin(); it != metadata.end(); ++it) { diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 7f047998c3..2659b0e213 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -121,7 +121,7 @@ class TestMetadataCredentialsPlugin : public MetadataCredentialsPlugin { bool IsBlocking() const GRPC_OVERRIDE { return is_blocking_; } Status GetMetadata(grpc::string_ref service_url, - std::multimap<grpc::string, grpc::string_ref>* metadata) + std::multimap<grpc::string, grpc::string>* metadata) GRPC_OVERRIDE { EXPECT_GT(service_url.length(), 0UL); EXPECT_TRUE(metadata != nullptr); @@ -175,9 +175,9 @@ class TestAuthMetadataProcessor : public AuthMetadataProcessor { if (auth_md_value == kGoodGuy) { context->AddProperty(kIdentityPropName, kGoodGuy); context->SetPeerIdentityPropertyName(kIdentityPropName); - consumed_auth_metadata->insert( - std::make_pair(string(auth_md->first.data(), auth_md->first.length()), - auth_md->second)); + consumed_auth_metadata->insert(std::make_pair( + string(auth_md->first.data(), auth_md->first.length()), + string(auth_md->second.data(), auth_md->second.length()))); return Status::OK; } else { return Status(StatusCode::UNAUTHENTICATED, |