diff options
author | Yang Gao <yangg@google.com> | 2015-09-30 09:31:35 -0700 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-09-30 09:31:35 -0700 |
commit | 74abf42096ea961520fdc6cc465997ab909b9586 (patch) | |
tree | 3a9ee0537dff3a5a8d700d6f95feefb6a6dc24bd /src/cpp/server | |
parent | 6d1e18c649842a8fad30bdc02bc7607bff947cd3 (diff) | |
parent | e547bdf4d7abf46dc8bc7b9364a02c39fb597c9e (diff) |
Merge pull request #3570 from vjpai/gcc44_fixes
Fixes to bring code back into gcc4.4 compliance
Diffstat (limited to 'src/cpp/server')
-rw-r--r-- | src/cpp/server/secure_server_credentials.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/cpp/server/secure_server_credentials.cc b/src/cpp/server/secure_server_credentials.cc index 90afebfd2e..7c828cb125 100644 --- a/src/cpp/server/secure_server_credentials.cc +++ b/src/cpp/server/secure_server_credentials.cc @@ -52,7 +52,7 @@ void AuthMetadataProcessorAyncWrapper::Process( void* wrapper, grpc_auth_context* context, const grpc_metadata* md, size_t num_md, grpc_process_auth_metadata_done_cb cb, void* user_data) { auto* w = reinterpret_cast<AuthMetadataProcessorAyncWrapper*>(wrapper); - if (w->processor_ == nullptr) { + if (!w->processor_) { // Early exit. cb(user_data, nullptr, 0, nullptr, 0, GRPC_STATUS_OK, nullptr); return; @@ -86,20 +86,22 @@ void AuthMetadataProcessorAyncWrapper::InvokeProcessor( std::vector<grpc_metadata> consumed_md; for (auto it = consumed_metadata.begin(); it != consumed_metadata.end(); ++it) { - consumed_md.push_back({it->first.c_str(), - it->second.data(), - it->second.size(), - 0, - {{nullptr, nullptr, nullptr, nullptr}}}); + grpc_metadata md_entry; + md_entry.key = it->first.c_str(); + md_entry.value = it->second.data(); + md_entry.value_length = it->second.size(); + md_entry.flags = 0; + consumed_md.push_back(md_entry); } std::vector<grpc_metadata> response_md; for (auto it = response_metadata.begin(); it != response_metadata.end(); ++it) { - response_md.push_back({it->first.c_str(), - it->second.data(), - it->second.size(), - 0, - {{nullptr, nullptr, nullptr, nullptr}}}); + grpc_metadata md_entry; + md_entry.key = it->first.c_str(); + md_entry.value = it->second.data(); + md_entry.value_length = it->second.size(); + md_entry.flags = 0; + response_md.push_back(md_entry); } auto consumed_md_data = consumed_md.empty() ? nullptr : &consumed_md[0]; auto response_md_data = response_md.empty() ? nullptr : &response_md[0]; |