diff options
author | Craig Tiller <ctiller@google.com> | 2016-06-03 11:29:55 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-06-03 11:29:55 -0700 |
commit | f5f290459a04a4d5afb555e7b6d7ccb23646e427 (patch) | |
tree | c86b46b93ea9b63845e60f6d058f9e84aa792e24 /src/core/ext/transport/chttp2 | |
parent | a65475c9f32c4ec1abf2c888012a7d4e346ddecc (diff) |
Fix up some server setup bugs
Diffstat (limited to 'src/core/ext/transport/chttp2')
-rw-r--r-- | src/core/ext/transport/chttp2/server/insecure/server_chttp2.c | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index c06d3eb60a..2bcb295a05 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -152,6 +152,11 @@ error: } port_num = 0; + const char *msg = grpc_error_string(err); + gpr_log(GPR_ERROR, "%s", msg); + grpc_error_free_string(msg); + GRPC_ERROR_UNREF(err); + done: grpc_exec_ctx_finish(&exec_ctx); if (errors != NULL) { @@ -159,7 +164,6 @@ done: GRPC_ERROR_UNREF(errors[i]); } } - GRPC_ERROR_UNREF(err); gpr_free(errors); return port_num; } diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 2a50dd4c15..77947b52ab 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -188,7 +188,11 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, 3, (server, addr, creds)); /* create security context */ - if (creds == NULL) goto error; + if (creds == NULL) { + err = GRPC_ERROR_CREATE( + "No credentials specified for secure server port (creds==NULL)"); + goto error; + } status = grpc_server_credentials_create_security_connector(creds, &sc); if (status != GRPC_SECURITY_OK) { char *msg; |