aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/server
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-07-01 14:52:44 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-07-01 14:52:44 -0700
commit8a187099ec8accf4f4b9c1bcea0a71d023f6389b (patch)
treeae197d56afaf80aff6a1cb6dba715dba665572bf /src/cpp/server
parentd7d9ce27c523798384051246e18e3f00b29dd8c9 (diff)
parentf8c63562c1388262c5588e381c05cb0c02e5b406 (diff)
Merge branch 'master' of github.com:grpc/grpc into decompression
# Conflicts: # Makefile # gRPC.podspec # src/core/surface/call.c # src/core/transport/chttp2/frame_data.c # tools/doxygen/Doxyfile.core.internal # vsprojects/Grpc.mak
Diffstat (limited to 'src/cpp/server')
-rw-r--r--src/cpp/server/insecure_server_credentials.cc3
-rw-r--r--src/cpp/server/server.cc8
-rw-r--r--src/cpp/server/server_credentials.cc2
3 files changed, 7 insertions, 6 deletions
diff --git a/src/cpp/server/insecure_server_credentials.cc b/src/cpp/server/insecure_server_credentials.cc
index 55dd90d7a7..aca3568e59 100644
--- a/src/cpp/server/insecure_server_credentials.cc
+++ b/src/cpp/server/insecure_server_credentials.cc
@@ -31,9 +31,10 @@
*
*/
-#include <grpc/grpc_security.h>
#include <grpc++/server_credentials.h>
+#include <grpc/grpc.h>
+
namespace grpc {
namespace {
class InsecureServerCredentialsImpl GRPC_FINAL : public ServerCredentials {
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc
index 31b6a0ee00..1437b2dea7 100644
--- a/src/cpp/server/server.cc
+++ b/src/cpp/server/server.cc
@@ -35,7 +35,6 @@
#include <utility>
#include <grpc/grpc.h>
-#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc++/completion_queue.h>
@@ -368,8 +367,11 @@ Server::GenericAsyncRequest::GenericAsyncRequest(
bool Server::GenericAsyncRequest::FinalizeResult(void** tag, bool* status) {
// TODO(yangg) remove the copy here.
- static_cast<GenericServerContext*>(context_)->method_ = call_details_.method;
- static_cast<GenericServerContext*>(context_)->host_ = call_details_.host;
+ if (*status) {
+ static_cast<GenericServerContext*>(context_)->method_ =
+ call_details_.method;
+ static_cast<GenericServerContext*>(context_)->host_ = call_details_.host;
+ }
gpr_free(call_details_.method);
gpr_free(call_details_.host);
return BaseAsyncRequest::FinalizeResult(tag, status);
diff --git a/src/cpp/server/server_credentials.cc b/src/cpp/server/server_credentials.cc
index 6bdb465baa..be3a7425e0 100644
--- a/src/cpp/server/server_credentials.cc
+++ b/src/cpp/server/server_credentials.cc
@@ -31,8 +31,6 @@
*
*/
-#include <grpc/grpc_security.h>
-
#include <grpc++/server_credentials.h>
namespace grpc {