aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-05-23 09:47:23 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-05-23 19:06:32 -0700
commita6e8d0ba24a684713b879eb18e7ce5313f8030cf (patch)
tree649fd6f15bcf69271c7dbf927b8e9bc03bdd3f82
parentb5f6c1bc46137cdc65b333ba9b32889634e39d55 (diff)
clang-format and yapf_code
-rw-r--r--src/core/lib/iomgr/tcp_cfstream.cc13
-rwxr-xr-xtools/run_tests/sanity/core_banned_functions.py3
2 files changed, 9 insertions, 7 deletions
diff --git a/src/core/lib/iomgr/tcp_cfstream.cc b/src/core/lib/iomgr/tcp_cfstream.cc
index 28957bd67f..d232e78513 100644
--- a/src/core/lib/iomgr/tcp_cfstream.cc
+++ b/src/core/lib/iomgr/tcp_cfstream.cc
@@ -167,9 +167,8 @@ static void ReadAction(void* arg, grpc_error* error) {
grpc_slice_buffer_reset_and_unref_internal(tcp->read_slices);
CFErrorRef stream_error = CFReadStreamCopyError(tcp->read_stream);
if (stream_error != nullptr) {
- error = TCPAnnotateError(GRPC_ERROR_CREATE_FROM_CFERROR(
- stream_error, "Read error"),
- tcp);
+ error = TCPAnnotateError(
+ GRPC_ERROR_CREATE_FROM_CFERROR(stream_error, "Read error"), tcp);
CFRelease(stream_error);
} else {
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Read error");
@@ -209,9 +208,8 @@ static void WriteAction(void* arg, grpc_error* error) {
grpc_slice_buffer_reset_and_unref_internal(tcp->write_slices);
CFErrorRef stream_error = CFWriteStreamCopyError(tcp->write_stream);
if (stream_error != nullptr) {
- error = TCPAnnotateError(GRPC_ERROR_CREATE_FROM_CFERROR(
- stream_error, "write failed."),
- tcp);
+ error = TCPAnnotateError(
+ GRPC_ERROR_CREATE_FROM_CFERROR(stream_error, "write failed."), tcp);
CFRelease(stream_error);
} else {
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("write failed.");
@@ -292,6 +290,9 @@ void TCPShutdown(grpc_endpoint* ep, grpc_error* why) {
CFWriteStreamClose(tcp->write_stream);
tcp->stream_sync->Shutdown(why);
grpc_resource_user_shutdown(tcp->resource_user);
+ if (grpc_tcp_trace.enabled()) {
+ gpr_log(GPR_DEBUG, "tcp:%p shutdown DONE (%p)", tcp, why);
+ }
}
void TCPDestroy(grpc_endpoint* ep) {
diff --git a/tools/run_tests/sanity/core_banned_functions.py b/tools/run_tests/sanity/core_banned_functions.py
index ff136417aa..ae79340975 100755
--- a/tools/run_tests/sanity/core_banned_functions.py
+++ b/tools/run_tests/sanity/core_banned_functions.py
@@ -30,7 +30,8 @@ BANNED_EXCEPT = {
['src/core/lib/slice/slice_buffer.cc'],
'grpc_slice_ref(': ['src/core/lib/slice/slice.cc'],
'grpc_slice_unref(': ['src/core/lib/slice/slice.cc'],
- 'grpc_error_create(': ['src/core/lib/iomgr/error.cc','src/core/lib/iomgr/error_apple.cc'],
+ 'grpc_error_create(':
+ ['src/core/lib/iomgr/error.cc', 'src/core/lib/iomgr/error_apple.cc'],
'grpc_error_ref(': ['src/core/lib/iomgr/error.cc'],
'grpc_error_unref(': ['src/core/lib/iomgr/error.cc'],
'grpc_os_error(': ['src/core/lib/iomgr/error.cc'],