Merge branch 'master' into server_channel_affinity

pull/6149/head
Sree Kuchibhotla 9 years ago
commit 020cdb8b21
  1. 69
      Makefile
  2. 15
      build.yaml
  3. 2
      include/grpc/support/string_util.h
  4. 883
      package.json
  5. 364
      src/compiler/cpp_generator.cc
  6. 93
      src/compiler/cpp_generator.h
  7. 117
      src/compiler/cpp_plugin.cc
  8. 4
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  9. 2
      src/core/lib/iomgr/tcp_server_posix.c
  10. 2
      src/core/lib/iomgr/tcp_server_windows.c
  11. 2
      src/core/lib/iomgr/udp_server.c
  12. 1
      src/core/lib/profiling/basic_timers.c
  13. 2
      src/core/lib/support/alloc.c
  14. 1
      src/core/lib/support/log_linux.c
  15. 1
      src/core/lib/support/thd_posix.c
  16. 6
      src/core/lib/surface/byte_buffer.c
  17. 22
      src/core/lib/tsi/fake_transport_security.c
  18. 69
      src/core/lib/tsi/ssl_transport_security.c
  19. 38
      src/core/lib/tsi/transport_security.c
  20. 22
      templates/package.json.template
  21. 8
      templates/tools/fuzzer/runners.template
  22. 160
      test/core/end2end/fuzzers/client_fuzzer.c
  23. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/001946397b463a3562c5951f6325069d8a3a2ded
  24. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/01b05a9eaa95950f697627264bbd5006060f68e5
  25. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/01c9569f5835a576fc50ea03141662c7ef1aa088
  26. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/03abf728ac1d833c2d4a9ff7e0c912b949edc04c
  27. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/078232947d7ff25557e836b4e9e907214e99b320
  28. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/0949f4ac376808482be6ab2dcb18a2ecb08d9a52
  29. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/0c5e0660ddf5f14af8f3fbcc754a967506994c9b
  30. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/0d36da88698737ec1ca7b55b30fe2b2036de7e19
  31. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/0dd33527db106a3e84172e8f2189734b00ced4ed
  32. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/0e354d89d02c6c5cbba2f140dab7b609bf00793e
  33. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1402bbcac6fa24eeb0475250e33f704096e2fb45
  34. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1602788cf33d0354d6d48ead549e5137cd211979
  35. 2
      test/core/end2end/fuzzers/client_fuzzer_corpus/18185cbf9e9cfc1fd28d27ed0d651d7cee6a2c06
  36. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/18850965807039500c7f5450a907e86825cf823d
  37. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/18926cdc608599e8df6b0f4df99d4ad856ef4373
  38. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/19e984af62c36fe982284c87421d8ee46173e9f0
  39. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1c222dae4e2cde1fca9f9bf6226200f70d625342
  40. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1cbcaad71950c62d41bab50f9c242d014cc0d904
  41. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1d19042e6db2a90c52fcc3cb0aa76f2fd335014e
  42. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1fe7d16ffc2084d5d3c5f23d16902ae8810a5393
  43. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/20539e464ced1a0a63d74bae731ca0a75db05967
  44. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/207e12d6a84dc8fa020b3a60b3f75932ca4f8fa5
  45. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/20ea73876cc9cd5b3d3efa1bda21deb5eac2d61e
  46. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/21a6a133f3d1e06c077032ba56a7df4161f62efe
  47. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/230527b90b0179139c961aca426187893191fdf2
  48. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/25761748660a64111a8daa46f72ea1f336c2046a
  49. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/25949b623930511f9d43fea4aa56a4389a28e11a
  50. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/26b8a9d27cef1ce4c3c5aefa2dee50001aab4b13
  51. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/29952a15459cce9c647255ab5d7486df0507eff4
  52. 2
      test/core/end2end/fuzzers/client_fuzzer_corpus/2a8260b23460f90f770cedcafa14868d24db201e
  53. 2
      test/core/end2end/fuzzers/client_fuzzer_corpus/2b71439e9ebf611a92386b9f21ad44bde7926184
  54. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/2c342f8715556398d49bcf3343b5a249d968e19e
  55. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/2c79128c697b53256c56b9c57c7259866e0e2347
  56. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/2d83097b3cbd2245b085e749fe923fb590790e0c
  57. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/2deb1aeb93c2abca4177b1fe886eb354c83fe8af
  58. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/2e9860242d55a74cec244bb5c5445eb2797a3157
  59. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/2f288409c5f3cf2a10b3e1970a9c3d037dabe080
  60. 2
      test/core/end2end/fuzzers/client_fuzzer_corpus/2f5f6d281a3d0473a04a17cbcbc6fd06cb73fd8b
  61. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/301e10bb6d9f60d91efde4e0c48893203a5b8b88
  62. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/3128887b8e02f1873ed6b36766a870543269ea00
  63. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/31d12a2b1378120d15b4097371d792daa95de0a9
  64. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/320dc10f64b59b0eb0ae140912eded1ef9276556
  65. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/333d0554d91872e693d118d6988132d95b7920ae
  66. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/33c32a80db0ec311ee8744991c5b19345bfd8fe9
  67. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/35fbd748458e3fd6068957d46a9fbb2b0113d2b3
  68. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/370b2c16cc353621091eda4964d4c4329205ffc3
  69. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/379b177d55b1eb86ddb66dc3a037fd8283ee07c0
  70. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/3a01c85934363bd2067f76d0d40c491f9f846c8a
  71. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/3ae87e3150628c422ada13002b08f2d9c5a9d78e
  72. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/3afbc4c35885b79c6e6628afce93ce852d7767de
  73. 2
      test/core/end2end/fuzzers/client_fuzzer_corpus/3c7b516e302ad3503a933b5dcfb8c58acaea07a0
  74. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/3da7577acd806e1d92d48211b22fd9db352fd834
  75. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/3fcc2da89f438b247cb5b4b41e15aceccfa75b36
  76. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/4040224f3df361afe45bce682d56d26f13829413
  77. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/41aad2f11a7ab418213352e84de872d9997db8d2
  78. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/42554ddbe59429d30d718282ca606ed8b5a90eb3
  79. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/43202ad9b1a689d919ab9ae91c2d0223394867bf
  80. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/44d64196fb2e8d9506734a81304f6ef17b9bc29d
  81. 2
      test/core/end2end/fuzzers/client_fuzzer_corpus/44f0973ec77d6fb9eac931e84fa7ec6fdadccca6
  82. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/450f9f56c80c8b71e37302a254ba7c3f7298dfd7
  83. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/46dcb1c399e5a514267fbbd5a50939f34e0ad6be
  84. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/489e9830136adcc53f4b191199c33504685b3737
  85. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/4e21c4b5c454df51c102f09ea1ba78c42133ee16
  86. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/4eaff3c3515a1ca019d46b9be0b7318eaffb63d1
  87. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/4ec113a0126fc5746fa3f955727d009040e8377f
  88. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/52c00bde7f4af95a86deb0a6717d1faf2828a939
  89. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/54e67ed1036f3f5b315e0e3c02948c30eba900fd
  90. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/55ca8f6d9928c239a7abb32554463e6e1e1ee084
  91. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/570ca8d2555dde94aa3b3121e8f5256e83eabe5e
  92. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/58a067ec6eda7191a5a910d8120633271d3af074
  93. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/591ef436ef8cc982b48fd827a4555b57cd9780e5
  94. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/5e1659e7cd840ab3f958273ebffdd215f2c81da6
  95. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/6066fc9e28b4ce704230f0e8cf21e7c3195aa2a3
  96. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/607dac8012f188cb035b189fc3637028137023e0
  97. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/62c843359941660da3fc9eea62a5732aaa3be283
  98. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/64696e93ead18265cdac3fb37dae29ad3be6d764
  99. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/64cad305e1858eae27cd723778fb9f4b7052eaa5
  100. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/66145518601b1405361df12570f6e0b2b9a2e5b3
  101. Some files were not shown because too many files have changed in this diff Show More

@ -888,6 +888,7 @@ chttp2_hpack_encoder_test: $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test
chttp2_status_conversion_test: $(BINDIR)/$(CONFIG)/chttp2_status_conversion_test
chttp2_stream_map_test: $(BINDIR)/$(CONFIG)/chttp2_stream_map_test
chttp2_varint_test: $(BINDIR)/$(CONFIG)/chttp2_varint_test
client_fuzzer: $(BINDIR)/$(CONFIG)/client_fuzzer
compression_test: $(BINDIR)/$(CONFIG)/compression_test
concurrent_connectivity_test: $(BINDIR)/$(CONFIG)/concurrent_connectivity_test
dns_resolver_connectivity_test: $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test
@ -1117,6 +1118,7 @@ h2_sockpair_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test
h2_sockpair+trace_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test
h2_sockpair_1byte_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test
h2_uds_nosec_test: $(BINDIR)/$(CONFIG)/h2_uds_nosec_test
client_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry
hpack_parser_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry
http_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/http_fuzzer_test_one_entry
json_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry
@ -1343,6 +1345,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test \
$(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test \
$(BINDIR)/$(CONFIG)/h2_uds_nosec_test \
$(BINDIR)/$(CONFIG)/client_fuzzer_one_entry \
$(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry \
$(BINDIR)/$(CONFIG)/http_fuzzer_test_one_entry \
$(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry \
@ -2699,6 +2702,7 @@ LIBGRPC_TEST_UTIL_SRC = \
test/core/end2end/fixtures/proxy.c \
test/core/iomgr/endpoint_tests.c \
test/core/util/grpc_profiler.c \
test/core/util/memory_counters.c \
test/core/util/mock_endpoint.c \
test/core/util/parse_hexstring.c \
test/core/util/port_posix.c \
@ -2747,6 +2751,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
test/core/end2end/fixtures/proxy.c \
test/core/iomgr/endpoint_tests.c \
test/core/util/grpc_profiler.c \
test/core/util/memory_counters.c \
test/core/util/mock_endpoint.c \
test/core/util/parse_hexstring.c \
test/core/util/port_posix.c \
@ -6246,6 +6251,38 @@ endif
endif
CLIENT_FUZZER_SRC = \
test/core/end2end/fuzzers/client_fuzzer.c \
CLIENT_FUZZER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CLIENT_FUZZER_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/client_fuzzer: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/client_fuzzer: $(CLIENT_FUZZER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(CLIENT_FUZZER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -lFuzzer -o $(BINDIR)/$(CONFIG)/client_fuzzer
endif
$(OBJDIR)/$(CONFIG)/test/core/end2end/fuzzers/client_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_client_fuzzer: $(CLIENT_FUZZER_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(CLIENT_FUZZER_OBJS:.o=.dep)
endif
endif
COMPRESSION_TEST_SRC = \
test/core/compression/compression_test.c \
@ -13767,6 +13804,38 @@ ifneq ($(NO_DEPS),true)
endif
CLIENT_FUZZER_ONE_ENTRY_SRC = \
test/core/end2end/fuzzers/client_fuzzer.c \
CLIENT_FUZZER_ONE_ENTRY_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CLIENT_FUZZER_ONE_ENTRY_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/client_fuzzer_one_entry: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/client_fuzzer_one_entry: $(CLIENT_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libone_input_fuzzer.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LD) $(LDFLAGS) $(CLIENT_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libone_input_fuzzer.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry
endif
$(OBJDIR)/$(CONFIG)/test/core/end2end/fuzzers/client_fuzzer.o: $(LIBDIR)/$(CONFIG)/libone_input_fuzzer.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_client_fuzzer_one_entry: $(CLIENT_FUZZER_ONE_ENTRY_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(CLIENT_FUZZER_ONE_ENTRY_OBJS:.o=.dep)
endif
endif
HPACK_PARSER_FUZZER_TEST_ONE_ENTRY_SRC = \
test/core/transport/chttp2/hpack_parser_fuzzer_test.c \

@ -567,6 +567,7 @@ filegroups:
- test/core/end2end/fixtures/proxy.h
- test/core/iomgr/endpoint_tests.h
- test/core/util/grpc_profiler.h
- test/core/util/memory_counters.h
- test/core/util/mock_endpoint.h
- test/core/util/parse_hexstring.h
- test/core/util/port.h
@ -577,6 +578,7 @@ filegroups:
- test/core/end2end/fixtures/proxy.c
- test/core/iomgr/endpoint_tests.c
- test/core/util/grpc_profiler.c
- test/core/util/memory_counters.c
- test/core/util/mock_endpoint.c
- test/core/util/parse_hexstring.c
- test/core/util/port_posix.c
@ -1171,6 +1173,19 @@ targets:
- grpc
- gpr_test_util
- gpr
- name: client_fuzzer
build: fuzzer
language: c
src:
- test/core/end2end/fuzzers/client_fuzzer.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
corpus_dirs:
- test/core/end2end/fuzzers/client_fuzzer_corpus
maxlen: 2048
- name: compression_test
build: test
language: c

@ -34,6 +34,8 @@
#ifndef GRPC_SUPPORT_STRING_UTIL_H
#define GRPC_SUPPORT_STRING_UTIL_H
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif

@ -61,883 +61,14 @@
"src/node/health_check",
"src/proto",
"etc",
"src/node/ext/byte_buffer.h",
"src/node/ext/call.h",
"src/node/ext/call_credentials.h",
"src/node/ext/channel.h",
"src/node/ext/channel_credentials.h",
"src/node/ext/completion_queue_async_worker.h",
"src/node/ext/server.h",
"src/node/ext/server_credentials.h",
"src/node/ext/timeval.h",
"src/node/ext/byte_buffer.cc",
"src/node/ext/call.cc",
"src/node/ext/call_credentials.cc",
"src/node/ext/channel.cc",
"src/node/ext/channel_credentials.cc",
"src/node/ext/completion_queue_async_worker.cc",
"src/node/ext/node_grpc.cc",
"src/node/ext/server.cc",
"src/node/ext/server_credentials.cc",
"src/node/ext/timeval.cc",
"src/node/index.js",
"src/node/src/client.js",
"src/node/src/common.js",
"src/node/src/credentials.js",
"src/node/src/grpc_extension.js",
"src/node/src/metadata.js",
"src/node/src/server.js",
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/grpc.h",
"include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h",
"include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
"include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h",
"include/grpc/impl/codegen/time.h",
"include/grpc/grpc_security.h",
"include/grpc/census.h",
"src/core/lib/channel/channel_args.h",
"src/core/lib/channel/channel_stack.h",
"src/core/lib/channel/channel_stack_builder.h",
"src/core/lib/channel/compress_filter.h",
"src/core/lib/channel/connected_channel.h",
"src/core/lib/channel/context.h",
"src/core/lib/channel/http_client_filter.h",
"src/core/lib/channel/http_server_filter.h",
"src/core/lib/compression/algorithm_metadata.h",
"src/core/lib/compression/message_compress.h",
"src/core/lib/debug/trace.h",
"src/core/lib/http/format_request.h",
"src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h",
"src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/endpoint.h",
"src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_posix.h",
"src/core/lib/iomgr/exec_ctx.h",
"src/core/lib/iomgr/executor.h",
"src/core/lib/iomgr/iocp_windows.h",
"src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h",
"src/core/lib/iomgr/pollset_windows.h",
"src/core/lib/iomgr/resolve_address.h",
"src/core/lib/iomgr/sockaddr.h",
"src/core/lib/iomgr/sockaddr_posix.h",
"src/core/lib/iomgr/sockaddr_utils.h",
"src/core/lib/iomgr/sockaddr_win32.h",
"src/core/lib/iomgr/socket_utils_posix.h",
"src/core/lib/iomgr/socket_windows.h",
"src/core/lib/iomgr/tcp_client.h",
"src/core/lib/iomgr/tcp_posix.h",
"src/core/lib/iomgr/tcp_server.h",
"src/core/lib/iomgr/tcp_windows.h",
"src/core/lib/iomgr/time_averaged_stats.h",
"src/core/lib/iomgr/timer.h",
"src/core/lib/iomgr/timer_heap.h",
"src/core/lib/iomgr/udp_server.h",
"src/core/lib/iomgr/unix_sockets_posix.h",
"src/core/lib/iomgr/wakeup_fd_pipe.h",
"src/core/lib/iomgr/wakeup_fd_posix.h",
"src/core/lib/iomgr/workqueue.h",
"src/core/lib/iomgr/workqueue_posix.h",
"src/core/lib/iomgr/workqueue_windows.h",
"src/core/lib/json/json.h",
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
"src/core/lib/surface/api_trace.h",
"src/core/lib/surface/call.h",
"src/core/lib/surface/call_test_only.h",
"src/core/lib/surface/channel.h",
"src/core/lib/surface/channel_init.h",
"src/core/lib/surface/channel_stack_type.h",
"src/core/lib/surface/completion_queue.h",
"src/core/lib/surface/event_string.h",
"src/core/lib/surface/init.h",
"src/core/lib/surface/lame_client.h",
"src/core/lib/surface/server.h",
"src/core/lib/surface/surface_trace.h",
"src/core/lib/transport/byte_stream.h",
"src/core/lib/transport/connectivity_state.h",
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h",
"src/core/ext/transport/chttp2/transport/frame.h",
"src/core/ext/transport/chttp2/transport/frame_data.h",
"src/core/ext/transport/chttp2/transport/frame_goaway.h",
"src/core/ext/transport/chttp2/transport/frame_ping.h",
"src/core/ext/transport/chttp2/transport/frame_rst_stream.h",
"src/core/ext/transport/chttp2/transport/frame_settings.h",
"src/core/ext/transport/chttp2/transport/frame_window_update.h",
"src/core/ext/transport/chttp2/transport/hpack_encoder.h",
"src/core/ext/transport/chttp2/transport/hpack_parser.h",
"src/core/ext/transport/chttp2/transport/hpack_table.h",
"src/core/ext/transport/chttp2/transport/http2_errors.h",
"src/core/ext/transport/chttp2/transport/huffsyms.h",
"src/core/ext/transport/chttp2/transport/incoming_metadata.h",
"src/core/ext/transport/chttp2/transport/internal.h",
"src/core/ext/transport/chttp2/transport/status_conversion.h",
"src/core/ext/transport/chttp2/transport/stream_map.h",
"src/core/ext/transport/chttp2/transport/timeout_encoding.h",
"src/core/ext/transport/chttp2/transport/varint.h",
"src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/lib/security/auth_filters.h",
"src/core/lib/security/b64.h",
"src/core/lib/security/credentials.h",
"src/core/lib/security/handshake.h",
"src/core/lib/security/json_token.h",
"src/core/lib/security/jwt_verifier.h",
"src/core/lib/security/secure_endpoint.h",
"src/core/lib/security/security_connector.h",
"src/core/lib/security/security_context.h",
"src/core/lib/tsi/fake_transport_security.h",
"src/core/lib/tsi/ssl_transport_security.h",
"src/core/lib/tsi/ssl_types.h",
"src/core/lib/tsi/transport_security.h",
"src/core/lib/tsi/transport_security_interface.h",
"src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.h",
"src/core/ext/client_config/client_config.h",
"src/core/ext/client_config/connector.h",
"src/core/ext/client_config/initial_connect_string.h",
"src/core/ext/client_config/lb_policy.h",
"src/core/ext/client_config/lb_policy_factory.h",
"src/core/ext/client_config/lb_policy_registry.h",
"src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h",
"src/core/ext/client_config/subchannel.h",
"src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
"third_party/nanopb/pb.h",
"third_party/nanopb/pb_common.h",
"third_party/nanopb/pb_decode.h",
"third_party/nanopb/pb_encode.h",
"src/core/ext/census/aggregation.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
"src/core/ext/census/rpc_metric_id.h",
"src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c",
"src/core/lib/channel/compress_filter.c",
"src/core/lib/channel/connected_channel.c",
"src/core/lib/channel/http_client_filter.c",
"src/core/lib/channel/http_server_filter.c",
"src/core/lib/compression/compression_algorithm.c",
"src/core/lib/compression/message_compress.c",
"src/core/lib/debug/trace.c",
"src/core/lib/http/format_request.c",
"src/core/lib/http/httpcli.c",
"src/core/lib/http/parser.c",
"src/core/lib/iomgr/closure.c",
"src/core/lib/iomgr/endpoint.c",
"src/core/lib/iomgr/endpoint_pair_posix.c",
"src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_posix.c",
"src/core/lib/iomgr/exec_ctx.c",
"src/core/lib/iomgr/executor.c",
"src/core/lib/iomgr/iocp_windows.c",
"src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c",
"src/core/lib/iomgr/resolve_address_posix.c",
"src/core/lib/iomgr/resolve_address_windows.c",
"src/core/lib/iomgr/sockaddr_utils.c",
"src/core/lib/iomgr/socket_utils_common_posix.c",
"src/core/lib/iomgr/socket_utils_linux.c",
"src/core/lib/iomgr/socket_utils_posix.c",
"src/core/lib/iomgr/socket_windows.c",
"src/core/lib/iomgr/tcp_client_posix.c",
"src/core/lib/iomgr/tcp_client_windows.c",
"src/core/lib/iomgr/tcp_posix.c",
"src/core/lib/iomgr/tcp_server_posix.c",
"src/core/lib/iomgr/tcp_server_windows.c",
"src/core/lib/iomgr/tcp_windows.c",
"src/core/lib/iomgr/time_averaged_stats.c",
"src/core/lib/iomgr/timer.c",
"src/core/lib/iomgr/timer_heap.c",
"src/core/lib/iomgr/udp_server.c",
"src/core/lib/iomgr/unix_sockets_posix.c",
"src/core/lib/iomgr/unix_sockets_posix_noop.c",
"src/core/lib/iomgr/wakeup_fd_eventfd.c",
"src/core/lib/iomgr/wakeup_fd_nospecial.c",
"src/core/lib/iomgr/wakeup_fd_pipe.c",
"src/core/lib/iomgr/wakeup_fd_posix.c",
"src/core/lib/iomgr/workqueue_posix.c",
"src/core/lib/iomgr/workqueue_windows.c",
"src/core/lib/json/json.c",
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
"src/core/lib/surface/alarm.c",
"src/core/lib/surface/api_trace.c",
"src/core/lib/surface/byte_buffer.c",
"src/core/lib/surface/byte_buffer_reader.c",
"src/core/lib/surface/call.c",
"src/core/lib/surface/call_details.c",
"src/core/lib/surface/call_log_batch.c",
"src/core/lib/surface/channel.c",
"src/core/lib/surface/channel_init.c",
"src/core/lib/surface/channel_ping.c",
"src/core/lib/surface/channel_stack_type.c",
"src/core/lib/surface/completion_queue.c",
"src/core/lib/surface/event_string.c",
"src/core/lib/surface/init.c",
"src/core/lib/surface/lame_client.c",
"src/core/lib/surface/metadata_array.c",
"src/core/lib/surface/server.c",
"src/core/lib/surface/validate_metadata.c",
"src/core/lib/surface/version.c",
"src/core/lib/transport/byte_stream.c",
"src/core/lib/transport/connectivity_state.c",
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c",
"src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c",
"src/core/ext/transport/chttp2/transport/bin_encoder.c",
"src/core/ext/transport/chttp2/transport/chttp2_plugin.c",
"src/core/ext/transport/chttp2/transport/chttp2_transport.c",
"src/core/ext/transport/chttp2/transport/frame_data.c",
"src/core/ext/transport/chttp2/transport/frame_goaway.c",
"src/core/ext/transport/chttp2/transport/frame_ping.c",
"src/core/ext/transport/chttp2/transport/frame_rst_stream.c",
"src/core/ext/transport/chttp2/transport/frame_settings.c",
"src/core/ext/transport/chttp2/transport/frame_window_update.c",
"src/core/ext/transport/chttp2/transport/hpack_encoder.c",
"src/core/ext/transport/chttp2/transport/hpack_parser.c",
"src/core/ext/transport/chttp2/transport/hpack_table.c",
"src/core/ext/transport/chttp2/transport/huffsyms.c",
"src/core/ext/transport/chttp2/transport/incoming_metadata.c",
"src/core/ext/transport/chttp2/transport/parsing.c",
"src/core/ext/transport/chttp2/transport/status_conversion.c",
"src/core/ext/transport/chttp2/transport/stream_lists.c",
"src/core/ext/transport/chttp2/transport/stream_map.c",
"src/core/ext/transport/chttp2/transport/timeout_encoding.c",
"src/core/ext/transport/chttp2/transport/varint.c",
"src/core/ext/transport/chttp2/transport/writing.c",
"src/core/ext/transport/chttp2/alpn/alpn.c",
"src/core/lib/http/httpcli_security_connector.c",
"src/core/lib/security/b64.c",
"src/core/lib/security/client_auth_filter.c",
"src/core/lib/security/credentials.c",
"src/core/lib/security/credentials_metadata.c",
"src/core/lib/security/credentials_posix.c",
"src/core/lib/security/credentials_win32.c",
"src/core/lib/security/google_default_credentials.c",
"src/core/lib/security/handshake.c",
"src/core/lib/security/json_token.c",
"src/core/lib/security/jwt_verifier.c",
"src/core/lib/security/secure_endpoint.c",
"src/core/lib/security/security_connector.c",
"src/core/lib/security/security_context.c",
"src/core/lib/security/server_auth_filter.c",
"src/core/lib/surface/init_secure.c",
"src/core/lib/tsi/fake_transport_security.c",
"src/core/lib/tsi/ssl_transport_security.c",
"src/core/lib/tsi/transport_security.c",
"src/core/ext/transport/chttp2/client/secure/secure_channel_create.c",
"src/core/ext/client_config/channel_connectivity.c",
"src/core/ext/client_config/client_channel.c",
"src/core/ext/client_config/client_channel_factory.c",
"src/core/ext/client_config/client_config.c",
"src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c",
"src/core/ext/client_config/default_initial_connect_string.c",
"src/core/ext/client_config/initial_connect_string.c",
"src/core/ext/client_config/lb_policy.c",
"src/core/ext/client_config/lb_policy_factory.c",
"src/core/ext/client_config/lb_policy_registry.c",
"src/core/ext/client_config/resolver.c",
"src/core/ext/client_config/resolver_factory.c",
"src/core/ext/client_config/resolver_registry.c",
"src/core/ext/client_config/subchannel.c",
"src/core/ext/client_config/subchannel_call_holder.c",
"src/core/ext/client_config/subchannel_index.c",
"src/core/ext/client_config/uri_parser.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/lb_policy/grpclb/load_balancer_api.c",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c",
"third_party/nanopb/pb_common.c",
"third_party/nanopb/pb_decode.c",
"third_party/nanopb/pb_encode.c",
"src/core/ext/lb_policy/pick_first/pick_first.c",
"src/core/ext/lb_policy/round_robin/round_robin.c",
"src/core/ext/resolver/dns/native/dns_resolver.c",
"src/core/ext/resolver/sockaddr/sockaddr_resolver.c",
"src/core/ext/census/context.c",
"src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_plugin.c",
"src/core/ext/census/initialize.c",
"src/core/ext/census/mlog.c",
"src/core/ext/census/operation.c",
"src/core/ext/census/placeholders.c",
"src/core/ext/census/tracing.c",
"src/core/plugin_registry/grpc_plugin_registry.c",
"third_party/zlib/crc32.h",
"third_party/zlib/deflate.h",
"third_party/zlib/gzguts.h",
"third_party/zlib/inffast.h",
"third_party/zlib/inffixed.h",
"third_party/zlib/inflate.h",
"third_party/zlib/inftrees.h",
"third_party/zlib/trees.h",
"third_party/zlib/zconf.h",
"third_party/zlib/zlib.h",
"third_party/zlib/zutil.h",
"third_party/zlib/adler32.c",
"third_party/zlib/compress.c",
"third_party/zlib/crc32.c",
"third_party/zlib/deflate.c",
"third_party/zlib/gzclose.c",
"third_party/zlib/gzlib.c",
"third_party/zlib/gzread.c",
"third_party/zlib/gzwrite.c",
"third_party/zlib/infback.c",
"third_party/zlib/inffast.c",
"third_party/zlib/inflate.c",
"third_party/zlib/inftrees.c",
"third_party/zlib/trees.c",
"third_party/zlib/uncompr.c",
"third_party/zlib/zutil.c",
"third_party/boringssl/crypto/aes/internal.h",
"third_party/boringssl/crypto/asn1/asn1_locl.h",
"third_party/boringssl/crypto/bio/internal.h",
"third_party/boringssl/crypto/bn/internal.h",
"third_party/boringssl/crypto/bn/rsaz_exp.h",
"third_party/boringssl/crypto/bytestring/internal.h",
"third_party/boringssl/crypto/cipher/internal.h",
"third_party/boringssl/crypto/conf/conf_def.h",
"third_party/boringssl/crypto/conf/internal.h",
"third_party/boringssl/crypto/des/internal.h",
"third_party/boringssl/crypto/dh/internal.h",
"third_party/boringssl/crypto/digest/internal.h",
"third_party/boringssl/crypto/digest/md32_common.h",
"third_party/boringssl/crypto/directory.h",
"third_party/boringssl/crypto/dsa/internal.h",
"third_party/boringssl/crypto/ec/internal.h",
"third_party/boringssl/crypto/ec/p256-x86_64-table.h",
"third_party/boringssl/crypto/evp/internal.h",
"third_party/boringssl/crypto/internal.h",
"third_party/boringssl/crypto/modes/internal.h",
"third_party/boringssl/crypto/obj/obj_dat.h",
"third_party/boringssl/crypto/obj/obj_xref.h",
"third_party/boringssl/crypto/pkcs8/internal.h",
"third_party/boringssl/crypto/rand/internal.h",
"third_party/boringssl/crypto/rsa/internal.h",
"third_party/boringssl/crypto/test/scoped_types.h",
"third_party/boringssl/crypto/test/test_util.h",
"third_party/boringssl/crypto/x509/charmap.h",
"third_party/boringssl/crypto/x509/vpm_int.h",
"third_party/boringssl/crypto/x509v3/ext_dat.h",
"third_party/boringssl/crypto/x509v3/pcy_int.h",
"third_party/boringssl/include/openssl/aead.h",
"third_party/boringssl/include/openssl/aes.h",
"third_party/boringssl/include/openssl/arm_arch.h",
"third_party/boringssl/include/openssl/asn1.h",
"third_party/boringssl/include/openssl/asn1_mac.h",
"third_party/boringssl/include/openssl/asn1t.h",
"third_party/boringssl/include/openssl/base.h",
"third_party/boringssl/include/openssl/base64.h",
"third_party/boringssl/include/openssl/bio.h",
"third_party/boringssl/include/openssl/blowfish.h",
"third_party/boringssl/include/openssl/bn.h",
"third_party/boringssl/include/openssl/buf.h",
"third_party/boringssl/include/openssl/buffer.h",
"third_party/boringssl/include/openssl/bytestring.h",
"third_party/boringssl/include/openssl/cast.h",
"third_party/boringssl/include/openssl/chacha.h",
"third_party/boringssl/include/openssl/cipher.h",
"third_party/boringssl/include/openssl/cmac.h",
"third_party/boringssl/include/openssl/conf.h",
"third_party/boringssl/include/openssl/cpu.h",
"third_party/boringssl/include/openssl/crypto.h",
"third_party/boringssl/include/openssl/curve25519.h",
"third_party/boringssl/include/openssl/des.h",
"third_party/boringssl/include/openssl/dh.h",
"third_party/boringssl/include/openssl/digest.h",
"third_party/boringssl/include/openssl/dsa.h",
"third_party/boringssl/include/openssl/dtls1.h",
"third_party/boringssl/include/openssl/ec.h",
"third_party/boringssl/include/openssl/ec_key.h",
"third_party/boringssl/include/openssl/ecdh.h",
"third_party/boringssl/include/openssl/ecdsa.h",
"third_party/boringssl/include/openssl/engine.h",
"third_party/boringssl/include/openssl/err.h",
"third_party/boringssl/include/openssl/evp.h",
"third_party/boringssl/include/openssl/ex_data.h",
"third_party/boringssl/include/openssl/hkdf.h",
"third_party/boringssl/include/openssl/hmac.h",
"third_party/boringssl/include/openssl/lhash.h",
"third_party/boringssl/include/openssl/lhash_macros.h",
"third_party/boringssl/include/openssl/md4.h",
"third_party/boringssl/include/openssl/md5.h",
"third_party/boringssl/include/openssl/mem.h",
"third_party/boringssl/include/openssl/obj.h",
"third_party/boringssl/include/openssl/obj_mac.h",
"third_party/boringssl/include/openssl/objects.h",
"third_party/boringssl/include/openssl/opensslfeatures.h",
"third_party/boringssl/include/openssl/opensslv.h",
"third_party/boringssl/include/openssl/ossl_typ.h",
"third_party/boringssl/include/openssl/pem.h",
"third_party/boringssl/include/openssl/pkcs12.h",
"third_party/boringssl/include/openssl/pkcs7.h",
"third_party/boringssl/include/openssl/pkcs8.h",
"third_party/boringssl/include/openssl/poly1305.h",
"third_party/boringssl/include/openssl/pqueue.h",
"third_party/boringssl/include/openssl/rand.h",
"third_party/boringssl/include/openssl/rc4.h",
"third_party/boringssl/include/openssl/rsa.h",
"third_party/boringssl/include/openssl/safestack.h",
"third_party/boringssl/include/openssl/sha.h",
"third_party/boringssl/include/openssl/srtp.h",
"third_party/boringssl/include/openssl/ssl.h",
"third_party/boringssl/include/openssl/ssl3.h",
"third_party/boringssl/include/openssl/stack.h",
"third_party/boringssl/include/openssl/stack_macros.h",
"third_party/boringssl/include/openssl/thread.h",
"third_party/boringssl/include/openssl/time_support.h",
"third_party/boringssl/include/openssl/tls1.h",
"third_party/boringssl/include/openssl/type_check.h",
"third_party/boringssl/include/openssl/x509.h",
"third_party/boringssl/include/openssl/x509_vfy.h",
"third_party/boringssl/include/openssl/x509v3.h",
"third_party/boringssl/ssl/internal.h",
"third_party/boringssl/ssl/test/async_bio.h",
"third_party/boringssl/ssl/test/packeted_bio.h",
"third_party/boringssl/ssl/test/scoped_types.h",
"third_party/boringssl/ssl/test/test_config.h",
"src/boringssl/err_data.c",
"third_party/boringssl/crypto/aes/aes.c",
"third_party/boringssl/crypto/aes/mode_wrappers.c",
"third_party/boringssl/crypto/asn1/a_bitstr.c",
"third_party/boringssl/crypto/asn1/a_bool.c",
"third_party/boringssl/crypto/asn1/a_bytes.c",
"third_party/boringssl/crypto/asn1/a_d2i_fp.c",
"third_party/boringssl/crypto/asn1/a_dup.c",
"third_party/boringssl/crypto/asn1/a_enum.c",
"third_party/boringssl/crypto/asn1/a_gentm.c",
"third_party/boringssl/crypto/asn1/a_i2d_fp.c",
"third_party/boringssl/crypto/asn1/a_int.c",
"third_party/boringssl/crypto/asn1/a_mbstr.c",
"third_party/boringssl/crypto/asn1/a_object.c",
"third_party/boringssl/crypto/asn1/a_octet.c",
"third_party/boringssl/crypto/asn1/a_print.c",
"third_party/boringssl/crypto/asn1/a_strnid.c",
"third_party/boringssl/crypto/asn1/a_time.c",
"third_party/boringssl/crypto/asn1/a_type.c",
"third_party/boringssl/crypto/asn1/a_utctm.c",
"third_party/boringssl/crypto/asn1/a_utf8.c",
"third_party/boringssl/crypto/asn1/asn1_lib.c",
"third_party/boringssl/crypto/asn1/asn1_par.c",
"third_party/boringssl/crypto/asn1/asn_pack.c",
"third_party/boringssl/crypto/asn1/bio_asn1.c",
"third_party/boringssl/crypto/asn1/bio_ndef.c",
"third_party/boringssl/crypto/asn1/f_enum.c",
"third_party/boringssl/crypto/asn1/f_int.c",
"third_party/boringssl/crypto/asn1/f_string.c",
"third_party/boringssl/crypto/asn1/t_bitst.c",
"third_party/boringssl/crypto/asn1/t_pkey.c",
"third_party/boringssl/crypto/asn1/tasn_dec.c",
"third_party/boringssl/crypto/asn1/tasn_enc.c",
"third_party/boringssl/crypto/asn1/tasn_fre.c",
"third_party/boringssl/crypto/asn1/tasn_new.c",
"third_party/boringssl/crypto/asn1/tasn_prn.c",
"third_party/boringssl/crypto/asn1/tasn_typ.c",
"third_party/boringssl/crypto/asn1/tasn_utl.c",
"third_party/boringssl/crypto/asn1/x_bignum.c",
"third_party/boringssl/crypto/asn1/x_long.c",
"third_party/boringssl/crypto/base64/base64.c",
"third_party/boringssl/crypto/bio/bio.c",
"third_party/boringssl/crypto/bio/bio_mem.c",
"third_party/boringssl/crypto/bio/buffer.c",
"third_party/boringssl/crypto/bio/connect.c",
"third_party/boringssl/crypto/bio/fd.c",
"third_party/boringssl/crypto/bio/file.c",
"third_party/boringssl/crypto/bio/hexdump.c",
"third_party/boringssl/crypto/bio/pair.c",
"third_party/boringssl/crypto/bio/printf.c",
"third_party/boringssl/crypto/bio/socket.c",
"third_party/boringssl/crypto/bio/socket_helper.c",
"third_party/boringssl/crypto/bn/add.c",
"third_party/boringssl/crypto/bn/asm/x86_64-gcc.c",
"third_party/boringssl/crypto/bn/bn.c",
"third_party/boringssl/crypto/bn/bn_asn1.c",
"third_party/boringssl/crypto/bn/cmp.c",
"third_party/boringssl/crypto/bn/convert.c",
"third_party/boringssl/crypto/bn/ctx.c",
"third_party/boringssl/crypto/bn/div.c",
"third_party/boringssl/crypto/bn/exponentiation.c",
"third_party/boringssl/crypto/bn/gcd.c",
"third_party/boringssl/crypto/bn/generic.c",
"third_party/boringssl/crypto/bn/kronecker.c",
"third_party/boringssl/crypto/bn/montgomery.c",
"third_party/boringssl/crypto/bn/mul.c",
"third_party/boringssl/crypto/bn/prime.c",
"third_party/boringssl/crypto/bn/random.c",
"third_party/boringssl/crypto/bn/rsaz_exp.c",
"third_party/boringssl/crypto/bn/shift.c",
"third_party/boringssl/crypto/bn/sqrt.c",
"third_party/boringssl/crypto/buf/buf.c",
"third_party/boringssl/crypto/bytestring/ber.c",
"third_party/boringssl/crypto/bytestring/cbb.c",
"third_party/boringssl/crypto/bytestring/cbs.c",
"third_party/boringssl/crypto/chacha/chacha_generic.c",
"third_party/boringssl/crypto/chacha/chacha_vec.c",
"third_party/boringssl/crypto/cipher/aead.c",
"third_party/boringssl/crypto/cipher/cipher.c",
"third_party/boringssl/crypto/cipher/derive_key.c",
"third_party/boringssl/crypto/cipher/e_aes.c",
"third_party/boringssl/crypto/cipher/e_chacha20poly1305.c",
"third_party/boringssl/crypto/cipher/e_des.c",
"third_party/boringssl/crypto/cipher/e_null.c",
"third_party/boringssl/crypto/cipher/e_rc2.c",
"third_party/boringssl/crypto/cipher/e_rc4.c",
"third_party/boringssl/crypto/cipher/e_ssl3.c",
"third_party/boringssl/crypto/cipher/e_tls.c",
"third_party/boringssl/crypto/cipher/tls_cbc.c",
"third_party/boringssl/crypto/cmac/cmac.c",
"third_party/boringssl/crypto/conf/conf.c",
"third_party/boringssl/crypto/cpu-arm.c",
"third_party/boringssl/crypto/cpu-intel.c",
"third_party/boringssl/crypto/crypto.c",
"third_party/boringssl/crypto/curve25519/curve25519.c",
"third_party/boringssl/crypto/des/des.c",
"third_party/boringssl/crypto/dh/check.c",
"third_party/boringssl/crypto/dh/dh.c",
"third_party/boringssl/crypto/dh/dh_asn1.c",
"third_party/boringssl/crypto/dh/params.c",
"third_party/boringssl/crypto/digest/digest.c",
"third_party/boringssl/crypto/digest/digests.c",
"third_party/boringssl/crypto/directory_posix.c",
"third_party/boringssl/crypto/directory_win.c",
"third_party/boringssl/crypto/dsa/dsa.c",
"third_party/boringssl/crypto/dsa/dsa_asn1.c",
"third_party/boringssl/crypto/ec/ec.c",
"third_party/boringssl/crypto/ec/ec_asn1.c",
"third_party/boringssl/crypto/ec/ec_key.c",
"third_party/boringssl/crypto/ec/ec_montgomery.c",
"third_party/boringssl/crypto/ec/oct.c",
"third_party/boringssl/crypto/ec/p224-64.c",
"third_party/boringssl/crypto/ec/p256-64.c",
"third_party/boringssl/crypto/ec/p256-x86_64.c",
"third_party/boringssl/crypto/ec/simple.c",
"third_party/boringssl/crypto/ec/util-64.c",
"third_party/boringssl/crypto/ec/wnaf.c",
"third_party/boringssl/crypto/ecdh/ecdh.c",
"third_party/boringssl/crypto/ecdsa/ecdsa.c",
"third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c",
"third_party/boringssl/crypto/engine/engine.c",
"third_party/boringssl/crypto/err/err.c",
"third_party/boringssl/crypto/evp/algorithm.c",
"third_party/boringssl/crypto/evp/digestsign.c",
"third_party/boringssl/crypto/evp/evp.c",
"third_party/boringssl/crypto/evp/evp_asn1.c",
"third_party/boringssl/crypto/evp/evp_ctx.c",
"third_party/boringssl/crypto/evp/p_dsa_asn1.c",
"third_party/boringssl/crypto/evp/p_ec.c",
"third_party/boringssl/crypto/evp/p_ec_asn1.c",
"third_party/boringssl/crypto/evp/p_rsa.c",
"third_party/boringssl/crypto/evp/p_rsa_asn1.c",
"third_party/boringssl/crypto/evp/pbkdf.c",
"third_party/boringssl/crypto/evp/sign.c",
"third_party/boringssl/crypto/ex_data.c",
"third_party/boringssl/crypto/hkdf/hkdf.c",
"third_party/boringssl/crypto/hmac/hmac.c",
"third_party/boringssl/crypto/lhash/lhash.c",
"third_party/boringssl/crypto/md4/md4.c",
"third_party/boringssl/crypto/md5/md5.c",
"third_party/boringssl/crypto/mem.c",
"third_party/boringssl/crypto/modes/cbc.c",
"third_party/boringssl/crypto/modes/cfb.c",
"third_party/boringssl/crypto/modes/ctr.c",
"third_party/boringssl/crypto/modes/gcm.c",
"third_party/boringssl/crypto/modes/ofb.c",
"third_party/boringssl/crypto/obj/obj.c",
"third_party/boringssl/crypto/obj/obj_xref.c",
"third_party/boringssl/crypto/pem/pem_all.c",
"third_party/boringssl/crypto/pem/pem_info.c",
"third_party/boringssl/crypto/pem/pem_lib.c",
"third_party/boringssl/crypto/pem/pem_oth.c",
"third_party/boringssl/crypto/pem/pem_pk8.c",
"third_party/boringssl/crypto/pem/pem_pkey.c",
"third_party/boringssl/crypto/pem/pem_x509.c",
"third_party/boringssl/crypto/pem/pem_xaux.c",
"third_party/boringssl/crypto/pkcs8/p5_pbe.c",
"third_party/boringssl/crypto/pkcs8/p5_pbev2.c",
"third_party/boringssl/crypto/pkcs8/p8_pkey.c",
"third_party/boringssl/crypto/pkcs8/pkcs8.c",
"third_party/boringssl/crypto/poly1305/poly1305.c",
"third_party/boringssl/crypto/poly1305/poly1305_arm.c",
"third_party/boringssl/crypto/poly1305/poly1305_vec.c",
"third_party/boringssl/crypto/rand/rand.c",
"third_party/boringssl/crypto/rand/urandom.c",
"third_party/boringssl/crypto/rand/windows.c",
"third_party/boringssl/crypto/rc4/rc4.c",
"third_party/boringssl/crypto/refcount_c11.c",
"third_party/boringssl/crypto/refcount_lock.c",
"third_party/boringssl/crypto/rsa/blinding.c",
"third_party/boringssl/crypto/rsa/padding.c",
"third_party/boringssl/crypto/rsa/rsa.c",
"third_party/boringssl/crypto/rsa/rsa_asn1.c",
"third_party/boringssl/crypto/rsa/rsa_impl.c",
"third_party/boringssl/crypto/sha/sha1.c",
"third_party/boringssl/crypto/sha/sha256.c",
"third_party/boringssl/crypto/sha/sha512.c",
"third_party/boringssl/crypto/stack/stack.c",
"third_party/boringssl/crypto/thread.c",
"third_party/boringssl/crypto/thread_none.c",
"third_party/boringssl/crypto/thread_pthread.c",
"third_party/boringssl/crypto/thread_win.c",
"third_party/boringssl/crypto/time_support.c",
"third_party/boringssl/crypto/x509/a_digest.c",
"third_party/boringssl/crypto/x509/a_sign.c",
"third_party/boringssl/crypto/x509/a_strex.c",
"third_party/boringssl/crypto/x509/a_verify.c",
"third_party/boringssl/crypto/x509/asn1_gen.c",
"third_party/boringssl/crypto/x509/by_dir.c",
"third_party/boringssl/crypto/x509/by_file.c",
"third_party/boringssl/crypto/x509/i2d_pr.c",
"third_party/boringssl/crypto/x509/pkcs7.c",
"third_party/boringssl/crypto/x509/t_crl.c",
"third_party/boringssl/crypto/x509/t_req.c",
"third_party/boringssl/crypto/x509/t_x509.c",
"third_party/boringssl/crypto/x509/t_x509a.c",
"third_party/boringssl/crypto/x509/x509.c",
"third_party/boringssl/crypto/x509/x509_att.c",
"third_party/boringssl/crypto/x509/x509_cmp.c",
"third_party/boringssl/crypto/x509/x509_d2.c",
"third_party/boringssl/crypto/x509/x509_def.c",
"third_party/boringssl/crypto/x509/x509_ext.c",
"third_party/boringssl/crypto/x509/x509_lu.c",
"third_party/boringssl/crypto/x509/x509_obj.c",
"third_party/boringssl/crypto/x509/x509_r2x.c",
"third_party/boringssl/crypto/x509/x509_req.c",
"third_party/boringssl/crypto/x509/x509_set.c",
"third_party/boringssl/crypto/x509/x509_trs.c",
"third_party/boringssl/crypto/x509/x509_txt.c",
"third_party/boringssl/crypto/x509/x509_v3.c",
"third_party/boringssl/crypto/x509/x509_vfy.c",
"third_party/boringssl/crypto/x509/x509_vpm.c",
"third_party/boringssl/crypto/x509/x509cset.c",
"third_party/boringssl/crypto/x509/x509name.c",
"third_party/boringssl/crypto/x509/x509rset.c",
"third_party/boringssl/crypto/x509/x509spki.c",
"third_party/boringssl/crypto/x509/x509type.c",
"third_party/boringssl/crypto/x509/x_algor.c",
"third_party/boringssl/crypto/x509/x_all.c",
"third_party/boringssl/crypto/x509/x_attrib.c",
"third_party/boringssl/crypto/x509/x_crl.c",
"third_party/boringssl/crypto/x509/x_exten.c",
"third_party/boringssl/crypto/x509/x_info.c",
"third_party/boringssl/crypto/x509/x_name.c",
"third_party/boringssl/crypto/x509/x_pkey.c",
"third_party/boringssl/crypto/x509/x_pubkey.c",
"third_party/boringssl/crypto/x509/x_req.c",
"third_party/boringssl/crypto/x509/x_sig.c",
"third_party/boringssl/crypto/x509/x_spki.c",
"third_party/boringssl/crypto/x509/x_val.c",
"third_party/boringssl/crypto/x509/x_x509.c",
"third_party/boringssl/crypto/x509/x_x509a.c",
"third_party/boringssl/crypto/x509v3/pcy_cache.c",
"third_party/boringssl/crypto/x509v3/pcy_data.c",
"third_party/boringssl/crypto/x509v3/pcy_lib.c",
"third_party/boringssl/crypto/x509v3/pcy_map.c",
"third_party/boringssl/crypto/x509v3/pcy_node.c",
"third_party/boringssl/crypto/x509v3/pcy_tree.c",
"third_party/boringssl/crypto/x509v3/v3_akey.c",
"third_party/boringssl/crypto/x509v3/v3_akeya.c",
"third_party/boringssl/crypto/x509v3/v3_alt.c",
"third_party/boringssl/crypto/x509v3/v3_bcons.c",
"third_party/boringssl/crypto/x509v3/v3_bitst.c",
"third_party/boringssl/crypto/x509v3/v3_conf.c",
"third_party/boringssl/crypto/x509v3/v3_cpols.c",
"third_party/boringssl/crypto/x509v3/v3_crld.c",
"third_party/boringssl/crypto/x509v3/v3_enum.c",
"third_party/boringssl/crypto/x509v3/v3_extku.c",
"third_party/boringssl/crypto/x509v3/v3_genn.c",
"third_party/boringssl/crypto/x509v3/v3_ia5.c",
"third_party/boringssl/crypto/x509v3/v3_info.c",
"third_party/boringssl/crypto/x509v3/v3_int.c",
"third_party/boringssl/crypto/x509v3/v3_lib.c",
"third_party/boringssl/crypto/x509v3/v3_ncons.c",
"third_party/boringssl/crypto/x509v3/v3_pci.c",
"third_party/boringssl/crypto/x509v3/v3_pcia.c",
"third_party/boringssl/crypto/x509v3/v3_pcons.c",
"third_party/boringssl/crypto/x509v3/v3_pku.c",
"third_party/boringssl/crypto/x509v3/v3_pmaps.c",
"third_party/boringssl/crypto/x509v3/v3_prn.c",
"third_party/boringssl/crypto/x509v3/v3_purp.c",
"third_party/boringssl/crypto/x509v3/v3_skey.c",
"third_party/boringssl/crypto/x509v3/v3_sxnet.c",
"third_party/boringssl/crypto/x509v3/v3_utl.c",
"third_party/boringssl/ssl/custom_extensions.c",
"third_party/boringssl/ssl/d1_both.c",
"third_party/boringssl/ssl/d1_clnt.c",
"third_party/boringssl/ssl/d1_lib.c",
"third_party/boringssl/ssl/d1_meth.c",
"third_party/boringssl/ssl/d1_pkt.c",
"third_party/boringssl/ssl/d1_srtp.c",
"third_party/boringssl/ssl/d1_srvr.c",
"third_party/boringssl/ssl/dtls_record.c",
"third_party/boringssl/ssl/pqueue/pqueue.c",
"third_party/boringssl/ssl/s3_both.c",
"third_party/boringssl/ssl/s3_clnt.c",
"third_party/boringssl/ssl/s3_enc.c",
"third_party/boringssl/ssl/s3_lib.c",
"third_party/boringssl/ssl/s3_meth.c",
"third_party/boringssl/ssl/s3_pkt.c",
"third_party/boringssl/ssl/s3_srvr.c",
"third_party/boringssl/ssl/ssl_aead_ctx.c",
"third_party/boringssl/ssl/ssl_asn1.c",
"third_party/boringssl/ssl/ssl_buffer.c",
"third_party/boringssl/ssl/ssl_cert.c",
"third_party/boringssl/ssl/ssl_cipher.c",
"third_party/boringssl/ssl/ssl_file.c",
"third_party/boringssl/ssl/ssl_lib.c",
"third_party/boringssl/ssl/ssl_rsa.c",
"third_party/boringssl/ssl/ssl_session.c",
"third_party/boringssl/ssl/ssl_stat.c",
"third_party/boringssl/ssl/t1_enc.c",
"third_party/boringssl/ssl/t1_lib.c",
"third_party/boringssl/ssl/tls_record.c",
"include/grpc/support/alloc.h",
"include/grpc/support/atm.h",
"include/grpc/support/atm_gcc_atomic.h",
"include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_win32.h",
"include/grpc/support/avl.h",
"include/grpc/support/cmdline.h",
"include/grpc/support/cpu.h",
"include/grpc/support/histogram.h",
"include/grpc/support/host_port.h",
"include/grpc/support/log.h",
"include/grpc/support/log_win32.h",
"include/grpc/support/port_platform.h",
"include/grpc/support/slice.h",
"include/grpc/support/slice_buffer.h",
"include/grpc/support/string_util.h",
"include/grpc/support/subprocess.h",
"include/grpc/support/sync.h",
"include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_win32.h",
"include/grpc/support/thd.h",
"include/grpc/support/time.h",
"include/grpc/support/tls.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h",
"include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
"include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h",
"include/grpc/impl/codegen/time.h",
"src/core/lib/profiling/timers.h",
"src/core/lib/support/backoff.h",
"src/core/lib/support/block_annotate.h",
"src/core/lib/support/env.h",
"src/core/lib/support/load_file.h",
"src/core/lib/support/murmur_hash.h",
"src/core/lib/support/stack_lockfree.h",
"src/core/lib/support/string.h",
"src/core/lib/support/string_win32.h",
"src/core/lib/support/thd_internal.h",
"src/core/lib/support/time_precise.h",
"src/core/lib/support/tmpfile.h",
"src/core/lib/profiling/basic_timers.c",
"src/core/lib/profiling/stap_timers.c",
"src/core/lib/support/alloc.c",
"src/core/lib/support/avl.c",
"src/core/lib/support/backoff.c",
"src/core/lib/support/cmdline.c",
"src/core/lib/support/cpu_iphone.c",
"src/core/lib/support/cpu_linux.c",
"src/core/lib/support/cpu_posix.c",
"src/core/lib/support/cpu_windows.c",
"src/core/lib/support/env_linux.c",
"src/core/lib/support/env_posix.c",
"src/core/lib/support/env_win32.c",
"src/core/lib/support/histogram.c",
"src/core/lib/support/host_port.c",
"src/core/lib/support/load_file.c",
"src/core/lib/support/log.c",
"src/core/lib/support/log_android.c",
"src/core/lib/support/log_linux.c",
"src/core/lib/support/log_posix.c",
"src/core/lib/support/log_win32.c",
"src/core/lib/support/murmur_hash.c",
"src/core/lib/support/slice.c",
"src/core/lib/support/slice_buffer.c",
"src/core/lib/support/stack_lockfree.c",
"src/core/lib/support/string.c",
"src/core/lib/support/string_posix.c",
"src/core/lib/support/string_win32.c",
"src/core/lib/support/subprocess_posix.c",
"src/core/lib/support/subprocess_windows.c",
"src/core/lib/support/sync.c",
"src/core/lib/support/sync_posix.c",
"src/core/lib/support/sync_win32.c",
"src/core/lib/support/thd.c",
"src/core/lib/support/thd_posix.c",
"src/core/lib/support/thd_win32.c",
"src/core/lib/support/time.c",
"src/core/lib/support/time_posix.c",
"src/core/lib/support/time_precise.c",
"src/core/lib/support/time_win32.c",
"src/core/lib/support/tls_pthread.c",
"src/core/lib/support/tmpfile_posix.c",
"src/core/lib/support/tmpfile_win32.c",
"src/core/lib/support/wrap_memcpy.c",
"src/node/src",
"src/node/ext",
"include/grpc",
"src/core",
"third_party/nanopb",
"third_party/zlib",
"third_party/boringssl",
"binding.gyp"
],
"main": "src/node/index.js",

@ -34,9 +34,6 @@
#include <map>
#include "src/compiler/cpp_generator.h"
#include "src/compiler/cpp_generator_helpers.h"
#include "src/compiler/config.h"
#include <sstream>
@ -50,22 +47,6 @@ grpc::string as_string(T x) {
return out.str();
}
bool NoStreaming(const grpc::protobuf::MethodDescriptor *method) {
return !method->client_streaming() && !method->server_streaming();
}
bool ClientOnlyStreaming(const grpc::protobuf::MethodDescriptor *method) {
return method->client_streaming() && !method->server_streaming();
}
bool ServerOnlyStreaming(const grpc::protobuf::MethodDescriptor *method) {
return !method->client_streaming() && method->server_streaming();
}
bool BidiStreaming(const grpc::protobuf::MethodDescriptor *method) {
return method->client_streaming() && method->server_streaming();
}
grpc::string FilenameIdentifier(const grpc::string &filename) {
grpc::string result;
for (unsigned i = 0; i < filename.size(); i++) {
@ -86,7 +67,7 @@ grpc::string FilenameIdentifier(const grpc::string &filename) {
template<class T, size_t N>
T *array_end(T (&array)[N]) { return array + N; }
void PrintIncludes(grpc::protobuf::io::Printer *printer, const std::vector<grpc::string>& headers, const Parameters &params) {
void PrintIncludes(Printer *printer, const std::vector<grpc::string>& headers, const Parameters &params) {
std::map<grpc::string, grpc::string> vars;
vars["l"] = params.use_system_headers ? '<' : '"';
@ -105,39 +86,36 @@ void PrintIncludes(grpc::protobuf::io::Printer *printer, const std::vector<grpc:
}
}
grpc::string GetHeaderPrologue(const grpc::protobuf::FileDescriptor *file,
const Parameters &params) {
grpc::string GetHeaderPrologue(File *file, const Parameters &params) {
grpc::string output;
{
// Scope the output stream so it closes and finalizes output to the string.
grpc::protobuf::io::StringOutputStream output_stream(&output);
grpc::protobuf::io::Printer printer(&output_stream, '$');
auto printer = file->CreatePrinter(&output);
std::map<grpc::string, grpc::string> vars;
vars["filename"] = file->name();
vars["filename_identifier"] = FilenameIdentifier(file->name());
vars["filename_base"] = grpc_generator::StripProto(file->name());
vars["filename"] = file->filename();
vars["filename_identifier"] = FilenameIdentifier(file->filename());
vars["filename_base"] = file->filename_without_ext();
printer.Print(vars, "// Generated by the gRPC protobuf plugin.\n");
printer.Print(vars,
printer->Print(vars, "// Generated by the gRPC protobuf plugin.\n");
printer->Print(vars,
"// If you make any local change, they will be lost.\n");
printer.Print(vars, "// source: $filename$\n");
printer.Print(vars, "#ifndef GRPC_$filename_identifier$__INCLUDED\n");
printer.Print(vars, "#define GRPC_$filename_identifier$__INCLUDED\n");
printer.Print(vars, "\n");
printer.Print(vars, "#include \"$filename_base$.pb.h\"\n");
printer.Print(vars, "\n");
printer->Print(vars, "// source: $filename$\n");
printer->Print(vars, "#ifndef GRPC_$filename_identifier$__INCLUDED\n");
printer->Print(vars, "#define GRPC_$filename_identifier$__INCLUDED\n");
printer->Print(vars, "\n");
printer->Print(vars, "#include \"$filename_base$.pb.h\"\n");
printer->Print(vars, "\n");
}
return output;
}
grpc::string GetHeaderIncludes(const grpc::protobuf::FileDescriptor *file,
grpc::string GetHeaderIncludes(File *file,
const Parameters &params) {
grpc::string output;
{
// Scope the output stream so it closes and finalizes output to the string.
grpc::protobuf::io::StringOutputStream output_stream(&output);
grpc::protobuf::io::Printer printer(&output_stream, '$');
auto printer = file->CreatePrinter(&output);
std::map<grpc::string, grpc::string> vars;
static const char *headers_strs[] = {
@ -151,42 +129,38 @@ grpc::string GetHeaderIncludes(const grpc::protobuf::FileDescriptor *file,
"grpc++/impl/codegen/sync_stream.h"
};
std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
PrintIncludes(&printer, headers, params);
printer.Print(vars, "\n");
printer.Print(vars, "namespace grpc {\n");
printer.Print(vars, "class CompletionQueue;\n");
printer.Print(vars, "class Channel;\n");
printer.Print(vars, "class RpcService;\n");
printer.Print(vars, "class ServerCompletionQueue;\n");
printer.Print(vars, "class ServerContext;\n");
printer.Print(vars, "} // namespace grpc\n\n");
PrintIncludes(printer.get(), headers, params);
printer->Print(vars, "\n");
printer->Print(vars, "namespace grpc {\n");
printer->Print(vars, "class CompletionQueue;\n");
printer->Print(vars, "class Channel;\n");
printer->Print(vars, "class RpcService;\n");
printer->Print(vars, "class ServerCompletionQueue;\n");
printer->Print(vars, "class ServerContext;\n");
printer->Print(vars, "} // namespace grpc\n\n");
if (!file->package().empty()) {
std::vector<grpc::string> parts =
grpc_generator::tokenize(file->package(), ".");
std::vector<grpc::string> parts = file->package_parts();
for (auto part = parts.begin(); part != parts.end(); part++) {
vars["part"] = *part;
printer.Print(vars, "namespace $part$ {\n");
printer->Print(vars, "namespace $part$ {\n");
}
printer.Print(vars, "\n");
printer->Print(vars, "\n");
}
}
return output;
}
void PrintHeaderClientMethodInterfaces(
grpc::protobuf::io::Printer *printer,
const grpc::protobuf::MethodDescriptor *method,
Printer *printer, const Method *method,
std::map<grpc::string, grpc::string> *vars, bool is_public) {
(*vars)["Method"] = method->name();
(*vars)["Request"] =
grpc_cpp_generator::ClassName(method->input_type(), true);
(*vars)["Response"] =
grpc_cpp_generator::ClassName(method->output_type(), true);
(*vars)["Request"] = method->input_type_name();
(*vars)["Response"] = method->output_type_name();
if (is_public) {
if (NoStreaming(method)) {
if (method->NoStreaming()) {
printer->Print(
*vars,
"virtual ::grpc::Status $Method$(::grpc::ClientContext* context, "
@ -204,7 +178,7 @@ void PrintHeaderClientMethodInterfaces(
"Async$Method$Raw(context, request, cq));\n");
printer->Outdent();
printer->Print("}\n");
} else if (ClientOnlyStreaming(method)) {
} else if (method->ClientOnlyStreaming()) {
printer->Print(
*vars,
"std::unique_ptr< ::grpc::ClientWriterInterface< $Request$>>"
@ -230,7 +204,7 @@ void PrintHeaderClientMethodInterfaces(
"Async$Method$Raw(context, response, cq, tag));\n");
printer->Outdent();
printer->Print("}\n");
} else if (ServerOnlyStreaming(method)) {
} else if (method->ServerOnlyStreaming()) {
printer->Print(
*vars,
"std::unique_ptr< ::grpc::ClientReaderInterface< $Response$>>"
@ -256,7 +230,7 @@ void PrintHeaderClientMethodInterfaces(
"Async$Method$Raw(context, request, cq, tag));\n");
printer->Outdent();
printer->Print("}\n");
} else if (BidiStreaming(method)) {
} else if (method->BidiStreaming()) {
printer->Print(*vars,
"std::unique_ptr< ::grpc::ClientReaderWriterInterface< "
"$Request$, $Response$>> "
@ -285,14 +259,14 @@ void PrintHeaderClientMethodInterfaces(
printer->Print("}\n");
}
} else {
if (NoStreaming(method)) {
if (method->NoStreaming()) {
printer->Print(
*vars,
"virtual ::grpc::ClientAsyncResponseReaderInterface< $Response$>* "
"Async$Method$Raw(::grpc::ClientContext* context, "
"const $Request$& request, "
"::grpc::CompletionQueue* cq) = 0;\n");
} else if (ClientOnlyStreaming(method)) {
} else if (method->ClientOnlyStreaming()) {
printer->Print(
*vars,
"virtual ::grpc::ClientWriterInterface< $Request$>*"
@ -303,7 +277,7 @@ void PrintHeaderClientMethodInterfaces(
" Async$Method$Raw(::grpc::ClientContext* context, "
"$Response$* response, "
"::grpc::CompletionQueue* cq, void* tag) = 0;\n");
} else if (ServerOnlyStreaming(method)) {
} else if (method->ServerOnlyStreaming()) {
printer->Print(
*vars,
"virtual ::grpc::ClientReaderInterface< $Response$>* $Method$Raw("
@ -314,7 +288,7 @@ void PrintHeaderClientMethodInterfaces(
"Async$Method$Raw("
"::grpc::ClientContext* context, const $Request$& request, "
"::grpc::CompletionQueue* cq, void* tag) = 0;\n");
} else if (BidiStreaming(method)) {
} else if (method->BidiStreaming()) {
printer->Print(*vars,
"virtual ::grpc::ClientReaderWriterInterface< $Request$, "
"$Response$>* "
@ -328,17 +302,15 @@ void PrintHeaderClientMethodInterfaces(
}
}
void PrintHeaderClientMethod(grpc::protobuf::io::Printer *printer,
const grpc::protobuf::MethodDescriptor *method,
void PrintHeaderClientMethod(Printer *printer,
const Method *method,
std::map<grpc::string, grpc::string> *vars,
bool is_public) {
(*vars)["Method"] = method->name();
(*vars)["Request"] =
grpc_cpp_generator::ClassName(method->input_type(), true);
(*vars)["Response"] =
grpc_cpp_generator::ClassName(method->output_type(), true);
(*vars)["Request"] = method->input_type_name();
(*vars)["Response"] = method->output_type_name();
if (is_public) {
if (NoStreaming(method)) {
if (method->NoStreaming()) {
printer->Print(
*vars,
"::grpc::Status $Method$(::grpc::ClientContext* context, "
@ -356,7 +328,7 @@ void PrintHeaderClientMethod(grpc::protobuf::io::Printer *printer,
"Async$Method$Raw(context, request, cq));\n");
printer->Outdent();
printer->Print("}\n");
} else if (ClientOnlyStreaming(method)) {
} else if (method->ClientOnlyStreaming()) {
printer->Print(
*vars,
"std::unique_ptr< ::grpc::ClientWriter< $Request$>>"
@ -380,7 +352,7 @@ void PrintHeaderClientMethod(grpc::protobuf::io::Printer *printer,
"Async$Method$Raw(context, response, cq, tag));\n");
printer->Outdent();
printer->Print("}\n");
} else if (ServerOnlyStreaming(method)) {
} else if (method->ServerOnlyStreaming()) {
printer->Print(
*vars,
"std::unique_ptr< ::grpc::ClientReader< $Response$>>"
@ -406,7 +378,7 @@ void PrintHeaderClientMethod(grpc::protobuf::io::Printer *printer,
"Async$Method$Raw(context, request, cq, tag));\n");
printer->Outdent();
printer->Print("}\n");
} else if (BidiStreaming(method)) {
} else if (method->BidiStreaming()) {
printer->Print(
*vars,
"std::unique_ptr< ::grpc::ClientReaderWriter< $Request$, $Response$>>"
@ -432,13 +404,13 @@ void PrintHeaderClientMethod(grpc::protobuf::io::Printer *printer,
printer->Print("}\n");
}
} else {
if (NoStreaming(method)) {
if (method->NoStreaming()) {
printer->Print(*vars,
"::grpc::ClientAsyncResponseReader< $Response$>* "
"Async$Method$Raw(::grpc::ClientContext* context, "
"const $Request$& request, "
"::grpc::CompletionQueue* cq) GRPC_OVERRIDE;\n");
} else if (ClientOnlyStreaming(method)) {
} else if (method->ClientOnlyStreaming()) {
printer->Print(*vars,
"::grpc::ClientWriter< $Request$>* $Method$Raw("
"::grpc::ClientContext* context, $Response$* response) "
@ -448,7 +420,7 @@ void PrintHeaderClientMethod(grpc::protobuf::io::Printer *printer,
"::grpc::ClientAsyncWriter< $Request$>* Async$Method$Raw("
"::grpc::ClientContext* context, $Response$* response, "
"::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;\n");
} else if (ServerOnlyStreaming(method)) {
} else if (method->ServerOnlyStreaming()) {
printer->Print(*vars,
"::grpc::ClientReader< $Response$>* $Method$Raw("
"::grpc::ClientContext* context, const $Request$& request)"
@ -458,7 +430,7 @@ void PrintHeaderClientMethod(grpc::protobuf::io::Printer *printer,
"::grpc::ClientAsyncReader< $Response$>* Async$Method$Raw("
"::grpc::ClientContext* context, const $Request$& request, "
"::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;\n");
} else if (BidiStreaming(method)) {
} else if (method->BidiStreaming()) {
printer->Print(
*vars,
"::grpc::ClientReaderWriter< $Request$, $Response$>* "
@ -472,38 +444,34 @@ void PrintHeaderClientMethod(grpc::protobuf::io::Printer *printer,
}
}
void PrintHeaderClientMethodData(grpc::protobuf::io::Printer *printer,
const grpc::protobuf::MethodDescriptor *method,
void PrintHeaderClientMethodData(Printer *printer, const Method *method,
std::map<grpc::string, grpc::string> *vars) {
(*vars)["Method"] = method->name();
printer->Print(*vars, "const ::grpc::RpcMethod rpcmethod_$Method$_;\n");
}
void PrintHeaderServerMethodSync(grpc::protobuf::io::Printer *printer,
const grpc::protobuf::MethodDescriptor *method,
void PrintHeaderServerMethodSync(Printer *printer, const Method *method,
std::map<grpc::string, grpc::string> *vars) {
(*vars)["Method"] = method->name();
(*vars)["Request"] =
grpc_cpp_generator::ClassName(method->input_type(), true);
(*vars)["Response"] =
grpc_cpp_generator::ClassName(method->output_type(), true);
if (NoStreaming(method)) {
(*vars)["Request"] = method->input_type_name();
(*vars)["Response"] = method->output_type_name();
if (method->NoStreaming()) {
printer->Print(*vars,
"virtual ::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"$Response$* response);\n");
} else if (ClientOnlyStreaming(method)) {
} else if (method->ClientOnlyStreaming()) {
printer->Print(*vars,
"virtual ::grpc::Status $Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerReader< $Request$>* reader, "
"$Response$* response);\n");
} else if (ServerOnlyStreaming(method)) {
} else if (method->ServerOnlyStreaming()) {
printer->Print(*vars,
"virtual ::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"::grpc::ServerWriter< $Response$>* writer);\n");
} else if (BidiStreaming(method)) {
} else if (method->BidiStreaming()) {
printer->Print(
*vars,
"virtual ::grpc::Status $Method$("
@ -514,20 +482,18 @@ void PrintHeaderServerMethodSync(grpc::protobuf::io::Printer *printer,
}
void PrintHeaderServerMethodAsync(
grpc::protobuf::io::Printer *printer,
const grpc::protobuf::MethodDescriptor *method,
Printer *printer,
const Method *method,
std::map<grpc::string, grpc::string> *vars) {
(*vars)["Method"] = method->name();
(*vars)["Request"] =
grpc_cpp_generator::ClassName(method->input_type(), true);
(*vars)["Response"] =
grpc_cpp_generator::ClassName(method->output_type(), true);
(*vars)["Request"] = method->input_type_name();
(*vars)["Response"] = method->output_type_name();
printer->Print(*vars, "template <class BaseClass>\n");
printer->Print(*vars,
"class WithAsyncMethod_$Method$ : public BaseClass {\n");
printer->Print(
" private:\n"
" void BaseClassMustBeDerivedFromService(Service *service) {}\n");
" void BaseClassMustBeDerivedFromService(const Service *service) {}\n");
printer->Print(" public:\n");
printer->Indent();
printer->Print(*vars,
@ -538,7 +504,7 @@ void PrintHeaderServerMethodAsync(
"~WithAsyncMethod_$Method$() GRPC_OVERRIDE {\n"
" BaseClassMustBeDerivedFromService(this);\n"
"}\n");
if (NoStreaming(method)) {
if (method->NoStreaming()) {
printer->Print(
*vars,
"// disable synchronous version of this method\n"
@ -559,7 +525,7 @@ void PrintHeaderServerMethodAsync(
" ::grpc::Service::RequestAsyncUnary($Idx$, context, "
"request, response, new_call_cq, notification_cq, tag);\n");
printer->Print("}\n");
} else if (ClientOnlyStreaming(method)) {
} else if (method->ClientOnlyStreaming()) {
printer->Print(
*vars,
"// disable synchronous version of this method\n"
@ -581,7 +547,7 @@ void PrintHeaderServerMethodAsync(
" ::grpc::Service::RequestAsyncClientStreaming($Idx$, "
"context, reader, new_call_cq, notification_cq, tag);\n");
printer->Print("}\n");
} else if (ServerOnlyStreaming(method)) {
} else if (method->ServerOnlyStreaming()) {
printer->Print(
*vars,
"// disable synchronous version of this method\n"
@ -604,7 +570,7 @@ void PrintHeaderServerMethodAsync(
" ::grpc::Service::RequestAsyncServerStreaming($Idx$, "
"context, request, writer, new_call_cq, notification_cq, tag);\n");
printer->Print("}\n");
} else if (BidiStreaming(method)) {
} else if (method->BidiStreaming()) {
printer->Print(
*vars,
"// disable synchronous version of this method\n"
@ -632,20 +598,18 @@ void PrintHeaderServerMethodAsync(
}
void PrintHeaderServerMethodGeneric(
grpc::protobuf::io::Printer *printer,
const grpc::protobuf::MethodDescriptor *method,
Printer *printer,
const Method *method,
std::map<grpc::string, grpc::string> *vars) {
(*vars)["Method"] = method->name();
(*vars)["Request"] =
grpc_cpp_generator::ClassName(method->input_type(), true);
(*vars)["Response"] =
grpc_cpp_generator::ClassName(method->output_type(), true);
(*vars)["Request"] = method->input_type_name();
(*vars)["Response"] = method->output_type_name();
printer->Print(*vars, "template <class BaseClass>\n");
printer->Print(*vars,
"class WithGenericMethod_$Method$ : public BaseClass {\n");
printer->Print(
" private:\n"
" void BaseClassMustBeDerivedFromService(Service *service) {}\n");
" void BaseClassMustBeDerivedFromService(const Service *service) {}\n");
printer->Print(" public:\n");
printer->Indent();
printer->Print(*vars,
@ -656,7 +620,7 @@ void PrintHeaderServerMethodGeneric(
"~WithGenericMethod_$Method$() GRPC_OVERRIDE {\n"
" BaseClassMustBeDerivedFromService(this);\n"
"}\n");
if (NoStreaming(method)) {
if (method->NoStreaming()) {
printer->Print(
*vars,
"// disable synchronous version of this method\n"
@ -666,7 +630,7 @@ void PrintHeaderServerMethodGeneric(
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
} else if (ClientOnlyStreaming(method)) {
} else if (method->ClientOnlyStreaming()) {
printer->Print(
*vars,
"// disable synchronous version of this method\n"
@ -677,7 +641,7 @@ void PrintHeaderServerMethodGeneric(
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
} else if (ServerOnlyStreaming(method)) {
} else if (method->ServerOnlyStreaming()) {
printer->Print(
*vars,
"// disable synchronous version of this method\n"
@ -688,7 +652,7 @@ void PrintHeaderServerMethodGeneric(
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
} else if (BidiStreaming(method)) {
} else if (method->BidiStreaming()) {
printer->Print(
*vars,
"// disable synchronous version of this method\n"
@ -704,8 +668,8 @@ void PrintHeaderServerMethodGeneric(
printer->Print(*vars, "};\n");
}
void PrintHeaderService(grpc::protobuf::io::Printer *printer,
const grpc::protobuf::ServiceDescriptor *service,
void PrintHeaderService(Printer *printer,
const Service *service,
std::map<grpc::string, grpc::string> *vars) {
(*vars)["Service"] = service->name();
@ -721,13 +685,13 @@ void PrintHeaderService(grpc::protobuf::io::Printer *printer,
printer->Indent();
printer->Print("virtual ~StubInterface() {}\n");
for (int i = 0; i < service->method_count(); ++i) {
PrintHeaderClientMethodInterfaces(printer, service->method(i), vars, true);
PrintHeaderClientMethodInterfaces(printer, service->method(i).get(), vars, true);
}
printer->Outdent();
printer->Print("private:\n");
printer->Indent();
for (int i = 0; i < service->method_count(); ++i) {
PrintHeaderClientMethodInterfaces(printer, service->method(i), vars, false);
PrintHeaderClientMethodInterfaces(printer, service->method(i).get(), vars, false);
}
printer->Outdent();
printer->Print("};\n");
@ -737,17 +701,17 @@ void PrintHeaderService(grpc::protobuf::io::Printer *printer,
printer->Indent();
printer->Print("Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);\n");
for (int i = 0; i < service->method_count(); ++i) {
PrintHeaderClientMethod(printer, service->method(i), vars, true);
PrintHeaderClientMethod(printer, service->method(i).get(), vars, true);
}
printer->Outdent();
printer->Print("\n private:\n");
printer->Indent();
printer->Print("std::shared_ptr< ::grpc::ChannelInterface> channel_;\n");
for (int i = 0; i < service->method_count(); ++i) {
PrintHeaderClientMethod(printer, service->method(i), vars, false);
PrintHeaderClientMethod(printer, service->method(i).get(), vars, false);
}
for (int i = 0; i < service->method_count(); ++i) {
PrintHeaderClientMethodData(printer, service->method(i), vars);
PrintHeaderClientMethodData(printer, service->method(i).get(), vars);
}
printer->Outdent();
printer->Print("};\n");
@ -766,7 +730,7 @@ void PrintHeaderService(grpc::protobuf::io::Printer *printer,
printer->Print("Service();\n");
printer->Print("virtual ~Service();\n");
for (int i = 0; i < service->method_count(); ++i) {
PrintHeaderServerMethodSync(printer, service->method(i), vars);
PrintHeaderServerMethodSync(printer, service->method(i).get(), vars);
}
printer->Outdent();
printer->Print("};\n");
@ -774,13 +738,13 @@ void PrintHeaderService(grpc::protobuf::io::Printer *printer,
// Server side - Asynchronous
for (int i = 0; i < service->method_count(); ++i) {
(*vars)["Idx"] = as_string(i);
PrintHeaderServerMethodAsync(printer, service->method(i), vars);
PrintHeaderServerMethodAsync(printer, service->method(i).get(), vars);
}
printer->Print("typedef ");
for (int i = 0; i < service->method_count(); ++i) {
(*vars)["method_name"] = service->method(i)->name();
(*vars)["method_name"] = service->method(i).get()->name();
printer->Print(*vars, "WithAsyncMethod_$method_name$<");
}
printer->Print("Service");
@ -792,20 +756,19 @@ void PrintHeaderService(grpc::protobuf::io::Printer *printer,
// Server side - Generic
for (int i = 0; i < service->method_count(); ++i) {
(*vars)["Idx"] = as_string(i);
PrintHeaderServerMethodGeneric(printer, service->method(i), vars);
PrintHeaderServerMethodGeneric(printer, service->method(i).get(), vars);
}
printer->Outdent();
printer->Print("};\n");
}
grpc::string GetHeaderServices(const grpc::protobuf::FileDescriptor *file,
grpc::string GetHeaderServices(File *file,
const Parameters &params) {
grpc::string output;
{
// Scope the output stream so it closes and finalizes output to the string.
grpc::protobuf::io::StringOutputStream output_stream(&output);
grpc::protobuf::io::Printer printer(&output_stream, '$');
auto printer = file->CreatePrinter(&output);
std::map<grpc::string, grpc::string> vars;
// Package string is empty or ends with a dot. It is used to fully qualify
// method names.
@ -816,80 +779,76 @@ grpc::string GetHeaderServices(const grpc::protobuf::FileDescriptor *file,
if (!params.services_namespace.empty()) {
vars["services_namespace"] = params.services_namespace;
printer.Print(vars, "\nnamespace $services_namespace$ {\n\n");
printer->Print(vars, "\nnamespace $services_namespace$ {\n\n");
}
for (int i = 0; i < file->service_count(); ++i) {
PrintHeaderService(&printer, file->service(i), &vars);
printer.Print("\n");
PrintHeaderService(printer.get(), file->service(i).get(), &vars);
printer->Print("\n");
}
if (!params.services_namespace.empty()) {
printer.Print(vars, "} // namespace $services_namespace$\n\n");
printer->Print(vars, "} // namespace $services_namespace$\n\n");
}
}
return output;
}
grpc::string GetHeaderEpilogue(const grpc::protobuf::FileDescriptor *file,
grpc::string GetHeaderEpilogue(File *file,
const Parameters &params) {
grpc::string output;
{
// Scope the output stream so it closes and finalizes output to the string.
grpc::protobuf::io::StringOutputStream output_stream(&output);
grpc::protobuf::io::Printer printer(&output_stream, '$');
auto printer = file->CreatePrinter(&output);
std::map<grpc::string, grpc::string> vars;
vars["filename"] = file->name();
vars["filename_identifier"] = FilenameIdentifier(file->name());
vars["filename"] = file->filename();
vars["filename_identifier"] = FilenameIdentifier(file->filename());
if (!file->package().empty()) {
std::vector<grpc::string> parts =
grpc_generator::tokenize(file->package(), ".");
std::vector<grpc::string> parts = file->package_parts();
for (auto part = parts.rbegin(); part != parts.rend(); part++) {
vars["part"] = *part;
printer.Print(vars, "} // namespace $part$\n");
printer->Print(vars, "} // namespace $part$\n");
}
printer.Print(vars, "\n");
printer->Print(vars, "\n");
}
printer.Print(vars, "\n");
printer.Print(vars, "#endif // GRPC_$filename_identifier$__INCLUDED\n");
printer->Print(vars, "\n");
printer->Print(vars, "#endif // GRPC_$filename_identifier$__INCLUDED\n");
}
return output;
}
grpc::string GetSourcePrologue(const grpc::protobuf::FileDescriptor *file,
grpc::string GetSourcePrologue(File *file,
const Parameters &params) {
grpc::string output;
{
// Scope the output stream so it closes and finalizes output to the string.
grpc::protobuf::io::StringOutputStream output_stream(&output);
grpc::protobuf::io::Printer printer(&output_stream, '$');
auto printer = file->CreatePrinter(&output);
std::map<grpc::string, grpc::string> vars;
vars["filename"] = file->name();
vars["filename_base"] = grpc_generator::StripProto(file->name());
vars["filename"] = file->filename();
vars["filename_base"] = file->filename_without_ext();
printer.Print(vars, "// Generated by the gRPC protobuf plugin.\n");
printer.Print(vars,
printer->Print(vars, "// Generated by the gRPC protobuf plugin.\n");
printer->Print(vars,
"// If you make any local change, they will be lost.\n");
printer.Print(vars, "// source: $filename$\n\n");
printer.Print(vars, "#include \"$filename_base$.pb.h\"\n");
printer.Print(vars, "#include \"$filename_base$.grpc.pb.h\"\n");
printer.Print(vars, "\n");
printer->Print(vars, "// source: $filename$\n\n");
printer->Print(vars, "#include \"$filename_base$.pb.h\"\n");
printer->Print(vars, "#include \"$filename_base$.grpc.pb.h\"\n");
printer->Print(vars, "\n");
}
return output;
}
grpc::string GetSourceIncludes(const grpc::protobuf::FileDescriptor *file,
grpc::string GetSourceIncludes(File *file,
const Parameters &params) {
grpc::string output;
{
// Scope the output stream so it closes and finalizes output to the string.
grpc::protobuf::io::StringOutputStream output_stream(&output);
grpc::protobuf::io::Printer printer(&output_stream, '$');
auto printer = file->CreatePrinter(&output);
std::map<grpc::string, grpc::string> vars;
static const char *headers_strs[] = {
@ -903,32 +862,29 @@ grpc::string GetSourceIncludes(const grpc::protobuf::FileDescriptor *file,
"grpc++/impl/codegen/sync_stream.h"
};
std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
PrintIncludes(&printer, headers, params);
PrintIncludes(printer.get(), headers, params);
if (!file->package().empty()) {
std::vector<grpc::string> parts =
grpc_generator::tokenize(file->package(), ".");
std::vector<grpc::string> parts = file->package_parts();
for (auto part = parts.begin(); part != parts.end(); part++) {
vars["part"] = *part;
printer.Print(vars, "namespace $part$ {\n");
printer->Print(vars, "namespace $part$ {\n");
}
}
printer.Print(vars, "\n");
printer->Print(vars, "\n");
}
return output;
}
void PrintSourceClientMethod(grpc::protobuf::io::Printer *printer,
const grpc::protobuf::MethodDescriptor *method,
void PrintSourceClientMethod(Printer *printer,
const Method *method,
std::map<grpc::string, grpc::string> *vars) {
(*vars)["Method"] = method->name();
(*vars)["Request"] =
grpc_cpp_generator::ClassName(method->input_type(), true);
(*vars)["Response"] =
grpc_cpp_generator::ClassName(method->output_type(), true);
if (NoStreaming(method)) {
(*vars)["Request"] = method->input_type_name();
(*vars)["Response"] = method->output_type_name();
if (method->NoStreaming()) {
printer->Print(*vars,
"::grpc::Status $ns$$Service$::Stub::$Method$("
"::grpc::ClientContext* context, "
@ -951,7 +907,7 @@ void PrintSourceClientMethod(grpc::protobuf::io::Printer *printer,
"rpcmethod_$Method$_, "
"context, request);\n"
"}\n\n");
} else if (ClientOnlyStreaming(method)) {
} else if (method->ClientOnlyStreaming()) {
printer->Print(*vars,
"::grpc::ClientWriter< $Request$>* "
"$ns$$Service$::Stub::$Method$Raw("
@ -973,7 +929,7 @@ void PrintSourceClientMethod(grpc::protobuf::io::Printer *printer,
"rpcmethod_$Method$_, "
"context, response, tag);\n"
"}\n\n");
} else if (ServerOnlyStreaming(method)) {
} else if (method->ServerOnlyStreaming()) {
printer->Print(
*vars,
"::grpc::ClientReader< $Response$>* "
@ -996,7 +952,7 @@ void PrintSourceClientMethod(grpc::protobuf::io::Printer *printer,
"rpcmethod_$Method$_, "
"context, request, tag);\n"
"}\n\n");
} else if (BidiStreaming(method)) {
} else if (method->BidiStreaming()) {
printer->Print(
*vars,
"::grpc::ClientReaderWriter< $Request$, $Response$>* "
@ -1023,15 +979,13 @@ void PrintSourceClientMethod(grpc::protobuf::io::Printer *printer,
}
}
void PrintSourceServerMethod(grpc::protobuf::io::Printer *printer,
const grpc::protobuf::MethodDescriptor *method,
void PrintSourceServerMethod(Printer *printer,
const Method *method,
std::map<grpc::string, grpc::string> *vars) {
(*vars)["Method"] = method->name();
(*vars)["Request"] =
grpc_cpp_generator::ClassName(method->input_type(), true);
(*vars)["Response"] =
grpc_cpp_generator::ClassName(method->output_type(), true);
if (NoStreaming(method)) {
(*vars)["Request"] = method->input_type_name();
(*vars)["Response"] = method->output_type_name();
if (method->NoStreaming()) {
printer->Print(*vars,
"::grpc::Status $ns$$Service$::Service::$Method$("
"::grpc::ServerContext* context, "
@ -1043,7 +997,7 @@ void PrintSourceServerMethod(grpc::protobuf::io::Printer *printer,
" return ::grpc::Status("
"::grpc::StatusCode::UNIMPLEMENTED, \"\");\n");
printer->Print("}\n\n");
} else if (ClientOnlyStreaming(method)) {
} else if (method->ClientOnlyStreaming()) {
printer->Print(*vars,
"::grpc::Status $ns$$Service$::Service::$Method$("
"::grpc::ServerContext* context, "
@ -1056,7 +1010,7 @@ void PrintSourceServerMethod(grpc::protobuf::io::Printer *printer,
" return ::grpc::Status("
"::grpc::StatusCode::UNIMPLEMENTED, \"\");\n");
printer->Print("}\n\n");
} else if (ServerOnlyStreaming(method)) {
} else if (method->ServerOnlyStreaming()) {
printer->Print(*vars,
"::grpc::Status $ns$$Service$::Service::$Method$("
"::grpc::ServerContext* context, "
@ -1069,7 +1023,7 @@ void PrintSourceServerMethod(grpc::protobuf::io::Printer *printer,
" return ::grpc::Status("
"::grpc::StatusCode::UNIMPLEMENTED, \"\");\n");
printer->Print("}\n\n");
} else if (BidiStreaming(method)) {
} else if (method->BidiStreaming()) {
printer->Print(*vars,
"::grpc::Status $ns$$Service$::Service::$Method$("
"::grpc::ServerContext* context, "
@ -1084,15 +1038,15 @@ void PrintSourceServerMethod(grpc::protobuf::io::Printer *printer,
}
}
void PrintSourceService(grpc::protobuf::io::Printer *printer,
const grpc::protobuf::ServiceDescriptor *service,
void PrintSourceService(Printer *printer,
const Service *service,
std::map<grpc::string, grpc::string> *vars) {
(*vars)["Service"] = service->name();
printer->Print(*vars,
"static const char* $prefix$$Service$_method_names[] = {\n");
for (int i = 0; i < service->method_count(); ++i) {
(*vars)["Method"] = service->method(i)->name();
(*vars)["Method"] = service->method(i).get()->name();
printer->Print(*vars, " \"/$Package$$Service$/$Method$\",\n");
}
printer->Print(*vars, "};\n\n");
@ -1111,14 +1065,14 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
printer->Indent();
printer->Print(": channel_(channel)");
for (int i = 0; i < service->method_count(); ++i) {
const grpc::protobuf::MethodDescriptor *method = service->method(i);
auto method = service->method(i);
(*vars)["Method"] = method->name();
(*vars)["Idx"] = as_string(i);
if (NoStreaming(method)) {
if (method->NoStreaming()) {
(*vars)["StreamingType"] = "NORMAL_RPC";
} else if (ClientOnlyStreaming(method)) {
} else if (method->ClientOnlyStreaming()) {
(*vars)["StreamingType"] = "CLIENT_STREAMING";
} else if (ServerOnlyStreaming(method)) {
} else if (method->ServerOnlyStreaming()) {
(*vars)["StreamingType"] = "SERVER_STREAMING";
} else {
(*vars)["StreamingType"] = "BIDI_STREAMING";
@ -1135,21 +1089,19 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
for (int i = 0; i < service->method_count(); ++i) {
(*vars)["Idx"] = as_string(i);
PrintSourceClientMethod(printer, service->method(i), vars);
PrintSourceClientMethod(printer, service->method(i).get(), vars);
}
printer->Print(*vars, "$ns$$Service$::Service::Service() {\n");
printer->Indent();
printer->Print(*vars, "(void)$prefix$$Service$_method_names;\n");
for (int i = 0; i < service->method_count(); ++i) {
const grpc::protobuf::MethodDescriptor *method = service->method(i);
auto method = service->method(i);
(*vars)["Idx"] = as_string(i);
(*vars)["Method"] = method->name();
(*vars)["Request"] =
grpc_cpp_generator::ClassName(method->input_type(), true);
(*vars)["Response"] =
grpc_cpp_generator::ClassName(method->output_type(), true);
if (NoStreaming(method)) {
(*vars)["Request"] = method->input_type_name();
(*vars)["Response"] = method->output_type_name();
if (method->NoStreaming()) {
printer->Print(
*vars,
"AddMethod(new ::grpc::RpcServiceMethod(\n"
@ -1159,7 +1111,7 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
"$Request$, "
"$Response$>(\n"
" std::mem_fn(&$ns$$Service$::Service::$Method$), this)));\n");
} else if (ClientOnlyStreaming(method)) {
} else if (method->ClientOnlyStreaming()) {
printer->Print(
*vars,
"AddMethod(new ::grpc::RpcServiceMethod(\n"
@ -1168,7 +1120,7 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
" new ::grpc::ClientStreamingHandler< "
"$ns$$Service$::Service, $Request$, $Response$>(\n"
" std::mem_fn(&$ns$$Service$::Service::$Method$), this)));\n");
} else if (ServerOnlyStreaming(method)) {
} else if (method->ServerOnlyStreaming()) {
printer->Print(
*vars,
"AddMethod(new ::grpc::RpcServiceMethod(\n"
@ -1177,7 +1129,7 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
" new ::grpc::ServerStreamingHandler< "
"$ns$$Service$::Service, $Request$, $Response$>(\n"
" std::mem_fn(&$ns$$Service$::Service::$Method$), this)));\n");
} else if (BidiStreaming(method)) {
} else if (method->BidiStreaming()) {
printer->Print(
*vars,
"AddMethod(new ::grpc::RpcServiceMethod(\n"
@ -1195,17 +1147,16 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
"}\n\n");
for (int i = 0; i < service->method_count(); ++i) {
(*vars)["Idx"] = as_string(i);
PrintSourceServerMethod(printer, service->method(i), vars);
PrintSourceServerMethod(printer, service->method(i).get(), vars);
}
}
grpc::string GetSourceServices(const grpc::protobuf::FileDescriptor *file,
grpc::string GetSourceServices(File *file,
const Parameters &params) {
grpc::string output;
{
// Scope the output stream so it closes and finalizes output to the string.
grpc::protobuf::io::StringOutputStream output_stream(&output);
grpc::protobuf::io::Printer printer(&output_stream, '$');
auto printer = file->CreatePrinter(&output);
std::map<grpc::string, grpc::string> vars;
// Package string is empty or ends with a dot. It is used to fully qualify
// method names.
@ -1222,20 +1173,19 @@ grpc::string GetSourceServices(const grpc::protobuf::FileDescriptor *file,
}
for (int i = 0; i < file->service_count(); ++i) {
PrintSourceService(&printer, file->service(i), &vars);
printer.Print("\n");
PrintSourceService(printer.get(), file->service(i).get(), &vars);
printer->Print("\n");
}
}
return output;
}
grpc::string GetSourceEpilogue(const grpc::protobuf::FileDescriptor *file,
grpc::string GetSourceEpilogue(File *file,
const Parameters &params) {
grpc::string temp;
if (!file->package().empty()) {
std::vector<grpc::string> parts =
grpc_generator::tokenize(file->package(), ".");
std::vector<grpc::string> parts = file->package_parts();
for (auto part = parts.begin(); part != parts.end(); part++) {
temp.append("} // namespace ");

@ -34,7 +34,23 @@
#ifndef GRPC_INTERNAL_COMPILER_CPP_GENERATOR_H
#define GRPC_INTERNAL_COMPILER_CPP_GENERATOR_H
#include "src/compiler/config.h"
// cpp_generator.h/.cc do not directly depend on GRPC/ProtoBuf, such that they
// can be used to generate code for other serialization systems, such as
// FlatBuffers.
#include <memory>
#include <vector>
#ifndef GRPC_CUSTOM_STRING
#include <string>
#define GRPC_CUSTOM_STRING std::string
#endif
namespace grpc {
typedef GRPC_CUSTOM_STRING string;
} // namespace grpc
namespace grpc_cpp_generator {
@ -48,37 +64,80 @@ struct Parameters {
grpc::string grpc_search_path;
};
// An abstract interface representing a method.
struct Method {
virtual ~Method() {}
virtual grpc::string name() const = 0;
virtual grpc::string input_type_name() const = 0;
virtual grpc::string output_type_name() const = 0;
virtual bool NoStreaming() const = 0;
virtual bool ClientOnlyStreaming() const = 0;
virtual bool ServerOnlyStreaming() const = 0;
virtual bool BidiStreaming() const = 0;
};
// An abstract interface representing a service.
struct Service {
virtual ~Service() {}
virtual grpc::string name() const = 0;
virtual int method_count() const = 0;
virtual std::unique_ptr<const Method> method(int i) const = 0;
};
struct Printer {
virtual ~Printer() {}
virtual void Print(const std::map<grpc::string, grpc::string> &vars,
const char *template_string) = 0;
virtual void Print(const char *string) = 0;
virtual void Indent() = 0;
virtual void Outdent() = 0;
};
// An interface that allows the source generated to be output using various
// libraries/idls/serializers.
struct File {
virtual ~File() {}
virtual grpc::string filename() const = 0;
virtual grpc::string filename_without_ext() const = 0;
virtual grpc::string package() const = 0;
virtual std::vector<grpc::string> package_parts() const = 0;
virtual int service_count() const = 0;
virtual std::unique_ptr<const Service> service(int i) const = 0;
virtual std::unique_ptr<Printer> CreatePrinter(grpc::string *str) const = 0;
};
// Return the prologue of the generated header file.
grpc::string GetHeaderPrologue(const grpc::protobuf::FileDescriptor *file,
const Parameters &params);
grpc::string GetHeaderPrologue(File *file, const Parameters &params);
// Return the includes needed for generated header file.
grpc::string GetHeaderIncludes(const grpc::protobuf::FileDescriptor *file,
const Parameters &params);
grpc::string GetHeaderIncludes(File *file, const Parameters &params);
// Return the includes needed for generated source file.
grpc::string GetSourceIncludes(const grpc::protobuf::FileDescriptor *file,
const Parameters &params);
grpc::string GetSourceIncludes(File *file, const Parameters &params);
// Return the epilogue of the generated header file.
grpc::string GetHeaderEpilogue(const grpc::protobuf::FileDescriptor *file,
const Parameters &params);
grpc::string GetHeaderEpilogue(File *file, const Parameters &params);
// Return the prologue of the generated source file.
grpc::string GetSourcePrologue(const grpc::protobuf::FileDescriptor *file,
const Parameters &params);
grpc::string GetSourcePrologue(File *file, const Parameters &params);
// Return the services for generated header file.
grpc::string GetHeaderServices(const grpc::protobuf::FileDescriptor *file,
const Parameters &params);
grpc::string GetHeaderServices(File *file, const Parameters &params);
// Return the services for generated source file.
grpc::string GetSourceServices(const grpc::protobuf::FileDescriptor *file,
const Parameters &params);
grpc::string GetSourceServices(File *file, const Parameters &params);
// Return the epilogue of the generated source file.
grpc::string GetSourceEpilogue(const grpc::protobuf::FileDescriptor *file,
const Parameters &params);
grpc::string GetSourceEpilogue(File *file, const Parameters &params);
} // namespace grpc_cpp_generator

@ -41,6 +41,105 @@
#include "src/compiler/cpp_generator.h"
#include "src/compiler/cpp_generator_helpers.h"
class ProtoBufMethod : public grpc_cpp_generator::Method {
public:
ProtoBufMethod(const grpc::protobuf::MethodDescriptor *method)
: method_(method) {}
grpc::string name() const { return method_->name(); }
grpc::string input_type_name() const {
return grpc_cpp_generator::ClassName(method_->input_type(), true);
}
grpc::string output_type_name() const {
return grpc_cpp_generator::ClassName(method_->output_type(), true);
}
bool NoStreaming() const {
return !method_->client_streaming() && !method_->server_streaming();
}
bool ClientOnlyStreaming() const {
return method_->client_streaming() && !method_->server_streaming();
}
bool ServerOnlyStreaming() const {
return !method_->client_streaming() && method_->server_streaming();
}
bool BidiStreaming() const {
return method_->client_streaming() && method_->server_streaming();
}
private:
const grpc::protobuf::MethodDescriptor *method_;
};
class ProtoBufService : public grpc_cpp_generator::Service {
public:
ProtoBufService(const grpc::protobuf::ServiceDescriptor *service)
: service_(service) {}
grpc::string name() const { return service_->name(); }
int method_count() const { return service_->method_count(); };
std::unique_ptr<const grpc_cpp_generator::Method> method(int i) const {
return std::unique_ptr<const grpc_cpp_generator::Method>(
new ProtoBufMethod(service_->method(i)));
};
private:
const grpc::protobuf::ServiceDescriptor *service_;
};
class ProtoBufPrinter : public grpc_cpp_generator::Printer {
public:
ProtoBufPrinter(grpc::string *str)
: output_stream_(str), printer_(&output_stream_, '$') {}
void Print(const std::map<grpc::string, grpc::string> &vars,
const char *string_template) {
printer_.Print(vars, string_template);
}
void Print(const char *string) { printer_.Print(string); }
void Indent() { printer_.Indent(); }
void Outdent() { printer_.Outdent(); }
private:
grpc::protobuf::io::StringOutputStream output_stream_;
grpc::protobuf::io::Printer printer_;
};
class ProtoBufFile : public grpc_cpp_generator::File {
public:
ProtoBufFile(const grpc::protobuf::FileDescriptor *file) : file_(file) {}
grpc::string filename() const { return file_->name(); }
grpc::string filename_without_ext() const {
return grpc_generator::StripProto(filename());
}
grpc::string package() const { return file_->package(); }
std::vector<grpc::string> package_parts() const {
return grpc_generator::tokenize(package(), ".");
}
int service_count() const { return file_->service_count(); };
std::unique_ptr<const grpc_cpp_generator::Service> service(int i) const {
return std::unique_ptr<const grpc_cpp_generator::Service> (
new ProtoBufService(file_->service(i)));
}
std::unique_ptr<grpc_cpp_generator::Printer> CreatePrinter(grpc::string *str) const {
return std::unique_ptr<grpc_cpp_generator::Printer>(
new ProtoBufPrinter(str));
}
private:
const grpc::protobuf::FileDescriptor *file_;
};
class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
public:
CppGrpcGenerator() {}
@ -61,6 +160,8 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
grpc_cpp_generator::Parameters generator_parameters;
generator_parameters.use_system_headers = true;
ProtoBufFile pbfile(file);
if (!parameter.empty()) {
std::vector<grpc::string> parameters_list =
grpc_generator::tokenize(parameter, ",");
@ -92,10 +193,10 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
grpc::string file_name = grpc_generator::StripProto(file->name());
grpc::string header_code =
grpc_cpp_generator::GetHeaderPrologue(file, generator_parameters) +
grpc_cpp_generator::GetHeaderIncludes(file, generator_parameters) +
grpc_cpp_generator::GetHeaderServices(file, generator_parameters) +
grpc_cpp_generator::GetHeaderEpilogue(file, generator_parameters);
grpc_cpp_generator::GetHeaderPrologue(&pbfile, generator_parameters) +
grpc_cpp_generator::GetHeaderIncludes(&pbfile, generator_parameters) +
grpc_cpp_generator::GetHeaderServices(&pbfile, generator_parameters) +
grpc_cpp_generator::GetHeaderEpilogue(&pbfile, generator_parameters);
std::unique_ptr<grpc::protobuf::io::ZeroCopyOutputStream> header_output(
context->Open(file_name + ".grpc.pb.h"));
grpc::protobuf::io::CodedOutputStream header_coded_out(
@ -103,10 +204,10 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
header_coded_out.WriteRaw(header_code.data(), header_code.size());
grpc::string source_code =
grpc_cpp_generator::GetSourcePrologue(file, generator_parameters) +
grpc_cpp_generator::GetSourceIncludes(file, generator_parameters) +
grpc_cpp_generator::GetSourceServices(file, generator_parameters) +
grpc_cpp_generator::GetSourceEpilogue(file, generator_parameters);
grpc_cpp_generator::GetSourcePrologue(&pbfile, generator_parameters) +
grpc_cpp_generator::GetSourceIncludes(&pbfile, generator_parameters) +
grpc_cpp_generator::GetSourceServices(&pbfile, generator_parameters) +
grpc_cpp_generator::GetSourceEpilogue(&pbfile, generator_parameters);
std::unique_ptr<grpc::protobuf::io::ZeroCopyOutputStream> source_output(
context->Open(file_name + ".grpc.pb.cc"));
grpc::protobuf::io::CodedOutputStream source_coded_out(

@ -1159,6 +1159,10 @@ static void cancel_from_api(grpc_exec_ctx *exec_ctx,
grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status,
NULL);
}
if (status != GRPC_STATUS_OK && !stream_global->seen_error) {
stream_global->seen_error = 1;
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
}
grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1,
1);
}

@ -454,7 +454,7 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr,
&sockname_len)) {
port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp);
if (port > 0) {
allocated_addr = malloc(addr_len);
allocated_addr = gpr_malloc(addr_len);
memcpy(allocated_addr, addr, addr_len);
grpc_sockaddr_set_port(allocated_addr, port);
addr = allocated_addr;

@ -467,7 +467,7 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr,
(struct sockaddr *)&sockname_temp, &sockname_len)) {
port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp);
if (port > 0) {
allocated_addr = malloc(addr_len);
allocated_addr = gpr_malloc(addr_len);
memcpy(allocated_addr, addr, addr_len);
grpc_sockaddr_set_port(allocated_addr, port);
addr = allocated_addr;

@ -328,7 +328,7 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr,
&sockname_len)) {
port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp);
if (port > 0) {
allocated_addr = malloc(addr_len);
allocated_addr = gpr_malloc(addr_len);
memcpy(allocated_addr, addr, addr_len);
grpc_sockaddr_set_port(allocated_addr, port);
addr = allocated_addr;

@ -208,6 +208,7 @@ static void init_output() {
}
static void rotate_log() {
/* Using malloc here, as this code could end up being called by gpr_malloc */
gpr_timer_log *new = malloc(sizeof(*new));
gpr_once_init(&g_once_init, init_output);
new->num_entries = 0;

@ -53,6 +53,7 @@ void gpr_set_allocation_functions(gpr_allocation_functions functions) {
void *gpr_malloc(size_t size) {
void *p;
if (size == 0) return NULL;
GPR_TIMER_BEGIN("gpr_malloc", 0);
p = g_alloc_functions.malloc_fn(size);
if (!p) {
@ -69,6 +70,7 @@ void gpr_free(void *p) {
}
void *gpr_realloc(void *p, size_t size) {
if ((size == 0) && (p == NULL)) return NULL;
GPR_TIMER_BEGIN("gpr_realloc", 0);
p = g_alloc_functions.realloc_fn(p, size);
if (!p) {

@ -68,6 +68,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
}
va_end(args);
gpr_log_message(file, line, severity, message);
/* message has been allocated by vasprintf above, and needs free */
free(message);
}

@ -81,6 +81,7 @@ int gpr_thd_new(gpr_thd_id *t, void (*thd_body)(void *arg), void *arg,
thread_started = (pthread_create(&p, &attr, &thread_body, a) == 0);
GPR_ASSERT(pthread_attr_destroy(&attr) == 0);
if (!thread_started) {
/* don't use gpr_free, as this was allocated using malloc (see above) */
free(a);
}
*t = (gpr_thd_id)p;

@ -44,7 +44,7 @@ grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices,
grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create(
gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression) {
size_t i;
grpc_byte_buffer *bb = malloc(sizeof(grpc_byte_buffer));
grpc_byte_buffer *bb = gpr_malloc(sizeof(grpc_byte_buffer));
bb->type = GRPC_BB_RAW;
bb->data.raw.compression = compression;
gpr_slice_buffer_init(&bb->data.raw.slice_buffer);
@ -57,7 +57,7 @@ grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create(
grpc_byte_buffer *grpc_raw_byte_buffer_from_reader(
grpc_byte_buffer_reader *reader) {
grpc_byte_buffer *bb = malloc(sizeof(grpc_byte_buffer));
grpc_byte_buffer *bb = gpr_malloc(sizeof(grpc_byte_buffer));
gpr_slice slice;
bb->type = GRPC_BB_RAW;
bb->data.raw.compression = GRPC_COMPRESS_NONE;
@ -85,7 +85,7 @@ void grpc_byte_buffer_destroy(grpc_byte_buffer *bb) {
gpr_slice_buffer_destroy(&bb->data.raw.slice_buffer);
break;
}
free(bb);
gpr_free(bb);
}
size_t grpc_byte_buffer_length(grpc_byte_buffer *bb) {

@ -36,6 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/useful.h>
@ -134,12 +135,12 @@ static void tsi_fake_frame_reset(tsi_fake_frame *frame, int needs_draining) {
static int tsi_fake_frame_ensure_size(tsi_fake_frame *frame) {
if (frame->data == NULL) {
frame->allocated_size = frame->size;
frame->data = malloc(frame->allocated_size);
frame->data = gpr_malloc(frame->allocated_size);
if (frame->data == NULL) return 0;
} else if (frame->size > frame->allocated_size) {
unsigned char *new_data = realloc(frame->data, frame->size);
unsigned char *new_data = gpr_realloc(frame->data, frame->size);
if (new_data == NULL) {
free(frame->data);
gpr_free(frame->data);
frame->data = NULL;
return 0;
}
@ -160,7 +161,7 @@ static tsi_result fill_frame_from_bytes(const unsigned char *incoming_bytes,
if (frame->needs_draining) return TSI_INTERNAL_ERROR;
if (frame->data == NULL) {
frame->allocated_size = TSI_FAKE_FRAME_INITIAL_ALLOCATED_SIZE;
frame->data = malloc(frame->allocated_size);
frame->data = gpr_malloc(frame->allocated_size);
if (frame->data == NULL) return TSI_OUT_OF_RESOURCES;
}
@ -226,7 +227,7 @@ static tsi_result bytes_to_frame(unsigned char *bytes, size_t bytes_size,
}
static void tsi_fake_frame_destruct(tsi_fake_frame *frame) {
if (frame->data != NULL) free(frame->data);
if (frame->data != NULL) gpr_free(frame->data);
}
/* --- tsi_frame_protector methods implementation. ---*/
@ -366,7 +367,7 @@ static void fake_protector_destroy(tsi_frame_protector *self) {
tsi_fake_frame_protector *impl = (tsi_fake_frame_protector *)self;
tsi_fake_frame_destruct(&impl->protect_frame);
tsi_fake_frame_destruct(&impl->unprotect_frame);
free(self);
gpr_free(self);
}
static const tsi_frame_protector_vtable frame_protector_vtable = {
@ -488,7 +489,7 @@ static void fake_handshaker_destroy(tsi_handshaker *self) {
tsi_fake_handshaker *impl = (tsi_fake_handshaker *)self;
tsi_fake_frame_destruct(&impl->incoming);
tsi_fake_frame_destruct(&impl->outgoing);
free(self);
gpr_free(self);
}
static const tsi_handshaker_vtable handshaker_vtable = {
@ -501,7 +502,8 @@ static const tsi_handshaker_vtable handshaker_vtable = {
};
tsi_handshaker *tsi_create_fake_handshaker(int is_client) {
tsi_fake_handshaker *impl = calloc(1, sizeof(tsi_fake_handshaker));
tsi_fake_handshaker *impl = gpr_malloc(sizeof(*impl));
memset(impl, 0, sizeof(*impl));
impl->base.vtable = &handshaker_vtable;
impl->is_client = is_client;
impl->result = TSI_HANDSHAKE_IN_PROGRESS;
@ -517,8 +519,8 @@ tsi_handshaker *tsi_create_fake_handshaker(int is_client) {
tsi_frame_protector *tsi_create_fake_protector(
size_t *max_protected_frame_size) {
tsi_fake_frame_protector *impl = calloc(1, sizeof(tsi_fake_frame_protector));
if (impl == NULL) return NULL;
tsi_fake_frame_protector *impl = gpr_malloc(sizeof(*impl));
memset(impl, 0, sizeof(*impl));
impl->max_frame_size = (max_protected_frame_size == NULL)
? TSI_FAKE_DEFAULT_FRAME_SIZE
: *max_protected_frame_size;

@ -45,6 +45,7 @@
#include <arpa/inet.h>
#endif
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/thd.h>
@ -148,8 +149,7 @@ static void init_openssl(void) {
OpenSSL_add_all_algorithms();
num_locks = CRYPTO_num_locks();
GPR_ASSERT(num_locks > 0);
openssl_mutexes = malloc((size_t)num_locks * sizeof(gpr_mu));
GPR_ASSERT(openssl_mutexes != NULL);
openssl_mutexes = gpr_malloc((size_t)num_locks * sizeof(gpr_mu));
for (i = 0; i < CRYPTO_num_locks(); i++) {
gpr_mu_init(&openssl_mutexes[i]);
}
@ -701,7 +701,7 @@ static tsi_result build_alpn_protocol_name_list(
}
*protocol_name_list_length += (size_t)alpn_protocols_lengths[i] + 1;
}
*protocol_name_list = malloc(*protocol_name_list_length);
*protocol_name_list = gpr_malloc(*protocol_name_list_length);
if (*protocol_name_list == NULL) return TSI_OUT_OF_RESOURCES;
current = *protocol_name_list;
for (i = 0; i < num_alpn_protocols; i++) {
@ -852,9 +852,9 @@ static tsi_result ssl_protector_unprotect(
static void ssl_protector_destroy(tsi_frame_protector *self) {
tsi_ssl_frame_protector *impl = (tsi_ssl_frame_protector *)self;
if (impl->buffer != NULL) free(impl->buffer);
if (impl->buffer != NULL) gpr_free(impl->buffer);
if (impl->ssl != NULL) SSL_free(impl->ssl);
free(self);
gpr_free(self);
}
static const tsi_frame_protector_vtable frame_protector_vtable = {
@ -966,8 +966,9 @@ static tsi_result ssl_handshaker_extract_peer(tsi_handshaker *self,
if (alpn_selected != NULL) {
size_t i;
tsi_peer_property *new_properties =
calloc(1, sizeof(tsi_peer_property) * (peer->property_count + 1));
if (new_properties == NULL) return TSI_OUT_OF_RESOURCES;
gpr_malloc(sizeof(*new_properties) * (peer->property_count + 1));
memset(new_properties, 0,
sizeof(*new_properties) * (peer->property_count + 1));
for (i = 0; i < peer->property_count; i++) {
new_properties[i] = peer->properties[i];
}
@ -975,10 +976,10 @@ static tsi_result ssl_handshaker_extract_peer(tsi_handshaker *self,
TSI_SSL_ALPN_SELECTED_PROTOCOL, (const char *)alpn_selected,
alpn_selected_len, &new_properties[peer->property_count]);
if (result != TSI_OK) {
free(new_properties);
gpr_free(new_properties);
return result;
}
if (peer->properties != NULL) free(peer->properties);
if (peer->properties != NULL) gpr_free(peer->properties);
peer->property_count++;
peer->properties = new_properties;
}
@ -991,11 +992,8 @@ static tsi_result ssl_handshaker_create_frame_protector(
size_t actual_max_output_protected_frame_size =
TSI_SSL_MAX_PROTECTED_FRAME_SIZE_UPPER_BOUND;
tsi_ssl_handshaker *impl = (tsi_ssl_handshaker *)self;
tsi_ssl_frame_protector *protector_impl =
calloc(1, sizeof(tsi_ssl_frame_protector));
if (protector_impl == NULL) {
return TSI_OUT_OF_RESOURCES;
}
tsi_ssl_frame_protector *protector_impl = gpr_malloc(sizeof(*protector_impl));
memset(protector_impl, 0, sizeof(*protector_impl));
if (max_output_protected_frame_size != NULL) {
if (*max_output_protected_frame_size >
@ -1011,11 +1009,11 @@ static tsi_result ssl_handshaker_create_frame_protector(
}
protector_impl->buffer_size =
actual_max_output_protected_frame_size - TSI_SSL_MAX_PROTECTION_OVERHEAD;
protector_impl->buffer = malloc(protector_impl->buffer_size);
protector_impl->buffer = gpr_malloc(protector_impl->buffer_size);
if (protector_impl->buffer == NULL) {
gpr_log(GPR_ERROR,
"Could not allocated buffer for tsi_ssl_frame_protector.");
free(protector_impl);
gpr_free(protector_impl);
return TSI_INTERNAL_ERROR;
}
@ -1034,7 +1032,7 @@ static tsi_result ssl_handshaker_create_frame_protector(
static void ssl_handshaker_destroy(tsi_handshaker *self) {
tsi_ssl_handshaker *impl = (tsi_ssl_handshaker *)self;
SSL_free(impl->ssl); /* The BIO objects are owned by ssl */
free(impl);
gpr_free(impl);
}
static const tsi_handshaker_vtable handshaker_vtable = {
@ -1111,11 +1109,8 @@ static tsi_result create_tsi_ssl_handshaker(SSL_CTX *ctx, int is_client,
SSL_set_accept_state(ssl);
}
impl = calloc(1, sizeof(tsi_ssl_handshaker));
if (impl == NULL) {
SSL_free(ssl);
return TSI_OUT_OF_RESOURCES;
}
impl = gpr_malloc(sizeof(*impl));
memset(impl, 0, sizeof(*impl));
impl->ssl = ssl;
impl->into_ssl = into_ssl;
impl->from_ssl = from_ssl;
@ -1167,8 +1162,8 @@ static void ssl_client_handshaker_factory_destroy(
tsi_ssl_client_handshaker_factory *impl =
(tsi_ssl_client_handshaker_factory *)self;
if (impl->ssl_context != NULL) SSL_CTX_free(impl->ssl_context);
if (impl->alpn_protocol_list != NULL) free(impl->alpn_protocol_list);
free(impl);
if (impl->alpn_protocol_list != NULL) gpr_free(impl->alpn_protocol_list);
gpr_free(impl);
}
static int client_handshaker_factory_npn_callback(SSL *ssl, unsigned char **out,
@ -1209,12 +1204,12 @@ static void ssl_server_handshaker_factory_destroy(
tsi_peer_destruct(&impl->ssl_context_x509_subject_names[i]);
}
}
if (impl->ssl_contexts != NULL) free(impl->ssl_contexts);
if (impl->ssl_contexts != NULL) gpr_free(impl->ssl_contexts);
if (impl->ssl_context_x509_subject_names != NULL) {
free(impl->ssl_context_x509_subject_names);
gpr_free(impl->ssl_context_x509_subject_names);
}
if (impl->alpn_protocol_list != NULL) free(impl->alpn_protocol_list);
free(impl);
if (impl->alpn_protocol_list != NULL) gpr_free(impl->alpn_protocol_list);
gpr_free(impl);
}
static int does_entry_match_name(const char *entry, size_t entry_length,
@ -1333,11 +1328,8 @@ tsi_result tsi_create_ssl_client_handshaker_factory(
return TSI_INVALID_ARGUMENT;
}
impl = calloc(1, sizeof(tsi_ssl_client_handshaker_factory));
if (impl == NULL) {
SSL_CTX_free(ssl_context);
return TSI_OUT_OF_RESOURCES;
}
impl = gpr_malloc(sizeof(*impl));
memset(impl, 0, sizeof(*impl));
impl->ssl_context = ssl_context;
do {
@ -1411,14 +1403,17 @@ tsi_result tsi_create_ssl_server_handshaker_factory(
return TSI_INVALID_ARGUMENT;
}
impl = calloc(1, sizeof(tsi_ssl_server_handshaker_factory));
if (impl == NULL) return TSI_OUT_OF_RESOURCES;
impl = gpr_malloc(sizeof(*impl));
memset(impl, 0, sizeof(*impl));
impl->base.create_handshaker =
ssl_server_handshaker_factory_create_handshaker;
impl->base.destroy = ssl_server_handshaker_factory_destroy;
impl->ssl_contexts = calloc(key_cert_pair_count, sizeof(SSL_CTX *));
impl->ssl_contexts = gpr_malloc(key_cert_pair_count * sizeof(SSL_CTX *));
memset(impl->ssl_contexts, 0, key_cert_pair_count * sizeof(SSL_CTX *));
impl->ssl_context_x509_subject_names =
calloc(key_cert_pair_count, sizeof(tsi_peer));
gpr_malloc(key_cert_pair_count * sizeof(tsi_peer));
memset(impl->ssl_context_x509_subject_names, 0,
key_cert_pair_count * sizeof(tsi_peer));
if (impl->ssl_contexts == NULL ||
impl->ssl_context_x509_subject_names == NULL) {
tsi_ssl_handshaker_factory_destroy(&impl->base);

@ -33,6 +33,9 @@
#include "src/core/lib/tsi/transport_security.h"
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
#include <stdlib.h>
#include <string.h>
@ -40,19 +43,6 @@
int tsi_tracing_enabled = 0;
/* --- Utils. --- */
char *tsi_strdup(const char *src) {
char *dst;
size_t len;
if (!src) return NULL;
len = strlen(src) + 1;
dst = malloc(len);
if (!dst) return NULL;
memcpy(dst, src, len);
return dst;
}
/* --- tsi_result common implementation. --- */
const char *tsi_result_to_string(tsi_result result) {
@ -214,15 +204,15 @@ static void tsi_peer_destroy_list_property(tsi_peer_property *children,
for (i = 0; i < child_count; i++) {
tsi_peer_property_destruct(&children[i]);
}
free(children);
gpr_free(children);
}
void tsi_peer_property_destruct(tsi_peer_property *property) {
if (property->name != NULL) {
free(property->name);
gpr_free(property->name);
}
if (property->value.data != NULL) {
free(property->value.data);
gpr_free(property->value.data);
}
*property = tsi_init_peer_property(); /* Reset everything to 0. */
}
@ -239,16 +229,10 @@ void tsi_peer_destruct(tsi_peer *self) {
tsi_result tsi_construct_allocated_string_peer_property(
const char *name, size_t value_length, tsi_peer_property *property) {
*property = tsi_init_peer_property();
if (name != NULL) {
property->name = tsi_strdup(name);
if (property->name == NULL) return TSI_OUT_OF_RESOURCES;
}
if (name != NULL) property->name = gpr_strdup(name);
if (value_length > 0) {
property->value.data = calloc(1, value_length);
if (property->value.data == NULL) {
tsi_peer_property_destruct(property);
return TSI_OUT_OF_RESOURCES;
}
property->value.data = gpr_malloc(value_length);
memset(property->value.data, 0, value_length);
property->value.length = value_length;
}
return TSI_OK;
@ -276,8 +260,8 @@ tsi_result tsi_construct_string_peer_property(const char *name,
tsi_result tsi_construct_peer(size_t property_count, tsi_peer *peer) {
memset(peer, 0, sizeof(tsi_peer));
if (property_count > 0) {
peer->properties = calloc(property_count, sizeof(tsi_peer_property));
if (peer->properties == NULL) return TSI_OUT_OF_RESOURCES;
peer->properties = gpr_malloc(property_count * sizeof(tsi_peer_property));
memset(peer->properties, 0, property_count * sizeof(tsi_peer_property));
peer->property_count = property_count;
}
return TSI_OK;

@ -63,20 +63,14 @@
"src/node/health_check",
"src/proto",
"etc",
% for module in node_modules:
% for file in module.headers + module.src + module.js:
"${file}",
% endfor
% for dep in module.transitive_deps:
% for lib in libs:
% if lib.name == dep:
% for file in lib.get('public_headers', []) + lib.headers + lib.src:
"${file}",
% endfor
% endif
% endfor
% endfor
% endfor
"src/node/index.js",
"src/node/src",
"src/node/ext",
"include/grpc",
"src/core",
"third_party/nanopb",
"third_party/zlib",
"third_party/boringssl",
"binding.gyp"
],
"main": "src/node/index.js",

@ -35,7 +35,13 @@ template: |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
flags="-max_total_time=$runtime -jobs=3 -workers=3 -artifact_prefix=fuzzer_output/ -max_len=${selected.maxlen}"
flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=${selected.maxlen}"
if [ "$jobs" != "1" ]
then
flags="-jobs=$jobs -workers=$jobs $flags"
fi
if [ "$config" == "asan-trace-cmp" ]
then
flags="-use_traces=1 $flags"

@ -0,0 +1,160 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/surface/channel.h"
#include "test/core/util/memory_counters.h"
#include "test/core/util/mock_endpoint.h"
static const bool squelch = true;
static void discard_write(gpr_slice slice) {}
static void *tag(int n) { return (void *)(uintptr_t)n; }
static void dont_log(gpr_log_func_args *args) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
grpc_test_only_set_metadata_hash_seed(0);
struct grpc_memory_counters counters;
if (squelch) gpr_set_log_function(dont_log);
grpc_memory_counters_init();
grpc_init();
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_endpoint *mock_endpoint = grpc_mock_endpoint_create(discard_write);
grpc_completion_queue *cq = grpc_completion_queue_create(NULL);
grpc_transport *transport =
grpc_create_chttp2_transport(&exec_ctx, NULL, mock_endpoint, 1);
grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0);
grpc_channel *channel = grpc_channel_create(
&exec_ctx, "test-target", NULL, GRPC_CLIENT_DIRECT_CHANNEL, transport);
grpc_call *call =
grpc_channel_create_call(channel, NULL, 0, cq, "/foo", "localhost",
gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array_init(&initial_metadata_recv);
grpc_byte_buffer *response_payload_recv = NULL;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array_init(&trailing_metadata_recv);
grpc_status_code status;
char *details = NULL;
size_t details_capacity = 0;
grpc_op ops[6];
grpc_op *op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = &initial_metadata_recv;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &response_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv;
op->data.recv_status_on_client.status = &status;
op->data.recv_status_on_client.status_details = &details;
op->data.recv_status_on_client.status_details_capacity = &details_capacity;
op->flags = 0;
op->reserved = NULL;
op++;
grpc_call_error error =
grpc_call_start_batch(call, ops, (size_t)(op - ops), tag(1), NULL);
int requested_calls = 1;
GPR_ASSERT(GRPC_CALL_OK == error);
grpc_mock_endpoint_put_read(
&exec_ctx, mock_endpoint,
gpr_slice_from_copied_buffer((const char *)data, size));
grpc_event ev;
while (1) {
grpc_exec_ctx_flush(&exec_ctx);
ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
switch (ev.type) {
case GRPC_QUEUE_TIMEOUT:
goto done;
case GRPC_QUEUE_SHUTDOWN:
break;
case GRPC_OP_COMPLETE:
requested_calls--;
break;
}
}
done:
if (requested_calls) {
grpc_call_cancel(call, NULL);
}
for (int i = 0; i < requested_calls; i++) {
ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
}
grpc_completion_queue_shutdown(cq);
for (int i = 0; i < requested_calls; i++) {
ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
GPR_ASSERT(ev.type == GRPC_QUEUE_SHUTDOWN);
}
grpc_call_destroy(call);
grpc_completion_queue_destroy(cq);
grpc_metadata_array_destroy(&initial_metadata_recv);
grpc_metadata_array_destroy(&trailing_metadata_recv);
gpr_free(details);
grpc_channel_destroy(channel);
if (response_payload_recv != NULL) {
grpc_byte_buffer_destroy(response_payload_recv);
}
grpc_shutdown();
counters = grpc_memory_counters_snapshot();
grpc_memory_counters_destroy();
GPR_ASSERT(counters.total_size_relative == 0);
return 0;
}

@ -0,0 +1 @@
!mm!N!mmN<EFBFBD><EFBFBD><EFBFBD>!<EFBFBD>m!<EFBFBD>NN'<EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD>!<EFBFBD>m!<EFBFBD>NNN<EFBFBD>NNN'<EFBFBD>)<EFBFBD><EFBFBD>N<EFBFBD>NNN

@ -0,0 +1,2 @@
!mm!N!mmÿ!m)m!‘‘N!‘‘Nð‘NN)‘
‘a‘‘‘‘NNN•‘‘!‘m!)‘‘'NN‘‘•‘!‘Nm!N‘NNNN‘NNN'‘)‘‘N‘NNN

@ -0,0 +1 @@
!mm <EFBFBD><EFBFBD>N!<EFBFBD><EFBFBD>N<EFBFBD>N'<EFBFBD>)<EFBFBD><EFBFBD>NN

@ -0,0 +1,2 @@
!mm!N!mm!m)m!‘‘N!‘‘Nð‘NN)‘
‘a‘‘‘‘NNN•‘‘!‘m!)‘‘'NN‘‘•‘!‘Nm!N‘NNNN‘NNN'‘)‘‘N‘NNN

@ -0,0 +1,2 @@
!mm!N1mm!m)m!‘‘N!‘‘Nð‘NN)‘
‘a‘‘‘‘NNN•‘‘!‘m!‘‘‘N'N‘•‘!‘mNN!‘NNN‘NNN'Ñ)‘‘N‘NNN

@ -0,0 +1,2 @@
!mm!N!mmÿÿ!m)m!‘‘N!‘±Nð‘NN)‘
‘a‘‘‘‘NNN•‘‘!‘m!)‘‘'NN‘‘)•‘!‘Nm!N‘NJNN‘NNN–'‘)‘‘N‘NNN

@ -0,0 +1,2 @@
!mm!mm!N•‘‘‘m!‘NN'‘)*‘‘•‘‘!‘m!‘NNN‘N!m)m!‘‘N!‘‘Nð‘NN)‘NN'‘)‘‘N
‘a‘‘N‘‘‘NNNNNNN

@ -0,0 +1,2 @@
!mm!N!mm!m)m!‘‘N!‘‘Nð‘NN)‘
‘a‘‘‘‘NNN•‘‘!‘m!)‘‘'NN‘‘•‘!‘mNNN!‘NNN‘NNN'‘)‘‘N‘NNN

@ -0,0 +1 @@
!mm<EFBFBD><EFBFBD>N!<EFBFBD><EFBFBD>NN'<EFBFBD>)<EFBFBD><EFBFBD>NN

@ -0,0 +1 @@
!;m<EFBFBD><EFBFBD>N<EFBFBD>'N<EFBFBD><EFBFBD>!)<EFBFBD><EFBFBD>NN

@ -0,0 +1 @@
!mmR!<EFBFBD>N<EFBFBD><EFBFBD><EFBFBD>!:<EFBFBD>m!<EFBFBD>NN'<EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD>NNNN

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save