From df09570add3fbe72086f02557d4f74e498cc6f84 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 13 Sep 2016 11:06:40 -0700 Subject: Allow decoupling core version number from wrapper version numbers --- src/core/lib/surface/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index 41242684da..0db8b41aa9 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,6 +36,6 @@ #include -const char *grpc_version_string(void) { return "1.1.0-dev"; } +const char *grpc_version_string(void) { return "2.0.0-dev"; } const char *grpc_g_stands_for(void) { return "good"; } -- cgit v1.2.3 From 362ac1be0c8e01cbec3063bf8149bb8d7a0bb530 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 13 Sep 2016 16:01:31 -0700 Subject: Fix gprc --- include/grpc++/impl/codegen/completion_queue.h | 2 +- include/grpc/impl/codegen/log.h | 2 +- include/grpc/impl/codegen/port_platform.h | 8 ++++---- include/grpc/support/string_util.h | 2 +- src/core/ext/census/census_log.h | 2 +- src/core/ext/census/mlog.h | 2 +- src/core/lib/iomgr/ev_epoll_linux.c | 2 +- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 4 ++-- test/core/profiling/mark_timings.stp | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/core') diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index 78bc5ca481..d5a409a082 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -241,7 +241,7 @@ class ServerCompletionQueue : public CompletionQueue { private: bool is_frequently_polled_; friend class ServerBuilder; - /// \param is_frequently_polled Informs the GPRC library about whether the + /// \param is_frequently_polled Informs the GRPC library about whether the /// server completion queue would be actively polled (by calling Next() or /// AsyncNext()). By default all server completion queues are assumed to be /// frequently polled. diff --git a/include/grpc/impl/codegen/log.h b/include/grpc/impl/codegen/log.h index e5010c29da..6687b1a0ef 100644 --- a/include/grpc/impl/codegen/log.h +++ b/include/grpc/impl/codegen/log.h @@ -75,7 +75,7 @@ const char *gpr_log_severity_string(gpr_log_severity severity); /* Log a message. It's advised to use GPR_xxx above to generate the context * for each message */ GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, - const char *format, ...) GPRC_PRINT_FORMAT_CHECK(4, 5); + const char *format, ...) GPR_PRINT_FORMAT_CHECK(4, 5); GPRAPI void gpr_log_message(const char *file, int line, gpr_log_severity severity, const char *message); diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index f97e386289..d96bf0cf8e 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -450,14 +450,14 @@ typedef unsigned __int64 uint64_t; #endif #endif -#ifndef GPRC_PRINT_FORMAT_CHECK +#ifndef GPR_PRINT_FORMAT_CHECK #ifdef __GNUC__ -#define GPRC_PRINT_FORMAT_CHECK(FORMAT_STR, ARGS) \ +#define GPR_PRINT_FORMAT_CHECK(FORMAT_STR, ARGS) \ __attribute__((format(printf, FORMAT_STR, ARGS))) #else -#define GPRC_PRINT_FORMAT_CHECK(FORMAT_STR, ARGS) +#define GPR_PRINT_FORMAT_CHECK(FORMAT_STR, ARGS) #endif -#endif /* GPRC_PRINT_FORMAT_CHECK */ +#endif /* GPR_PRINT_FORMAT_CHECK */ #if GPR_FORBID_UNREACHABLE_CODE #define GPR_UNREACHABLE_CODE(STATEMENT) diff --git a/include/grpc/support/string_util.h b/include/grpc/support/string_util.h index 952cbfc26b..5ab983d15d 100644 --- a/include/grpc/support/string_util.h +++ b/include/grpc/support/string_util.h @@ -55,7 +55,7 @@ GPRAPI char *gpr_strdup(const char *src); On error, returns -1 and sets *strp to NULL. If the format string is bad, the result is undefined. */ GPRAPI int gpr_asprintf(char **strp, const char *format, ...) - GPRC_PRINT_FORMAT_CHECK(2, 3); + GPR_PRINT_FORMAT_CHECK(2, 3); #ifdef __cplusplus } diff --git a/src/core/ext/census/census_log.h b/src/core/ext/census/census_log.h index 534ecc5705..1b185a53b9 100644 --- a/src/core/ext/census/census_log.h +++ b/src/core/ext/census/census_log.h @@ -84,7 +84,7 @@ const void *census_log_read_next(size_t *bytes_available); */ size_t census_log_remaining_space(void); -/* Returns the number of times gprc_stats_log_start_write() failed due to +/* Returns the number of times grpc_stats_log_start_write() failed due to out-of-space. */ int census_log_out_of_space_count(void); diff --git a/src/core/ext/census/mlog.h b/src/core/ext/census/mlog.h index a256426f91..18805ad994 100644 --- a/src/core/ext/census/mlog.h +++ b/src/core/ext/census/mlog.h @@ -88,7 +88,7 @@ const void* census_log_read_next(size_t* bytes_available); */ size_t census_log_remaining_space(void); -/* Returns the number of times gprc_stats_log_start_write() failed due to +/* Returns the number of times grpc_stats_log_start_write() failed due to out-of-space. */ int64_t census_log_out_of_space_count(void); diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index eba347125e..3f72cc8c95 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -164,7 +164,7 @@ static void fd_global_shutdown(void); #define PI_ADD_REF(p, r) pi_add_ref((p)) #define PI_UNREF(exec_ctx, p, r) pi_unref((exec_ctx), (p)) -#endif /* !defined(GPRC_PI_REF_COUNT_DEBUG) */ +#endif /* !defined(GRPC_PI_REF_COUNT_DEBUG) */ typedef struct polling_island { gpr_mu mu; diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index a2f5b86497..169ecb6a62 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -473,7 +473,7 @@ extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_impo typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader *reader); extern grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import; #define grpc_raw_byte_buffer_from_reader grpc_raw_byte_buffer_from_reader_import -typedef void(*gpr_log_type)(const char *file, int line, gpr_log_severity severity, const char *format, ...) GPRC_PRINT_FORMAT_CHECK(4, 5); +typedef void(*gpr_log_type)(const char *file, int line, gpr_log_severity severity, const char *format, ...) GPR_PRINT_FORMAT_CHECK(4, 5); extern gpr_log_type gpr_log_import; #define gpr_log gpr_log_import typedef void(*gpr_log_message_type)(const char *file, int line, gpr_log_severity severity, const char *message); @@ -821,7 +821,7 @@ extern gpr_format_message_type gpr_format_message_import; typedef char *(*gpr_strdup_type)(const char *src); extern gpr_strdup_type gpr_strdup_import; #define gpr_strdup gpr_strdup_import -typedef int(*gpr_asprintf_type)(char **strp, const char *format, ...) GPRC_PRINT_FORMAT_CHECK(2, 3); +typedef int(*gpr_asprintf_type)(char **strp, const char *format, ...) GPR_PRINT_FORMAT_CHECK(2, 3); extern gpr_asprintf_type gpr_asprintf_import; #define gpr_asprintf gpr_asprintf_import typedef const char *(*gpr_subprocess_binary_extension_type)(); diff --git a/test/core/profiling/mark_timings.stp b/test/core/profiling/mark_timings.stp index 0c0a417faf..d740582d27 100644 --- a/test/core/profiling/mark_timings.stp +++ b/test/core/profiling/mark_timings.stp @@ -2,7 +2,7 @@ * probe definition. * * For a statically build binary, that'd be the name of the binary itself. - * For dinamically built ones, point to the location of the libgprc.so being + * For dinamically built ones, point to the location of the libgrpc.so being * used. */ global starts, times, times_per_tag -- cgit v1.2.3 From 4e826be32ee6d67f3e71971e3475fdd8d2f6176c Mon Sep 17 00:00:00 2001 From: Dan Born Date: Mon, 3 Oct 2016 20:33:25 -0700 Subject: Correctly count port indices and siblings --- src/core/lib/iomgr/tcp_server_posix.c | 41 ++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 2d3f6cf9a7..596f8280d4 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -648,35 +648,40 @@ done: } } -unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server *s, - unsigned port_index) { - unsigned num_fds = 0; +/* Return listener at port_index or NULL. */ +static grpc_tcp_listener *get_port_index(grpc_tcp_server *s, + unsigned port_index) { + unsigned num_ports = 0; grpc_tcp_listener *sp; - for (sp = s->head; sp && port_index != 0; sp = sp->next) { + for (sp = s->head; sp; sp = sp->next) { if (!sp->is_sibling) { - --port_index; + if (++num_ports > port_index) { + return sp; + } } } - for (; sp; sp = sp->sibling, ++num_fds) - ; + return NULL; +} + +unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server *s, + unsigned port_index) { + unsigned num_fds = 0; + grpc_tcp_listener *sp = get_port_index(s, port_index); + for (; sp; sp = sp->sibling) { + ++num_fds; + } return num_fds; } int grpc_tcp_server_port_fd(grpc_tcp_server *s, unsigned port_index, unsigned fd_index) { - grpc_tcp_listener *sp; - for (sp = s->head; sp && port_index != 0; sp = sp->next) { - if (!sp->is_sibling) { - --port_index; + grpc_tcp_listener *sp = get_port_index(s, port_index); + for (; sp; sp = sp->sibling, --fd_index) { + if (fd_index == 0) { + return sp->fd; } } - for (; sp && fd_index != 0; sp = sp->sibling, --fd_index) - ; - if (sp) { - return sp->fd; - } else { - return -1; - } + return -1; } void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, -- cgit v1.2.3 From 929f4c652f5b57de016cb2cafbf81139cae30e3f Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 10 Oct 2016 16:02:43 -0700 Subject: Add tos configuration in channel args --- BUILD | 4 ++ CMakeLists.txt | 3 + Makefile | 40 +++++++++++++ binding.gyp | 1 + build.yaml | 15 +++++ config.m4 | 1 + gRPC-Core.podspec | 1 + grpc.gemspec | 1 + include/grpc/impl/codegen/grpc_types.h | 2 + package.xml | 1 + .../chttp2/client/insecure/channel_create.c | 9 ++- .../chttp2/client/secure/secure_channel_create.c | 12 +++- src/core/lib/http/httpcli.c | 11 +++- src/core/lib/iomgr/socket_utils_posix.h | 4 ++ src/core/lib/iomgr/socket_utils_tos_posix.c | 68 ++++++++++++++++++++++ src/core/lib/iomgr/tcp_client.h | 18 +++++- src/core/lib/iomgr/tcp_client_posix.c | 39 ++++++++----- src/core/lib/iomgr/tcp_client_windows.c | 8 +-- src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/end2end/fixtures/http_proxy.c | 11 +++- test/core/end2end/fuzzers/api_fuzzer.c | 14 ++--- test/core/iomgr/socket_utils_tos_test.c | 67 +++++++++++++++++++++ test/core/iomgr/tcp_client_posix_test.c | 22 +++++-- tools/doxygen/Doxyfile.core.internal | 1 + tools/run_tests/sources_and_headers.json | 18 ++++++ tools/run_tests/tests.json | 19 ++++++ vsprojects/vcxproj/grpc/grpc.vcxproj | 2 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 + .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 2 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 3 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 2 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 3 + 32 files changed, 358 insertions(+), 48 deletions(-) create mode 100644 src/core/lib/iomgr/socket_utils_tos_posix.c create mode 100644 test/core/iomgr/socket_utils_tos_test.c (limited to 'src/core') diff --git a/BUILD b/BUILD index bad6f3f075..d2a4e70f61 100644 --- a/BUILD +++ b/BUILD @@ -366,6 +366,7 @@ cc_library( "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_utils_tos_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", @@ -752,6 +753,7 @@ cc_library( "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_utils_tos_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", @@ -1100,6 +1102,7 @@ cc_library( "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_utils_tos_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", @@ -1863,6 +1866,7 @@ objc_library( "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_utils_tos_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", diff --git a/CMakeLists.txt b/CMakeLists.txt index c4191521bd..d88d917752 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,6 +333,7 @@ add_library(grpc 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_utils_tos_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 @@ -592,6 +593,7 @@ add_library(grpc_cronet 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_utils_tos_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 @@ -823,6 +825,7 @@ add_library(grpc_unsecure 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_utils_tos_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 diff --git a/Makefile b/Makefile index 62c65822b0..cd988b8555 100644 --- a/Makefile +++ b/Makefile @@ -1012,6 +1012,7 @@ set_initial_connect_string_test: $(BINDIR)/$(CONFIG)/set_initial_connect_string_ sockaddr_resolver_test: $(BINDIR)/$(CONFIG)/sockaddr_resolver_test sockaddr_utils_test: $(BINDIR)/$(CONFIG)/sockaddr_utils_test socket_utils_test: $(BINDIR)/$(CONFIG)/socket_utils_test +socket_utils_tos_test: $(BINDIR)/$(CONFIG)/socket_utils_tos_test tcp_client_posix_test: $(BINDIR)/$(CONFIG)/tcp_client_posix_test tcp_posix_test: $(BINDIR)/$(CONFIG)/tcp_posix_test tcp_server_posix_test: $(BINDIR)/$(CONFIG)/tcp_server_posix_test @@ -1328,6 +1329,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/sockaddr_resolver_test \ $(BINDIR)/$(CONFIG)/sockaddr_utils_test \ $(BINDIR)/$(CONFIG)/socket_utils_test \ + $(BINDIR)/$(CONFIG)/socket_utils_tos_test \ $(BINDIR)/$(CONFIG)/tcp_client_posix_test \ $(BINDIR)/$(CONFIG)/tcp_posix_test \ $(BINDIR)/$(CONFIG)/tcp_server_posix_test \ @@ -1714,6 +1716,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/sockaddr_utils_test || ( echo test sockaddr_utils_test failed ; exit 1 ) $(E) "[RUN] Testing socket_utils_test" $(Q) $(BINDIR)/$(CONFIG)/socket_utils_test || ( echo test socket_utils_test failed ; exit 1 ) + $(E) "[RUN] Testing socket_utils_tos_test" + $(Q) $(BINDIR)/$(CONFIG)/socket_utils_tos_test || ( echo test socket_utils_tos_test failed ; exit 1 ) $(E) "[RUN] Testing tcp_client_posix_test" $(Q) $(BINDIR)/$(CONFIG)/tcp_client_posix_test || ( echo test tcp_client_posix_test failed ; exit 1 ) $(E) "[RUN] Testing tcp_posix_test" @@ -2577,6 +2581,7 @@ LIBGRPC_SRC = \ 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_utils_tos_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 \ @@ -2854,6 +2859,7 @@ LIBGRPC_CRONET_SRC = \ 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_utils_tos_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 \ @@ -3121,6 +3127,7 @@ LIBGRPC_TEST_UTIL_SRC = \ 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_utils_tos_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 \ @@ -3315,6 +3322,7 @@ LIBGRPC_UNSECURE_SRC = \ 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_utils_tos_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 \ @@ -10341,6 +10349,38 @@ endif endif +SOCKET_UTILS_TOS_TEST_SRC = \ + test/core/iomgr/socket_utils_tos_test.c \ + +SOCKET_UTILS_TOS_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SOCKET_UTILS_TOS_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/socket_utils_tos_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/socket_utils_tos_test: $(SOCKET_UTILS_TOS_TEST_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) $(LD) $(LDFLAGS) $(SOCKET_UTILS_TOS_TEST_OBJS) $(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)/socket_utils_tos_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/iomgr/socket_utils_tos_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_socket_utils_tos_test: $(SOCKET_UTILS_TOS_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(SOCKET_UTILS_TOS_TEST_OBJS:.o=.dep) +endif +endif + + TCP_CLIENT_POSIX_TEST_SRC = \ test/core/iomgr/tcp_client_posix_test.c \ diff --git a/binding.gyp b/binding.gyp index 58edda2e63..fd2bed86b0 100644 --- a/binding.gyp +++ b/binding.gyp @@ -608,6 +608,7 @@ '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_utils_tos_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', diff --git a/build.yaml b/build.yaml index 584084ff86..857ef6c8ee 100644 --- a/build.yaml +++ b/build.yaml @@ -293,6 +293,7 @@ filegroups: - 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_utils_tos_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 @@ -2437,6 +2438,20 @@ targets: - mac - linux - posix +- name: socket_utils_tos_test + build: test + language: c + src: + - test/core/iomgr/socket_utils_tos_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr + platforms: + - mac + - linux + - posix - name: tcp_client_posix_test cpu_cost: 0.5 build: test diff --git a/config.m4 b/config.m4 index 0f103655a8..7012fb0c54 100644 --- a/config.m4 +++ b/config.m4 @@ -127,6 +127,7 @@ if test "$PHP_GRPC" != "no"; then 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_utils_tos_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 \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 6886bdfb5a..7b74143f41 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -457,6 +457,7 @@ Pod::Spec.new do |s| '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_utils_tos_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', diff --git a/grpc.gemspec b/grpc.gemspec index 6079ea2aef..2353798355 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -377,6 +377,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/socket_utils_common_posix.c ) s.files += %w( src/core/lib/iomgr/socket_utils_linux.c ) s.files += %w( src/core/lib/iomgr/socket_utils_posix.c ) + s.files += %w( src/core/lib/iomgr/socket_utils_tos_posix.c ) s.files += %w( src/core/lib/iomgr/socket_windows.c ) s.files += %w( src/core/lib/iomgr/tcp_client_posix.c ) s.files += %w( src/core/lib/iomgr/tcp_client_windows.c ) diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 07e7cff201..1b93729b72 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -201,6 +201,8 @@ typedef struct { #define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size" /** If non-zero, allow the use of SO_REUSEPORT if it's available (default 1) */ #define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport" +/** The Type-Of-Service (TOS), in bytes. */ +#define GRPC_ARG_TOS "grpc.tos" /** \} */ /** Result of a grpc call. If the caller satisfies the prerequisites of a diff --git a/package.xml b/package.xml index 7bac695787..489504c43f 100644 --- a/package.xml +++ b/package.xml @@ -384,6 +384,7 @@ + diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index c2b59569fd..858b1dbee0 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -142,6 +142,7 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, grpc_connect_out_args *result, grpc_closure *notify) { connector *c = (connector *)con; + grpc_tcp_client_connect_args tcp_client_connect_args; GPR_ASSERT(c->notify == NULL); GPR_ASSERT(notify->cb); c->notify = notify; @@ -149,9 +150,13 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, c->result = result; c->tcp = NULL; grpc_closure_init(&c->connected, connected, c); + tcp_client_connect_args.interested_parties = args->interested_parties; + tcp_client_connect_args.addr = args->addr; + tcp_client_connect_args.addr_len = args->addr_len; + tcp_client_connect_args.deadline = args->deadline; + tcp_client_connect_args.channel_args = args->channel_args; grpc_tcp_client_connect(exec_ctx, &c->connected, &c->tcp, - args->interested_parties, args->addr, args->addr_len, - args->deadline); + &tcp_client_connect_args); } static const grpc_connector_vtable connector_vtable = { diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 31c54ff74c..d71d9f2d52 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -200,6 +200,7 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, grpc_connect_out_args *result, grpc_closure *notify) { connector *c = (connector *)con; + grpc_tcp_client_connect_args tcp_client_connect_args; GPR_ASSERT(c->notify == NULL); c->notify = notify; c->args = *args; @@ -208,9 +209,14 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, GPR_ASSERT(c->connecting_endpoint == NULL); gpr_mu_unlock(&c->mu); grpc_closure_init(&c->connected_closure, connected, c); - grpc_tcp_client_connect( - exec_ctx, &c->connected_closure, &c->newly_connecting_endpoint, - args->interested_parties, args->addr, args->addr_len, args->deadline); + tcp_client_connect_args.interested_parties = args->interested_parties; + tcp_client_connect_args.addr = args->addr; + tcp_client_connect_args.addr_len = args->addr_len; + tcp_client_connect_args.deadline = args->deadline; + tcp_client_connect_args.channel_args = args->channel_args; + grpc_tcp_client_connect(exec_ctx, &c->connected_closure, + &c->newly_connecting_endpoint, + &tcp_client_connect_args); } static const grpc_connector_vtable connector_vtable = { diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 7f3c2d120d..c56fae6d0c 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -213,6 +213,7 @@ static void on_connected(grpc_exec_ctx *exec_ctx, void *arg, static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req, grpc_error *error) { grpc_resolved_address *addr; + grpc_tcp_client_connect_args tcp_client_connect_args; if (error != GRPC_ERROR_NONE) { append_error(req, error); } @@ -224,9 +225,13 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req, } addr = &req->addresses->addrs[req->next_address++]; grpc_closure_init(&req->connected, on_connected, req); - grpc_tcp_client_connect( - exec_ctx, &req->connected, &req->ep, req->context->pollset_set, - (struct sockaddr *)&addr->addr, addr->len, req->deadline); + tcp_client_connect_args.interested_parties = req->context->pollset_set; + tcp_client_connect_args.addr = (struct sockaddr *)&addr->addr; + tcp_client_connect_args.addr_len = addr->len; + tcp_client_connect_args.deadline = req->deadline; + tcp_client_connect_args.channel_args = NULL; + grpc_tcp_client_connect(exec_ctx, &req->connected, &req->ep, + &tcp_client_connect_args); } static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h index 7bcc2219ae..bf4cc96af2 100644 --- a/src/core/lib/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -37,6 +37,7 @@ #include #include +#include #include "src/core/lib/iomgr/error.h" /* a wrapper for accept or accept4 */ @@ -86,6 +87,9 @@ grpc_error *grpc_set_socket_sndbuf(int fd, int buffer_size_bytes); /* Tries to set the socket's receive buffer to given size. */ grpc_error *grpc_set_socket_rcvbuf(int fd, int buffer_size_bytes); +/* Tries to set the socket's type to service */ +grpc_error *grpc_set_socket_tos(int fd, grpc_arg *arg); + /* An enum to keep track of IPv4/IPv6 socket modes. Currently, this information is only used when a socket is first created, but diff --git a/src/core/lib/iomgr/socket_utils_tos_posix.c b/src/core/lib/iomgr/socket_utils_tos_posix.c new file mode 100644 index 0000000000..603ad3c421 --- /dev/null +++ b/src/core/lib/iomgr/socket_utils_tos_posix.c @@ -0,0 +1,68 @@ +/* + * + * 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 + +#ifdef GPR_POSIX_SOCKET + +#include "src/core/lib/iomgr/socket_utils_posix.h" + +#include +#include +#include + +#include +#include + +grpc_error* grpc_set_socket_tos(int fd, grpc_arg* arg) { + int newval; + socklen_t intlen = sizeof(newval); + + GPR_ASSERT(0 == strcmp(arg->key, GRPC_ARG_TOS)); + GPR_ASSERT(arg->type == GRPC_ARG_INTEGER); + + if (0 != setsockopt(fd, IPPROTO_IP, IP_TOS, &arg->value.integer, + sizeof(arg->value.integer))) { + return GRPC_OS_ERROR(errno, "setsockopt(IP_TOS)"); + } + if (0 != getsockopt(fd, IPPROTO_IP, IP_TOS, &newval, &intlen)) { + return GRPC_OS_ERROR(errno, "getsockopt(IP_TOS)"); + } + if (newval != arg->value.integer) { + return GRPC_ERROR_CREATE("Failed to set IP_TOS"); + } + + return GRPC_ERROR_NONE; +} + +#endif diff --git a/src/core/lib/iomgr/tcp_client.h b/src/core/lib/iomgr/tcp_client.h index a07e0b9f0c..215c2fbe5b 100644 --- a/src/core/lib/iomgr/tcp_client.h +++ b/src/core/lib/iomgr/tcp_client.h @@ -34,11 +34,25 @@ #ifndef GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H #define GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H +#include #include #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/sockaddr.h" +/** arguments for a tcp client connection */ +typedef struct { + /** set of pollsets interested in this connection */ + grpc_pollset_set *interested_parties; + /** address to connect to */ + const struct sockaddr *addr; + size_t addr_len; + /** deadline for connection */ + gpr_timespec deadline; + /** channel arguments */ + const grpc_channel_args *channel_args; +} grpc_tcp_client_connect_args; + /* Asynchronously connect to an address (specified as (addr, len)), and call cb with arg and the completed connection when done (or call cb with arg and NULL on failure). @@ -46,8 +60,6 @@ in this connection being established (in order to continue their work) */ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_connect, grpc_endpoint **endpoint, - grpc_pollset_set *interested_parties, - const struct sockaddr *addr, size_t addr_len, - gpr_timespec deadline); + const grpc_tcp_client_connect_args *args); #endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H */ diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 3496b6094f..1439efe706 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -71,7 +71,8 @@ typedef struct { grpc_closure *closure; } async_connect; -static grpc_error *prepare_socket(const struct sockaddr *addr, int fd) { +static grpc_error *prepare_socket(const struct sockaddr *addr, int fd, + const grpc_channel_args *channel_args) { grpc_error *err = GRPC_ERROR_NONE; GPR_ASSERT(fd >= 0); @@ -86,6 +87,15 @@ static grpc_error *prepare_socket(const struct sockaddr *addr, int fd) { } err = grpc_set_socket_no_sigpipe_if_possible(fd); if (err != GRPC_ERROR_NONE) goto error; + if (channel_args) { + for (size_t i = 0; i < channel_args->num_args; i++) { + if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_TOS)) { + err = grpc_set_socket_tos(fd, &channel_args->args[i]); + if (err != GRPC_ERROR_NONE) goto error; + break; + } + } + } goto done; error: @@ -222,9 +232,7 @@ finish: static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, - const struct sockaddr *addr, - size_t addr_len, gpr_timespec deadline) { + const grpc_tcp_client_connect_args *args) { int fd; grpc_dualstack_mode dsmode; int err; @@ -235,6 +243,8 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, char *name; char *addr_str; grpc_error *error; + const struct sockaddr *addr = args->addr; + size_t addr_len = args->addr_len; *ep = NULL; @@ -255,7 +265,8 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, addr = (struct sockaddr *)&addr4_copy; addr_len = sizeof(addr4_copy); } - if ((error = prepare_socket(addr, fd)) != GRPC_ERROR_NONE) { + if ((error = prepare_socket(addr, fd, args->channel_args)) != + GRPC_ERROR_NONE) { grpc_exec_ctx_sched(exec_ctx, closure, error, NULL); return; } @@ -283,13 +294,13 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, goto done; } - grpc_pollset_set_add_fd(exec_ctx, interested_parties, fdobj); + grpc_pollset_set_add_fd(exec_ctx, args->interested_parties, fdobj); ac = gpr_malloc(sizeof(async_connect)); ac->closure = closure; ac->ep = ep; ac->fd = fdobj; - ac->interested_parties = interested_parties; + ac->interested_parties = args->interested_parties; ac->addr_str = addr_str; addr_str = NULL; gpr_mu_init(&ac->mu); @@ -304,7 +315,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&ac->mu); grpc_timer_init(exec_ctx, &ac->alarm, - gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC), + gpr_convert_clock_type(args->deadline, GPR_CLOCK_MONOTONIC), tc_on_alarm, ac, gpr_now(GPR_CLOCK_MONOTONIC)); grpc_fd_notify_on_write(exec_ctx, ac->fd, &ac->write_closure); gpr_mu_unlock(&ac->mu); @@ -316,17 +327,13 @@ done: // overridden by api_fuzzer.c void (*grpc_tcp_client_connect_impl)( - grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, const struct sockaddr *addr, - size_t addr_len, gpr_timespec deadline) = tcp_client_connect_impl; + grpc_exec_ctx *exec_ctx, grpc_closure *on_connect, grpc_endpoint **endpoint, + const grpc_tcp_client_connect_args *args) = tcp_client_connect_impl; void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, - const struct sockaddr *addr, size_t addr_len, - gpr_timespec deadline) { - grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, addr, - addr_len, deadline); + const grpc_tcp_client_connect_args *args) { + grpc_tcp_client_connect_impl(exec_ctx, closure, ep, args); } #endif diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 562cb9c6bf..b4517b3bdb 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -128,9 +128,7 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { notification request for the connection, and one timeout alert. */ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_endpoint **endpoint, - grpc_pollset_set *interested_parties, - const struct sockaddr *addr, size_t addr_len, - gpr_timespec deadline) { + const grpc_tcp_client_connect_args *args) { SOCKET sock = INVALID_SOCKET; BOOL success; int status; @@ -143,6 +141,8 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, DWORD ioctl_num_bytes; grpc_winsocket_callback_info *info; grpc_error *error = GRPC_ERROR_NONE; + const struct sockaddr *addr = args->addr; + size_t addr_len = args->addr_len; *endpoint = NULL; @@ -208,7 +208,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, ac->endpoint = endpoint; grpc_closure_init(&ac->on_connect, on_connect, ac); - grpc_timer_init(exec_ctx, &ac->alarm, deadline, on_alarm, ac, + grpc_timer_init(exec_ctx, &ac->alarm, args->deadline, on_alarm, ac, gpr_now(GPR_CLOCK_MONOTONIC)); grpc_socket_notify_on_write(exec_ctx, socket, &ac->on_connect); return; diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 2bebf48c70..dec578edb5 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -121,6 +121,7 @@ CORE_SOURCE_FILES = [ '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_utils_tos_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', diff --git a/test/core/end2end/fixtures/http_proxy.c b/test/core/end2end/fixtures/http_proxy.c index 22533b9694..d0bd452a04 100644 --- a/test/core/end2end/fixtures/http_proxy.c +++ b/test/core/end2end/fixtures/http_proxy.c @@ -356,10 +356,15 @@ static void on_read_request_done(grpc_exec_ctx* exec_ctx, void* arg, // The connection callback inherits our reference to conn. const gpr_timespec deadline = gpr_time_add( gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(10, GPR_TIMESPAN)); + grpc_tcp_client_connect_args tcp_client_connect_args; + tcp_client_connect_args.interested_parties = conn->pollset_set; + tcp_client_connect_args.addr = + (struct sockaddr*)&resolved_addresses->addrs[0].addr; + tcp_client_connect_args.addr_len = resolved_addresses->addrs[0].len; + tcp_client_connect_args.deadline = deadline; + tcp_client_connect_args.channel_args = NULL; grpc_tcp_client_connect(exec_ctx, &conn->on_server_connect_done, - &conn->server_endpoint, conn->pollset_set, - (struct sockaddr*)&resolved_addresses->addrs[0].addr, - resolved_addresses->addrs[0].len, deadline); + &conn->server_endpoint, &tcp_client_connect_args); grpc_resolved_addresses_destroy(resolved_addresses); } diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 96ea82d95e..5c0fb0f938 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -229,10 +229,10 @@ void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr, // client connection // defined in tcp_client_posix.c -extern void (*grpc_tcp_client_connect_impl)( - grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, const struct sockaddr *addr, - size_t addr_len, gpr_timespec deadline); +extern void (*grpc_tcp_client_connect_impl)(grpc_exec_ctx *exec_ctx, + grpc_closure *closure, + grpc_endpoint **ep, + grpc_tcp_client_connect_args *args); static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, gpr_timespec deadline); @@ -288,10 +288,8 @@ static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, static void my_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, - const struct sockaddr *addr, size_t addr_len, - gpr_timespec deadline) { - sched_connect(exec_ctx, closure, ep, deadline); + grpc_tcp_client_connect_args *args) { + sched_connect(exec_ctx, closure, ep, args->deadline); } //////////////////////////////////////////////////////////////////////////////// diff --git a/test/core/iomgr/socket_utils_tos_test.c b/test/core/iomgr/socket_utils_tos_test.c new file mode 100644 index 0000000000..ee3a43367b --- /dev/null +++ b/test/core/iomgr/socket_utils_tos_test.c @@ -0,0 +1,67 @@ +/* + * + * 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 +#include "src/core/lib/iomgr/socket_utils_posix.h" + +#include +#include +#include + +#include +#include "test/core/util/test_config.h" + +int main(int argc, char **argv) { + int sock; + grpc_arg tos_arg; + grpc_test_init(argc, argv); + + sock = socket(PF_INET, SOCK_STREAM, 0); + GPR_ASSERT(sock > 0); + + tos_arg.key = GRPC_ARG_TOS; + tos_arg.type = GRPC_ARG_INTEGER; + tos_arg.value.integer = IPTOS_LOWDELAY; + GPR_ASSERT( + GRPC_LOG_IF_ERROR("set_socket_tos", grpc_set_socket_tos(sock, &tos_arg))); + tos_arg.value.integer = IPTOS_THROUGHPUT; + GPR_ASSERT( + GRPC_LOG_IF_ERROR("set_socket_tos", grpc_set_socket_tos(sock, &tos_arg))); + tos_arg.value.integer = IPTOS_RELIABILITY; + GPR_ASSERT( + GRPC_LOG_IF_ERROR("set_socket_tos", grpc_set_socket_tos(sock, &tos_arg))); + + close(sock); + + return 0; +} diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c index d0c1047423..aec4192ce5 100644 --- a/test/core/iomgr/tcp_client_posix_test.c +++ b/test/core/iomgr/tcp_client_posix_test.c @@ -92,6 +92,7 @@ void test_succeeds(void) { int connections_complete_before; grpc_closure done; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_tcp_client_connect_args tcp_client_connect_args; gpr_log(GPR_DEBUG, "test_succeeds"); @@ -111,9 +112,13 @@ void test_succeeds(void) { /* connect to it */ GPR_ASSERT(getsockname(svr_fd, (struct sockaddr *)&addr, &addr_len) == 0); grpc_closure_init(&done, must_succeed, NULL); - grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set, - (struct sockaddr *)&addr, addr_len, - gpr_inf_future(GPR_CLOCK_REALTIME)); + tcp_client_connect_args.interested_parties = g_pollset_set; + tcp_client_connect_args.addr = (struct sockaddr *)&addr; + tcp_client_connect_args.addr_len = addr_len; + tcp_client_connect_args.deadline = gpr_inf_future(GPR_CLOCK_REALTIME); + tcp_client_connect_args.channel_args = NULL; + grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, + &tcp_client_connect_args); /* await the connection */ do { @@ -148,6 +153,7 @@ void test_fails(void) { int connections_complete_before; grpc_closure done; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_tcp_client_connect_args tcp_client_connect_args; gpr_log(GPR_DEBUG, "test_fails"); @@ -160,9 +166,13 @@ void test_fails(void) { /* connect to a broken address */ grpc_closure_init(&done, must_fail, NULL); - grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set, - (struct sockaddr *)&addr, addr_len, - gpr_inf_future(GPR_CLOCK_REALTIME)); + tcp_client_connect_args.interested_parties = g_pollset_set; + tcp_client_connect_args.addr = (struct sockaddr *)&addr; + tcp_client_connect_args.addr_len = addr_len; + tcp_client_connect_args.deadline = gpr_inf_future(GPR_CLOCK_REALTIME); + tcp_client_connect_args.channel_args = NULL; + grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, + &tcp_client_connect_args); gpr_mu_lock(g_mu); diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 44f147aeb1..59998f03fb 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -994,6 +994,7 @@ 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_utils_tos_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 \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index c05d194e19..5ecb3ee0f8 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1858,6 +1858,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "socket_utils_tos_test", + "src": [ + "test/core/iomgr/socket_utils_tos_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -6533,6 +6550,7 @@ "src/core/lib/iomgr/socket_utils_linux.c", "src/core/lib/iomgr/socket_utils_posix.c", "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_utils_tos_posix.c", "src/core/lib/iomgr/socket_windows.c", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index c3395067c9..07b51d3c2f 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1819,6 +1819,25 @@ "posix" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "socket_utils_tos_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 965d06d1d5..f115001507 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -549,6 +549,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index dddd4ecce5..81dae475a1 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -133,6 +133,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index b724c217ed..da631cd0dc 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -397,6 +397,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 92806fa04a..b42b5ec68a 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -187,6 +187,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index b46773632c..921eaf3780 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -517,6 +517,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 6ffc1eab70..c7d0106dc5 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -136,6 +136,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr -- cgit v1.2.3 From 33aa40ab2b493e0dd40e3a7363e2f62d7d125727 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 9 Sep 2016 14:16:51 -0700 Subject: Add an extra Cronet read after a message read is complete and when trailing metadata is received --- .../transport/cronet/transport/cronet_transport.c | 32 ++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 25ad40b935..5154fdf3de 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -58,7 +58,7 @@ } while (0) /* TODO (makdharma): Hook up into the wider tracing mechanism */ -int grpc_cronet_trace = 0; +int grpc_cronet_trace = 1; enum e_op_result { ACTION_TAKEN_WITH_CALLBACK, @@ -509,8 +509,20 @@ static void on_response_trailers_received( s->state.rs.trailing_metadata_valid = true; } s->state.state_callback_received[OP_RECV_TRAILING_METADATA] = true; - gpr_mu_unlock(&s->mu); - execute_from_storage(s); + if (!s->state.state_op_done[OP_READ_REQ_MADE]) { + /* Do an extra read to trigger on_succeeded() callback in case connection + is closed */ + s->state.rs.received_bytes = 0; + s->state.rs.remaining_bytes = GRPC_HEADER_SIZE_IN_BYTES; + s->state.rs.length_field_received = false; + CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_read(%p)", s->cbs); + cronet_bidirectional_stream_read(s->cbs, s->state.rs.read_buffer, + s->state.rs.remaining_bytes); + gpr_mu_unlock(&s->mu); + } else { + gpr_mu_unlock(&s->mu); + execute_from_storage(s); + } } /* @@ -935,11 +947,15 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, GRPC_ERROR_NONE, NULL); stream_state->state_op_done[OP_RECV_MESSAGE] = true; oas->state.state_op_done[OP_RECV_MESSAGE] = true; - /* Clear read state of the stream, so next read op (if it were to come) - * will work */ - stream_state->rs.received_bytes = stream_state->rs.remaining_bytes = - stream_state->rs.length_field_received = 0; - result = ACTION_TAKEN_NO_CALLBACK; + /* Do an extra read to trigger on_succeeded() callback in case connection + is closed */ + stream_state->rs.received_bytes = 0; + stream_state->rs.remaining_bytes = GRPC_HEADER_SIZE_IN_BYTES; + stream_state->rs.length_field_received = false; + CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_read(%p)", s->cbs); + cronet_bidirectional_stream_read(s->cbs, stream_state->rs.read_buffer, + stream_state->rs.remaining_bytes); + result = ACTION_TAKEN_WITH_CALLBACK; } } else if (stream_op->recv_trailing_metadata && op_can_be_run(stream_op, stream_state, &oas->state, -- cgit v1.2.3 From 6e0d5676ea4559fc23b4a0d865b8072502b012ec Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 9 Sep 2016 17:35:34 -0700 Subject: Minor bug fix --- src/core/ext/transport/cronet/transport/cronet_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 5154fdf3de..444873988b 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -955,7 +955,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_read(%p)", s->cbs); cronet_bidirectional_stream_read(s->cbs, stream_state->rs.read_buffer, stream_state->rs.remaining_bytes); - result = ACTION_TAKEN_WITH_CALLBACK; + result = ACTION_TAKEN_NO_CALLBACK; } } else if (stream_op->recv_trailing_metadata && op_can_be_run(stream_op, stream_state, &oas->state, -- cgit v1.2.3 From f2f3bb89514e4453b5c26458fac333d58a07e85d Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 15 Sep 2016 16:00:54 -0700 Subject: Add an extra Cronet read after response header is received --- .../transport/cronet/transport/cronet_transport.c | 30 ++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 444873988b..8b074f4ea8 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -432,6 +432,15 @@ static void on_response_headers_received( grpc_mdstr_from_string(headers->headers[i].value))); } s->state.state_callback_received[OP_RECV_INITIAL_METADATA] = true; + /* Do an extra read to trigger on_succeeded() callback in case connection + is closed */ + GPR_ASSERT(s->state.rs.length_field_received == false); + s->state.rs.read_buffer = s->state.rs.grpc_header_bytes; + s->state.rs.received_bytes = 0; + s->state.rs.remaining_bytes = GRPC_HEADER_SIZE_IN_BYTES; + CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_read(%p)", s->cbs); + cronet_bidirectional_stream_read(s->cbs, s->state.rs.read_buffer, + s->state.rs.remaining_bytes); gpr_mu_unlock(&s->mu); execute_from_storage(s); } @@ -509,20 +518,8 @@ static void on_response_trailers_received( s->state.rs.trailing_metadata_valid = true; } s->state.state_callback_received[OP_RECV_TRAILING_METADATA] = true; - if (!s->state.state_op_done[OP_READ_REQ_MADE]) { - /* Do an extra read to trigger on_succeeded() callback in case connection - is closed */ - s->state.rs.received_bytes = 0; - s->state.rs.remaining_bytes = GRPC_HEADER_SIZE_IN_BYTES; - s->state.rs.length_field_received = false; - CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_read(%p)", s->cbs); - cronet_bidirectional_stream_read(s->cbs, s->state.rs.read_buffer, - s->state.rs.remaining_bytes); - gpr_mu_unlock(&s->mu); - } else { - gpr_mu_unlock(&s->mu); - execute_from_storage(s); - } + gpr_mu_unlock(&s->mu); + execute_from_storage(s); } /* @@ -633,9 +630,9 @@ static bool op_can_be_run(grpc_transport_stream_op *curr_op, /* When call is canceled, every op can be run, except under following conditions */ - bool is_canceled_of_failed = stream_state->state_op_done[OP_CANCEL_ERROR] || + bool is_canceled_or_failed = stream_state->state_op_done[OP_CANCEL_ERROR] || stream_state->state_callback_received[OP_FAILED]; - if (is_canceled_of_failed) { + if (is_canceled_or_failed) { if (op_id == OP_SEND_INITIAL_METADATA) result = false; if (op_id == OP_SEND_MESSAGE) result = false; if (op_id == OP_SEND_TRAILING_METADATA) result = false; @@ -949,6 +946,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, oas->state.state_op_done[OP_RECV_MESSAGE] = true; /* Do an extra read to trigger on_succeeded() callback in case connection is closed */ + stream_state->rs.read_buffer = stream_state->rs.grpc_header_bytes; stream_state->rs.received_bytes = 0; stream_state->rs.remaining_bytes = GRPC_HEADER_SIZE_IN_BYTES; stream_state->rs.length_field_received = false; -- cgit v1.2.3 From 3ec218ba2620fdfd8e8f5c12c84edad9c909e8fc Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 20 Sep 2016 18:36:57 -0700 Subject: Fix a bug that causes cronet read when cancelled or failed --- .../transport/cronet/transport/cronet_transport.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 8b074f4ea8..eefe1a889c 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -432,15 +432,18 @@ static void on_response_headers_received( grpc_mdstr_from_string(headers->headers[i].value))); } s->state.state_callback_received[OP_RECV_INITIAL_METADATA] = true; - /* Do an extra read to trigger on_succeeded() callback in case connection - is closed */ - GPR_ASSERT(s->state.rs.length_field_received == false); - s->state.rs.read_buffer = s->state.rs.grpc_header_bytes; - s->state.rs.received_bytes = 0; - s->state.rs.remaining_bytes = GRPC_HEADER_SIZE_IN_BYTES; - CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_read(%p)", s->cbs); - cronet_bidirectional_stream_read(s->cbs, s->state.rs.read_buffer, - s->state.rs.remaining_bytes); + if (!(s->state.state_op_done[OP_CANCEL_ERROR] || + s->state.state_callback_received[OP_FAILED])) { + /* Do an extra read to trigger on_succeeded() callback in case connection + is closed */ + GPR_ASSERT(s->state.rs.length_field_received == false); + s->state.rs.read_buffer = s->state.rs.grpc_header_bytes; + s->state.rs.received_bytes = 0; + s->state.rs.remaining_bytes = GRPC_HEADER_SIZE_IN_BYTES; + CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_read(%p)", s->cbs); + cronet_bidirectional_stream_read(s->cbs, s->state.rs.read_buffer, + s->state.rs.remaining_bytes); + } gpr_mu_unlock(&s->mu); execute_from_storage(s); } -- cgit v1.2.3 From 106af4995f936944c581ce8026913fe452ea830a Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 22 Sep 2016 16:21:31 -0700 Subject: Fix a bug that causes cronet stuck when server initiate termination of stream --- src/core/ext/transport/cronet/transport/cronet_transport.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index eefe1a889c..7457b30d25 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -521,8 +521,18 @@ static void on_response_trailers_received( s->state.rs.trailing_metadata_valid = true; } s->state.state_callback_received[OP_RECV_TRAILING_METADATA] = true; - gpr_mu_unlock(&s->mu); - execute_from_storage(s); + /* Send a EOS when server terminates the stream to trigger on_succeeded */ + if (!s->state.state_op_done[OP_SEND_TRAILING_METADATA]) { + CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_write (%p, 0)", s->cbs); + s->state.state_callback_received[OP_SEND_MESSAGE] = false; + cronet_bidirectional_stream_write(s->cbs, "", 0, true); + s->state.state_op_done[OP_SEND_TRAILING_METADATA] = true; + + gpr_mu_unlock(&s->mu); + } else { + gpr_mu_unlock(&s->mu); + execute_from_storage(s); + } } /* -- cgit v1.2.3 From 7faef2188d46a8db60cafc5751712227867e826e Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 23 Sep 2016 16:31:25 -0700 Subject: Add cronet read buffer flush when error grpc-status is received --- .../transport/cronet/transport/cronet_transport.c | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 7457b30d25..5e202d0ee2 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -148,6 +148,8 @@ struct write_state { struct op_state { bool state_op_done[OP_NUM_OPS]; bool state_callback_received[OP_NUM_OPS]; + bool fail_state; + bool flush_read; /* data structure for storing data coming from server */ struct read_state rs; /* data structure for storing data going to the server */ @@ -475,7 +477,11 @@ static void on_read_completed(cronet_bidirectional_stream *stream, char *data, count); gpr_mu_lock(&s->mu); s->state.state_callback_received[OP_RECV_MESSAGE] = true; - if (count > 0) { + if (count > 0 && s->state.flush_read) { + CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_read(%p)", s->cbs); + cronet_bidirectional_stream_read(s->cbs, s->state.rs.read_buffer, 4096); + gpr_mu_unlock(&s->mu); + } else if (count > 0) { s->state.rs.received_bytes += count; s->state.rs.remaining_bytes -= count; if (s->state.rs.remaining_bytes > 0) { @@ -490,6 +496,10 @@ static void on_read_completed(cronet_bidirectional_stream *stream, char *data, execute_from_storage(s); } } else { + if (s->state.flush_read) { + gpr_free(s->state.rs.read_buffer); + s->state.rs.read_buffer = NULL; + } s->state.rs.read_stream_closed = true; gpr_mu_unlock(&s->mu); execute_from_storage(s); @@ -519,6 +529,10 @@ static void on_response_trailers_received( grpc_mdstr_from_string(trailers->headers[i].key), grpc_mdstr_from_string(trailers->headers[i].value))); s->state.rs.trailing_metadata_valid = true; + if (0 == strcmp(trailers->headers[i].key, "grpc-status") && + 0 != strcmp(trailers->headers[i].value, "0")) { + s->state.fail_state = true; + } } s->state.state_callback_received[OP_RECV_TRAILING_METADATA] = true; /* Send a EOS when server terminates the stream to trigger on_succeeded */ @@ -790,6 +804,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, OP_SEND_INITIAL_METADATA)) { CRONET_LOG(GPR_DEBUG, "running: %p OP_SEND_INITIAL_METADATA", oas); /* This OP is the beginning. Reset various states */ + stream_state->fail_state = stream_state->flush_read = false; memset(&s->header_array, 0, sizeof(s->header_array)); memset(&stream_state->rs, 0, sizeof(stream_state->rs)); memset(&stream_state->ws, 0, sizeof(stream_state->ws)); @@ -1026,6 +1041,15 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, make a note */ if (stream_op->recv_message) stream_state->state_op_done[OP_RECV_MESSAGE_AND_ON_COMPLETE] = true; + } else if (stream_state->fail_state && !stream_state->flush_read) { + CRONET_LOG(GPR_DEBUG, "running: %p flush read", oas); + if (stream_state->rs.read_buffer && + stream_state->rs.read_buffer != stream_state->rs.grpc_header_bytes) { + gpr_free(stream_state->rs.read_buffer); + stream_state->rs.read_buffer = NULL; + } + stream_state->rs.read_buffer = gpr_malloc(4096); + stream_state->flush_read = true; } else { result = NO_ACTION_POSSIBLE; } -- cgit v1.2.3 From ff1ee6f7a39b3400c3256f34b8e8b919c4ef1648 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 16 Sep 2016 11:19:22 -0700 Subject: Cancel the stream operation if it contains send_initial_metadata and :authority header --- .../ext/transport/cronet/transport/cronet_transport.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 25ad40b935..605eb40e44 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -610,6 +610,16 @@ static int parse_grpc_header(const uint8_t *data) { return length; } +static bool header_has_authority(grpc_linked_mdelem *head) { + while (head != NULL) { + if (head->md->key == GRPC_MDSTR_AUTHORITY) { + return true; + } + head = head->next; + } + return false; +} + /* Op Execution: Decide if one of the actions contained in the stream op can be executed. This is the heart of the state machine. @@ -1042,6 +1052,11 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, s->curr_gs = gs; memcpy(&s->curr_ct, gt, sizeof(grpc_cronet_transport)); add_to_storage(s, op); + if (op->send_initial_metadata && + header_has_authority(op->send_initial_metadata->list.head)) { + CRONET_LOG(GPR_DEBUG, ":authority header is provided but not supported; cancel operations"); + s->state.state_op_done[OP_CANCEL_ERROR] = true; + } execute_from_storage(s); } -- cgit v1.2.3 From f6ac1adcda35f879f02ef2f0a7e42d40eeb7fa1c Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 16 Sep 2016 13:36:31 -0700 Subject: OP_ON_COMPLETE now can return GRPC_ERROR_CANCELLED status --- src/core/ext/transport/cronet/transport/cronet_transport.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 605eb40e44..4962d1c06f 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -991,11 +991,17 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, } else if (stream_op->on_complete && op_can_be_run(stream_op, stream_state, &oas->state, OP_ON_COMPLETE)) { - /* All actions in this stream_op are complete. Call the on_complete callback - */ CRONET_LOG(GPR_DEBUG, "running: %p OP_ON_COMPLETE", oas); - grpc_exec_ctx_sched(exec_ctx, stream_op->on_complete, GRPC_ERROR_NONE, - NULL); + if (stream_state->state_op_done[OP_CANCEL_ERROR] || + stream_state->state_callback_received[OP_FAILED]) { + grpc_exec_ctx_sched(exec_ctx, stream_op->on_complete, GRPC_ERROR_CANCELLED, + NULL); + } else { + /* All actions in this stream_op are complete. Call the on_complete callback + */ + grpc_exec_ctx_sched(exec_ctx, stream_op->on_complete, GRPC_ERROR_NONE, + NULL); + } oas->state.state_op_done[OP_ON_COMPLETE] = true; oas->done = true; /* reset any send message state, only if this ON_COMPLETE is about a send. -- cgit v1.2.3 From 81f8d2e51cb448304a0ebe93699d61415fd8f694 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 16 Sep 2016 17:20:37 -0700 Subject: Send GRPC_STATUS_UNIMPLEMENTED status to upper layer when :authority header is provided --- .../transport/cronet/transport/cronet_transport.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 4962d1c06f..af6944ef0a 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -1060,10 +1060,26 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, add_to_storage(s, op); if (op->send_initial_metadata && header_has_authority(op->send_initial_metadata->list.head)) { - CRONET_LOG(GPR_DEBUG, ":authority header is provided but not supported; cancel operations"); + cronet_bidirectional_stream_header_array header_array; + cronet_bidirectional_stream_header *header; + cronet_bidirectional_stream cbs; + CRONET_LOG(GPR_DEBUG, ":authority header is provided but not supported;" + " cancel operations"); + /* Notify application that operation is cancelled by forging trailers */ + header_array.count = 1; + header_array.capacity = 1; + header_array.headers = + gpr_malloc(sizeof(cronet_bidirectional_stream_header)); + header = (cronet_bidirectional_stream_header*) header_array.headers; + header->key = "grpc-status"; + header->value = "12"; + cbs.annotation = (void*)s; s->state.state_op_done[OP_CANCEL_ERROR] = true; + on_response_trailers_received(&cbs, &header_array); + gpr_free(header_array.headers); + } else { + execute_from_storage(s); } - execute_from_storage(s); } static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, -- cgit v1.2.3 From a4f708a4c4af88e114209eb29f625c4d4d935bb4 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 11 Oct 2016 18:36:24 -0700 Subject: Introduce grpc_socket_mutator --- BUILD | 4 -- CMakeLists.txt | 3 - Makefile | 40 ------------- binding.gyp | 1 - build.yaml | 15 ----- config.m4 | 1 - gRPC-Core.podspec | 1 - grpc.gemspec | 1 - include/grpc/impl/codegen/grpc_types.h | 14 ++++- package.xml | 1 - src/core/lib/iomgr/socket_utils_common_posix.c | 9 +++ src/core/lib/iomgr/socket_utils_posix.h | 4 +- src/core/lib/iomgr/socket_utils_tos_posix.c | 68 ---------------------- src/core/lib/iomgr/tcp_client_posix.c | 7 ++- src/python/grpcio/grpc_core_dependencies.py | 1 - test/core/iomgr/socket_utils_test.c | 48 +++++++++++++++ test/core/iomgr/socket_utils_tos_test.c | 67 --------------------- tools/doxygen/Doxyfile.core.internal | 1 - tools/run_tests/sources_and_headers.json | 18 ------ tools/run_tests/tests.json | 19 ------ vsprojects/vcxproj/grpc/grpc.vcxproj | 2 - vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 - .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 2 - .../grpc_test_util/grpc_test_util.vcxproj.filters | 3 - .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 2 - .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 3 - 26 files changed, 75 insertions(+), 263 deletions(-) delete mode 100644 src/core/lib/iomgr/socket_utils_tos_posix.c delete mode 100644 test/core/iomgr/socket_utils_tos_test.c (limited to 'src/core') diff --git a/BUILD b/BUILD index d2a4e70f61..bad6f3f075 100644 --- a/BUILD +++ b/BUILD @@ -366,7 +366,6 @@ cc_library( "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_utils_tos_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", @@ -753,7 +752,6 @@ cc_library( "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_utils_tos_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", @@ -1102,7 +1100,6 @@ cc_library( "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_utils_tos_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", @@ -1866,7 +1863,6 @@ objc_library( "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_utils_tos_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", diff --git a/CMakeLists.txt b/CMakeLists.txt index d88d917752..c4191521bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,7 +333,6 @@ add_library(grpc 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_utils_tos_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 @@ -593,7 +592,6 @@ add_library(grpc_cronet 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_utils_tos_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 @@ -825,7 +823,6 @@ add_library(grpc_unsecure 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_utils_tos_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 diff --git a/Makefile b/Makefile index cd988b8555..62c65822b0 100644 --- a/Makefile +++ b/Makefile @@ -1012,7 +1012,6 @@ set_initial_connect_string_test: $(BINDIR)/$(CONFIG)/set_initial_connect_string_ sockaddr_resolver_test: $(BINDIR)/$(CONFIG)/sockaddr_resolver_test sockaddr_utils_test: $(BINDIR)/$(CONFIG)/sockaddr_utils_test socket_utils_test: $(BINDIR)/$(CONFIG)/socket_utils_test -socket_utils_tos_test: $(BINDIR)/$(CONFIG)/socket_utils_tos_test tcp_client_posix_test: $(BINDIR)/$(CONFIG)/tcp_client_posix_test tcp_posix_test: $(BINDIR)/$(CONFIG)/tcp_posix_test tcp_server_posix_test: $(BINDIR)/$(CONFIG)/tcp_server_posix_test @@ -1329,7 +1328,6 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/sockaddr_resolver_test \ $(BINDIR)/$(CONFIG)/sockaddr_utils_test \ $(BINDIR)/$(CONFIG)/socket_utils_test \ - $(BINDIR)/$(CONFIG)/socket_utils_tos_test \ $(BINDIR)/$(CONFIG)/tcp_client_posix_test \ $(BINDIR)/$(CONFIG)/tcp_posix_test \ $(BINDIR)/$(CONFIG)/tcp_server_posix_test \ @@ -1716,8 +1714,6 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/sockaddr_utils_test || ( echo test sockaddr_utils_test failed ; exit 1 ) $(E) "[RUN] Testing socket_utils_test" $(Q) $(BINDIR)/$(CONFIG)/socket_utils_test || ( echo test socket_utils_test failed ; exit 1 ) - $(E) "[RUN] Testing socket_utils_tos_test" - $(Q) $(BINDIR)/$(CONFIG)/socket_utils_tos_test || ( echo test socket_utils_tos_test failed ; exit 1 ) $(E) "[RUN] Testing tcp_client_posix_test" $(Q) $(BINDIR)/$(CONFIG)/tcp_client_posix_test || ( echo test tcp_client_posix_test failed ; exit 1 ) $(E) "[RUN] Testing tcp_posix_test" @@ -2581,7 +2577,6 @@ LIBGRPC_SRC = \ 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_utils_tos_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 \ @@ -2859,7 +2854,6 @@ LIBGRPC_CRONET_SRC = \ 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_utils_tos_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 \ @@ -3127,7 +3121,6 @@ LIBGRPC_TEST_UTIL_SRC = \ 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_utils_tos_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 \ @@ -3322,7 +3315,6 @@ LIBGRPC_UNSECURE_SRC = \ 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_utils_tos_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 \ @@ -10349,38 +10341,6 @@ endif endif -SOCKET_UTILS_TOS_TEST_SRC = \ - test/core/iomgr/socket_utils_tos_test.c \ - -SOCKET_UTILS_TOS_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SOCKET_UTILS_TOS_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/socket_utils_tos_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/socket_utils_tos_test: $(SOCKET_UTILS_TOS_TEST_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) $(LD) $(LDFLAGS) $(SOCKET_UTILS_TOS_TEST_OBJS) $(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)/socket_utils_tos_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/iomgr/socket_utils_tos_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_socket_utils_tos_test: $(SOCKET_UTILS_TOS_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(SOCKET_UTILS_TOS_TEST_OBJS:.o=.dep) -endif -endif - - TCP_CLIENT_POSIX_TEST_SRC = \ test/core/iomgr/tcp_client_posix_test.c \ diff --git a/binding.gyp b/binding.gyp index fd2bed86b0..58edda2e63 100644 --- a/binding.gyp +++ b/binding.gyp @@ -608,7 +608,6 @@ '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_utils_tos_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', diff --git a/build.yaml b/build.yaml index 857ef6c8ee..584084ff86 100644 --- a/build.yaml +++ b/build.yaml @@ -293,7 +293,6 @@ filegroups: - 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_utils_tos_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 @@ -2438,20 +2437,6 @@ targets: - mac - linux - posix -- name: socket_utils_tos_test - build: test - language: c - src: - - test/core/iomgr/socket_utils_tos_test.c - deps: - - grpc_test_util - - grpc - - gpr_test_util - - gpr - platforms: - - mac - - linux - - posix - name: tcp_client_posix_test cpu_cost: 0.5 build: test diff --git a/config.m4 b/config.m4 index 7012fb0c54..0f103655a8 100644 --- a/config.m4 +++ b/config.m4 @@ -127,7 +127,6 @@ if test "$PHP_GRPC" != "no"; then 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_utils_tos_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 \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 7b74143f41..6886bdfb5a 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -457,7 +457,6 @@ Pod::Spec.new do |s| '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_utils_tos_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', diff --git a/grpc.gemspec b/grpc.gemspec index 2353798355..6079ea2aef 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -377,7 +377,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/socket_utils_common_posix.c ) s.files += %w( src/core/lib/iomgr/socket_utils_linux.c ) s.files += %w( src/core/lib/iomgr/socket_utils_posix.c ) - s.files += %w( src/core/lib/iomgr/socket_utils_tos_posix.c ) s.files += %w( src/core/lib/iomgr/socket_windows.c ) s.files += %w( src/core/lib/iomgr/tcp_client_posix.c ) s.files += %w( src/core/lib/iomgr/tcp_client_windows.c ) diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index aad604a3b4..6621119d25 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -201,10 +201,20 @@ typedef struct { #define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size" /** If non-zero, allow the use of SO_REUSEPORT if it's available (default 1) */ #define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport" -/** The Type-Of-Service (TOS), in bytes. */ -#define GRPC_ARG_TOS "grpc.tos" +/** The grpc_socket_mutator instance that set the socket options. A pointer. */ +#define GRPC_ARG_SOCKET_MUTATOR "grpc.socket_mutator" /** \} */ +typedef struct grpc_socket_mutator grpc_socket_mutator; + +typedef struct grpc_socket_mutator_vtable { + bool (*mutate_fd)(int fd, grpc_socket_mutator *mutator); +} grpc_socket_mutator_vtable; + +struct grpc_socket_mutator { + const grpc_socket_mutator_vtable *vtable; +}; + /** Result of a grpc call. If the caller satisfies the prerequisites of a particular operation, the grpc_call_error returned will be GRPC_CALL_OK. Receiving any other value listed here is an indication of a bug in the diff --git a/package.xml b/package.xml index 489504c43f..7bac695787 100644 --- a/package.xml +++ b/package.xml @@ -384,7 +384,6 @@ - diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index d2f6261e2a..8c33ba3754 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -208,6 +208,15 @@ grpc_error *grpc_set_socket_low_latency(int fd, int low_latency) { return GRPC_ERROR_NONE; } +/* set a socker using a grpc_socket_mutator */ +grpc_error *grpc_set_socket_with_mutator(int fd, grpc_socket_mutator *mutator) { + GPR_ASSERT(mutator); + if (!mutator->vtable->mutate_fd(fd, mutator)) { + return GRPC_ERROR_CREATE("grpc_socket_mutator failed."); + } + return GRPC_ERROR_NONE; +} + static gpr_once g_probe_ipv6_once = GPR_ONCE_INIT; static int g_ipv6_loopback_available; diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h index bf4cc96af2..d84a95d3d3 100644 --- a/src/core/lib/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -87,8 +87,8 @@ grpc_error *grpc_set_socket_sndbuf(int fd, int buffer_size_bytes); /* Tries to set the socket's receive buffer to given size. */ grpc_error *grpc_set_socket_rcvbuf(int fd, int buffer_size_bytes); -/* Tries to set the socket's type to service */ -grpc_error *grpc_set_socket_tos(int fd, grpc_arg *arg); +/* Tries to set the socket using a grpc_socket_mutator */ +grpc_error *grpc_set_socket_with_mutator(int fd, grpc_socket_mutator *mutator); /* An enum to keep track of IPv4/IPv6 socket modes. diff --git a/src/core/lib/iomgr/socket_utils_tos_posix.c b/src/core/lib/iomgr/socket_utils_tos_posix.c deleted file mode 100644 index 603ad3c421..0000000000 --- a/src/core/lib/iomgr/socket_utils_tos_posix.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * - * 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 - -#ifdef GPR_POSIX_SOCKET - -#include "src/core/lib/iomgr/socket_utils_posix.h" - -#include -#include -#include - -#include -#include - -grpc_error* grpc_set_socket_tos(int fd, grpc_arg* arg) { - int newval; - socklen_t intlen = sizeof(newval); - - GPR_ASSERT(0 == strcmp(arg->key, GRPC_ARG_TOS)); - GPR_ASSERT(arg->type == GRPC_ARG_INTEGER); - - if (0 != setsockopt(fd, IPPROTO_IP, IP_TOS, &arg->value.integer, - sizeof(arg->value.integer))) { - return GRPC_OS_ERROR(errno, "setsockopt(IP_TOS)"); - } - if (0 != getsockopt(fd, IPPROTO_IP, IP_TOS, &newval, &intlen)) { - return GRPC_OS_ERROR(errno, "getsockopt(IP_TOS)"); - } - if (newval != arg->value.integer) { - return GRPC_ERROR_CREATE("Failed to set IP_TOS"); - } - - return GRPC_ERROR_NONE; -} - -#endif diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 1439efe706..84eb41ecd2 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -89,10 +89,11 @@ static grpc_error *prepare_socket(const struct sockaddr *addr, int fd, if (err != GRPC_ERROR_NONE) goto error; if (channel_args) { for (size_t i = 0; i < channel_args->num_args; i++) { - if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_TOS)) { - err = grpc_set_socket_tos(fd, &channel_args->args[i]); + if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_SOCKET_MUTATOR)) { + GPR_ASSERT(channel_args->args[i].type == GRPC_ARG_POINTER); + grpc_socket_mutator *mutator = channel_args->args[i].value.pointer.p; + err = grpc_set_socket_with_mutator(fd, mutator); if (err != GRPC_ERROR_NONE) goto error; - break; } } } diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index dec578edb5..2bebf48c70 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -121,7 +121,6 @@ CORE_SOURCE_FILES = [ '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_utils_tos_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', diff --git a/test/core/iomgr/socket_utils_test.c b/test/core/iomgr/socket_utils_test.c index 297531c44d..113668b4e9 100644 --- a/test/core/iomgr/socket_utils_test.c +++ b/test/core/iomgr/socket_utils_test.c @@ -35,11 +35,37 @@ #include "src/core/lib/iomgr/socket_utils_posix.h" #include +#include #include #include #include "test/core/util/test_config.h" +struct test_socket_mutator { + grpc_socket_mutator base; + int option_value; +}; + +static bool mutate_fd(int fd, grpc_socket_mutator* mutator) { + int newval; + socklen_t intlen = sizeof(newval); + struct test_socket_mutator* m = (struct test_socket_mutator*)mutator; + + if (0 != setsockopt(fd, IPPROTO_IP, IP_TOS, &m->option_value, + sizeof(m->option_value))) { + return false; + } + if (0 != getsockopt(fd, IPPROTO_IP, IP_TOS, &newval, &intlen)) { + return false; + } + if (newval != m->option_value) { + return false; + } + return true; +} + +static const grpc_socket_mutator_vtable mutator_vtable = {mutate_fd}; + int main(int argc, char **argv) { int sock; grpc_test_init(argc, argv); @@ -64,6 +90,28 @@ int main(int argc, char **argv) { GPR_ASSERT(GRPC_LOG_IF_ERROR("set_socket_low_latency", grpc_set_socket_low_latency(sock, 0))); + struct test_socket_mutator mutator; + mutator.base.vtable = &mutator_vtable; + + mutator.option_value = IPTOS_LOWDELAY; + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "set_socket_with_mutator", + grpc_set_socket_with_mutator(sock, (grpc_socket_mutator*)&mutator))); + + mutator.option_value = IPTOS_THROUGHPUT; + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "set_socket_with_mutator", + grpc_set_socket_with_mutator(sock, (grpc_socket_mutator*)&mutator))); + + mutator.option_value = IPTOS_RELIABILITY; + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "set_socket_with_mutator", + grpc_set_socket_with_mutator(sock, (grpc_socket_mutator*)&mutator))); + + mutator.option_value = -1; + GPR_ASSERT(GRPC_ERROR_NONE != grpc_set_socket_with_mutator( + sock, (grpc_socket_mutator*)&mutator)); + close(sock); return 0; diff --git a/test/core/iomgr/socket_utils_tos_test.c b/test/core/iomgr/socket_utils_tos_test.c deleted file mode 100644 index ee3a43367b..0000000000 --- a/test/core/iomgr/socket_utils_tos_test.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * 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 -#include "src/core/lib/iomgr/socket_utils_posix.h" - -#include -#include -#include - -#include -#include "test/core/util/test_config.h" - -int main(int argc, char **argv) { - int sock; - grpc_arg tos_arg; - grpc_test_init(argc, argv); - - sock = socket(PF_INET, SOCK_STREAM, 0); - GPR_ASSERT(sock > 0); - - tos_arg.key = GRPC_ARG_TOS; - tos_arg.type = GRPC_ARG_INTEGER; - tos_arg.value.integer = IPTOS_LOWDELAY; - GPR_ASSERT( - GRPC_LOG_IF_ERROR("set_socket_tos", grpc_set_socket_tos(sock, &tos_arg))); - tos_arg.value.integer = IPTOS_THROUGHPUT; - GPR_ASSERT( - GRPC_LOG_IF_ERROR("set_socket_tos", grpc_set_socket_tos(sock, &tos_arg))); - tos_arg.value.integer = IPTOS_RELIABILITY; - GPR_ASSERT( - GRPC_LOG_IF_ERROR("set_socket_tos", grpc_set_socket_tos(sock, &tos_arg))); - - close(sock); - - return 0; -} diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 59998f03fb..44f147aeb1 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -994,7 +994,6 @@ 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_utils_tos_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 \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 5ecb3ee0f8..c05d194e19 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1858,23 +1858,6 @@ "third_party": false, "type": "target" }, - { - "deps": [ - "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" - ], - "headers": [], - "is_filegroup": false, - "language": "c", - "name": "socket_utils_tos_test", - "src": [ - "test/core/iomgr/socket_utils_tos_test.c" - ], - "third_party": false, - "type": "target" - }, { "deps": [ "gpr", @@ -6550,7 +6533,6 @@ "src/core/lib/iomgr/socket_utils_linux.c", "src/core/lib/iomgr/socket_utils_posix.c", "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_utils_tos_posix.c", "src/core/lib/iomgr/socket_windows.c", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 07b51d3c2f..c3395067c9 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1819,25 +1819,6 @@ "posix" ] }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "socket_utils_tos_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index f115001507..965d06d1d5 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -549,8 +549,6 @@ - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 81dae475a1..dddd4ecce5 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -133,9 +133,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index da631cd0dc..b724c217ed 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -397,8 +397,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index b42b5ec68a..92806fa04a 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -187,9 +187,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 921eaf3780..b46773632c 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -517,8 +517,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index c7d0106dc5..6ffc1eab70 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -136,9 +136,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr -- cgit v1.2.3 From 062a8b2101f1b7deae8878e166897f8afba78879 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 12 Oct 2016 15:42:04 -0700 Subject: Update error code and add comment --- src/core/ext/transport/cronet/transport/cronet_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index af6944ef0a..6a9ba0d725 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -1072,7 +1072,7 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, gpr_malloc(sizeof(cronet_bidirectional_stream_header)); header = (cronet_bidirectional_stream_header*) header_array.headers; header->key = "grpc-status"; - header->value = "12"; + header->value = "1"; /* Return status GRPC_STATUS_CANCELLED */ cbs.annotation = (void*)s; s->state.state_op_done[OP_CANCEL_ERROR] = true; on_response_trailers_received(&cbs, &header_array); -- cgit v1.2.3 From bedb0d20dc61d630aecb180ded930a5050d97cd7 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 12 Oct 2016 17:18:21 -0700 Subject: clang-format --- src/core/ext/transport/cronet/transport/cronet_transport.c | 14 ++++++++------ test/core/end2end/tests/authority_not_supported.c | 8 +++----- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 6a9ba0d725..8ab1031a35 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -994,10 +994,11 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, CRONET_LOG(GPR_DEBUG, "running: %p OP_ON_COMPLETE", oas); if (stream_state->state_op_done[OP_CANCEL_ERROR] || stream_state->state_callback_received[OP_FAILED]) { - grpc_exec_ctx_sched(exec_ctx, stream_op->on_complete, GRPC_ERROR_CANCELLED, - NULL); + grpc_exec_ctx_sched(exec_ctx, stream_op->on_complete, + GRPC_ERROR_CANCELLED, NULL); } else { - /* All actions in this stream_op are complete. Call the on_complete callback + /* All actions in this stream_op are complete. Call the on_complete + * callback */ grpc_exec_ctx_sched(exec_ctx, stream_op->on_complete, GRPC_ERROR_NONE, NULL); @@ -1063,17 +1064,18 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, cronet_bidirectional_stream_header_array header_array; cronet_bidirectional_stream_header *header; cronet_bidirectional_stream cbs; - CRONET_LOG(GPR_DEBUG, ":authority header is provided but not supported;" + CRONET_LOG(GPR_DEBUG, + ":authority header is provided but not supported;" " cancel operations"); /* Notify application that operation is cancelled by forging trailers */ header_array.count = 1; header_array.capacity = 1; header_array.headers = gpr_malloc(sizeof(cronet_bidirectional_stream_header)); - header = (cronet_bidirectional_stream_header*) header_array.headers; + header = (cronet_bidirectional_stream_header *)header_array.headers; header->key = "grpc-status"; header->value = "1"; /* Return status GRPC_STATUS_CANCELLED */ - cbs.annotation = (void*)s; + cbs.annotation = (void *)s; s->state.state_op_done[OP_CANCEL_ERROR] = true; on_response_trailers_received(&cbs, &header_array); gpr_free(header_array.headers); diff --git a/test/core/end2end/tests/authority_not_supported.c b/test/core/end2end/tests/authority_not_supported.c index 3b17f0c7cf..632eaf823d 100644 --- a/test/core/end2end/tests/authority_not_supported.c +++ b/test/core/end2end/tests/authority_not_supported.c @@ -96,8 +96,7 @@ static void end_test(grpc_end2end_test_fixture *f) { } /* Request/response with metadata and payload.*/ -static void test_with_authority_header( - grpc_end2end_test_config config) { +static void test_with_authority_header(grpc_end2end_test_config config) { grpc_call *c; gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = @@ -106,8 +105,8 @@ static void test_with_authority_header( grpc_metadata meta_c[2] = { {"key1", "val1", 4, 0, {{NULL, NULL, NULL, NULL}}}, {"key2", "val2", 4, 0, {{NULL, NULL, NULL, NULL}}}}; - grpc_end2end_test_fixture f = begin_test( - config, "test_with_authority_header", NULL, NULL); + grpc_end2end_test_fixture f = + begin_test(config, "test_with_authority_header", NULL, NULL); cq_verifier *cqv = cq_verifier_create(f.cq); grpc_op ops[6]; grpc_op *op; @@ -164,7 +163,6 @@ static void test_with_authority_header( error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL); GPR_ASSERT(GRPC_CALL_OK == error); - CQ_EXPECT_COMPLETION(cqv, tag(1), 1); cq_verify(cqv); -- cgit v1.2.3 From de3daf5d630fdd4396ed37b59d9550d5665b1e58 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 13 Oct 2016 17:26:26 -0700 Subject: More interfaces for grpc_socket_mutator --- BUILD | 8 +++ CMakeLists.txt | 3 + Makefile | 4 ++ binding.gyp | 1 + build.yaml | 2 + config.m4 | 1 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + include/grpc++/support/channel_arguments.h | 3 + include/grpc/impl/codegen/grpc_types.h | 13 +--- package.xml | 2 + src/core/lib/channel/channel_args.c | 6 ++ src/core/lib/channel/channel_args.h | 10 ++- src/core/lib/iomgr/socket_mutator.c | 81 ++++++++++++++++++++++ src/core/lib/iomgr/socket_mutator.h | 75 ++++++++++++++++++++ src/core/lib/iomgr/socket_utils_common_posix.c | 2 +- src/core/lib/iomgr/socket_utils_posix.h | 1 + src/core/lib/iomgr/tcp_client_posix.c | 1 + src/cpp/common/channel_arguments.cc | 20 +++++- src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/channel/channel_args_test.c | 14 ++++ test/core/iomgr/socket_utils_test.c | 15 +++- test/cpp/common/channel_arguments_test.cc | 62 +++++++++++++++++ tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 ++ .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 ++ .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 ++ 31 files changed, 346 insertions(+), 16 deletions(-) create mode 100644 src/core/lib/iomgr/socket_mutator.c create mode 100644 src/core/lib/iomgr/socket_mutator.h (limited to 'src/core') diff --git a/BUILD b/BUILD index bad6f3f075..9d9cd49c17 100644 --- a/BUILD +++ b/BUILD @@ -206,6 +206,7 @@ cc_library( "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_mutator.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -363,6 +364,7 @@ cc_library( "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_mutator.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", @@ -607,6 +609,7 @@ cc_library( "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_mutator.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -749,6 +752,7 @@ cc_library( "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_mutator.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", @@ -963,6 +967,7 @@ cc_library( "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_mutator.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -1097,6 +1102,7 @@ cc_library( "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_mutator.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", @@ -1860,6 +1866,7 @@ objc_library( "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_mutator.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", @@ -2083,6 +2090,7 @@ objc_library( "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_mutator.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index c4191521bd..4ff0180d0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,6 +330,7 @@ add_library(grpc 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_mutator.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 @@ -589,6 +590,7 @@ add_library(grpc_cronet 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_mutator.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 @@ -820,6 +822,7 @@ add_library(grpc_unsecure 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_mutator.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 diff --git a/Makefile b/Makefile index 62c65822b0..abdbbc343c 100644 --- a/Makefile +++ b/Makefile @@ -2574,6 +2574,7 @@ LIBGRPC_SRC = \ 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_mutator.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 \ @@ -2851,6 +2852,7 @@ LIBGRPC_CRONET_SRC = \ 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_mutator.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 \ @@ -3118,6 +3120,7 @@ LIBGRPC_TEST_UTIL_SRC = \ 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_mutator.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 \ @@ -3312,6 +3315,7 @@ LIBGRPC_UNSECURE_SRC = \ 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_mutator.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 \ diff --git a/binding.gyp b/binding.gyp index 58edda2e63..dcc4fae455 100644 --- a/binding.gyp +++ b/binding.gyp @@ -605,6 +605,7 @@ '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_mutator.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', diff --git a/build.yaml b/build.yaml index 584084ff86..79b00d8c65 100644 --- a/build.yaml +++ b/build.yaml @@ -210,6 +210,7 @@ filegroups: - src/core/lib/iomgr/sockaddr_posix.h - src/core/lib/iomgr/sockaddr_utils.h - src/core/lib/iomgr/sockaddr_windows.h + - src/core/lib/iomgr/socket_mutator.h - src/core/lib/iomgr/socket_utils_posix.h - src/core/lib/iomgr/socket_windows.h - src/core/lib/iomgr/tcp_client.h @@ -290,6 +291,7 @@ filegroups: - 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_mutator.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 diff --git a/config.m4 b/config.m4 index 0f103655a8..b7ef4a991d 100644 --- a/config.m4 +++ b/config.m4 @@ -124,6 +124,7 @@ if test "$PHP_GRPC" != "no"; then 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_mutator.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 \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 6886bdfb5a..5bd76ab10e 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -293,6 +293,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_utils.h', 'src/core/lib/iomgr/sockaddr_windows.h', + 'src/core/lib/iomgr/socket_mutator.h', 'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/tcp_client.h', @@ -454,6 +455,7 @@ Pod::Spec.new do |s| '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_mutator.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', @@ -666,6 +668,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_utils.h', 'src/core/lib/iomgr/sockaddr_windows.h', + 'src/core/lib/iomgr/socket_mutator.h', 'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/tcp_client.h', diff --git a/grpc.gemspec b/grpc.gemspec index 6079ea2aef..c3601ec312 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -213,6 +213,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/sockaddr_posix.h ) s.files += %w( src/core/lib/iomgr/sockaddr_utils.h ) s.files += %w( src/core/lib/iomgr/sockaddr_windows.h ) + s.files += %w( src/core/lib/iomgr/socket_mutator.h ) s.files += %w( src/core/lib/iomgr/socket_utils_posix.h ) s.files += %w( src/core/lib/iomgr/socket_windows.h ) s.files += %w( src/core/lib/iomgr/tcp_client.h ) @@ -374,6 +375,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/resolve_address_posix.c ) s.files += %w( src/core/lib/iomgr/resolve_address_windows.c ) s.files += %w( src/core/lib/iomgr/sockaddr_utils.c ) + s.files += %w( src/core/lib/iomgr/socket_mutator.c ) s.files += %w( src/core/lib/iomgr/socket_utils_common_posix.c ) s.files += %w( src/core/lib/iomgr/socket_utils_linux.c ) s.files += %w( src/core/lib/iomgr/socket_utils_posix.c ) diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h index ae243939e9..a17557f59d 100644 --- a/include/grpc++/support/channel_arguments.h +++ b/include/grpc++/support/channel_arguments.h @@ -77,6 +77,9 @@ class ChannelArguments { /// Set the compression algorithm for the channel. void SetCompressionAlgorithm(grpc_compression_algorithm algorithm); + /// Set the socket mutator for the channel. + void SetSocketMutator(grpc_socket_mutator* mutator); + /// The given string will be sent at the front of the user agent string. void SetUserAgentPrefix(const grpc::string& user_agent_prefix); diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 6621119d25..800d9fe3d3 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -83,6 +83,9 @@ typedef struct grpc_server grpc_server; can have messages written to it and read from it. */ typedef struct grpc_call grpc_call; +/** The Socket Mutator interface allows changes on socket options */ +typedef struct grpc_socket_mutator grpc_socket_mutator; + /** Type specifier for grpc_arg */ typedef enum { GRPC_ARG_STRING, @@ -205,16 +208,6 @@ typedef struct { #define GRPC_ARG_SOCKET_MUTATOR "grpc.socket_mutator" /** \} */ -typedef struct grpc_socket_mutator grpc_socket_mutator; - -typedef struct grpc_socket_mutator_vtable { - bool (*mutate_fd)(int fd, grpc_socket_mutator *mutator); -} grpc_socket_mutator_vtable; - -struct grpc_socket_mutator { - const grpc_socket_mutator_vtable *vtable; -}; - /** Result of a grpc call. If the caller satisfies the prerequisites of a particular operation, the grpc_call_error returned will be GRPC_CALL_OK. Receiving any other value listed here is an indication of a bug in the diff --git a/package.xml b/package.xml index 7bac695787..2827faa22d 100644 --- a/package.xml +++ b/package.xml @@ -220,6 +220,7 @@ + @@ -381,6 +382,7 @@ + diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index 3a56b1ff20..770b4e0a79 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -261,6 +261,12 @@ uint32_t grpc_channel_args_compression_algorithm_get_states( } } +grpc_channel_args *grpc_channel_args_set_socket_mutator( + grpc_channel_args *a, grpc_socket_mutator *mutator) { + grpc_arg tmp = grpc_socket_mutator_to_arg(mutator); + return grpc_channel_args_copy_and_add(a, &tmp, 1); +} + int grpc_channel_args_compare(const grpc_channel_args *a, const grpc_channel_args *b) { int c = GPR_ICMP(a->num_args, b->num_args); diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 586a296d1f..8a3576247c 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -23,8 +23,8 @@ * 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 + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * 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. @@ -36,6 +36,7 @@ #include #include +#include "src/core/lib/iomgr/socket_mutator.h" // Channel args are intentionally immutable, to avoid the need for locking. @@ -89,6 +90,13 @@ uint32_t grpc_channel_args_compression_algorithm_get_states( int grpc_channel_args_compare(const grpc_channel_args *a, const grpc_channel_args *b); +/** Returns a channel arg instance with socket mutator added. The socket mutator + * will perform its mutate_fd method on all file descriptors used by the + * channel. + * If \a a is non-MULL, its args are copied. */ +grpc_channel_args *grpc_channel_args_set_socket_mutator( + grpc_channel_args *a, grpc_socket_mutator *mutator); + typedef struct grpc_integer_options { int default_value; // Return this if value is outside of expected bounds. int min_value; diff --git a/src/core/lib/iomgr/socket_mutator.c b/src/core/lib/iomgr/socket_mutator.c new file mode 100644 index 0000000000..3f66cb100d --- /dev/null +++ b/src/core/lib/iomgr/socket_mutator.c @@ -0,0 +1,81 @@ +/* + * + * Copyright 2015, 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 "src/core/lib/iomgr/socket_mutator.h" + +#include +#include +#include + +void grpc_socket_mutator_init(grpc_socket_mutator *mutator, + const grpc_socket_mutator_vtable *vtable) { + mutator->vtable = vtable; + gpr_ref_init(&mutator->refcount, 1); +} + +grpc_socket_mutator *grpc_socket_mutator_ref(grpc_socket_mutator *mutator) { + gpr_ref(&mutator->refcount); + return mutator; +} + +bool grpc_socket_mutator_mutate_fd(grpc_socket_mutator *mutator, int fd) { + return mutator->vtable->mutate_fd(fd, mutator); +} + +void grpc_socket_mutator_unref(grpc_socket_mutator *mutator) { + if (gpr_unref(&mutator->refcount)) { + mutator->vtable->destory(mutator); + } +} + +static void *socket_mutator_arg_copy(void *p) { + return grpc_socket_mutator_ref(p); +} + +static void socket_mutator_arg_destroy(void *p) { + grpc_socket_mutator_unref(p); +} + +static int socket_mutator_cmp(void *a, void *b) { return GPR_ICMP(a, b); } + +static const grpc_arg_pointer_vtable socket_mutator_arg_vtable = { + socket_mutator_arg_copy, socket_mutator_arg_destroy, socket_mutator_cmp}; + +grpc_arg grpc_socket_mutator_to_arg(grpc_socket_mutator *mutator) { + grpc_arg arg; + arg.type = GRPC_ARG_POINTER; + arg.key = GRPC_ARG_SOCKET_MUTATOR; + arg.value.pointer.vtable = &socket_mutator_arg_vtable; + arg.value.pointer.p = mutator; + return arg; +} diff --git a/src/core/lib/iomgr/socket_mutator.h b/src/core/lib/iomgr/socket_mutator.h new file mode 100644 index 0000000000..5200f52d3a --- /dev/null +++ b/src/core/lib/iomgr/socket_mutator.h @@ -0,0 +1,75 @@ +/* + * + * Copyright 2015, 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. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_SOCKET_MUTATOR_H +#define GRPC_CORE_LIB_IOMGR_SOCKET_MUTATOR_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** The virtual table of grpc_socket_mutator */ +typedef struct { + /** Mutates the socket opitons of \a fd */ + bool (*mutate_fd)(int fd, grpc_socket_mutator *mutator); + /** Destroys the socket mutator instance */ + void (*destory)(grpc_socket_mutator *mutator); +} grpc_socket_mutator_vtable; + +/** The Socket Mutator interface allows changes on socket options */ +struct grpc_socket_mutator { + const grpc_socket_mutator_vtable *vtable; + gpr_refcount refcount; +}; + +/** called by concrete implementations to initialize the base struct */ +void grpc_socket_mutator_init(grpc_socket_mutator *mutator, + const grpc_socket_mutator_vtable *vtable); + +/** Wrap \a mutator as a grpc_arg */ +grpc_arg grpc_socket_mutator_to_arg(grpc_socket_mutator *mutator); + +/** Perform the file descriptor mutation operation of \a mutator on \a fd */ +bool grpc_socket_mutator_mutate_fd(grpc_socket_mutator *mutator, int fd); + +grpc_socket_mutator *grpc_socket_mutator_ref(grpc_socket_mutator *mutator); +void grpc_socket_mutator_unref(grpc_socket_mutator *mutator); + +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_MUTATOR_H */ diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index 8c33ba3754..9c67ef8940 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -211,7 +211,7 @@ grpc_error *grpc_set_socket_low_latency(int fd, int low_latency) { /* set a socker using a grpc_socket_mutator */ grpc_error *grpc_set_socket_with_mutator(int fd, grpc_socket_mutator *mutator) { GPR_ASSERT(mutator); - if (!mutator->vtable->mutate_fd(fd, mutator)) { + if (!grpc_socket_mutator_mutate_fd(mutator, fd)) { return GRPC_ERROR_CREATE("grpc_socket_mutator failed."); } return GRPC_ERROR_NONE; diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h index d84a95d3d3..0ad2d39497 100644 --- a/src/core/lib/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -39,6 +39,7 @@ #include #include "src/core/lib/iomgr/error.h" +#include "src/core/lib/iomgr/socket_mutator.h" /* a wrapper for accept or accept4 */ int grpc_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 84eb41ecd2..9089751d94 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -50,6 +50,7 @@ #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/iomgr_posix.h" #include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/socket_mutator.h" #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/iomgr/tcp_posix.h" #include "src/core/lib/iomgr/timer.h" diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index f297ae8587..ae56409a54 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -37,7 +37,7 @@ #include #include #include "src/core/lib/channel/channel_args.h" - +#include "src/core/lib/iomgr/socket_mutator.h" namespace grpc { ChannelArguments::ChannelArguments() { @@ -88,6 +88,24 @@ void ChannelArguments::SetCompressionAlgorithm( SetInt(GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM, algorithm); } +void ChannelArguments::SetSocketMutator(grpc_socket_mutator* mutator) { + if (!mutator) { + return; + } + grpc_arg mutator_arg = grpc_socket_mutator_to_arg(mutator); + bool replaced = false; + for (auto it = args_.begin(); it != args_.end(); ++it) { + if (it->type == mutator_arg.type && + grpc::string(it->key) == grpc::string(mutator_arg.key)) { + it->value.pointer.vtable->destroy(it->value.pointer.p); + it->value.pointer = mutator_arg.value.pointer; + } + } + if (!replaced) { + args_.push_back(mutator_arg); + } +} + // Note: a second call to this will add in front the result of the first call. // An example is calling this on a copy of ChannelArguments which already has a // prefix. The user can build up a prefix string by calling this multiple times, diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 2bebf48c70..b4add7bb26 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -118,6 +118,7 @@ CORE_SOURCE_FILES = [ '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_mutator.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', diff --git a/test/core/channel/channel_args_test.c b/test/core/channel/channel_args_test.c index 8ef1bff22e..d3eb969f09 100644 --- a/test/core/channel/channel_args_test.c +++ b/test/core/channel/channel_args_test.c @@ -134,12 +134,26 @@ static void test_compression_algorithm_states(void) { grpc_channel_args_destroy(ch_args); } +static void test_set_socket_mutator(void) { + grpc_channel_args *ch_args; + grpc_socket_mutator mutator; + grpc_socket_mutator_init(&mutator, NULL); + + ch_args = grpc_channel_args_set_socket_mutator(NULL, &mutator); + GPR_ASSERT(ch_args->num_args == 1); + GPR_ASSERT(strcmp(ch_args->args[0].key, GRPC_ARG_SOCKET_MUTATOR) == 0); + GPR_ASSERT(ch_args->args[0].type == GRPC_ARG_POINTER); + + grpc_channel_args_destroy(ch_args); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); test_create(); test_set_compression_algorithm(); test_compression_algorithm_states(); + test_set_socket_mutator(); grpc_shutdown(); return 0; } diff --git a/test/core/iomgr/socket_utils_test.c b/test/core/iomgr/socket_utils_test.c index 113668b4e9..0b0dfcffbe 100644 --- a/test/core/iomgr/socket_utils_test.c +++ b/test/core/iomgr/socket_utils_test.c @@ -38,7 +38,10 @@ #include #include +#include #include +#include +#include "src/core/lib/iomgr/socket_mutator.h" #include "test/core/util/test_config.h" struct test_socket_mutator { @@ -46,7 +49,7 @@ struct test_socket_mutator { int option_value; }; -static bool mutate_fd(int fd, grpc_socket_mutator* mutator) { +static bool mutate_fd(int fd, grpc_socket_mutator *mutator) { int newval; socklen_t intlen = sizeof(newval); struct test_socket_mutator* m = (struct test_socket_mutator*)mutator; @@ -64,7 +67,13 @@ static bool mutate_fd(int fd, grpc_socket_mutator* mutator) { return true; } -static const grpc_socket_mutator_vtable mutator_vtable = {mutate_fd}; +static void destroy_test_mutator(grpc_socket_mutator *mutator) { + struct test_socket_mutator *m = (struct test_socket_mutator *)mutator; + gpr_free(m); +} + +static const grpc_socket_mutator_vtable mutator_vtable = {mutate_fd, + destroy_test_mutator}; int main(int argc, char **argv) { int sock; @@ -91,7 +100,7 @@ int main(int argc, char **argv) { grpc_set_socket_low_latency(sock, 0))); struct test_socket_mutator mutator; - mutator.base.vtable = &mutator_vtable; + grpc_socket_mutator_init(&mutator.base, &mutator_vtable); mutator.option_value = IPTOS_LOWDELAY; GPR_ASSERT(GRPC_LOG_IF_ERROR( diff --git a/test/cpp/common/channel_arguments_test.cc b/test/cpp/common/channel_arguments_test.cc index 1443eb2f68..0d1e06b1e9 100644 --- a/test/cpp/common/channel_arguments_test.cc +++ b/test/cpp/common/channel_arguments_test.cc @@ -34,11 +34,53 @@ #include #include +#include #include +#include "src/core/lib/iomgr/socket_mutator.h" namespace grpc { namespace testing { +namespace { + +// A simple grpc_socket_mutator to be used to test SetSocketMutator +class TestSocketMutator : public grpc_socket_mutator { + public: + TestSocketMutator(); + + bool MutateFd(int fd) { + // Do nothing on the fd + return true; + } +}; + +// +// C API for TestSocketMutator +// + +bool test_mutator_mutate_fd(int fd, grpc_socket_mutator* mutator) { + TestSocketMutator* tsm = (TestSocketMutator*)mutator; + return tsm->MutateFd(fd); +} + +void test_mutator_destroy(grpc_socket_mutator* mutator) { + TestSocketMutator* tsm = (TestSocketMutator*)mutator; + gpr_log(GPR_ERROR, "destroy is called"); + delete tsm; +} + +grpc_socket_mutator_vtable test_mutator_vtable = {test_mutator_mutate_fd, + test_mutator_destroy}; + +// +// TestSocketMutator implementation +// + +TestSocketMutator::TestSocketMutator() { + grpc_socket_mutator_init(this, &test_mutator_vtable); +} +} + class ChannelArgumentsTest : public ::testing::Test { protected: ChannelArgumentsTest() @@ -165,6 +207,26 @@ TEST_F(ChannelArgumentsTest, SetPointer) { EXPECT_TRUE(HasArg(arg0)); } +TEST_F(ChannelArgumentsTest, SetSocketMutator) { + VerifyDefaultChannelArgs(); + grpc_arg arg0, arg1; + TestSocketMutator* mutator0 = new TestSocketMutator(); + TestSocketMutator* mutator1 = new TestSocketMutator(); + arg0 = grpc_socket_mutator_to_arg(mutator0); + arg1 = grpc_socket_mutator_to_arg(mutator1); + + channel_args_.SetSocketMutator(mutator0); + EXPECT_TRUE(HasArg(arg0)); + + channel_args_.SetSocketMutator(mutator1); + EXPECT_TRUE(HasArg(arg1)); + // arg0 is replaced by arg1 + EXPECT_FALSE(HasArg(arg0)); + + // arg0 is destroyed by grpc_socket_mutator_to_arg(mutator1) + arg1.value.pointer.vtable->destroy(arg1.value.pointer.p); +} + TEST_F(ChannelArgumentsTest, SetUserAgentPrefix) { VerifyDefaultChannelArgs(); grpc::string prefix("prefix"); diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 44f147aeb1..8640de4811 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -830,6 +830,7 @@ 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_windows.h \ +src/core/lib/iomgr/socket_mutator.h \ src/core/lib/iomgr/socket_utils_posix.h \ src/core/lib/iomgr/socket_windows.h \ src/core/lib/iomgr/tcp_client.h \ @@ -991,6 +992,7 @@ 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_mutator.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 \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index c05d194e19..ce111303a6 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6394,6 +6394,7 @@ "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_mutator.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -6529,6 +6530,8 @@ "src/core/lib/iomgr/sockaddr_utils.c", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_mutator.c", + "src/core/lib/iomgr/socket_mutator.h", "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", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 965d06d1d5..bb503ccdd4 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -339,6 +339,7 @@ + @@ -543,6 +544,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index dddd4ecce5..6ed4ae0d8f 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -124,6 +124,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -800,6 +803,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index b724c217ed..d18009ee23 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -232,6 +232,7 @@ + @@ -391,6 +392,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 92806fa04a..21aec59197 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -178,6 +178,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -587,6 +590,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index b46773632c..948be2c20c 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -329,6 +329,7 @@ + @@ -511,6 +512,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 6ffc1eab70..74be00343e 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -127,6 +127,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -710,6 +713,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr -- cgit v1.2.3 From a54be0388a0572fac0d76ee8fb8ca99c5fa7b267 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 13 Oct 2016 18:42:09 -0700 Subject: Fix sanity issues --- src/core/lib/channel/channel_args.h | 2 +- test/core/iomgr/socket_utils_test.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 8a3576247c..17b22ce669 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -23,8 +23,8 @@ * 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 - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * 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. diff --git a/test/core/iomgr/socket_utils_test.c b/test/core/iomgr/socket_utils_test.c index 0b0dfcffbe..15d71863ba 100644 --- a/test/core/iomgr/socket_utils_test.c +++ b/test/core/iomgr/socket_utils_test.c @@ -52,7 +52,7 @@ struct test_socket_mutator { static bool mutate_fd(int fd, grpc_socket_mutator *mutator) { int newval; socklen_t intlen = sizeof(newval); - struct test_socket_mutator* m = (struct test_socket_mutator*)mutator; + struct test_socket_mutator *m = (struct test_socket_mutator *)mutator; if (0 != setsockopt(fd, IPPROTO_IP, IP_TOS, &m->option_value, sizeof(m->option_value))) { @@ -105,21 +105,21 @@ int main(int argc, char **argv) { mutator.option_value = IPTOS_LOWDELAY; GPR_ASSERT(GRPC_LOG_IF_ERROR( "set_socket_with_mutator", - grpc_set_socket_with_mutator(sock, (grpc_socket_mutator*)&mutator))); + grpc_set_socket_with_mutator(sock, (grpc_socket_mutator *)&mutator))); mutator.option_value = IPTOS_THROUGHPUT; GPR_ASSERT(GRPC_LOG_IF_ERROR( "set_socket_with_mutator", - grpc_set_socket_with_mutator(sock, (grpc_socket_mutator*)&mutator))); + grpc_set_socket_with_mutator(sock, (grpc_socket_mutator *)&mutator))); mutator.option_value = IPTOS_RELIABILITY; GPR_ASSERT(GRPC_LOG_IF_ERROR( "set_socket_with_mutator", - grpc_set_socket_with_mutator(sock, (grpc_socket_mutator*)&mutator))); + grpc_set_socket_with_mutator(sock, (grpc_socket_mutator *)&mutator))); mutator.option_value = -1; GPR_ASSERT(GRPC_ERROR_NONE != grpc_set_socket_with_mutator( - sock, (grpc_socket_mutator*)&mutator)); + sock, (grpc_socket_mutator *)&mutator)); close(sock); -- cgit v1.2.3 From e266d9fc7519a1cb7f46c84d7ad1dd8669bbfac7 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 14 Oct 2016 14:08:20 -0700 Subject: Add comment --- src/core/ext/transport/cronet/transport/cronet_transport.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 8ab1031a35..fe48f328fc 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -1061,6 +1061,8 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, add_to_storage(s, op); if (op->send_initial_metadata && header_has_authority(op->send_initial_metadata->list.head)) { + /* Cronet does not support :authority header field. We cancel the call when + this field is present in metadata */ cronet_bidirectional_stream_header_array header_array; cronet_bidirectional_stream_header *header; cronet_bidirectional_stream cbs; -- cgit v1.2.3 From f88c92b4f2e62c506b69188485012288ed70c43d Mon Sep 17 00:00:00 2001 From: Dan Born Date: Mon, 17 Oct 2016 15:07:05 -0700 Subject: Merge fixup --- src/core/lib/iomgr/tcp_server_posix.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 4f49dad815..242388bd17 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -191,9 +191,6 @@ grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { - gpr_mu_lock(&s->mu); - GPR_ASSERT(s->shutdown); - gpr_mu_unlock(&s->mu); if (s->shutdown_complete != NULL) { grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); } -- cgit v1.2.3 From a983dc7fc2689e4f7e0fbd25ef7a6e84f7374cb9 Mon Sep 17 00:00:00 2001 From: Dan Born Date: Mon, 17 Oct 2016 15:11:17 -0700 Subject: Merge fixups --- src/core/lib/iomgr/tcp_server_posix.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 242388bd17..4f49dad815 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -191,6 +191,9 @@ grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { + gpr_mu_lock(&s->mu); + GPR_ASSERT(s->shutdown); + gpr_mu_unlock(&s->mu); if (s->shutdown_complete != NULL) { grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); } -- cgit v1.2.3 From 19e01fdc326b73c15d977657c23e4bf6e7e25988 Mon Sep 17 00:00:00 2001 From: Dan Born Date: Tue, 18 Oct 2016 11:49:45 -0700 Subject: clang-format --- src/core/lib/iomgr/tcp_server_posix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 4f49dad815..d8eb24b861 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -651,7 +651,8 @@ done: } } -/* Return listener at port_index or NULL. Should only be called with s->mu locked. */ +/* Return listener at port_index or NULL. Should only be called with s->mu + locked. */ static grpc_tcp_listener *get_port_index(grpc_tcp_server *s, unsigned port_index) { unsigned num_ports = 0; -- cgit v1.2.3 From 6c7b6bfff1937f1be0d0d49fc67d03fc408059b0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 15:03:38 -0700 Subject: Add pid controller --- src/core/lib/transport/pid_controller.c | 57 +++++++++++++++++++++++++++++++++ src/core/lib/transport/pid_controller.h | 53 ++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 src/core/lib/transport/pid_controller.c create mode 100644 src/core/lib/transport/pid_controller.h (limited to 'src/core') diff --git a/src/core/lib/transport/pid_controller.c b/src/core/lib/transport/pid_controller.c new file mode 100644 index 0000000000..a661116916 --- /dev/null +++ b/src/core/lib/transport/pid_controller.c @@ -0,0 +1,57 @@ +/* + * + * 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 "src/core/lib/transport/pid_controller.h" + +void grpc_pid_controller_init(grpc_pid_controller *pid_controller, + double gain_p, double gain_i, double gain_d) { + pid_controller->gain_p = gain_p; + pid_controller->gain_i = gain_i; + pid_controller->gain_d = gain_d; + grpc_pid_controller_reset(pid_controller); +} + +void grpc_pid_controller_reset(grpc_pid_controller *pid_controller) { + pid_controller->last_error = 0.0; + pid_controller->error_integral = 0.0; +} + +double grpc_pid_controller_update(grpc_pid_controller *pid_controller, + double error, double dt) { + pid_controller->error_integral += error * dt; + double diff_error = (error - pid_controller->last_error) / dt; + pid_controller->last_error = error; + return pid_controller->gain_p * error + + pid_controller->gain_i * pid_controller->error_integral + + pid_controller->gain_d * diff_error; +} diff --git a/src/core/lib/transport/pid_controller.h b/src/core/lib/transport/pid_controller.h new file mode 100644 index 0000000000..aa3d0a77f7 --- /dev/null +++ b/src/core/lib/transport/pid_controller.h @@ -0,0 +1,53 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H +#define GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H + +typedef struct { + double gain_p; + double gain_i; + double gain_d; + double last_error; + double error_integral; +} grpc_pid_controller; + +void grpc_pid_controller_init(grpc_pid_controller *pid_controller, + double gain_p, double gain_i, double gain_d); + +void grpc_pid_controller_reset(grpc_pid_controller *pid_controller); + +double grpc_pid_controller_update(grpc_pid_controller *pid_controller, + double error, double dt); + +#endif -- cgit v1.2.3 From dd2fa6482a945c17eba4c37ff42a8af0e9c4fa26 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 15:46:32 -0700 Subject: Add pid controller test --- BUILD | 8 + CMakeLists.txt | 3 + Makefile | 40 +++++ binding.gyp | 1 + build.yaml | 12 ++ config.m4 | 1 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + src/core/lib/transport/pid_controller.c | 6 +- src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/transport/pid_controller_test.c | 77 ++++++++ tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 20 +++ tools/run_tests/tests.json | 21 +++ vsprojects/buildtests_c.sln | 27 +++ vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 + .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 + .../transport_pid_controller_test.vcxproj | 199 +++++++++++++++++++++ .../transport_pid_controller_test.vcxproj.filters | 21 +++ 24 files changed, 470 insertions(+), 3 deletions(-) create mode 100644 test/core/transport/pid_controller_test.c create mode 100644 vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj create mode 100644 vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters (limited to 'src/core') diff --git a/BUILD b/BUILD index 5c4333463c..fc436fde10 100644 --- a/BUILD +++ b/BUILD @@ -242,6 +242,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -414,6 +415,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/pid_controller.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -647,6 +649,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -804,6 +807,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/pid_controller.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -1007,6 +1011,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -1156,6 +1161,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/pid_controller.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -1921,6 +1927,7 @@ objc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/pid_controller.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -2133,6 +2140,7 @@ objc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 893aac36fb..95505a68df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -379,6 +379,7 @@ add_library(grpc src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c + src/core/lib/transport/pid_controller.c src/core/lib/transport/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c @@ -640,6 +641,7 @@ add_library(grpc_cronet src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c + src/core/lib/transport/pid_controller.c src/core/lib/transport/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c @@ -873,6 +875,7 @@ add_library(grpc_unsecure src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c + src/core/lib/transport/pid_controller.c src/core/lib/transport/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c diff --git a/Makefile b/Makefile index 38be9e658c..7325a970e4 100644 --- a/Makefile +++ b/Makefile @@ -1021,6 +1021,7 @@ timer_heap_test: $(BINDIR)/$(CONFIG)/timer_heap_test timer_list_test: $(BINDIR)/$(CONFIG)/timer_list_test transport_connectivity_state_test: $(BINDIR)/$(CONFIG)/transport_connectivity_state_test transport_metadata_test: $(BINDIR)/$(CONFIG)/transport_metadata_test +transport_pid_controller_test: $(BINDIR)/$(CONFIG)/transport_pid_controller_test transport_security_test: $(BINDIR)/$(CONFIG)/transport_security_test udp_server_test: $(BINDIR)/$(CONFIG)/udp_server_test uri_fuzzer_test: $(BINDIR)/$(CONFIG)/uri_fuzzer_test @@ -1341,6 +1342,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/timer_list_test \ $(BINDIR)/$(CONFIG)/transport_connectivity_state_test \ $(BINDIR)/$(CONFIG)/transport_metadata_test \ + $(BINDIR)/$(CONFIG)/transport_pid_controller_test \ $(BINDIR)/$(CONFIG)/transport_security_test \ $(BINDIR)/$(CONFIG)/udp_server_test \ $(BINDIR)/$(CONFIG)/uri_parser_test \ @@ -1741,6 +1743,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/transport_connectivity_state_test || ( echo test transport_connectivity_state_test failed ; exit 1 ) $(E) "[RUN] Testing transport_metadata_test" $(Q) $(BINDIR)/$(CONFIG)/transport_metadata_test || ( echo test transport_metadata_test failed ; exit 1 ) + $(E) "[RUN] Testing transport_pid_controller_test" + $(Q) $(BINDIR)/$(CONFIG)/transport_pid_controller_test || ( echo test transport_pid_controller_test failed ; exit 1 ) $(E) "[RUN] Testing transport_security_test" $(Q) $(BINDIR)/$(CONFIG)/transport_security_test || ( echo test transport_security_test failed ; exit 1 ) $(E) "[RUN] Testing udp_server_test" @@ -2636,6 +2640,7 @@ LIBGRPC_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/pid_controller.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -2915,6 +2920,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/pid_controller.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -3184,6 +3190,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/pid_controller.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -3379,6 +3386,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/pid_controller.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -10698,6 +10706,38 @@ endif endif +TRANSPORT_PID_CONTROLLER_TEST_SRC = \ + test/core/transport/pid_controller_test.c \ + +TRANSPORT_PID_CONTROLLER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(TRANSPORT_PID_CONTROLLER_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/transport_pid_controller_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/transport_pid_controller_test: $(TRANSPORT_PID_CONTROLLER_TEST_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) $(LD) $(LDFLAGS) $(TRANSPORT_PID_CONTROLLER_TEST_OBJS) $(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)/transport_pid_controller_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/transport/pid_controller_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_transport_pid_controller_test: $(TRANSPORT_PID_CONTROLLER_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(TRANSPORT_PID_CONTROLLER_TEST_OBJS:.o=.dep) +endif +endif + + TRANSPORT_SECURITY_TEST_SRC = \ test/core/tsi/transport_security_test.c \ diff --git a/binding.gyp b/binding.gyp index 397bb1b639..c6c08e260b 100644 --- a/binding.gyp +++ b/binding.gyp @@ -654,6 +654,7 @@ 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', + 'src/core/lib/transport/pid_controller.c', 'src/core/lib/transport/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', diff --git a/build.yaml b/build.yaml index 2a06653103..73fb2b0bab 100644 --- a/build.yaml +++ b/build.yaml @@ -246,6 +246,7 @@ filegroups: - src/core/lib/transport/mdstr_hash_table.h - src/core/lib/transport/metadata.h - src/core/lib/transport/metadata_batch.h + - src/core/lib/transport/pid_controller.h - src/core/lib/transport/static_metadata.h - src/core/lib/transport/timeout_encoding.h - src/core/lib/transport/transport.h @@ -340,6 +341,7 @@ filegroups: - src/core/lib/transport/mdstr_hash_table.c - src/core/lib/transport/metadata.c - src/core/lib/transport/metadata_batch.c + - src/core/lib/transport/pid_controller.c - src/core/lib/transport/static_metadata.c - src/core/lib/transport/timeout_encoding.c - src/core/lib/transport/transport.c @@ -2554,6 +2556,16 @@ targets: - grpc - gpr_test_util - gpr +- name: transport_pid_controller_test + build: test + language: c + src: + - test/core/transport/pid_controller_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr - name: transport_security_test build: test language: c diff --git a/config.m4 b/config.m4 index d8716753b6..1c6dc4aa24 100644 --- a/config.m4 +++ b/config.m4 @@ -173,6 +173,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/pid_controller.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index bb1bbc5f0e..17618bc175 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -329,6 +329,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', + 'src/core/lib/transport/pid_controller.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', @@ -505,6 +506,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', + 'src/core/lib/transport/pid_controller.c', 'src/core/lib/transport/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', @@ -706,6 +708,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', + 'src/core/lib/transport/pid_controller.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', diff --git a/grpc.gemspec b/grpc.gemspec index 85172922cc..c114157062 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -249,6 +249,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/mdstr_hash_table.h ) s.files += %w( src/core/lib/transport/metadata.h ) s.files += %w( src/core/lib/transport/metadata_batch.h ) + s.files += %w( src/core/lib/transport/pid_controller.h ) s.files += %w( src/core/lib/transport/static_metadata.h ) s.files += %w( src/core/lib/transport/timeout_encoding.h ) s.files += %w( src/core/lib/transport/transport.h ) @@ -425,6 +426,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/mdstr_hash_table.c ) s.files += %w( src/core/lib/transport/metadata.c ) s.files += %w( src/core/lib/transport/metadata_batch.c ) + s.files += %w( src/core/lib/transport/pid_controller.c ) s.files += %w( src/core/lib/transport/static_metadata.c ) s.files += %w( src/core/lib/transport/timeout_encoding.c ) s.files += %w( src/core/lib/transport/transport.c ) diff --git a/package.xml b/package.xml index 31a2822a75..23a6f06fec 100644 --- a/package.xml +++ b/package.xml @@ -256,6 +256,7 @@ + @@ -432,6 +433,7 @@ + diff --git a/src/core/lib/transport/pid_controller.c b/src/core/lib/transport/pid_controller.c index a661116916..3cef225d4b 100644 --- a/src/core/lib/transport/pid_controller.c +++ b/src/core/lib/transport/pid_controller.c @@ -51,7 +51,7 @@ double grpc_pid_controller_update(grpc_pid_controller *pid_controller, pid_controller->error_integral += error * dt; double diff_error = (error - pid_controller->last_error) / dt; pid_controller->last_error = error; - return pid_controller->gain_p * error + - pid_controller->gain_i * pid_controller->error_integral + - pid_controller->gain_d * diff_error; + return dt * (pid_controller->gain_p * error + + pid_controller->gain_i * pid_controller->error_integral + + pid_controller->gain_d * diff_error); } diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index a40edfb090..015f774326 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -167,6 +167,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', + 'src/core/lib/transport/pid_controller.c', 'src/core/lib/transport/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', diff --git a/test/core/transport/pid_controller_test.c b/test/core/transport/pid_controller_test.c new file mode 100644 index 0000000000..9614983b00 --- /dev/null +++ b/test/core/transport/pid_controller_test.c @@ -0,0 +1,77 @@ +/* + * + * 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 "src/core/lib/transport/pid_controller.h" + +#include + +#include +#include +#include +#include +#include "src/core/lib/support/string.h" +#include "test/core/util/test_config.h" + +static void test_noop(void) { + gpr_log(GPR_INFO, "test_noop"); + grpc_pid_controller pid; + grpc_pid_controller_init(&pid, 1, 1, 1); +} + +static void test_simple_convergence(double gain_p, double gain_i, double gain_d, + double dt, double set_point, double start) { + gpr_log(GPR_INFO, + "test_simple_convergence(p=%lf, i=%lf, d=%lf); dt=%lf set_point=%lf " + "start=%lf", + gain_p, gain_i, gain_d, dt, set_point, start); + grpc_pid_controller pid; + grpc_pid_controller_init(&pid, 0.2, 0.1, 0.1); + + double current = start; + + for (int i = 0; i < 1000; i++) { + current += grpc_pid_controller_update(&pid, set_point - current, 1); + } + + GPR_ASSERT(fabs(set_point - current) < 0.1); + GPR_ASSERT(fabs(pid.error_integral) < 0.1); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + test_noop(); + test_simple_convergence(0.2, 0, 0, 1, 100, 0); + test_simple_convergence(0.2, 0.1, 0, 1, 100, 0); + test_simple_convergence(0.2, 0.1, 0.1, 1, 100, 0); + return 0; +} diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e5c91cbb13..2cc0468802 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -866,6 +866,7 @@ src/core/lib/transport/connectivity_state.h \ src/core/lib/transport/mdstr_hash_table.h \ src/core/lib/transport/metadata.h \ src/core/lib/transport/metadata_batch.h \ +src/core/lib/transport/pid_controller.h \ src/core/lib/transport/static_metadata.h \ src/core/lib/transport/timeout_encoding.h \ src/core/lib/transport/transport.h \ @@ -1042,6 +1043,7 @@ src/core/lib/transport/connectivity_state.c \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ +src/core/lib/transport/pid_controller.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 7cfb1d4c17..df000be0e0 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2011,6 +2011,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "transport_pid_controller_test", + "src": [ + "test/core/transport/pid_controller_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -6519,6 +6536,7 @@ "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -6704,6 +6722,8 @@ "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.c", + "src/core/lib/transport/pid_controller.h", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index d831d6df0c..ec07eceec7 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -2002,6 +2002,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "transport_pid_controller_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 339b42f9d7..265179d7e7 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1507,6 +1507,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "transport_metadata_test", " {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "transport_pid_controller_test", "vcxproj\test\transport_pid_controller_test\transport_pid_controller_test.vcxproj", "{B8790A2E-1106-2510-9D95-32C1D68E72EE}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unknown_frame_bad_client_test", "vcxproj\test\unknown_frame_bad_client_test\unknown_frame_bad_client_test.vcxproj", "{9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}" ProjectSection(myProperties) = preProject lib = "False" @@ -3810,6 +3821,22 @@ Global {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|Win32.Build.0 = Release|Win32 {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|x64.ActiveCfg = Release|x64 {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|x64.Build.0 = Release|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|x64.ActiveCfg = Debug|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|Win32.ActiveCfg = Release|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|x64.ActiveCfg = Release|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|Win32.Build.0 = Debug|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|x64.Build.0 = Debug|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|Win32.Build.0 = Release|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|x64.Build.0 = Release|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|x64.Build.0 = Debug|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|Win32.Build.0 = Release|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|x64.ActiveCfg = Release|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|x64.Build.0 = Release|x64 {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug|Win32.ActiveCfg = Debug|Win32 {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug|x64.ActiveCfg = Debug|x64 {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index b8c0049db5..4ce0487981 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -375,6 +375,7 @@ + @@ -643,6 +644,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index fb1f904811..d00d223638 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -271,6 +271,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -914,6 +917,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index eb3a94df64..eab3b72155 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -268,6 +268,7 @@ + @@ -490,6 +491,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index fcc8e34db3..4da9b087fa 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -325,6 +325,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -698,6 +701,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 519d7317ba..5cf6e2c8c3 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -365,6 +365,7 @@ + @@ -611,6 +612,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index d30df5c03d..414dedb9ff 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -274,6 +274,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -824,6 +827,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport diff --git a/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj new file mode 100644 index 0000000000..b37310d7b0 --- /dev/null +++ b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B8790A2E-1106-2510-9D95-32C1D68E72EE} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + transport_pid_controller_test + static + Debug + static + Debug + + + transport_pid_controller_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters new file mode 100644 index 0000000000..bfc3b8baf1 --- /dev/null +++ b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\transport + + + + + + {dd5fb527-8567-108a-e6d2-51380df8a82f} + + + {18437a81-c8a9-fd37-ad74-63e9ebf0eb7a} + + + {6325372c-19b9-37ab-e8ff-16554de3bb3b} + + + + -- cgit v1.2.3 From 6d4340dda88f6f8771dde54e21620dc32dc4e65a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 21 Oct 2016 08:15:51 -0700 Subject: Add documentation --- src/core/lib/transport/pid_controller.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/transport/pid_controller.h b/src/core/lib/transport/pid_controller.h index aa3d0a77f7..ecb9deedaa 100644 --- a/src/core/lib/transport/pid_controller.h +++ b/src/core/lib/transport/pid_controller.h @@ -34,6 +34,13 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H #define GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H +/* \file Simple PID controller. + Implements a proportial-integral-derivative controller. + Used when we want to iteratively control a variable to converge some other + observed value to a 'set-point'. + Gains can be set to adjust sensitivity to current error (p), the integral + of error (i), and the derivative of error (d). */ + typedef struct { double gain_p; double gain_i; @@ -42,11 +49,15 @@ typedef struct { double error_integral; } grpc_pid_controller; +/** Initialize the controller */ void grpc_pid_controller_init(grpc_pid_controller *pid_controller, double gain_p, double gain_i, double gain_d); +/** Reset the controller: useful when things have changed significantly */ void grpc_pid_controller_reset(grpc_pid_controller *pid_controller); +/** Update the controller: given a current error estimate, and the time since + the last update, returns a delta to the control value */ double grpc_pid_controller_update(grpc_pid_controller *pid_controller, double error, double dt); -- cgit v1.2.3 From 638d03b197c562291024b5f8a1ed9ad08db1b922 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 21 Oct 2016 18:07:48 -0700 Subject: Minor bug fix --- src/core/ext/transport/cronet/transport/cronet_transport.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 5e202d0ee2..71481c0539 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -535,8 +535,9 @@ static void on_response_trailers_received( } } s->state.state_callback_received[OP_RECV_TRAILING_METADATA] = true; - /* Send a EOS when server terminates the stream to trigger on_succeeded */ - if (!s->state.state_op_done[OP_SEND_TRAILING_METADATA]) { + /* Send a EOS when server terminates the stream (testServerFinishesRequest) to trigger on_succeeded */ + if (!s->state.state_op_done[OP_SEND_TRAILING_METADATA] && + !(s->state.state_op_done[OP_CANCEL_ERROR] || s->state.state_callback_received[OP_FAILED])) { CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_write (%p, 0)", s->cbs); s->state.state_callback_received[OP_SEND_MESSAGE] = false; cronet_bidirectional_stream_write(s->cbs, "", 0, true); -- cgit v1.2.3 From c08f53ab353912ea41c9e342cc597d7604c99816 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 24 Oct 2016 10:25:15 -0700 Subject: Turn off cronet_transport logs and clang-format --- src/core/ext/transport/cronet/transport/cronet_transport.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 71481c0539..5d012921ee 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -58,7 +58,7 @@ } while (0) /* TODO (makdharma): Hook up into the wider tracing mechanism */ -int grpc_cronet_trace = 1; +int grpc_cronet_trace = 0; enum e_op_result { ACTION_TAKEN_WITH_CALLBACK, @@ -535,9 +535,11 @@ static void on_response_trailers_received( } } s->state.state_callback_received[OP_RECV_TRAILING_METADATA] = true; - /* Send a EOS when server terminates the stream (testServerFinishesRequest) to trigger on_succeeded */ + /* Send a EOS when server terminates the stream (testServerFinishesRequest) to + * trigger on_succeeded */ if (!s->state.state_op_done[OP_SEND_TRAILING_METADATA] && - !(s->state.state_op_done[OP_CANCEL_ERROR] || s->state.state_callback_received[OP_FAILED])) { + !(s->state.state_op_done[OP_CANCEL_ERROR] || + s->state.state_callback_received[OP_FAILED])) { CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_write (%p, 0)", s->cbs); s->state.state_callback_received[OP_SEND_MESSAGE] = false; cronet_bidirectional_stream_write(s->cbs, "", 0, true); -- cgit v1.2.3 From 5ab4ca5ed838221de17f2cc05a7655dedf516065 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 24 Oct 2016 10:49:55 -0700 Subject: Add endpoint interface in transport --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 11 ++++++++++- src/core/ext/transport/cronet/transport/cronet_transport.c | 9 ++++++++- src/core/lib/transport/transport.c | 5 +++++ src/core/lib/transport/transport.h | 5 +++++ src/core/lib/transport/transport_impl.h | 3 +++ 5 files changed, 31 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 97780d90f2..9f7bc818b6 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2157,6 +2157,14 @@ static char *chttp2_get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *t) { return gpr_strdup(((grpc_chttp2_transport *)t)->peer_string); } +/******************************************************************************* + * MONITORING + */ +static grpc_endpoint *chttp2_get_endpoint(grpc_exec_ctx *exec_ctx, + grpc_transport *t) { + return ((grpc_chttp2_transport *)t)->ep; +} + static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream), "chttp2", init_stream, @@ -2166,7 +2174,8 @@ static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream), perform_transport_op, destroy_stream, destroy_transport, - chttp2_get_peer}; + chttp2_get_peer, + chttp2_get_endpoint}; grpc_transport *grpc_create_chttp2_transport( grpc_exec_ctx *exec_ctx, const grpc_channel_args *channel_args, diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 25ad40b935..2cd25d6891 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -42,6 +42,7 @@ #include #include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" +#include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/channel.h" @@ -1054,6 +1055,11 @@ static char *get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { return NULL; } +static grpc_endpoint *get_endpoint(grpc_exec_ctx *exec_ctx, + grpc_transport *gt) { + return NULL; +} + static void perform_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_transport_op *op) {} @@ -1066,4 +1072,5 @@ const grpc_transport_vtable grpc_cronet_vtable = {sizeof(stream_obj), perform_op, destroy_stream, destroy_transport, - get_peer}; + get_peer, + get_endpoint}; diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 75aec7a5b4..a3713f037f 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -159,6 +159,11 @@ char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx, return transport->vtable->get_peer(exec_ctx, transport); } +grpc_endpoint *grpc_transport_get_endpoint(grpc_exec_ctx *exec_ctx, + grpc_transport *transport) { + return transport->vtable->get_endpoint(exec_ctx, transport); +} + void grpc_transport_stream_op_finish_with_failure(grpc_exec_ctx *exec_ctx, grpc_transport_stream_op *op, grpc_error *error) { diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 50253ebad1..646b7529e9 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -37,6 +37,7 @@ #include #include "src/core/lib/channel/context.h" +#include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -295,6 +296,10 @@ void grpc_transport_destroy(grpc_exec_ctx *exec_ctx, grpc_transport *transport); char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *transport); +/* Get the endpoint used by \a transport */ +grpc_endpoint *grpc_transport_get_endpoint(grpc_exec_ctx *exec_ctx, + grpc_transport *transport); + /* Allocate a grpc_transport_op, and preconfigure the on_consumed closure to \a on_consumed and then delete the returned transport op */ grpc_transport_op *grpc_make_transport_op(grpc_closure *on_consumed); diff --git a/src/core/lib/transport/transport_impl.h b/src/core/lib/transport/transport_impl.h index fc7140671b..8553148c35 100644 --- a/src/core/lib/transport/transport_impl.h +++ b/src/core/lib/transport/transport_impl.h @@ -74,6 +74,9 @@ typedef struct grpc_transport_vtable { /* implementation of grpc_transport_get_peer */ char *(*get_peer)(grpc_exec_ctx *exec_ctx, grpc_transport *self); + + /* implementation of grpc_transport_get_endpoint */ + grpc_endpoint *(*get_endpoint)(grpc_exec_ctx *exec_ctx, grpc_transport *self); } grpc_transport_vtable; /* an instance of a grpc transport */ -- cgit v1.2.3 From e5ec9ac9e2e0195e04c7c99d1c2d9a87f67404fb Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 24 Oct 2016 14:43:12 -0700 Subject: Add grpc_endpoint_get_socket and GRPC_SOCKET --- src/core/lib/iomgr/endpoint.h | 6 ++++++ src/core/lib/iomgr/sockaddr_posix.h | 2 ++ src/core/lib/iomgr/sockaddr_windows.h | 2 ++ src/core/lib/iomgr/tcp_posix.c | 8 +++++++- src/core/lib/security/transport/secure_endpoint.c | 8 +++++++- test/core/internal_api_canaries/iomgr.c | 3 ++- test/core/util/mock_endpoint.c | 22 ++++++++++++---------- test/core/util/passthru_endpoint.c | 22 ++++++++++++---------- 8 files changed, 50 insertions(+), 23 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index 910a6f6532..22979982e4 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -39,6 +39,7 @@ #include #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/iomgr/sockaddr.h" /* An endpoint caps a streaming channel between two communicating processes. Examples may be: a tcp socket, , or some shared memory. */ @@ -59,6 +60,7 @@ struct grpc_endpoint_vtable { void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); char *(*get_peer)(grpc_endpoint *ep); + GRPC_SOCKET *(*get_socket)(grpc_endpoint *ep); }; /* When data is available on the connection, calls the callback with slices. @@ -71,6 +73,10 @@ void grpc_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, char *grpc_endpoint_get_peer(grpc_endpoint *ep); +/* Get the socket (file descriptor or SOCKET) used by \a ep. Return NULL if + \a ep is not using a socket. */ +GRPC_SOCKET *grpc_endpoint_get_socket(grpc_endpoint *ep); + /* Retrieve a reference to the workqueue associated with this endpoint */ grpc_workqueue *grpc_endpoint_get_workqueue(grpc_endpoint *ep); diff --git a/src/core/lib/iomgr/sockaddr_posix.h b/src/core/lib/iomgr/sockaddr_posix.h index b150de42f7..a4236ffaee 100644 --- a/src/core/lib/iomgr/sockaddr_posix.h +++ b/src/core/lib/iomgr/sockaddr_posix.h @@ -41,4 +41,6 @@ #include #include +typedef int GRPC_SOCKET; + #endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_POSIX_H */ diff --git a/src/core/lib/iomgr/sockaddr_windows.h b/src/core/lib/iomgr/sockaddr_windows.h index 971db5b32b..507fc71f63 100644 --- a/src/core/lib/iomgr/sockaddr_windows.h +++ b/src/core/lib/iomgr/sockaddr_windows.h @@ -40,4 +40,6 @@ // must be included after the above #include +typedef SOCKET GRPC_SOCKET; + #endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H */ diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 00fd77679a..5ed00a8e98 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -464,6 +464,11 @@ static char *tcp_get_peer(grpc_endpoint *ep) { return gpr_strdup(tcp->peer_string); } +static int *tcp_get_socket(grpc_endpoint *ep) { + grpc_tcp *tcp = (grpc_tcp *)ep; + return &tcp->fd; +} + static grpc_workqueue *tcp_get_workqueue(grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; return grpc_fd_get_workqueue(tcp->em_fd); @@ -476,7 +481,8 @@ static const grpc_endpoint_vtable vtable = {tcp_read, tcp_add_to_pollset_set, tcp_shutdown, tcp_destroy, - tcp_get_peer}; + tcp_get_peer, + tcp_get_socket}; grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, size_t slice_size, const char *peer_string) { diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index acb0113ea8..1086c3be6a 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -38,6 +38,7 @@ #include #include #include "src/core/lib/debug/trace.h" +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/security/transport/tsi_error.h" #include "src/core/lib/support/string.h" @@ -365,6 +366,10 @@ static char *endpoint_get_peer(grpc_endpoint *secure_ep) { return grpc_endpoint_get_peer(ep->wrapped_ep); } +static GRPC_SOCKET *endpoint_get_socket(grpc_endpoint *secure_ep) { + return NULL; +} + static grpc_workqueue *endpoint_get_workqueue(grpc_endpoint *secure_ep) { secure_endpoint *ep = (secure_endpoint *)secure_ep; return grpc_endpoint_get_workqueue(ep->wrapped_ep); @@ -377,7 +382,8 @@ static const grpc_endpoint_vtable vtable = {endpoint_read, endpoint_add_to_pollset_set, endpoint_shutdown, endpoint_destroy, - endpoint_get_peer}; + endpoint_get_peer, + endpoint_get_socket}; grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *transport, diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index 27d630623e..3620b93285 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -84,7 +84,8 @@ static void test_code(void) { grpc_endpoint_add_to_pollset_set, grpc_endpoint_shutdown, grpc_endpoint_destroy, - grpc_endpoint_get_peer}; + grpc_endpoint_get_peer, + grpc_endpoint_get_socket}; endpoint.vtable = &vtable; grpc_endpoint_read(&exec_ctx, &endpoint, NULL, NULL); diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index 13e0e918fb..15e88968e8 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -35,6 +35,7 @@ #include #include +#include "src/core/lib/iomgr/sockaddr.h" typedef struct grpc_mock_endpoint { grpc_endpoint base; @@ -95,18 +96,19 @@ static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } +static GRPC_SOCKET *me_get_socket(grpc_endpoint *ep) { return NULL; } + static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } -static const grpc_endpoint_vtable vtable = { - me_read, - me_write, - me_get_workqueue, - me_add_to_pollset, - me_add_to_pollset_set, - me_shutdown, - me_destroy, - me_get_peer, -}; +static const grpc_endpoint_vtable vtable = {me_read, + me_write, + me_get_workqueue, + me_add_to_pollset, + me_add_to_pollset_set, + me_shutdown, + me_destroy, + me_get_peer, + me_get_socket}; grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice)) { grpc_mock_endpoint *m = gpr_malloc(sizeof(*m)); diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index 7ed9e97bd6..5c7167207f 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -35,6 +35,7 @@ #include #include +#include "src/core/lib/iomgr/sockaddr.h" typedef struct passthru_endpoint passthru_endpoint; @@ -140,18 +141,19 @@ static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } +static GRPC_SOCKET *me_get_socket(grpc_endpoint *ep) { return NULL; } + static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } -static const grpc_endpoint_vtable vtable = { - me_read, - me_write, - me_get_workqueue, - me_add_to_pollset, - me_add_to_pollset_set, - me_shutdown, - me_destroy, - me_get_peer, -}; +static const grpc_endpoint_vtable vtable = {me_read, + me_write, + me_get_workqueue, + me_add_to_pollset, + me_add_to_pollset_set, + me_shutdown, + me_destroy, + me_get_peer, + me_get_socket}; static void half_init(half *m, passthru_endpoint *parent) { m->base.vtable = &vtable; -- cgit v1.2.3 From 1d0fce9d60494936aa0e79c6b262d113b5b1acd5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 08:26:22 -0700 Subject: Add some endpoint pair tests --- include/grpc++/support/channel_arguments.h | 7 ++ src/core/lib/surface/server.c | 11 ++- test/cpp/microbenchmarks/bm_fullstack.cc | 131 +++++++++++++++++++++++++++-- 3 files changed, 138 insertions(+), 11 deletions(-) (limited to 'src/core') diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h index ae243939e9..79a76d02ea 100644 --- a/include/grpc++/support/channel_arguments.h +++ b/include/grpc++/support/channel_arguments.h @@ -91,6 +91,13 @@ class ChannelArguments { /// Set a textual argument \a value under \a key. void SetString(const grpc::string& key, const grpc::string& value); + grpc_channel_args c_args() { + grpc_channel_args out; + out.num_args = args_.size(); + out.args = args_.empty() ? NULL : &args_[0]; + return out; + } + private: friend class SecureChannelCredentials; friend class testing::ChannelArgumentsTest; diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 3a90308058..648c23580a 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -195,6 +195,7 @@ struct grpc_server { grpc_completion_queue **cqs; grpc_pollset **pollsets; size_t cq_count; + size_t pollset_count; bool started; /* The two following mutexes control access to server-state @@ -1084,7 +1085,7 @@ void grpc_server_start(grpc_server *server) { GRPC_API_TRACE("grpc_server_start(server=%p)", 1, (server)); server->started = true; - size_t pollset_count = 0; + server->pollset_count = 0; server->pollsets = gpr_malloc(sizeof(grpc_pollset *) * server->cq_count); server->request_freelist_per_cq = gpr_malloc(sizeof(*server->request_freelist_per_cq) * server->cq_count); @@ -1092,7 +1093,8 @@ void grpc_server_start(grpc_server *server) { gpr_malloc(sizeof(*server->requested_calls_per_cq) * server->cq_count); for (i = 0; i < server->cq_count; i++) { if (!grpc_cq_is_non_listening_server_cq(server->cqs[i])) { - server->pollsets[pollset_count++] = grpc_cq_pollset(server->cqs[i]); + server->pollsets[server->pollset_count++] = + grpc_cq_pollset(server->cqs[i]); } server->request_freelist_per_cq[i] = gpr_stack_lockfree_create((size_t)server->max_requested_calls_per_cq); @@ -1111,7 +1113,8 @@ void grpc_server_start(grpc_server *server) { } for (l = server->listeners; l; l = l->next) { - l->start(&exec_ctx, server, l->arg, server->pollsets, pollset_count); + l->start(&exec_ctx, server, l->arg, server->pollsets, + server->pollset_count); } grpc_exec_ctx_finish(&exec_ctx); @@ -1119,7 +1122,7 @@ void grpc_server_start(grpc_server *server) { void grpc_server_get_pollsets(grpc_server *server, grpc_pollset ***pollsets, size_t *pollset_count) { - *pollset_count = server->cq_count; + *pollset_count = server->pollset_count; *pollsets = server->pollsets; } diff --git a/test/cpp/microbenchmarks/bm_fullstack.cc b/test/cpp/microbenchmarks/bm_fullstack.cc index 33f2bf6346..11025caa44 100644 --- a/test/cpp/microbenchmarks/bm_fullstack.cc +++ b/test/cpp/microbenchmarks/bm_fullstack.cc @@ -37,39 +37,133 @@ #include #include +#include #include #include #include #include #include -#include "src/proto/grpc/testing/echo.grpc.pb.h" +extern "C" { +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/tcp_posix.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/completion_queue.h" +#include "src/core/lib/surface/server.h" +#include "test/core/util/passthru_endpoint.h" #include "test/core/util/port.h" +} +#include "src/cpp/client/create_channel_internal.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "third_party/google_benchmark/include/benchmark/benchmark.h" namespace grpc { namespace testing { +static class InitializeStuff { + public: + InitializeStuff() { init_lib.init(); } + + private: + internal::GrpcLibrary init_lib; +} initialize_stuff; + /******************************************************************************* * FIXTURES */ -class TCPFixture { +class FullstackFixture { public: - TCPFixture(EchoTestService::AsyncService* service) { + FullstackFixture(Service* service, const grpc::string& address) { ServerBuilder b; + b.AddListeningPort(address, InsecureServerCredentials()); + cq_ = b.AddCompletionQueue(true); + b.RegisterService(service); + server_ = b.BuildAndStart(); + channel_ = CreateChannel(address, InsecureChannelCredentials()); + } + + ServerCompletionQueue* cq() { return cq_.get(); } + std::shared_ptr channel() { return channel_; } + + private: + std::unique_ptr server_; + std::unique_ptr cq_; + std::shared_ptr channel_; +}; + +class TCP : public FullstackFixture { + public: + TCP(Service* service) : FullstackFixture(service, MakeAddress()) {} + + private: + static grpc::string MakeAddress() { int port = grpc_pick_unused_port_or_die(); std::stringstream addr; addr << "localhost:" << port; - b.AddListeningPort(addr.str(), InsecureServerCredentials()); + return addr.str(); + } +}; + +class UDS : public FullstackFixture { + public: + UDS(Service* service) : FullstackFixture(service, "unix:bm_fullstack") {} +}; + +class EndpointPairFixture { + public: + EndpointPairFixture(Service* service, grpc_endpoint_pair endpoints) { + ServerBuilder b; cq_ = b.AddCompletionQueue(true); b.RegisterService(service); server_ = b.BuildAndStart(); - channel_ = CreateChannel(addr.str(), InsecureChannelCredentials()); + + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + + /* add server endpoint to server_ */ + { + const grpc_channel_args* server_args = + grpc_server_get_channel_args(server_->c_server()); + grpc_transport* transport = grpc_create_chttp2_transport( + &exec_ctx, server_args, endpoints.server, 0 /* is_client */); + + grpc_pollset** pollsets; + size_t num_pollsets = 0; + grpc_server_get_pollsets(server_->c_server(), &pollsets, &num_pollsets); + + for (size_t i = 0; i < num_pollsets; i++) { + grpc_endpoint_add_to_pollset(&exec_ctx, endpoints.server, pollsets[i]); + } + + grpc_server_setup_transport(&exec_ctx, server_->c_server(), transport, + NULL, server_args); + grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL); + } + + /* create channel */ + { + ChannelArguments args; + args.SetString(GRPC_ARG_DEFAULT_AUTHORITY, "test.authority"); + + grpc_channel_args c_args = args.c_args(); + grpc_transport* transport = + grpc_create_chttp2_transport(&exec_ctx, &c_args, endpoints.client, 1); + GPR_ASSERT(transport); + grpc_channel* channel = grpc_channel_create( + &exec_ctx, "target", &c_args, GRPC_CLIENT_DIRECT_CHANNEL, transport); + grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL); + + channel_ = CreateChannelInternal("", channel); + } + + grpc_exec_ctx_finish(&exec_ctx); } ServerCompletionQueue* cq() { return cq_.get(); } - std::shared_ptr channel() { return channel_; } private: @@ -78,6 +172,26 @@ class TCPFixture { std::shared_ptr channel_; }; +class SockPair : public EndpointPairFixture { + public: + SockPair(Service* service) + : EndpointPairFixture(service, + grpc_iomgr_create_endpoint_pair("test", 8192)) {} +}; + +class InProcessCHTTP2 : public EndpointPairFixture { + public: + InProcessCHTTP2(Service* service) + : EndpointPairFixture(service, MakeEndpoints()) {} + + private: + grpc_endpoint_pair MakeEndpoints() { + grpc_endpoint_pair p; + grpc_passthru_endpoint_create(&p.client, &p.server); + return p; + } +}; + /******************************************************************************* * BENCHMARKING KERNELS */ @@ -145,7 +259,10 @@ static void BM_UnaryPingPong(benchmark::State& state) { * CONFIGURATIONS */ -BENCHMARK_TEMPLATE(BM_UnaryPingPong, TCPFixture); +BENCHMARK_TEMPLATE(BM_UnaryPingPong, TCP); +BENCHMARK_TEMPLATE(BM_UnaryPingPong, UDS); +BENCHMARK_TEMPLATE(BM_UnaryPingPong, SockPair); +BENCHMARK_TEMPLATE(BM_UnaryPingPong, InProcessCHTTP2); } // namespace testing } // namespace grpc -- cgit v1.2.3 From 8d5807cefca4f4f26ba3f12d698e91f18d4a90d0 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 26 Oct 2016 12:55:28 -0700 Subject: Initialize wakeup_fd to keep GCC (with optimization level -O3) happy. GCC with optimization level -O3 complains about potential uninitialized values --- src/core/lib/iomgr/wakeup_fd_pipe.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.c index 183f0eb930..e186d63683 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.c +++ b/src/core/lib/iomgr/wakeup_fd_pipe.c @@ -95,6 +95,8 @@ static void pipe_destroy(grpc_wakeup_fd* fd_info) { static int pipe_check_availability(void) { grpc_wakeup_fd fd; + fd.read_fd = fd.write_fd = -1; + if (pipe_init(&fd) == GRPC_ERROR_NONE) { pipe_destroy(&fd); return 1; -- cgit v1.2.3 From e3df5a0285fa9bf87dbeac6b1ad2c1d4427102f0 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 27 Oct 2016 00:41:13 +0200 Subject: Reverting TSI's ntop change, to avoid dependency between TSI and gRPC. --- src/core/lib/tsi/ssl_transport_security.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/tsi/ssl_transport_security.c b/src/core/lib/tsi/ssl_transport_security.c index 749b46e19f..366dca9507 100644 --- a/src/core/lib/tsi/ssl_transport_security.c +++ b/src/core/lib/tsi/ssl_transport_security.c @@ -31,9 +31,6 @@ * */ -#include "src/core/lib/iomgr/sockaddr.h" - -#include "src/core/lib/iomgr/socket_utils.h" #include "src/core/lib/tsi/ssl_transport_security.h" #include @@ -41,6 +38,15 @@ #include #include +/* TODO(jboeuf): refactor inet_ntop into a portability header. */ +/* Note: for whomever reads this and tries to refactor this, this + can't be in grpc, it has to be in gpr. */ +#ifdef GPR_WINDOWS +#include +#else +#include +#endif + #include #include #include @@ -349,8 +355,8 @@ static tsi_result add_subject_alt_names_properties_to_peer( result = TSI_INTERNAL_ERROR; break; } - const char *name = grpc_inet_ntop(af, subject_alt_name->d.iPAddress->data, - ntop_buf, INET6_ADDRSTRLEN); + const char *name = inet_ntop(af, subject_alt_name->d.iPAddress->data, + ntop_buf, INET6_ADDRSTRLEN); if (name == NULL) { gpr_log(GPR_ERROR, "Could not get IP string from asn1 octet."); result = TSI_INTERNAL_ERROR; -- cgit v1.2.3 From d41a4a720f76c6555b80f82ee771071e09d55e03 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 16:16:06 -0700 Subject: s/gpr_slice/grpc_slice, and move around tests, impls --- Makefile | 32 +- build.yaml | 30 +- grpc.def | 56 ++-- include/grpc++/impl/codegen/core_codegen.h | 16 +- .../grpc++/impl/codegen/core_codegen_interface.h | 14 +- include/grpc++/impl/codegen/proto_utils.h | 26 +- include/grpc++/impl/codegen/thrift_serializer.h | 8 +- include/grpc++/support/slice.h | 12 +- include/grpc/byte_buffer.h | 10 +- include/grpc/impl/codegen/gpr_types.h | 65 ---- include/grpc/impl/codegen/grpc_types.h | 3 +- include/grpc/impl/codegen/slice.h | 66 ++++ include/grpc/slice.h | 128 ++++++++ include/grpc/slice_buffer.h | 87 +++++ include/grpc/support/slice.h | 128 -------- include/grpc/support/slice_buffer.h | 87 ----- src/core/ext/client_channel/connector.h | 2 +- .../default_initial_connect_string.c | 2 +- .../ext/client_channel/http_connect_handshaker.c | 30 +- .../ext/client_channel/initial_connect_string.c | 4 +- .../ext/client_channel/initial_connect_string.h | 4 +- src/core/ext/client_channel/subchannel.c | 4 +- src/core/ext/client_channel/uri_parser.c | 24 +- src/core/ext/lb_policy/grpclb/grpclb.c | 10 +- src/core/ext/lb_policy/grpclb/load_balancer_api.c | 10 +- src/core/ext/lb_policy/grpclb/load_balancer_api.h | 6 +- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 14 +- .../chttp2/client/insecure/channel_create.c | 8 +- .../chttp2/client/secure/secure_channel_create.c | 8 +- .../chttp2/server/insecure/server_chttp2.c | 2 +- .../chttp2/server/secure/server_secure_chttp2.c | 2 +- .../ext/transport/chttp2/transport/bin_decoder.c | 18 +- .../ext/transport/chttp2/transport/bin_decoder.h | 4 +- .../ext/transport/chttp2/transport/bin_encoder.c | 14 +- .../ext/transport/chttp2/transport/bin_encoder.h | 12 +- .../transport/chttp2/transport/chttp2_transport.c | 88 +++--- .../transport/chttp2/transport/chttp2_transport.h | 2 +- .../ext/transport/chttp2/transport/frame_data.c | 22 +- .../ext/transport/chttp2/transport/frame_data.h | 6 +- .../ext/transport/chttp2/transport/frame_goaway.c | 14 +- .../ext/transport/chttp2/transport/frame_goaway.h | 6 +- .../ext/transport/chttp2/transport/frame_ping.c | 8 +- .../ext/transport/chttp2/transport/frame_ping.h | 4 +- .../transport/chttp2/transport/frame_rst_stream.c | 8 +- .../transport/chttp2/transport/frame_rst_stream.h | 4 +- .../transport/chttp2/transport/frame_settings.c | 16 +- .../transport/chttp2/transport/frame_settings.h | 6 +- .../chttp2/transport/frame_window_update.c | 6 +- .../chttp2/transport/frame_window_update.h | 4 +- .../ext/transport/chttp2/transport/hpack_encoder.c | 36 +-- .../ext/transport/chttp2/transport/hpack_encoder.h | 2 +- .../ext/transport/chttp2/transport/hpack_parser.c | 2 +- .../ext/transport/chttp2/transport/hpack_parser.h | 2 +- src/core/ext/transport/chttp2/transport/internal.h | 28 +- src/core/ext/transport/chttp2/transport/parsing.c | 18 +- src/core/ext/transport/chttp2/transport/writing.c | 14 +- .../transport/cronet/transport/cronet_transport.c | 24 +- src/core/lib/channel/channel_stack.c | 4 +- src/core/lib/channel/channel_stack.h | 4 +- src/core/lib/channel/compress_filter.c | 22 +- src/core/lib/channel/deadline_filter.c | 4 +- src/core/lib/channel/handshaker.c | 8 +- src/core/lib/channel/handshaker.h | 6 +- src/core/lib/channel/http_client_filter.c | 16 +- src/core/lib/channel/http_server_filter.c | 8 +- src/core/lib/channel/message_size_filter.c | 2 +- src/core/lib/compression/message_compress.c | 32 +- src/core/lib/compression/message_compress.h | 4 +- src/core/lib/http/format_request.c | 12 +- src/core/lib/http/format_request.h | 6 +- src/core/lib/http/httpcli.c | 22 +- src/core/lib/http/httpcli_security_connector.c | 2 +- src/core/lib/http/parser.c | 2 +- src/core/lib/http/parser.h | 2 +- src/core/lib/iomgr/endpoint.c | 4 +- src/core/lib/iomgr/endpoint.h | 8 +- src/core/lib/iomgr/load_file.c | 6 +- src/core/lib/iomgr/load_file.h | 2 +- src/core/lib/iomgr/resource_quota.c | 12 +- src/core/lib/iomgr/resource_quota.h | 4 +- src/core/lib/iomgr/tcp_posix.c | 36 +-- src/core/lib/iomgr/tcp_windows.c | 24 +- src/core/lib/security/credentials/credentials.h | 6 +- .../security/credentials/credentials_metadata.c | 14 +- .../google_default/google_default_credentials.c | 4 +- .../lib/security/credentials/jwt/jwt_verifier.c | 40 +-- .../lib/security/credentials/jwt/jwt_verifier.h | 2 +- .../credentials/plugin/plugin_credentials.c | 8 +- .../lib/security/transport/client_auth_filter.c | 6 +- src/core/lib/security/transport/handshake.c | 38 +-- src/core/lib/security/transport/handshake.h | 2 +- src/core/lib/security/transport/secure_endpoint.c | 76 ++--- src/core/lib/security/transport/secure_endpoint.h | 2 +- .../lib/security/transport/security_connector.c | 22 +- .../lib/security/transport/security_connector.h | 10 +- .../lib/security/transport/server_auth_filter.c | 4 +- src/core/lib/security/util/b64.c | 8 +- src/core/lib/security/util/b64.h | 4 +- src/core/lib/slice/percent_encoding.c | 180 +++++++++++ src/core/lib/slice/percent_encoding.h | 78 +++++ src/core/lib/slice/slice.c | 350 +++++++++++++++++++++ src/core/lib/slice/slice_buffer.c | 282 +++++++++++++++++ src/core/lib/slice/slice_string_helpers.c | 81 +++++ src/core/lib/slice/slice_string_helpers.h | 58 ++++ src/core/lib/support/percent_encoding.c | 180 ----------- src/core/lib/support/percent_encoding.h | 78 ----- src/core/lib/support/slice.c | 350 --------------------- src/core/lib/support/slice_buffer.c | 282 ----------------- src/core/lib/support/string.c | 49 --- src/core/lib/support/string.h | 7 - src/core/lib/surface/byte_buffer.c | 18 +- src/core/lib/surface/byte_buffer_reader.c | 20 +- src/core/lib/surface/call.c | 20 +- src/core/lib/surface/server.c | 8 +- src/core/lib/transport/byte_stream.c | 8 +- src/core/lib/transport/byte_stream.h | 8 +- src/core/lib/transport/metadata.c | 22 +- src/core/lib/transport/metadata.h | 12 +- src/core/lib/transport/transport.c | 12 +- src/core/lib/transport/transport.h | 8 +- src/cpp/common/core_codegen.cc | 22 +- src/cpp/util/byte_buffer_cc.cc | 14 +- src/cpp/util/slice_cc.cc | 8 +- src/csharp/ext/grpc_csharp_ext.c | 8 +- src/node/ext/byte_buffer.cc | 8 +- src/objective-c/GRPCClient/private/NSData+GRPC.m | 12 +- src/php/ext/grpc/byte_buffer.c | 8 +- src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi | 26 +- .../grpcio/grpc/_cython/_cygrpc/records.pyx.pxi | 14 +- src/ruby/ext/grpc/rb_byte_buffer.c | 8 +- src/ruby/ext/grpc/rb_grpc_imports.generated.c | 112 +++---- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 178 +++++------ test/core/bad_client/bad_client.c | 18 +- test/core/bad_client/bad_client.h | 2 +- test/core/bad_client/tests/large_metadata.c | 16 +- test/core/bad_ssl/servers/cert.c | 6 +- .../set_initial_connect_string_test.c | 24 +- test/core/compression/message_compress_test.c | 144 ++++----- test/core/end2end/bad_server_response_test.c | 18 +- test/core/end2end/cq_verifier.c | 18 +- test/core/end2end/cq_verifier.h | 2 +- test/core/end2end/dualstack_socket_test.c | 14 +- test/core/end2end/fake_resolver.c | 14 +- test/core/end2end/fixtures/http_proxy.c | 62 ++-- test/core/end2end/fuzzers/api_fuzzer.c | 4 +- test/core/end2end/fuzzers/client_fuzzer.c | 4 +- test/core/end2end/fuzzers/server_fuzzer.c | 4 +- test/core/end2end/invalid_call_argument_test.c | 2 +- test/core/end2end/tests/binary_metadata.c | 4 +- test/core/end2end/tests/call_creds.c | 6 +- test/core/end2end/tests/cancel_after_accept.c | 4 +- test/core/end2end/tests/cancel_after_client_done.c | 4 +- test/core/end2end/tests/cancel_after_invoke.c | 2 +- test/core/end2end/tests/cancel_before_invoke.c | 2 +- test/core/end2end/tests/compressed_payload.c | 16 +- test/core/end2end/tests/filter_call_init_fails.c | 2 +- test/core/end2end/tests/filter_causes_close.c | 6 +- test/core/end2end/tests/invoke_large_request.c | 12 +- test/core/end2end/tests/large_metadata.c | 2 +- test/core/end2end/tests/load_reporting_hook.c | 4 +- test/core/end2end/tests/max_message_length.c | 6 +- test/core/end2end/tests/network_status_change.c | 2 +- test/core/end2end/tests/payload.c | 10 +- test/core/end2end/tests/ping_pong_streaming.c | 8 +- test/core/end2end/tests/request_with_flags.c | 2 +- test/core/end2end/tests/request_with_payload.c | 2 +- test/core/end2end/tests/resource_quota_server.c | 10 +- test/core/end2end/tests/simple_cacheable_request.c | 4 +- test/core/end2end/tests/simple_metadata.c | 4 +- test/core/end2end/tests/streaming_error_response.c | 4 +- test/core/end2end/tests/trailing_metadata.c | 4 +- test/core/fling/client.c | 4 +- test/core/http/format_request_test.c | 24 +- test/core/http/parser_test.c | 32 +- test/core/http/request_fuzzer.c | 4 +- test/core/http/response_fuzzer.c | 4 +- test/core/internal_api_canaries/transport.c | 2 +- test/core/iomgr/endpoint_tests.c | 34 +- test/core/iomgr/load_file_test.c | 24 +- test/core/iomgr/resource_quota_test.c | 12 +- test/core/iomgr/tcp_posix_test.c | 32 +- test/core/nanopb/fuzzer_response.c | 4 +- test/core/nanopb/fuzzer_serverlist.c | 4 +- test/core/security/b64_test.c | 40 +-- test/core/security/create_jwt.c | 4 +- test/core/security/credentials_test.c | 40 +-- test/core/security/fetch_oauth2.c | 2 +- test/core/security/json_token_test.c | 8 +- test/core/security/jwt_verifier_test.c | 12 +- test/core/security/oauth2_utils.c | 2 +- test/core/security/secure_endpoint_test.c | 30 +- test/core/security/security_connector_test.c | 8 +- .../04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 | 1 + .../0dd8f3a63745b3a2d39791559b5c1b311447b537 | 1 + .../17eeaca784409adbe43365c32ac87915d736bba3 | 2 + .../2040c1ff65f52a7ae668c2c8f324de5dacc9d695 | 1 + .../26b0d1da23027ae54db96e125e4a9e98842d77fb | 1 + .../2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 | 1 + .../35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a | 1 + .../36367ba1adba47a1cbc3a88707fde8cc7abdc248 | 1 + .../39c2ba51548a0beaf0d6d1164531f1447dc311b5 | 1 + .../56d08fea787c041395c6697ce26cfbc0decbe688 | 1 + .../678d981fdabb9f0d6640235cf1719dd1e1e66ae9 | 1 + .../68751961609ec010565de0aa87521dcbf0722c5d | 1 + .../7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 | 2 + .../7b302090e090a5829b6d1dd7be30bd4e36a7e60f | 1 + .../875e1022169c9e4c541a9ad894e69e989df22ba1 | 1 + .../8c1051ce066f5a26de9a9d133180621d0da957b4 | 1 + .../8e084e628ab83a18ac7ca7cb3506525263655c63 | 1 + .../9d316c4675f40ddccaf8f1cc7aea94170b1e4223 | 1 + .../ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae | 1 + .../b471f94aa4facf502e622e4a248f1ba4063ae681 | 1 + .../bf52ece030f16136d46e0dc97f58d60a0d8a1f0b | 2 + .../d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 | 2 + .../de867b64c54a7ed773dc611fc5cd2f17c5433113 | 2 + .../e3948dbe004950591630dd5c52f4e0fcbd5e388a | 1 + .../e7064f0b80f61dbc65915311032d27baa569ae2a | 1 + test/core/slice/percent_decode_corpus/xyz | 1 + test/core/slice/percent_decode_fuzzer.c | 66 ++++ .../0d3ee7fa54e6c66103965fd4409b044ba7db6c3f | 3 + .../2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 | 1 + .../55bb859f3942c462b03b7cbcf22ab4a0ac9705cf | 1 + .../56070cecd54c845b6d4334953b17b712eb000d93 | 1 + .../61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 | 3 + .../6e0c60cefc704c7940e475a87dd9ae423061cb5a | 3 + .../7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e | 4 + .../74c83ece3e2920a67593a9be9c82468f16cbb969 | 1 + .../98e004fd2a9f141a7a019720820080e12d637c06 | 3 + .../ba2c1e98227aa21ea3bb2ca4d0e504119717da8b | 3 + .../c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 | 2 + .../d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 | 1 + .../e2619218ede30d2b7b8ecd601a9f0ae754b728b4 | 4 + .../f93b3653e453f0e3eea3198001be6ce46e64bd21 | 5 + .../fd41d029c7682ad3d1c40a9fd017a4c85b673a54 | 3 + test/core/slice/percent_encode_corpus/xyz | 1 + test/core/slice/percent_encode_fuzzer.c | 73 +++++ test/core/slice/percent_encoding_test.c | 157 +++++++++ test/core/slice/slice_buffer_test.c | 129 ++++++++ test/core/slice/slice_string_helpers_test.c | 148 +++++++++ test/core/slice/slice_test.c | 265 ++++++++++++++++ .../04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 | 1 - .../0dd8f3a63745b3a2d39791559b5c1b311447b537 | 1 - .../17eeaca784409adbe43365c32ac87915d736bba3 | 2 - .../2040c1ff65f52a7ae668c2c8f324de5dacc9d695 | 1 - .../26b0d1da23027ae54db96e125e4a9e98842d77fb | 1 - .../2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 | 1 - .../35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a | 1 - .../36367ba1adba47a1cbc3a88707fde8cc7abdc248 | 1 - .../39c2ba51548a0beaf0d6d1164531f1447dc311b5 | 1 - .../56d08fea787c041395c6697ce26cfbc0decbe688 | 1 - .../678d981fdabb9f0d6640235cf1719dd1e1e66ae9 | 1 - .../68751961609ec010565de0aa87521dcbf0722c5d | 1 - .../7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 | 2 - .../7b302090e090a5829b6d1dd7be30bd4e36a7e60f | 1 - .../875e1022169c9e4c541a9ad894e69e989df22ba1 | 1 - .../8c1051ce066f5a26de9a9d133180621d0da957b4 | 1 - .../8e084e628ab83a18ac7ca7cb3506525263655c63 | 1 - .../9d316c4675f40ddccaf8f1cc7aea94170b1e4223 | 1 - .../ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae | 1 - .../b471f94aa4facf502e622e4a248f1ba4063ae681 | 1 - .../bf52ece030f16136d46e0dc97f58d60a0d8a1f0b | 2 - .../d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 | 2 - .../de867b64c54a7ed773dc611fc5cd2f17c5433113 | 2 - .../e3948dbe004950591630dd5c52f4e0fcbd5e388a | 1 - .../e7064f0b80f61dbc65915311032d27baa569ae2a | 1 - test/core/support/percent_decode_corpus/xyz | 1 - test/core/support/percent_decode_fuzzer.c | 66 ---- .../0d3ee7fa54e6c66103965fd4409b044ba7db6c3f | 3 - .../2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 | 1 - .../55bb859f3942c462b03b7cbcf22ab4a0ac9705cf | 1 - .../56070cecd54c845b6d4334953b17b712eb000d93 | 1 - .../61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 | 3 - .../6e0c60cefc704c7940e475a87dd9ae423061cb5a | 3 - .../7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e | 4 - .../74c83ece3e2920a67593a9be9c82468f16cbb969 | 1 - .../98e004fd2a9f141a7a019720820080e12d637c06 | 3 - .../ba2c1e98227aa21ea3bb2ca4d0e504119717da8b | 3 - .../c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 | 2 - .../d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 | 1 - .../e2619218ede30d2b7b8ecd601a9f0ae754b728b4 | 4 - .../f93b3653e453f0e3eea3198001be6ce46e64bd21 | 5 - .../fd41d029c7682ad3d1c40a9fd017a4c85b673a54 | 3 - test/core/support/percent_encode_corpus/xyz | 1 - test/core/support/percent_encode_fuzzer.c | 73 ----- test/core/support/percent_encoding_test.c | 157 --------- test/core/support/slice_buffer_test.c | 129 -------- test/core/support/slice_test.c | 265 ---------------- test/core/support/string_test.c | 94 ------ test/core/surface/byte_buffer_reader_test.c | 92 +++--- test/core/transport/chttp2/bin_decoder_test.c | 34 +- test/core/transport/chttp2/bin_encoder_test.c | 44 +-- test/core/transport/chttp2/hpack_encoder_test.c | 22 +- test/core/transport/chttp2/hpack_parser_test.c | 12 +- test/core/transport/chttp2/hpack_table_test.c | 2 +- test/core/transport/chttp2/varint_test.c | 12 +- test/core/transport/metadata_test.c | 38 +-- test/core/util/mock_endpoint.c | 24 +- test/core/util/mock_endpoint.h | 4 +- test/core/util/one_corpus_entry_fuzzer.c | 4 +- test/core/util/parse_hexstring.c | 6 +- test/core/util/parse_hexstring.h | 2 +- test/core/util/passthru_endpoint.c | 20 +- test/core/util/slice_splitter.c | 32 +- test/core/util/slice_splitter.h | 14 +- test/cpp/grpclb/grpclb_api_test.cc | 14 +- test/cpp/grpclb/grpclb_test.cc | 20 +- test/cpp/qps/client.h | 2 +- test/cpp/qps/server_async.cc | 2 +- test/cpp/util/byte_buffer_proto_helper.cc | 2 +- test/cpp/util/byte_buffer_test.cc | 22 +- test/cpp/util/cli_call.cc | 2 +- test/cpp/util/slice_test.cc | 12 +- tools/run_tests/sources_and_headers.json | 4 +- tools/run_tests/tests.json | 4 +- vsprojects/buildtests_c.sln | 4 +- .../gpr_slice_buffer_test.vcxproj | 4 +- .../test/gpr_slice_test/gpr_slice_test.vcxproj | 4 +- 317 files changed, 3726 insertions(+), 3585 deletions(-) create mode 100644 include/grpc/slice.h create mode 100644 include/grpc/slice_buffer.h delete mode 100644 include/grpc/support/slice.h delete mode 100644 include/grpc/support/slice_buffer.h create mode 100644 src/core/lib/slice/percent_encoding.c create mode 100644 src/core/lib/slice/percent_encoding.h create mode 100644 src/core/lib/slice/slice.c create mode 100644 src/core/lib/slice/slice_buffer.c create mode 100644 src/core/lib/slice/slice_string_helpers.c create mode 100644 src/core/lib/slice/slice_string_helpers.h delete mode 100644 src/core/lib/support/percent_encoding.c delete mode 100644 src/core/lib/support/percent_encoding.h delete mode 100644 src/core/lib/support/slice.c delete mode 100644 src/core/lib/support/slice_buffer.c create mode 100644 test/core/slice/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 create mode 100644 test/core/slice/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 create mode 100644 test/core/slice/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 create mode 100644 test/core/slice/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 create mode 100644 test/core/slice/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb create mode 100644 test/core/slice/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 create mode 100644 test/core/slice/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a create mode 100644 test/core/slice/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 create mode 100644 test/core/slice/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 create mode 100644 test/core/slice/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 create mode 100644 test/core/slice/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 create mode 100644 test/core/slice/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d create mode 100644 test/core/slice/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 create mode 100644 test/core/slice/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f create mode 100644 test/core/slice/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 create mode 100644 test/core/slice/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 create mode 100644 test/core/slice/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 create mode 100644 test/core/slice/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 create mode 100644 test/core/slice/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae create mode 100644 test/core/slice/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 create mode 100644 test/core/slice/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b create mode 100644 test/core/slice/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 create mode 100644 test/core/slice/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 create mode 100644 test/core/slice/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a create mode 100644 test/core/slice/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a create mode 100644 test/core/slice/percent_decode_corpus/xyz create mode 100644 test/core/slice/percent_decode_fuzzer.c create mode 100644 test/core/slice/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f create mode 100644 test/core/slice/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 create mode 100644 test/core/slice/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf create mode 100644 test/core/slice/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 create mode 100644 test/core/slice/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 create mode 100644 test/core/slice/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a create mode 100644 test/core/slice/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e create mode 100644 test/core/slice/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 create mode 100644 test/core/slice/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 create mode 100644 test/core/slice/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b create mode 100644 test/core/slice/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 create mode 100644 test/core/slice/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 create mode 100644 test/core/slice/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 create mode 100644 test/core/slice/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 create mode 100644 test/core/slice/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 create mode 100644 test/core/slice/percent_encode_corpus/xyz create mode 100644 test/core/slice/percent_encode_fuzzer.c create mode 100644 test/core/slice/percent_encoding_test.c create mode 100644 test/core/slice/slice_buffer_test.c create mode 100644 test/core/slice/slice_string_helpers_test.c create mode 100644 test/core/slice/slice_test.c delete mode 100644 test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 delete mode 100644 test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 delete mode 100644 test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 delete mode 100644 test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 delete mode 100644 test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb delete mode 100644 test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 delete mode 100644 test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a delete mode 100644 test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 delete mode 100644 test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 delete mode 100644 test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 delete mode 100644 test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 delete mode 100644 test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d delete mode 100644 test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 delete mode 100644 test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f delete mode 100644 test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 delete mode 100644 test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 delete mode 100644 test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 delete mode 100644 test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 delete mode 100644 test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae delete mode 100644 test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 delete mode 100644 test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b delete mode 100644 test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 delete mode 100644 test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 delete mode 100644 test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a delete mode 100644 test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a delete mode 100644 test/core/support/percent_decode_corpus/xyz delete mode 100644 test/core/support/percent_decode_fuzzer.c delete mode 100644 test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f delete mode 100644 test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 delete mode 100644 test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf delete mode 100644 test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 delete mode 100644 test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 delete mode 100644 test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a delete mode 100644 test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e delete mode 100644 test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 delete mode 100644 test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 delete mode 100644 test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b delete mode 100644 test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 delete mode 100644 test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 delete mode 100644 test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 delete mode 100644 test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 delete mode 100644 test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 delete mode 100644 test/core/support/percent_encode_corpus/xyz delete mode 100644 test/core/support/percent_encode_fuzzer.c delete mode 100644 test/core/support/percent_encoding_test.c delete mode 100644 test/core/support/slice_buffer_test.c delete mode 100644 test/core/support/slice_test.c (limited to 'src/core') diff --git a/Makefile b/Makefile index 19032419a6..c208c0b471 100644 --- a/Makefile +++ b/Makefile @@ -945,8 +945,8 @@ gpr_host_port_test: $(BINDIR)/$(CONFIG)/gpr_host_port_test gpr_log_test: $(BINDIR)/$(CONFIG)/gpr_log_test gpr_mpscq_test: $(BINDIR)/$(CONFIG)/gpr_mpscq_test gpr_percent_encoding_test: $(BINDIR)/$(CONFIG)/gpr_percent_encoding_test -gpr_slice_buffer_test: $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test -gpr_slice_test: $(BINDIR)/$(CONFIG)/gpr_slice_test +grpc_slice_buffer_test: $(BINDIR)/$(CONFIG)/grpc_slice_buffer_test +grpc_slice_test: $(BINDIR)/$(CONFIG)/grpc_slice_test gpr_stack_lockfree_test: $(BINDIR)/$(CONFIG)/gpr_stack_lockfree_test gpr_string_test: $(BINDIR)/$(CONFIG)/gpr_string_test gpr_sync_test: $(BINDIR)/$(CONFIG)/gpr_sync_test @@ -1279,8 +1279,8 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/gpr_log_test \ $(BINDIR)/$(CONFIG)/gpr_mpscq_test \ $(BINDIR)/$(CONFIG)/gpr_percent_encoding_test \ - $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test \ - $(BINDIR)/$(CONFIG)/gpr_slice_test \ + $(BINDIR)/$(CONFIG)/grpc_slice_buffer_test \ + $(BINDIR)/$(CONFIG)/grpc_slice_test \ $(BINDIR)/$(CONFIG)/gpr_stack_lockfree_test \ $(BINDIR)/$(CONFIG)/gpr_string_test \ $(BINDIR)/$(CONFIG)/gpr_sync_test \ @@ -1631,10 +1631,10 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/gpr_mpscq_test || ( echo test gpr_mpscq_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_percent_encoding_test" $(Q) $(BINDIR)/$(CONFIG)/gpr_percent_encoding_test || ( echo test gpr_percent_encoding_test failed ; exit 1 ) - $(E) "[RUN] Testing gpr_slice_buffer_test" - $(Q) $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test || ( echo test gpr_slice_buffer_test failed ; exit 1 ) - $(E) "[RUN] Testing gpr_slice_test" - $(Q) $(BINDIR)/$(CONFIG)/gpr_slice_test || ( echo test gpr_slice_test failed ; exit 1 ) + $(E) "[RUN] Testing grpc_slice_buffer_test" + $(Q) $(BINDIR)/$(CONFIG)/grpc_slice_buffer_test || ( echo test grpc_slice_buffer_test failed ; exit 1 ) + $(E) "[RUN] Testing grpc_slice_test" + $(Q) $(BINDIR)/$(CONFIG)/grpc_slice_test || ( echo test grpc_slice_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_stack_lockfree_test" $(Q) $(BINDIR)/$(CONFIG)/gpr_stack_lockfree_test || ( echo test gpr_stack_lockfree_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_string_test" @@ -8288,22 +8288,22 @@ ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL. -$(BINDIR)/$(CONFIG)/gpr_slice_buffer_test: openssl_dep_error +$(BINDIR)/$(CONFIG)/grpc_slice_buffer_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/gpr_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/grpc_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_BUFFER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test + $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_BUFFER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_slice_buffer_test endif $(OBJDIR)/$(CONFIG)/test/core/support/slice_buffer_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a -deps_gpr_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_OBJS:.o=.dep) +deps_grpc_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) @@ -8320,22 +8320,22 @@ ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL. -$(BINDIR)/$(CONFIG)/gpr_slice_test: openssl_dep_error +$(BINDIR)/$(CONFIG)/grpc_slice_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/gpr_slice_test: $(GPR_SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/grpc_slice_test: $(GPR_SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_slice_test + $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_slice_test endif $(OBJDIR)/$(CONFIG)/test/core/support/slice_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a -deps_gpr_slice_test: $(GPR_SLICE_TEST_OBJS:.o=.dep) +deps_grpc_slice_test: $(GPR_SLICE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) diff --git a/build.yaml b/build.yaml index c12595205d..d7cd82b9d9 100644 --- a/build.yaml +++ b/build.yaml @@ -64,8 +64,6 @@ filegroups: - include/grpc/support/log.h - include/grpc/support/log_windows.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 @@ -86,7 +84,6 @@ filegroups: - src/core/lib/support/env.h - src/core/lib/support/mpscq.h - src/core/lib/support/murmur_hash.h - - src/core/lib/support/percent_encoding.h - src/core/lib/support/stack_lockfree.h - src/core/lib/support/string.h - src/core/lib/support/string_windows.h @@ -116,9 +113,6 @@ filegroups: - src/core/lib/support/log_windows.c - src/core/lib/support/mpscq.c - src/core/lib/support/murmur_hash.c - - src/core/lib/support/percent_encoding.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 @@ -165,6 +159,8 @@ filegroups: - include/grpc/grpc_posix.h - include/grpc/grpc_security_constants.h - include/grpc/status.h + - include/grpc/slice.h + - include/grpc/slice_buffer.h headers: - src/core/lib/channel/channel_args.h - src/core/lib/channel/channel_stack.h @@ -191,6 +187,7 @@ filegroups: - src/core/lib/iomgr/ev_epoll_linux.h - src/core/lib/iomgr/ev_poll_and_epoll_posix.h - src/core/lib/iomgr/ev_poll_posix.h + - src/core/lib/slice/percent_encoding.h - src/core/lib/iomgr/ev_posix.h - src/core/lib/iomgr/exec_ctx.h - src/core/lib/iomgr/executor.h @@ -204,6 +201,7 @@ filegroups: - src/core/lib/iomgr/pollset.h - src/core/lib/iomgr/pollset_set.h - src/core/lib/iomgr/pollset_set_windows.h + - src/core/lib/slice/slice_string_helpers.h - src/core/lib/iomgr/pollset_windows.h - src/core/lib/iomgr/resolve_address.h - src/core/lib/iomgr/resource_quota.h @@ -257,6 +255,10 @@ filegroups: - 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/slice/slice.c + - src/core/lib/slice/percent_encoding.c + - src/core/lib/slice/slice_buffer.c + - src/core/lib/slice/slice_string_helpers.c - src/core/lib/channel/connected_channel.c - src/core/lib/channel/deadline_filter.c - src/core/lib/channel/handshaker.c @@ -1748,19 +1750,19 @@ targets: deps: - gpr_test_util - gpr -- name: gpr_slice_buffer_test +- name: slice_buffer_test build: test language: c src: - - test/core/support/slice_buffer_test.c + - test/core/slice/slice_buffer_test.c deps: - gpr_test_util - gpr -- name: gpr_slice_test +- name: slice_test build: test language: c src: - - test/core/support/slice_test.c + - test/core/slice/slice_test.c deps: - gpr_test_util - gpr @@ -2313,27 +2315,27 @@ targets: build: fuzzer language: c src: - - test/core/support/percent_decode_fuzzer.c + - test/core/slice/percent_decode_fuzzer.c deps: - grpc_test_util - grpc - gpr_test_util - gpr corpus_dirs: - - test/core/support/percent_decode_corpus + - test/core/slice/percent_decode_corpus maxlen: 32 - name: percent_encode_fuzzer build: fuzzer language: c src: - - test/core/support/percent_encode_fuzzer.c + - test/core/slice/percent_encode_fuzzer.c deps: - grpc_test_util - grpc - gpr_test_util - gpr corpus_dirs: - - test/core/support/percent_encode_corpus + - test/core/slice/percent_encode_corpus maxlen: 32 - name: resolve_address_test build: test diff --git a/grpc.def b/grpc.def index 0b6db801d8..e2d6ce9b43 100644 --- a/grpc.def +++ b/grpc.def @@ -183,35 +183,35 @@ EXPORTS gpr_log_verbosity_init gpr_set_log_function gpr_format_message - gpr_slice_ref - gpr_slice_unref - gpr_slice_new - gpr_slice_new_with_user_data - gpr_slice_new_with_len - gpr_slice_malloc - gpr_slice_from_copied_string - gpr_slice_from_copied_buffer - gpr_slice_from_static_string - gpr_slice_sub - gpr_slice_sub_no_ref - gpr_slice_split_tail - gpr_slice_split_head + grpc_slice_ref + grpc_slice_unref + grpc_slice_new + grpc_slice_new_with_user_data + grpc_slice_new_with_len + grpc_slice_malloc + grpc_slice_from_copied_string + grpc_slice_from_copied_buffer + grpc_slice_from_static_string + grpc_slice_sub + grpc_slice_sub_no_ref + grpc_slice_split_tail + grpc_slice_split_head gpr_empty_slice - gpr_slice_cmp - gpr_slice_str_cmp - gpr_slice_buffer_init - gpr_slice_buffer_destroy - gpr_slice_buffer_add - gpr_slice_buffer_add_indexed - gpr_slice_buffer_addn - gpr_slice_buffer_tiny_add - gpr_slice_buffer_pop - gpr_slice_buffer_reset_and_unref - gpr_slice_buffer_swap - gpr_slice_buffer_move_into - gpr_slice_buffer_trim_end - gpr_slice_buffer_move_first - gpr_slice_buffer_take_first + grpc_slice_cmp + grpc_slice_str_cmp + grpc_slice_buffer_init + grpc_slice_buffer_destroy + grpc_slice_buffer_add + grpc_slice_buffer_add_indexed + grpc_slice_buffer_addn + grpc_slice_buffer_tiny_add + grpc_slice_buffer_pop + grpc_slice_buffer_reset_and_unref + grpc_slice_buffer_swap + grpc_slice_buffer_move_into + grpc_slice_buffer_trim_end + grpc_slice_buffer_move_first + grpc_slice_buffer_take_first gpr_strdup gpr_asprintf gpr_subprocess_binary_extension diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h index 0ce009e69d..c2127a771a 100644 --- a/include/grpc++/impl/codegen/core_codegen.h +++ b/include/grpc++/impl/codegen/core_codegen.h @@ -73,17 +73,17 @@ class CoreCodegen : public CoreCodegenInterface { void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader* reader) GRPC_OVERRIDE; int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, - gpr_slice* slice) GRPC_OVERRIDE; + grpc_slice* slice) GRPC_OVERRIDE; - grpc_byte_buffer* grpc_raw_byte_buffer_create(gpr_slice* slice, + grpc_byte_buffer* grpc_raw_byte_buffer_create(grpc_slice* slice, size_t nslices) GRPC_OVERRIDE; - gpr_slice gpr_slice_malloc(size_t length) GRPC_OVERRIDE; - void gpr_slice_unref(gpr_slice slice) GRPC_OVERRIDE; - gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) GRPC_OVERRIDE; - void gpr_slice_buffer_add(gpr_slice_buffer* sb, - gpr_slice slice) GRPC_OVERRIDE; - void gpr_slice_buffer_pop(gpr_slice_buffer* sb) GRPC_OVERRIDE; + grpc_slice grpc_slice_malloc(size_t length) GRPC_OVERRIDE; + void grpc_slice_unref(grpc_slice slice) GRPC_OVERRIDE; + grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) GRPC_OVERRIDE; + void grpc_slice_buffer_add(grpc_slice_buffer* sb, + grpc_slice slice) GRPC_OVERRIDE; + void grpc_slice_buffer_pop(grpc_slice_buffer* sb) GRPC_OVERRIDE; void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE; void grpc_metadata_array_destroy(grpc_metadata_array* array) GRPC_OVERRIDE; diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index 68851f15c6..743f528373 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -88,16 +88,16 @@ class CoreCodegenInterface { virtual void grpc_byte_buffer_reader_destroy( grpc_byte_buffer_reader* reader) = 0; virtual int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, - gpr_slice* slice) = 0; + grpc_slice* slice) = 0; - virtual grpc_byte_buffer* grpc_raw_byte_buffer_create(gpr_slice* slice, + virtual grpc_byte_buffer* grpc_raw_byte_buffer_create(grpc_slice* slice, size_t nslices) = 0; - virtual gpr_slice gpr_slice_malloc(size_t length) = 0; - virtual void gpr_slice_unref(gpr_slice slice) = 0; - virtual gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) = 0; - virtual void gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) = 0; - virtual void gpr_slice_buffer_pop(gpr_slice_buffer* sb) = 0; + virtual grpc_slice grpc_slice_malloc(size_t length) = 0; + virtual void grpc_slice_unref(grpc_slice slice) = 0; + virtual grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) = 0; + virtual void grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice slice) = 0; + virtual void grpc_slice_buffer_pop(grpc_slice_buffer* sb) = 0; virtual void grpc_metadata_array_init(grpc_metadata_array* array) = 0; virtual void grpc_metadata_array_destroy(grpc_metadata_array* array) = 0; diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index 6f4786b87b..4885ea0ee7 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -63,7 +63,7 @@ class GrpcBufferWriter GRPC_FINAL ~GrpcBufferWriter() GRPC_OVERRIDE { if (have_backup_) { - g_core_codegen_interface->gpr_slice_unref(backup_slice_); + g_core_codegen_interface->grpc_slice_unref(backup_slice_); } } @@ -72,24 +72,24 @@ class GrpcBufferWriter GRPC_FINAL slice_ = backup_slice_; have_backup_ = false; } else { - slice_ = g_core_codegen_interface->gpr_slice_malloc(block_size_); + slice_ = g_core_codegen_interface->grpc_slice_malloc(block_size_); } *data = GPR_SLICE_START_PTR(slice_); // On win x64, int is only 32bit GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); - g_core_codegen_interface->gpr_slice_buffer_add(slice_buffer_, slice_); + g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_); return true; } void BackUp(int count) GRPC_OVERRIDE { - g_core_codegen_interface->gpr_slice_buffer_pop(slice_buffer_); + g_core_codegen_interface->grpc_slice_buffer_pop(slice_buffer_); if (count == block_size_) { backup_slice_ = slice_; } else { - backup_slice_ = g_core_codegen_interface->gpr_slice_split_tail( + backup_slice_ = g_core_codegen_interface->grpc_slice_split_tail( &slice_, GPR_SLICE_LENGTH(slice_) - count); - g_core_codegen_interface->gpr_slice_buffer_add(slice_buffer_, slice_); + g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_); } have_backup_ = true; byte_count_ -= count; @@ -100,10 +100,10 @@ class GrpcBufferWriter GRPC_FINAL private: const int block_size_; int64_t byte_count_; - gpr_slice_buffer* slice_buffer_; + grpc_slice_buffer* slice_buffer_; bool have_backup_; - gpr_slice backup_slice_; - gpr_slice slice_; + grpc_slice backup_slice_; + grpc_slice slice_; }; class GrpcBufferReader GRPC_FINAL @@ -137,7 +137,7 @@ class GrpcBufferReader GRPC_FINAL &slice_)) { return false; } - g_core_codegen_interface->gpr_slice_unref(slice_); + g_core_codegen_interface->grpc_slice_unref(slice_); *data = GPR_SLICE_START_PTR(slice_); // On win x64, int is only 32bit GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); @@ -172,7 +172,7 @@ class GrpcBufferReader GRPC_FINAL int64_t byte_count_; int64_t backup_count_; grpc_byte_buffer_reader reader_; - gpr_slice slice_; + grpc_slice slice_; Status status_; }; } // namespace internal @@ -186,12 +186,12 @@ class SerializationTraitsgpr_slice_malloc(byte_size); + grpc_slice slice = g_core_codegen_interface->grpc_slice_malloc(byte_size); GPR_CODEGEN_ASSERT( GPR_SLICE_END_PTR(slice) == msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); *bp = g_core_codegen_interface->grpc_raw_byte_buffer_create(&slice, 1); - g_core_codegen_interface->gpr_slice_unref(slice); + g_core_codegen_interface->grpc_slice_unref(slice); return g_core_codegen_interface->ok(); } else { internal::GrpcBufferWriter writer( diff --git a/include/grpc++/impl/codegen/thrift_serializer.h b/include/grpc++/impl/codegen/thrift_serializer.h index fd324a994f..691ce1af48 100644 --- a/include/grpc++/impl/codegen/thrift_serializer.h +++ b/include/grpc++/impl/codegen/thrift_serializer.h @@ -109,12 +109,12 @@ class ThriftSerializer { Serialize(fields, &byte_buffer, &byte_buffer_size); - gpr_slice slice = gpr_slice_from_copied_buffer( + grpc_slice slice = grpc_slice_from_copied_buffer( reinterpret_cast(byte_buffer), byte_buffer_size); *bp = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } // Deserialize the passed char array into the passed type, returns the number @@ -156,12 +156,12 @@ class ThriftSerializer { grpc_byte_buffer_reader reader; grpc_byte_buffer_reader_init(&reader, buffer); - gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); + grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); uint32_t len = Deserialize(GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice), msg); - gpr_slice_unref(slice); + grpc_slice_unref(slice); grpc_byte_buffer_reader_destroy(&reader); diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index 5874b4f5ae..b06b1b69e5 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -39,7 +39,7 @@ namespace grpc { -/// A wrapper around \a gpr_slice. +/// A wrapper around \a grpc_slice. /// /// A slice represents a contiguous reference counted array of bytes. /// It is cheap to take references to a slice, and it is cheap to create a @@ -53,11 +53,11 @@ class Slice GRPC_FINAL { enum AddRef { ADD_REF }; /// Construct a slice from \a slice, adding a reference. - Slice(gpr_slice slice, AddRef); + Slice(grpc_slice slice, AddRef); enum StealRef { STEAL_REF }; /// Construct a slice from \a slice, stealing a reference. - Slice(gpr_slice slice, StealRef); + Slice(grpc_slice slice, StealRef); /// Copy constructor, adds a reference. Slice(const Slice& other); @@ -77,13 +77,13 @@ class Slice GRPC_FINAL { /// Raw pointer to the end (one byte \em past the last element) of the slice. const uint8_t* end() const { return GPR_SLICE_END_PTR(slice_); } - /// Raw C slice. Caller needs to call gpr_slice_unref when done. - gpr_slice c_slice() const { return gpr_slice_ref(slice_); } + /// Raw C slice. Caller needs to call grpc_slice_unref when done. + grpc_slice c_slice() const { return grpc_slice_ref(slice_); } private: friend class ByteBuffer; - gpr_slice slice_; + grpc_slice slice_; }; } // namespace grpc diff --git a/include/grpc/byte_buffer.h b/include/grpc/byte_buffer.h index f25c1d51d6..3cf31df0df 100644 --- a/include/grpc/byte_buffer.h +++ b/include/grpc/byte_buffer.h @@ -45,7 +45,7 @@ extern "C" { * * Increases the reference count for all \a slices processed. The user is * responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/ -GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices, +GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_create(grpc_slice *slices, size_t nslices); /** Returns a *compressed* RAW byte buffer instance over the given slices (up to @@ -55,7 +55,7 @@ GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices, * Increases the reference count for all \a slices processed. The user is * responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/ GRPCAPI grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create( - gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression); + grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression); /** Copies input byte buffer \a bb. * @@ -83,12 +83,12 @@ GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader); /** Updates \a slice with the next piece of data from from \a reader and returns * 1. Returns 0 at the end of the stream. Caller is responsible for calling - * gpr_slice_unref on the result. */ + * grpc_slice_unref on the result. */ GRPCAPI int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, - gpr_slice *slice); + grpc_slice *slice); /** Merge all data from \a reader into single slice */ -GRPCAPI gpr_slice +GRPCAPI grpc_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader); /** Returns a RAW byte buffer instance from the output of \a reader. */ diff --git a/include/grpc/impl/codegen/gpr_types.h b/include/grpc/impl/codegen/gpr_types.h index c8f0815f0b..ed9976f429 100644 --- a/include/grpc/impl/codegen/gpr_types.h +++ b/include/grpc/impl/codegen/gpr_types.h @@ -68,71 +68,6 @@ typedef struct gpr_timespec { gpr_clock_type clock_type; } gpr_timespec; -/* Slice API - - A slice represents a contiguous reference counted array of bytes. - It is cheap to take references to a slice, and it is cheap to create a - slice pointing to a subset of another slice. - - The data-structure for slices is exposed here to allow non-gpr code to - build slices from whatever data they have available. - - When defining interfaces that handle slices, care should be taken to define - reference ownership semantics (who should call unref?) and mutability - constraints (is the callee allowed to modify the slice?) */ - -/* Reference count container for gpr_slice. Contains function pointers to - increment and decrement reference counts. Implementations should cleanup - when the reference count drops to zero. - Typically client code should not touch this, and use gpr_slice_malloc, - gpr_slice_new, or gpr_slice_new_with_len instead. */ -typedef struct gpr_slice_refcount { - void (*ref)(void *); - void (*unref)(void *); -} gpr_slice_refcount; - -#define GPR_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1) - -/* A gpr_slice s, if initialized, represents the byte range - s.bytes[0..s.length-1]. - - It can have an associated ref count which has a destruction routine to be run - when the ref count reaches zero (see gpr_slice_new() and grp_slice_unref()). - Multiple gpr_slice values may share a ref count. - - If the slice does not have a refcount, it represents an inlined small piece - of data that is copied by value. */ -typedef struct gpr_slice { - struct gpr_slice_refcount *refcount; - union { - struct { - uint8_t *bytes; - size_t length; - } refcounted; - struct { - uint8_t length; - uint8_t bytes[GPR_SLICE_INLINED_SIZE]; - } inlined; - } data; -} gpr_slice; - -#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8 - -/* Represents an expandable array of slices, to be interpreted as a - single item. */ -typedef struct { - /* slices in the array */ - gpr_slice *slices; - /* the number of slices in the array */ - size_t count; - /* the number of slices allocated in the array */ - size_t capacity; - /* the combined length of all slices in the array */ - size_t length; - /* inlined elements to avoid allocations */ - gpr_slice inlined[GRPC_SLICE_BUFFER_INLINE_ELEMENTS]; -} gpr_slice_buffer; - #ifdef __cplusplus } #endif diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index d2dce0d511..cbd484ba33 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -35,6 +35,7 @@ #define GRPC_IMPL_CODEGEN_GRPC_TYPES_H #include +#include #include #include @@ -60,7 +61,7 @@ typedef struct grpc_byte_buffer { } reserved; struct { grpc_compression_algorithm compression; - gpr_slice_buffer slice_buffer; + grpc_slice_buffer slice_buffer; } raw; } data; } grpc_byte_buffer; diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index a2637eea62..79297ce23d 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -35,6 +35,72 @@ #define GRPC_IMPL_CODEGEN_SLICE_H #include +#include + +/* Slice API + + A slice represents a contiguous reference counted array of bytes. + It is cheap to take references to a slice, and it is cheap to create a + slice pointing to a subset of another slice. + + The data-structure for slices is exposed here to allow non-gpr code to + build slices from whatever data they have available. + + When defining interfaces that handle slices, care should be taken to define + reference ownership semantics (who should call unref?) and mutability + constraints (is the callee allowed to modify the slice?) */ + +/* Reference count container for grpc_slice. Contains function pointers to + increment and decrement reference counts. Implementations should cleanup + when the reference count drops to zero. + Typically client code should not touch this, and use grpc_slice_malloc, + grpc_slice_new, or grpc_slice_new_with_len instead. */ +typedef struct grpc_slice_refcount { + void (*ref)(void *); + void (*unref)(void *); +} grpc_slice_refcount; + +#define GPR_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1) + +/* A grpc_slice s, if initialized, represents the byte range + s.bytes[0..s.length-1]. + + It can have an associated ref count which has a destruction routine to be run + when the ref count reaches zero (see grpc_slice_new() and grp_slice_unref()). + Multiple grpc_slice values may share a ref count. + + If the slice does not have a refcount, it represents an inlined small piece + of data that is copied by value. */ +typedef struct grpc_slice { + struct grpc_slice_refcount *refcount; + union { + struct { + uint8_t *bytes; + size_t length; + } refcounted; + struct { + uint8_t length; + uint8_t bytes[GPR_SLICE_INLINED_SIZE]; + } inlined; + } data; +} grpc_slice; + +#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8 + +/* Represents an expandable array of slices, to be interpreted as a + single item. */ +typedef struct { + /* slices in the array */ + grpc_slice *slices; + /* the number of slices in the array */ + size_t count; + /* the number of slices allocated in the array */ + size_t capacity; + /* the combined length of all slices in the array */ + size_t length; + /* inlined elements to avoid allocations */ + grpc_slice inlined[GRPC_SLICE_BUFFER_INLINE_ELEMENTS]; +} grpc_slice_buffer; #define GPR_SLICE_START_PTR(slice) \ ((slice).refcount ? (slice).data.refcounted.bytes \ diff --git a/include/grpc/slice.h b/include/grpc/slice.h new file mode 100644 index 0000000000..5953e0ccb7 --- /dev/null +++ b/include/grpc/slice.h @@ -0,0 +1,128 @@ +/* + * + * Copyright 2015, 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. + * + */ + +#ifndef GRPC_SUPPORT_SLICE_H +#define GRPC_SUPPORT_SLICE_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Increment the refcount of s. Requires slice is initialized. + Returns s. */ +GPRAPI grpc_slice grpc_slice_ref(grpc_slice s); + +/* Decrement the ref count of s. If the ref count of s reaches zero, all + slices sharing the ref count are destroyed, and considered no longer + initialized. If s is ultimately derived from a call to grpc_slice_new(start, + len, dest) where dest!=NULL , then (*dest)(start) is called, else if s is + ultimately derived from a call to grpc_slice_new_with_len(start, len, dest) + where dest!=NULL , then (*dest)(start, len). Requires s initialized. */ +GPRAPI void grpc_slice_unref(grpc_slice s); + +/* Create a slice pointing at some data. Calls malloc to allocate a refcount + for the object, and arranges that destroy will be called with the pointer + passed in at destruction. */ +GPRAPI grpc_slice grpc_slice_new(void *p, size_t len, void (*destroy)(void *)); + +/* Equivalent to grpc_slice_new, but with a separate pointer that is + passed to the destroy function. This function can be useful when + the data is part of a larger structure that must be destroyed when + the data is no longer needed. */ +GPRAPI grpc_slice grpc_slice_new_with_user_data(void *p, size_t len, + void (*destroy)(void *), + void *user_data); + +/* Equivalent to grpc_slice_new, but with a two argument destroy function that + also takes the slice length. */ +GPRAPI grpc_slice grpc_slice_new_with_len(void *p, size_t len, + void (*destroy)(void *, size_t)); + +/* Equivalent to grpc_slice_new(malloc(len), len, free), but saves one malloc() + call. + Aborts if malloc() fails. */ +GPRAPI grpc_slice grpc_slice_malloc(size_t length); + +/* Create a slice by copying a string. + Does not preserve null terminators. + Equivalent to: + size_t len = strlen(source); + grpc_slice slice = grpc_slice_malloc(len); + memcpy(slice->data, source, len); */ +GPRAPI grpc_slice grpc_slice_from_copied_string(const char *source); + +/* Create a slice by copying a buffer. + Equivalent to: + grpc_slice slice = grpc_slice_malloc(len); + memcpy(slice->data, source, len); */ +GPRAPI grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t len); + +/* Create a slice pointing to constant memory */ +GPRAPI grpc_slice grpc_slice_from_static_string(const char *source); + +/* Return a result slice derived from s, which shares a ref count with s, where + result.data==s.data+begin, and result.length==end-begin. + The ref count of s is increased by one. + Requires s initialized, begin <= end, begin <= s.length, and + end <= source->length. */ +GPRAPI grpc_slice grpc_slice_sub(grpc_slice s, size_t begin, size_t end); + +/* The same as grpc_slice_sub, but without altering the ref count */ +GPRAPI grpc_slice grpc_slice_sub_no_ref(grpc_slice s, size_t begin, size_t end); + +/* Splits s into two: modifies s to be s[0:split], and returns a new slice, + sharing a refcount with s, that contains s[split:s.length]. + Requires s intialized, split <= s.length */ +GPRAPI grpc_slice grpc_slice_split_tail(grpc_slice *s, size_t split); + +/* Splits s into two: modifies s to be s[split:s.length], and returns a new + slice, sharing a refcount with s, that contains s[0:split]. + Requires s intialized, split <= s.length */ +GPRAPI grpc_slice grpc_slice_split_head(grpc_slice *s, size_t split); + +GPRAPI grpc_slice gpr_empty_slice(void); + +/* Returns <0 if a < b, ==0 if a == b, >0 if a > b + The order is arbitrary, and is not guaranteed to be stable across different + versions of the API. */ +GPRAPI int grpc_slice_cmp(grpc_slice a, grpc_slice b); +GPRAPI int grpc_slice_str_cmp(grpc_slice a, const char *b); + +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_SUPPORT_SLICE_H */ diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h new file mode 100644 index 0000000000..bff0d76914 --- /dev/null +++ b/include/grpc/slice_buffer.h @@ -0,0 +1,87 @@ +/* + * + * Copyright 2015, 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. + * + */ + +#ifndef GRPC_SUPPORT_SLICE_BUFFER_H +#define GRPC_SUPPORT_SLICE_BUFFER_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* initialize a slice buffer */ +GPRAPI void grpc_slice_buffer_init(grpc_slice_buffer *sb); +/* destroy a slice buffer - unrefs any held elements */ +GPRAPI void grpc_slice_buffer_destroy(grpc_slice_buffer *sb); +/* Add an element to a slice buffer - takes ownership of the slice. + This function is allowed to concatenate the passed in slice to the end of + some other slice if desired by the slice buffer. */ +GPRAPI void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice slice); +/* add an element to a slice buffer - takes ownership of the slice and returns + the index of the slice. + Guarantees that the slice will not be concatenated at the end of another + slice (i.e. the data for this slice will begin at the first byte of the + slice at the returned index in sb->slices) + The implementation MAY decide to concatenate data at the end of a small + slice added in this fashion. */ +GPRAPI size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer *sb, + grpc_slice slice); +GPRAPI void grpc_slice_buffer_addn(grpc_slice_buffer *sb, grpc_slice *slices, + size_t n); +/* add a very small (less than 8 bytes) amount of data to the end of a slice + buffer: returns a pointer into which to add the data */ +GPRAPI uint8_t *grpc_slice_buffer_tiny_add(grpc_slice_buffer *sb, size_t len); +/* pop the last buffer, but don't unref it */ +GPRAPI void grpc_slice_buffer_pop(grpc_slice_buffer *sb); +/* clear a slice buffer, unref all elements */ +GPRAPI void grpc_slice_buffer_reset_and_unref(grpc_slice_buffer *sb); +/* swap the contents of two slice buffers */ +GPRAPI void grpc_slice_buffer_swap(grpc_slice_buffer *a, grpc_slice_buffer *b); +/* move all of the elements of src into dst */ +GPRAPI void grpc_slice_buffer_move_into(grpc_slice_buffer *src, + grpc_slice_buffer *dst); +/* remove n bytes from the end of a slice buffer */ +GPRAPI void grpc_slice_buffer_trim_end(grpc_slice_buffer *src, size_t n, + grpc_slice_buffer *garbage); +/* move the first n bytes of src into dst */ +GPRAPI void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, + grpc_slice_buffer *dst); +/* take the first slice in the slice buffer */ +GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *src); + +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_SUPPORT_SLICE_BUFFER_H */ diff --git a/include/grpc/support/slice.h b/include/grpc/support/slice.h deleted file mode 100644 index b31fe6c0c5..0000000000 --- a/include/grpc/support/slice.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * - * Copyright 2015, 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. - * - */ - -#ifndef GRPC_SUPPORT_SLICE_H -#define GRPC_SUPPORT_SLICE_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Increment the refcount of s. Requires slice is initialized. - Returns s. */ -GPRAPI gpr_slice gpr_slice_ref(gpr_slice s); - -/* Decrement the ref count of s. If the ref count of s reaches zero, all - slices sharing the ref count are destroyed, and considered no longer - initialized. If s is ultimately derived from a call to gpr_slice_new(start, - len, dest) where dest!=NULL , then (*dest)(start) is called, else if s is - ultimately derived from a call to gpr_slice_new_with_len(start, len, dest) - where dest!=NULL , then (*dest)(start, len). Requires s initialized. */ -GPRAPI void gpr_slice_unref(gpr_slice s); - -/* Create a slice pointing at some data. Calls malloc to allocate a refcount - for the object, and arranges that destroy will be called with the pointer - passed in at destruction. */ -GPRAPI gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)); - -/* Equivalent to gpr_slice_new, but with a separate pointer that is - passed to the destroy function. This function can be useful when - the data is part of a larger structure that must be destroyed when - the data is no longer needed. */ -GPRAPI gpr_slice gpr_slice_new_with_user_data(void *p, size_t len, - void (*destroy)(void *), - void *user_data); - -/* Equivalent to gpr_slice_new, but with a two argument destroy function that - also takes the slice length. */ -GPRAPI gpr_slice gpr_slice_new_with_len(void *p, size_t len, - void (*destroy)(void *, size_t)); - -/* Equivalent to gpr_slice_new(malloc(len), len, free), but saves one malloc() - call. - Aborts if malloc() fails. */ -GPRAPI gpr_slice gpr_slice_malloc(size_t length); - -/* Create a slice by copying a string. - Does not preserve null terminators. - Equivalent to: - size_t len = strlen(source); - gpr_slice slice = gpr_slice_malloc(len); - memcpy(slice->data, source, len); */ -GPRAPI gpr_slice gpr_slice_from_copied_string(const char *source); - -/* Create a slice by copying a buffer. - Equivalent to: - gpr_slice slice = gpr_slice_malloc(len); - memcpy(slice->data, source, len); */ -GPRAPI gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len); - -/* Create a slice pointing to constant memory */ -GPRAPI gpr_slice gpr_slice_from_static_string(const char *source); - -/* Return a result slice derived from s, which shares a ref count with s, where - result.data==s.data+begin, and result.length==end-begin. - The ref count of s is increased by one. - Requires s initialized, begin <= end, begin <= s.length, and - end <= source->length. */ -GPRAPI gpr_slice gpr_slice_sub(gpr_slice s, size_t begin, size_t end); - -/* The same as gpr_slice_sub, but without altering the ref count */ -GPRAPI gpr_slice gpr_slice_sub_no_ref(gpr_slice s, size_t begin, size_t end); - -/* Splits s into two: modifies s to be s[0:split], and returns a new slice, - sharing a refcount with s, that contains s[split:s.length]. - Requires s intialized, split <= s.length */ -GPRAPI gpr_slice gpr_slice_split_tail(gpr_slice *s, size_t split); - -/* Splits s into two: modifies s to be s[split:s.length], and returns a new - slice, sharing a refcount with s, that contains s[0:split]. - Requires s intialized, split <= s.length */ -GPRAPI gpr_slice gpr_slice_split_head(gpr_slice *s, size_t split); - -GPRAPI gpr_slice gpr_empty_slice(void); - -/* Returns <0 if a < b, ==0 if a == b, >0 if a > b - The order is arbitrary, and is not guaranteed to be stable across different - versions of the API. */ -GPRAPI int gpr_slice_cmp(gpr_slice a, gpr_slice b); -GPRAPI int gpr_slice_str_cmp(gpr_slice a, const char *b); - -#ifdef __cplusplus -} -#endif - -#endif /* GRPC_SUPPORT_SLICE_H */ diff --git a/include/grpc/support/slice_buffer.h b/include/grpc/support/slice_buffer.h deleted file mode 100644 index 3920432b02..0000000000 --- a/include/grpc/support/slice_buffer.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * - * Copyright 2015, 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. - * - */ - -#ifndef GRPC_SUPPORT_SLICE_BUFFER_H -#define GRPC_SUPPORT_SLICE_BUFFER_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* initialize a slice buffer */ -GPRAPI void gpr_slice_buffer_init(gpr_slice_buffer *sb); -/* destroy a slice buffer - unrefs any held elements */ -GPRAPI void gpr_slice_buffer_destroy(gpr_slice_buffer *sb); -/* Add an element to a slice buffer - takes ownership of the slice. - This function is allowed to concatenate the passed in slice to the end of - some other slice if desired by the slice buffer. */ -GPRAPI void gpr_slice_buffer_add(gpr_slice_buffer *sb, gpr_slice slice); -/* add an element to a slice buffer - takes ownership of the slice and returns - the index of the slice. - Guarantees that the slice will not be concatenated at the end of another - slice (i.e. the data for this slice will begin at the first byte of the - slice at the returned index in sb->slices) - The implementation MAY decide to concatenate data at the end of a small - slice added in this fashion. */ -GPRAPI size_t gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb, - gpr_slice slice); -GPRAPI void gpr_slice_buffer_addn(gpr_slice_buffer *sb, gpr_slice *slices, - size_t n); -/* add a very small (less than 8 bytes) amount of data to the end of a slice - buffer: returns a pointer into which to add the data */ -GPRAPI uint8_t *gpr_slice_buffer_tiny_add(gpr_slice_buffer *sb, size_t len); -/* pop the last buffer, but don't unref it */ -GPRAPI void gpr_slice_buffer_pop(gpr_slice_buffer *sb); -/* clear a slice buffer, unref all elements */ -GPRAPI void gpr_slice_buffer_reset_and_unref(gpr_slice_buffer *sb); -/* swap the contents of two slice buffers */ -GPRAPI void gpr_slice_buffer_swap(gpr_slice_buffer *a, gpr_slice_buffer *b); -/* move all of the elements of src into dst */ -GPRAPI void gpr_slice_buffer_move_into(gpr_slice_buffer *src, - gpr_slice_buffer *dst); -/* remove n bytes from the end of a slice buffer */ -GPRAPI void gpr_slice_buffer_trim_end(gpr_slice_buffer *src, size_t n, - gpr_slice_buffer *garbage); -/* move the first n bytes of src into dst */ -GPRAPI void gpr_slice_buffer_move_first(gpr_slice_buffer *src, size_t n, - gpr_slice_buffer *dst); -/* take the first slice in the slice buffer */ -GPRAPI gpr_slice gpr_slice_buffer_take_first(gpr_slice_buffer *src); - -#ifdef __cplusplus -} -#endif - -#endif /* GRPC_SUPPORT_SLICE_BUFFER_H */ diff --git a/src/core/ext/client_channel/connector.h b/src/core/ext/client_channel/connector.h index e08244b2c0..3c2cf7877f 100644 --- a/src/core/ext/client_channel/connector.h +++ b/src/core/ext/client_channel/connector.h @@ -52,7 +52,7 @@ typedef struct { const struct sockaddr *addr; size_t addr_len; /** initial connect string to send */ - gpr_slice initial_connect_string; + grpc_slice initial_connect_string; /** deadline for connection */ gpr_timespec deadline; /** channel arguments (to be passed to transport) */ diff --git a/src/core/ext/client_channel/default_initial_connect_string.c b/src/core/ext/client_channel/default_initial_connect_string.c index a70da4a84a..784173f0e2 100644 --- a/src/core/ext/client_channel/default_initial_connect_string.c +++ b/src/core/ext/client_channel/default_initial_connect_string.c @@ -36,4 +36,4 @@ void grpc_set_default_initial_connect_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *initial_str) {} + grpc_slice *initial_str) {} diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index ea2cbbdd97..9c175af09a 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -60,8 +60,8 @@ typedef struct http_connect_handshaker { void* user_data; // Objects for processing the HTTP CONNECT request and response. - gpr_slice_buffer write_buffer; - gpr_slice_buffer* read_buffer; // Ownership passes through this object. + grpc_slice_buffer write_buffer; + grpc_slice_buffer* read_buffer; // Ownership passes through this object. grpc_closure request_done_closure; grpc_closure response_read_closure; grpc_http_parser http_parser; @@ -76,7 +76,7 @@ static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) { if (gpr_unref(&handshaker->refcount)) { gpr_free(handshaker->proxy_server); gpr_free(handshaker->server_name); - gpr_slice_buffer_destroy(&handshaker->write_buffer); + grpc_slice_buffer_destroy(&handshaker->write_buffer); grpc_http_parser_destroy(&handshaker->http_parser); grpc_http_response_destroy(&handshaker->http_response); gpr_free(handshaker); @@ -129,20 +129,20 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_timer_cancel(exec_ctx, &handshaker->timeout_timer); // Remove the data we've already read from the read buffer, // leaving only the leftover bytes (if any). - gpr_slice_buffer tmp_buffer; - gpr_slice_buffer_init(&tmp_buffer); + grpc_slice_buffer tmp_buffer; + grpc_slice_buffer_init(&tmp_buffer); if (body_start_offset < GPR_SLICE_LENGTH(handshaker->read_buffer->slices[i])) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &tmp_buffer, - gpr_slice_split_tail(&handshaker->read_buffer->slices[i], + grpc_slice_split_tail(&handshaker->read_buffer->slices[i], body_start_offset)); } - gpr_slice_buffer_addn(&tmp_buffer, + grpc_slice_buffer_addn(&tmp_buffer, &handshaker->read_buffer->slices[i + 1], handshaker->read_buffer->count - i - 1); - gpr_slice_buffer_swap(handshaker->read_buffer, &tmp_buffer); - gpr_slice_buffer_destroy(&tmp_buffer); + grpc_slice_buffer_swap(handshaker->read_buffer, &tmp_buffer); + grpc_slice_buffer_destroy(&tmp_buffer); break; } } @@ -159,7 +159,7 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, // complete (e.g., handling chunked transfer encoding or looking // at the Content-Length: header). if (handshaker->http_parser.state != GRPC_HTTP_BODY) { - gpr_slice_buffer_reset_and_unref(handshaker->read_buffer); + grpc_slice_buffer_reset_and_unref(handshaker->read_buffer); grpc_endpoint_read(exec_ctx, handshaker->endpoint, handshaker->read_buffer, &handshaker->response_read_closure); return; @@ -195,7 +195,7 @@ static void http_connect_handshaker_shutdown(grpc_exec_ctx* exec_ctx, static void http_connect_handshaker_do_handshake( grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker_in, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, gpr_timespec deadline, + grpc_slice_buffer* read_buffer, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, void* user_data) { http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; @@ -214,8 +214,8 @@ static void http_connect_handshaker_do_handshake( request.http.method = "CONNECT"; request.http.path = handshaker->server_name; request.handshaker = &grpc_httpcli_plaintext; - gpr_slice request_slice = grpc_httpcli_format_connect_request(&request); - gpr_slice_buffer_add(&handshaker->write_buffer, request_slice); + grpc_slice request_slice = grpc_httpcli_format_connect_request(&request); + grpc_slice_buffer_add(&handshaker->write_buffer, request_slice); grpc_endpoint_write(exec_ctx, endpoint, &handshaker->write_buffer, &handshaker->request_done_closure); // Set timeout timer. The timer gets a reference to the handshaker. @@ -239,7 +239,7 @@ grpc_handshaker* grpc_http_connect_handshaker_create(const char* proxy_server, grpc_handshaker_init(&http_connect_handshaker_vtable, &handshaker->base); handshaker->proxy_server = gpr_strdup(proxy_server); handshaker->server_name = gpr_strdup(server_name); - gpr_slice_buffer_init(&handshaker->write_buffer); + grpc_slice_buffer_init(&handshaker->write_buffer); grpc_closure_init(&handshaker->request_done_closure, on_write_done, handshaker); grpc_closure_init(&handshaker->response_read_closure, on_read_done, diff --git a/src/core/ext/client_channel/initial_connect_string.c b/src/core/ext/client_channel/initial_connect_string.c index fd8ddb83a8..8737b330a8 100644 --- a/src/core/ext/client_channel/initial_connect_string.c +++ b/src/core/ext/client_channel/initial_connect_string.c @@ -37,7 +37,7 @@ extern void grpc_set_default_initial_connect_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *initial_str); + grpc_slice *initial_str); static grpc_set_initial_connect_string_func g_set_initial_connect_string_func = grpc_set_default_initial_connect_string; @@ -48,6 +48,6 @@ void grpc_test_set_initial_connect_string_function( } void grpc_set_initial_connect_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *initial_str) { + grpc_slice *initial_str) { g_set_initial_connect_string_func(addr, addr_len, initial_str); } diff --git a/src/core/ext/client_channel/initial_connect_string.h b/src/core/ext/client_channel/initial_connect_string.h index 39f6465fc9..4cfe8b5fe7 100644 --- a/src/core/ext/client_channel/initial_connect_string.h +++ b/src/core/ext/client_channel/initial_connect_string.h @@ -39,12 +39,12 @@ typedef void (*grpc_set_initial_connect_string_func)(struct sockaddr **addr, size_t *addr_len, - gpr_slice *initial_str); + grpc_slice *initial_str); void grpc_test_set_initial_connect_string_function( grpc_set_initial_connect_string_func func); /** Set a string to be sent once connected. Optionally reset addr. */ void grpc_set_initial_connect_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *connect_string); + grpc_slice *connect_string); #endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H */ diff --git a/src/core/ext/client_channel/subchannel.c b/src/core/ext/client_channel/subchannel.c index 672e5c3a91..8d4a457e60 100644 --- a/src/core/ext/client_channel/subchannel.c +++ b/src/core/ext/client_channel/subchannel.c @@ -101,7 +101,7 @@ struct grpc_subchannel { grpc_subchannel_key *key; /** initial string to send to peer */ - gpr_slice initial_connect_string; + grpc_slice initial_connect_string; /** set during connection */ grpc_connect_out_args connecting_result; @@ -206,7 +206,7 @@ static void subchannel_destroy(grpc_exec_ctx *exec_ctx, void *arg, gpr_free((void *)c->filters); grpc_channel_args_destroy(c->args); gpr_free(c->addr); - gpr_slice_unref(c->initial_connect_string); + grpc_slice_unref(c->initial_connect_string); grpc_connectivity_state_destroy(exec_ctx, &c->state_tracker); grpc_connector_unref(exec_ctx, c->connector); grpc_pollset_set_destroy(c->pollset_set); diff --git a/src/core/ext/client_channel/uri_parser.c b/src/core/ext/client_channel/uri_parser.c index bcb6a1dee4..7bdc5373d9 100644 --- a/src/core/ext/client_channel/uri_parser.c +++ b/src/core/ext/client_channel/uri_parser.c @@ -148,20 +148,20 @@ static void parse_query_parts(grpc_uri *uri) { uri->num_query_parts = 0; return; } - gpr_slice query_slice = - gpr_slice_new(uri->query, strlen(uri->query), do_nothing); - gpr_slice_buffer query_parts; /* the &-separated elements of the query */ - gpr_slice_buffer query_param_parts; /* the =-separated subelements */ + grpc_slice query_slice = + grpc_slice_new(uri->query, strlen(uri->query), do_nothing); + grpc_slice_buffer query_parts; /* the &-separated elements of the query */ + grpc_slice_buffer query_param_parts; /* the =-separated subelements */ - gpr_slice_buffer_init(&query_parts); - gpr_slice_buffer_init(&query_param_parts); + grpc_slice_buffer_init(&query_parts); + grpc_slice_buffer_init(&query_param_parts); - gpr_slice_split(query_slice, QUERY_PARTS_SEPARATOR, &query_parts); + grpc_slice_split(query_slice, QUERY_PARTS_SEPARATOR, &query_parts); uri->query_parts = gpr_malloc(query_parts.count * sizeof(char *)); uri->query_parts_values = gpr_malloc(query_parts.count * sizeof(char *)); uri->num_query_parts = query_parts.count; for (size_t i = 0; i < query_parts.count; i++) { - gpr_slice_split(query_parts.slices[i], QUERY_PARTS_VALUE_SEPARATOR, + grpc_slice_split(query_parts.slices[i], QUERY_PARTS_VALUE_SEPARATOR, &query_param_parts); GPR_ASSERT(query_param_parts.count > 0); uri->query_parts[i] = @@ -175,11 +175,11 @@ static void parse_query_parts(grpc_uri *uri) { } else { uri->query_parts_values[i] = NULL; } - gpr_slice_buffer_reset_and_unref(&query_param_parts); + grpc_slice_buffer_reset_and_unref(&query_param_parts); } - gpr_slice_buffer_destroy(&query_parts); - gpr_slice_buffer_destroy(&query_param_parts); - gpr_slice_unref(query_slice); + grpc_slice_buffer_destroy(&query_parts); + grpc_slice_buffer_destroy(&query_param_parts); + grpc_slice_unref(query_slice); } grpc_uri *grpc_uri_parse(const char *uri_text, int suppress_errors) { diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 412090158a..3c2b87f2cb 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -952,10 +952,10 @@ static lb_client_data *lb_client_data_create(glb_lb_policy *glb_policy) { grpc_grpclb_request *request = grpc_grpclb_request_create(glb_policy->server_name); - gpr_slice request_payload_slice = grpc_grpclb_request_encode(request); + grpc_slice request_payload_slice = grpc_grpclb_request_encode(request); lb_client->request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); - gpr_slice_unref(request_payload_slice); + grpc_slice_unref(request_payload_slice); grpc_grpclb_request_destroy(request); lb_client->status_details = NULL; @@ -1072,12 +1072,12 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { * lb_client->response_payload, for a serverlist. */ grpc_byte_buffer_reader bbr; grpc_byte_buffer_reader_init(&bbr, lb_client->response_payload); - gpr_slice response_slice = grpc_byte_buffer_reader_readall(&bbr); + grpc_slice response_slice = grpc_byte_buffer_reader_readall(&bbr); grpc_byte_buffer_destroy(lb_client->response_payload); grpc_grpclb_serverlist *serverlist = grpc_grpclb_response_parse_serverlist(response_slice); if (serverlist != NULL) { - gpr_slice_unref(response_slice); + grpc_slice_unref(response_slice); if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Serverlist with %lu servers received", (unsigned long)serverlist->num_servers); @@ -1136,7 +1136,7 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(serverlist == NULL); gpr_log(GPR_ERROR, "Invalid LB response received: '%s'", gpr_dump_slice(response_slice, GPR_DUMP_ASCII)); - gpr_slice_unref(response_slice); + grpc_slice_unref(response_slice); /* Disconnect from server returning invalid response. */ op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.c b/src/core/ext/lb_policy/grpclb/load_balancer_api.c index a8881004a0..f3860d119d 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.c +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.c @@ -90,16 +90,16 @@ grpc_grpclb_request *grpc_grpclb_request_create(const char *lb_service_name) { return req; } -gpr_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request) { +grpc_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request) { size_t encoded_length; pb_ostream_t sizestream; pb_ostream_t outputstream; - gpr_slice slice; + grpc_slice slice; memset(&sizestream, 0, sizeof(pb_ostream_t)); pb_encode(&sizestream, grpc_lb_v1_LoadBalanceRequest_fields, request); encoded_length = sizestream.bytes_written; - slice = gpr_slice_malloc(encoded_length); + slice = grpc_slice_malloc(encoded_length); outputstream = pb_ostream_from_buffer(GPR_SLICE_START_PTR(slice), encoded_length); GPR_ASSERT(pb_encode(&outputstream, grpc_lb_v1_LoadBalanceRequest_fields, @@ -113,7 +113,7 @@ void grpc_grpclb_request_destroy(grpc_grpclb_request *request) { typedef grpc_lb_v1_LoadBalanceResponse grpc_grpclb_response; grpc_grpclb_initial_response *grpc_grpclb_initial_response_parse( - gpr_slice encoded_grpc_grpclb_response) { + grpc_slice encoded_grpc_grpclb_response) { pb_istream_t stream = pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_grpc_grpclb_response), GPR_SLICE_LENGTH(encoded_grpc_grpclb_response)); @@ -132,7 +132,7 @@ grpc_grpclb_initial_response *grpc_grpclb_initial_response_parse( } grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist( - gpr_slice encoded_grpc_grpclb_response) { + grpc_slice encoded_grpc_grpclb_response) { bool status; decode_serverlist_arg arg; pb_istream_t stream = diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/lb_policy/grpclb/load_balancer_api.h index 079a64a3f3..235ccf6cb4 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.h +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.h @@ -60,7 +60,7 @@ typedef struct grpc_grpclb_serverlist { grpc_grpclb_request *grpc_grpclb_request_create(const char *lb_service_name); /** Protocol Buffers v3-encode \a request */ -gpr_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request); +grpc_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request); /** Destroy \a request */ void grpc_grpclb_request_destroy(grpc_grpclb_request *request); @@ -68,11 +68,11 @@ void grpc_grpclb_request_destroy(grpc_grpclb_request *request); /** Parse (ie, decode) the bytes in \a encoded_grpc_grpclb_response as a \a * grpc_grpclb_initial_response */ grpc_grpclb_initial_response *grpc_grpclb_initial_response_parse( - gpr_slice encoded_grpc_grpclb_response); + grpc_slice encoded_grpc_grpclb_response); /** Parse the list of servers from an encoded \a grpc_grpclb_response */ grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist( - gpr_slice encoded_grpc_grpclb_response); + grpc_slice encoded_grpc_grpclb_response); /** Return a copy of \a sl. The caller is responsible for calling \a * grpc_grpclb_destroy_serverlist on the returned copy. */ diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 9924fc6fec..cd0c45e407 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -169,11 +169,11 @@ static grpc_resolver *sockaddr_create(grpc_resolver_args *args, return NULL; } /* Construct addresses. */ - gpr_slice path_slice = - gpr_slice_new(args->uri->path, strlen(args->uri->path), do_nothing); - gpr_slice_buffer path_parts; - gpr_slice_buffer_init(&path_parts); - gpr_slice_split(path_slice, ",", &path_parts); + grpc_slice path_slice = + grpc_slice_new(args->uri->path, strlen(args->uri->path), do_nothing); + grpc_slice_buffer path_parts; + grpc_slice_buffer_init(&path_parts); + grpc_slice_split(path_slice, ",", &path_parts); grpc_lb_addresses *addresses = grpc_lb_addresses_create(path_parts.count); bool errors_found = false; for (size_t i = 0; i < addresses->num_addresses; i++) { @@ -189,8 +189,8 @@ static grpc_resolver *sockaddr_create(grpc_resolver_args *args, gpr_free(part_str); if (errors_found) break; } - gpr_slice_buffer_destroy(&path_parts); - gpr_slice_unref(path_slice); + grpc_slice_buffer_destroy(&path_parts); + grpc_slice_unref(path_slice); if (errors_found) { grpc_lb_addresses_destroy(addresses, NULL /* user_data_destroy */); return NULL; diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 41432b54a9..eee38a0b90 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -60,7 +60,7 @@ typedef struct { grpc_connect_in_args args; grpc_connect_out_args *result; grpc_closure initial_string_sent; - gpr_slice_buffer initial_string_buffer; + grpc_slice_buffer initial_string_buffer; grpc_endpoint *tcp; @@ -90,7 +90,7 @@ static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, grpc_channel_args *args, - gpr_slice_buffer *read_buffer, void *user_data, + grpc_slice_buffer *read_buffer, void *user_data, grpc_error *error) { connector *c = user_data; if (error != GRPC_ERROR_NONE) { @@ -116,8 +116,8 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { if (!GPR_SLICE_IS_EMPTY(c->args.initial_connect_string)) { grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, c); - gpr_slice_buffer_init(&c->initial_string_buffer); - gpr_slice_buffer_add(&c->initial_string_buffer, + grpc_slice_buffer_init(&c->initial_string_buffer); + grpc_slice_buffer_add(&c->initial_string_buffer, c->args.initial_connect_string); connector_ref(arg); grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 2e6b3f2fc8..d396a1bc36 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -64,7 +64,7 @@ typedef struct { grpc_connect_in_args args; grpc_connect_out_args *result; grpc_closure initial_string_sent; - gpr_slice_buffer initial_string_buffer; + grpc_slice_buffer initial_string_buffer; gpr_mu mu; grpc_endpoint *connecting_endpoint; @@ -127,7 +127,7 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, grpc_channel_args *args, - gpr_slice_buffer *read_buffer, void *user_data, + grpc_slice_buffer *read_buffer, void *user_data, grpc_error *error) { connector *c = user_data; c->tmp_args = args; @@ -165,8 +165,8 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { if (!GPR_SLICE_IS_EMPTY(c->args.initial_connect_string)) { grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, c); - gpr_slice_buffer_init(&c->initial_string_buffer); - gpr_slice_buffer_add(&c->initial_string_buffer, + grpc_slice_buffer_init(&c->initial_string_buffer); + grpc_slice_buffer_add(&c->initial_string_buffer, c->args.initial_connect_string); grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, &c->initial_string_sent); diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index 2c64878c0c..e5b4025c5f 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -56,7 +56,7 @@ typedef struct server_connect_state { static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, grpc_channel_args *args, - gpr_slice_buffer *read_buffer, void *user_data, + grpc_slice_buffer *read_buffer, void *user_data, grpc_error *error) { server_connect_state *state = user_data; if (error != GRPC_ERROR_NONE) { diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 88afcb6dea..a998dddd37 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -117,7 +117,7 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *statep, static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, grpc_channel_args *args, - gpr_slice_buffer *read_buffer, void *user_data, + grpc_slice_buffer *read_buffer, void *user_data, grpc_error *error) { server_secure_connect *connection_state = user_data; if (error != GRPC_ERROR_NONE) { diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.c b/src/core/ext/transport/chttp2/transport/bin_decoder.c index 2d90b01cd8..d8948bdfdb 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.c @@ -142,11 +142,11 @@ bool grpc_base64_decode_partial(struct grpc_base64_decode_context *ctx) { return true; } -gpr_slice grpc_chttp2_base64_decode(gpr_slice input) { +grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { size_t input_length = GPR_SLICE_LENGTH(input); size_t output_length = input_length / 4 * 3; struct grpc_base64_decode_context ctx; - gpr_slice output; + grpc_slice output; if (input_length % 4 != 0) { gpr_log(GPR_ERROR, @@ -166,7 +166,7 @@ gpr_slice grpc_chttp2_base64_decode(gpr_slice input) { } } } - output = gpr_slice_malloc(output_length); + output = grpc_slice_malloc(output_length); ctx.input_cur = GPR_SLICE_START_PTR(input); ctx.input_end = GPR_SLICE_END_PTR(input); @@ -178,7 +178,7 @@ gpr_slice grpc_chttp2_base64_decode(gpr_slice input) { char *s = gpr_dump_slice(input, GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "Base64 decoding failed, input string:\n%s\n", s); gpr_free(s); - gpr_slice_unref(output); + grpc_slice_unref(output); return gpr_empty_slice(); } GPR_ASSERT(ctx.output_cur == GPR_SLICE_END_PTR(output)); @@ -186,10 +186,10 @@ gpr_slice grpc_chttp2_base64_decode(gpr_slice input) { return output; } -gpr_slice grpc_chttp2_base64_decode_with_length(gpr_slice input, +grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, size_t output_length) { size_t input_length = GPR_SLICE_LENGTH(input); - gpr_slice output = gpr_slice_malloc(output_length); + grpc_slice output = grpc_slice_malloc(output_length); struct grpc_base64_decode_context ctx; // The length of a base64 string cannot be 4 * n + 1 @@ -199,7 +199,7 @@ gpr_slice grpc_chttp2_base64_decode_with_length(gpr_slice input, "grpc_chttp2_base64_decode_with_length has a length of %d, which " "has a tail of 1 byte.\n", (int)input_length); - gpr_slice_unref(output); + grpc_slice_unref(output); return gpr_empty_slice(); } @@ -209,7 +209,7 @@ gpr_slice grpc_chttp2_base64_decode_with_length(gpr_slice input, "than the max possible output length %d.\n", (int)output_length, (int)(input_length / 4 * 3 + tail_xtra[input_length % 4])); - gpr_slice_unref(output); + grpc_slice_unref(output); return gpr_empty_slice(); } @@ -223,7 +223,7 @@ gpr_slice grpc_chttp2_base64_decode_with_length(gpr_slice input, char *s = gpr_dump_slice(input, GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "Base64 decoding failed, input string:\n%s\n", s); gpr_free(s); - gpr_slice_unref(output); + grpc_slice_unref(output); return gpr_empty_slice(); } GPR_ASSERT(ctx.output_cur == GPR_SLICE_END_PTR(output)); diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h index b9d40c9b74..c416608a0b 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h @@ -55,12 +55,12 @@ bool grpc_base64_decode_partial(struct grpc_base64_decode_context *ctx); /* base64 decode a slice with pad chars. Returns a new slice, does not take ownership of the input. Returns an empty slice if decoding is failed. */ -gpr_slice grpc_chttp2_base64_decode(gpr_slice input); +grpc_slice grpc_chttp2_base64_decode(grpc_slice input); /* base64 decode a slice without pad chars, data length is needed. Returns a new slice, does not take ownership of the input. Returns an empty slice if decoding is failed. */ -gpr_slice grpc_chttp2_base64_decode_with_length(gpr_slice input, +grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, size_t output_length); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */ diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.c b/src/core/ext/transport/chttp2/transport/bin_encoder.c index 1b43c28be1..09b961533a 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.c @@ -61,12 +61,12 @@ static const b64_huff_sym huff_alphabet[64] = { static const uint8_t tail_xtra[3] = {0, 2, 3}; -gpr_slice grpc_chttp2_base64_encode(gpr_slice input) { +grpc_slice grpc_chttp2_base64_encode(grpc_slice input) { size_t input_length = GPR_SLICE_LENGTH(input); size_t input_triplets = input_length / 3; size_t tail_case = input_length % 3; size_t output_length = input_triplets * 4 + tail_xtra[tail_case]; - gpr_slice output = gpr_slice_malloc(output_length); + grpc_slice output = grpc_slice_malloc(output_length); uint8_t *in = GPR_SLICE_START_PTR(input); char *out = (char *)GPR_SLICE_START_PTR(output); size_t i; @@ -105,11 +105,11 @@ gpr_slice grpc_chttp2_base64_encode(gpr_slice input) { return output; } -gpr_slice grpc_chttp2_huffman_compress(gpr_slice input) { +grpc_slice grpc_chttp2_huffman_compress(grpc_slice input) { size_t nbits; uint8_t *in; uint8_t *out; - gpr_slice output; + grpc_slice output; uint32_t temp = 0; uint32_t temp_length = 0; @@ -118,7 +118,7 @@ gpr_slice grpc_chttp2_huffman_compress(gpr_slice input) { nbits += grpc_chttp2_huffsyms[*in].length; } - output = gpr_slice_malloc(nbits / 8 + (nbits % 8 != 0)); + output = grpc_slice_malloc(nbits / 8 + (nbits % 8 != 0)); out = GPR_SLICE_START_PTR(output); for (in = GPR_SLICE_START_PTR(input); in != GPR_SLICE_END_PTR(input); ++in) { int sym = *in; @@ -175,14 +175,14 @@ static void enc_add1(huff_out *out, uint8_t a) { enc_flush_some(out); } -gpr_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(gpr_slice input) { +grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input) { size_t input_length = GPR_SLICE_LENGTH(input); size_t input_triplets = input_length / 3; size_t tail_case = input_length % 3; size_t output_syms = input_triplets * 4 + tail_xtra[tail_case]; size_t max_output_bits = 11 * output_syms; size_t max_output_length = max_output_bits / 8 + (max_output_bits % 8 != 0); - gpr_slice output = gpr_slice_malloc(max_output_length); + grpc_slice output = grpc_slice_malloc(max_output_length); uint8_t *in = GPR_SLICE_START_PTR(input); uint8_t *start_out = GPR_SLICE_START_PTR(output); huff_out out; diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h index 61ebbafa9a..878390cde6 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h @@ -38,17 +38,17 @@ /* base64 encode a slice. Returns a new slice, does not take ownership of the input */ -gpr_slice grpc_chttp2_base64_encode(gpr_slice input); +grpc_slice grpc_chttp2_base64_encode(grpc_slice input); /* Compress a slice with the static huffman encoder detailed in the hpack standard. Returns a new slice, does not take ownership of the input */ -gpr_slice grpc_chttp2_huffman_compress(gpr_slice input); +grpc_slice grpc_chttp2_huffman_compress(grpc_slice input); /* equivalent to: - gpr_slice x = grpc_chttp2_base64_encode(input); - gpr_slice y = grpc_chttp2_huffman_compress(x); - gpr_slice_unref(x); + grpc_slice x = grpc_chttp2_base64_encode(input); + grpc_slice y = grpc_chttp2_huffman_compress(x); + grpc_slice_unref(x); return y; */ -gpr_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(gpr_slice input); +grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */ diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 562f498d88..3a551d449b 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -143,12 +143,12 @@ static void destruct_transport(grpc_exec_ctx *exec_ctx, grpc_endpoint_destroy(exec_ctx, t->ep); - gpr_slice_buffer_destroy(&t->qbuf); + grpc_slice_buffer_destroy(&t->qbuf); - gpr_slice_buffer_destroy(&t->outbuf); + grpc_slice_buffer_destroy(&t->outbuf); grpc_chttp2_hpack_compressor_destroy(&t->hpack_compressor); - gpr_slice_buffer_destroy(&t->read_buffer); + grpc_slice_buffer_destroy(&t->read_buffer); grpc_chttp2_hpack_parser_destroy(&t->hpack_parser); grpc_chttp2_goaway_parser_destroy(&t->goaway_parser); @@ -243,9 +243,9 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, &t->channel_callback.state_tracker, GRPC_CHANNEL_READY, is_client ? "client_transport" : "server_transport"); - gpr_slice_buffer_init(&t->qbuf); + grpc_slice_buffer_init(&t->qbuf); - gpr_slice_buffer_init(&t->outbuf); + grpc_slice_buffer_init(&t->outbuf); grpc_chttp2_hpack_compressor_init(&t->hpack_compressor); grpc_closure_init(&t->write_action_begin_locked, write_action_begin_locked, @@ -264,7 +264,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_goaway_parser_init(&t->goaway_parser); grpc_chttp2_hpack_parser_init(&t->hpack_parser); - gpr_slice_buffer_init(&t->read_buffer); + grpc_slice_buffer_init(&t->read_buffer); /* 8 is a random stab in the dark as to a good initial size: it's small enough that it shouldn't waste memory for infrequently used connections, yet @@ -286,7 +286,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, t->sent_local_settings = 0; if (is_client) { - gpr_slice_buffer_add(&t->outbuf, gpr_slice_from_copied_string( + grpc_slice_buffer_add(&t->outbuf, grpc_slice_from_copied_string( GRPC_CHTTP2_CLIENT_CONNECT_STRING)); grpc_chttp2_initiate_write(exec_ctx, t, false, "initial_write"); } @@ -471,7 +471,7 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_chttp2_incoming_metadata_buffer_init(&s->metadata_buffer[0]); grpc_chttp2_incoming_metadata_buffer_init(&s->metadata_buffer[1]); grpc_chttp2_data_parser_init(&s->data_parser); - gpr_slice_buffer_init(&s->flow_controlled_buffer); + grpc_slice_buffer_init(&s->flow_controlled_buffer); s->deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); grpc_closure_init(&s->complete_fetch, complete_fetch, s); grpc_closure_init(&s->complete_fetch_locked, complete_fetch_locked, s); @@ -531,7 +531,7 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, void *sp, grpc_chttp2_data_parser_destroy(exec_ctx, &s->data_parser); grpc_chttp2_incoming_metadata_buffer_destroy(&s->metadata_buffer[0]); grpc_chttp2_incoming_metadata_buffer_destroy(&s->metadata_buffer[1]); - gpr_slice_buffer_destroy(&s->flow_controlled_buffer); + grpc_slice_buffer_destroy(&s->flow_controlled_buffer); GRPC_ERROR_UNREF(s->read_closed_error); GRPC_ERROR_UNREF(s->write_closed_error); @@ -756,11 +756,11 @@ static void push_setting(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, void grpc_chttp2_add_incoming_goaway(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, uint32_t goaway_error, - gpr_slice goaway_text) { + grpc_slice goaway_text) { char *msg = gpr_dump_slice(goaway_text, GPR_DUMP_HEX | GPR_DUMP_ASCII); GRPC_CHTTP2_IF_TRACING( gpr_log(GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg)); - gpr_slice_unref(goaway_text); + grpc_slice_unref(goaway_text); t->seen_goaway = 1; /* lie: use transient failure from the transport to indicate goaway has been * received */ @@ -924,7 +924,7 @@ static void add_fetched_slice_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream *s) { s->fetched_send_message_length += (uint32_t)GPR_SLICE_LENGTH(s->fetching_slice); - gpr_slice_buffer_add(&s->flow_controlled_buffer, s->fetching_slice); + grpc_slice_buffer_add(&s->flow_controlled_buffer, s->fetching_slice); if (s->id != 0) { grpc_chttp2_become_writable(exec_ctx, t, s, true, "op.send_message"); } @@ -1052,7 +1052,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, } else { GPR_ASSERT(s->fetching_send_message == NULL); uint8_t *frame_hdr = - gpr_slice_buffer_tiny_add(&s->flow_controlled_buffer, 5); + grpc_slice_buffer_tiny_add(&s->flow_controlled_buffer, 5); uint32_t flags = op->send_message->flags; frame_hdr[0] = (flags & GRPC_WRITE_INTERNAL_COMPRESS) != 0; size_t len = op->send_message->length; @@ -1192,7 +1192,7 @@ static void send_ping_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, p->id[7] = (uint8_t)(t->ping_counter & 0xff); t->ping_counter++; p->on_recv = on_recv; - gpr_slice_buffer_add(&t->qbuf, grpc_chttp2_ping_create(0, p->id)); + grpc_slice_buffer_add(&t->qbuf, grpc_chttp2_ping_create(0, p->id)); grpc_chttp2_initiate_write(exec_ctx, t, true, "send_ping"); } @@ -1216,7 +1216,7 @@ void grpc_chttp2_ack_ping(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } static void send_goaway(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - grpc_chttp2_error_code error, gpr_slice data) { + grpc_chttp2_error_code error, grpc_slice data) { t->sent_goaway_state = GRPC_CHTTP2_GOAWAY_SEND_SCHEDULED; grpc_chttp2_goaway_append(t->last_new_stream_id, (uint32_t)error, data, &t->qbuf); @@ -1239,7 +1239,7 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, if (op->send_goaway) { send_goaway(exec_ctx, t, grpc_chttp2_grpc_status_to_http2_error(op->goaway_status), - gpr_slice_ref(*op->goaway_message)); + grpc_slice_ref(*op->goaway_message)); } if (op->set_accept_stream) { @@ -1428,7 +1428,7 @@ void grpc_chttp2_cancel_stream(grpc_exec_ctx *exec_ctx, &grpc_status); if (s->id != 0) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->qbuf, grpc_chttp2_rst_stream_create(s->id, (uint32_t)http_error, &s->stats.outgoing)); grpc_chttp2_initiate_write(exec_ctx, t, false, "rst_stream"); @@ -1441,7 +1441,7 @@ void grpc_chttp2_cancel_stream(grpc_exec_ctx *exec_ctx, free_msg = true; msg = grpc_error_string(due_to_error); } - gpr_slice msg_slice = gpr_slice_from_copied_string(msg); + grpc_slice msg_slice = grpc_slice_from_copied_string(msg); grpc_chttp2_fake_status(exec_ctx, t, s, grpc_status, &msg_slice); if (free_msg) grpc_error_free_string(msg); } @@ -1454,7 +1454,7 @@ void grpc_chttp2_cancel_stream(grpc_exec_ctx *exec_ctx, void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_status_code status, - gpr_slice *slice) { + grpc_slice *slice) { if (status != GRPC_STATUS_OK) { s->seen_error = true; } @@ -1477,13 +1477,13 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, &s->metadata_buffer[1], grpc_mdelem_from_metadata_strings( GRPC_MDSTR_GRPC_MESSAGE, - grpc_mdstr_from_slice(gpr_slice_ref(*slice)))); + grpc_mdstr_from_slice(grpc_slice_ref(*slice)))); } s->published_metadata[1] = GRPC_METADATA_SYNTHESIZED_FROM_FAKE; grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s); } if (slice) { - gpr_slice_unref(*slice); + grpc_slice_unref(*slice); } } @@ -1580,9 +1580,9 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx, static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_error *error) { - gpr_slice hdr; - gpr_slice status_hdr; - gpr_slice message_pfx; + grpc_slice hdr; + grpc_slice status_hdr; + grpc_slice message_pfx; uint8_t *p; uint32_t len = 0; grpc_status_code grpc_status; @@ -1601,7 +1601,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, time we got around to sending this, so instead we ignore HPACK compression and just write the uncompressed bytes onto the wire. */ - status_hdr = gpr_slice_malloc(15 + (grpc_status >= 10)); + status_hdr = grpc_slice_malloc(15 + (grpc_status >= 10)); p = GPR_SLICE_START_PTR(status_hdr); *p++ = 0x40; /* literal header */ *p++ = 11; /* len(grpc-status) */ @@ -1633,7 +1633,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, if (optional_message != NULL) { size_t msg_len = strlen(optional_message); GPR_ASSERT(msg_len < 127); - message_pfx = gpr_slice_malloc(15); + message_pfx = grpc_slice_malloc(15); p = GPR_SLICE_START_PTR(message_pfx); *p++ = 0x40; *p++ = 12; /* len(grpc-message) */ @@ -1655,7 +1655,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, len += (uint32_t)msg_len; } - hdr = gpr_slice_malloc(9); + hdr = grpc_slice_malloc(9); p = GPR_SLICE_START_PTR(hdr); *p++ = (uint8_t)(len >> 16); *p++ = (uint8_t)(len >> 8); @@ -1668,14 +1668,14 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, *p++ = (uint8_t)(s->id); GPR_ASSERT(p == GPR_SLICE_END_PTR(hdr)); - gpr_slice_buffer_add(&t->qbuf, hdr); - gpr_slice_buffer_add(&t->qbuf, status_hdr); + grpc_slice_buffer_add(&t->qbuf, hdr); + grpc_slice_buffer_add(&t->qbuf, status_hdr); if (optional_message) { - gpr_slice_buffer_add(&t->qbuf, message_pfx); - gpr_slice_buffer_add(&t->qbuf, - gpr_slice_from_copied_string(optional_message)); + grpc_slice_buffer_add(&t->qbuf, message_pfx); + grpc_slice_buffer_add(&t->qbuf, + grpc_slice_from_copied_string(optional_message)); } - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->qbuf, grpc_chttp2_rst_stream_create(s->id, GRPC_CHTTP2_NO_ERROR, &s->stats.outgoing)); } @@ -1686,7 +1686,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, free_msg = true; msg = grpc_error_string(error); } - gpr_slice msg_slice = gpr_slice_from_copied_string(msg); + grpc_slice msg_slice = grpc_slice_from_copied_string(msg); grpc_chttp2_fake_status(exec_ctx, t, s, grpc_status, &msg_slice); if (free_msg) grpc_error_free_string(msg); @@ -1857,7 +1857,7 @@ static void read_action_locked(grpc_exec_ctx *exec_ctx, void *tp, keep_reading = true; GRPC_CHTTP2_REF_TRANSPORT(t, "keep_reading"); } - gpr_slice_buffer_reset_and_unref(&t->read_buffer); + grpc_slice_buffer_reset_and_unref(&t->read_buffer); if (keep_reading) { grpc_endpoint_read(exec_ctx, t->ep, &t->read_buffer, &t->read_action_begin); @@ -1911,7 +1911,7 @@ static void incoming_byte_stream_unref(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs) { if (gpr_unref(&bs->refs)) { GRPC_ERROR_UNREF(bs->error); - gpr_slice_buffer_destroy(&bs->slices); + grpc_slice_buffer_destroy(&bs->slices); gpr_mu_destroy(&bs->slice_mu); gpr_free(bs); } @@ -1973,7 +1973,7 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx *exec_ctx, } gpr_mu_lock(&bs->slice_mu); if (bs->slices.count > 0) { - *bs->next_action.slice = gpr_slice_buffer_take_first(&bs->slices); + *bs->next_action.slice = grpc_slice_buffer_take_first(&bs->slices); grpc_closure_run(exec_ctx, bs->next_action.on_complete, GRPC_ERROR_NONE); } else if (bs->error != GRPC_ERROR_NONE) { grpc_closure_run(exec_ctx, bs->next_action.on_complete, @@ -1988,7 +1988,7 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx *exec_ctx, static int incoming_byte_stream_next(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, - gpr_slice *slice, size_t max_size_hint, + grpc_slice *slice, size_t max_size_hint, grpc_closure *on_complete) { GPR_TIMER_BEGIN("incoming_byte_stream_next", 0); grpc_chttp2_incoming_byte_stream *bs = @@ -2041,7 +2041,7 @@ static void incoming_byte_stream_publish_error( void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, - gpr_slice slice) { + grpc_slice slice) { gpr_mu_lock(&bs->slice_mu); if (bs->remaining_bytes < GPR_SLICE_LENGTH(slice)) { incoming_byte_stream_publish_error( @@ -2053,7 +2053,7 @@ void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, grpc_exec_ctx_sched(exec_ctx, bs->on_next, GRPC_ERROR_NONE, NULL); bs->on_next = NULL; } else { - gpr_slice_buffer_add(&bs->slices, slice); + grpc_slice_buffer_add(&bs->slices, slice); } } gpr_mu_unlock(&bs->slice_mu); @@ -2091,7 +2091,7 @@ grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( incoming_byte_stream->transport = t; incoming_byte_stream->stream = s; gpr_ref(&incoming_byte_stream->stream->active_streams); - gpr_slice_buffer_init(&incoming_byte_stream->slices); + grpc_slice_buffer_init(&incoming_byte_stream->slices); incoming_byte_stream->on_next = NULL; incoming_byte_stream->is_tail = 1; incoming_byte_stream->error = GRPC_ERROR_NONE; @@ -2159,7 +2159,7 @@ static void benign_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, t->peer_string); } send_goaway(exec_ctx, t, GRPC_CHTTP2_ENHANCE_YOUR_CALM, - gpr_slice_from_static_string("Buffers full")); + grpc_slice_from_static_string("Buffers full")); } else if (error == GRPC_ERROR_NONE && grpc_resource_quota_trace) { gpr_log(GPR_DEBUG, "HTTP2: %s - skip benign reclamation, there are still %" PRIdPTR @@ -2310,12 +2310,12 @@ grpc_transport *grpc_create_chttp2_transport( void grpc_chttp2_transport_start_reading(grpc_exec_ctx *exec_ctx, grpc_transport *transport, - gpr_slice_buffer *read_buffer) { + grpc_slice_buffer *read_buffer) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)transport; GRPC_CHTTP2_REF_TRANSPORT( t, "reading_action"); /* matches unref inside reading_action */ if (read_buffer != NULL) { - gpr_slice_buffer_move_into(read_buffer, &t->read_buffer); + grpc_slice_buffer_move_into(read_buffer, &t->read_buffer); gpr_free(read_buffer); } read_action_begin(exec_ctx, t, GRPC_ERROR_NONE); diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.h b/src/core/ext/transport/chttp2/transport/chttp2_transport.h index 4e2d0954bf..c372174f2d 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.h +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.h @@ -48,6 +48,6 @@ grpc_transport *grpc_create_chttp2_transport( /// leftover bytes previously read from the endpoint (e.g., by handshakers). void grpc_chttp2_transport_start_reading(grpc_exec_ctx *exec_ctx, grpc_transport *transport, - gpr_slice_buffer *read_buffer); + grpc_slice_buffer *read_buffer); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index 8668816930..3081a03929 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -112,15 +112,15 @@ grpc_byte_stream *grpc_chttp2_incoming_frame_queue_pop( return out; } -void grpc_chttp2_encode_data(uint32_t id, gpr_slice_buffer *inbuf, +void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer *inbuf, uint32_t write_bytes, int is_eof, grpc_transport_one_way_stats *stats, - gpr_slice_buffer *outbuf) { - gpr_slice hdr; + grpc_slice_buffer *outbuf) { + grpc_slice hdr; uint8_t *p; static const size_t header_size = 9; - hdr = gpr_slice_malloc(header_size); + hdr = grpc_slice_malloc(header_size); p = GPR_SLICE_START_PTR(hdr); GPR_ASSERT(write_bytes < (1 << 24)); *p++ = (uint8_t)(write_bytes >> 16); @@ -132,9 +132,9 @@ void grpc_chttp2_encode_data(uint32_t id, gpr_slice_buffer *inbuf, *p++ = (uint8_t)(id >> 16); *p++ = (uint8_t)(id >> 8); *p++ = (uint8_t)(id); - gpr_slice_buffer_add(outbuf, hdr); + grpc_slice_buffer_add(outbuf, hdr); - gpr_slice_buffer_move_first(inbuf, write_bytes, outbuf); + grpc_slice_buffer_move_first(inbuf, write_bytes, outbuf); stats->framing_bytes += header_size; stats->data_bytes += write_bytes; @@ -143,7 +143,7 @@ void grpc_chttp2_encode_data(uint32_t id, gpr_slice_buffer *inbuf, static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, grpc_chttp2_data_parser *p, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice) { + grpc_slice slice) { uint8_t *const beg = GPR_SLICE_START_PTR(slice); uint8_t *const end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; @@ -236,7 +236,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, s->stats.incoming.data_bytes += p->frame_size; grpc_chttp2_incoming_byte_stream_push( exec_ctx, p->parsing_frame, - gpr_slice_sub(slice, (size_t)(cur - beg), (size_t)(end - beg))); + grpc_slice_sub(slice, (size_t)(cur - beg), (size_t)(end - beg))); grpc_chttp2_incoming_byte_stream_finished(exec_ctx, p->parsing_frame, GRPC_ERROR_NONE); p->parsing_frame = NULL; @@ -246,7 +246,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, s->stats.incoming.data_bytes += p->frame_size; grpc_chttp2_incoming_byte_stream_push( exec_ctx, p->parsing_frame, - gpr_slice_sub(slice, (size_t)(cur - beg), + grpc_slice_sub(slice, (size_t)(cur - beg), (size_t)(cur + p->frame_size - beg))); grpc_chttp2_incoming_byte_stream_finished(exec_ctx, p->parsing_frame, GRPC_ERROR_NONE); @@ -257,7 +257,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, GPR_ASSERT(remaining <= p->frame_size); grpc_chttp2_incoming_byte_stream_push( exec_ctx, p->parsing_frame, - gpr_slice_sub(slice, (size_t)(cur - beg), (size_t)(end - beg))); + grpc_slice_sub(slice, (size_t)(cur - beg), (size_t)(end - beg))); p->frame_size -= remaining; s->stats.incoming.data_bytes += remaining; return GRPC_ERROR_NONE; @@ -270,7 +270,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, grpc_error *grpc_chttp2_data_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { grpc_chttp2_data_parser *p = parser; grpc_error *error = parse_inner(exec_ctx, p, t, s, slice); diff --git a/src/core/ext/transport/chttp2/transport/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h index eb2d97d898..471f615c67 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.h +++ b/src/core/ext/transport/chttp2/transport/frame_data.h @@ -94,11 +94,11 @@ grpc_error *grpc_chttp2_data_parser_begin_frame(grpc_chttp2_data_parser *parser, grpc_error *grpc_chttp2_data_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); -void grpc_chttp2_encode_data(uint32_t id, gpr_slice_buffer *inbuf, +void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer *inbuf, uint32_t write_bytes, int is_eof, grpc_transport_one_way_stats *stats, - gpr_slice_buffer *outbuf); + grpc_slice_buffer *outbuf); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.c b/src/core/ext/transport/chttp2/transport/frame_goaway.c index 33d2269169..16c6819aca 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.c +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.c @@ -71,7 +71,7 @@ grpc_error *grpc_chttp2_goaway_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { uint8_t *const beg = GPR_SLICE_START_PTR(slice); uint8_t *const end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; @@ -151,7 +151,7 @@ grpc_error *grpc_chttp2_goaway_parser_parse(grpc_exec_ctx *exec_ctx, if (is_last) { grpc_chttp2_add_incoming_goaway( exec_ctx, t, (uint32_t)p->error_code, - gpr_slice_new(p->debug_data, p->debug_length, gpr_free)); + grpc_slice_new(p->debug_data, p->debug_length, gpr_free)); p->debug_data = NULL; } return GRPC_ERROR_NONE; @@ -160,9 +160,9 @@ grpc_error *grpc_chttp2_goaway_parser_parse(grpc_exec_ctx *exec_ctx, } void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, - gpr_slice debug_data, - gpr_slice_buffer *slice_buffer) { - gpr_slice header = gpr_slice_malloc(9 + 4 + 4); + grpc_slice debug_data, + grpc_slice_buffer *slice_buffer) { + grpc_slice header = grpc_slice_malloc(9 + 4 + 4); uint8_t *p = GPR_SLICE_START_PTR(header); uint32_t frame_length; GPR_ASSERT(GPR_SLICE_LENGTH(debug_data) < UINT32_MAX - 4 - 4); @@ -192,6 +192,6 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, *p++ = (uint8_t)(error_code >> 8); *p++ = (uint8_t)(error_code); GPR_ASSERT(p == GPR_SLICE_END_PTR(header)); - gpr_slice_buffer_add(slice_buffer, header); - gpr_slice_buffer_add(slice_buffer, debug_data); + grpc_slice_buffer_add(slice_buffer, header); + grpc_slice_buffer_add(slice_buffer, debug_data); } diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h index 355104a5a7..c2b82d85b3 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.h +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h @@ -69,10 +69,10 @@ grpc_error *grpc_chttp2_goaway_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, - gpr_slice debug_data, - gpr_slice_buffer *slice_buffer); + grpc_slice debug_data, + grpc_slice_buffer *slice_buffer); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.c b/src/core/ext/transport/chttp2/transport/frame_ping.c index 624f42649d..f8d73539ae 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.c +++ b/src/core/ext/transport/chttp2/transport/frame_ping.c @@ -40,8 +40,8 @@ #include #include -gpr_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes) { - gpr_slice slice = gpr_slice_malloc(9 + 8); +grpc_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes) { + grpc_slice slice = grpc_slice_malloc(9 + 8); uint8_t *p = GPR_SLICE_START_PTR(slice); *p++ = 0; @@ -76,7 +76,7 @@ grpc_error *grpc_chttp2_ping_parser_begin_frame(grpc_chttp2_ping_parser *parser, grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { uint8_t *const beg = GPR_SLICE_START_PTR(slice); uint8_t *const end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; @@ -93,7 +93,7 @@ grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, if (p->is_ack) { grpc_chttp2_ack_ping(exec_ctx, t, p->opaque_8bytes); } else { - gpr_slice_buffer_add(&t->qbuf, + grpc_slice_buffer_add(&t->qbuf, grpc_chttp2_ping_create(1, p->opaque_8bytes)); grpc_chttp2_initiate_write(exec_ctx, t, false, "ping response"); } diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h index 2071f647fb..dcc95db4ca 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.h +++ b/src/core/ext/transport/chttp2/transport/frame_ping.h @@ -44,13 +44,13 @@ typedef struct { uint8_t opaque_8bytes[8]; } grpc_chttp2_ping_parser; -gpr_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes); +grpc_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes); grpc_error *grpc_chttp2_ping_parser_begin_frame(grpc_chttp2_ping_parser *parser, uint32_t length, uint8_t flags); grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c index 9eac050797..7def454915 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -42,10 +42,10 @@ #include "src/core/ext/transport/chttp2/transport/http2_errors.h" #include "src/core/ext/transport/chttp2/transport/status_conversion.h" -gpr_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code, +grpc_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code, grpc_transport_one_way_stats *stats) { static const size_t frame_size = 13; - gpr_slice slice = gpr_slice_malloc(frame_size); + grpc_slice slice = grpc_slice_malloc(frame_size); stats->framing_bytes += frame_size; uint8_t *p = GPR_SLICE_START_PTR(slice); @@ -89,7 +89,7 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { uint8_t *const beg = GPR_SLICE_START_PTR(slice); uint8_t *const end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; @@ -117,7 +117,7 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse(grpc_exec_ctx *exec_ctx, char *status_details; gpr_asprintf(&status_details, "Received RST_STREAM with error code %d", reason); - gpr_slice slice_details = gpr_slice_from_copied_string(status_details); + grpc_slice slice_details = grpc_slice_from_copied_string(status_details); gpr_free(status_details); grpc_chttp2_fake_status(exec_ctx, t, s, status_code, &slice_details); } diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h index 5a1f578a29..d837e95da4 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h @@ -44,7 +44,7 @@ typedef struct { uint8_t reason_bytes[4]; } grpc_chttp2_rst_stream_parser; -gpr_slice grpc_chttp2_rst_stream_create(uint32_t stream_id, uint32_t code, +grpc_slice grpc_chttp2_rst_stream_create(uint32_t stream_id, uint32_t code, grpc_transport_one_way_stats *stats); grpc_error *grpc_chttp2_rst_stream_parser_begin_frame( @@ -53,6 +53,6 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c index 92022f90c9..d9ea1f91a7 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.c +++ b/src/core/ext/transport/chttp2/transport/frame_settings.c @@ -82,18 +82,18 @@ static uint8_t *fill_header(uint8_t *out, uint32_t length, uint8_t flags) { return out; } -gpr_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, +grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, uint32_t force_mask, size_t count) { size_t i; uint32_t n = 0; - gpr_slice output; + grpc_slice output; uint8_t *p; for (i = 0; i < count; i++) { n += (new[i] != old[i] || (force_mask & (1u << i)) != 0); } - output = gpr_slice_malloc(9 + 6 * n); + output = grpc_slice_malloc(9 + 6 * n); p = fill_header(GPR_SLICE_START_PTR(output), 6 * n, 0); for (i = 0; i < count; i++) { @@ -114,8 +114,8 @@ gpr_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, return output; } -gpr_slice grpc_chttp2_settings_ack_create(void) { - gpr_slice output = gpr_slice_malloc(9); +grpc_slice grpc_chttp2_settings_ack_create(void) { + grpc_slice output = grpc_slice_malloc(9); fill_header(GPR_SLICE_START_PTR(output), 0, GRPC_CHTTP2_FLAG_ACK); return output; } @@ -146,7 +146,7 @@ grpc_error *grpc_chttp2_settings_parser_begin_frame( grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx, void *p, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { grpc_chttp2_settings_parser *parser = p; const uint8_t *cur = GPR_SLICE_START_PTR(slice); const uint8_t *end = GPR_SLICE_END_PTR(slice); @@ -164,7 +164,7 @@ grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx, void *p, if (is_last) { memcpy(parser->target_settings, parser->incoming_settings, GRPC_CHTTP2_NUM_SETTINGS * sizeof(uint32_t)); - gpr_slice_buffer_add(&t->qbuf, grpc_chttp2_settings_ack_create()); + grpc_slice_buffer_add(&t->qbuf, grpc_chttp2_settings_ack_create()); } return GRPC_ERROR_NONE; } @@ -225,7 +225,7 @@ grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx, void *p, case GRPC_CHTTP2_DISCONNECT_ON_INVALID_VALUE: grpc_chttp2_goaway_append( t->last_new_stream_id, sp->error_value, - gpr_slice_from_static_string("HTTP2 settings error"), + grpc_slice_from_static_string("HTTP2 settings error"), &t->qbuf); gpr_asprintf(&msg, "invalid value %u passed for %s", parser->value, sp->name); diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h index 4bfa944cf1..cb2c8de0a0 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -87,10 +87,10 @@ extern const grpc_chttp2_setting_parameters grpc_chttp2_settings_parameters[GRPC_CHTTP2_NUM_SETTINGS]; /* Create a settings frame by diffing old & new, and updating old to be new */ -gpr_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, +grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, uint32_t force_mask, size_t count); /* Create an ack settings frame */ -gpr_slice grpc_chttp2_settings_ack_create(void); +grpc_slice grpc_chttp2_settings_ack_create(void); grpc_error *grpc_chttp2_settings_parser_begin_frame( grpc_chttp2_settings_parser *parser, uint32_t length, uint8_t flags, @@ -99,6 +99,6 @@ grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.c b/src/core/ext/transport/chttp2/transport/frame_window_update.c index 418166a6df..b32f1403e1 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.c +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.c @@ -38,10 +38,10 @@ #include #include -gpr_slice grpc_chttp2_window_update_create( +grpc_slice grpc_chttp2_window_update_create( uint32_t id, uint32_t window_update, grpc_transport_one_way_stats *stats) { static const size_t frame_size = 13; - gpr_slice slice = gpr_slice_malloc(frame_size); + grpc_slice slice = grpc_slice_malloc(frame_size); stats->header_bytes += frame_size; uint8_t *p = GPR_SLICE_START_PTR(slice); @@ -81,7 +81,7 @@ grpc_error *grpc_chttp2_window_update_parser_begin_frame( grpc_error *grpc_chttp2_window_update_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, - grpc_chttp2_stream *s, gpr_slice slice, int is_last) { + grpc_chttp2_stream *s, grpc_slice slice, int is_last) { uint8_t *const beg = GPR_SLICE_START_PTR(slice); uint8_t *const end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h index 6e62f31872..b0f6a0a9d0 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.h +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h @@ -45,13 +45,13 @@ typedef struct { uint32_t amount; } grpc_chttp2_window_update_parser; -gpr_slice grpc_chttp2_window_update_create(uint32_t id, uint32_t window_delta, +grpc_slice grpc_chttp2_window_update_create(uint32_t id, uint32_t window_delta, grpc_transport_one_way_stats *stats); grpc_error *grpc_chttp2_window_update_parser_begin_frame( grpc_chttp2_window_update_parser *parser, uint32_t length, uint8_t flags); grpc_error *grpc_chttp2_window_update_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, - grpc_chttp2_stream *s, gpr_slice slice, int is_last); + grpc_chttp2_stream *s, grpc_slice slice, int is_last); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H */ diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c index 581471ba02..d8de7d0719 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c @@ -76,7 +76,7 @@ typedef struct { uint8_t seen_regular_header; /* output stream id */ uint32_t stream_id; - gpr_slice_buffer *output; + grpc_slice_buffer *output; grpc_transport_one_way_stats *stats; /* maximum size of a frame */ size_t max_frame_size; @@ -116,7 +116,7 @@ static void finish_frame(framer_state *st, int is_header_boundary, output before beginning */ static void begin_frame(framer_state *st) { st->header_idx = - gpr_slice_buffer_add_indexed(st->output, gpr_slice_malloc(9)); + grpc_slice_buffer_add_indexed(st->output, grpc_slice_malloc(9)); st->output_length_at_start_of_frame = st->output->length; } @@ -147,7 +147,7 @@ static void inc_filter(uint8_t idx, uint32_t *sum, uint8_t *elems) { } } -static void add_header_data(framer_state *st, gpr_slice slice) { +static void add_header_data(framer_state *st, grpc_slice slice) { size_t len = GPR_SLICE_LENGTH(slice); size_t remaining; if (len == 0) return; @@ -155,10 +155,10 @@ static void add_header_data(framer_state *st, gpr_slice slice) { st->output->length; if (len <= remaining) { st->stats->header_bytes += len; - gpr_slice_buffer_add(st->output, slice); + grpc_slice_buffer_add(st->output, slice); } else { st->stats->header_bytes += remaining; - gpr_slice_buffer_add(st->output, gpr_slice_split_head(&slice, remaining)); + grpc_slice_buffer_add(st->output, grpc_slice_split_head(&slice, remaining)); finish_frame(st, 0, 0); begin_frame(st); add_header_data(st, slice); @@ -167,7 +167,7 @@ static void add_header_data(framer_state *st, gpr_slice slice) { static uint8_t *add_tiny_header_data(framer_state *st, size_t len) { ensure_space(st, len); - return gpr_slice_buffer_tiny_add(st->output, len); + return grpc_slice_buffer_tiny_add(st->output, len); } static void evict_entry(grpc_chttp2_hpack_compressor *c) { @@ -268,7 +268,7 @@ static void emit_indexed(grpc_chttp2_hpack_compressor *c, uint32_t elem_index, len); } -static gpr_slice get_wire_value(grpc_mdelem *elem, uint8_t *huffman_prefix) { +static grpc_slice get_wire_value(grpc_mdelem *elem, uint8_t *huffman_prefix) { if (grpc_is_binary_header((const char *)GPR_SLICE_START_PTR(elem->key->slice), GPR_SLICE_LENGTH(elem->key->slice))) { *huffman_prefix = 0x80; @@ -284,7 +284,7 @@ static void emit_lithdr_incidx(grpc_chttp2_hpack_compressor *c, framer_state *st) { uint32_t len_pfx = GRPC_CHTTP2_VARINT_LENGTH(key_index, 2); uint8_t huffman_prefix; - gpr_slice value_slice = get_wire_value(elem, &huffman_prefix); + grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); size_t len_val = GPR_SLICE_LENGTH(value_slice); uint32_t len_val_len; GPR_ASSERT(len_val <= UINT32_MAX); @@ -293,7 +293,7 @@ static void emit_lithdr_incidx(grpc_chttp2_hpack_compressor *c, add_tiny_header_data(st, len_pfx), len_pfx); GRPC_CHTTP2_WRITE_VARINT((uint32_t)len_val, 1, huffman_prefix, add_tiny_header_data(st, len_val_len), len_val_len); - add_header_data(st, gpr_slice_ref(value_slice)); + add_header_data(st, grpc_slice_ref(value_slice)); } static void emit_lithdr_noidx(grpc_chttp2_hpack_compressor *c, @@ -301,7 +301,7 @@ static void emit_lithdr_noidx(grpc_chttp2_hpack_compressor *c, framer_state *st) { uint32_t len_pfx = GRPC_CHTTP2_VARINT_LENGTH(key_index, 4); uint8_t huffman_prefix; - gpr_slice value_slice = get_wire_value(elem, &huffman_prefix); + grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); size_t len_val = GPR_SLICE_LENGTH(value_slice); uint32_t len_val_len; GPR_ASSERT(len_val <= UINT32_MAX); @@ -310,14 +310,14 @@ static void emit_lithdr_noidx(grpc_chttp2_hpack_compressor *c, add_tiny_header_data(st, len_pfx), len_pfx); GRPC_CHTTP2_WRITE_VARINT((uint32_t)len_val, 1, huffman_prefix, add_tiny_header_data(st, len_val_len), len_val_len); - add_header_data(st, gpr_slice_ref(value_slice)); + add_header_data(st, grpc_slice_ref(value_slice)); } static void emit_lithdr_incidx_v(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem, framer_state *st) { uint32_t len_key = (uint32_t)GPR_SLICE_LENGTH(elem->key->slice); uint8_t huffman_prefix; - gpr_slice value_slice = get_wire_value(elem, &huffman_prefix); + grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); uint32_t len_val = (uint32_t)GPR_SLICE_LENGTH(value_slice); uint32_t len_key_len = GRPC_CHTTP2_VARINT_LENGTH(len_key, 1); uint32_t len_val_len = GRPC_CHTTP2_VARINT_LENGTH(len_val, 1); @@ -326,17 +326,17 @@ static void emit_lithdr_incidx_v(grpc_chttp2_hpack_compressor *c, *add_tiny_header_data(st, 1) = 0x40; GRPC_CHTTP2_WRITE_VARINT(len_key, 1, 0x00, add_tiny_header_data(st, len_key_len), len_key_len); - add_header_data(st, gpr_slice_ref(elem->key->slice)); + add_header_data(st, grpc_slice_ref(elem->key->slice)); GRPC_CHTTP2_WRITE_VARINT(len_val, 1, huffman_prefix, add_tiny_header_data(st, len_val_len), len_val_len); - add_header_data(st, gpr_slice_ref(value_slice)); + add_header_data(st, grpc_slice_ref(value_slice)); } static void emit_lithdr_noidx_v(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem, framer_state *st) { uint32_t len_key = (uint32_t)GPR_SLICE_LENGTH(elem->key->slice); uint8_t huffman_prefix; - gpr_slice value_slice = get_wire_value(elem, &huffman_prefix); + grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); uint32_t len_val = (uint32_t)GPR_SLICE_LENGTH(value_slice); uint32_t len_key_len = GRPC_CHTTP2_VARINT_LENGTH(len_key, 1); uint32_t len_val_len = GRPC_CHTTP2_VARINT_LENGTH(len_val, 1); @@ -345,10 +345,10 @@ static void emit_lithdr_noidx_v(grpc_chttp2_hpack_compressor *c, *add_tiny_header_data(st, 1) = 0x00; GRPC_CHTTP2_WRITE_VARINT(len_key, 1, 0x00, add_tiny_header_data(st, len_key_len), len_key_len); - add_header_data(st, gpr_slice_ref(elem->key->slice)); + add_header_data(st, grpc_slice_ref(elem->key->slice)); GRPC_CHTTP2_WRITE_VARINT(len_val, 1, huffman_prefix, add_tiny_header_data(st, len_val_len), len_val_len); - add_header_data(st, gpr_slice_ref(value_slice)); + add_header_data(st, grpc_slice_ref(value_slice)); } static void emit_advertise_table_size_change(grpc_chttp2_hpack_compressor *c, @@ -546,7 +546,7 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, grpc_metadata_batch *metadata, int is_eof, size_t max_frame_size, grpc_transport_one_way_stats *stats, - gpr_slice_buffer *outbuf) { + grpc_slice_buffer *outbuf) { framer_state st; grpc_linked_mdelem *l; gpr_timespec deadline; diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h index 4c3a931549..abbd514fc2 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -93,6 +93,6 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, uint32_t id, grpc_metadata_batch *metadata, int is_eof, size_t max_frame_size, grpc_transport_one_way_stats *stats, - gpr_slice_buffer *outbuf); + grpc_slice_buffer *outbuf); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H */ diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 8180f78fc0..0e721b181a 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -1582,7 +1582,7 @@ grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx, void *hpack_parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { grpc_chttp2_hpack_parser *parser = hpack_parser; GPR_TIMER_BEGIN("grpc_chttp2_hpack_parser_parse", 0); if (s != NULL) { diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h index 0290c78d5a..a39bf466cd 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h @@ -116,6 +116,6 @@ grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx, void *hpack_parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H */ diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index e0c4a1e925..18fa2b4890 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -170,14 +170,14 @@ struct grpc_chttp2_incoming_byte_stream { bool is_tail; gpr_mu slice_mu; // protects slices, on_next - gpr_slice_buffer slices; + grpc_slice_buffer slices; grpc_closure *on_next; - gpr_slice *next; + grpc_slice *next; uint32_t remaining_bytes; struct { grpc_closure closure; - gpr_slice *slice; + grpc_slice *slice; size_t max_size_hint; grpc_closure *on_complete; } next_action; @@ -219,7 +219,7 @@ struct grpc_chttp2_transport { grpc_closure read_action_locked; /** incoming read bytes */ - gpr_slice_buffer read_buffer; + grpc_slice_buffer read_buffer; /** address to place a newly accepted stream - set and unset by grpc_chttp2_parsing_accept_stream; used by init_stream to @@ -237,7 +237,7 @@ struct grpc_chttp2_transport { } channel_callback; /** data to write now */ - gpr_slice_buffer outbuf; + grpc_slice_buffer outbuf; /** hpack encoding */ grpc_chttp2_hpack_compressor hpack_compressor; int64_t outgoing_window; @@ -245,7 +245,7 @@ struct grpc_chttp2_transport { uint8_t is_client; /** data to write next write */ - gpr_slice_buffer qbuf; + grpc_slice_buffer qbuf; /** window available to announce to peer */ int64_t announce_incoming_window; @@ -314,12 +314,12 @@ struct grpc_chttp2_transport { grpc_chttp2_stream *incoming_stream; grpc_error *(*parser)(grpc_exec_ctx *exec_ctx, void *parser_user_data, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); /* goaway data */ grpc_status_code goaway_error; uint32_t goaway_last_stream_index; - gpr_slice goaway_text; + grpc_slice goaway_text; grpc_chttp2_write_cb *write_cb_pool; @@ -374,7 +374,7 @@ struct grpc_chttp2_stream { grpc_byte_stream *fetching_send_message; uint32_t fetched_send_message_length; - gpr_slice fetching_slice; + grpc_slice fetching_slice; int64_t next_message_end_offset; int64_t flow_controlled_bytes_written; bool complete_fetch_covered_by_poller; @@ -434,7 +434,7 @@ struct grpc_chttp2_stream { bool sent_trailing_metadata; /** how much window should we announce? */ uint32_t announce_window; - gpr_slice_buffer flow_controlled_buffer; + grpc_slice_buffer flow_controlled_buffer; grpc_chttp2_write_cb *on_write_finished_cbs; grpc_chttp2_write_cb *finish_after_write; @@ -466,7 +466,7 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, /** Process one slice of incoming data; return 1 if the connection is still viable after reading, or 0 if the connection should be torn down */ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, gpr_slice slice); + grpc_chttp2_transport *t, grpc_slice slice); bool grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s); @@ -509,7 +509,7 @@ grpc_chttp2_stream *grpc_chttp2_parsing_accept_stream(grpc_exec_ctx *exec_ctx, void grpc_chttp2_add_incoming_goaway(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, uint32_t goaway_error, - gpr_slice goaway_text); + grpc_slice goaway_text); void grpc_chttp2_parsing_become_skip_parser(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t); @@ -611,7 +611,7 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase, void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *stream, - grpc_status_code status, gpr_slice *details); + grpc_status_code status, grpc_slice *details); void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, int close_reads, @@ -659,7 +659,7 @@ grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( uint32_t frame_size, uint32_t flags); void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, - gpr_slice slice); + grpc_slice slice); void grpc_chttp2_incoming_byte_stream_finished( grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, grpc_error *error); diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 8005350ae7..6941a1e397 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -67,12 +67,12 @@ static grpc_error *init_skip_frame_parser(grpc_exec_ctx *exec_ctx, int is_header); static grpc_error *parse_frame_slice(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, gpr_slice slice, + grpc_chttp2_transport *t, grpc_slice slice, int is_last); grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - gpr_slice slice) { + grpc_slice slice) { uint8_t *beg = GPR_SLICE_START_PTR(slice); uint8_t *end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; @@ -230,7 +230,7 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, GPR_ASSERT(cur < end); if ((uint32_t)(end - cur) == t->incoming_frame_size) { err = parse_frame_slice(exec_ctx, t, - gpr_slice_sub_no_ref(slice, (size_t)(cur - beg), + grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), (size_t)(end - beg)), 1); if (err != GRPC_ERROR_NONE) { @@ -243,7 +243,7 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, size_t cur_offset = (size_t)(cur - beg); err = parse_frame_slice( exec_ctx, t, - gpr_slice_sub_no_ref(slice, cur_offset, + grpc_slice_sub_no_ref(slice, cur_offset, cur_offset + t->incoming_frame_size), 1); if (err != GRPC_ERROR_NONE) { @@ -254,7 +254,7 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, goto dts_fh_0; /* loop */ } else { err = parse_frame_slice(exec_ctx, t, - gpr_slice_sub_no_ref(slice, (size_t)(cur - beg), + grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), (size_t)(end - beg)), 0); if (err != GRPC_ERROR_NONE) { @@ -331,7 +331,7 @@ static grpc_error *init_frame_parser(grpc_exec_ctx *exec_ctx, static grpc_error *skip_parser(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { return GRPC_ERROR_NONE; } @@ -430,7 +430,7 @@ error_handler: if (s != NULL) { grpc_chttp2_mark_stream_closed(exec_ctx, t, s, true, false, err); } - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->qbuf, grpc_chttp2_rst_stream_create(t->incoming_stream_id, GRPC_CHTTP2_PROTOCOL_ERROR, &s->stats.outgoing)); @@ -722,7 +722,7 @@ static grpc_error *init_settings_frame_parser(grpc_exec_ctx *exec_ctx, } static grpc_error *parse_frame_slice(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, gpr_slice slice, + grpc_chttp2_transport *t, grpc_slice slice, int is_last) { grpc_chttp2_stream *s = t->incoming_stream; grpc_error *err = t->parser(exec_ctx, t->parser_data, t, s, slice, is_last); @@ -737,7 +737,7 @@ static grpc_error *parse_frame_slice(grpc_exec_ctx *exec_ctx, grpc_chttp2_parsing_become_skip_parser(exec_ctx, t); if (s) { s->forced_close_error = err; - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->qbuf, grpc_chttp2_rst_stream_create(t->incoming_stream_id, GRPC_CHTTP2_PROTOCOL_ERROR, &s->stats.outgoing)); diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index b39695a1a5..1486a7edb4 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -80,7 +80,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, GPR_TIMER_BEGIN("grpc_chttp2_begin_write", 0); if (t->dirtied_local_settings && !t->sent_local_settings) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->outbuf, grpc_chttp2_settings_create( t->settings[GRPC_SENT_SETTINGS], t->settings[GRPC_LOCAL_SETTINGS], @@ -91,7 +91,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, } /* simple writes are queued to qbuf, and flushed here */ - gpr_slice_buffer_move_into(&t->qbuf, &t->outbuf); + grpc_slice_buffer_move_into(&t->qbuf, &t->outbuf); GPR_ASSERT(t->qbuf.count == 0); grpc_chttp2_hpack_compressor_set_max_table_size( @@ -130,7 +130,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, /* send any window updates */ if (s->announce_window > 0) { uint32_t announce = s->announce_window; - gpr_slice_buffer_add(&t->outbuf, + grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_window_update_create( s->id, s->announce_window, &s->stats.outgoing)); GRPC_CHTTP2_FLOW_DEBIT_STREAM("write", t, s, announce_window, announce); @@ -162,7 +162,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, s->send_trailing_metadata = NULL; s->sent_trailing_metadata = true; if (!t->is_client && !s->read_closed) { - gpr_slice_buffer_add(&t->outbuf, grpc_chttp2_rst_stream_create( + grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_rst_stream_create( s->id, GRPC_CHTTP2_NO_ERROR, &s->stats.outgoing)); } @@ -194,7 +194,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, s->send_trailing_metadata = NULL; s->sent_trailing_metadata = true; if (!t->is_client && !s->read_closed) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->outbuf, grpc_chttp2_rst_stream_create( s->id, GRPC_CHTTP2_NO_ERROR, &s->stats.outgoing)); } @@ -220,7 +220,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, GRPC_CHTTP2_FLOW_DEBIT_TRANSPORT("write", t, announce_incoming_window, announced); grpc_transport_one_way_stats throwaway_stats; - gpr_slice_buffer_add(&t->outbuf, grpc_chttp2_window_update_create( + grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_window_update_create( 0, announced, &throwaway_stats)); } @@ -254,7 +254,7 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:end"); } - gpr_slice_buffer_reset_and_unref(&t->outbuf); + grpc_slice_buffer_reset_and_unref(&t->outbuf); GRPC_ERROR_UNREF(error); GPR_TIMER_END("grpc_chttp2_end_write", 0); } diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 25ad40b935..87b2c0880f 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -130,7 +130,7 @@ struct read_state { /* vars for holding data destined for the application */ struct grpc_slice_buffer_stream sbs; - gpr_slice_buffer read_slice_buffer; + grpc_slice_buffer read_slice_buffer; /* vars for trailing metadata */ grpc_chttp2_incoming_metadata_buffer trailing_metadata; @@ -517,10 +517,10 @@ static void on_response_trailers_received( Utility function that takes the data from s->write_slice_buffer and assembles into a contiguous byte stream with 5 byte gRPC header prepended. */ -static void create_grpc_frame(gpr_slice_buffer *write_slice_buffer, +static void create_grpc_frame(grpc_slice_buffer *write_slice_buffer, char **pp_write_buffer, size_t *p_write_buffer_size) { - gpr_slice slice = gpr_slice_buffer_take_first(write_slice_buffer); + grpc_slice slice = grpc_slice_buffer_take_first(write_slice_buffer); size_t length = GPR_SLICE_LENGTH(slice); *p_write_buffer_size = length + GRPC_HEADER_SIZE_IN_BYTES; /* This is freed in the on_write_completed callback */ @@ -817,9 +817,9 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, result = NO_ACTION_POSSIBLE; CRONET_LOG(GPR_DEBUG, "Stream is either cancelled or failed."); } else { - gpr_slice_buffer write_slice_buffer; - gpr_slice slice; - gpr_slice_buffer_init(&write_slice_buffer); + grpc_slice_buffer write_slice_buffer; + grpc_slice slice; + grpc_slice_buffer_init(&write_slice_buffer); grpc_byte_stream_next(NULL, stream_op->send_message, &slice, stream_op->send_message->length, NULL); /* Check that compression flag is OFF. We don't support compression yet. @@ -828,7 +828,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, gpr_log(GPR_ERROR, "Compression is not supported"); GPR_ASSERT(stream_op->send_message->flags == 0); } - gpr_slice_buffer_add(&write_slice_buffer, slice); + grpc_slice_buffer_add(&write_slice_buffer, slice); if (write_slice_buffer.count != 1) { /* Empty request not handled yet */ gpr_log(GPR_ERROR, "Empty request is not supported"); @@ -891,7 +891,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, } else { stream_state->rs.remaining_bytes = 0; CRONET_LOG(GPR_DEBUG, "read operation complete. Empty response."); - gpr_slice_buffer_init(&stream_state->rs.read_slice_buffer); + grpc_slice_buffer_init(&stream_state->rs.read_slice_buffer); grpc_slice_buffer_stream_init(&stream_state->rs.sbs, &stream_state->rs.read_slice_buffer, 0); *((grpc_byte_buffer **)stream_op->recv_message) = @@ -918,14 +918,14 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, } } else if (stream_state->rs.remaining_bytes == 0) { CRONET_LOG(GPR_DEBUG, "read operation complete"); - gpr_slice read_data_slice = - gpr_slice_malloc((uint32_t)stream_state->rs.length_field); + grpc_slice read_data_slice = + grpc_slice_malloc((uint32_t)stream_state->rs.length_field); uint8_t *dst_p = GPR_SLICE_START_PTR(read_data_slice); memcpy(dst_p, stream_state->rs.read_buffer, (size_t)stream_state->rs.length_field); free_read_buffer(s); - gpr_slice_buffer_init(&stream_state->rs.read_slice_buffer); - gpr_slice_buffer_add(&stream_state->rs.read_slice_buffer, + grpc_slice_buffer_init(&stream_state->rs.read_slice_buffer); + grpc_slice_buffer_add(&stream_state->rs.read_slice_buffer, read_data_slice); grpc_slice_buffer_stream_init(&stream_state->rs.sbs, &stream_state->rs.read_slice_buffer, 0); diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 2c5367901d..9da81959e7 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -288,7 +288,7 @@ void grpc_call_element_send_cancel(grpc_exec_ctx *exec_ctx, void grpc_call_element_send_cancel_with_message(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_status_code status, - gpr_slice *optional_message) { + grpc_slice *optional_message) { grpc_transport_stream_op *op = gpr_malloc(sizeof(*op)); memset(op, 0, sizeof(*op)); op->on_complete = grpc_closure_create(destroy_op, op); @@ -300,7 +300,7 @@ void grpc_call_element_send_cancel_with_message(grpc_exec_ctx *exec_ctx, void grpc_call_element_send_close_with_message(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_status_code status, - gpr_slice *optional_message) { + grpc_slice *optional_message) { grpc_transport_stream_op *op = gpr_malloc(sizeof(*op)); memset(op, 0, sizeof(*op)); op->on_complete = grpc_closure_create(destroy_op, op); diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 27f3be7b29..0d58994726 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -289,12 +289,12 @@ void grpc_call_element_send_cancel(grpc_exec_ctx *exec_ctx, void grpc_call_element_send_cancel_with_message(grpc_exec_ctx *exec_ctx, grpc_call_element *cur_elem, grpc_status_code status, - gpr_slice *optional_message); + grpc_slice *optional_message); void grpc_call_element_send_close_with_message(grpc_exec_ctx *exec_ctx, grpc_call_element *cur_elem, grpc_status_code status, - gpr_slice *optional_message); + grpc_slice *optional_message); extern int grpc_trace_channel; diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 0981d59f63..f797d82eb9 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -50,7 +50,7 @@ int grpc_compression_trace = 0; typedef struct call_data { - gpr_slice_buffer slices; /**< Buffers up input slices to be compressed */ + grpc_slice_buffer slices; /**< Buffers up input slices to be compressed */ grpc_linked_mdelem compression_algorithm_storage; grpc_linked_mdelem accept_encoding_storage; uint32_t remaining_slice_bytes; @@ -63,7 +63,7 @@ typedef struct call_data { grpc_transport_stream_op *send_op; uint32_t send_length; uint32_t send_flags; - gpr_slice incoming_slice; + grpc_slice incoming_slice; grpc_slice_buffer_stream replacement_stream; grpc_closure *post_send; grpc_closure send_done; @@ -157,7 +157,7 @@ static void continue_send_message(grpc_exec_ctx *exec_ctx, static void send_done(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { grpc_call_element *elem = elemp; call_data *calld = elem->call_data; - gpr_slice_buffer_reset_and_unref(&calld->slices); + grpc_slice_buffer_reset_and_unref(&calld->slices); calld->post_send->cb(exec_ctx, calld->post_send->cb_arg, error); } @@ -165,8 +165,8 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { call_data *calld = elem->call_data; int did_compress; - gpr_slice_buffer tmp; - gpr_slice_buffer_init(&tmp); + grpc_slice_buffer tmp; + grpc_slice_buffer_init(&tmp); did_compress = grpc_msg_compress(calld->compression_algorithm, &calld->slices, &tmp); if (did_compress) { @@ -181,7 +181,7 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, " bytes (%.2f%% savings)", algo_name, before_size, after_size, 100 * savings_ratio); } - gpr_slice_buffer_swap(&calld->slices, &tmp); + grpc_slice_buffer_swap(&calld->slices, &tmp); calld->send_flags |= GRPC_WRITE_INTERNAL_COMPRESS; } else { if (grpc_compression_trace) { @@ -195,7 +195,7 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, } } - gpr_slice_buffer_destroy(&tmp); + grpc_slice_buffer_destroy(&tmp); grpc_slice_buffer_stream_init(&calld->replacement_stream, &calld->slices, calld->send_flags); @@ -209,7 +209,7 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, static void got_slice(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { grpc_call_element *elem = elemp; call_data *calld = elem->call_data; - gpr_slice_buffer_add(&calld->slices, calld->incoming_slice); + grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); if (calld->send_length == calld->slices.length) { finish_send_message(exec_ctx, elem); } else { @@ -223,7 +223,7 @@ static void continue_send_message(grpc_exec_ctx *exec_ctx, while (grpc_byte_stream_next(exec_ctx, calld->send_op->send_message, &calld->incoming_slice, ~(size_t)0, &calld->got_slice)) { - gpr_slice_buffer_add(&calld->slices, calld->incoming_slice); + grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); if (calld->send_length == calld->slices.length) { finish_send_message(exec_ctx, elem); break; @@ -263,7 +263,7 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, call_data *calld = elem->call_data; /* initialize members */ - gpr_slice_buffer_init(&calld->slices); + grpc_slice_buffer_init(&calld->slices); calld->has_compression_algorithm = 0; grpc_closure_init(&calld->got_slice, got_slice, elem); grpc_closure_init(&calld->send_done, send_done, elem); @@ -277,7 +277,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, void *ignored) { /* grab pointers to our data from the call element */ call_data *calld = elem->call_data; - gpr_slice_buffer_destroy(&calld->slices); + grpc_slice_buffer_destroy(&calld->slices); } /* Constructor for channel_data */ diff --git a/src/core/lib/channel/deadline_filter.c b/src/core/lib/channel/deadline_filter.c index d2ea5250f6..449eb7b8d6 100644 --- a/src/core/lib/channel/deadline_filter.c +++ b/src/core/lib/channel/deadline_filter.c @@ -55,10 +55,10 @@ static void timer_callback(grpc_exec_ctx* exec_ctx, void* arg, deadline_state->timer_pending = false; gpr_mu_unlock(&deadline_state->timer_mu); if (error != GRPC_ERROR_CANCELLED) { - gpr_slice msg = gpr_slice_from_static_string("Deadline Exceeded"); + grpc_slice msg = grpc_slice_from_static_string("Deadline Exceeded"); grpc_call_element_send_cancel_with_message( exec_ctx, elem, GRPC_STATUS_DEADLINE_EXCEEDED, &msg); - gpr_slice_unref(msg); + grpc_slice_unref(msg); } GRPC_CALL_STACK_UNREF(exec_ctx, deadline_state->call_stack, "deadline_timer"); } diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 0d759887bc..00d39764d7 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -62,7 +62,7 @@ void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, + grpc_slice_buffer* read_buffer, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, void* user_data) { @@ -146,7 +146,7 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, static void call_next_handshaker(grpc_exec_ctx* exec_ctx, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, void* user_data, + grpc_slice_buffer* read_buffer, void* user_data, grpc_error* error) { grpc_handshake_manager* mgr = user_data; GPR_ASSERT(mgr->state != NULL); @@ -183,8 +183,8 @@ void grpc_handshake_manager_do_handshake( gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, void* user_data) { grpc_channel_args* args_copy = grpc_channel_args_copy(args); - gpr_slice_buffer* read_buffer = gpr_malloc(sizeof(*read_buffer)); - gpr_slice_buffer_init(read_buffer); + grpc_slice_buffer* read_buffer = gpr_malloc(sizeof(*read_buffer)); + grpc_slice_buffer_init(read_buffer); if (mgr->count == 0) { // No handshakers registered, so we just immediately call the done // callback with the passed-in endpoint. diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index d574b46242..f8a36c6473 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -59,7 +59,7 @@ typedef struct grpc_handshaker grpc_handshaker; typedef void (*grpc_handshaker_done_cb)(grpc_exec_ctx* exec_ctx, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, + grpc_slice_buffer* read_buffer, void* user_data, grpc_error* error); struct grpc_handshaker_vtable { @@ -77,7 +77,7 @@ struct grpc_handshaker_vtable { /// \a acceptor will be NULL for client-side handshakers. void (*do_handshake)(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, gpr_timespec deadline, + grpc_slice_buffer* read_buffer, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, void* user_data); }; @@ -103,7 +103,7 @@ void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, + grpc_slice_buffer* read_buffer, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, void* user_data); diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 1dc05fb20d..110c1cb546 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -62,9 +62,9 @@ typedef struct call_data { grpc_transport_stream_op send_op; uint32_t send_length; uint32_t send_flags; - gpr_slice incoming_slice; + grpc_slice incoming_slice; grpc_slice_buffer_stream replacement_stream; - gpr_slice_buffer slices; + grpc_slice_buffer slices; /* flag that indicates that all slices of send_messages aren't availble */ bool send_message_blocked; @@ -101,7 +101,7 @@ static grpc_mdelem *client_recv_filter(void *user_data, grpc_mdelem *md) { char *message_string; gpr_asprintf(&message_string, "Received http2 header with status: %s", grpc_mdstr_as_c_string(md->value)); - gpr_slice message = gpr_slice_from_copied_string(message_string); + grpc_slice message = grpc_slice_from_copied_string(message_string); gpr_free(message_string); grpc_call_element_send_close_with_message(a->exec_ctx, a->elem, GRPC_STATUS_CANCELLED, &message); @@ -155,7 +155,7 @@ static void hc_on_complete(grpc_exec_ctx *exec_ctx, void *user_data, static void send_done(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { grpc_call_element *elem = elemp; call_data *calld = elem->call_data; - gpr_slice_buffer_reset_and_unref(&calld->slices); + grpc_slice_buffer_reset_and_unref(&calld->slices); calld->post_send->cb(exec_ctx, calld->post_send->cb_arg, error); } @@ -179,7 +179,7 @@ static void continue_send_message(grpc_exec_ctx *exec_ctx, memcpy(wrptr, GPR_SLICE_START_PTR(calld->incoming_slice), GPR_SLICE_LENGTH(calld->incoming_slice)); wrptr += GPR_SLICE_LENGTH(calld->incoming_slice); - gpr_slice_buffer_add(&calld->slices, calld->incoming_slice); + grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); if (calld->send_length == calld->slices.length) { calld->send_message_blocked = false; break; @@ -191,7 +191,7 @@ static void got_slice(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { grpc_call_element *elem = elemp; call_data *calld = elem->call_data; calld->send_message_blocked = false; - gpr_slice_buffer_add(&calld->slices, calld->incoming_slice); + grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); if (calld->send_length == calld->slices.length) { /* Pass down the original send_message op that was blocked.*/ grpc_slice_buffer_stream_init(&calld->replacement_stream, &calld->slices, @@ -311,7 +311,7 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, calld->on_done_recv = NULL; calld->on_complete = NULL; calld->payload_bytes = NULL; - gpr_slice_buffer_init(&calld->slices); + grpc_slice_buffer_init(&calld->slices); grpc_closure_init(&calld->hc_on_recv, hc_on_recv, elem); grpc_closure_init(&calld->hc_on_complete, hc_on_complete, elem); grpc_closure_init(&calld->got_slice, got_slice, elem); @@ -324,7 +324,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_final_info *final_info, void *ignored) { call_data *calld = elem->call_data; - gpr_slice_buffer_destroy(&calld->slices); + grpc_slice_buffer_destroy(&calld->slices); } static grpc_mdelem *scheme_from_args(const grpc_channel_args *args) { diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index f2221fb0fb..1a73a07b81 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -68,7 +68,7 @@ typedef struct call_data { grpc_closure *recv_message_ready; grpc_closure *on_complete; grpc_byte_stream **pp_recv_message; - gpr_slice_buffer read_slice_buffer; + grpc_slice_buffer read_slice_buffer; grpc_slice_buffer_stream read_stream; /** Receive closures are chained: we inject this closure as the on_done_recv @@ -162,9 +162,9 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { /* Retrieve the payload from the value of the 'grpc-internal-payload-bin' header field */ calld->seen_payload_bin = 1; - gpr_slice_buffer_init(&calld->read_slice_buffer); - gpr_slice_buffer_add(&calld->read_slice_buffer, - gpr_slice_ref(md->value->slice)); + grpc_slice_buffer_init(&calld->read_slice_buffer); + grpc_slice_buffer_add(&calld->read_slice_buffer, + grpc_slice_ref(md->value->slice)); grpc_slice_buffer_stream_init(&calld->read_stream, &calld->read_slice_buffer, 0); return NULL; diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index b8b2546035..e25ca17646 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -141,7 +141,7 @@ static void start_transport_stream_op(grpc_exec_ctx* exec_ctx, char* message_string; gpr_asprintf(&message_string, "Sent message larger than max (%u vs. %d)", op->send_message->length, calld->max_send_size); - gpr_slice message = gpr_slice_from_copied_string(message_string); + grpc_slice message = grpc_slice_from_copied_string(message_string); gpr_free(message_string); grpc_call_element_send_close_with_message( exec_ctx, elem, GRPC_STATUS_INVALID_ARGUMENT, &message); diff --git a/src/core/lib/compression/message_compress.c b/src/core/lib/compression/message_compress.c index cbe0b5a285..501cb8be69 100644 --- a/src/core/lib/compression/message_compress.c +++ b/src/core/lib/compression/message_compress.c @@ -42,13 +42,13 @@ #define OUTPUT_BLOCK_SIZE 1024 -static int zlib_body(z_stream* zs, gpr_slice_buffer* input, - gpr_slice_buffer* output, +static int zlib_body(z_stream* zs, grpc_slice_buffer* input, + grpc_slice_buffer* output, int (*flate)(z_stream* zs, int flush)) { int r; int flush; size_t i; - gpr_slice outbuf = gpr_slice_malloc(OUTPUT_BLOCK_SIZE); + grpc_slice outbuf = grpc_slice_malloc(OUTPUT_BLOCK_SIZE); const uInt uint_max = ~(uInt)0; GPR_ASSERT(GPR_SLICE_LENGTH(outbuf) <= uint_max); @@ -62,8 +62,8 @@ static int zlib_body(z_stream* zs, gpr_slice_buffer* input, zs->next_in = GPR_SLICE_START_PTR(input->slices[i]); do { if (zs->avail_out == 0) { - gpr_slice_buffer_add_indexed(output, outbuf); - outbuf = gpr_slice_malloc(OUTPUT_BLOCK_SIZE); + grpc_slice_buffer_add_indexed(output, outbuf); + outbuf = grpc_slice_malloc(OUTPUT_BLOCK_SIZE); GPR_ASSERT(GPR_SLICE_LENGTH(outbuf) <= uint_max); zs->avail_out = (uInt)GPR_SLICE_LENGTH(outbuf); zs->next_out = GPR_SLICE_START_PTR(outbuf); @@ -82,12 +82,12 @@ static int zlib_body(z_stream* zs, gpr_slice_buffer* input, GPR_ASSERT(outbuf.refcount); outbuf.data.refcounted.length -= zs->avail_out; - gpr_slice_buffer_add_indexed(output, outbuf); + grpc_slice_buffer_add_indexed(output, outbuf); return 1; error: - gpr_slice_unref(outbuf); + grpc_slice_unref(outbuf); return 0; } @@ -97,7 +97,7 @@ static void* zalloc_gpr(void* opaque, unsigned int items, unsigned int size) { static void zfree_gpr(void* opaque, void* address) { gpr_free(address); } -static int zlib_compress(gpr_slice_buffer* input, gpr_slice_buffer* output, +static int zlib_compress(grpc_slice_buffer* input, grpc_slice_buffer* output, int gzip) { z_stream zs; int r; @@ -113,7 +113,7 @@ static int zlib_compress(gpr_slice_buffer* input, gpr_slice_buffer* output, r = zlib_body(&zs, input, output, deflate) && output->length < input->length; if (!r) { for (i = count_before; i < output->count; i++) { - gpr_slice_unref(output->slices[i]); + grpc_slice_unref(output->slices[i]); } output->count = count_before; output->length = length_before; @@ -122,7 +122,7 @@ static int zlib_compress(gpr_slice_buffer* input, gpr_slice_buffer* output, return r; } -static int zlib_decompress(gpr_slice_buffer* input, gpr_slice_buffer* output, +static int zlib_decompress(grpc_slice_buffer* input, grpc_slice_buffer* output, int gzip) { z_stream zs; int r; @@ -137,7 +137,7 @@ static int zlib_decompress(gpr_slice_buffer* input, gpr_slice_buffer* output, r = zlib_body(&zs, input, output, inflate); if (!r) { for (i = count_before; i < output->count; i++) { - gpr_slice_unref(output->slices[i]); + grpc_slice_unref(output->slices[i]); } output->count = count_before; output->length = length_before; @@ -146,16 +146,16 @@ static int zlib_decompress(gpr_slice_buffer* input, gpr_slice_buffer* output, return r; } -static int copy(gpr_slice_buffer* input, gpr_slice_buffer* output) { +static int copy(grpc_slice_buffer* input, grpc_slice_buffer* output) { size_t i; for (i = 0; i < input->count; i++) { - gpr_slice_buffer_add(output, gpr_slice_ref(input->slices[i])); + grpc_slice_buffer_add(output, grpc_slice_ref(input->slices[i])); } return 1; } static int compress_inner(grpc_compression_algorithm algorithm, - gpr_slice_buffer* input, gpr_slice_buffer* output) { + grpc_slice_buffer* input, grpc_slice_buffer* output) { switch (algorithm) { case GRPC_COMPRESS_NONE: /* the fallback path always needs to be send uncompressed: we simply @@ -173,7 +173,7 @@ static int compress_inner(grpc_compression_algorithm algorithm, } int grpc_msg_compress(grpc_compression_algorithm algorithm, - gpr_slice_buffer* input, gpr_slice_buffer* output) { + grpc_slice_buffer* input, grpc_slice_buffer* output) { if (!compress_inner(algorithm, input, output)) { copy(input, output); return 0; @@ -182,7 +182,7 @@ int grpc_msg_compress(grpc_compression_algorithm algorithm, } int grpc_msg_decompress(grpc_compression_algorithm algorithm, - gpr_slice_buffer* input, gpr_slice_buffer* output) { + grpc_slice_buffer* input, grpc_slice_buffer* output) { switch (algorithm) { case GRPC_COMPRESS_NONE: return copy(input, output); diff --git a/src/core/lib/compression/message_compress.h b/src/core/lib/compression/message_compress.h index c69eaaf006..d28b5a36b3 100644 --- a/src/core/lib/compression/message_compress.h +++ b/src/core/lib/compression/message_compress.h @@ -41,12 +41,12 @@ On success, appends compressed slices to output and returns 1. On failure, appends uncompressed slices to output and returns 0. */ int grpc_msg_compress(grpc_compression_algorithm algorithm, - gpr_slice_buffer* input, gpr_slice_buffer* output); + grpc_slice_buffer* input, grpc_slice_buffer* output); /* decompress 'input' to 'output' using 'algorithm'. On success, appends slices to output and returns 1. On failure, output is unchanged, and returns 0. */ int grpc_msg_decompress(grpc_compression_algorithm algorithm, - gpr_slice_buffer* input, gpr_slice_buffer* output); + grpc_slice_buffer* input, grpc_slice_buffer* output); #endif /* GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H */ diff --git a/src/core/lib/http/format_request.c b/src/core/lib/http/format_request.c index e818b70113..03f705ee97 100644 --- a/src/core/lib/http/format_request.c +++ b/src/core/lib/http/format_request.c @@ -65,7 +65,7 @@ static void fill_common_header(const grpc_httpcli_request *request, } } -gpr_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) { +grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) { gpr_strvec out; char *flat; size_t flat_len; @@ -78,10 +78,10 @@ gpr_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) { flat = gpr_strvec_flatten(&out, &flat_len); gpr_strvec_destroy(&out); - return gpr_slice_new(flat, flat_len, gpr_free); + return grpc_slice_new(flat, flat_len, gpr_free); } -gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, +grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, const char *body_bytes, size_t body_size) { gpr_strvec out; @@ -117,10 +117,10 @@ gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, out_len += body_size; } - return gpr_slice_new(tmp, out_len, gpr_free); + return grpc_slice_new(tmp, out_len, gpr_free); } -gpr_slice grpc_httpcli_format_connect_request( +grpc_slice grpc_httpcli_format_connect_request( const grpc_httpcli_request *request) { gpr_strvec out; gpr_strvec_init(&out); @@ -130,5 +130,5 @@ gpr_slice grpc_httpcli_format_connect_request( size_t flat_len; char *flat = gpr_strvec_flatten(&out, &flat_len); gpr_strvec_destroy(&out); - return gpr_slice_new(flat, flat_len, gpr_free); + return grpc_slice_new(flat, flat_len, gpr_free); } diff --git a/src/core/lib/http/format_request.h b/src/core/lib/http/format_request.h index 7abd55f2f7..939401be48 100644 --- a/src/core/lib/http/format_request.h +++ b/src/core/lib/http/format_request.h @@ -37,11 +37,11 @@ #include #include "src/core/lib/http/httpcli.h" -gpr_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request); -gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, +grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request); +grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, const char *body_bytes, size_t body_size); -gpr_slice grpc_httpcli_format_connect_request( +grpc_slice grpc_httpcli_format_connect_request( const grpc_httpcli_request *request); #endif /* GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H */ diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 26baae1eab..d52c140405 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -51,7 +51,7 @@ #include "src/core/lib/support/string.h" typedef struct { - gpr_slice request_text; + grpc_slice request_text; grpc_http_parser parser; grpc_resolved_addresses *addresses; size_t next_address; @@ -65,8 +65,8 @@ typedef struct { grpc_httpcli_context *context; grpc_polling_entity *pollent; grpc_iomgr_object iomgr_obj; - gpr_slice_buffer incoming; - gpr_slice_buffer outgoing; + grpc_slice_buffer incoming; + grpc_slice_buffer outgoing; grpc_closure on_read; grpc_closure done_write; grpc_closure connected; @@ -112,12 +112,12 @@ static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, if (req->ep != NULL) { grpc_endpoint_destroy(exec_ctx, req->ep); } - gpr_slice_unref(req->request_text); + grpc_slice_unref(req->request_text); gpr_free(req->host); gpr_free(req->ssl_host_override); grpc_iomgr_unregister_object(&req->iomgr_obj); - gpr_slice_buffer_destroy(&req->incoming); - gpr_slice_buffer_destroy(&req->outgoing); + grpc_slice_buffer_destroy(&req->incoming); + grpc_slice_buffer_destroy(&req->outgoing); GRPC_ERROR_UNREF(req->overall_error); grpc_resource_quota_internal_unref(exec_ctx, req->resource_quota); gpr_free(req); @@ -179,8 +179,8 @@ static void done_write(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } static void start_write(grpc_exec_ctx *exec_ctx, internal_request *req) { - gpr_slice_ref(req->request_text); - gpr_slice_buffer_add(&req->outgoing, req->request_text); + grpc_slice_ref(req->request_text); + grpc_slice_buffer_add(&req->outgoing, req->request_text); grpc_endpoint_write(exec_ctx, req->ep, &req->outgoing, &req->done_write); } @@ -254,7 +254,7 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_closure *on_done, grpc_httpcli_response *response, - const char *name, gpr_slice request_text) { + const char *name, grpc_slice request_text) { internal_request *req = gpr_malloc(sizeof(internal_request)); memset(req, 0, sizeof(*req)); req->request_text = request_text; @@ -269,8 +269,8 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx, req->resource_quota = grpc_resource_quota_internal_ref(resource_quota); grpc_closure_init(&req->on_read, on_read, req); grpc_closure_init(&req->done_write, done_write, req); - gpr_slice_buffer_init(&req->incoming); - gpr_slice_buffer_init(&req->outgoing); + grpc_slice_buffer_init(&req->incoming); + grpc_slice_buffer_init(&req->outgoing); grpc_iomgr_register_object(&req->iomgr_obj, name); req->host = gpr_strdup(request->host); req->ssl_host_override = gpr_strdup(request->ssl_host_override); diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index 0006e809a6..24d264c32a 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -61,7 +61,7 @@ static void httpcli_ssl_destroy(grpc_security_connector *sc) { static void httpcli_ssl_do_handshake(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { diff --git a/src/core/lib/http/parser.c b/src/core/lib/http/parser.c index be9e9b6b63..14abb1da69 100644 --- a/src/core/lib/http/parser.c +++ b/src/core/lib/http/parser.c @@ -333,7 +333,7 @@ void grpc_http_response_destroy(grpc_http_response *response) { gpr_free(response->hdrs); } -grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, gpr_slice slice, +grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, grpc_slice slice, size_t *start_of_body) { for (size_t i = 0; i < GPR_SLICE_LENGTH(slice); i++) { bool found_body_start = false; diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h index fab42979cd..102ffba05d 100644 --- a/src/core/lib/http/parser.h +++ b/src/core/lib/http/parser.h @@ -114,7 +114,7 @@ void grpc_http_parser_init(grpc_http_parser *parser, grpc_http_type type, void grpc_http_parser_destroy(grpc_http_parser *parser); /* Sets \a start_of_body to the offset in \a slice of the start of the body. */ -grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, gpr_slice slice, +grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, grpc_slice slice, size_t *start_of_body); grpc_error *grpc_http_parser_eof(grpc_http_parser *parser); diff --git a/src/core/lib/iomgr/endpoint.c b/src/core/lib/iomgr/endpoint.c index 74fa9c45df..a4b6668276 100644 --- a/src/core/lib/iomgr/endpoint.c +++ b/src/core/lib/iomgr/endpoint.c @@ -34,12 +34,12 @@ #include "src/core/lib/iomgr/endpoint.h" void grpc_endpoint_read(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep, - gpr_slice_buffer* slices, grpc_closure* cb) { + grpc_slice_buffer* slices, grpc_closure* cb) { ep->vtable->read(exec_ctx, ep, slices, cb); } void grpc_endpoint_write(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep, - gpr_slice_buffer* slices, grpc_closure* cb) { + grpc_slice_buffer* slices, grpc_closure* cb) { ep->vtable->write(exec_ctx, ep, slices, cb); } diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index 0ac5486ff5..d05998ec85 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -49,9 +49,9 @@ typedef struct grpc_endpoint_vtable grpc_endpoint_vtable; struct grpc_endpoint_vtable { void (*read)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb); + grpc_slice_buffer *slices, grpc_closure *cb); void (*write)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb); + grpc_slice_buffer *slices, grpc_closure *cb); grpc_workqueue *(*get_workqueue)(grpc_endpoint *ep); void (*add_to_pollset)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_pollset *pollset); @@ -69,7 +69,7 @@ struct grpc_endpoint_vtable { Valid slices may be placed into \a slices even when the callback is invoked with error != GRPC_ERROR_NONE. */ void grpc_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb); + grpc_slice_buffer *slices, grpc_closure *cb); char *grpc_endpoint_get_peer(grpc_endpoint *ep); @@ -87,7 +87,7 @@ grpc_workqueue *grpc_endpoint_get_workqueue(grpc_endpoint *ep); it is a valid slice buffer. */ void grpc_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb); + grpc_slice_buffer *slices, grpc_closure *cb); /* Causes any pending and future read/write callbacks to run immediately with success==0 */ diff --git a/src/core/lib/iomgr/load_file.c b/src/core/lib/iomgr/load_file.c index b62ecbc534..217bc5da59 100644 --- a/src/core/lib/iomgr/load_file.c +++ b/src/core/lib/iomgr/load_file.c @@ -44,10 +44,10 @@ #include "src/core/lib/support/string.h" grpc_error *grpc_load_file(const char *filename, int add_null_terminator, - gpr_slice *output) { + grpc_slice *output) { unsigned char *contents = NULL; size_t contents_size = 0; - gpr_slice result = gpr_empty_slice(); + grpc_slice result = gpr_empty_slice(); FILE *file; size_t bytes_read = 0; grpc_error *error = GRPC_ERROR_NONE; @@ -72,7 +72,7 @@ grpc_error *grpc_load_file(const char *filename, int add_null_terminator, if (add_null_terminator) { contents[contents_size++] = 0; } - result = gpr_slice_new(contents, contents_size, gpr_free); + result = grpc_slice_new(contents, contents_size, gpr_free); end: *output = result; diff --git a/src/core/lib/iomgr/load_file.h b/src/core/lib/iomgr/load_file.h index 9aac2225d1..31cec92cb1 100644 --- a/src/core/lib/iomgr/load_file.h +++ b/src/core/lib/iomgr/load_file.h @@ -47,7 +47,7 @@ extern "C" { /* Loads the content of a file into a slice. add_null_terminator will add a NULL terminator if non-zero. */ grpc_error *grpc_load_file(const char *filename, int add_null_terminator, - gpr_slice *slice); + grpc_slice *slice); #ifdef __cplusplus } diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 4f0d16ca7e..f047f45b43 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -269,7 +269,7 @@ static bool rq_reclaim(grpc_exec_ctx *exec_ctx, */ typedef struct { - gpr_slice_refcount base; + grpc_slice_refcount base; gpr_refcount refs; grpc_resource_user *resource_user; size_t size; @@ -286,7 +286,7 @@ static void ru_slice_unref(void *p) { /* TODO(ctiller): this is dangerous, but I think safe for now: we have no guarantee here that we're at a safe point for creating an execution context, but we have no way of writing this code otherwise. - In the future: consider lifting gpr_slice to grpc, and offering an + In the future: consider lifting grpc_slice to grpc, and offering an internal_{ref,unref} pair that is execution context aware. Alternatively, make exec_ctx be thread local and 'do the right thing' (whatever that @@ -299,7 +299,7 @@ static void ru_slice_unref(void *p) { } } -static gpr_slice ru_slice_create(grpc_resource_user *resource_user, +static grpc_slice ru_slice_create(grpc_resource_user *resource_user, size_t size) { ru_slice_refcount *rc = gpr_malloc(sizeof(ru_slice_refcount) + size); rc->base.ref = ru_slice_ref; @@ -307,7 +307,7 @@ static gpr_slice ru_slice_create(grpc_resource_user *resource_user, gpr_ref_init(&rc->refs, 1); rc->resource_user = resource_user; rc->size = size; - gpr_slice slice; + grpc_slice slice; slice.refcount = &rc->base; slice.data.refcounted.bytes = (uint8_t *)(rc + 1); slice.data.refcounted.length = size; @@ -394,7 +394,7 @@ static void ru_allocated_slices(grpc_exec_ctx *exec_ctx, void *arg, grpc_resource_user_slice_allocator *slice_allocator = arg; if (error == GRPC_ERROR_NONE) { for (size_t i = 0; i < slice_allocator->count; i++) { - gpr_slice_buffer_add_indexed( + grpc_slice_buffer_add_indexed( slice_allocator->dest, ru_slice_create(slice_allocator->resource_user, slice_allocator->length)); } @@ -711,7 +711,7 @@ void grpc_resource_user_slice_allocator_init( void grpc_resource_user_alloc_slices( grpc_exec_ctx *exec_ctx, grpc_resource_user_slice_allocator *slice_allocator, size_t length, - size_t count, gpr_slice_buffer *dest) { + size_t count, grpc_slice_buffer *dest) { slice_allocator->length = length; slice_allocator->count = count; slice_allocator->dest = dest; diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index c15cb68310..f644e5bf4d 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -202,7 +202,7 @@ typedef struct grpc_resource_user_slice_allocator { /* Number of slices to allocate on the current request */ size_t count; /* Destination for slices to allocate on the current request */ - gpr_slice_buffer *dest; + grpc_slice_buffer *dest; /* Parent resource user */ grpc_resource_user *resource_user; } grpc_resource_user_slice_allocator; @@ -218,6 +218,6 @@ void grpc_resource_user_slice_allocator_init( void grpc_resource_user_alloc_slices( grpc_exec_ctx *exec_ctx, grpc_resource_user_slice_allocator *slice_allocator, size_t length, - size_t count, gpr_slice_buffer *dest); + size_t count, grpc_slice_buffer *dest); #endif /* GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H */ diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 27b6677545..909237d84d 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -83,10 +83,10 @@ typedef struct { gpr_atm shutdown_count; /* garbage after the last read */ - gpr_slice_buffer last_read_buffer; + grpc_slice_buffer last_read_buffer; - gpr_slice_buffer *incoming_buffer; - gpr_slice_buffer *outgoing_buffer; + grpc_slice_buffer *incoming_buffer; + grpc_slice_buffer *outgoing_buffer; /** slice within outgoing_buffer to write next */ size_t outgoing_slice_idx; /** byte within outgoing_buffer->slices[outgoing_slice_idx] to write next */ @@ -130,7 +130,7 @@ static void tcp_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { grpc_fd_orphan(exec_ctx, tcp->em_fd, tcp->release_fd_cb, tcp->release_fd, "tcp_unref_orphan"); - gpr_slice_buffer_destroy(&tcp->last_read_buffer); + grpc_slice_buffer_destroy(&tcp->last_read_buffer); grpc_resource_user_destroy(exec_ctx, &tcp->resource_user); gpr_free(tcp->peer_string); gpr_free(tcp); @@ -177,7 +177,7 @@ static void tcp_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; tcp_maybe_shutdown_resource_user(exec_ctx, tcp); - gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); + grpc_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } @@ -244,19 +244,19 @@ static void tcp_do_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { /* We've consumed the edge, request a new one */ grpc_fd_notify_on_read(exec_ctx, tcp->em_fd, &tcp->read_closure); } else { - gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); + grpc_slice_buffer_reset_and_unref(tcp->incoming_buffer); call_read_cb(exec_ctx, tcp, GRPC_OS_ERROR(errno, "recvmsg")); TCP_UNREF(exec_ctx, tcp, "read"); } } else if (read_bytes == 0) { /* 0 read size ==> end of stream */ - gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); + grpc_slice_buffer_reset_and_unref(tcp->incoming_buffer); call_read_cb(exec_ctx, tcp, GRPC_ERROR_CREATE("Socket closed")); TCP_UNREF(exec_ctx, tcp, "read"); } else { GPR_ASSERT((size_t)read_bytes <= tcp->incoming_buffer->length); if ((size_t)read_bytes < tcp->incoming_buffer->length) { - gpr_slice_buffer_trim_end( + grpc_slice_buffer_trim_end( tcp->incoming_buffer, tcp->incoming_buffer->length - (size_t)read_bytes, &tcp->last_read_buffer); @@ -275,8 +275,8 @@ static void tcp_read_allocation_done(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { grpc_tcp *tcp = tcpp; if (error != GRPC_ERROR_NONE) { - gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); - gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); + grpc_slice_buffer_reset_and_unref(tcp->incoming_buffer); + grpc_slice_buffer_reset_and_unref(&tcp->last_read_buffer); call_read_cb(exec_ctx, tcp, GRPC_ERROR_REF(error)); TCP_UNREF(exec_ctx, tcp, "read"); } else { @@ -301,8 +301,8 @@ static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, GPR_ASSERT(!tcp->finished_edge); if (error != GRPC_ERROR_NONE) { - gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); - gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); + grpc_slice_buffer_reset_and_unref(tcp->incoming_buffer); + grpc_slice_buffer_reset_and_unref(&tcp->last_read_buffer); call_read_cb(exec_ctx, tcp, GRPC_ERROR_REF(error)); TCP_UNREF(exec_ctx, tcp, "read"); } else { @@ -311,13 +311,13 @@ static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, } static void tcp_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *incoming_buffer, grpc_closure *cb) { + grpc_slice_buffer *incoming_buffer, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; GPR_ASSERT(tcp->read_cb == NULL); tcp->read_cb = cb; tcp->incoming_buffer = incoming_buffer; - gpr_slice_buffer_reset_and_unref(incoming_buffer); - gpr_slice_buffer_swap(incoming_buffer, &tcp->last_read_buffer); + grpc_slice_buffer_reset_and_unref(incoming_buffer); + grpc_slice_buffer_swap(incoming_buffer, &tcp->last_read_buffer); TCP_REF(tcp, "read"); if (tcp->finished_edge) { tcp->finished_edge = false; @@ -442,7 +442,7 @@ static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, } static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *buf, grpc_closure *cb) { + grpc_slice_buffer *buf, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; grpc_error *error = GRPC_ERROR_NONE; @@ -552,7 +552,7 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, tcp->read_closure.cb_arg = tcp; tcp->write_closure.cb = tcp_handle_write; tcp->write_closure.cb_arg = tcp; - gpr_slice_buffer_init(&tcp->last_read_buffer); + grpc_slice_buffer_init(&tcp->last_read_buffer); grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); grpc_resource_user_slice_allocator_init(&tcp->slice_allocator, &tcp->resource_user, @@ -577,7 +577,7 @@ void grpc_tcp_destroy_and_release_fd(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->release_fd = fd; tcp->release_fd_cb = done; tcp_maybe_shutdown_resource_user(exec_ctx, tcp); - gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); + grpc_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 448a72671c..6f63f80021 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -105,9 +105,9 @@ typedef struct grpc_tcp { grpc_closure *read_cb; grpc_closure *write_cb; - gpr_slice read_slice; - gpr_slice_buffer *write_slices; - gpr_slice_buffer *read_slices; + grpc_slice read_slice; + grpc_slice_buffer *write_slices; + grpc_slice_buffer *read_slices; /* The IO Completion Port runs from another thread. We need some mechanism to protect ourselves when requesting a shutdown. */ @@ -160,7 +160,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { grpc_tcp *tcp = tcpp; grpc_closure *cb = tcp->read_cb; grpc_winsocket *socket = tcp->socket; - gpr_slice sub; + grpc_slice sub; grpc_winsocket_callback_info *info = &socket->read_info; GRPC_ERROR_REF(error); @@ -170,13 +170,13 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { char *utf8_message = gpr_format_message(info->wsa_error); error = GRPC_ERROR_CREATE(utf8_message); gpr_free(utf8_message); - gpr_slice_unref(tcp->read_slice); + grpc_slice_unref(tcp->read_slice); } else { if (info->bytes_transfered != 0 && !tcp->shutting_down) { - sub = gpr_slice_sub_no_ref(tcp->read_slice, 0, info->bytes_transfered); - gpr_slice_buffer_add(tcp->read_slices, sub); + sub = grpc_slice_sub_no_ref(tcp->read_slice, 0, info->bytes_transfered); + grpc_slice_buffer_add(tcp->read_slices, sub); } else { - gpr_slice_unref(tcp->read_slice); + grpc_slice_unref(tcp->read_slice); error = GRPC_ERROR_CREATE("End of TCP stream"); } } @@ -188,7 +188,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { } static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *read_slices, grpc_closure *cb) { + grpc_slice_buffer *read_slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; grpc_winsocket *handle = tcp->socket; grpc_winsocket_callback_info *info = &handle->read_info; @@ -205,9 +205,9 @@ static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->read_cb = cb; tcp->read_slices = read_slices; - gpr_slice_buffer_reset_and_unref(read_slices); + grpc_slice_buffer_reset_and_unref(read_slices); - tcp->read_slice = gpr_slice_malloc(8192); + tcp->read_slice = grpc_slice_malloc(8192); buffer.len = (ULONG)GPR_SLICE_LENGTH( tcp->read_slice); // we know slice size fits in 32bit. @@ -273,7 +273,7 @@ static void on_write(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { /* Initiates a write. */ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; grpc_winsocket *socket = tcp->socket; grpc_winsocket_callback_info *info = &socket->write_info; diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 6fb5b5b15a..85b3bc5350 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -141,8 +141,8 @@ grpc_channel_credentials_duplicate_without_call_credentials( /* --- grpc_credentials_md. --- */ typedef struct { - gpr_slice key; - gpr_slice value; + grpc_slice key; + grpc_slice value; } grpc_credentials_md; typedef struct { @@ -157,7 +157,7 @@ grpc_credentials_md_store *grpc_credentials_md_store_create( /* Will ref key and value. */ void grpc_credentials_md_store_add(grpc_credentials_md_store *store, - gpr_slice key, gpr_slice value); + grpc_slice key, grpc_slice value); void grpc_credentials_md_store_add_cstrings(grpc_credentials_md_store *store, const char *key, const char *value); grpc_credentials_md_store *grpc_credentials_md_store_ref( diff --git a/src/core/lib/security/credentials/credentials_metadata.c b/src/core/lib/security/credentials/credentials_metadata.c index 6a352aab3a..e6cb567734 100644 --- a/src/core/lib/security/credentials/credentials_metadata.c +++ b/src/core/lib/security/credentials/credentials_metadata.c @@ -59,11 +59,11 @@ grpc_credentials_md_store *grpc_credentials_md_store_create( } void grpc_credentials_md_store_add(grpc_credentials_md_store *store, - gpr_slice key, gpr_slice value) { + grpc_slice key, grpc_slice value) { if (store == NULL) return; store_ensure_capacity(store); - store->entries[store->num_entries].key = gpr_slice_ref(key); - store->entries[store->num_entries].value = gpr_slice_ref(value); + store->entries[store->num_entries].key = grpc_slice_ref(key); + store->entries[store->num_entries].value = grpc_slice_ref(value); store->num_entries++; } @@ -72,9 +72,9 @@ void grpc_credentials_md_store_add_cstrings(grpc_credentials_md_store *store, const char *value) { if (store == NULL) return; store_ensure_capacity(store); - store->entries[store->num_entries].key = gpr_slice_from_copied_string(key); + store->entries[store->num_entries].key = grpc_slice_from_copied_string(key); store->entries[store->num_entries].value = - gpr_slice_from_copied_string(value); + grpc_slice_from_copied_string(value); store->num_entries++; } @@ -91,8 +91,8 @@ void grpc_credentials_md_store_unref(grpc_credentials_md_store *store) { if (store->entries != NULL) { size_t i; for (i = 0; i < store->num_entries; i++) { - gpr_slice_unref(store->entries[i].key); - gpr_slice_unref(store->entries[i].value); + grpc_slice_unref(store->entries[i].key); + grpc_slice_unref(store->entries[i].value); } gpr_free(store->entries); } diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index cb5ba554b0..b92f29a0d8 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -174,7 +174,7 @@ static grpc_error *create_default_creds_from_path( grpc_auth_json_key key; grpc_auth_refresh_token token; grpc_call_credentials *result = NULL; - gpr_slice creds_data = gpr_empty_slice(); + grpc_slice creds_data = gpr_empty_slice(); grpc_error *error = GRPC_ERROR_NONE; if (creds_path == NULL) { error = GRPC_ERROR_CREATE("creds_path unset"); @@ -224,7 +224,7 @@ static grpc_error *create_default_creds_from_path( end: GPR_ASSERT((result == NULL) + (error == GRPC_ERROR_NONE) == 1); if (creds_path != NULL) gpr_free(creds_path); - gpr_slice_unref(creds_data); + grpc_slice_unref(creds_data); if (json != NULL) grpc_json_destroy(json); *creds = result; return error; diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index 43eb642515..9cb8cd64f6 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -85,7 +85,7 @@ static const EVP_MD *evp_md_from_alg(const char *alg) { } static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, - gpr_slice *buffer) { + grpc_slice *buffer) { grpc_json *json; *buffer = grpc_base64_decode_with_len(str, len, 1); @@ -96,7 +96,7 @@ static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, json = grpc_json_parse_string_with_len((char *)GPR_SLICE_START_PTR(*buffer), GPR_SLICE_LENGTH(*buffer)); if (json == NULL) { - gpr_slice_unref(*buffer); + grpc_slice_unref(*buffer); gpr_log(GPR_ERROR, "JSON parsing error."); } return json; @@ -129,16 +129,16 @@ typedef struct { const char *kid; const char *typ; /* TODO(jboeuf): Add others as needed (jku, jwk, x5u, x5c and so on...). */ - gpr_slice buffer; + grpc_slice buffer; } jose_header; static void jose_header_destroy(jose_header *h) { - gpr_slice_unref(h->buffer); + grpc_slice_unref(h->buffer); gpr_free(h); } /* Takes ownership of json and buffer. */ -static jose_header *jose_header_from_json(grpc_json *json, gpr_slice buffer) { +static jose_header *jose_header_from_json(grpc_json *json, grpc_slice buffer) { grpc_json *cur; jose_header *h = gpr_malloc(sizeof(jose_header)); memset(h, 0, sizeof(jose_header)); @@ -190,12 +190,12 @@ struct grpc_jwt_claims { gpr_timespec nbf; grpc_json *json; - gpr_slice buffer; + grpc_slice buffer; }; void grpc_jwt_claims_destroy(grpc_jwt_claims *claims) { grpc_json_destroy(claims->json); - gpr_slice_unref(claims->buffer); + grpc_slice_unref(claims->buffer); gpr_free(claims); } @@ -240,7 +240,7 @@ gpr_timespec grpc_jwt_claims_not_before(const grpc_jwt_claims *claims) { } /* Takes ownership of json and buffer even in case of failure. */ -grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, gpr_slice buffer) { +grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, grpc_slice buffer) { grpc_json *cur; grpc_jwt_claims *claims = gpr_malloc(sizeof(grpc_jwt_claims)); memset(claims, 0, sizeof(grpc_jwt_claims)); @@ -333,8 +333,8 @@ typedef struct { jose_header *header; grpc_jwt_claims *claims; char *audience; - gpr_slice signature; - gpr_slice signed_data; + grpc_slice signature; + grpc_slice signed_data; void *user_data; grpc_jwt_verification_done_cb user_cb; grpc_http_response responses[HTTP_RESPONSE_COUNT]; @@ -343,7 +343,7 @@ typedef struct { /* Takes ownership of the header, claims and signature. */ static verifier_cb_ctx *verifier_cb_ctx_create( grpc_jwt_verifier *verifier, grpc_pollset *pollset, jose_header *header, - grpc_jwt_claims *claims, const char *audience, gpr_slice signature, + grpc_jwt_claims *claims, const char *audience, grpc_slice signature, const char *signed_jwt, size_t signed_jwt_len, void *user_data, grpc_jwt_verification_done_cb cb) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -355,7 +355,7 @@ static verifier_cb_ctx *verifier_cb_ctx_create( ctx->audience = gpr_strdup(audience); ctx->claims = claims; ctx->signature = signature; - ctx->signed_data = gpr_slice_from_copied_buffer(signed_jwt, signed_jwt_len); + ctx->signed_data = grpc_slice_from_copied_buffer(signed_jwt, signed_jwt_len); ctx->user_data = user_data; ctx->user_cb = cb; grpc_exec_ctx_finish(&exec_ctx); @@ -365,8 +365,8 @@ static verifier_cb_ctx *verifier_cb_ctx_create( void verifier_cb_ctx_destroy(verifier_cb_ctx *ctx) { if (ctx->audience != NULL) gpr_free(ctx->audience); if (ctx->claims != NULL) grpc_jwt_claims_destroy(ctx->claims); - gpr_slice_unref(ctx->signature); - gpr_slice_unref(ctx->signed_data); + grpc_slice_unref(ctx->signature); + grpc_slice_unref(ctx->signed_data); jose_header_destroy(ctx->header); for (size_t i = 0; i < HTTP_RESPONSE_COUNT; i++) { grpc_http_response_destroy(&ctx->responses[i]); @@ -449,7 +449,7 @@ end: static BIGNUM *bignum_from_base64(const char *b64) { BIGNUM *result = NULL; - gpr_slice bin; + grpc_slice bin; if (b64 == NULL) return NULL; bin = grpc_base64_decode(b64, 1); @@ -459,7 +459,7 @@ static BIGNUM *bignum_from_base64(const char *b64) { } result = BN_bin2bn(GPR_SLICE_START_PTR(bin), TSI_SIZE_AS_SIZE(GPR_SLICE_LENGTH(bin)), NULL); - gpr_slice_unref(bin); + grpc_slice_unref(bin); return result; } @@ -553,7 +553,7 @@ static EVP_PKEY *find_verification_key(const grpc_json *json, } static int verify_jwt_signature(EVP_PKEY *key, const char *alg, - gpr_slice signature, gpr_slice signed_data) { + grpc_slice signature, grpc_slice signed_data) { EVP_MD_CTX *md_ctx = EVP_MD_CTX_create(); const EVP_MD *md = evp_md_from_alg(alg); int result = 0; @@ -799,9 +799,9 @@ void grpc_jwt_verifier_verify(grpc_exec_ctx *exec_ctx, grpc_json *json; jose_header *header = NULL; grpc_jwt_claims *claims = NULL; - gpr_slice header_buffer; - gpr_slice claims_buffer; - gpr_slice signature; + grpc_slice header_buffer; + grpc_slice claims_buffer; + grpc_slice signature; size_t signed_jwt_len; const char *cur = jwt; diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h index b0f6d1c240..e05a9f1824 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.h +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h @@ -129,7 +129,7 @@ void grpc_jwt_verifier_verify(grpc_exec_ctx *exec_ctx, /* --- TESTING ONLY exposed functions. --- */ -grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, gpr_slice buffer); +grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, grpc_slice buffer); grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims, const char *audience); diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.c b/src/core/lib/security/credentials/plugin/plugin_credentials.c index 905de3723e..61c10862da 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.c +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.c @@ -93,15 +93,15 @@ static void plugin_md_request_metadata_ready(void *request, } else if (num_md > 0) { md_array = gpr_malloc(num_md * sizeof(grpc_credentials_md)); for (i = 0; i < num_md; i++) { - md_array[i].key = gpr_slice_from_copied_string(md[i].key); + md_array[i].key = grpc_slice_from_copied_string(md[i].key); md_array[i].value = - gpr_slice_from_copied_buffer(md[i].value, md[i].value_length); + grpc_slice_from_copied_buffer(md[i].value, md[i].value_length); } r->cb(&exec_ctx, r->user_data, md_array, num_md, GRPC_CREDENTIALS_OK, NULL); for (i = 0; i < num_md; i++) { - gpr_slice_unref(md_array[i].key); - gpr_slice_unref(md_array[i].value); + grpc_slice_unref(md_array[i].key); + grpc_slice_unref(md_array[i].value); } gpr_free(md_array); } diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index b366d1410f..cd4769ea10 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -92,7 +92,7 @@ static void bubble_up_error(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_status_code status, const char *error_msg) { call_data *calld = elem->call_data; gpr_log(GPR_ERROR, "Client side authentication failure: %s", error_msg); - gpr_slice error_slice = gpr_slice_from_copied_string(error_msg); + grpc_slice error_slice = grpc_slice_from_copied_string(error_msg); grpc_transport_stream_op_add_close(&calld->op, status, &error_slice); grpc_call_next_op(exec_ctx, elem, &calld->op); } @@ -121,8 +121,8 @@ static void on_credentials_metadata(grpc_exec_ctx *exec_ctx, void *user_data, for (i = 0; i < num_md; i++) { grpc_metadata_batch_add_tail( mdb, &calld->md_links[i], - grpc_mdelem_from_slices(gpr_slice_ref(md_elems[i].key), - gpr_slice_ref(md_elems[i].value))); + grpc_mdelem_from_slices(grpc_slice_ref(md_elems[i].key), + grpc_slice_ref(md_elems[i].value))); } grpc_call_next_op(exec_ctx, elem, op); } diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index fbeec312b6..2d33521d94 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -54,9 +54,9 @@ typedef struct { size_t handshake_buffer_size; grpc_endpoint *wrapped_endpoint; grpc_endpoint *secure_endpoint; - gpr_slice_buffer left_overs; - gpr_slice_buffer incoming; - gpr_slice_buffer outgoing; + grpc_slice_buffer left_overs; + grpc_slice_buffer incoming; + grpc_slice_buffer outgoing; grpc_security_handshake_done_cb cb; void *user_data; grpc_closure on_handshake_data_sent_to_peer; @@ -104,9 +104,9 @@ static void unref_handshake(grpc_security_handshake *h) { if (gpr_unref(&h->refs)) { if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker); if (h->handshake_buffer != NULL) gpr_free(h->handshake_buffer); - gpr_slice_buffer_destroy(&h->left_overs); - gpr_slice_buffer_destroy(&h->outgoing); - gpr_slice_buffer_destroy(&h->incoming); + grpc_slice_buffer_destroy(&h->left_overs); + grpc_slice_buffer_destroy(&h->outgoing); + grpc_slice_buffer_destroy(&h->incoming); GRPC_AUTH_CONTEXT_UNREF(h->auth_context, "handshake"); GRPC_SECURITY_CONNECTOR_UNREF(h->connector, "handshake"); gpr_free(h); @@ -190,7 +190,7 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h) { size_t offset = 0; tsi_result result = TSI_OK; - gpr_slice to_send; + grpc_slice to_send; do { size_t to_send_size = h->handshake_buffer_size - offset; @@ -212,9 +212,9 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, } to_send = - gpr_slice_from_copied_buffer((const char *)h->handshake_buffer, offset); - gpr_slice_buffer_reset_and_unref(&h->outgoing); - gpr_slice_buffer_add(&h->outgoing, to_send); + grpc_slice_from_copied_buffer((const char *)h->handshake_buffer, offset); + grpc_slice_buffer_reset_and_unref(&h->outgoing); + grpc_slice_buffer_add(&h->outgoing, to_send); /* TODO(klempner,jboeuf): This should probably use the client setup deadline */ grpc_endpoint_write(exec_ctx, h->wrapped_endpoint, &h->outgoing, @@ -277,13 +277,13 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, /* Put the leftovers in our buffer (ownership transfered). */ if (has_left_overs_in_current_slice) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &h->left_overs, - gpr_slice_split_tail(&h->incoming.slices[i], consumed_slice_size)); - gpr_slice_unref( + grpc_slice_split_tail(&h->incoming.slices[i], consumed_slice_size)); + grpc_slice_unref( h->incoming.slices[i]); /* split_tail above increments refcount. */ } - gpr_slice_buffer_addn( + grpc_slice_buffer_addn( &h->left_overs, &h->incoming.slices[i + 1], num_left_overs - (size_t)has_left_overs_in_current_slice); check_peer(exec_ctx, h); @@ -325,7 +325,7 @@ static void on_timeout(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { void grpc_do_security_handshake( grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, grpc_security_connector *connector, bool is_client_side, - grpc_endpoint *nonsecure_endpoint, gpr_slice_buffer *read_buffer, + grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { grpc_security_connector_handshake_list *handshake_node; @@ -344,11 +344,11 @@ void grpc_do_security_handshake( on_handshake_data_sent_to_peer, h); grpc_closure_init(&h->on_handshake_data_received_from_peer, on_handshake_data_received_from_peer, h); - gpr_slice_buffer_init(&h->left_overs); - gpr_slice_buffer_init(&h->outgoing); - gpr_slice_buffer_init(&h->incoming); + grpc_slice_buffer_init(&h->left_overs); + grpc_slice_buffer_init(&h->outgoing); + grpc_slice_buffer_init(&h->incoming); if (read_buffer != NULL) { - gpr_slice_buffer_move_into(read_buffer, &h->incoming); + grpc_slice_buffer_move_into(read_buffer, &h->incoming); gpr_free(read_buffer); } if (!is_client_side) { diff --git a/src/core/lib/security/transport/handshake.h b/src/core/lib/security/transport/handshake.h index 53092f5421..f894540515 100644 --- a/src/core/lib/security/transport/handshake.h +++ b/src/core/lib/security/transport/handshake.h @@ -42,7 +42,7 @@ void grpc_do_security_handshake( grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, grpc_security_connector *connector, bool is_client_side, - grpc_endpoint *nonsecure_endpoint, gpr_slice_buffer *read_buffer, + grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); void grpc_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, void *handshake); diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 3924997d31..865a0ec4cf 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -54,15 +54,15 @@ typedef struct { grpc_closure *read_cb; grpc_closure *write_cb; grpc_closure on_read; - gpr_slice_buffer *read_buffer; - gpr_slice_buffer source_buffer; + grpc_slice_buffer *read_buffer; + grpc_slice_buffer source_buffer; /* saved handshaker leftover data to unprotect. */ - gpr_slice_buffer leftover_bytes; + grpc_slice_buffer leftover_bytes; /* buffers for read and write */ - gpr_slice read_staging_buffer; + grpc_slice read_staging_buffer; - gpr_slice write_staging_buffer; - gpr_slice_buffer output_buffer; + grpc_slice write_staging_buffer; + grpc_slice_buffer output_buffer; gpr_refcount ref; } secure_endpoint; @@ -73,11 +73,11 @@ static void destroy(grpc_exec_ctx *exec_ctx, secure_endpoint *secure_ep) { secure_endpoint *ep = secure_ep; grpc_endpoint_destroy(exec_ctx, ep->wrapped_ep); tsi_frame_protector_destroy(ep->protector); - gpr_slice_buffer_destroy(&ep->leftover_bytes); - gpr_slice_unref(ep->read_staging_buffer); - gpr_slice_unref(ep->write_staging_buffer); - gpr_slice_buffer_destroy(&ep->output_buffer); - gpr_slice_buffer_destroy(&ep->source_buffer); + grpc_slice_buffer_destroy(&ep->leftover_bytes); + grpc_slice_unref(ep->read_staging_buffer); + grpc_slice_unref(ep->write_staging_buffer); + grpc_slice_buffer_destroy(&ep->output_buffer); + grpc_slice_buffer_destroy(&ep->source_buffer); gpr_mu_destroy(&ep->protector_mu); gpr_free(ep); } @@ -121,8 +121,8 @@ static void secure_endpoint_ref(secure_endpoint *ep) { gpr_ref(&ep->ref); } static void flush_read_staging_buffer(secure_endpoint *ep, uint8_t **cur, uint8_t **end) { - gpr_slice_buffer_add(ep->read_buffer, ep->read_staging_buffer); - ep->read_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); + grpc_slice_buffer_add(ep->read_buffer, ep->read_staging_buffer); + ep->read_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); *cur = GPR_SLICE_START_PTR(ep->read_staging_buffer); *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); } @@ -153,7 +153,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, uint8_t *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); if (error != GRPC_ERROR_NONE) { - gpr_slice_buffer_reset_and_unref(ep->read_buffer); + grpc_slice_buffer_reset_and_unref(ep->read_buffer); call_read_cb(exec_ctx, ep, GRPC_ERROR_CREATE_REFERENCING( "Secure read failed", &error, 1)); return; @@ -161,7 +161,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, /* TODO(yangg) check error, maybe bail out early */ for (i = 0; i < ep->source_buffer.count; i++) { - gpr_slice encrypted = ep->source_buffer.slices[i]; + grpc_slice encrypted = ep->source_buffer.slices[i]; uint8_t *message_bytes = GPR_SLICE_START_PTR(encrypted); size_t message_size = GPR_SLICE_LENGTH(encrypted); @@ -199,19 +199,19 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, } if (cur != GPR_SLICE_START_PTR(ep->read_staging_buffer)) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( ep->read_buffer, - gpr_slice_split_head( + grpc_slice_split_head( &ep->read_staging_buffer, (size_t)(cur - GPR_SLICE_START_PTR(ep->read_staging_buffer)))); } /* TODO(yangg) experiment with moving this block after read_cb to see if it helps latency */ - gpr_slice_buffer_reset_and_unref(&ep->source_buffer); + grpc_slice_buffer_reset_and_unref(&ep->source_buffer); if (result != TSI_OK) { - gpr_slice_buffer_reset_and_unref(ep->read_buffer); + grpc_slice_buffer_reset_and_unref(ep->read_buffer); call_read_cb(exec_ctx, ep, grpc_set_tsi_error_result( GRPC_ERROR_CREATE("Unwrap failed"), result)); return; @@ -221,15 +221,15 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, } static void endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { secure_endpoint *ep = (secure_endpoint *)secure_ep; ep->read_cb = cb; ep->read_buffer = slices; - gpr_slice_buffer_reset_and_unref(ep->read_buffer); + grpc_slice_buffer_reset_and_unref(ep->read_buffer); SECURE_ENDPOINT_REF(ep, "read"); if (ep->leftover_bytes.count) { - gpr_slice_buffer_swap(&ep->leftover_bytes, &ep->source_buffer); + grpc_slice_buffer_swap(&ep->leftover_bytes, &ep->source_buffer); GPR_ASSERT(ep->leftover_bytes.count == 0); on_read(exec_ctx, ep, GRPC_ERROR_NONE); return; @@ -241,14 +241,14 @@ static void endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, static void flush_write_staging_buffer(secure_endpoint *ep, uint8_t **cur, uint8_t **end) { - gpr_slice_buffer_add(&ep->output_buffer, ep->write_staging_buffer); - ep->write_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); + grpc_slice_buffer_add(&ep->output_buffer, ep->write_staging_buffer); + ep->write_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); } static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { GPR_TIMER_BEGIN("secure_endpoint.endpoint_write", 0); unsigned i; @@ -257,7 +257,7 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, uint8_t *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); uint8_t *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); - gpr_slice_buffer_reset_and_unref(&ep->output_buffer); + grpc_slice_buffer_reset_and_unref(&ep->output_buffer); if (grpc_trace_secure_endpoint) { for (i = 0; i < slices->count; i++) { @@ -269,7 +269,7 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, } for (i = 0; i < slices->count; i++) { - gpr_slice plain = slices->slices[i]; + grpc_slice plain = slices->slices[i]; uint8_t *message_bytes = GPR_SLICE_START_PTR(plain); size_t message_size = GPR_SLICE_LENGTH(plain); while (message_size > 0) { @@ -311,9 +311,9 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, } } while (still_pending_size > 0); if (cur != GPR_SLICE_START_PTR(ep->write_staging_buffer)) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &ep->output_buffer, - gpr_slice_split_head( + grpc_slice_split_head( &ep->write_staging_buffer, (size_t)(cur - GPR_SLICE_START_PTR(ep->write_staging_buffer)))); } @@ -321,7 +321,7 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, if (result != TSI_OK) { /* TODO(yangg) do different things according to the error type? */ - gpr_slice_buffer_reset_and_unref(&ep->output_buffer); + grpc_slice_buffer_reset_and_unref(&ep->output_buffer); grpc_exec_ctx_sched( exec_ctx, cb, grpc_set_tsi_error_result(GRPC_ERROR_CREATE("Wrap failed"), result), @@ -388,21 +388,21 @@ static const grpc_endpoint_vtable vtable = {endpoint_read, grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *transport, - gpr_slice *leftover_slices, size_t leftover_nslices) { + grpc_slice *leftover_slices, size_t leftover_nslices) { size_t i; secure_endpoint *ep = (secure_endpoint *)gpr_malloc(sizeof(secure_endpoint)); ep->base.vtable = &vtable; ep->wrapped_ep = transport; ep->protector = protector; - gpr_slice_buffer_init(&ep->leftover_bytes); + grpc_slice_buffer_init(&ep->leftover_bytes); for (i = 0; i < leftover_nslices; i++) { - gpr_slice_buffer_add(&ep->leftover_bytes, - gpr_slice_ref(leftover_slices[i])); + grpc_slice_buffer_add(&ep->leftover_bytes, + grpc_slice_ref(leftover_slices[i])); } - ep->write_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); - ep->read_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); - gpr_slice_buffer_init(&ep->output_buffer); - gpr_slice_buffer_init(&ep->source_buffer); + ep->write_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); + ep->read_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); + grpc_slice_buffer_init(&ep->output_buffer); + grpc_slice_buffer_init(&ep->source_buffer); ep->read_buffer = NULL; grpc_closure_init(&ep->on_read, on_read, ep); gpr_mu_init(&ep->protector_mu); diff --git a/src/core/lib/security/transport/secure_endpoint.h b/src/core/lib/security/transport/secure_endpoint.h index d00075b769..986e5e9f2e 100644 --- a/src/core/lib/security/transport/secure_endpoint.h +++ b/src/core/lib/security/transport/secure_endpoint.h @@ -44,6 +44,6 @@ extern int grpc_trace_secure_endpoint; /* Takes ownership of protector and to_wrap, and refs leftover_slices. */ grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *to_wrap, - gpr_slice *leftover_slices, size_t leftover_nslices); + grpc_slice *leftover_slices, size_t leftover_nslices); #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H */ diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 0eca46eb52..9de69f2288 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -127,7 +127,7 @@ void grpc_server_security_connector_shutdown( void grpc_channel_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, - grpc_endpoint *nonsecure_endpoint, gpr_slice_buffer *read_buffer, + grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { if (sc == NULL || nonsecure_endpoint == NULL) { @@ -142,7 +142,7 @@ void grpc_channel_security_connector_do_handshake( void grpc_server_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { if (sc == NULL || nonsecure_endpoint == NULL) { gpr_free(read_buffer); @@ -316,7 +316,7 @@ static void fake_channel_check_call_host(grpc_exec_ctx *exec_ctx, static void fake_channel_do_handshake(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { @@ -328,7 +328,7 @@ static void fake_channel_do_handshake(grpc_exec_ctx *exec_ctx, static void fake_server_do_handshake( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { grpc_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(0), &sc->base, false, nonsecure_endpoint, read_buffer, deadline, @@ -422,7 +422,7 @@ static grpc_security_status ssl_create_handshaker( static void ssl_channel_do_handshake(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { @@ -447,7 +447,7 @@ static void ssl_channel_do_handshake(grpc_exec_ctx *exec_ctx, static void ssl_server_do_handshake( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { grpc_ssl_server_security_connector *c = (grpc_ssl_server_security_connector *)sc; @@ -642,8 +642,8 @@ static grpc_security_connector_vtable ssl_channel_vtable = { static grpc_security_connector_vtable ssl_server_vtable = { ssl_server_destroy, ssl_server_check_peer}; -static gpr_slice compute_default_pem_root_certs_once(void) { - gpr_slice result = gpr_empty_slice(); +static grpc_slice compute_default_pem_root_certs_once(void) { + grpc_slice result = gpr_empty_slice(); /* First try to load the roots from the environment. */ char *default_root_certs_path = @@ -661,7 +661,7 @@ static gpr_slice compute_default_pem_root_certs_once(void) { ovrd_res = ssl_roots_override_cb(&pem_root_certs); if (ovrd_res == GRPC_SSL_ROOTS_OVERRIDE_OK) { GPR_ASSERT(pem_root_certs != NULL); - result = gpr_slice_new(pem_root_certs, strlen(pem_root_certs), gpr_free); + result = grpc_slice_new(pem_root_certs, strlen(pem_root_certs), gpr_free); } } @@ -674,13 +674,13 @@ static gpr_slice compute_default_pem_root_certs_once(void) { return result; } -static gpr_slice default_pem_root_certs; +static grpc_slice default_pem_root_certs; static void init_default_pem_root_certs(void) { default_pem_root_certs = compute_default_pem_root_certs_once(); } -gpr_slice grpc_get_default_ssl_roots_for_testing(void) { +grpc_slice grpc_get_default_ssl_roots_for_testing(void) { return compute_default_pem_root_certs_once(); } diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h index 0b5b44bf1a..dc02692b01 100644 --- a/src/core/lib/security/transport/security_connector.h +++ b/src/core/lib/security/transport/security_connector.h @@ -144,7 +144,7 @@ struct grpc_channel_security_connector { void (*do_handshake)(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); }; @@ -157,7 +157,7 @@ void grpc_channel_security_connector_check_call_host( /* Handshake. */ void grpc_channel_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *connector, - grpc_endpoint *nonsecure_endpoint, gpr_slice_buffer *read_buffer, + grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); /* --- server_security_connector object. --- @@ -176,14 +176,14 @@ struct grpc_server_security_connector { grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); }; void grpc_server_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); void grpc_server_security_connector_shutdown( @@ -233,7 +233,7 @@ grpc_security_status grpc_ssl_channel_security_connector_create( size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs); /* Exposed for TESTING ONLY!. */ -gpr_slice grpc_get_default_ssl_roots_for_testing(void); +grpc_slice grpc_get_default_ssl_roots_for_testing(void); /* Config for ssl servers. */ typedef struct { diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index b2c6815af8..39973ab036 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -134,14 +134,14 @@ static void on_md_processing_done( grpc_metadata_array_destroy(&calld->md); grpc_exec_ctx_sched(&exec_ctx, calld->on_done_recv, GRPC_ERROR_NONE, NULL); } else { - gpr_slice message; + grpc_slice message; grpc_transport_stream_op *close_op = gpr_malloc(sizeof(*close_op)); memset(close_op, 0, sizeof(*close_op)); grpc_metadata_array_destroy(&calld->md); error_details = error_details != NULL ? error_details : "Authentication metadata processing failed."; - message = gpr_slice_from_copied_string(error_details); + message = grpc_slice_from_copied_string(error_details); calld->transport_op->send_initial_metadata = NULL; if (calld->transport_op->send_message != NULL) { grpc_byte_stream_destroy(&exec_ctx, calld->transport_op->send_message); diff --git a/src/core/lib/security/util/b64.c b/src/core/lib/security/util/b64.c index 9da42e4e73..f4f0092c3d 100644 --- a/src/core/lib/security/util/b64.c +++ b/src/core/lib/security/util/b64.c @@ -120,7 +120,7 @@ char *grpc_base64_encode(const void *vdata, size_t data_size, int url_safe, return result; } -gpr_slice grpc_base64_decode(const char *b64, int url_safe) { +grpc_slice grpc_base64_decode(const char *b64, int url_safe) { return grpc_base64_decode_with_len(b64, strlen(b64), url_safe); } @@ -182,9 +182,9 @@ static int decode_group(const unsigned char *codes, size_t num_codes, return 1; } -gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, +grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, int url_safe) { - gpr_slice result = gpr_slice_malloc(b64_len); + grpc_slice result = grpc_slice_malloc(b64_len); unsigned char *current = GPR_SLICE_START_PTR(result); size_t result_size = 0; unsigned char codes[4]; @@ -228,6 +228,6 @@ gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, return result; fail: - gpr_slice_unref(result); + grpc_slice_unref(result); return gpr_empty_slice(); } diff --git a/src/core/lib/security/util/b64.h b/src/core/lib/security/util/b64.h index 6908095287..f1b9bb2f2e 100644 --- a/src/core/lib/security/util/b64.h +++ b/src/core/lib/security/util/b64.h @@ -43,10 +43,10 @@ char *grpc_base64_encode(const void *data, size_t data_size, int url_safe, /* Decodes data according to the base64 specification. Returns an empty slice in case of failure. */ -gpr_slice grpc_base64_decode(const char *b64, int url_safe); +grpc_slice grpc_base64_decode(const char *b64, int url_safe); /* Same as above except that the length is provided by the caller. */ -gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, +grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, int url_safe); #endif /* GRPC_CORE_LIB_SECURITY_UTIL_B64_H */ diff --git a/src/core/lib/slice/percent_encoding.c b/src/core/lib/slice/percent_encoding.c new file mode 100644 index 0000000000..ae11e225e7 --- /dev/null +++ b/src/core/lib/slice/percent_encoding.c @@ -0,0 +1,180 @@ +/* + * + * 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 "src/core/lib/support/percent_encoding.h" + +#include + +const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xff, 0x03, 0xfe, 0xff, 0xff, + 0x87, 0xfe, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; +const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8] = { + 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +static bool is_unreserved_character(uint8_t c, + const uint8_t *unreserved_bytes) { + return ((unreserved_bytes[c / 8] >> (c % 8)) & 1) != 0; +} + +grpc_slice gpr_percent_encode_slice(grpc_slice slice, + const uint8_t *unreserved_bytes) { + static const uint8_t hex[] = "0123456789ABCDEF"; + + // first pass: count the number of bytes needed to output this string + size_t output_length = 0; + const uint8_t *slice_start = GPR_SLICE_START_PTR(slice); + const uint8_t *slice_end = GPR_SLICE_END_PTR(slice); + const uint8_t *p; + bool any_reserved_bytes = false; + for (p = slice_start; p < slice_end; p++) { + bool unres = is_unreserved_character(*p, unreserved_bytes); + output_length += unres ? 1 : 3; + any_reserved_bytes |= !unres; + } + // no unreserved bytes: return the string unmodified + if (!any_reserved_bytes) { + return grpc_slice_ref(slice); + } + // second pass: actually encode + grpc_slice out = grpc_slice_malloc(output_length); + uint8_t *q = GPR_SLICE_START_PTR(out); + for (p = slice_start; p < slice_end; p++) { + if (is_unreserved_character(*p, unreserved_bytes)) { + *q++ = *p; + } else { + *q++ = '%'; + *q++ = hex[*p >> 4]; + *q++ = hex[*p & 15]; + } + } + GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); + return out; +} + +static bool valid_hex(const uint8_t *p, const uint8_t *end) { + if (p >= end) return false; + return (*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f') || + (*p >= 'A' && *p <= 'F'); +} + +static uint8_t dehex(uint8_t c) { + if (c >= '0' && c <= '9') return (uint8_t)(c - '0'); + if (c >= 'A' && c <= 'F') return (uint8_t)(c - 'A' + 10); + if (c >= 'a' && c <= 'f') return (uint8_t)(c - 'a' + 10); + GPR_UNREACHABLE_CODE(return 255); +} + +bool gpr_strict_percent_decode_slice(grpc_slice slice_in, + const uint8_t *unreserved_bytes, + grpc_slice *slice_out) { + const uint8_t *p = GPR_SLICE_START_PTR(slice_in); + const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); + size_t out_length = 0; + bool any_percent_encoded_stuff = false; + while (p != in_end) { + if (*p == '%') { + if (!valid_hex(++p, in_end)) return false; + if (!valid_hex(++p, in_end)) return false; + p++; + out_length++; + any_percent_encoded_stuff = true; + } else if (is_unreserved_character(*p, unreserved_bytes)) { + p++; + out_length++; + } else { + return false; + } + } + if (!any_percent_encoded_stuff) { + *slice_out = grpc_slice_ref(slice_in); + return true; + } + p = GPR_SLICE_START_PTR(slice_in); + *slice_out = grpc_slice_malloc(out_length); + uint8_t *q = GPR_SLICE_START_PTR(*slice_out); + while (p != in_end) { + if (*p == '%') { + *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2])); + p += 3; + } else { + *q++ = *p++; + } + } + GPR_ASSERT(q == GPR_SLICE_END_PTR(*slice_out)); + return true; +} + +grpc_slice gpr_permissive_percent_decode_slice(grpc_slice slice_in) { + const uint8_t *p = GPR_SLICE_START_PTR(slice_in); + const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); + size_t out_length = 0; + bool any_percent_encoded_stuff = false; + while (p != in_end) { + if (*p == '%') { + if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) { + p++; + out_length++; + } else { + p += 3; + out_length++; + any_percent_encoded_stuff = true; + } + } else { + p++; + out_length++; + } + } + if (!any_percent_encoded_stuff) { + return grpc_slice_ref(slice_in); + } + p = GPR_SLICE_START_PTR(slice_in); + grpc_slice out = grpc_slice_malloc(out_length); + uint8_t *q = GPR_SLICE_START_PTR(out); + while (p != in_end) { + if (*p == '%') { + if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) { + *q++ = *p++; + } else { + *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2])); + p += 3; + } + } else { + *q++ = *p++; + } + } + GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); + return out; +} diff --git a/src/core/lib/slice/percent_encoding.h b/src/core/lib/slice/percent_encoding.h new file mode 100644 index 0000000000..a560d74a79 --- /dev/null +++ b/src/core/lib/slice/percent_encoding.h @@ -0,0 +1,78 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H +#define GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H + +/* Percent encoding and decoding of slices. + Transforms arbitrary strings into safe-for-transmission strings by using + variants of percent encoding (RFC 3986). + Two major variants are supplied: one that strictly matches URL encoding, + and another which applies percent encoding only to non-http2 header + bytes (the 'compatible' variant) */ + +#include + +#include + +/* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in + gpr_percent_encode_slice, gpr_strict_percent_decode_slice). + Flags [A-Za-z0-9-_.~] as unreserved bytes for the percent encoding routines + */ +extern const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8]; +/* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in + gpr_percent_encode_slice, gpr_strict_percent_decode_slice). + Flags ascii7 non-control characters excluding '%' as unreserved bytes for the + percent encoding routines */ +extern const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8]; + +/* Percent-encode a slice, returning the new slice (this cannot fail): + unreserved_bytes is a bitfield indicating which bytes are considered + unreserved and thus do not need percent encoding */ +grpc_slice gpr_percent_encode_slice(grpc_slice slice, + const uint8_t *unreserved_bytes); +/* Percent-decode a slice, strictly. + If the input is legal (contains no unreserved bytes, and legal % encodings), + returns true and sets *slice_out to the decoded slice. + If the input is not legal, returns false and leaves *slice_out untouched. + unreserved_bytes is a bitfield indicating which bytes are considered + unreserved and thus do not need percent encoding */ +bool gpr_strict_percent_decode_slice(grpc_slice slice_in, + const uint8_t *unreserved_bytes, + grpc_slice *slice_out); +/* Percent-decode a slice, permissively. + If a % triplet can not be decoded, pass it through verbatim. + This cannot fail. */ +grpc_slice gpr_permissive_percent_decode_slice(grpc_slice slice_in); + +#endif /* GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H */ diff --git a/src/core/lib/slice/slice.c b/src/core/lib/slice/slice.c new file mode 100644 index 0000000000..602dd86eca --- /dev/null +++ b/src/core/lib/slice/slice.c @@ -0,0 +1,350 @@ +/* + * + * Copyright 2015, 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 +#include +#include + +#include + +grpc_slice gpr_empty_slice(void) { + grpc_slice out; + out.refcount = 0; + out.data.inlined.length = 0; + return out; +} + +grpc_slice grpc_slice_ref(grpc_slice slice) { + if (slice.refcount) { + slice.refcount->ref(slice.refcount); + } + return slice; +} + +void grpc_slice_unref(grpc_slice slice) { + if (slice.refcount) { + slice.refcount->unref(slice.refcount); + } +} + +/* grpc_slice_from_static_string support structure - a refcount that does + nothing */ +static void noop_ref_or_unref(void *unused) {} + +static grpc_slice_refcount noop_refcount = {noop_ref_or_unref, + noop_ref_or_unref}; + +grpc_slice grpc_slice_from_static_string(const char *s) { + grpc_slice slice; + slice.refcount = &noop_refcount; + slice.data.refcounted.bytes = (uint8_t *)s; + slice.data.refcounted.length = strlen(s); + return slice; +} + +/* grpc_slice_new support structures - we create a refcount object extended + with the user provided data pointer & destroy function */ +typedef struct new_slice_refcount { + grpc_slice_refcount rc; + gpr_refcount refs; + void (*user_destroy)(void *); + void *user_data; +} new_slice_refcount; + +static void new_slice_ref(void *p) { + new_slice_refcount *r = p; + gpr_ref(&r->refs); +} + +static void new_slice_unref(void *p) { + new_slice_refcount *r = p; + if (gpr_unref(&r->refs)) { + r->user_destroy(r->user_data); + gpr_free(r); + } +} + +grpc_slice grpc_slice_new_with_user_data(void *p, size_t len, + void (*destroy)(void *), + void *user_data) { + grpc_slice slice; + new_slice_refcount *rc = gpr_malloc(sizeof(new_slice_refcount)); + gpr_ref_init(&rc->refs, 1); + rc->rc.ref = new_slice_ref; + rc->rc.unref = new_slice_unref; + rc->user_destroy = destroy; + rc->user_data = user_data; + + slice.refcount = &rc->rc; + slice.data.refcounted.bytes = p; + slice.data.refcounted.length = len; + return slice; +} + +grpc_slice grpc_slice_new(void *p, size_t len, void (*destroy)(void *)) { + /* Pass "p" to *destroy when the slice is no longer needed. */ + return grpc_slice_new_with_user_data(p, len, destroy, p); +} + +/* grpc_slice_new_with_len support structures - we create a refcount object + extended with the user provided data pointer & destroy function */ +typedef struct new_with_len_slice_refcount { + grpc_slice_refcount rc; + gpr_refcount refs; + void *user_data; + size_t user_length; + void (*user_destroy)(void *, size_t); +} new_with_len_slice_refcount; + +static void new_with_len_ref(void *p) { + new_with_len_slice_refcount *r = p; + gpr_ref(&r->refs); +} + +static void new_with_len_unref(void *p) { + new_with_len_slice_refcount *r = p; + if (gpr_unref(&r->refs)) { + r->user_destroy(r->user_data, r->user_length); + gpr_free(r); + } +} + +grpc_slice grpc_slice_new_with_len(void *p, size_t len, + void (*destroy)(void *, size_t)) { + grpc_slice slice; + new_with_len_slice_refcount *rc = + gpr_malloc(sizeof(new_with_len_slice_refcount)); + gpr_ref_init(&rc->refs, 1); + rc->rc.ref = new_with_len_ref; + rc->rc.unref = new_with_len_unref; + rc->user_destroy = destroy; + rc->user_data = p; + rc->user_length = len; + + slice.refcount = &rc->rc; + slice.data.refcounted.bytes = p; + slice.data.refcounted.length = len; + return slice; +} + +grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t length) { + grpc_slice slice = grpc_slice_malloc(length); + memcpy(GPR_SLICE_START_PTR(slice), source, length); + return slice; +} + +grpc_slice grpc_slice_from_copied_string(const char *source) { + return grpc_slice_from_copied_buffer(source, strlen(source)); +} + +typedef struct { + grpc_slice_refcount base; + gpr_refcount refs; +} malloc_refcount; + +static void malloc_ref(void *p) { + malloc_refcount *r = p; + gpr_ref(&r->refs); +} + +static void malloc_unref(void *p) { + malloc_refcount *r = p; + if (gpr_unref(&r->refs)) { + gpr_free(r); + } +} + +grpc_slice grpc_slice_malloc(size_t length) { + grpc_slice slice; + + if (length > sizeof(slice.data.inlined.bytes)) { + /* Memory layout used by the slice created here: + + +-----------+----------------------------------------------------------+ + | refcount | bytes | + +-----------+----------------------------------------------------------+ + + refcount is a malloc_refcount + bytes is an array of bytes of the requested length + Both parts are placed in the same allocation returned from gpr_malloc */ + malloc_refcount *rc = gpr_malloc(sizeof(malloc_refcount) + length); + + /* Initial refcount on rc is 1 - and it's up to the caller to release + this reference. */ + gpr_ref_init(&rc->refs, 1); + + rc->base.ref = malloc_ref; + rc->base.unref = malloc_unref; + + /* Build up the slice to be returned. */ + /* The slices refcount points back to the allocated block. */ + slice.refcount = &rc->base; + /* The data bytes are placed immediately after the refcount struct */ + slice.data.refcounted.bytes = (uint8_t *)(rc + 1); + /* And the length of the block is set to the requested length */ + slice.data.refcounted.length = length; + } else { + /* small slice: just inline the data */ + slice.refcount = NULL; + slice.data.inlined.length = (uint8_t)length; + } + return slice; +} + +grpc_slice grpc_slice_sub_no_ref(grpc_slice source, size_t begin, size_t end) { + grpc_slice subset; + + GPR_ASSERT(end >= begin); + + if (source.refcount) { + /* Enforce preconditions */ + GPR_ASSERT(source.data.refcounted.length >= end); + + /* Build the result */ + subset.refcount = source.refcount; + /* Point into the source array */ + subset.data.refcounted.bytes = source.data.refcounted.bytes + begin; + subset.data.refcounted.length = end - begin; + } else { + /* Enforce preconditions */ + GPR_ASSERT(source.data.inlined.length >= end); + subset.refcount = NULL; + subset.data.inlined.length = (uint8_t)(end - begin); + memcpy(subset.data.inlined.bytes, source.data.inlined.bytes + begin, + end - begin); + } + return subset; +} + +grpc_slice grpc_slice_sub(grpc_slice source, size_t begin, size_t end) { + grpc_slice subset; + + if (end - begin <= sizeof(subset.data.inlined.bytes)) { + subset.refcount = NULL; + subset.data.inlined.length = (uint8_t)(end - begin); + memcpy(subset.data.inlined.bytes, GPR_SLICE_START_PTR(source) + begin, + end - begin); + } else { + subset = grpc_slice_sub_no_ref(source, begin, end); + /* Bump the refcount */ + subset.refcount->ref(subset.refcount); + } + return subset; +} + +grpc_slice grpc_slice_split_tail(grpc_slice *source, size_t split) { + grpc_slice tail; + + if (source->refcount == NULL) { + /* inlined data, copy it out */ + GPR_ASSERT(source->data.inlined.length >= split); + tail.refcount = NULL; + tail.data.inlined.length = (uint8_t)(source->data.inlined.length - split); + memcpy(tail.data.inlined.bytes, source->data.inlined.bytes + split, + tail.data.inlined.length); + source->data.inlined.length = (uint8_t)split; + } else { + size_t tail_length = source->data.refcounted.length - split; + GPR_ASSERT(source->data.refcounted.length >= split); + if (tail_length < sizeof(tail.data.inlined.bytes)) { + /* Copy out the bytes - it'll be cheaper than refcounting */ + tail.refcount = NULL; + tail.data.inlined.length = (uint8_t)tail_length; + memcpy(tail.data.inlined.bytes, source->data.refcounted.bytes + split, + tail_length); + } else { + /* Build the result */ + tail.refcount = source->refcount; + /* Bump the refcount */ + tail.refcount->ref(tail.refcount); + /* Point into the source array */ + tail.data.refcounted.bytes = source->data.refcounted.bytes + split; + tail.data.refcounted.length = tail_length; + } + source->data.refcounted.length = split; + } + + return tail; +} + +grpc_slice grpc_slice_split_head(grpc_slice *source, size_t split) { + grpc_slice head; + + if (source->refcount == NULL) { + GPR_ASSERT(source->data.inlined.length >= split); + + head.refcount = NULL; + head.data.inlined.length = (uint8_t)split; + memcpy(head.data.inlined.bytes, source->data.inlined.bytes, split); + source->data.inlined.length = + (uint8_t)(source->data.inlined.length - split); + memmove(source->data.inlined.bytes, source->data.inlined.bytes + split, + source->data.inlined.length); + } else if (split < sizeof(head.data.inlined.bytes)) { + GPR_ASSERT(source->data.refcounted.length >= split); + + head.refcount = NULL; + head.data.inlined.length = (uint8_t)split; + memcpy(head.data.inlined.bytes, source->data.refcounted.bytes, split); + source->data.refcounted.bytes += split; + source->data.refcounted.length -= split; + } else { + GPR_ASSERT(source->data.refcounted.length >= split); + + /* Build the result */ + head.refcount = source->refcount; + /* Bump the refcount */ + head.refcount->ref(head.refcount); + /* Point into the source array */ + head.data.refcounted.bytes = source->data.refcounted.bytes; + head.data.refcounted.length = split; + source->data.refcounted.bytes += split; + source->data.refcounted.length -= split; + } + + return head; +} + +int grpc_slice_cmp(grpc_slice a, grpc_slice b) { + int d = (int)(GPR_SLICE_LENGTH(a) - GPR_SLICE_LENGTH(b)); + if (d != 0) return d; + return memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), + GPR_SLICE_LENGTH(a)); +} + +int grpc_slice_str_cmp(grpc_slice a, const char *b) { + size_t b_length = strlen(b); + int d = (int)(GPR_SLICE_LENGTH(a) - b_length); + if (d != 0) return d; + return memcmp(GPR_SLICE_START_PTR(a), b, b_length); +} diff --git a/src/core/lib/slice/slice_buffer.c b/src/core/lib/slice/slice_buffer.c new file mode 100644 index 0000000000..c92797233d --- /dev/null +++ b/src/core/lib/slice/slice_buffer.c @@ -0,0 +1,282 @@ +/* + * + * Copyright 2015, 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 +#include + +#include + +#include +#include +#include + +/* grow a buffer; requires GRPC_SLICE_BUFFER_INLINE_ELEMENTS > 1 */ +#define GROW(x) (3 * (x) / 2) + +static void maybe_embiggen(grpc_slice_buffer *sb) { + if (sb->count == sb->capacity) { + sb->capacity = GROW(sb->capacity); + GPR_ASSERT(sb->capacity > sb->count); + if (sb->slices == sb->inlined) { + sb->slices = gpr_malloc(sb->capacity * sizeof(grpc_slice)); + memcpy(sb->slices, sb->inlined, sb->count * sizeof(grpc_slice)); + } else { + sb->slices = gpr_realloc(sb->slices, sb->capacity * sizeof(grpc_slice)); + } + } +} + +void grpc_slice_buffer_init(grpc_slice_buffer *sb) { + sb->count = 0; + sb->length = 0; + sb->capacity = GRPC_SLICE_BUFFER_INLINE_ELEMENTS; + sb->slices = sb->inlined; +} + +void grpc_slice_buffer_destroy(grpc_slice_buffer *sb) { + grpc_slice_buffer_reset_and_unref(sb); + if (sb->slices != sb->inlined) { + gpr_free(sb->slices); + } +} + +uint8_t *grpc_slice_buffer_tiny_add(grpc_slice_buffer *sb, size_t n) { + grpc_slice *back; + uint8_t *out; + + sb->length += n; + + if (sb->count == 0) goto add_new; + back = &sb->slices[sb->count - 1]; + if (back->refcount) goto add_new; + if ((back->data.inlined.length + n) > sizeof(back->data.inlined.bytes)) + goto add_new; + out = back->data.inlined.bytes + back->data.inlined.length; + back->data.inlined.length = (uint8_t)(back->data.inlined.length + n); + return out; + +add_new: + maybe_embiggen(sb); + back = &sb->slices[sb->count]; + sb->count++; + back->refcount = NULL; + back->data.inlined.length = (uint8_t)n; + return back->data.inlined.bytes; +} + +size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer *sb, grpc_slice s) { + size_t out = sb->count; + maybe_embiggen(sb); + sb->slices[out] = s; + sb->length += GPR_SLICE_LENGTH(s); + sb->count = out + 1; + return out; +} + +void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice s) { + size_t n = sb->count; + /* if both the last slice in the slice buffer and the slice being added + are inlined (that is, that they carry their data inside the slice data + structure), and the back slice is not full, then concatenate directly + into the back slice, preventing many small slices being passed into + writes */ + if (!s.refcount && n) { + grpc_slice *back = &sb->slices[n - 1]; + if (!back->refcount && back->data.inlined.length < GPR_SLICE_INLINED_SIZE) { + if (s.data.inlined.length + back->data.inlined.length <= + GPR_SLICE_INLINED_SIZE) { + memcpy(back->data.inlined.bytes + back->data.inlined.length, + s.data.inlined.bytes, s.data.inlined.length); + back->data.inlined.length = + (uint8_t)(back->data.inlined.length + s.data.inlined.length); + } else { + size_t cp1 = GPR_SLICE_INLINED_SIZE - back->data.inlined.length; + memcpy(back->data.inlined.bytes + back->data.inlined.length, + s.data.inlined.bytes, cp1); + back->data.inlined.length = GPR_SLICE_INLINED_SIZE; + maybe_embiggen(sb); + back = &sb->slices[n]; + sb->count = n + 1; + back->refcount = NULL; + back->data.inlined.length = (uint8_t)(s.data.inlined.length - cp1); + memcpy(back->data.inlined.bytes, s.data.inlined.bytes + cp1, + s.data.inlined.length - cp1); + } + sb->length += s.data.inlined.length; + return; /* early out */ + } + } + grpc_slice_buffer_add_indexed(sb, s); +} + +void grpc_slice_buffer_addn(grpc_slice_buffer *sb, grpc_slice *s, size_t n) { + size_t i; + for (i = 0; i < n; i++) { + grpc_slice_buffer_add(sb, s[i]); + } +} + +void grpc_slice_buffer_pop(grpc_slice_buffer *sb) { + if (sb->count != 0) { + size_t count = --sb->count; + sb->length -= GPR_SLICE_LENGTH(sb->slices[count]); + } +} + +void grpc_slice_buffer_reset_and_unref(grpc_slice_buffer *sb) { + size_t i; + + for (i = 0; i < sb->count; i++) { + grpc_slice_unref(sb->slices[i]); + } + + sb->count = 0; + sb->length = 0; +} + +void grpc_slice_buffer_swap(grpc_slice_buffer *a, grpc_slice_buffer *b) { + GPR_SWAP(size_t, a->count, b->count); + GPR_SWAP(size_t, a->capacity, b->capacity); + GPR_SWAP(size_t, a->length, b->length); + + if (a->slices == a->inlined) { + if (b->slices == b->inlined) { + /* swap contents of inlined buffer */ + grpc_slice temp[GRPC_SLICE_BUFFER_INLINE_ELEMENTS]; + memcpy(temp, a->slices, b->count * sizeof(grpc_slice)); + memcpy(a->slices, b->slices, a->count * sizeof(grpc_slice)); + memcpy(b->slices, temp, b->count * sizeof(grpc_slice)); + } else { + /* a is inlined, b is not - copy a inlined into b, fix pointers */ + a->slices = b->slices; + b->slices = b->inlined; + memcpy(b->slices, a->inlined, b->count * sizeof(grpc_slice)); + } + } else if (b->slices == b->inlined) { + /* b is inlined, a is not - copy b inlined int a, fix pointers */ + b->slices = a->slices; + a->slices = a->inlined; + memcpy(a->slices, b->inlined, a->count * sizeof(grpc_slice)); + } else { + /* no inlining: easy swap */ + GPR_SWAP(grpc_slice *, a->slices, b->slices); + } +} + +void grpc_slice_buffer_move_into(grpc_slice_buffer *src, grpc_slice_buffer *dst) { + /* anything to move? */ + if (src->count == 0) { + return; + } + /* anything in dst? */ + if (dst->count == 0) { + grpc_slice_buffer_swap(src, dst); + return; + } + /* both buffers have data - copy, and reset src */ + grpc_slice_buffer_addn(dst, src->slices, src->count); + src->count = 0; + src->length = 0; +} + +void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, + grpc_slice_buffer *dst) { + size_t src_idx; + size_t output_len = dst->length + n; + size_t new_input_len = src->length - n; + GPR_ASSERT(src->length >= n); + if (src->length == n) { + grpc_slice_buffer_move_into(src, dst); + return; + } + src_idx = 0; + while (src_idx < src->capacity) { + grpc_slice slice = src->slices[src_idx]; + size_t slice_len = GPR_SLICE_LENGTH(slice); + if (n > slice_len) { + grpc_slice_buffer_add(dst, slice); + n -= slice_len; + src_idx++; + } else if (n == slice_len) { + grpc_slice_buffer_add(dst, slice); + src_idx++; + break; + } else { /* n < slice_len */ + src->slices[src_idx] = grpc_slice_split_tail(&slice, n); + GPR_ASSERT(GPR_SLICE_LENGTH(slice) == n); + GPR_ASSERT(GPR_SLICE_LENGTH(src->slices[src_idx]) == slice_len - n); + grpc_slice_buffer_add(dst, slice); + break; + } + } + GPR_ASSERT(dst->length == output_len); + memmove(src->slices, src->slices + src_idx, + sizeof(grpc_slice) * (src->count - src_idx)); + src->count -= src_idx; + src->length = new_input_len; + GPR_ASSERT(src->count > 0); +} + +void grpc_slice_buffer_trim_end(grpc_slice_buffer *sb, size_t n, + grpc_slice_buffer *garbage) { + GPR_ASSERT(n <= sb->length); + sb->length -= n; + for (;;) { + size_t idx = sb->count - 1; + grpc_slice slice = sb->slices[idx]; + size_t slice_len = GPR_SLICE_LENGTH(slice); + if (slice_len > n) { + sb->slices[idx] = grpc_slice_split_head(&slice, slice_len - n); + grpc_slice_buffer_add_indexed(garbage, slice); + return; + } else if (slice_len == n) { + grpc_slice_buffer_add_indexed(garbage, slice); + sb->count = idx; + return; + } else { + grpc_slice_buffer_add_indexed(garbage, slice); + n -= slice_len; + sb->count = idx; + } + } +} + +grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *sb) { + grpc_slice slice; + GPR_ASSERT(sb->count > 0); + slice = sb->slices[0]; + memmove(&sb->slices[0], &sb->slices[1], (sb->count - 1) * sizeof(grpc_slice)); + sb->count--; + sb->length -= GPR_SLICE_LENGTH(slice); + return slice; +} diff --git a/src/core/lib/slice/slice_string_helpers.c b/src/core/lib/slice/slice_string_helpers.c new file mode 100644 index 0000000000..cc8b80d3b8 --- /dev/null +++ b/src/core/lib/slice/slice_string_helpers.c @@ -0,0 +1,81 @@ +/* + * + * Copyright 2015, 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. + * + */ + +char *gpr_dump_slice(grpc_slice s, uint32_t flags) { + return gpr_dump((const char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s), + flags); +} + +/** Finds the initial (\a begin) and final (\a end) offsets of the next + * substring from \a str + \a read_offset until the next \a sep or the end of \a + * str. + * + * Returns 1 and updates \a begin and \a end. Returns 0 otherwise. */ +static int slice_find_separator_offset(const grpc_slice str, const char *sep, + const size_t read_offset, size_t *begin, + size_t *end) { + size_t i; + const uint8_t *str_ptr = GPR_SLICE_START_PTR(str) + read_offset; + const size_t str_len = GPR_SLICE_LENGTH(str) - read_offset; + const size_t sep_len = strlen(sep); + if (str_len < sep_len) { + return 0; + } + + for (i = 0; i <= str_len - sep_len; i++) { + if (memcmp(str_ptr + i, sep, sep_len) == 0) { + *begin = read_offset; + *end = read_offset + i; + return 1; + } + } + return 0; +} + +void grpc_slice_split(grpc_slice str, const char *sep, grpc_slice_buffer *dst) { + const size_t sep_len = strlen(sep); + size_t begin, end; + + GPR_ASSERT(sep_len > 0); + + if (slice_find_separator_offset(str, sep, 0, &begin, &end) != 0) { + do { + grpc_slice_buffer_add_indexed(dst, grpc_slice_sub(str, begin, end)); + } while (slice_find_separator_offset(str, sep, end + sep_len, &begin, + &end) != 0); + grpc_slice_buffer_add_indexed( + dst, grpc_slice_sub(str, end + sep_len, GPR_SLICE_LENGTH(str))); + } else { /* no sep found, add whole input */ + grpc_slice_buffer_add_indexed(dst, grpc_slice_ref(str)); + } +} diff --git a/src/core/lib/slice/slice_string_helpers.h b/src/core/lib/slice/slice_string_helpers.h new file mode 100644 index 0000000000..d144a70889 --- /dev/null +++ b/src/core/lib/slice/slice_string_helpers.h @@ -0,0 +1,58 @@ +/* + * + * Copyright 2015, 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. + * + */ + +#ifndef GRPC_CORE_LIB_SUPPORT_SLICE_STRING_H +#define GRPC_CORE_LIB_SUPPORT_SLICE_STRING_H + +#include + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Calls gpr_dump on a slice. */ +char *gpr_dump_slice(grpc_slice slice, uint32_t flags); + +/** Split \a str by the separator \a sep. Results are stored in \a dst, which + * should be a properly initialized instance. */ +void grpc_slice_split(grpc_slice str, const char *sep, grpc_slice_buffer *dst); + +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_LIB_SUPPORT_STRING_H */ diff --git a/src/core/lib/support/percent_encoding.c b/src/core/lib/support/percent_encoding.c deleted file mode 100644 index 3c19f264f9..0000000000 --- a/src/core/lib/support/percent_encoding.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * - * 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 "src/core/lib/support/percent_encoding.h" - -#include - -const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xff, 0x03, 0xfe, 0xff, 0xff, - 0x87, 0xfe, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8] = { - 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - -static bool is_unreserved_character(uint8_t c, - const uint8_t *unreserved_bytes) { - return ((unreserved_bytes[c / 8] >> (c % 8)) & 1) != 0; -} - -gpr_slice gpr_percent_encode_slice(gpr_slice slice, - const uint8_t *unreserved_bytes) { - static const uint8_t hex[] = "0123456789ABCDEF"; - - // first pass: count the number of bytes needed to output this string - size_t output_length = 0; - const uint8_t *slice_start = GPR_SLICE_START_PTR(slice); - const uint8_t *slice_end = GPR_SLICE_END_PTR(slice); - const uint8_t *p; - bool any_reserved_bytes = false; - for (p = slice_start; p < slice_end; p++) { - bool unres = is_unreserved_character(*p, unreserved_bytes); - output_length += unres ? 1 : 3; - any_reserved_bytes |= !unres; - } - // no unreserved bytes: return the string unmodified - if (!any_reserved_bytes) { - return gpr_slice_ref(slice); - } - // second pass: actually encode - gpr_slice out = gpr_slice_malloc(output_length); - uint8_t *q = GPR_SLICE_START_PTR(out); - for (p = slice_start; p < slice_end; p++) { - if (is_unreserved_character(*p, unreserved_bytes)) { - *q++ = *p; - } else { - *q++ = '%'; - *q++ = hex[*p >> 4]; - *q++ = hex[*p & 15]; - } - } - GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); - return out; -} - -static bool valid_hex(const uint8_t *p, const uint8_t *end) { - if (p >= end) return false; - return (*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f') || - (*p >= 'A' && *p <= 'F'); -} - -static uint8_t dehex(uint8_t c) { - if (c >= '0' && c <= '9') return (uint8_t)(c - '0'); - if (c >= 'A' && c <= 'F') return (uint8_t)(c - 'A' + 10); - if (c >= 'a' && c <= 'f') return (uint8_t)(c - 'a' + 10); - GPR_UNREACHABLE_CODE(return 255); -} - -bool gpr_strict_percent_decode_slice(gpr_slice slice_in, - const uint8_t *unreserved_bytes, - gpr_slice *slice_out) { - const uint8_t *p = GPR_SLICE_START_PTR(slice_in); - const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); - size_t out_length = 0; - bool any_percent_encoded_stuff = false; - while (p != in_end) { - if (*p == '%') { - if (!valid_hex(++p, in_end)) return false; - if (!valid_hex(++p, in_end)) return false; - p++; - out_length++; - any_percent_encoded_stuff = true; - } else if (is_unreserved_character(*p, unreserved_bytes)) { - p++; - out_length++; - } else { - return false; - } - } - if (!any_percent_encoded_stuff) { - *slice_out = gpr_slice_ref(slice_in); - return true; - } - p = GPR_SLICE_START_PTR(slice_in); - *slice_out = gpr_slice_malloc(out_length); - uint8_t *q = GPR_SLICE_START_PTR(*slice_out); - while (p != in_end) { - if (*p == '%') { - *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2])); - p += 3; - } else { - *q++ = *p++; - } - } - GPR_ASSERT(q == GPR_SLICE_END_PTR(*slice_out)); - return true; -} - -gpr_slice gpr_permissive_percent_decode_slice(gpr_slice slice_in) { - const uint8_t *p = GPR_SLICE_START_PTR(slice_in); - const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); - size_t out_length = 0; - bool any_percent_encoded_stuff = false; - while (p != in_end) { - if (*p == '%') { - if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) { - p++; - out_length++; - } else { - p += 3; - out_length++; - any_percent_encoded_stuff = true; - } - } else { - p++; - out_length++; - } - } - if (!any_percent_encoded_stuff) { - return gpr_slice_ref(slice_in); - } - p = GPR_SLICE_START_PTR(slice_in); - gpr_slice out = gpr_slice_malloc(out_length); - uint8_t *q = GPR_SLICE_START_PTR(out); - while (p != in_end) { - if (*p == '%') { - if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) { - *q++ = *p++; - } else { - *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2])); - p += 3; - } - } else { - *q++ = *p++; - } - } - GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); - return out; -} diff --git a/src/core/lib/support/percent_encoding.h b/src/core/lib/support/percent_encoding.h deleted file mode 100644 index 000bf14ede..0000000000 --- a/src/core/lib/support/percent_encoding.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * - * 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. - * - */ - -#ifndef GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H -#define GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H - -/* Percent encoding and decoding of slices. - Transforms arbitrary strings into safe-for-transmission strings by using - variants of percent encoding (RFC 3986). - Two major variants are supplied: one that strictly matches URL encoding, - and another which applies percent encoding only to non-http2 header - bytes (the 'compatible' variant) */ - -#include - -#include - -/* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in - gpr_percent_encode_slice, gpr_strict_percent_decode_slice). - Flags [A-Za-z0-9-_.~] as unreserved bytes for the percent encoding routines - */ -extern const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8]; -/* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in - gpr_percent_encode_slice, gpr_strict_percent_decode_slice). - Flags ascii7 non-control characters excluding '%' as unreserved bytes for the - percent encoding routines */ -extern const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8]; - -/* Percent-encode a slice, returning the new slice (this cannot fail): - unreserved_bytes is a bitfield indicating which bytes are considered - unreserved and thus do not need percent encoding */ -gpr_slice gpr_percent_encode_slice(gpr_slice slice, - const uint8_t *unreserved_bytes); -/* Percent-decode a slice, strictly. - If the input is legal (contains no unreserved bytes, and legal % encodings), - returns true and sets *slice_out to the decoded slice. - If the input is not legal, returns false and leaves *slice_out untouched. - unreserved_bytes is a bitfield indicating which bytes are considered - unreserved and thus do not need percent encoding */ -bool gpr_strict_percent_decode_slice(gpr_slice slice_in, - const uint8_t *unreserved_bytes, - gpr_slice *slice_out); -/* Percent-decode a slice, permissively. - If a % triplet can not be decoded, pass it through verbatim. - This cannot fail. */ -gpr_slice gpr_permissive_percent_decode_slice(gpr_slice slice_in); - -#endif /* GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H */ diff --git a/src/core/lib/support/slice.c b/src/core/lib/support/slice.c deleted file mode 100644 index 8a2c0a9086..0000000000 --- a/src/core/lib/support/slice.c +++ /dev/null @@ -1,350 +0,0 @@ -/* - * - * Copyright 2015, 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 -#include -#include - -#include - -gpr_slice gpr_empty_slice(void) { - gpr_slice out; - out.refcount = 0; - out.data.inlined.length = 0; - return out; -} - -gpr_slice gpr_slice_ref(gpr_slice slice) { - if (slice.refcount) { - slice.refcount->ref(slice.refcount); - } - return slice; -} - -void gpr_slice_unref(gpr_slice slice) { - if (slice.refcount) { - slice.refcount->unref(slice.refcount); - } -} - -/* gpr_slice_from_static_string support structure - a refcount that does - nothing */ -static void noop_ref_or_unref(void *unused) {} - -static gpr_slice_refcount noop_refcount = {noop_ref_or_unref, - noop_ref_or_unref}; - -gpr_slice gpr_slice_from_static_string(const char *s) { - gpr_slice slice; - slice.refcount = &noop_refcount; - slice.data.refcounted.bytes = (uint8_t *)s; - slice.data.refcounted.length = strlen(s); - return slice; -} - -/* gpr_slice_new support structures - we create a refcount object extended - with the user provided data pointer & destroy function */ -typedef struct new_slice_refcount { - gpr_slice_refcount rc; - gpr_refcount refs; - void (*user_destroy)(void *); - void *user_data; -} new_slice_refcount; - -static void new_slice_ref(void *p) { - new_slice_refcount *r = p; - gpr_ref(&r->refs); -} - -static void new_slice_unref(void *p) { - new_slice_refcount *r = p; - if (gpr_unref(&r->refs)) { - r->user_destroy(r->user_data); - gpr_free(r); - } -} - -gpr_slice gpr_slice_new_with_user_data(void *p, size_t len, - void (*destroy)(void *), - void *user_data) { - gpr_slice slice; - new_slice_refcount *rc = gpr_malloc(sizeof(new_slice_refcount)); - gpr_ref_init(&rc->refs, 1); - rc->rc.ref = new_slice_ref; - rc->rc.unref = new_slice_unref; - rc->user_destroy = destroy; - rc->user_data = user_data; - - slice.refcount = &rc->rc; - slice.data.refcounted.bytes = p; - slice.data.refcounted.length = len; - return slice; -} - -gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)) { - /* Pass "p" to *destroy when the slice is no longer needed. */ - return gpr_slice_new_with_user_data(p, len, destroy, p); -} - -/* gpr_slice_new_with_len support structures - we create a refcount object - extended with the user provided data pointer & destroy function */ -typedef struct new_with_len_slice_refcount { - gpr_slice_refcount rc; - gpr_refcount refs; - void *user_data; - size_t user_length; - void (*user_destroy)(void *, size_t); -} new_with_len_slice_refcount; - -static void new_with_len_ref(void *p) { - new_with_len_slice_refcount *r = p; - gpr_ref(&r->refs); -} - -static void new_with_len_unref(void *p) { - new_with_len_slice_refcount *r = p; - if (gpr_unref(&r->refs)) { - r->user_destroy(r->user_data, r->user_length); - gpr_free(r); - } -} - -gpr_slice gpr_slice_new_with_len(void *p, size_t len, - void (*destroy)(void *, size_t)) { - gpr_slice slice; - new_with_len_slice_refcount *rc = - gpr_malloc(sizeof(new_with_len_slice_refcount)); - gpr_ref_init(&rc->refs, 1); - rc->rc.ref = new_with_len_ref; - rc->rc.unref = new_with_len_unref; - rc->user_destroy = destroy; - rc->user_data = p; - rc->user_length = len; - - slice.refcount = &rc->rc; - slice.data.refcounted.bytes = p; - slice.data.refcounted.length = len; - return slice; -} - -gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t length) { - gpr_slice slice = gpr_slice_malloc(length); - memcpy(GPR_SLICE_START_PTR(slice), source, length); - return slice; -} - -gpr_slice gpr_slice_from_copied_string(const char *source) { - return gpr_slice_from_copied_buffer(source, strlen(source)); -} - -typedef struct { - gpr_slice_refcount base; - gpr_refcount refs; -} malloc_refcount; - -static void malloc_ref(void *p) { - malloc_refcount *r = p; - gpr_ref(&r->refs); -} - -static void malloc_unref(void *p) { - malloc_refcount *r = p; - if (gpr_unref(&r->refs)) { - gpr_free(r); - } -} - -gpr_slice gpr_slice_malloc(size_t length) { - gpr_slice slice; - - if (length > sizeof(slice.data.inlined.bytes)) { - /* Memory layout used by the slice created here: - - +-----------+----------------------------------------------------------+ - | refcount | bytes | - +-----------+----------------------------------------------------------+ - - refcount is a malloc_refcount - bytes is an array of bytes of the requested length - Both parts are placed in the same allocation returned from gpr_malloc */ - malloc_refcount *rc = gpr_malloc(sizeof(malloc_refcount) + length); - - /* Initial refcount on rc is 1 - and it's up to the caller to release - this reference. */ - gpr_ref_init(&rc->refs, 1); - - rc->base.ref = malloc_ref; - rc->base.unref = malloc_unref; - - /* Build up the slice to be returned. */ - /* The slices refcount points back to the allocated block. */ - slice.refcount = &rc->base; - /* The data bytes are placed immediately after the refcount struct */ - slice.data.refcounted.bytes = (uint8_t *)(rc + 1); - /* And the length of the block is set to the requested length */ - slice.data.refcounted.length = length; - } else { - /* small slice: just inline the data */ - slice.refcount = NULL; - slice.data.inlined.length = (uint8_t)length; - } - return slice; -} - -gpr_slice gpr_slice_sub_no_ref(gpr_slice source, size_t begin, size_t end) { - gpr_slice subset; - - GPR_ASSERT(end >= begin); - - if (source.refcount) { - /* Enforce preconditions */ - GPR_ASSERT(source.data.refcounted.length >= end); - - /* Build the result */ - subset.refcount = source.refcount; - /* Point into the source array */ - subset.data.refcounted.bytes = source.data.refcounted.bytes + begin; - subset.data.refcounted.length = end - begin; - } else { - /* Enforce preconditions */ - GPR_ASSERT(source.data.inlined.length >= end); - subset.refcount = NULL; - subset.data.inlined.length = (uint8_t)(end - begin); - memcpy(subset.data.inlined.bytes, source.data.inlined.bytes + begin, - end - begin); - } - return subset; -} - -gpr_slice gpr_slice_sub(gpr_slice source, size_t begin, size_t end) { - gpr_slice subset; - - if (end - begin <= sizeof(subset.data.inlined.bytes)) { - subset.refcount = NULL; - subset.data.inlined.length = (uint8_t)(end - begin); - memcpy(subset.data.inlined.bytes, GPR_SLICE_START_PTR(source) + begin, - end - begin); - } else { - subset = gpr_slice_sub_no_ref(source, begin, end); - /* Bump the refcount */ - subset.refcount->ref(subset.refcount); - } - return subset; -} - -gpr_slice gpr_slice_split_tail(gpr_slice *source, size_t split) { - gpr_slice tail; - - if (source->refcount == NULL) { - /* inlined data, copy it out */ - GPR_ASSERT(source->data.inlined.length >= split); - tail.refcount = NULL; - tail.data.inlined.length = (uint8_t)(source->data.inlined.length - split); - memcpy(tail.data.inlined.bytes, source->data.inlined.bytes + split, - tail.data.inlined.length); - source->data.inlined.length = (uint8_t)split; - } else { - size_t tail_length = source->data.refcounted.length - split; - GPR_ASSERT(source->data.refcounted.length >= split); - if (tail_length < sizeof(tail.data.inlined.bytes)) { - /* Copy out the bytes - it'll be cheaper than refcounting */ - tail.refcount = NULL; - tail.data.inlined.length = (uint8_t)tail_length; - memcpy(tail.data.inlined.bytes, source->data.refcounted.bytes + split, - tail_length); - } else { - /* Build the result */ - tail.refcount = source->refcount; - /* Bump the refcount */ - tail.refcount->ref(tail.refcount); - /* Point into the source array */ - tail.data.refcounted.bytes = source->data.refcounted.bytes + split; - tail.data.refcounted.length = tail_length; - } - source->data.refcounted.length = split; - } - - return tail; -} - -gpr_slice gpr_slice_split_head(gpr_slice *source, size_t split) { - gpr_slice head; - - if (source->refcount == NULL) { - GPR_ASSERT(source->data.inlined.length >= split); - - head.refcount = NULL; - head.data.inlined.length = (uint8_t)split; - memcpy(head.data.inlined.bytes, source->data.inlined.bytes, split); - source->data.inlined.length = - (uint8_t)(source->data.inlined.length - split); - memmove(source->data.inlined.bytes, source->data.inlined.bytes + split, - source->data.inlined.length); - } else if (split < sizeof(head.data.inlined.bytes)) { - GPR_ASSERT(source->data.refcounted.length >= split); - - head.refcount = NULL; - head.data.inlined.length = (uint8_t)split; - memcpy(head.data.inlined.bytes, source->data.refcounted.bytes, split); - source->data.refcounted.bytes += split; - source->data.refcounted.length -= split; - } else { - GPR_ASSERT(source->data.refcounted.length >= split); - - /* Build the result */ - head.refcount = source->refcount; - /* Bump the refcount */ - head.refcount->ref(head.refcount); - /* Point into the source array */ - head.data.refcounted.bytes = source->data.refcounted.bytes; - head.data.refcounted.length = split; - source->data.refcounted.bytes += split; - source->data.refcounted.length -= split; - } - - return head; -} - -int gpr_slice_cmp(gpr_slice a, gpr_slice b) { - int d = (int)(GPR_SLICE_LENGTH(a) - GPR_SLICE_LENGTH(b)); - if (d != 0) return d; - return memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), - GPR_SLICE_LENGTH(a)); -} - -int gpr_slice_str_cmp(gpr_slice a, const char *b) { - size_t b_length = strlen(b); - int d = (int)(GPR_SLICE_LENGTH(a) - b_length); - if (d != 0) return d; - return memcmp(GPR_SLICE_START_PTR(a), b, b_length); -} diff --git a/src/core/lib/support/slice_buffer.c b/src/core/lib/support/slice_buffer.c deleted file mode 100644 index 66f111d767..0000000000 --- a/src/core/lib/support/slice_buffer.c +++ /dev/null @@ -1,282 +0,0 @@ -/* - * - * Copyright 2015, 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 -#include - -#include - -#include -#include -#include - -/* grow a buffer; requires GRPC_SLICE_BUFFER_INLINE_ELEMENTS > 1 */ -#define GROW(x) (3 * (x) / 2) - -static void maybe_embiggen(gpr_slice_buffer *sb) { - if (sb->count == sb->capacity) { - sb->capacity = GROW(sb->capacity); - GPR_ASSERT(sb->capacity > sb->count); - if (sb->slices == sb->inlined) { - sb->slices = gpr_malloc(sb->capacity * sizeof(gpr_slice)); - memcpy(sb->slices, sb->inlined, sb->count * sizeof(gpr_slice)); - } else { - sb->slices = gpr_realloc(sb->slices, sb->capacity * sizeof(gpr_slice)); - } - } -} - -void gpr_slice_buffer_init(gpr_slice_buffer *sb) { - sb->count = 0; - sb->length = 0; - sb->capacity = GRPC_SLICE_BUFFER_INLINE_ELEMENTS; - sb->slices = sb->inlined; -} - -void gpr_slice_buffer_destroy(gpr_slice_buffer *sb) { - gpr_slice_buffer_reset_and_unref(sb); - if (sb->slices != sb->inlined) { - gpr_free(sb->slices); - } -} - -uint8_t *gpr_slice_buffer_tiny_add(gpr_slice_buffer *sb, size_t n) { - gpr_slice *back; - uint8_t *out; - - sb->length += n; - - if (sb->count == 0) goto add_new; - back = &sb->slices[sb->count - 1]; - if (back->refcount) goto add_new; - if ((back->data.inlined.length + n) > sizeof(back->data.inlined.bytes)) - goto add_new; - out = back->data.inlined.bytes + back->data.inlined.length; - back->data.inlined.length = (uint8_t)(back->data.inlined.length + n); - return out; - -add_new: - maybe_embiggen(sb); - back = &sb->slices[sb->count]; - sb->count++; - back->refcount = NULL; - back->data.inlined.length = (uint8_t)n; - return back->data.inlined.bytes; -} - -size_t gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb, gpr_slice s) { - size_t out = sb->count; - maybe_embiggen(sb); - sb->slices[out] = s; - sb->length += GPR_SLICE_LENGTH(s); - sb->count = out + 1; - return out; -} - -void gpr_slice_buffer_add(gpr_slice_buffer *sb, gpr_slice s) { - size_t n = sb->count; - /* if both the last slice in the slice buffer and the slice being added - are inlined (that is, that they carry their data inside the slice data - structure), and the back slice is not full, then concatenate directly - into the back slice, preventing many small slices being passed into - writes */ - if (!s.refcount && n) { - gpr_slice *back = &sb->slices[n - 1]; - if (!back->refcount && back->data.inlined.length < GPR_SLICE_INLINED_SIZE) { - if (s.data.inlined.length + back->data.inlined.length <= - GPR_SLICE_INLINED_SIZE) { - memcpy(back->data.inlined.bytes + back->data.inlined.length, - s.data.inlined.bytes, s.data.inlined.length); - back->data.inlined.length = - (uint8_t)(back->data.inlined.length + s.data.inlined.length); - } else { - size_t cp1 = GPR_SLICE_INLINED_SIZE - back->data.inlined.length; - memcpy(back->data.inlined.bytes + back->data.inlined.length, - s.data.inlined.bytes, cp1); - back->data.inlined.length = GPR_SLICE_INLINED_SIZE; - maybe_embiggen(sb); - back = &sb->slices[n]; - sb->count = n + 1; - back->refcount = NULL; - back->data.inlined.length = (uint8_t)(s.data.inlined.length - cp1); - memcpy(back->data.inlined.bytes, s.data.inlined.bytes + cp1, - s.data.inlined.length - cp1); - } - sb->length += s.data.inlined.length; - return; /* early out */ - } - } - gpr_slice_buffer_add_indexed(sb, s); -} - -void gpr_slice_buffer_addn(gpr_slice_buffer *sb, gpr_slice *s, size_t n) { - size_t i; - for (i = 0; i < n; i++) { - gpr_slice_buffer_add(sb, s[i]); - } -} - -void gpr_slice_buffer_pop(gpr_slice_buffer *sb) { - if (sb->count != 0) { - size_t count = --sb->count; - sb->length -= GPR_SLICE_LENGTH(sb->slices[count]); - } -} - -void gpr_slice_buffer_reset_and_unref(gpr_slice_buffer *sb) { - size_t i; - - for (i = 0; i < sb->count; i++) { - gpr_slice_unref(sb->slices[i]); - } - - sb->count = 0; - sb->length = 0; -} - -void gpr_slice_buffer_swap(gpr_slice_buffer *a, gpr_slice_buffer *b) { - GPR_SWAP(size_t, a->count, b->count); - GPR_SWAP(size_t, a->capacity, b->capacity); - GPR_SWAP(size_t, a->length, b->length); - - if (a->slices == a->inlined) { - if (b->slices == b->inlined) { - /* swap contents of inlined buffer */ - gpr_slice temp[GRPC_SLICE_BUFFER_INLINE_ELEMENTS]; - memcpy(temp, a->slices, b->count * sizeof(gpr_slice)); - memcpy(a->slices, b->slices, a->count * sizeof(gpr_slice)); - memcpy(b->slices, temp, b->count * sizeof(gpr_slice)); - } else { - /* a is inlined, b is not - copy a inlined into b, fix pointers */ - a->slices = b->slices; - b->slices = b->inlined; - memcpy(b->slices, a->inlined, b->count * sizeof(gpr_slice)); - } - } else if (b->slices == b->inlined) { - /* b is inlined, a is not - copy b inlined int a, fix pointers */ - b->slices = a->slices; - a->slices = a->inlined; - memcpy(a->slices, b->inlined, a->count * sizeof(gpr_slice)); - } else { - /* no inlining: easy swap */ - GPR_SWAP(gpr_slice *, a->slices, b->slices); - } -} - -void gpr_slice_buffer_move_into(gpr_slice_buffer *src, gpr_slice_buffer *dst) { - /* anything to move? */ - if (src->count == 0) { - return; - } - /* anything in dst? */ - if (dst->count == 0) { - gpr_slice_buffer_swap(src, dst); - return; - } - /* both buffers have data - copy, and reset src */ - gpr_slice_buffer_addn(dst, src->slices, src->count); - src->count = 0; - src->length = 0; -} - -void gpr_slice_buffer_move_first(gpr_slice_buffer *src, size_t n, - gpr_slice_buffer *dst) { - size_t src_idx; - size_t output_len = dst->length + n; - size_t new_input_len = src->length - n; - GPR_ASSERT(src->length >= n); - if (src->length == n) { - gpr_slice_buffer_move_into(src, dst); - return; - } - src_idx = 0; - while (src_idx < src->capacity) { - gpr_slice slice = src->slices[src_idx]; - size_t slice_len = GPR_SLICE_LENGTH(slice); - if (n > slice_len) { - gpr_slice_buffer_add(dst, slice); - n -= slice_len; - src_idx++; - } else if (n == slice_len) { - gpr_slice_buffer_add(dst, slice); - src_idx++; - break; - } else { /* n < slice_len */ - src->slices[src_idx] = gpr_slice_split_tail(&slice, n); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == n); - GPR_ASSERT(GPR_SLICE_LENGTH(src->slices[src_idx]) == slice_len - n); - gpr_slice_buffer_add(dst, slice); - break; - } - } - GPR_ASSERT(dst->length == output_len); - memmove(src->slices, src->slices + src_idx, - sizeof(gpr_slice) * (src->count - src_idx)); - src->count -= src_idx; - src->length = new_input_len; - GPR_ASSERT(src->count > 0); -} - -void gpr_slice_buffer_trim_end(gpr_slice_buffer *sb, size_t n, - gpr_slice_buffer *garbage) { - GPR_ASSERT(n <= sb->length); - sb->length -= n; - for (;;) { - size_t idx = sb->count - 1; - gpr_slice slice = sb->slices[idx]; - size_t slice_len = GPR_SLICE_LENGTH(slice); - if (slice_len > n) { - sb->slices[idx] = gpr_slice_split_head(&slice, slice_len - n); - gpr_slice_buffer_add_indexed(garbage, slice); - return; - } else if (slice_len == n) { - gpr_slice_buffer_add_indexed(garbage, slice); - sb->count = idx; - return; - } else { - gpr_slice_buffer_add_indexed(garbage, slice); - n -= slice_len; - sb->count = idx; - } - } -} - -gpr_slice gpr_slice_buffer_take_first(gpr_slice_buffer *sb) { - gpr_slice slice; - GPR_ASSERT(sb->count > 0); - slice = sb->slices[0]; - memmove(&sb->slices[0], &sb->slices[1], (sb->count - 1) * sizeof(gpr_slice)); - sb->count--; - sb->length -= GPR_SLICE_LENGTH(slice); - return slice; -} diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c index d17fb9da4b..dc243bf0bf 100644 --- a/src/core/lib/support/string.c +++ b/src/core/lib/support/string.c @@ -120,11 +120,6 @@ char *gpr_dump(const char *buf, size_t len, uint32_t flags) { return out.data; } -char *gpr_dump_slice(gpr_slice s, uint32_t flags) { - return gpr_dump((const char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s), - flags); -} - int gpr_parse_bytes_to_uint32(const char *buf, size_t len, uint32_t *result) { uint32_t out = 0; uint32_t new; @@ -239,50 +234,6 @@ char *gpr_strjoin_sep(const char **strs, size_t nstrs, const char *sep, return out; } -/** Finds the initial (\a begin) and final (\a end) offsets of the next - * substring from \a str + \a read_offset until the next \a sep or the end of \a - * str. - * - * Returns 1 and updates \a begin and \a end. Returns 0 otherwise. */ -static int slice_find_separator_offset(const gpr_slice str, const char *sep, - const size_t read_offset, size_t *begin, - size_t *end) { - size_t i; - const uint8_t *str_ptr = GPR_SLICE_START_PTR(str) + read_offset; - const size_t str_len = GPR_SLICE_LENGTH(str) - read_offset; - const size_t sep_len = strlen(sep); - if (str_len < sep_len) { - return 0; - } - - for (i = 0; i <= str_len - sep_len; i++) { - if (memcmp(str_ptr + i, sep, sep_len) == 0) { - *begin = read_offset; - *end = read_offset + i; - return 1; - } - } - return 0; -} - -void gpr_slice_split(gpr_slice str, const char *sep, gpr_slice_buffer *dst) { - const size_t sep_len = strlen(sep); - size_t begin, end; - - GPR_ASSERT(sep_len > 0); - - if (slice_find_separator_offset(str, sep, 0, &begin, &end) != 0) { - do { - gpr_slice_buffer_add_indexed(dst, gpr_slice_sub(str, begin, end)); - } while (slice_find_separator_offset(str, sep, end + sep_len, &begin, - &end) != 0); - gpr_slice_buffer_add_indexed( - dst, gpr_slice_sub(str, end + sep_len, GPR_SLICE_LENGTH(str))); - } else { /* no sep found, add whole input */ - gpr_slice_buffer_add_indexed(dst, gpr_slice_ref(str)); - } -} - void gpr_strvec_init(gpr_strvec *sv) { memset(sv, 0, sizeof(*sv)); } void gpr_strvec_destroy(gpr_strvec *sv) { diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index 9a94e9471c..2cd908aad6 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -54,9 +54,6 @@ extern "C" { Result should be freed with gpr_free() */ char *gpr_dump(const char *buf, size_t len, uint32_t flags); -/* Calls gpr_dump on a slice. */ -char *gpr_dump_slice(gpr_slice slice, uint32_t flags); - /* Parses an array of bytes into an integer (base 10). Returns 1 on success, 0 on failure. */ int gpr_parse_bytes_to_uint32(const char *data, size_t length, @@ -98,10 +95,6 @@ char *gpr_strjoin(const char **strs, size_t nstrs, size_t *total_length); char *gpr_strjoin_sep(const char **strs, size_t nstrs, const char *sep, size_t *total_length); -/** Split \a str by the separator \a sep. Results are stored in \a dst, which - * should be a properly initialized instance. */ -void gpr_slice_split(gpr_slice str, const char *sep, gpr_slice_buffer *dst); - /* A vector of strings... for building up a final string one piece at a time */ typedef struct { char **strs; diff --git a/src/core/lib/surface/byte_buffer.c b/src/core/lib/surface/byte_buffer.c index 054a6e6c58..5ae7e3264b 100644 --- a/src/core/lib/surface/byte_buffer.c +++ b/src/core/lib/surface/byte_buffer.c @@ -35,22 +35,22 @@ #include #include -grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices, +grpc_byte_buffer *grpc_raw_byte_buffer_create(grpc_slice *slices, size_t nslices) { return grpc_raw_compressed_byte_buffer_create(slices, nslices, GRPC_COMPRESS_NONE); } grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create( - gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression) { + grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression) { size_t i; 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); + grpc_slice_buffer_init(&bb->data.raw.slice_buffer); for (i = 0; i < nslices; i++) { - gpr_slice_ref(slices[i]); - gpr_slice_buffer_add(&bb->data.raw.slice_buffer, slices[i]); + grpc_slice_ref(slices[i]); + grpc_slice_buffer_add(&bb->data.raw.slice_buffer, slices[i]); } return bb; } @@ -58,13 +58,13 @@ 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 = gpr_malloc(sizeof(grpc_byte_buffer)); - gpr_slice slice; + grpc_slice slice; bb->type = GRPC_BB_RAW; bb->data.raw.compression = GRPC_COMPRESS_NONE; - gpr_slice_buffer_init(&bb->data.raw.slice_buffer); + grpc_slice_buffer_init(&bb->data.raw.slice_buffer); while (grpc_byte_buffer_reader_next(reader, &slice)) { - gpr_slice_buffer_add(&bb->data.raw.slice_buffer, slice); + grpc_slice_buffer_add(&bb->data.raw.slice_buffer, slice); } return bb; } @@ -83,7 +83,7 @@ void grpc_byte_buffer_destroy(grpc_byte_buffer *bb) { if (!bb) return; switch (bb->type) { case GRPC_BB_RAW: - gpr_slice_buffer_destroy(&bb->data.raw.slice_buffer); + grpc_slice_buffer_destroy(&bb->data.raw.slice_buffer); break; } gpr_free(bb); diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index 310bacb2c9..9455709b4b 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -56,11 +56,11 @@ static int is_compressed(grpc_byte_buffer *buffer) { int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer) { - gpr_slice_buffer decompressed_slices_buffer; + grpc_slice_buffer decompressed_slices_buffer; reader->buffer_in = buffer; switch (reader->buffer_in->type) { case GRPC_BB_RAW: - gpr_slice_buffer_init(&decompressed_slices_buffer); + grpc_slice_buffer_init(&decompressed_slices_buffer); if (is_compressed(reader->buffer_in)) { if (grpc_msg_decompress(reader->buffer_in->data.raw.compression, &reader->buffer_in->data.raw.slice_buffer, @@ -76,7 +76,7 @@ int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, grpc_raw_byte_buffer_create(decompressed_slices_buffer.slices, decompressed_slices_buffer.count); } - gpr_slice_buffer_destroy(&decompressed_slices_buffer); + grpc_slice_buffer_destroy(&decompressed_slices_buffer); } else { /* not compressed, use the input buffer as output */ reader->buffer_out = reader->buffer_in; } @@ -98,13 +98,13 @@ void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) { } int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, - gpr_slice *slice) { + grpc_slice *slice) { switch (reader->buffer_in->type) { case GRPC_BB_RAW: { - gpr_slice_buffer *slice_buffer; + grpc_slice_buffer *slice_buffer; slice_buffer = &reader->buffer_out->data.raw.slice_buffer; if (reader->current.index < slice_buffer->count) { - *slice = gpr_slice_ref(slice_buffer->slices[reader->current.index]); + *slice = grpc_slice_ref(slice_buffer->slices[reader->current.index]); reader->current.index += 1; return 1; } @@ -114,18 +114,18 @@ int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, return 0; } -gpr_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader) { - gpr_slice in_slice; +grpc_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader) { + grpc_slice in_slice; size_t bytes_read = 0; const size_t input_size = grpc_byte_buffer_length(reader->buffer_out); - gpr_slice out_slice = gpr_slice_malloc(input_size); + grpc_slice out_slice = grpc_slice_malloc(input_size); uint8_t *const outbuf = GPR_SLICE_START_PTR(out_slice); /* just an alias */ while (grpc_byte_buffer_reader_next(reader, &in_slice) != 0) { const size_t slice_length = GPR_SLICE_LENGTH(in_slice); memcpy(&(outbuf[bytes_read]), GPR_SLICE_START_PTR(in_slice), slice_length); bytes_read += slice_length; - gpr_slice_unref(in_slice); + grpc_slice_unref(in_slice); GPR_ASSERT(bytes_read <= input_size); } return out_slice; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index ee94f274f8..06dc5f5942 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -183,7 +183,7 @@ struct grpc_call { grpc_slice_buffer_stream sending_stream; grpc_byte_stream *receiving_stream; grpc_byte_buffer **receiving_buffer; - gpr_slice receiving_slice; + grpc_slice receiving_slice; grpc_closure receiving_slice_ready; grpc_closure receiving_stream_ready; grpc_closure receiving_initial_metadata_ready; @@ -492,8 +492,8 @@ static void destroy_encodings_accepted_by_peer(void *p) { return; } static void set_encodings_accepted_by_peer(grpc_call *call, grpc_mdelem *mdel) { size_t i; grpc_compression_algorithm algorithm; - gpr_slice_buffer accept_encoding_parts; - gpr_slice accept_encoding_slice; + grpc_slice_buffer accept_encoding_parts; + grpc_slice accept_encoding_slice; void *accepted_user_data; accepted_user_data = @@ -505,15 +505,15 @@ static void set_encodings_accepted_by_peer(grpc_call *call, grpc_mdelem *mdel) { } accept_encoding_slice = mdel->value->slice; - gpr_slice_buffer_init(&accept_encoding_parts); - gpr_slice_split(accept_encoding_slice, ",", &accept_encoding_parts); + grpc_slice_buffer_init(&accept_encoding_parts); + grpc_slice_split(accept_encoding_slice, ",", &accept_encoding_parts); /* No need to zero call->encodings_accepted_by_peer: grpc_call_create already * zeroes the whole grpc_call */ /* Always support no compression */ GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_COMPRESS_NONE); for (i = 0; i < accept_encoding_parts.count; i++) { - const gpr_slice *accept_encoding_entry_slice = + const grpc_slice *accept_encoding_entry_slice = &accept_encoding_parts.slices[i]; if (grpc_compression_algorithm_parse( (const char *)GPR_SLICE_START_PTR(*accept_encoding_entry_slice), @@ -529,7 +529,7 @@ static void set_encodings_accepted_by_peer(grpc_call *call, grpc_mdelem *mdel) { } } - gpr_slice_buffer_destroy(&accept_encoding_parts); + grpc_slice_buffer_destroy(&accept_encoding_parts); grpc_mdelem_set_user_data( mdel, destroy_encodings_accepted_by_peer, @@ -550,7 +550,7 @@ static void get_final_details(grpc_call *call, char **out_details, for (i = 0; i < STATUS_SOURCE_COUNT; i++) { if (call->status[i].is_set) { if (call->status[i].details) { - gpr_slice details = call->status[i].details->slice; + grpc_slice details = call->status[i].details->slice; size_t len = GPR_SLICE_LENGTH(details); if (len + 1 > *out_details_capacity) { *out_details_capacity = @@ -1084,7 +1084,7 @@ static void continue_receiving_slices(grpc_exec_ctx *exec_ctx, if (grpc_byte_stream_next(exec_ctx, call->receiving_stream, &call->receiving_slice, remaining, &call->receiving_slice_ready)) { - gpr_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, + grpc_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, call->receiving_slice); } else { return; @@ -1098,7 +1098,7 @@ static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp, grpc_call *call = bctl->call; if (error == GRPC_ERROR_NONE) { - gpr_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, + grpc_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, call->receiving_slice); continue_receiving_slices(exec_ctx, bctl); } else { diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index be16162e7f..2045e59e53 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -264,13 +264,13 @@ static void channel_broadcaster_init(grpc_server *s, channel_broadcaster *cb) { struct shutdown_cleanup_args { grpc_closure closure; - gpr_slice slice; + grpc_slice slice; }; static void shutdown_cleanup(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { struct shutdown_cleanup_args *a = arg; - gpr_slice_unref(a->slice); + grpc_slice_unref(a->slice); gpr_free(a); } @@ -283,7 +283,7 @@ static void send_shutdown(grpc_exec_ctx *exec_ctx, grpc_channel *channel, op->send_goaway = send_goaway; op->set_accept_stream = true; - sc->slice = gpr_slice_from_copied_string("Server shutdown"); + sc->slice = grpc_slice_from_copied_string("Server shutdown"); op->goaway_message = &sc->slice; op->goaway_status = GRPC_STATUS_OK; op->disconnect_with_error = send_disconnect; @@ -459,7 +459,7 @@ static void destroy_channel(grpc_exec_ctx *exec_ctx, channel_data *chand, } static void cpstr(char **dest, size_t *capacity, grpc_mdstr *value) { - gpr_slice slice = value->slice; + grpc_slice slice = value->slice; size_t len = GPR_SLICE_LENGTH(slice); if (len + 1 > *capacity) { diff --git a/src/core/lib/transport/byte_stream.c b/src/core/lib/transport/byte_stream.c index 2f6c75cb6a..2f1d7b7c60 100644 --- a/src/core/lib/transport/byte_stream.c +++ b/src/core/lib/transport/byte_stream.c @@ -38,7 +38,7 @@ #include int grpc_byte_stream_next(grpc_exec_ctx *exec_ctx, - grpc_byte_stream *byte_stream, gpr_slice *slice, + grpc_byte_stream *byte_stream, grpc_slice *slice, size_t max_size_hint, grpc_closure *on_complete) { return byte_stream->next(exec_ctx, byte_stream, slice, max_size_hint, on_complete); @@ -53,11 +53,11 @@ void grpc_byte_stream_destroy(grpc_exec_ctx *exec_ctx, static int slice_buffer_stream_next(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, - gpr_slice *slice, size_t max_size_hint, + grpc_slice *slice, size_t max_size_hint, grpc_closure *on_complete) { grpc_slice_buffer_stream *stream = (grpc_slice_buffer_stream *)byte_stream; GPR_ASSERT(stream->cursor < stream->backing_buffer->count); - *slice = gpr_slice_ref(stream->backing_buffer->slices[stream->cursor]); + *slice = grpc_slice_ref(stream->backing_buffer->slices[stream->cursor]); stream->cursor++; return 1; } @@ -66,7 +66,7 @@ static void slice_buffer_stream_destroy(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream) {} void grpc_slice_buffer_stream_init(grpc_slice_buffer_stream *stream, - gpr_slice_buffer *slice_buffer, + grpc_slice_buffer *slice_buffer, uint32_t flags) { GPR_ASSERT(slice_buffer->length <= UINT32_MAX); stream->base.length = (uint32_t)slice_buffer->length; diff --git a/src/core/lib/transport/byte_stream.h b/src/core/lib/transport/byte_stream.h index e64dce6283..8139782701 100644 --- a/src/core/lib/transport/byte_stream.h +++ b/src/core/lib/transport/byte_stream.h @@ -50,7 +50,7 @@ struct grpc_byte_stream { uint32_t length; uint32_t flags; int (*next)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, - gpr_slice *slice, size_t max_size_hint, + grpc_slice *slice, size_t max_size_hint, grpc_closure *on_complete); void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream); }; @@ -65,7 +65,7 @@ struct grpc_byte_stream { * once a slice is returned into *slice, it is owned by the caller. */ int grpc_byte_stream_next(grpc_exec_ctx *exec_ctx, - grpc_byte_stream *byte_stream, gpr_slice *slice, + grpc_byte_stream *byte_stream, grpc_slice *slice, size_t max_size_hint, grpc_closure *on_complete); void grpc_byte_stream_destroy(grpc_exec_ctx *exec_ctx, @@ -74,12 +74,12 @@ void grpc_byte_stream_destroy(grpc_exec_ctx *exec_ctx, /* grpc_byte_stream that wraps a slice buffer */ typedef struct grpc_slice_buffer_stream { grpc_byte_stream base; - gpr_slice_buffer *backing_buffer; + grpc_slice_buffer *backing_buffer; size_t cursor; } grpc_slice_buffer_stream; void grpc_slice_buffer_stream_init(grpc_slice_buffer_stream *stream, - gpr_slice_buffer *slice_buffer, + grpc_slice_buffer *slice_buffer, uint32_t flags); #endif /* GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H */ diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 4b40c275ad..b8364c4cb7 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -51,7 +51,7 @@ #include "src/core/lib/support/string.h" #include "src/core/lib/transport/static_metadata.h" -gpr_slice (*grpc_chttp2_base64_encode_and_huffman_compress)(gpr_slice input); +grpc_slice (*grpc_chttp2_base64_encode_and_huffman_compress)(grpc_slice input); /* There are two kinds of mdelem and mdstr instances. * Static instances are declared in static_metadata.{h,c} and @@ -85,16 +85,16 @@ typedef void (*destroy_user_data_func)(void *user_data); /* Shadow structure for grpc_mdstr for non-static values */ typedef struct internal_string { /* must be byte compatible with grpc_mdstr */ - gpr_slice slice; + grpc_slice slice; uint32_t hash; /* private only data */ gpr_atm refcnt; uint8_t has_base64_and_huffman_encoded; - gpr_slice_refcount refcount; + grpc_slice_refcount refcount; - gpr_slice base64_and_huffman; + grpc_slice base64_and_huffman; gpr_atm size_in_decoder_table; @@ -174,7 +174,7 @@ void grpc_mdctx_global_init(void) { grpc_mdstr *elem = &grpc_static_mdstr_table[i]; const char *str = grpc_static_metadata_strings[i]; uint32_t hash = gpr_murmur_hash3(str, strlen(str), g_hash_seed); - *(gpr_slice *)&elem->slice = gpr_slice_from_static_string(str); + *(grpc_slice *)&elem->slice = grpc_slice_from_static_string(str); *(uint32_t *)&elem->hash = hash; for (j = 0;; j++) { size_t idx = (hash + j) % GPR_ARRAY_SIZE(g_static_strtab); @@ -321,7 +321,7 @@ static void internal_destroy_string(strtab_shard *shard, internal_string *is) { internal_string *cur; GPR_TIMER_BEGIN("internal_destroy_string", 0); if (is->has_base64_and_huffman_encoded) { - gpr_slice_unref(is->base64_and_huffman); + grpc_slice_unref(is->base64_and_huffman); } for (prev_next = &shard->strs[TABLE_IDX(is->hash, LOG2_STRTAB_SHARD_COUNT, shard->capacity)], @@ -350,10 +350,10 @@ grpc_mdstr *grpc_mdstr_from_string(const char *str) { return grpc_mdstr_from_buffer((const uint8_t *)str, strlen(str)); } -grpc_mdstr *grpc_mdstr_from_slice(gpr_slice slice) { +grpc_mdstr *grpc_mdstr_from_slice(grpc_slice slice) { grpc_mdstr *result = grpc_mdstr_from_buffer(GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice)); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return result; } @@ -589,7 +589,7 @@ grpc_mdelem *grpc_mdelem_from_strings(const char *key, const char *value) { grpc_mdstr_from_string(value)); } -grpc_mdelem *grpc_mdelem_from_slices(gpr_slice key, gpr_slice value) { +grpc_mdelem *grpc_mdelem_from_slices(grpc_slice key, grpc_slice value) { return grpc_mdelem_from_metadata_strings(grpc_mdstr_from_slice(key), grpc_mdstr_from_slice(value)); } @@ -737,9 +737,9 @@ void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), gpr_mu_unlock(&im->mu_user_data); } -gpr_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *gs) { +grpc_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *gs) { internal_string *s = (internal_string *)gs; - gpr_slice slice; + grpc_slice slice; strtab_shard *shard = &g_strtab_shard[SHARD_IDX(s->hash, LOG2_STRTAB_SHARD_COUNT)]; gpr_mu_lock(&shard->mu); diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 71eff0acf2..5875ffb323 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -77,7 +77,7 @@ typedef struct grpc_mdelem grpc_mdelem; /* if changing this, make identical changes in internal_string in metadata.c */ struct grpc_mdstr { - const gpr_slice slice; + const grpc_slice slice; const uint32_t hash; /* there is a private part to this in metadata.c */ }; @@ -96,12 +96,12 @@ void grpc_test_only_set_metadata_hash_seed(uint32_t seed); clients may have handy */ grpc_mdstr *grpc_mdstr_from_string(const char *str); /* Unrefs the slice. */ -grpc_mdstr *grpc_mdstr_from_slice(gpr_slice slice); +grpc_mdstr *grpc_mdstr_from_slice(grpc_slice slice); grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *str, size_t length); /* Returns a borrowed slice from the mdstr with its contents base64 encoded and huffman compressed */ -gpr_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *str); +grpc_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *str); /* Constructors for grpc_mdelem instances; take a variety of data types that clients may have handy */ @@ -109,7 +109,7 @@ grpc_mdelem *grpc_mdelem_from_metadata_strings(grpc_mdstr *key, grpc_mdstr *value); grpc_mdelem *grpc_mdelem_from_strings(const char *key, const char *value); /* Unrefs the slices. */ -grpc_mdelem *grpc_mdelem_from_slices(gpr_slice key, gpr_slice value); +grpc_mdelem *grpc_mdelem_from_slices(grpc_slice key, grpc_slice value); grpc_mdelem *grpc_mdelem_from_string_and_buffer(const char *key, const uint8_t *value, size_t value_length); @@ -165,8 +165,8 @@ void grpc_mdctx_global_init(void); void grpc_mdctx_global_shutdown(void); /* Implementation provided by chttp2_transport */ -extern gpr_slice (*grpc_chttp2_base64_encode_and_huffman_compress)( - gpr_slice input); +extern grpc_slice (*grpc_chttp2_base64_encode_and_huffman_compress)( + grpc_slice input); #ifdef __cplusplus } diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 75aec7a5b4..3ca85b12e9 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -207,11 +207,11 @@ void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op, void grpc_transport_stream_op_add_cancellation_with_message( grpc_transport_stream_op *op, grpc_status_code status, - gpr_slice *optional_message) { + grpc_slice *optional_message) { GPR_ASSERT(status != GRPC_STATUS_OK); if (op->cancel_error != GRPC_ERROR_NONE) { if (optional_message) { - gpr_slice_unref(*optional_message); + grpc_slice_unref(*optional_message); } return; } @@ -221,7 +221,7 @@ void grpc_transport_stream_op_add_cancellation_with_message( error = grpc_error_set_str(GRPC_ERROR_CREATE(msg), GRPC_ERROR_STR_GRPC_MESSAGE, msg); gpr_free(msg); - gpr_slice_unref(*optional_message); + grpc_slice_unref(*optional_message); } else { error = GRPC_ERROR_CREATE("Call cancelled"); } @@ -231,12 +231,12 @@ void grpc_transport_stream_op_add_cancellation_with_message( void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, grpc_status_code status, - gpr_slice *optional_message) { + grpc_slice *optional_message) { GPR_ASSERT(status != GRPC_STATUS_OK); if (op->cancel_error != GRPC_ERROR_NONE || op->close_error != GRPC_ERROR_NONE) { if (optional_message) { - gpr_slice_unref(*optional_message); + grpc_slice_unref(*optional_message); } return; } @@ -246,7 +246,7 @@ void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, error = grpc_error_set_str(GRPC_ERROR_CREATE(msg), GRPC_ERROR_STR_GRPC_MESSAGE, msg); gpr_free(msg); - gpr_slice_unref(*optional_message); + grpc_slice_unref(*optional_message); } else { error = GRPC_ERROR_CREATE("Call force closed"); } diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 50253ebad1..8916b28b72 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -181,7 +181,7 @@ typedef struct grpc_transport_op { bool send_goaway; /** what should the goaway contain? */ grpc_status_code goaway_status; - gpr_slice *goaway_message; + grpc_slice *goaway_message; /** set the callback for accepting new streams; this is a permanent callback, unlike the other one-shot closures. If true, the callback is set to set_accept_stream_fn, with its @@ -249,11 +249,11 @@ void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op, void grpc_transport_stream_op_add_cancellation_with_message( grpc_transport_stream_op *op, grpc_status_code status, - gpr_slice *optional_message); + grpc_slice *optional_message); void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, grpc_status_code status, - gpr_slice *optional_message); + grpc_slice *optional_message); char *grpc_transport_stream_op_string(grpc_transport_stream_op *op); char *grpc_transport_op_string(grpc_transport_op *op); @@ -283,7 +283,7 @@ void grpc_transport_ping(grpc_transport *transport, grpc_closure *cb); /* Advise peer of pending connection termination. */ void grpc_transport_goaway(grpc_transport *transport, grpc_status_code status, - gpr_slice debug_data); + grpc_slice debug_data); /* Close a transport. Aborts all open streams. */ void grpc_transport_close(grpc_transport *transport); diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index ce02202976..ad874bb369 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -102,31 +102,31 @@ void CoreCodegen::grpc_byte_buffer_reader_destroy( } int CoreCodegen::grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, - gpr_slice* slice) { + grpc_slice* slice) { return ::grpc_byte_buffer_reader_next(reader, slice); } -grpc_byte_buffer* CoreCodegen::grpc_raw_byte_buffer_create(gpr_slice* slice, +grpc_byte_buffer* CoreCodegen::grpc_raw_byte_buffer_create(grpc_slice* slice, size_t nslices) { return ::grpc_raw_byte_buffer_create(slice, nslices); } -gpr_slice CoreCodegen::gpr_slice_malloc(size_t length) { - return ::gpr_slice_malloc(length); +grpc_slice CoreCodegen::grpc_slice_malloc(size_t length) { + return ::grpc_slice_malloc(length); } -void CoreCodegen::gpr_slice_unref(gpr_slice slice) { ::gpr_slice_unref(slice); } +void CoreCodegen::grpc_slice_unref(grpc_slice slice) { ::grpc_slice_unref(slice); } -gpr_slice CoreCodegen::gpr_slice_split_tail(gpr_slice* s, size_t split) { - return ::gpr_slice_split_tail(s, split); +grpc_slice CoreCodegen::grpc_slice_split_tail(grpc_slice* s, size_t split) { + return ::grpc_slice_split_tail(s, split); } -void CoreCodegen::gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) { - ::gpr_slice_buffer_add(sb, slice); +void CoreCodegen::grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice slice) { + ::grpc_slice_buffer_add(sb, slice); } -void CoreCodegen::gpr_slice_buffer_pop(gpr_slice_buffer* sb) { - ::gpr_slice_buffer_pop(sb); +void CoreCodegen::grpc_slice_buffer_pop(grpc_slice_buffer* sb) { + ::grpc_slice_buffer_pop(sb); } void CoreCodegen::grpc_metadata_array_init(grpc_metadata_array* array) { diff --git a/src/cpp/util/byte_buffer_cc.cc b/src/cpp/util/byte_buffer_cc.cc index 91ed66b766..cbe0aad26c 100644 --- a/src/cpp/util/byte_buffer_cc.cc +++ b/src/cpp/util/byte_buffer_cc.cc @@ -38,18 +38,18 @@ namespace grpc { ByteBuffer::ByteBuffer(const Slice* slices, size_t nslices) { // The following assertions check that the representation of a grpc::Slice is - // identical to that of a gpr_slice: it has a gpr_slice field, and nothing + // identical to that of a grpc_slice: it has a grpc_slice field, and nothing // else. - static_assert(std::is_same::value, - "Slice must have same representation as gpr_slice"); - static_assert(sizeof(Slice) == sizeof(gpr_slice), - "Slice must have same representation as gpr_slice"); + static_assert(std::is_same::value, + "Slice must have same representation as grpc_slice"); + static_assert(sizeof(Slice) == sizeof(grpc_slice), + "Slice must have same representation as grpc_slice"); // The const_cast is legal if grpc_raw_byte_buffer_create() does no more // than its advertised side effect of increasing the reference count of the // slices it processes, and such an increase does not affect the semantics // seen by the caller of this constructor. buffer_ = grpc_raw_byte_buffer_create( - reinterpret_cast(const_cast(slices)), nslices); + reinterpret_cast(const_cast(slices)), nslices); } ByteBuffer::~ByteBuffer() { @@ -75,7 +75,7 @@ Status ByteBuffer::Dump(std::vector* slices) const { return Status(StatusCode::INTERNAL, "Couldn't initialize byte buffer reader"); } - gpr_slice s; + grpc_slice s; while (grpc_byte_buffer_reader_next(&reader, &s)) { slices->push_back(Slice(s, Slice::STEAL_REF)); } diff --git a/src/cpp/util/slice_cc.cc b/src/cpp/util/slice_cc.cc index 7e88423b6c..c05f1cf124 100644 --- a/src/cpp/util/slice_cc.cc +++ b/src/cpp/util/slice_cc.cc @@ -37,12 +37,12 @@ namespace grpc { Slice::Slice() : slice_(gpr_empty_slice()) {} -Slice::~Slice() { gpr_slice_unref(slice_); } +Slice::~Slice() { grpc_slice_unref(slice_); } -Slice::Slice(gpr_slice slice, AddRef) : slice_(gpr_slice_ref(slice)) {} +Slice::Slice(grpc_slice slice, AddRef) : slice_(grpc_slice_ref(slice)) {} -Slice::Slice(gpr_slice slice, StealRef) : slice_(slice) {} +Slice::Slice(grpc_slice slice, StealRef) : slice_(slice) {} -Slice::Slice(const Slice& other) : slice_(gpr_slice_ref(other.slice_)) {} +Slice::Slice(const Slice& other) : slice_(grpc_slice_ref(other.slice_)) {} } // namespace grpc diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 9a5d7869d3..0f725f5e23 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -59,9 +59,9 @@ #endif grpc_byte_buffer *string_to_byte_buffer(const char *buffer, size_t len) { - gpr_slice slice = gpr_slice_from_copied_buffer(buffer, len); + grpc_slice slice = grpc_slice_from_copied_buffer(buffer, len); grpc_byte_buffer *bb = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return bb; } @@ -282,7 +282,7 @@ GPR_EXPORT intptr_t GPR_CALLTYPE grpcsharp_batch_context_recv_message_length( GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_recv_message_to_buffer( const grpcsharp_batch_context *ctx, char *buffer, size_t buffer_len) { grpc_byte_buffer_reader reader; - gpr_slice slice; + grpc_slice slice; size_t offset = 0; GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, ctx->recv_message)); @@ -293,7 +293,7 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_recv_message_to_buffer( memcpy(buffer + offset, GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice)); offset += len; - gpr_slice_unref(slice); + grpc_slice_unref(slice); } grpc_byte_buffer_reader_destroy(&reader); diff --git a/src/node/ext/byte_buffer.cc b/src/node/ext/byte_buffer.cc index a3f678f32c..76aa611a5d 100644 --- a/src/node/ext/byte_buffer.cc +++ b/src/node/ext/byte_buffer.cc @@ -56,10 +56,10 @@ grpc_byte_buffer *BufferToByteBuffer(Local buffer) { Nan::HandleScope scope; int length = ::node::Buffer::Length(buffer); char *data = ::node::Buffer::Data(buffer); - gpr_slice slice = gpr_slice_malloc(length); + grpc_slice slice = grpc_slice_malloc(length); memcpy(GPR_SLICE_START_PTR(slice), data, length); grpc_byte_buffer *byte_buffer(grpc_raw_byte_buffer_create(&slice, 1)); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return byte_buffer; } @@ -77,11 +77,11 @@ Local ByteBufferToBuffer(grpc_byte_buffer *buffer) { Nan::ThrowError("Error initializing byte buffer reader."); return scope.Escape(Nan::Undefined()); } - gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); + grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); size_t length = GPR_SLICE_LENGTH(slice); char *result = new char[length]; memcpy(result, GPR_SLICE_START_PTR(slice), length); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return scope.Escape(MakeFastBuffer( Nan::NewBuffer(result, length, delete_buffer, NULL).ToLocalChecked())); } diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m index 98337799e9..45d23d8651 100644 --- a/src/objective-c/GRPCClient/private/NSData+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m @@ -53,22 +53,22 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer, } // The slice contains uncompressed data even if compressed data was received // because the reader takes care of automatically decompressing it - gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); + grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); size_t uncompressed_length = GPR_SLICE_LENGTH(slice); char *result = malloc(uncompressed_length); if (result) { memcpy(result, GPR_SLICE_START_PTR(slice), uncompressed_length); } - gpr_slice_unref(slice); + grpc_slice_unref(slice); *array = result; *length = uncompressed_length; } static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array, size_t length) { - gpr_slice slice = gpr_slice_from_copied_buffer(array, length); + grpc_slice slice = grpc_slice_from_copied_buffer(array, length); grpc_byte_buffer *buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return buffer; } @@ -97,9 +97,9 @@ static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array, // appending of byte arrays by not using internally a single contiguous memory // block for representation. // The following implementation is thus not optimal, sometimes requiring two - // copies (one by self.bytes and another by gpr_slice_from_copied_buffer). + // copies (one by self.bytes and another by grpc_slice_from_copied_buffer). // If it turns out to be an issue, we can use enumerateByteRangesUsingblock: - // to create an array of gpr_slice objects to pass to + // to create an array of grpc_slice objects to pass to // grpc_raw_byte_buffer_create. // That would make it do exactly one copy, always. return CopyCharArrayToNewByteBuffer((const char *)self.bytes, diff --git a/src/php/ext/grpc/byte_buffer.c b/src/php/ext/grpc/byte_buffer.c index 3be1429f13..56fd11d09b 100644 --- a/src/php/ext/grpc/byte_buffer.c +++ b/src/php/ext/grpc/byte_buffer.c @@ -50,9 +50,9 @@ #include grpc_byte_buffer *string_to_byte_buffer(char *string, size_t length) { - gpr_slice slice = gpr_slice_from_copied_buffer(string, length); + grpc_slice slice = grpc_slice_from_copied_buffer(string, length); grpc_byte_buffer *buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return buffer; } @@ -66,11 +66,11 @@ void byte_buffer_to_string(grpc_byte_buffer *buffer, char **out_string, return; } - gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); + grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); size_t length = GPR_SLICE_LENGTH(slice); char *string = ecalloc(length + 1, sizeof(char)); memcpy(string, GPR_SLICE_START_PTR(slice), length); - gpr_slice_unref(slice); + grpc_slice_unref(slice); *out_string = string; *out_length = length; diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index 9560fad137..ba26284b2c 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -53,23 +53,23 @@ cdef extern from "grpc/byte_buffer_reader.h": cdef extern from "grpc/grpc.h": - ctypedef struct gpr_slice: - # don't worry about writing out the members of gpr_slice; we never access + ctypedef struct grpc_slice: + # don't worry about writing out the members of grpc_slice; we never access # them directly. pass - gpr_slice gpr_slice_ref(gpr_slice s) nogil - void gpr_slice_unref(gpr_slice s) nogil - gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)) nogil - gpr_slice gpr_slice_new_with_len( + grpc_slice grpc_slice_ref(grpc_slice s) nogil + void grpc_slice_unref(grpc_slice s) nogil + grpc_slice grpc_slice_new(void *p, size_t len, void (*destroy)(void *)) nogil + grpc_slice grpc_slice_new_with_len( void *p, size_t len, void (*destroy)(void *, size_t)) nogil - gpr_slice gpr_slice_malloc(size_t length) nogil - gpr_slice gpr_slice_from_copied_string(const char *source) nogil - gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len) nogil + grpc_slice grpc_slice_malloc(size_t length) nogil + grpc_slice grpc_slice_from_copied_string(const char *source) nogil + grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t len) nogil # Declare functions for function-like macros (because Cython)... - void *gpr_slice_start_ptr "GPR_SLICE_START_PTR" (gpr_slice s) nogil - size_t gpr_slice_length "GPR_SLICE_LENGTH" (gpr_slice s) nogil + void *grpc_slice_start_ptr "GPR_SLICE_START_PTR" (grpc_slice s) nogil + size_t grpc_slice_length "GPR_SLICE_LENGTH" (grpc_slice s) nogil ctypedef enum gpr_clock_type: GPR_CLOCK_MONOTONIC @@ -101,7 +101,7 @@ cdef extern from "grpc/grpc.h": # We don't care about the internals. pass - grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices, + grpc_byte_buffer *grpc_raw_byte_buffer_create(grpc_slice *slices, size_t nslices) nogil size_t grpc_byte_buffer_length(grpc_byte_buffer *bb) nogil void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer) nogil @@ -109,7 +109,7 @@ cdef extern from "grpc/grpc.h": int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer) nogil int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, - gpr_slice *slice) nogil + grpc_slice *slice) nogil void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) nogil ctypedef enum grpc_status_code: diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index 8a4eef4d2e..cadfce6ee6 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -242,19 +242,19 @@ cdef class ByteBuffer: return cdef char *c_data = data - cdef gpr_slice data_slice + cdef grpc_slice data_slice cdef size_t data_length = len(data) with nogil: - data_slice = gpr_slice_from_copied_buffer(c_data, data_length) + data_slice = grpc_slice_from_copied_buffer(c_data, data_length) with nogil: self.c_byte_buffer = grpc_raw_byte_buffer_create( &data_slice, 1) with nogil: - gpr_slice_unref(data_slice) + grpc_slice_unref(data_slice) def bytes(self): cdef grpc_byte_buffer_reader reader - cdef gpr_slice data_slice + cdef grpc_slice data_slice cdef size_t data_slice_length cdef void *data_slice_pointer cdef bint reader_status @@ -267,11 +267,11 @@ cdef class ByteBuffer: result = bytearray() with nogil: while grpc_byte_buffer_reader_next(&reader, &data_slice): - data_slice_pointer = gpr_slice_start_ptr(data_slice) - data_slice_length = gpr_slice_length(data_slice) + data_slice_pointer = grpc_slice_start_ptr(data_slice) + data_slice_length = grpc_slice_length(data_slice) with gil: result += (data_slice_pointer)[:data_slice_length] - gpr_slice_unref(data_slice) + grpc_slice_unref(data_slice) with nogil: grpc_byte_buffer_reader_destroy(&reader) return bytes(result) diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index 61b7c30315..511abe3fbe 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -42,16 +42,16 @@ #include "rb_grpc.h" grpc_byte_buffer* grpc_rb_s_to_byte_buffer(char *string, size_t length) { - gpr_slice slice = gpr_slice_from_copied_buffer(string, length); + grpc_slice slice = grpc_slice_from_copied_buffer(string, length); grpc_byte_buffer *buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return buffer; } VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer *buffer) { VALUE rb_string; grpc_byte_buffer_reader reader; - gpr_slice next; + grpc_slice next; if (buffer == NULL) { return Qnil; } @@ -63,7 +63,7 @@ VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer *buffer) { while (grpc_byte_buffer_reader_next(&reader, &next) != 0) { rb_str_cat(rb_string, (const char *) GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next)); - gpr_slice_unref(next); + grpc_slice_unref(next); } return rb_string; } diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index fd73cc7970..dd156f0867 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -221,35 +221,35 @@ gpr_set_log_verbosity_type gpr_set_log_verbosity_import; gpr_log_verbosity_init_type gpr_log_verbosity_init_import; gpr_set_log_function_type gpr_set_log_function_import; gpr_format_message_type gpr_format_message_import; -gpr_slice_ref_type gpr_slice_ref_import; -gpr_slice_unref_type gpr_slice_unref_import; -gpr_slice_new_type gpr_slice_new_import; -gpr_slice_new_with_user_data_type gpr_slice_new_with_user_data_import; -gpr_slice_new_with_len_type gpr_slice_new_with_len_import; -gpr_slice_malloc_type gpr_slice_malloc_import; -gpr_slice_from_copied_string_type gpr_slice_from_copied_string_import; -gpr_slice_from_copied_buffer_type gpr_slice_from_copied_buffer_import; -gpr_slice_from_static_string_type gpr_slice_from_static_string_import; -gpr_slice_sub_type gpr_slice_sub_import; -gpr_slice_sub_no_ref_type gpr_slice_sub_no_ref_import; -gpr_slice_split_tail_type gpr_slice_split_tail_import; -gpr_slice_split_head_type gpr_slice_split_head_import; +grpc_slice_ref_type grpc_slice_ref_import; +grpc_slice_unref_type grpc_slice_unref_import; +grpc_slice_new_type grpc_slice_new_import; +grpc_slice_new_with_user_data_type grpc_slice_new_with_user_data_import; +grpc_slice_new_with_len_type grpc_slice_new_with_len_import; +grpc_slice_malloc_type grpc_slice_malloc_import; +grpc_slice_from_copied_string_type grpc_slice_from_copied_string_import; +grpc_slice_from_copied_buffer_type grpc_slice_from_copied_buffer_import; +grpc_slice_from_static_string_type grpc_slice_from_static_string_import; +grpc_slice_sub_type grpc_slice_sub_import; +grpc_slice_sub_no_ref_type grpc_slice_sub_no_ref_import; +grpc_slice_split_tail_type grpc_slice_split_tail_import; +grpc_slice_split_head_type grpc_slice_split_head_import; gpr_empty_slice_type gpr_empty_slice_import; -gpr_slice_cmp_type gpr_slice_cmp_import; -gpr_slice_str_cmp_type gpr_slice_str_cmp_import; -gpr_slice_buffer_init_type gpr_slice_buffer_init_import; -gpr_slice_buffer_destroy_type gpr_slice_buffer_destroy_import; -gpr_slice_buffer_add_type gpr_slice_buffer_add_import; -gpr_slice_buffer_add_indexed_type gpr_slice_buffer_add_indexed_import; -gpr_slice_buffer_addn_type gpr_slice_buffer_addn_import; -gpr_slice_buffer_tiny_add_type gpr_slice_buffer_tiny_add_import; -gpr_slice_buffer_pop_type gpr_slice_buffer_pop_import; -gpr_slice_buffer_reset_and_unref_type gpr_slice_buffer_reset_and_unref_import; -gpr_slice_buffer_swap_type gpr_slice_buffer_swap_import; -gpr_slice_buffer_move_into_type gpr_slice_buffer_move_into_import; -gpr_slice_buffer_trim_end_type gpr_slice_buffer_trim_end_import; -gpr_slice_buffer_move_first_type gpr_slice_buffer_move_first_import; -gpr_slice_buffer_take_first_type gpr_slice_buffer_take_first_import; +grpc_slice_cmp_type grpc_slice_cmp_import; +grpc_slice_str_cmp_type grpc_slice_str_cmp_import; +grpc_slice_buffer_init_type grpc_slice_buffer_init_import; +grpc_slice_buffer_destroy_type grpc_slice_buffer_destroy_import; +grpc_slice_buffer_add_type grpc_slice_buffer_add_import; +grpc_slice_buffer_add_indexed_type grpc_slice_buffer_add_indexed_import; +grpc_slice_buffer_addn_type grpc_slice_buffer_addn_import; +grpc_slice_buffer_tiny_add_type grpc_slice_buffer_tiny_add_import; +grpc_slice_buffer_pop_type grpc_slice_buffer_pop_import; +grpc_slice_buffer_reset_and_unref_type grpc_slice_buffer_reset_and_unref_import; +grpc_slice_buffer_swap_type grpc_slice_buffer_swap_import; +grpc_slice_buffer_move_into_type grpc_slice_buffer_move_into_import; +grpc_slice_buffer_trim_end_type grpc_slice_buffer_trim_end_import; +grpc_slice_buffer_move_first_type grpc_slice_buffer_move_first_import; +grpc_slice_buffer_take_first_type grpc_slice_buffer_take_first_import; gpr_strdup_type gpr_strdup_import; gpr_asprintf_type gpr_asprintf_import; gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import; @@ -495,35 +495,35 @@ void grpc_rb_load_imports(HMODULE library) { gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init"); gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function"); gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message"); - gpr_slice_ref_import = (gpr_slice_ref_type) GetProcAddress(library, "gpr_slice_ref"); - gpr_slice_unref_import = (gpr_slice_unref_type) GetProcAddress(library, "gpr_slice_unref"); - gpr_slice_new_import = (gpr_slice_new_type) GetProcAddress(library, "gpr_slice_new"); - gpr_slice_new_with_user_data_import = (gpr_slice_new_with_user_data_type) GetProcAddress(library, "gpr_slice_new_with_user_data"); - gpr_slice_new_with_len_import = (gpr_slice_new_with_len_type) GetProcAddress(library, "gpr_slice_new_with_len"); - gpr_slice_malloc_import = (gpr_slice_malloc_type) GetProcAddress(library, "gpr_slice_malloc"); - gpr_slice_from_copied_string_import = (gpr_slice_from_copied_string_type) GetProcAddress(library, "gpr_slice_from_copied_string"); - gpr_slice_from_copied_buffer_import = (gpr_slice_from_copied_buffer_type) GetProcAddress(library, "gpr_slice_from_copied_buffer"); - gpr_slice_from_static_string_import = (gpr_slice_from_static_string_type) GetProcAddress(library, "gpr_slice_from_static_string"); - gpr_slice_sub_import = (gpr_slice_sub_type) GetProcAddress(library, "gpr_slice_sub"); - gpr_slice_sub_no_ref_import = (gpr_slice_sub_no_ref_type) GetProcAddress(library, "gpr_slice_sub_no_ref"); - gpr_slice_split_tail_import = (gpr_slice_split_tail_type) GetProcAddress(library, "gpr_slice_split_tail"); - gpr_slice_split_head_import = (gpr_slice_split_head_type) GetProcAddress(library, "gpr_slice_split_head"); + grpc_slice_ref_import = (grpc_slice_ref_type) GetProcAddress(library, "grpc_slice_ref"); + grpc_slice_unref_import = (grpc_slice_unref_type) GetProcAddress(library, "grpc_slice_unref"); + grpc_slice_new_import = (grpc_slice_new_type) GetProcAddress(library, "grpc_slice_new"); + grpc_slice_new_with_user_data_import = (grpc_slice_new_with_user_data_type) GetProcAddress(library, "grpc_slice_new_with_user_data"); + grpc_slice_new_with_len_import = (grpc_slice_new_with_len_type) GetProcAddress(library, "grpc_slice_new_with_len"); + grpc_slice_malloc_import = (grpc_slice_malloc_type) GetProcAddress(library, "grpc_slice_malloc"); + grpc_slice_from_copied_string_import = (grpc_slice_from_copied_string_type) GetProcAddress(library, "grpc_slice_from_copied_string"); + grpc_slice_from_copied_buffer_import = (grpc_slice_from_copied_buffer_type) GetProcAddress(library, "grpc_slice_from_copied_buffer"); + grpc_slice_from_static_string_import = (grpc_slice_from_static_string_type) GetProcAddress(library, "grpc_slice_from_static_string"); + grpc_slice_sub_import = (grpc_slice_sub_type) GetProcAddress(library, "grpc_slice_sub"); + grpc_slice_sub_no_ref_import = (grpc_slice_sub_no_ref_type) GetProcAddress(library, "grpc_slice_sub_no_ref"); + grpc_slice_split_tail_import = (grpc_slice_split_tail_type) GetProcAddress(library, "grpc_slice_split_tail"); + grpc_slice_split_head_import = (grpc_slice_split_head_type) GetProcAddress(library, "grpc_slice_split_head"); gpr_empty_slice_import = (gpr_empty_slice_type) GetProcAddress(library, "gpr_empty_slice"); - gpr_slice_cmp_import = (gpr_slice_cmp_type) GetProcAddress(library, "gpr_slice_cmp"); - gpr_slice_str_cmp_import = (gpr_slice_str_cmp_type) GetProcAddress(library, "gpr_slice_str_cmp"); - gpr_slice_buffer_init_import = (gpr_slice_buffer_init_type) GetProcAddress(library, "gpr_slice_buffer_init"); - gpr_slice_buffer_destroy_import = (gpr_slice_buffer_destroy_type) GetProcAddress(library, "gpr_slice_buffer_destroy"); - gpr_slice_buffer_add_import = (gpr_slice_buffer_add_type) GetProcAddress(library, "gpr_slice_buffer_add"); - gpr_slice_buffer_add_indexed_import = (gpr_slice_buffer_add_indexed_type) GetProcAddress(library, "gpr_slice_buffer_add_indexed"); - gpr_slice_buffer_addn_import = (gpr_slice_buffer_addn_type) GetProcAddress(library, "gpr_slice_buffer_addn"); - gpr_slice_buffer_tiny_add_import = (gpr_slice_buffer_tiny_add_type) GetProcAddress(library, "gpr_slice_buffer_tiny_add"); - gpr_slice_buffer_pop_import = (gpr_slice_buffer_pop_type) GetProcAddress(library, "gpr_slice_buffer_pop"); - gpr_slice_buffer_reset_and_unref_import = (gpr_slice_buffer_reset_and_unref_type) GetProcAddress(library, "gpr_slice_buffer_reset_and_unref"); - gpr_slice_buffer_swap_import = (gpr_slice_buffer_swap_type) GetProcAddress(library, "gpr_slice_buffer_swap"); - gpr_slice_buffer_move_into_import = (gpr_slice_buffer_move_into_type) GetProcAddress(library, "gpr_slice_buffer_move_into"); - gpr_slice_buffer_trim_end_import = (gpr_slice_buffer_trim_end_type) GetProcAddress(library, "gpr_slice_buffer_trim_end"); - gpr_slice_buffer_move_first_import = (gpr_slice_buffer_move_first_type) GetProcAddress(library, "gpr_slice_buffer_move_first"); - gpr_slice_buffer_take_first_import = (gpr_slice_buffer_take_first_type) GetProcAddress(library, "gpr_slice_buffer_take_first"); + grpc_slice_cmp_import = (grpc_slice_cmp_type) GetProcAddress(library, "grpc_slice_cmp"); + grpc_slice_str_cmp_import = (grpc_slice_str_cmp_type) GetProcAddress(library, "grpc_slice_str_cmp"); + grpc_slice_buffer_init_import = (grpc_slice_buffer_init_type) GetProcAddress(library, "grpc_slice_buffer_init"); + grpc_slice_buffer_destroy_import = (grpc_slice_buffer_destroy_type) GetProcAddress(library, "grpc_slice_buffer_destroy"); + grpc_slice_buffer_add_import = (grpc_slice_buffer_add_type) GetProcAddress(library, "grpc_slice_buffer_add"); + grpc_slice_buffer_add_indexed_import = (grpc_slice_buffer_add_indexed_type) GetProcAddress(library, "grpc_slice_buffer_add_indexed"); + grpc_slice_buffer_addn_import = (grpc_slice_buffer_addn_type) GetProcAddress(library, "grpc_slice_buffer_addn"); + grpc_slice_buffer_tiny_add_import = (grpc_slice_buffer_tiny_add_type) GetProcAddress(library, "grpc_slice_buffer_tiny_add"); + grpc_slice_buffer_pop_import = (grpc_slice_buffer_pop_type) GetProcAddress(library, "grpc_slice_buffer_pop"); + grpc_slice_buffer_reset_and_unref_import = (grpc_slice_buffer_reset_and_unref_type) GetProcAddress(library, "grpc_slice_buffer_reset_and_unref"); + grpc_slice_buffer_swap_import = (grpc_slice_buffer_swap_type) GetProcAddress(library, "grpc_slice_buffer_swap"); + grpc_slice_buffer_move_into_import = (grpc_slice_buffer_move_into_type) GetProcAddress(library, "grpc_slice_buffer_move_into"); + grpc_slice_buffer_trim_end_import = (grpc_slice_buffer_trim_end_type) GetProcAddress(library, "grpc_slice_buffer_trim_end"); + grpc_slice_buffer_move_first_import = (grpc_slice_buffer_move_first_type) GetProcAddress(library, "grpc_slice_buffer_move_first"); + grpc_slice_buffer_take_first_import = (grpc_slice_buffer_take_first_type) GetProcAddress(library, "grpc_slice_buffer_take_first"); gpr_strdup_import = (gpr_strdup_type) GetProcAddress(library, "gpr_strdup"); gpr_asprintf_import = (gpr_asprintf_type) GetProcAddress(library, "gpr_asprintf"); gpr_subprocess_binary_extension_import = (gpr_subprocess_binary_extension_type) GetProcAddress(library, "gpr_subprocess_binary_extension"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index c2244150f2..30962a1c79 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -62,10 +62,10 @@ #include #include -typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_create_type)(gpr_slice *slices, size_t nslices); +typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_create_type)(grpc_slice *slices, size_t nslices); extern grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import; #define grpc_raw_byte_buffer_create grpc_raw_byte_buffer_create_import -typedef grpc_byte_buffer *(*grpc_raw_compressed_byte_buffer_create_type)(gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression); +typedef grpc_byte_buffer *(*grpc_raw_compressed_byte_buffer_create_type)(grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression); extern grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import; #define grpc_raw_compressed_byte_buffer_create grpc_raw_compressed_byte_buffer_create_import typedef grpc_byte_buffer *(*grpc_byte_buffer_copy_type)(grpc_byte_buffer *bb); @@ -83,10 +83,10 @@ extern grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import; typedef void(*grpc_byte_buffer_reader_destroy_type)(grpc_byte_buffer_reader *reader); extern grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import; #define grpc_byte_buffer_reader_destroy grpc_byte_buffer_reader_destroy_import -typedef int(*grpc_byte_buffer_reader_next_type)(grpc_byte_buffer_reader *reader, gpr_slice *slice); +typedef int(*grpc_byte_buffer_reader_next_type)(grpc_byte_buffer_reader *reader, grpc_slice *slice); extern grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import; #define grpc_byte_buffer_reader_next grpc_byte_buffer_reader_next_import -typedef gpr_slice(*grpc_byte_buffer_reader_readall_type)(grpc_byte_buffer_reader *reader); +typedef grpc_slice(*grpc_byte_buffer_reader_readall_type)(grpc_byte_buffer_reader *reader); extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import; #define grpc_byte_buffer_reader_readall grpc_byte_buffer_reader_readall_import typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader *reader); @@ -614,93 +614,93 @@ extern gpr_set_log_function_type gpr_set_log_function_import; typedef char *(*gpr_format_message_type)(int messageid); extern gpr_format_message_type gpr_format_message_import; #define gpr_format_message gpr_format_message_import -typedef gpr_slice(*gpr_slice_ref_type)(gpr_slice s); -extern gpr_slice_ref_type gpr_slice_ref_import; -#define gpr_slice_ref gpr_slice_ref_import -typedef void(*gpr_slice_unref_type)(gpr_slice s); -extern gpr_slice_unref_type gpr_slice_unref_import; -#define gpr_slice_unref gpr_slice_unref_import -typedef gpr_slice(*gpr_slice_new_type)(void *p, size_t len, void (*destroy)(void *)); -extern gpr_slice_new_type gpr_slice_new_import; -#define gpr_slice_new gpr_slice_new_import -typedef gpr_slice(*gpr_slice_new_with_user_data_type)(void *p, size_t len, void (*destroy)(void *), void *user_data); -extern gpr_slice_new_with_user_data_type gpr_slice_new_with_user_data_import; -#define gpr_slice_new_with_user_data gpr_slice_new_with_user_data_import -typedef gpr_slice(*gpr_slice_new_with_len_type)(void *p, size_t len, void (*destroy)(void *, size_t)); -extern gpr_slice_new_with_len_type gpr_slice_new_with_len_import; -#define gpr_slice_new_with_len gpr_slice_new_with_len_import -typedef gpr_slice(*gpr_slice_malloc_type)(size_t length); -extern gpr_slice_malloc_type gpr_slice_malloc_import; -#define gpr_slice_malloc gpr_slice_malloc_import -typedef gpr_slice(*gpr_slice_from_copied_string_type)(const char *source); -extern gpr_slice_from_copied_string_type gpr_slice_from_copied_string_import; -#define gpr_slice_from_copied_string gpr_slice_from_copied_string_import -typedef gpr_slice(*gpr_slice_from_copied_buffer_type)(const char *source, size_t len); -extern gpr_slice_from_copied_buffer_type gpr_slice_from_copied_buffer_import; -#define gpr_slice_from_copied_buffer gpr_slice_from_copied_buffer_import -typedef gpr_slice(*gpr_slice_from_static_string_type)(const char *source); -extern gpr_slice_from_static_string_type gpr_slice_from_static_string_import; -#define gpr_slice_from_static_string gpr_slice_from_static_string_import -typedef gpr_slice(*gpr_slice_sub_type)(gpr_slice s, size_t begin, size_t end); -extern gpr_slice_sub_type gpr_slice_sub_import; -#define gpr_slice_sub gpr_slice_sub_import -typedef gpr_slice(*gpr_slice_sub_no_ref_type)(gpr_slice s, size_t begin, size_t end); -extern gpr_slice_sub_no_ref_type gpr_slice_sub_no_ref_import; -#define gpr_slice_sub_no_ref gpr_slice_sub_no_ref_import -typedef gpr_slice(*gpr_slice_split_tail_type)(gpr_slice *s, size_t split); -extern gpr_slice_split_tail_type gpr_slice_split_tail_import; -#define gpr_slice_split_tail gpr_slice_split_tail_import -typedef gpr_slice(*gpr_slice_split_head_type)(gpr_slice *s, size_t split); -extern gpr_slice_split_head_type gpr_slice_split_head_import; -#define gpr_slice_split_head gpr_slice_split_head_import -typedef gpr_slice(*gpr_empty_slice_type)(void); +typedef grpc_slice(*grpc_slice_ref_type)(grpc_slice s); +extern grpc_slice_ref_type grpc_slice_ref_import; +#define grpc_slice_ref grpc_slice_ref_import +typedef void(*grpc_slice_unref_type)(grpc_slice s); +extern grpc_slice_unref_type grpc_slice_unref_import; +#define grpc_slice_unref grpc_slice_unref_import +typedef grpc_slice(*grpc_slice_new_type)(void *p, size_t len, void (*destroy)(void *)); +extern grpc_slice_new_type grpc_slice_new_import; +#define grpc_slice_new grpc_slice_new_import +typedef grpc_slice(*grpc_slice_new_with_user_data_type)(void *p, size_t len, void (*destroy)(void *), void *user_data); +extern grpc_slice_new_with_user_data_type grpc_slice_new_with_user_data_import; +#define grpc_slice_new_with_user_data grpc_slice_new_with_user_data_import +typedef grpc_slice(*grpc_slice_new_with_len_type)(void *p, size_t len, void (*destroy)(void *, size_t)); +extern grpc_slice_new_with_len_type grpc_slice_new_with_len_import; +#define grpc_slice_new_with_len grpc_slice_new_with_len_import +typedef grpc_slice(*grpc_slice_malloc_type)(size_t length); +extern grpc_slice_malloc_type grpc_slice_malloc_import; +#define grpc_slice_malloc grpc_slice_malloc_import +typedef grpc_slice(*grpc_slice_from_copied_string_type)(const char *source); +extern grpc_slice_from_copied_string_type grpc_slice_from_copied_string_import; +#define grpc_slice_from_copied_string grpc_slice_from_copied_string_import +typedef grpc_slice(*grpc_slice_from_copied_buffer_type)(const char *source, size_t len); +extern grpc_slice_from_copied_buffer_type grpc_slice_from_copied_buffer_import; +#define grpc_slice_from_copied_buffer grpc_slice_from_copied_buffer_import +typedef grpc_slice(*grpc_slice_from_static_string_type)(const char *source); +extern grpc_slice_from_static_string_type grpc_slice_from_static_string_import; +#define grpc_slice_from_static_string grpc_slice_from_static_string_import +typedef grpc_slice(*grpc_slice_sub_type)(grpc_slice s, size_t begin, size_t end); +extern grpc_slice_sub_type grpc_slice_sub_import; +#define grpc_slice_sub grpc_slice_sub_import +typedef grpc_slice(*grpc_slice_sub_no_ref_type)(grpc_slice s, size_t begin, size_t end); +extern grpc_slice_sub_no_ref_type grpc_slice_sub_no_ref_import; +#define grpc_slice_sub_no_ref grpc_slice_sub_no_ref_import +typedef grpc_slice(*grpc_slice_split_tail_type)(grpc_slice *s, size_t split); +extern grpc_slice_split_tail_type grpc_slice_split_tail_import; +#define grpc_slice_split_tail grpc_slice_split_tail_import +typedef grpc_slice(*grpc_slice_split_head_type)(grpc_slice *s, size_t split); +extern grpc_slice_split_head_type grpc_slice_split_head_import; +#define grpc_slice_split_head grpc_slice_split_head_import +typedef grpc_slice(*gpr_empty_slice_type)(void); extern gpr_empty_slice_type gpr_empty_slice_import; #define gpr_empty_slice gpr_empty_slice_import -typedef int(*gpr_slice_cmp_type)(gpr_slice a, gpr_slice b); -extern gpr_slice_cmp_type gpr_slice_cmp_import; -#define gpr_slice_cmp gpr_slice_cmp_import -typedef int(*gpr_slice_str_cmp_type)(gpr_slice a, const char *b); -extern gpr_slice_str_cmp_type gpr_slice_str_cmp_import; -#define gpr_slice_str_cmp gpr_slice_str_cmp_import -typedef void(*gpr_slice_buffer_init_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_init_type gpr_slice_buffer_init_import; -#define gpr_slice_buffer_init gpr_slice_buffer_init_import -typedef void(*gpr_slice_buffer_destroy_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_destroy_type gpr_slice_buffer_destroy_import; -#define gpr_slice_buffer_destroy gpr_slice_buffer_destroy_import -typedef void(*gpr_slice_buffer_add_type)(gpr_slice_buffer *sb, gpr_slice slice); -extern gpr_slice_buffer_add_type gpr_slice_buffer_add_import; -#define gpr_slice_buffer_add gpr_slice_buffer_add_import -typedef size_t(*gpr_slice_buffer_add_indexed_type)(gpr_slice_buffer *sb, gpr_slice slice); -extern gpr_slice_buffer_add_indexed_type gpr_slice_buffer_add_indexed_import; -#define gpr_slice_buffer_add_indexed gpr_slice_buffer_add_indexed_import -typedef void(*gpr_slice_buffer_addn_type)(gpr_slice_buffer *sb, gpr_slice *slices, size_t n); -extern gpr_slice_buffer_addn_type gpr_slice_buffer_addn_import; -#define gpr_slice_buffer_addn gpr_slice_buffer_addn_import -typedef uint8_t *(*gpr_slice_buffer_tiny_add_type)(gpr_slice_buffer *sb, size_t len); -extern gpr_slice_buffer_tiny_add_type gpr_slice_buffer_tiny_add_import; -#define gpr_slice_buffer_tiny_add gpr_slice_buffer_tiny_add_import -typedef void(*gpr_slice_buffer_pop_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_pop_type gpr_slice_buffer_pop_import; -#define gpr_slice_buffer_pop gpr_slice_buffer_pop_import -typedef void(*gpr_slice_buffer_reset_and_unref_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_reset_and_unref_type gpr_slice_buffer_reset_and_unref_import; -#define gpr_slice_buffer_reset_and_unref gpr_slice_buffer_reset_and_unref_import -typedef void(*gpr_slice_buffer_swap_type)(gpr_slice_buffer *a, gpr_slice_buffer *b); -extern gpr_slice_buffer_swap_type gpr_slice_buffer_swap_import; -#define gpr_slice_buffer_swap gpr_slice_buffer_swap_import -typedef void(*gpr_slice_buffer_move_into_type)(gpr_slice_buffer *src, gpr_slice_buffer *dst); -extern gpr_slice_buffer_move_into_type gpr_slice_buffer_move_into_import; -#define gpr_slice_buffer_move_into gpr_slice_buffer_move_into_import -typedef void(*gpr_slice_buffer_trim_end_type)(gpr_slice_buffer *src, size_t n, gpr_slice_buffer *garbage); -extern gpr_slice_buffer_trim_end_type gpr_slice_buffer_trim_end_import; -#define gpr_slice_buffer_trim_end gpr_slice_buffer_trim_end_import -typedef void(*gpr_slice_buffer_move_first_type)(gpr_slice_buffer *src, size_t n, gpr_slice_buffer *dst); -extern gpr_slice_buffer_move_first_type gpr_slice_buffer_move_first_import; -#define gpr_slice_buffer_move_first gpr_slice_buffer_move_first_import -typedef gpr_slice(*gpr_slice_buffer_take_first_type)(gpr_slice_buffer *src); -extern gpr_slice_buffer_take_first_type gpr_slice_buffer_take_first_import; -#define gpr_slice_buffer_take_first gpr_slice_buffer_take_first_import +typedef int(*grpc_slice_cmp_type)(grpc_slice a, grpc_slice b); +extern grpc_slice_cmp_type grpc_slice_cmp_import; +#define grpc_slice_cmp grpc_slice_cmp_import +typedef int(*grpc_slice_str_cmp_type)(grpc_slice a, const char *b); +extern grpc_slice_str_cmp_type grpc_slice_str_cmp_import; +#define grpc_slice_str_cmp grpc_slice_str_cmp_import +typedef void(*grpc_slice_buffer_init_type)(grpc_slice_buffer *sb); +extern grpc_slice_buffer_init_type grpc_slice_buffer_init_import; +#define grpc_slice_buffer_init grpc_slice_buffer_init_import +typedef void(*grpc_slice_buffer_destroy_type)(grpc_slice_buffer *sb); +extern grpc_slice_buffer_destroy_type grpc_slice_buffer_destroy_import; +#define grpc_slice_buffer_destroy grpc_slice_buffer_destroy_import +typedef void(*grpc_slice_buffer_add_type)(grpc_slice_buffer *sb, grpc_slice slice); +extern grpc_slice_buffer_add_type grpc_slice_buffer_add_import; +#define grpc_slice_buffer_add grpc_slice_buffer_add_import +typedef size_t(*grpc_slice_buffer_add_indexed_type)(grpc_slice_buffer *sb, grpc_slice slice); +extern grpc_slice_buffer_add_indexed_type grpc_slice_buffer_add_indexed_import; +#define grpc_slice_buffer_add_indexed grpc_slice_buffer_add_indexed_import +typedef void(*grpc_slice_buffer_addn_type)(grpc_slice_buffer *sb, grpc_slice *slices, size_t n); +extern grpc_slice_buffer_addn_type grpc_slice_buffer_addn_import; +#define grpc_slice_buffer_addn grpc_slice_buffer_addn_import +typedef uint8_t *(*grpc_slice_buffer_tiny_add_type)(grpc_slice_buffer *sb, size_t len); +extern grpc_slice_buffer_tiny_add_type grpc_slice_buffer_tiny_add_import; +#define grpc_slice_buffer_tiny_add grpc_slice_buffer_tiny_add_import +typedef void(*grpc_slice_buffer_pop_type)(grpc_slice_buffer *sb); +extern grpc_slice_buffer_pop_type grpc_slice_buffer_pop_import; +#define grpc_slice_buffer_pop grpc_slice_buffer_pop_import +typedef void(*grpc_slice_buffer_reset_and_unref_type)(grpc_slice_buffer *sb); +extern grpc_slice_buffer_reset_and_unref_type grpc_slice_buffer_reset_and_unref_import; +#define grpc_slice_buffer_reset_and_unref grpc_slice_buffer_reset_and_unref_import +typedef void(*grpc_slice_buffer_swap_type)(grpc_slice_buffer *a, grpc_slice_buffer *b); +extern grpc_slice_buffer_swap_type grpc_slice_buffer_swap_import; +#define grpc_slice_buffer_swap grpc_slice_buffer_swap_import +typedef void(*grpc_slice_buffer_move_into_type)(grpc_slice_buffer *src, grpc_slice_buffer *dst); +extern grpc_slice_buffer_move_into_type grpc_slice_buffer_move_into_import; +#define grpc_slice_buffer_move_into grpc_slice_buffer_move_into_import +typedef void(*grpc_slice_buffer_trim_end_type)(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *garbage); +extern grpc_slice_buffer_trim_end_type grpc_slice_buffer_trim_end_import; +#define grpc_slice_buffer_trim_end grpc_slice_buffer_trim_end_import +typedef void(*grpc_slice_buffer_move_first_type)(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *dst); +extern grpc_slice_buffer_move_first_type grpc_slice_buffer_move_first_import; +#define grpc_slice_buffer_move_first grpc_slice_buffer_move_first_import +typedef grpc_slice(*grpc_slice_buffer_take_first_type)(grpc_slice_buffer *src); +extern grpc_slice_buffer_take_first_type grpc_slice_buffer_take_first_import; +#define grpc_slice_buffer_take_first grpc_slice_buffer_take_first_import typedef char *(*gpr_strdup_type)(const char *src); extern gpr_strdup_type gpr_strdup_import; #define gpr_strdup gpr_strdup_import diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index a9638500b7..07fcd995d7 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -77,7 +77,7 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { typedef struct { grpc_bad_client_client_stream_validator validator; - gpr_slice_buffer incoming; + grpc_slice_buffer incoming; gpr_event read_done; } read_args; @@ -96,9 +96,9 @@ void grpc_run_bad_client_test( gpr_thd_id id; char *hex; grpc_transport *transport; - gpr_slice slice = - gpr_slice_from_copied_buffer(client_payload, client_payload_length); - gpr_slice_buffer outgoing; + grpc_slice slice = + grpc_slice_from_copied_buffer(client_payload, client_payload_length); + grpc_slice_buffer outgoing; grpc_closure done_write_closure; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -146,8 +146,8 @@ void grpc_run_bad_client_test( /* Start validator */ gpr_thd_new(&id, thd_func, &a, NULL); - gpr_slice_buffer_init(&outgoing); - gpr_slice_buffer_add(&outgoing, slice); + grpc_slice_buffer_init(&outgoing); + grpc_slice_buffer_add(&outgoing, slice); grpc_closure_init(&done_write_closure, done_write, &a); /* Write data */ @@ -172,7 +172,7 @@ void grpc_run_bad_client_test( if (client_validator != NULL) { read_args args; args.validator = client_validator; - gpr_slice_buffer_init(&args.incoming); + grpc_slice_buffer_init(&args.incoming); gpr_event_init(&args.read_done); grpc_closure read_done_closure; grpc_closure_init(&read_done_closure, read_done, &args); @@ -181,7 +181,7 @@ void grpc_run_bad_client_test( grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT( gpr_event_wait(&args.read_done, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5))); - gpr_slice_buffer_destroy(&args.incoming); + grpc_slice_buffer_destroy(&args.incoming); } // Shutdown. grpc_endpoint_shutdown(&exec_ctx, sfd.client); @@ -194,7 +194,7 @@ void grpc_run_bad_client_test( .type == GRPC_OP_COMPLETE); grpc_server_destroy(a.server); grpc_completion_queue_destroy(a.cq); - gpr_slice_buffer_destroy(&outgoing); + grpc_slice_buffer_destroy(&outgoing); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); diff --git a/test/core/bad_client/bad_client.h b/test/core/bad_client/bad_client.h index c8b2a4122f..bbca418ef3 100644 --- a/test/core/bad_client/bad_client.h +++ b/test/core/bad_client/bad_client.h @@ -45,7 +45,7 @@ typedef void (*grpc_bad_client_server_side_validator)(grpc_server *server, void *registered_method); typedef void (*grpc_bad_client_client_stream_validator)( - gpr_slice_buffer *incoming); + grpc_slice_buffer *incoming); #define GRPC_BAD_CLIENT_DISCONNECT 1 diff --git a/test/core/bad_client/tests/large_metadata.c b/test/core/bad_client/tests/large_metadata.c index b9c8093ef9..124035c070 100644 --- a/test/core/bad_client/tests/large_metadata.c +++ b/test/core/bad_client/tests/large_metadata.c @@ -183,15 +183,15 @@ static void server_verifier_sends_too_much_metadata(grpc_server *server, cq_verifier_destroy(cqv); } -static void client_validator(gpr_slice_buffer *incoming) { +static void client_validator(grpc_slice_buffer *incoming) { // Get last frame from incoming slice buffer. - gpr_slice_buffer last_frame_buffer; - gpr_slice_buffer_init(&last_frame_buffer); - gpr_slice_buffer_trim_end(incoming, 13, &last_frame_buffer); + grpc_slice_buffer last_frame_buffer; + grpc_slice_buffer_init(&last_frame_buffer); + grpc_slice_buffer_trim_end(incoming, 13, &last_frame_buffer); GPR_ASSERT(last_frame_buffer.count == 1); - gpr_slice last_frame = last_frame_buffer.slices[0]; + grpc_slice last_frame = last_frame_buffer.slices[0]; // Construct expected frame. - gpr_slice expected = gpr_slice_malloc(13); + grpc_slice expected = grpc_slice_malloc(13); uint8_t *p = GPR_SLICE_START_PTR(expected); // Length. *p++ = 0; @@ -212,8 +212,8 @@ static void client_validator(gpr_slice_buffer *incoming) { *p++ = 0; *p++ = 11; // Compare actual and expected. - GPR_ASSERT(gpr_slice_cmp(last_frame, expected) == 0); - gpr_slice_buffer_destroy(&last_frame_buffer); + GPR_ASSERT(grpc_slice_cmp(last_frame, expected) == 0); + grpc_slice_buffer_destroy(&last_frame_buffer); } int main(int argc, char **argv) { diff --git a/test/core/bad_ssl/servers/cert.c b/test/core/bad_ssl/servers/cert.c index 91dd9de81b..52922f5d6b 100644 --- a/test/core/bad_ssl/servers/cert.c +++ b/test/core/bad_ssl/servers/cert.c @@ -51,7 +51,7 @@ int main(int argc, char **argv) { grpc_ssl_pem_key_cert_pair pem_key_cert_pair; grpc_server_credentials *ssl_creds; grpc_server *server; - gpr_slice cert_slice, key_slice; + grpc_slice cert_slice, key_slice; grpc_init(); @@ -70,8 +70,8 @@ int main(int argc, char **argv) { GPR_ASSERT(grpc_server_add_secure_http2_port(server, addr, ssl_creds)); grpc_server_credentials_release(ssl_creds); - gpr_slice_unref(cert_slice); - gpr_slice_unref(key_slice); + grpc_slice_unref(cert_slice); + grpc_slice_unref(key_slice); bad_ssl_run(server); grpc_shutdown(); diff --git a/test/core/client_channel/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c index b7bd67567c..350f2884d7 100644 --- a/test/core/client_channel/set_initial_connect_string_test.c +++ b/test/core/client_channel/set_initial_connect_string_test.c @@ -54,8 +54,8 @@ struct rpc_state { grpc_channel *channel; grpc_call *call; grpc_op op; - gpr_slice_buffer incoming_buffer; - gpr_slice_buffer temp_incoming_buffer; + grpc_slice_buffer incoming_buffer; + grpc_slice_buffer temp_incoming_buffer; grpc_endpoint *tcp; gpr_atm done_atm; }; @@ -67,7 +67,7 @@ static grpc_closure on_read; static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(error == GRPC_ERROR_NONE); - gpr_slice_buffer_move_into(&state.temp_incoming_buffer, + grpc_slice_buffer_move_into(&state.temp_incoming_buffer, &state.incoming_buffer); gpr_log(GPR_DEBUG, "got %" PRIuPTR " bytes, magic is %" PRIuPTR " bytes", state.incoming_buffer.length, strlen(magic_connect_string)); @@ -86,25 +86,25 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_tcp_server_acceptor *acceptor) { test_tcp_server *server = arg; grpc_closure_init(&on_read, handle_read, NULL); - gpr_slice_buffer_init(&state.incoming_buffer); - gpr_slice_buffer_init(&state.temp_incoming_buffer); + grpc_slice_buffer_init(&state.incoming_buffer); + grpc_slice_buffer_init(&state.temp_incoming_buffer); state.tcp = tcp; grpc_endpoint_add_to_pollset(exec_ctx, tcp, server->pollset); grpc_endpoint_read(exec_ctx, tcp, &state.temp_incoming_buffer, &on_read); } static void set_magic_initial_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *connect_string) { + grpc_slice *connect_string) { GPR_ASSERT(addr); GPR_ASSERT(addr_len); - *connect_string = gpr_slice_from_copied_string(magic_connect_string); + *connect_string = grpc_slice_from_copied_string(magic_connect_string); } static void reset_addr_and_set_magic_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *connect_string) { + grpc_slice *connect_string) { struct sockaddr_in target; - *connect_string = gpr_slice_from_copied_string(magic_connect_string); + *connect_string = grpc_slice_from_copied_string(magic_connect_string); gpr_free(*addr); target.sin_family = AF_INET; target.sin_addr.s_addr = htonl(INADDR_LOOPBACK); @@ -148,8 +148,8 @@ static void start_rpc(int use_creds, int target_port) { static void cleanup_rpc(void) { grpc_event ev; - gpr_slice_buffer_destroy(&state.incoming_buffer); - gpr_slice_buffer_destroy(&state.temp_incoming_buffer); + grpc_slice_buffer_destroy(&state.incoming_buffer); + grpc_slice_buffer_destroy(&state.temp_incoming_buffer); grpc_channel_credentials_unref(state.creds); grpc_call_destroy(state.call); grpc_completion_queue_shutdown(state.cq); @@ -194,7 +194,7 @@ static void poll_server_until_read_done(test_tcp_server *server, gpr_thd_new(&id, actually_poll_server, pa, NULL); } -static void match_initial_magic_string(gpr_slice_buffer *buffer) { +static void match_initial_magic_string(grpc_slice_buffer *buffer) { size_t i, j, cmp_length; size_t magic_length = strlen(magic_connect_string); GPR_ASSERT(buffer->length >= magic_length); diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c index 47ecf72e08..c6963df85d 100644 --- a/test/core/compression/message_compress_test.c +++ b/test/core/compression/message_compress_test.c @@ -52,16 +52,16 @@ typedef enum { MAYBE_COMPRESSES } compressability; -static void assert_passthrough(gpr_slice value, +static void assert_passthrough(grpc_slice value, grpc_compression_algorithm algorithm, grpc_slice_split_mode uncompressed_split_mode, grpc_slice_split_mode compressed_split_mode, compressability compress_result_check) { - gpr_slice_buffer input; - gpr_slice_buffer compressed_raw; - gpr_slice_buffer compressed; - gpr_slice_buffer output; - gpr_slice final; + grpc_slice_buffer input; + grpc_slice_buffer compressed_raw; + grpc_slice_buffer compressed; + grpc_slice_buffer output; + grpc_slice final; int was_compressed; char *algorithm_name; @@ -75,10 +75,10 @@ static void assert_passthrough(gpr_slice value, algorithm_name, grpc_slice_split_mode_name(uncompressed_split_mode), grpc_slice_split_mode_name(compressed_split_mode)); - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&compressed_raw); - gpr_slice_buffer_init(&compressed); - gpr_slice_buffer_init(&output); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&compressed_raw); + grpc_slice_buffer_init(&compressed); + grpc_slice_buffer_init(&output); grpc_split_slices_to_buffer(uncompressed_split_mode, &value, 1, &input); @@ -103,17 +103,17 @@ static void assert_passthrough(gpr_slice value, was_compressed ? algorithm : GRPC_COMPRESS_NONE, &compressed, &output)); final = grpc_slice_merge(output.slices, output.count); - GPR_ASSERT(0 == gpr_slice_cmp(value, final)); + GPR_ASSERT(0 == grpc_slice_cmp(value, final)); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&compressed); - gpr_slice_buffer_destroy(&compressed_raw); - gpr_slice_buffer_destroy(&output); - gpr_slice_unref(final); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&compressed); + grpc_slice_buffer_destroy(&compressed_raw); + grpc_slice_buffer_destroy(&output); + grpc_slice_unref(final); } -static gpr_slice repeated(char c, size_t length) { - gpr_slice out = gpr_slice_malloc(length); +static grpc_slice repeated(char c, size_t length) { + grpc_slice out = grpc_slice_malloc(length); memset(GPR_SLICE_START_PTR(out), c, length); return out; } @@ -134,10 +134,10 @@ static compressability get_compressability( return MAYBE_COMPRESSES; } -static gpr_slice create_test_value(test_value id) { +static grpc_slice create_test_value(test_value id) { switch (id) { case ONE_A: - return gpr_slice_from_copied_string("a"); + return grpc_slice_from_copied_string("a"); case ONE_KB_A: return repeated('a', 1024); case ONE_MB_A: @@ -146,17 +146,17 @@ static gpr_slice create_test_value(test_value id) { abort(); break; } - return gpr_slice_from_copied_string("bad value"); + return grpc_slice_from_copied_string("bad value"); } static void test_tiny_data_compress(void) { - gpr_slice_buffer input; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer output; grpc_compression_algorithm i; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&output); - gpr_slice_buffer_add(&input, create_test_value(ONE_A)); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&output); + grpc_slice_buffer_add(&input, create_test_value(ONE_A)); for (i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) { if (i == GRPC_COMPRESS_NONE) continue; @@ -164,21 +164,21 @@ static void test_tiny_data_compress(void) { GPR_ASSERT(1 == output.count); } - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&output); } static void test_bad_decompression_data_crc(void) { - gpr_slice_buffer input; - gpr_slice_buffer corrupted; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer corrupted; + grpc_slice_buffer output; size_t idx; const uint32_t bad = 0xdeadbeef; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&corrupted); - gpr_slice_buffer_init(&output); - gpr_slice_buffer_add(&input, create_test_value(ONE_MB_A)); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&corrupted); + grpc_slice_buffer_init(&output); + grpc_slice_buffer_add(&input, create_test_value(ONE_MB_A)); /* compress it */ grpc_msg_compress(GRPC_COMPRESS_GZIP, &input, &corrupted); @@ -191,54 +191,54 @@ static void test_bad_decompression_data_crc(void) { /* try (and fail) to decompress the corrupted compresed buffer */ GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_GZIP, &corrupted, &output)); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&corrupted); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&corrupted); + grpc_slice_buffer_destroy(&output); } static void test_bad_decompression_data_trailing_garbage(void) { - gpr_slice_buffer input; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer output; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&output); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&output); /* append 0x99 to the end of an otherwise valid stream */ - gpr_slice_buffer_add( - &input, gpr_slice_from_copied_buffer( + grpc_slice_buffer_add( + &input, grpc_slice_from_copied_buffer( "\x78\xda\x63\x60\x60\x60\x00\x00\x00\x04\x00\x01\x99", 13)); /* try (and fail) to decompress the invalid compresed buffer */ GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output)); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&output); } static void test_bad_decompression_data_stream(void) { - gpr_slice_buffer input; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer output; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&output); - gpr_slice_buffer_add(&input, - gpr_slice_from_copied_buffer("\x78\xda\xff\xff", 4)); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&output); + grpc_slice_buffer_add(&input, + grpc_slice_from_copied_buffer("\x78\xda\xff\xff", 4)); /* try (and fail) to decompress the invalid compresed buffer */ GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output)); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&output); } static void test_bad_compression_algorithm(void) { - gpr_slice_buffer input; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer output; int was_compressed; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&output); - gpr_slice_buffer_add(&input, - gpr_slice_from_copied_string("Never gonna give you up")); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&output); + grpc_slice_buffer_add(&input, + grpc_slice_from_copied_string("Never gonna give you up")); was_compressed = grpc_msg_compress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); GPR_ASSERT(0 == was_compressed); @@ -247,19 +247,19 @@ static void test_bad_compression_algorithm(void) { grpc_msg_compress(GRPC_COMPRESS_ALGORITHMS_COUNT + 123, &input, &output); GPR_ASSERT(0 == was_compressed); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&output); } static void test_bad_decompression_algorithm(void) { - gpr_slice_buffer input; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer output; int was_decompressed; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&output); - gpr_slice_buffer_add(&input, - gpr_slice_from_copied_string( + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&output); + grpc_slice_buffer_add(&input, + grpc_slice_from_copied_string( "I'm not really compressed but it doesn't matter")); was_decompressed = grpc_msg_decompress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); @@ -269,8 +269,8 @@ static void test_bad_decompression_algorithm(void) { &input, &output); GPR_ASSERT(0 == was_decompressed); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&output); } int main(int argc, char **argv) { @@ -288,9 +288,9 @@ int main(int argc, char **argv) { for (j = 0; j < GPR_ARRAY_SIZE(uncompressed_split_modes); j++) { for (k = 0; k < GPR_ARRAY_SIZE(compressed_split_modes); k++) { for (m = 0; m < TEST_VALUE_COUNT; m++) { - gpr_slice slice = create_test_value(m); + grpc_slice slice = create_test_value(m); assert_passthrough(slice, i, j, k, get_compressability(m, i)); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } } } diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 5ed0eb64d2..cb2030a7d7 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -82,8 +82,8 @@ struct rpc_state { grpc_channel *channel; grpc_call *call; size_t incoming_data_length; - gpr_slice_buffer temp_incoming_buffer; - gpr_slice_buffer outgoing_buffer; + grpc_slice_buffer temp_incoming_buffer; + grpc_slice_buffer outgoing_buffer; grpc_endpoint *tcp; gpr_atm done_atm; bool write_done; @@ -105,11 +105,11 @@ static void done_write(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } static void handle_write(grpc_exec_ctx *exec_ctx) { - gpr_slice slice = gpr_slice_from_copied_buffer(state.response_payload, + grpc_slice slice = grpc_slice_from_copied_buffer(state.response_payload, state.response_payload_length); - gpr_slice_buffer_reset_and_unref(&state.outgoing_buffer); - gpr_slice_buffer_add(&state.outgoing_buffer, slice); + grpc_slice_buffer_reset_and_unref(&state.outgoing_buffer); + grpc_slice_buffer_add(&state.outgoing_buffer, slice); grpc_endpoint_write(exec_ctx, state.tcp, &state.outgoing_buffer, &on_write); } @@ -141,8 +141,8 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, test_tcp_server *server = arg; grpc_closure_init(&on_read, handle_read, NULL); grpc_closure_init(&on_write, done_write, NULL); - gpr_slice_buffer_init(&state.temp_incoming_buffer); - gpr_slice_buffer_init(&state.outgoing_buffer); + grpc_slice_buffer_init(&state.temp_incoming_buffer); + grpc_slice_buffer_init(&state.outgoing_buffer); state.tcp = tcp; state.incoming_data_length = 0; grpc_endpoint_add_to_pollset(exec_ctx, tcp, server->pollset); @@ -221,8 +221,8 @@ static void start_rpc(int target_port, grpc_status_code expected_status, static void cleanup_rpc(void) { grpc_event ev; - gpr_slice_buffer_destroy(&state.temp_incoming_buffer); - gpr_slice_buffer_destroy(&state.outgoing_buffer); + grpc_slice_buffer_destroy(&state.temp_incoming_buffer); + grpc_slice_buffer_destroy(&state.outgoing_buffer); grpc_call_destroy(state.call); grpc_completion_queue_shutdown(state.cq); do { diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 3e7e3f22a2..3b9aa24368 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -105,17 +105,17 @@ int contains_metadata(grpc_metadata_array *array, const char *key, return has_metadata(array->metadata, array->count, key, value); } -static gpr_slice merge_slices(gpr_slice *slices, size_t nslices) { +static grpc_slice merge_slices(grpc_slice *slices, size_t nslices) { size_t i; size_t len = 0; uint8_t *cursor; - gpr_slice out; + grpc_slice out; for (i = 0; i < nslices; i++) { len += GPR_SLICE_LENGTH(slices[i]); } - out = gpr_slice_malloc(len); + out = grpc_slice_malloc(len); cursor = GPR_SLICE_START_PTR(out); for (i = 0; i < nslices; i++) { @@ -126,8 +126,8 @@ static gpr_slice merge_slices(gpr_slice *slices, size_t nslices) { return out; } -int raw_byte_buffer_eq_slice(grpc_byte_buffer *rbb, gpr_slice b) { - gpr_slice a; +int raw_byte_buffer_eq_slice(grpc_byte_buffer *rbb, grpc_slice b) { + grpc_slice a; int ok; if (!rbb) return 0; @@ -137,12 +137,12 @@ int raw_byte_buffer_eq_slice(grpc_byte_buffer *rbb, gpr_slice b) { ok = GPR_SLICE_LENGTH(a) == GPR_SLICE_LENGTH(b) && 0 == memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), GPR_SLICE_LENGTH(a)); - gpr_slice_unref(a); - gpr_slice_unref(b); + grpc_slice_unref(a); + grpc_slice_unref(b); return ok; } -int byte_buffer_eq_slice(grpc_byte_buffer *bb, gpr_slice b) { +int byte_buffer_eq_slice(grpc_byte_buffer *bb, grpc_slice b) { grpc_byte_buffer_reader reader; grpc_byte_buffer *rbb; int res; @@ -165,7 +165,7 @@ int byte_buffer_eq_string(grpc_byte_buffer *bb, const char *str) { GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, bb) && "Couldn't init byte buffer reader"); rbb = grpc_raw_byte_buffer_from_reader(&reader); - res = raw_byte_buffer_eq_slice(rbb, gpr_slice_from_copied_string(str)); + res = raw_byte_buffer_eq_slice(rbb, grpc_slice_from_copied_string(str)); grpc_byte_buffer_reader_destroy(&reader); grpc_byte_buffer_destroy(rbb); diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h index 47464fa319..b754de9bbe 100644 --- a/test/core/end2end/cq_verifier.h +++ b/test/core/end2end/cq_verifier.h @@ -67,7 +67,7 @@ void cq_expect_completion(cq_verifier *v, const char *file, int line, void *tag, #define CQ_EXPECT_COMPLETION(v, tag, success) \ cq_expect_completion(v, __FILE__, __LINE__, tag, success) -int byte_buffer_eq_slice(grpc_byte_buffer *bb, gpr_slice b); +int byte_buffer_eq_slice(grpc_byte_buffer *bb, grpc_slice b); int byte_buffer_eq_string(grpc_byte_buffer *byte_buffer, const char *string); int contains_metadata(grpc_metadata_array *array, const char *key, const char *value); diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index cb07ca535b..5860257607 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -120,14 +120,14 @@ void test_connect(const char *server_host, const char *client_host, int port, if (client_host[0] == 'i') { /* for ipv4:/ipv6: addresses, concatenate the port to each of the parts */ size_t i; - gpr_slice uri_slice; - gpr_slice_buffer uri_parts; + grpc_slice uri_slice; + grpc_slice_buffer uri_parts; char **hosts_with_port; uri_slice = - gpr_slice_new((char *)client_host, strlen(client_host), do_nothing); - gpr_slice_buffer_init(&uri_parts); - gpr_slice_split(uri_slice, ",", &uri_parts); + grpc_slice_new((char *)client_host, strlen(client_host), do_nothing); + grpc_slice_buffer_init(&uri_parts); + grpc_slice_split(uri_slice, ",", &uri_parts); hosts_with_port = gpr_malloc(sizeof(char *) * uri_parts.count); for (i = 0; i < uri_parts.count; i++) { char *uri_part_str = gpr_dump_slice(uri_parts.slices[i], GPR_DUMP_ASCII); @@ -140,8 +140,8 @@ void test_connect(const char *server_host, const char *client_host, int port, gpr_free(hosts_with_port[i]); } gpr_free(hosts_with_port); - gpr_slice_buffer_destroy(&uri_parts); - gpr_slice_unref(uri_slice); + grpc_slice_buffer_destroy(&uri_parts); + grpc_slice_unref(uri_slice); } else { gpr_join_host_port(&client_hostport, client_host, port); } diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c index 5669ce51e8..4687e52313 100644 --- a/test/core/end2end/fake_resolver.c +++ b/test/core/end2end/fake_resolver.c @@ -163,11 +163,11 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory, const bool lb_enabled = lb_enabled_qpart != NULL && strcmp("0", lb_enabled_qpart) != 0; // Construct addresses. - gpr_slice path_slice = - gpr_slice_new(args->uri->path, strlen(args->uri->path), do_nothing); - gpr_slice_buffer path_parts; - gpr_slice_buffer_init(&path_parts); - gpr_slice_split(path_slice, ",", &path_parts); + grpc_slice path_slice = + grpc_slice_new(args->uri->path, strlen(args->uri->path), do_nothing); + grpc_slice_buffer path_parts; + grpc_slice_buffer_init(&path_parts); + grpc_slice_split(path_slice, ",", &path_parts); grpc_lb_addresses* addresses = grpc_lb_addresses_create(path_parts.count); bool errors_found = false; for (size_t i = 0; i < addresses->num_addresses; i++) { @@ -184,8 +184,8 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory, addresses->addresses[i].is_balancer = lb_enabled; if (errors_found) break; } - gpr_slice_buffer_destroy(&path_parts); - gpr_slice_unref(path_slice); + grpc_slice_buffer_destroy(&path_parts); + grpc_slice_unref(path_slice); if (errors_found) { grpc_lb_addresses_destroy(addresses, NULL /* user_data_destroy */); return NULL; diff --git a/test/core/end2end/fixtures/http_proxy.c b/test/core/end2end/fixtures/http_proxy.c index bc24cb33cf..88c77a5168 100644 --- a/test/core/end2end/fixtures/http_proxy.c +++ b/test/core/end2end/fixtures/http_proxy.c @@ -89,12 +89,12 @@ typedef struct proxy_connection { grpc_closure on_server_read_done; grpc_closure on_server_write_done; - gpr_slice_buffer client_read_buffer; - gpr_slice_buffer client_deferred_write_buffer; - gpr_slice_buffer client_write_buffer; - gpr_slice_buffer server_read_buffer; - gpr_slice_buffer server_deferred_write_buffer; - gpr_slice_buffer server_write_buffer; + grpc_slice_buffer client_read_buffer; + grpc_slice_buffer client_deferred_write_buffer; + grpc_slice_buffer client_write_buffer; + grpc_slice_buffer server_read_buffer; + grpc_slice_buffer server_deferred_write_buffer; + grpc_slice_buffer server_write_buffer; grpc_http_parser http_parser; grpc_http_request http_request; @@ -108,12 +108,12 @@ static void proxy_connection_unref(grpc_exec_ctx* exec_ctx, if (conn->server_endpoint != NULL) grpc_endpoint_destroy(exec_ctx, conn->server_endpoint); grpc_pollset_set_destroy(conn->pollset_set); - gpr_slice_buffer_destroy(&conn->client_read_buffer); - gpr_slice_buffer_destroy(&conn->client_deferred_write_buffer); - gpr_slice_buffer_destroy(&conn->client_write_buffer); - gpr_slice_buffer_destroy(&conn->server_read_buffer); - gpr_slice_buffer_destroy(&conn->server_deferred_write_buffer); - gpr_slice_buffer_destroy(&conn->server_write_buffer); + grpc_slice_buffer_destroy(&conn->client_read_buffer); + grpc_slice_buffer_destroy(&conn->client_deferred_write_buffer); + grpc_slice_buffer_destroy(&conn->client_write_buffer); + grpc_slice_buffer_destroy(&conn->server_read_buffer); + grpc_slice_buffer_destroy(&conn->server_deferred_write_buffer); + grpc_slice_buffer_destroy(&conn->server_write_buffer); grpc_http_parser_destroy(&conn->http_parser); grpc_http_request_destroy(&conn->http_request); gpr_free(conn); @@ -144,11 +144,11 @@ static void on_client_write_done(grpc_exec_ctx* exec_ctx, void* arg, return; } // Clear write buffer (the data we just wrote). - gpr_slice_buffer_reset_and_unref(&conn->client_write_buffer); + grpc_slice_buffer_reset_and_unref(&conn->client_write_buffer); // If more data was read from the server since we started this write, // write that data now. if (conn->client_deferred_write_buffer.length > 0) { - gpr_slice_buffer_move_into(&conn->client_deferred_write_buffer, + grpc_slice_buffer_move_into(&conn->client_deferred_write_buffer, &conn->client_write_buffer); grpc_endpoint_write(exec_ctx, conn->client_endpoint, &conn->client_write_buffer, @@ -169,11 +169,11 @@ static void on_server_write_done(grpc_exec_ctx* exec_ctx, void* arg, return; } // Clear write buffer (the data we just wrote). - gpr_slice_buffer_reset_and_unref(&conn->server_write_buffer); + grpc_slice_buffer_reset_and_unref(&conn->server_write_buffer); // If more data was read from the client since we started this write, // write that data now. if (conn->server_deferred_write_buffer.length > 0) { - gpr_slice_buffer_move_into(&conn->server_deferred_write_buffer, + grpc_slice_buffer_move_into(&conn->server_deferred_write_buffer, &conn->server_write_buffer); grpc_endpoint_write(exec_ctx, conn->server_endpoint, &conn->server_write_buffer, @@ -201,10 +201,10 @@ static void on_client_read_done(grpc_exec_ctx* exec_ctx, void* arg, // // Otherwise, move the read data into the write buffer and write it. if (conn->server_write_buffer.length > 0) { - gpr_slice_buffer_move_into(&conn->client_read_buffer, + grpc_slice_buffer_move_into(&conn->client_read_buffer, &conn->server_deferred_write_buffer); } else { - gpr_slice_buffer_move_into(&conn->client_read_buffer, + grpc_slice_buffer_move_into(&conn->client_read_buffer, &conn->server_write_buffer); gpr_ref(&conn->refcount); grpc_endpoint_write(exec_ctx, conn->server_endpoint, @@ -233,10 +233,10 @@ static void on_server_read_done(grpc_exec_ctx* exec_ctx, void* arg, // // Otherwise, move the read data into the write buffer and write it. if (conn->client_write_buffer.length > 0) { - gpr_slice_buffer_move_into(&conn->server_read_buffer, + grpc_slice_buffer_move_into(&conn->server_read_buffer, &conn->client_deferred_write_buffer); } else { - gpr_slice_buffer_move_into(&conn->server_read_buffer, + grpc_slice_buffer_move_into(&conn->server_read_buffer, &conn->client_write_buffer); gpr_ref(&conn->refcount); grpc_endpoint_write(exec_ctx, conn->client_endpoint, @@ -258,7 +258,7 @@ static void on_write_response_done(grpc_exec_ctx* exec_ctx, void* arg, return; } // Clear write buffer. - gpr_slice_buffer_reset_and_unref(&conn->client_write_buffer); + grpc_slice_buffer_reset_and_unref(&conn->client_write_buffer); // Start reading from both client and server. One of the read // requests inherits our ref to conn, but we need to take a new ref // for the other one. @@ -287,9 +287,9 @@ static void on_server_connect_done(grpc_exec_ctx* exec_ctx, void* arg, // We've established a connection, so send back a 200 response code to // the client. // The write callback inherits our reference to conn. - gpr_slice slice = - gpr_slice_from_copied_string("HTTP/1.0 200 connected\r\n\r\n"); - gpr_slice_buffer_add(&conn->client_write_buffer, slice); + grpc_slice slice = + grpc_slice_from_copied_string("HTTP/1.0 200 connected\r\n\r\n"); + grpc_slice_buffer_add(&conn->client_write_buffer, slice); grpc_endpoint_write(exec_ctx, conn->client_endpoint, &conn->client_write_buffer, &conn->on_write_response_done); @@ -322,7 +322,7 @@ static void on_read_request_done(grpc_exec_ctx* exec_ctx, void* arg, } } } - gpr_slice_buffer_reset_and_unref(&conn->client_read_buffer); + grpc_slice_buffer_reset_and_unref(&conn->client_read_buffer); // If we're not done reading the request, read more data. if (conn->http_parser.state != GRPC_HTTP_BODY) { grpc_endpoint_read(exec_ctx, conn->client_endpoint, @@ -383,12 +383,12 @@ static void on_accept(grpc_exec_ctx* exec_ctx, void* arg, grpc_closure_init(&conn->on_client_write_done, on_client_write_done, conn); grpc_closure_init(&conn->on_server_read_done, on_server_read_done, conn); grpc_closure_init(&conn->on_server_write_done, on_server_write_done, conn); - gpr_slice_buffer_init(&conn->client_read_buffer); - gpr_slice_buffer_init(&conn->client_deferred_write_buffer); - gpr_slice_buffer_init(&conn->client_write_buffer); - gpr_slice_buffer_init(&conn->server_read_buffer); - gpr_slice_buffer_init(&conn->server_deferred_write_buffer); - gpr_slice_buffer_init(&conn->server_write_buffer); + grpc_slice_buffer_init(&conn->client_read_buffer); + grpc_slice_buffer_init(&conn->client_deferred_write_buffer); + grpc_slice_buffer_init(&conn->client_write_buffer); + grpc_slice_buffer_init(&conn->server_read_buffer); + grpc_slice_buffer_init(&conn->server_deferred_write_buffer); + grpc_slice_buffer_init(&conn->server_write_buffer); grpc_http_parser_init(&conn->http_parser, GRPC_HTTP_REQUEST, &conn->http_request); grpc_endpoint_read(exec_ctx, conn->client_endpoint, &conn->client_read_buffer, diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 945cc960e9..210a863f48 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -137,10 +137,10 @@ static uint32_t read_uint32(input_stream *inp) { } static grpc_byte_buffer *read_message(input_stream *inp) { - gpr_slice slice = gpr_slice_malloc(read_uint22(inp)); + grpc_slice slice = grpc_slice_malloc(read_uint22(inp)); memset(GPR_SLICE_START_PTR(slice), 0, GPR_SLICE_LENGTH(slice)); grpc_byte_buffer *out = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return out; } diff --git a/test/core/end2end/fuzzers/client_fuzzer.c b/test/core/end2end/fuzzers/client_fuzzer.c index d104fe55e5..c5260cd287 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.c +++ b/test/core/end2end/fuzzers/client_fuzzer.c @@ -44,7 +44,7 @@ bool squelch = true; bool leak_check = true; -static void discard_write(gpr_slice slice) {} +static void discard_write(grpc_slice slice) {} static void *tag(int n) { return (void *)(uintptr_t)n; } @@ -121,7 +121,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_mock_endpoint_put_read( &exec_ctx, mock_endpoint, - gpr_slice_from_copied_buffer((const char *)data, size)); + grpc_slice_from_copied_buffer((const char *)data, size)); grpc_event ev; while (1) { diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index ae4c8e658d..164022ec79 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -41,7 +41,7 @@ bool squelch = true; bool leak_check = true; -static void discard_write(gpr_slice slice) {} +static void discard_write(grpc_slice slice) {} static void *tag(int n) { return (void *)(uintptr_t)n; } static int detag(void *p) { return (int)(uintptr_t)p; } @@ -63,7 +63,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_mock_endpoint_put_read( &exec_ctx, mock_endpoint, - gpr_slice_from_copied_buffer((const char *)data, size)); + grpc_slice_from_copied_buffer((const char *)data, size)); grpc_server *server = grpc_server_create(NULL, NULL); grpc_completion_queue *cq = grpc_completion_queue_create(NULL); diff --git a/test/core/end2end/invalid_call_argument_test.c b/test/core/end2end/invalid_call_argument_test.c index 2b9904a244..6cc7d28489 100644 --- a/test/core/end2end/invalid_call_argument_test.c +++ b/test/core/end2end/invalid_call_argument_test.c @@ -251,7 +251,7 @@ static void test_send_messages_at_the_same_time() { gpr_log(GPR_INFO, "test_send_messages_at_the_same_time"); grpc_op *op; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); prepare_test(1); diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c index 73b0f17c24..317ca3110b 100644 --- a/test/core/end2end/tests/binary_metadata.c +++ b/test/core/end2end/tests/binary_metadata.c @@ -100,8 +100,8 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c index 99c5d94e39..8f8b7d5119 100644 --- a/test/core/end2end/tests/call_creds.c +++ b/test/core/end2end/tests/call_creds.c @@ -135,8 +135,8 @@ static void request_response_with_payload_and_call_creds( override_mode mode) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = @@ -389,7 +389,7 @@ static void test_request_with_server_rejecting_client_creds( char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_call_credentials *creds; diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index 9f49815527..4bf55c8725 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -118,8 +118,8 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, size_t details_capacity = 0; grpc_byte_buffer *request_payload_recv = NULL; grpc_byte_buffer *response_payload_recv = NULL; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/cancel_after_client_done.c b/test/core/end2end/tests/cancel_after_client_done.c index f61a404b2d..afb17b0719 100644 --- a/test/core/end2end/tests/cancel_after_client_done.c +++ b/test/core/end2end/tests/cancel_after_client_done.c @@ -117,8 +117,8 @@ static void test_cancel_after_accept_and_writes_closed( size_t details_capacity = 0; grpc_byte_buffer *request_payload_recv = NULL; grpc_byte_buffer *response_payload_recv = NULL; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c index c31582bf2e..fe0e0d689c 100644 --- a/test/core/end2end/tests/cancel_after_invoke.c +++ b/test/core/end2end/tests/cancel_after_invoke.c @@ -116,7 +116,7 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config, char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c index 5dcd44e7b4..3a0b83c4d2 100644 --- a/test/core/end2end/tests/cancel_before_invoke.c +++ b/test/core/end2end/tests/cancel_before_invoke.c @@ -114,7 +114,7 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config, char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index f598a3812b..92788dd8fa 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -110,7 +110,7 @@ static void request_for_disabled_algorithm( grpc_status_code expected_error, grpc_metadata *client_metadata) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice; + grpc_slice request_payload_slice; grpc_byte_buffer *request_payload; gpr_timespec deadline = five_seconds_time(); grpc_channel_args *client_args; @@ -133,7 +133,7 @@ static void request_for_disabled_algorithm( memset(str, 'x', 1023); str[1023] = '\0'; - request_payload_slice = gpr_slice_from_copied_string(str); + request_payload_slice = grpc_slice_from_copied_string(str); request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); client_args = grpc_channel_args_set_compression_algorithm( @@ -255,7 +255,7 @@ static void request_for_disabled_algorithm( cq_verifier_destroy(cqv); - gpr_slice_unref(request_payload_slice); + grpc_slice_unref(request_payload_slice); grpc_byte_buffer_destroy(request_payload); grpc_byte_buffer_destroy(request_payload_recv); @@ -277,7 +277,7 @@ static void request_with_payload_template( grpc_compression_level server_compression_level) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice; + grpc_slice request_payload_slice; grpc_byte_buffer *request_payload; gpr_timespec deadline = five_seconds_time(); grpc_channel_args *client_args; @@ -307,8 +307,8 @@ static void request_with_payload_template( memset(response_str, 'y', 1023); response_str[1023] = '\0'; - request_payload_slice = gpr_slice_from_copied_string(request_str); - gpr_slice response_payload_slice = gpr_slice_from_copied_string(response_str); + request_payload_slice = grpc_slice_from_copied_string(request_str); + grpc_slice response_payload_slice = grpc_slice_from_copied_string(response_str); client_args = grpc_channel_args_set_compression_algorithm( NULL, default_client_channel_compression_algorithm); @@ -458,8 +458,8 @@ static void request_with_payload_template( grpc_byte_buffer_destroy(response_payload_recv); } - gpr_slice_unref(request_payload_slice); - gpr_slice_unref(response_payload_slice); + grpc_slice_unref(request_payload_slice); + grpc_slice_unref(response_payload_slice); memset(ops, 0, sizeof(ops)); op = ops; diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c index 0e5692f4c9..36f98694b6 100644 --- a/test/core/end2end/tests/filter_call_init_fails.c +++ b/test/core/end2end/tests/filter_call_init_fails.c @@ -108,7 +108,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index d5eddc7330..66449558c7 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -104,7 +104,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); @@ -207,8 +207,8 @@ static void recv_im_ready(grpc_exec_ctx *exec_ctx, void *arg, call_data *calld = elem->call_data; if (error == GRPC_ERROR_NONE) { // close the stream with an error. - gpr_slice message = - gpr_slice_from_copied_string("Failure that's not preventable."); + grpc_slice message = + grpc_slice_from_copied_string("Failure that's not preventable."); grpc_transport_stream_op *op = grpc_make_transport_stream_op(NULL); grpc_transport_stream_op_add_close(op, GRPC_STATUS_PERMISSION_DENIED, &message); diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c index 3820504e11..0a4d87c2fb 100644 --- a/test/core/end2end/tests/invoke_large_request.c +++ b/test/core/end2end/tests/invoke_large_request.c @@ -94,8 +94,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -static gpr_slice large_slice(void) { - gpr_slice slice = gpr_slice_malloc(1000000); +static grpc_slice large_slice(void) { + grpc_slice slice = grpc_slice_malloc(1000000); memset(GPR_SLICE_START_PTR(slice), 'x', GPR_SLICE_LENGTH(slice)); return slice; } @@ -120,8 +120,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config, begin_test(config, name, &channel_args, &channel_args); gpr_free(name); - gpr_slice request_payload_slice = large_slice(); - gpr_slice response_payload_slice = large_slice(); + grpc_slice request_payload_slice = large_slice(); + grpc_slice response_payload_slice = large_slice(); grpc_call *c; grpc_call *s; grpc_byte_buffer *request_payload = @@ -262,8 +262,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config, grpc_byte_buffer_destroy(response_payload); grpc_byte_buffer_destroy(request_payload_recv); grpc_byte_buffer_destroy(response_payload_recv); - gpr_slice_unref(request_payload_slice); - gpr_slice_unref(response_payload_slice); + grpc_slice_unref(request_payload_slice); + grpc_slice_unref(response_payload_slice); end_test(&f); config.tear_down_data(&f); diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index 6107836b12..29dcafb985 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -99,7 +99,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request_with_large_metadata(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c index 0915730a02..1dba200c02 100644 --- a/test/core/end2end/tests/load_reporting_hook.c +++ b/test/core/end2end/tests/load_reporting_hook.c @@ -127,8 +127,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f, const char *response_msg, grpc_metadata *initial_lr_metadata, grpc_metadata *trailing_lr_metadata) { - gpr_slice request_payload_slice = gpr_slice_from_static_string(request_msg); - gpr_slice response_payload_slice = gpr_slice_from_static_string(response_msg); + grpc_slice request_payload_slice = grpc_slice_from_static_string(request_msg); + grpc_slice response_payload_slice = grpc_slice_from_static_string(response_msg); grpc_call *c; grpc_call *s; grpc_byte_buffer *request_payload = diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index 449a581d23..cdf52f9838 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -116,7 +116,7 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config, cq_verifier *cqv; grpc_op ops[6]; grpc_op *op; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *recv_payload = NULL; @@ -277,8 +277,8 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, cq_verifier *cqv; grpc_op ops[6]; grpc_op *op; - gpr_slice response_payload_slice = - gpr_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *response_payload = grpc_raw_byte_buffer_create(&response_payload_slice, 1); grpc_byte_buffer *recv_payload = NULL; diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c index fa711bb0b6..e9528ff105 100644 --- a/test/core/end2end/tests/network_status_change.c +++ b/test/core/end2end/tests/network_status_change.c @@ -102,7 +102,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_invoke_network_status_change(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c index 8353ea32fd..5a19950726 100644 --- a/test/core/end2end/tests/payload.c +++ b/test/core/end2end/tests/payload.c @@ -95,8 +95,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -/* Creates and returns a gpr_slice containing random alphanumeric characters. */ -static gpr_slice generate_random_slice() { +/* Creates and returns a grpc_slice containing random alphanumeric characters. */ +static grpc_slice generate_random_slice() { size_t i; static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; char *output; @@ -106,7 +106,7 @@ static gpr_slice generate_random_slice() { output[i] = chars[rand() % (int)(sizeof(chars) - 1)]; } output[output_size - 1] = '\0'; - gpr_slice out = gpr_slice_from_copied_string(output); + grpc_slice out = grpc_slice_from_copied_string(output); gpr_free(output); return out; } @@ -115,8 +115,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) { /* Create large request and response bodies. These are big enough to require * multiple round trips to deliver to the peer, and their exact contents of * will be verified on completion. */ - gpr_slice request_payload_slice = generate_random_slice(); - gpr_slice response_payload_slice = generate_random_slice(); + grpc_slice request_payload_slice = generate_random_slice(); + grpc_slice response_payload_slice = generate_random_slice(); grpc_call *c; grpc_call *s; diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c index 30ea80043b..3398a9cff7 100644 --- a/test/core/end2end/tests/ping_pong_streaming.c +++ b/test/core/end2end/tests/ping_pong_streaming.c @@ -120,8 +120,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, grpc_byte_buffer *response_payload; grpc_byte_buffer *response_payload_recv; int i; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", "foo.test.google.fr:1234", deadline, @@ -228,8 +228,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, grpc_byte_buffer_destroy(response_payload_recv); } - gpr_slice_unref(request_payload_slice); - gpr_slice_unref(response_payload_slice); + grpc_slice_unref(request_payload_slice); + grpc_slice_unref(response_payload_slice); memset(ops, 0, sizeof(ops)); op = ops; diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c index 69ad69af66..a37fc645b4 100644 --- a/test/core/end2end/tests/request_with_flags.c +++ b/test/core/end2end/tests/request_with_flags.c @@ -100,7 +100,7 @@ static void test_invoke_request_with_flags( grpc_end2end_test_config config, uint32_t *flags_for_op, grpc_call_error call_start_batch_expected_result) { grpc_call *c; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c index 56ff83cdb4..3e2bbb3b0e 100644 --- a/test/core/end2end/tests/request_with_payload.c +++ b/test/core/end2end/tests/request_with_payload.c @@ -99,7 +99,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_invoke_request_with_payload(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c index 6170444373..280bad5749 100644 --- a/test/core/end2end/tests/resource_quota_server.c +++ b/test/core/end2end/tests/resource_quota_server.c @@ -95,8 +95,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -/* Creates and returns a gpr_slice containing random alphanumeric characters. */ -static gpr_slice generate_random_slice() { +/* Creates and returns a grpc_slice containing random alphanumeric characters. */ +static grpc_slice generate_random_slice() { size_t i; static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; char output[1024 * 1024]; @@ -104,7 +104,7 @@ static gpr_slice generate_random_slice() { output[i] = chars[rand() % (int)(sizeof(chars) - 1)]; } output[GPR_ARRAY_SIZE(output) - 1] = '\0'; - return gpr_slice_from_copied_string(output); + return grpc_slice_from_copied_string(output); } void resource_quota_server(grpc_end2end_test_config config) { @@ -131,7 +131,7 @@ void resource_quota_server(grpc_end2end_test_config config) { /* Create large request and response bodies. These are big enough to require * multiple round trips to deliver to the peer, and their exact contents of * will be verified on completion. */ - gpr_slice request_payload_slice = generate_random_slice(); + grpc_slice request_payload_slice = generate_random_slice(); grpc_call *client_calls[NUM_CALLS]; grpc_call *server_calls[NUM_CALLS]; @@ -349,7 +349,7 @@ void resource_quota_server(grpc_end2end_test_config config) { GPR_ASSERT(cancelled_calls_on_server >= 0.9 * cancelled_calls_on_client); grpc_byte_buffer_destroy(request_payload); - gpr_slice_unref(request_payload_slice); + grpc_slice_unref(request_payload_slice); grpc_resource_quota_unref(resource_quota); end_test(&f); diff --git a/test/core/end2end/tests/simple_cacheable_request.c b/test/core/end2end/tests/simple_cacheable_request.c index 29ba41bd8b..40dd3983e1 100644 --- a/test/core/end2end/tests/simple_cacheable_request.c +++ b/test/core/end2end/tests/simple_cacheable_request.c @@ -102,8 +102,8 @@ static void test_cacheable_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/simple_metadata.c b/test/core/end2end/tests/simple_metadata.c index 304af9c3fa..1ac9dc8210 100644 --- a/test/core/end2end/tests/simple_metadata.c +++ b/test/core/end2end/tests/simple_metadata.c @@ -100,8 +100,8 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/streaming_error_response.c b/test/core/end2end/tests/streaming_error_response.c index fe63c6f7bb..efd41c508c 100644 --- a/test/core/end2end/tests/streaming_error_response.c +++ b/test/core/end2end/tests/streaming_error_response.c @@ -101,10 +101,10 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test(grpc_end2end_test_config config, bool request_status_early) { grpc_call *c; grpc_call *s; - gpr_slice response_payload1_slice = gpr_slice_from_copied_string("hello"); + grpc_slice response_payload1_slice = grpc_slice_from_copied_string("hello"); grpc_byte_buffer *response_payload1 = grpc_raw_byte_buffer_create(&response_payload1_slice, 1); - gpr_slice response_payload2_slice = gpr_slice_from_copied_string("world"); + grpc_slice response_payload2_slice = grpc_slice_from_copied_string("world"); grpc_byte_buffer *response_payload2 = grpc_raw_byte_buffer_create(&response_payload2_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/trailing_metadata.c b/test/core/end2end/tests/trailing_metadata.c index e6bfc7c9f1..0bbf0879cc 100644 --- a/test/core/end2end/tests/trailing_metadata.c +++ b/test/core/end2end/tests/trailing_metadata.c @@ -100,8 +100,8 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/fling/client.c b/test/core/fling/client.c index bcc195a92f..e717b7f7fe 100644 --- a/test/core/fling/client.c +++ b/test/core/fling/client.c @@ -155,7 +155,7 @@ static const scenario scenarios[] = { }; int main(int argc, char **argv) { - gpr_slice slice = gpr_slice_from_copied_string("x"); + grpc_slice slice = grpc_slice_from_copied_string("x"); double start, stop; unsigned i; @@ -241,7 +241,7 @@ int main(int argc, char **argv) { } while (event.type != GRPC_QUEUE_SHUTDOWN); grpc_completion_queue_destroy(cq); grpc_byte_buffer_destroy(the_buffer); - gpr_slice_unref(slice); + grpc_slice_unref(slice); gpr_log(GPR_INFO, "latency (50/95/99/99.9): %f/%f/%f/%f", gpr_histogram_percentile(histogram, 50), diff --git a/test/core/http/format_request_test.c b/test/core/http/format_request_test.c index 0d21e1200b..bd31e5e8ab 100644 --- a/test/core/http/format_request_test.c +++ b/test/core/http/format_request_test.c @@ -41,7 +41,7 @@ static void test_format_get_request(void) { grpc_http_header hdr = {"x-yz", "abc"}; grpc_httpcli_request req; - gpr_slice slice; + grpc_slice slice; memset(&req, 0, sizeof(req)); req.host = "example.com"; @@ -51,7 +51,7 @@ static void test_format_get_request(void) { slice = grpc_httpcli_format_get_request(&req); - GPR_ASSERT(0 == gpr_slice_str_cmp(slice, + GPR_ASSERT(0 == grpc_slice_str_cmp(slice, "GET /index.html HTTP/1.0\r\n" "Host: example.com\r\n" "Connection: close\r\n" @@ -60,13 +60,13 @@ static void test_format_get_request(void) { "x-yz: abc\r\n" "\r\n")); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } static void test_format_post_request(void) { grpc_http_header hdr = {"x-yz", "abc"}; grpc_httpcli_request req; - gpr_slice slice; + grpc_slice slice; char body_bytes[] = "fake body"; size_t body_len = 9; @@ -78,7 +78,7 @@ static void test_format_post_request(void) { slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len); - GPR_ASSERT(0 == gpr_slice_str_cmp(slice, + GPR_ASSERT(0 == grpc_slice_str_cmp(slice, "POST /index.html HTTP/1.0\r\n" "Host: example.com\r\n" "Connection: close\r\n" @@ -90,13 +90,13 @@ static void test_format_post_request(void) { "\r\n" "fake body")); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } static void test_format_post_request_no_body(void) { grpc_http_header hdr = {"x-yz", "abc"}; grpc_httpcli_request req; - gpr_slice slice; + grpc_slice slice; memset(&req, 0, sizeof(req)); req.host = "example.com"; @@ -106,7 +106,7 @@ static void test_format_post_request_no_body(void) { slice = grpc_httpcli_format_post_request(&req, NULL, 0); - GPR_ASSERT(0 == gpr_slice_str_cmp(slice, + GPR_ASSERT(0 == grpc_slice_str_cmp(slice, "POST /index.html HTTP/1.0\r\n" "Host: example.com\r\n" "Connection: close\r\n" @@ -115,13 +115,13 @@ static void test_format_post_request_no_body(void) { "x-yz: abc\r\n" "\r\n")); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } static void test_format_post_request_content_type_override(void) { grpc_http_header hdrs[2]; grpc_httpcli_request req; - gpr_slice slice; + grpc_slice slice; char body_bytes[] = "fake%20body"; size_t body_len = 11; @@ -137,7 +137,7 @@ static void test_format_post_request_content_type_override(void) { slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len); - GPR_ASSERT(0 == gpr_slice_str_cmp( + GPR_ASSERT(0 == grpc_slice_str_cmp( slice, "POST /index.html HTTP/1.0\r\n" "Host: example.com\r\n" @@ -149,7 +149,7 @@ static void test_format_post_request_content_type_override(void) { "\r\n" "fake%20body")); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } int main(int argc, char **argv) { diff --git a/test/core/http/parser_test.c b/test/core/http/parser_test.c index 2fc354d9ee..4f1445d3f1 100644 --- a/test/core/http/parser_test.c +++ b/test/core/http/parser_test.c @@ -48,23 +48,23 @@ static void test_request_succeeds(grpc_slice_split_mode split_mode, grpc_http_version expect_version, char *expect_path, char *expect_body, ...) { grpc_http_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(request_text); + grpc_slice input_slice = grpc_slice_from_copied_string(request_text); size_t num_slices; size_t i; - gpr_slice *slices; + grpc_slice *slices; va_list args; grpc_http_request request; memset(&request, 0, sizeof(request)); grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); - gpr_slice_unref(input_slice); + grpc_slice_unref(input_slice); grpc_http_parser_init(&parser, GRPC_HTTP_REQUEST, &request); for (i = 0; i < num_slices; i++) { GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i], NULL) == GRPC_ERROR_NONE); - gpr_slice_unref(slices[i]); + grpc_slice_unref(slices[i]); } GPR_ASSERT(grpc_http_parser_eof(&parser) == GRPC_ERROR_NONE); @@ -105,23 +105,23 @@ static void test_request_succeeds(grpc_slice_split_mode split_mode, static void test_succeeds(grpc_slice_split_mode split_mode, char *response_text, int expect_status, char *expect_body, ...) { grpc_http_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(response_text); + grpc_slice input_slice = grpc_slice_from_copied_string(response_text); size_t num_slices; size_t i; - gpr_slice *slices; + grpc_slice *slices; va_list args; grpc_http_response response; memset(&response, 0, sizeof(response)); grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); - gpr_slice_unref(input_slice); + grpc_slice_unref(input_slice); grpc_http_parser_init(&parser, GRPC_HTTP_RESPONSE, &response); for (i = 0; i < num_slices; i++) { GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i], NULL) == GRPC_ERROR_NONE); - gpr_slice_unref(slices[i]); + grpc_slice_unref(slices[i]); } GPR_ASSERT(grpc_http_parser_eof(&parser) == GRPC_ERROR_NONE); @@ -158,16 +158,16 @@ static void test_succeeds(grpc_slice_split_mode split_mode, char *response_text, static void test_fails(grpc_slice_split_mode split_mode, char *response_text) { grpc_http_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(response_text); + grpc_slice input_slice = grpc_slice_from_copied_string(response_text); size_t num_slices; size_t i; - gpr_slice *slices; + grpc_slice *slices; grpc_error *error = GRPC_ERROR_NONE; grpc_http_response response; memset(&response, 0, sizeof(response)); grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); - gpr_slice_unref(input_slice); + grpc_slice_unref(input_slice); grpc_http_parser_init(&parser, GRPC_HTTP_RESPONSE, &response); @@ -175,7 +175,7 @@ static void test_fails(grpc_slice_split_mode split_mode, char *response_text) { if (GRPC_ERROR_NONE == error) { error = grpc_http_parser_parse(&parser, slices[i], NULL); } - gpr_slice_unref(slices[i]); + grpc_slice_unref(slices[i]); } if (GRPC_ERROR_NONE == error) { error = grpc_http_parser_eof(&parser); @@ -191,16 +191,16 @@ static void test_fails(grpc_slice_split_mode split_mode, char *response_text) { static void test_request_fails(grpc_slice_split_mode split_mode, char *request_text) { grpc_http_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(request_text); + grpc_slice input_slice = grpc_slice_from_copied_string(request_text); size_t num_slices; size_t i; - gpr_slice *slices; + grpc_slice *slices; grpc_error *error = GRPC_ERROR_NONE; grpc_http_request request; memset(&request, 0, sizeof(request)); grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); - gpr_slice_unref(input_slice); + grpc_slice_unref(input_slice); grpc_http_parser_init(&parser, GRPC_HTTP_REQUEST, &request); @@ -208,7 +208,7 @@ static void test_request_fails(grpc_slice_split_mode split_mode, if (error == GRPC_ERROR_NONE) { error = grpc_http_parser_parse(&parser, slices[i], NULL); } - gpr_slice_unref(slices[i]); + grpc_slice_unref(slices[i]); } if (error == GRPC_ERROR_NONE) { error = grpc_http_parser_eof(&parser); diff --git a/test/core/http/request_fuzzer.c b/test/core/http/request_fuzzer.c index bb6cb92c0c..98e2c9680d 100644 --- a/test/core/http/request_fuzzer.c +++ b/test/core/http/request_fuzzer.c @@ -47,10 +47,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_http_request request; memset(&request, 0, sizeof(request)); grpc_http_parser_init(&parser, GRPC_HTTP_REQUEST, &request); - gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); + grpc_slice slice = grpc_slice_from_copied_buffer((const char *)data, size); GRPC_ERROR_UNREF(grpc_http_parser_parse(&parser, slice, NULL)); GRPC_ERROR_UNREF(grpc_http_parser_eof(&parser)); - gpr_slice_unref(slice); + grpc_slice_unref(slice); grpc_http_parser_destroy(&parser); grpc_http_request_destroy(&request); return 0; diff --git a/test/core/http/response_fuzzer.c b/test/core/http/response_fuzzer.c index 4393840484..fff04117b2 100644 --- a/test/core/http/response_fuzzer.c +++ b/test/core/http/response_fuzzer.c @@ -46,10 +46,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_http_response response; memset(&response, 0, sizeof(response)); grpc_http_parser_init(&parser, GRPC_HTTP_RESPONSE, &response); - gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); + grpc_slice slice = grpc_slice_from_copied_buffer((const char *)data, size); GRPC_ERROR_UNREF(grpc_http_parser_parse(&parser, slice, NULL)); GRPC_ERROR_UNREF(grpc_http_parser_eof(&parser)); - gpr_slice_unref(slice); + grpc_slice_unref(slice); grpc_http_parser_destroy(&parser); grpc_http_response_destroy(&response); return 0; diff --git a/test/core/internal_api_canaries/transport.c b/test/core/internal_api_canaries/transport.c index 0617865412..2989f59535 100644 --- a/test/core/internal_api_canaries/transport.c +++ b/test/core/internal_api_canaries/transport.c @@ -69,7 +69,7 @@ static void test_code(void) { grpc_transport_perform_op(&transport, NULL, NULL); grpc_transport_ping(&transport, NULL); grpc_transport_goaway(&transport, GRPC_STATUS_UNAVAILABLE, - gpr_slice_malloc(0)); + grpc_slice_malloc(0)); grpc_transport_close(&transport); grpc_transport_destroy(&transport, NULL); GPR_ASSERT("xyz" == grpc_transport_get_peer(&transport, NULL)); diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index b79c22e42a..775c0a3e6b 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -62,7 +62,7 @@ static gpr_mu *g_mu; static grpc_pollset *g_pollset; -size_t count_slices(gpr_slice *slices, size_t nslices, int *current_data) { +size_t count_slices(grpc_slice *slices, size_t nslices, int *current_data) { size_t num_bytes = 0; size_t i; size_t j; @@ -87,10 +87,10 @@ static grpc_endpoint_test_fixture begin_test(grpc_endpoint_test_config config, static void end_test(grpc_endpoint_test_config config) { config.clean_up(); } -static gpr_slice *allocate_blocks(size_t num_bytes, size_t slice_size, +static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, size_t *num_blocks, uint8_t *current_data) { size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1 : 0); - gpr_slice *slices = gpr_malloc(sizeof(gpr_slice) * nslices); + grpc_slice *slices = gpr_malloc(sizeof(grpc_slice) * nslices); size_t num_bytes_left = num_bytes; size_t i; size_t j; @@ -98,7 +98,7 @@ static gpr_slice *allocate_blocks(size_t num_bytes, size_t slice_size, *num_blocks = nslices; for (i = 0; i < nslices; ++i) { - slices[i] = gpr_slice_malloc(slice_size > num_bytes_left ? num_bytes_left + slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left : slice_size); num_bytes_left -= GPR_SLICE_LENGTH(slices[i]); buf = GPR_SLICE_START_PTR(slices[i]); @@ -122,8 +122,8 @@ struct read_and_write_test_state { uint8_t current_write_data; int read_done; int write_done; - gpr_slice_buffer incoming; - gpr_slice_buffer outgoing; + grpc_slice_buffer incoming; + grpc_slice_buffer outgoing; grpc_closure done_read; grpc_closure done_write; }; @@ -149,7 +149,7 @@ static void read_and_write_test_read_handler(grpc_exec_ctx *exec_ctx, static void read_and_write_test_write_handler(grpc_exec_ctx *exec_ctx, void *data, grpc_error *error) { struct read_and_write_test_state *state = data; - gpr_slice *slices = NULL; + grpc_slice *slices = NULL; size_t nslices; if (error == GRPC_ERROR_NONE) { @@ -161,8 +161,8 @@ static void read_and_write_test_write_handler(grpc_exec_ctx *exec_ctx, if (state->current_write_size != 0) { slices = allocate_blocks(state->current_write_size, 8192, &nslices, &state->current_write_data); - gpr_slice_buffer_reset_and_unref(&state->outgoing); - gpr_slice_buffer_addn(&state->outgoing, slices, nslices); + grpc_slice_buffer_reset_and_unref(&state->outgoing); + grpc_slice_buffer_addn(&state->outgoing, slices, nslices); grpc_endpoint_write(exec_ctx, state->write_ep, &state->outgoing, &state->done_write); gpr_free(slices); @@ -214,8 +214,8 @@ static void read_and_write_test(grpc_endpoint_test_config config, grpc_closure_init(&state.done_read, read_and_write_test_read_handler, &state); grpc_closure_init(&state.done_write, read_and_write_test_write_handler, &state); - gpr_slice_buffer_init(&state.outgoing); - gpr_slice_buffer_init(&state.incoming); + grpc_slice_buffer_init(&state.outgoing); + grpc_slice_buffer_init(&state.incoming); /* Get started by pretending an initial write completed */ /* NOTE: Sets up initial conditions so we can have the same write handler @@ -249,8 +249,8 @@ static void read_and_write_test(grpc_endpoint_test_config config, grpc_exec_ctx_flush(&exec_ctx); end_test(config); - gpr_slice_buffer_destroy(&state.outgoing); - gpr_slice_buffer_destroy(&state.incoming); + grpc_slice_buffer_destroy(&state.outgoing); + grpc_slice_buffer_destroy(&state.incoming); grpc_endpoint_destroy(&exec_ctx, state.read_ep); grpc_endpoint_destroy(&exec_ctx, state.write_ep); grpc_exec_ctx_finish(&exec_ctx); @@ -284,8 +284,8 @@ static void multiple_shutdown_test(grpc_endpoint_test_config config) { begin_test(config, "multiple_shutdown_test", 128); int fail_count = 0; - gpr_slice_buffer slice_buffer; - gpr_slice_buffer_init(&slice_buffer); + grpc_slice_buffer slice_buffer; + grpc_slice_buffer_init(&slice_buffer); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_add_to_pollset(&exec_ctx, f.client_ep, g_pollset); @@ -297,14 +297,14 @@ static void multiple_shutdown_test(grpc_endpoint_test_config config) { grpc_endpoint_read(&exec_ctx, f.client_ep, &slice_buffer, grpc_closure_create(inc_on_failure, &fail_count)); wait_for_fail_count(&exec_ctx, &fail_count, 2); - gpr_slice_buffer_add(&slice_buffer, gpr_slice_from_copied_string("a")); + grpc_slice_buffer_add(&slice_buffer, grpc_slice_from_copied_string("a")); grpc_endpoint_write(&exec_ctx, f.client_ep, &slice_buffer, grpc_closure_create(inc_on_failure, &fail_count)); wait_for_fail_count(&exec_ctx, &fail_count, 3); grpc_endpoint_shutdown(&exec_ctx, f.client_ep); wait_for_fail_count(&exec_ctx, &fail_count, 3); - gpr_slice_buffer_destroy(&slice_buffer); + grpc_slice_buffer_destroy(&slice_buffer); grpc_endpoint_destroy(&exec_ctx, f.client_ep); grpc_endpoint_destroy(&exec_ctx, f.server_ep); diff --git a/test/core/iomgr/load_file_test.c b/test/core/iomgr/load_file_test.c index f70295a81c..c7387fe7a4 100644 --- a/test/core/iomgr/load_file_test.c +++ b/test/core/iomgr/load_file_test.c @@ -49,8 +49,8 @@ static const char prefix[] = "file_test"; static void test_load_empty_file(void) { FILE *tmp = NULL; - gpr_slice slice; - gpr_slice slice_with_null_term; + grpc_slice slice; + grpc_slice slice_with_null_term; grpc_error *error; char *tmp_name; @@ -72,13 +72,13 @@ static void test_load_empty_file(void) { remove(tmp_name); gpr_free(tmp_name); - gpr_slice_unref(slice); - gpr_slice_unref(slice_with_null_term); + grpc_slice_unref(slice); + grpc_slice_unref(slice_with_null_term); } static void test_load_failure(void) { FILE *tmp = NULL; - gpr_slice slice; + grpc_slice slice; grpc_error *error; char *tmp_name; @@ -95,13 +95,13 @@ static void test_load_failure(void) { GRPC_ERROR_UNREF(error); GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 0); gpr_free(tmp_name); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } static void test_load_small_file(void) { FILE *tmp = NULL; - gpr_slice slice; - gpr_slice slice_with_null_term; + grpc_slice slice; + grpc_slice slice_with_null_term; grpc_error *error; char *tmp_name; const char *blah = "blah"; @@ -127,13 +127,13 @@ static void test_load_small_file(void) { remove(tmp_name); gpr_free(tmp_name); - gpr_slice_unref(slice); - gpr_slice_unref(slice_with_null_term); + grpc_slice_unref(slice); + grpc_slice_unref(slice_with_null_term); } static void test_load_big_file(void) { FILE *tmp = NULL; - gpr_slice slice; + grpc_slice slice; grpc_error *error; char *tmp_name; static const size_t buffer_size = 124631; @@ -161,7 +161,7 @@ static void test_load_big_file(void) { remove(tmp_name); gpr_free(tmp_name); - gpr_slice_unref(slice); + grpc_slice_unref(slice); gpr_free(buffer); } diff --git a/test/core/iomgr/resource_quota_test.c b/test/core/iomgr/resource_quota_test.c index 5e2f9f8359..85c6ce6e70 100644 --- a/test/core/iomgr/resource_quota_test.c +++ b/test/core/iomgr/resource_quota_test.c @@ -657,8 +657,8 @@ static void test_one_slice(void) { grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb, &num_allocs); - gpr_slice_buffer buffer; - gpr_slice_buffer_init(&buffer); + grpc_slice_buffer buffer; + grpc_slice_buffer_init(&buffer); { const int start_allocs = num_allocs; @@ -668,7 +668,7 @@ static void test_one_slice(void) { GPR_ASSERT(num_allocs == start_allocs + 1); } - gpr_slice_buffer_destroy(&buffer); + grpc_slice_buffer_destroy(&buffer); destroy_user(&usr); grpc_resource_quota_unref(q); } @@ -688,8 +688,8 @@ static void test_one_slice_deleted_late(void) { grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb, &num_allocs); - gpr_slice_buffer buffer; - gpr_slice_buffer_init(&buffer); + grpc_slice_buffer buffer; + grpc_slice_buffer_init(&buffer); { const int start_allocs = num_allocs; @@ -708,7 +708,7 @@ static void test_one_slice_deleted_late(void) { } grpc_resource_quota_unref(q); - gpr_slice_buffer_destroy(&buffer); + grpc_slice_buffer_destroy(&buffer); GPR_ASSERT(done); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 3f2e19ffd8..a259390d5e 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -119,11 +119,11 @@ struct read_socket_state { grpc_endpoint *ep; size_t read_bytes; size_t target_read_bytes; - gpr_slice_buffer incoming; + grpc_slice_buffer incoming; grpc_closure read_cb; }; -static size_t count_slices(gpr_slice *slices, size_t nslices, +static size_t count_slices(grpc_slice *slices, size_t nslices, int *current_data) { size_t num_bytes = 0; unsigned i, j; @@ -188,7 +188,7 @@ static void read_test(size_t num_bytes, size_t slice_size) { state.ep = ep; state.read_bytes = 0; state.target_read_bytes = written_bytes; - gpr_slice_buffer_init(&state.incoming); + grpc_slice_buffer_init(&state.incoming); grpc_closure_init(&state.read_cb, read_cb, &state); grpc_endpoint_read(&exec_ctx, ep, &state.incoming, &state.read_cb); @@ -207,7 +207,7 @@ static void read_test(size_t num_bytes, size_t slice_size) { GPR_ASSERT(state.read_bytes == state.target_read_bytes); gpr_mu_unlock(g_mu); - gpr_slice_buffer_destroy(&state.incoming); + grpc_slice_buffer_destroy(&state.incoming); grpc_endpoint_destroy(&exec_ctx, ep); grpc_exec_ctx_finish(&exec_ctx); } @@ -239,7 +239,7 @@ static void large_read_test(size_t slice_size) { state.ep = ep; state.read_bytes = 0; state.target_read_bytes = (size_t)written_bytes; - gpr_slice_buffer_init(&state.incoming); + grpc_slice_buffer_init(&state.incoming); grpc_closure_init(&state.read_cb, read_cb, &state); grpc_endpoint_read(&exec_ctx, ep, &state.incoming, &state.read_cb); @@ -258,7 +258,7 @@ static void large_read_test(size_t slice_size) { GPR_ASSERT(state.read_bytes == state.target_read_bytes); gpr_mu_unlock(g_mu); - gpr_slice_buffer_destroy(&state.incoming); + grpc_slice_buffer_destroy(&state.incoming); grpc_endpoint_destroy(&exec_ctx, ep); grpc_exec_ctx_finish(&exec_ctx); } @@ -268,17 +268,17 @@ struct write_socket_state { int write_done; }; -static gpr_slice *allocate_blocks(size_t num_bytes, size_t slice_size, +static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, size_t *num_blocks, uint8_t *current_data) { size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1u : 0u); - gpr_slice *slices = gpr_malloc(sizeof(gpr_slice) * nslices); + grpc_slice *slices = gpr_malloc(sizeof(grpc_slice) * nslices); size_t num_bytes_left = num_bytes; unsigned i, j; unsigned char *buf; *num_blocks = nslices; for (i = 0; i < nslices; ++i) { - slices[i] = gpr_slice_malloc(slice_size > num_bytes_left ? num_bytes_left + slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left : slice_size); num_bytes_left -= GPR_SLICE_LENGTH(slices[i]); buf = GPR_SLICE_START_PTR(slices[i]); @@ -352,9 +352,9 @@ static void write_test(size_t num_bytes, size_t slice_size) { grpc_endpoint *ep; struct write_socket_state state; size_t num_blocks; - gpr_slice *slices; + grpc_slice *slices; uint8_t current_data = 0; - gpr_slice_buffer outgoing; + grpc_slice_buffer outgoing; grpc_closure write_done_closure; gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -377,8 +377,8 @@ static void write_test(size_t num_bytes, size_t slice_size) { slices = allocate_blocks(num_bytes, slice_size, &num_blocks, ¤t_data); - gpr_slice_buffer_init(&outgoing); - gpr_slice_buffer_addn(&outgoing, slices, num_blocks); + grpc_slice_buffer_init(&outgoing); + grpc_slice_buffer_addn(&outgoing, slices, num_blocks); grpc_closure_init(&write_done_closure, write_done, &state); grpc_endpoint_write(&exec_ctx, ep, &outgoing, &write_done_closure); @@ -399,7 +399,7 @@ static void write_test(size_t num_bytes, size_t slice_size) { } gpr_mu_unlock(g_mu); - gpr_slice_buffer_destroy(&outgoing); + grpc_slice_buffer_destroy(&outgoing); grpc_endpoint_destroy(&exec_ctx, ep); gpr_free(slices); grpc_exec_ctx_finish(&exec_ctx); @@ -446,7 +446,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { state.ep = ep; state.read_bytes = 0; state.target_read_bytes = written_bytes; - gpr_slice_buffer_init(&state.incoming); + grpc_slice_buffer_init(&state.incoming); grpc_closure_init(&state.read_cb, read_cb, &state); grpc_endpoint_read(&exec_ctx, ep, &state.incoming, &state.read_cb); @@ -467,7 +467,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { GPR_ASSERT(state.read_bytes == state.target_read_bytes); gpr_mu_unlock(g_mu); - gpr_slice_buffer_destroy(&state.incoming); + grpc_slice_buffer_destroy(&state.incoming); grpc_tcp_destroy_and_release_fd(&exec_ctx, ep, &fd, &fd_released_cb); grpc_exec_ctx_flush(&exec_ctx); gpr_mu_lock(g_mu); diff --git a/test/core/nanopb/fuzzer_response.c b/test/core/nanopb/fuzzer_response.c index a82f20df83..202c120c67 100644 --- a/test/core/nanopb/fuzzer_response.c +++ b/test/core/nanopb/fuzzer_response.c @@ -45,11 +45,11 @@ static void dont_log(gpr_log_func_args *args) {} int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (squelch) gpr_set_log_function(dont_log); - gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); + grpc_slice slice = grpc_slice_from_copied_buffer((const char *)data, size); grpc_grpclb_initial_response *response; if ((response = grpc_grpclb_initial_response_parse(slice))) { grpc_grpclb_initial_response_destroy(response); } - gpr_slice_unref(slice); + grpc_slice_unref(slice); return 0; } diff --git a/test/core/nanopb/fuzzer_serverlist.c b/test/core/nanopb/fuzzer_serverlist.c index 9700bf1cda..b225ae0d51 100644 --- a/test/core/nanopb/fuzzer_serverlist.c +++ b/test/core/nanopb/fuzzer_serverlist.c @@ -45,11 +45,11 @@ static void dont_log(gpr_log_func_args *args) {} int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (squelch) gpr_set_log_function(dont_log); - gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); + grpc_slice slice = grpc_slice_from_copied_buffer((const char *)data, size); grpc_grpclb_serverlist *serverlist; if ((serverlist = grpc_grpclb_response_parse_serverlist(slice))) { grpc_grpclb_destroy_serverlist(serverlist); } - gpr_slice_unref(slice); + grpc_slice_unref(slice); return 0; } diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c index b26bd026fd..f88be392a2 100644 --- a/test/core/security/b64_test.c +++ b/test/core/security/b64_test.c @@ -57,12 +57,12 @@ static void test_simple_encode_decode_b64(int url_safe, int multiline) { const char *hello = "hello"; char *hello_b64 = grpc_base64_encode(hello, strlen(hello), url_safe, multiline); - gpr_slice hello_slice = grpc_base64_decode(hello_b64, url_safe); + grpc_slice hello_slice = grpc_base64_decode(hello_b64, url_safe); GPR_ASSERT(GPR_SLICE_LENGTH(hello_slice) == strlen(hello)); GPR_ASSERT(strncmp((const char *)GPR_SLICE_START_PTR(hello_slice), hello, GPR_SLICE_LENGTH(hello_slice)) == 0); - gpr_slice_unref(hello_slice); + grpc_slice_unref(hello_slice); gpr_free(hello_b64); } @@ -70,7 +70,7 @@ static void test_full_range_encode_decode_b64(int url_safe, int multiline) { unsigned char orig[256]; size_t i; char *b64; - gpr_slice orig_decoded; + grpc_slice orig_decoded; for (i = 0; i < sizeof(orig); i++) orig[i] = (uint8_t)i; /* Try all the different paddings. */ @@ -80,7 +80,7 @@ static void test_full_range_encode_decode_b64(int url_safe, int multiline) { GPR_ASSERT(GPR_SLICE_LENGTH(orig_decoded) == (sizeof(orig) - i)); GPR_ASSERT(buffers_are_equal(orig, GPR_SLICE_START_PTR(orig_decoded), sizeof(orig) - i)); - gpr_slice_unref(orig_decoded); + grpc_slice_unref(orig_decoded); gpr_free(b64); } } @@ -121,7 +121,7 @@ static void test_url_safe_unsafe_mismtach_failure(void) { unsigned char orig[256]; size_t i; char *b64; - gpr_slice orig_decoded; + grpc_slice orig_decoded; int url_safe = 1; for (i = 0; i < sizeof(orig); i++) orig[i] = (uint8_t)i; @@ -129,13 +129,13 @@ static void test_url_safe_unsafe_mismtach_failure(void) { orig_decoded = grpc_base64_decode(b64, !url_safe); GPR_ASSERT(GPR_SLICE_IS_EMPTY(orig_decoded)); gpr_free(b64); - gpr_slice_unref(orig_decoded); + grpc_slice_unref(orig_decoded); b64 = grpc_base64_encode(orig, sizeof(orig), !url_safe, 0); orig_decoded = grpc_base64_decode(b64, url_safe); GPR_ASSERT(GPR_SLICE_IS_EMPTY(orig_decoded)); gpr_free(b64); - gpr_slice_unref(orig_decoded); + grpc_slice_unref(orig_decoded); } static void test_rfc4648_test_vectors(void) { @@ -171,37 +171,37 @@ static void test_rfc4648_test_vectors(void) { } static void test_unpadded_decode(void) { - gpr_slice decoded; + grpc_slice decoded; decoded = grpc_base64_decode("Zm9vYmFy", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "foobar") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "foobar") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9vYmE", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "fooba") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "fooba") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9vYg", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "foob") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "foob") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9v", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "foo") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "foo") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm8", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "fo") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "fo") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zg", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "f") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "f") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("", 0); GPR_ASSERT(GPR_SLICE_IS_EMPTY(decoded)); diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c index 1bd135f175..8b78dc5da5 100644 --- a/test/core/security/create_jwt.c +++ b/test/core/security/create_jwt.c @@ -46,12 +46,12 @@ void create_jwt(const char *json_key_file_path, const char *service_url, const char *scope) { grpc_auth_json_key key; char *jwt; - gpr_slice json_key_data; + grpc_slice json_key_data; GPR_ASSERT(GRPC_LOG_IF_ERROR( "load_file", grpc_load_file(json_key_file_path, 1, &json_key_data))); key = grpc_auth_json_key_create_from_string( (const char *)GPR_SLICE_START_PTR(json_key_data)); - gpr_slice_unref(json_key_data); + grpc_slice_unref(json_key_data); if (!grpc_auth_json_key_is_valid(&key)) { fprintf(stderr, "Could not parse json key.\n"); exit(1); diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 2f8ffe4da6..d8bde4f2c2 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -187,14 +187,14 @@ static void test_add_to_empty_md_store(void) { grpc_credentials_md_store *store = grpc_credentials_md_store_create(0); const char *key_str = "hello"; const char *value_str = "there blah blah blah blah blah blah blah"; - gpr_slice key = gpr_slice_from_copied_string(key_str); - gpr_slice value = gpr_slice_from_copied_string(value_str); + grpc_slice key = grpc_slice_from_copied_string(key_str); + grpc_slice value = grpc_slice_from_copied_string(value_str); grpc_credentials_md_store_add(store, key, value); GPR_ASSERT(store->num_entries == 1); - GPR_ASSERT(gpr_slice_cmp(key, store->entries[0].key) == 0); - GPR_ASSERT(gpr_slice_cmp(value, store->entries[0].value) == 0); - gpr_slice_unref(key); - gpr_slice_unref(value); + GPR_ASSERT(grpc_slice_cmp(key, store->entries[0].key) == 0); + GPR_ASSERT(grpc_slice_cmp(value, store->entries[0].value) == 0); + grpc_slice_unref(key); + grpc_slice_unref(value); grpc_credentials_md_store_unref(store); } @@ -204,8 +204,8 @@ static void test_add_cstrings_to_empty_md_store(void) { const char *value_str = "there blah blah blah blah blah blah blah"; grpc_credentials_md_store_add_cstrings(store, key_str, value_str); GPR_ASSERT(store->num_entries == 1); - GPR_ASSERT(gpr_slice_str_cmp(store->entries[0].key, key_str) == 0); - GPR_ASSERT(gpr_slice_str_cmp(store->entries[0].value, value_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[0].key, key_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[0].value, value_str) == 0); grpc_credentials_md_store_unref(store); } @@ -227,8 +227,8 @@ static void test_add_abunch_to_md_store(void) { grpc_credentials_md_store_add_cstrings(store, key_str, value_str); } for (i = 0; i < num_entries; i++) { - GPR_ASSERT(gpr_slice_str_cmp(store->entries[i].key, key_str) == 0); - GPR_ASSERT(gpr_slice_str_cmp(store->entries[i].value, value_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[i].key, key_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[i].value, value_str) == 0); } grpc_credentials_md_store_unref(store); } @@ -243,8 +243,8 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) { GPR_ASSERT(token_lifetime.tv_sec == 3599); GPR_ASSERT(token_lifetime.tv_nsec == 0); GPR_ASSERT(token_md->num_entries == 1); - GPR_ASSERT(gpr_slice_str_cmp(token_md->entries[0].key, "authorization") == 0); - GPR_ASSERT(gpr_slice_str_cmp(token_md->entries[0].value, + GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].key, "authorization") == 0); + GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].value, "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); grpc_credentials_md_store_unref(token_md); @@ -333,8 +333,8 @@ static void check_metadata(expected_md *expected, grpc_credentials_md *md_elems, for (i = 0; i < num_md; i++) { size_t j; for (j = 0; j < num_md; j++) { - if (0 == gpr_slice_str_cmp(md_elems[j].key, expected[i].key)) { - GPR_ASSERT(gpr_slice_str_cmp(md_elems[j].value, expected[i].value) == + if (0 == grpc_slice_str_cmp(md_elems[j].key, expected[i].key)) { + GPR_ASSERT(grpc_slice_str_cmp(md_elems[j].value, expected[i].value) == 0); break; } @@ -528,8 +528,8 @@ static void on_oauth2_creds_get_metadata_success( GPR_ASSERT(status == GRPC_CREDENTIALS_OK); GPR_ASSERT(error_details == NULL); GPR_ASSERT(num_md == 1); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].key, "authorization") == 0); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].value, + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].key, "authorization") == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].value, "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); GPR_ASSERT(user_data != NULL); @@ -781,8 +781,8 @@ static void on_jwt_creds_get_metadata_success( GPR_ASSERT(status == GRPC_CREDENTIALS_OK); GPR_ASSERT(error_details == NULL); GPR_ASSERT(num_md == 1); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].key, "authorization") == 0); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].value, expected_md_value) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].key, "authorization") == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].value, expected_md_value) == 0); GPR_ASSERT(user_data != NULL); GPR_ASSERT(strcmp((const char *)user_data, test_user_data) == 0); gpr_free(expected_md_value); @@ -1057,8 +1057,8 @@ static void on_plugin_metadata_received_success( GPR_ASSERT(md_elems != NULL); GPR_ASSERT(num_md == GPR_ARRAY_SIZE(plugin_md)); for (i = 0; i < num_md; i++) { - GPR_ASSERT(gpr_slice_str_cmp(md_elems[i].key, plugin_md[i].key) == 0); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[i].value, plugin_md[i].value) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[i].key, plugin_md[i].key) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[i].value, plugin_md[i].value) == 0); } } diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index 292f59a7c1..aa3db9f398 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -48,7 +48,7 @@ static grpc_call_credentials *create_refresh_token_creds( const char *json_refresh_token_file_path) { - gpr_slice refresh_token; + grpc_slice refresh_token; GPR_ASSERT(GRPC_LOG_IF_ERROR( "load_file", grpc_load_file(json_refresh_token_file_path, 1, &refresh_token))); diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c index 405fe56c46..162997662e 100644 --- a/test/core/security/json_token_test.c +++ b/test/core/security/json_token_test.c @@ -223,7 +223,7 @@ static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, char *b64; char *decoded; grpc_json *json; - gpr_slice slice; + grpc_slice slice; b64 = gpr_malloc(len + 1); strncpy(b64, str, len); b64[len] = '\0'; @@ -236,7 +236,7 @@ static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, json = grpc_json_parse_string(decoded); gpr_free(b64); *scratchpad = decoded; - gpr_slice_unref(slice); + grpc_slice_unref(slice); return json; } @@ -341,7 +341,7 @@ static void check_jwt_signature(const char *b64_signature, RSA *rsa_key, EVP_MD_CTX *md_ctx = EVP_MD_CTX_create(); EVP_PKEY *key = EVP_PKEY_new(); - gpr_slice sig = grpc_base64_decode(b64_signature, 1); + grpc_slice sig = grpc_base64_decode(b64_signature, 1); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(sig)); GPR_ASSERT(GPR_SLICE_LENGTH(sig) == 128); @@ -355,7 +355,7 @@ static void check_jwt_signature(const char *b64_signature, RSA *rsa_key, GPR_ASSERT(EVP_DigestVerifyFinal(md_ctx, GPR_SLICE_START_PTR(sig), GPR_SLICE_LENGTH(sig)) == 1); - gpr_slice_unref(sig); + grpc_slice_unref(sig); if (key != NULL) EVP_PKEY_free(key); if (md_ctx != NULL) EVP_MD_CTX_destroy(md_ctx); } diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 36b331a777..ce2ee04c99 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -181,7 +181,7 @@ typedef struct { static void test_claims_success(void) { grpc_jwt_claims *claims; - gpr_slice s = gpr_slice_from_copied_string(claims_without_time_constraint); + grpc_slice s = grpc_slice_from_copied_string(claims_without_time_constraint); grpc_json *json = grpc_json_parse_string_with_len( (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); @@ -199,7 +199,7 @@ static void test_claims_success(void) { static void test_expired_claims_failure(void) { grpc_jwt_claims *claims; - gpr_slice s = gpr_slice_from_copied_string(expired_claims); + grpc_slice s = grpc_slice_from_copied_string(expired_claims); grpc_json *json = grpc_json_parse_string_with_len( (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); gpr_timespec exp_iat = {100, 0, GPR_CLOCK_REALTIME}; @@ -223,7 +223,7 @@ static void test_expired_claims_failure(void) { } static void test_invalid_claims_failure(void) { - gpr_slice s = gpr_slice_from_copied_string(invalid_claims); + grpc_slice s = grpc_slice_from_copied_string(invalid_claims); grpc_json *json = grpc_json_parse_string_with_len( (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); GPR_ASSERT(grpc_jwt_claims_from_json(json, s) == NULL); @@ -231,7 +231,7 @@ static void test_invalid_claims_failure(void) { static void test_bad_audience_claims_failure(void) { grpc_jwt_claims *claims; - gpr_slice s = gpr_slice_from_copied_string(claims_without_time_constraint); + grpc_slice s = grpc_slice_from_copied_string(claims_without_time_constraint); grpc_json *json = grpc_json_parse_string_with_len( (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); @@ -478,7 +478,7 @@ static void test_jwt_verifier_bad_json_key(void) { } static void corrupt_jwt_sig(char *jwt) { - gpr_slice sig; + grpc_slice sig; char *bad_b64_sig; uint8_t *sig_bytes; char *last_dot = strrchr(jwt, '.'); @@ -491,7 +491,7 @@ static void corrupt_jwt_sig(char *jwt) { grpc_base64_encode(GPR_SLICE_START_PTR(sig), GPR_SLICE_LENGTH(sig), 1, 0); memcpy(last_dot + 1, bad_b64_sig, strlen(bad_b64_sig)); gpr_free(bad_b64_sig); - gpr_slice_unref(sig); + grpc_slice_unref(sig); } static void on_verification_bad_signature(void *user_data, diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 9b97c38fcb..3b774fecb6 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -57,7 +57,7 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, const char *error_details) { oauth2_request *request = user_data; char *token = NULL; - gpr_slice token_slice; + grpc_slice token_slice; if (status == GRPC_CREDENTIALS_ERROR) { gpr_log(GPR_ERROR, "Fetching token failed."); } else { diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index 2262fde98d..e12ca48c2f 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -49,7 +49,7 @@ static gpr_mu *g_mu; static grpc_pollset *g_pollset; static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( - size_t slice_size, gpr_slice *leftover_slices, size_t leftover_nslices) { + size_t slice_size, grpc_slice *leftover_slices, size_t leftover_nslices) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; tsi_frame_protector *fake_read_protector = tsi_create_fake_protector(NULL); tsi_frame_protector *fake_write_protector = tsi_create_fake_protector(NULL); @@ -74,9 +74,9 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( size_t buffer_size = total_buffer_size; uint8_t *encrypted_buffer = gpr_malloc(buffer_size); uint8_t *cur = encrypted_buffer; - gpr_slice encrypted_leftover; + grpc_slice encrypted_leftover; for (i = 0; i < leftover_nslices; i++) { - gpr_slice plain = leftover_slices[i]; + grpc_slice plain = leftover_slices[i]; uint8_t *message_bytes = GPR_SLICE_START_PTR(plain); size_t message_size = GPR_SLICE_LENGTH(plain); while (message_size > 0) { @@ -92,7 +92,7 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( GPR_ASSERT(buffer_size >= protected_buffer_size_to_send); buffer_size -= protected_buffer_size_to_send; } - gpr_slice_unref(plain); + grpc_slice_unref(plain); } do { size_t protected_buffer_size_to_send = buffer_size; @@ -104,11 +104,11 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( GPR_ASSERT(buffer_size >= protected_buffer_size_to_send); buffer_size -= protected_buffer_size_to_send; } while (still_pending_size > 0); - encrypted_leftover = gpr_slice_from_copied_buffer( + encrypted_leftover = grpc_slice_from_copied_buffer( (const char *)encrypted_buffer, total_buffer_size - buffer_size); f.client_ep = grpc_secure_endpoint_create(fake_read_protector, tcp.client, &encrypted_leftover, 1); - gpr_slice_unref(encrypted_leftover); + grpc_slice_unref(encrypted_leftover); gpr_free(encrypted_buffer); } @@ -125,8 +125,8 @@ secure_endpoint_create_fixture_tcp_socketpair_noleftover(size_t slice_size) { static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair_leftover(size_t slice_size) { - gpr_slice s = - gpr_slice_from_copied_string("hello world 12345678900987654321"); + grpc_slice s = + grpc_slice_from_copied_string("hello world 12345678900987654321"); grpc_endpoint_test_fixture f; f = secure_endpoint_create_fixture_tcp_socketpair(slice_size, &s, 1); @@ -149,29 +149,29 @@ static void inc_call_ctr(grpc_exec_ctx *exec_ctx, void *arg, static void test_leftover(grpc_endpoint_test_config config, size_t slice_size) { grpc_endpoint_test_fixture f = config.create_fixture(slice_size); - gpr_slice_buffer incoming; - gpr_slice s = - gpr_slice_from_copied_string("hello world 12345678900987654321"); + grpc_slice_buffer incoming; + grpc_slice s = + grpc_slice_from_copied_string("hello world 12345678900987654321"); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; int n = 0; grpc_closure done_closure; gpr_log(GPR_INFO, "Start test left over"); - gpr_slice_buffer_init(&incoming); + grpc_slice_buffer_init(&incoming); grpc_closure_init(&done_closure, inc_call_ctr, &n); grpc_endpoint_read(&exec_ctx, f.client_ep, &incoming, &done_closure); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(n == 1); GPR_ASSERT(incoming.count == 1); - GPR_ASSERT(0 == gpr_slice_cmp(s, incoming.slices[0])); + GPR_ASSERT(0 == grpc_slice_cmp(s, incoming.slices[0])); grpc_endpoint_shutdown(&exec_ctx, f.client_ep); grpc_endpoint_shutdown(&exec_ctx, f.server_ep); grpc_endpoint_destroy(&exec_ctx, f.client_ep); grpc_endpoint_destroy(&exec_ctx, f.server_ep); grpc_exec_ctx_finish(&exec_ctx); - gpr_slice_unref(s); - gpr_slice_buffer_destroy(&incoming); + grpc_slice_unref(s); + grpc_slice_buffer_destroy(&incoming); clean_up(); } diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c index 6106bec9d3..4692db1853 100644 --- a/test/core/security/security_connector_test.c +++ b/test/core/security/security_connector_test.c @@ -368,9 +368,9 @@ static void test_default_ssl_roots(void) { value. */ gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, ""); grpc_set_ssl_roots_override_callback(override_roots_success); - gpr_slice roots = grpc_get_default_ssl_roots_for_testing(); + grpc_slice roots = grpc_get_default_ssl_roots_for_testing(); char *roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); - gpr_slice_unref(roots); + grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_override_api) == 0); gpr_free(roots_contents); @@ -379,7 +379,7 @@ static void test_default_ssl_roots(void) { gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, roots_env_var_file_path); roots = grpc_get_default_ssl_roots_for_testing(); roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); - gpr_slice_unref(roots); + grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_env_var) == 0); gpr_free(roots_contents); @@ -388,7 +388,7 @@ static void test_default_ssl_roots(void) { gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, ""); roots = grpc_get_default_ssl_roots_for_testing(); roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); - gpr_slice_unref(roots); + grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_override_api) == 0); gpr_free(roots_contents); diff --git a/test/core/slice/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 b/test/core/slice/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 new file mode 100644 index 0000000000..a0c7605580 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 @@ -0,0 +1 @@ +:Ê%cE'yzŠ \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 b/test/core/slice/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 new file mode 100644 index 0000000000..8b36124b3f --- /dev/null +++ b/test/core/slice/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 @@ -0,0 +1 @@ +x;x_%C88 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 b/test/core/slice/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 new file mode 100644 index 0000000000..ea02afac49 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 @@ -0,0 +1,2 @@ +xxyyz%øyzŠ[zxy'z + diff --git a/test/core/slice/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 b/test/core/slice/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 new file mode 100644 index 0000000000..9e9b466b2f --- /dev/null +++ b/test/core/slice/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 @@ -0,0 +1 @@ +xx;x_%;:Ê%C)x_%C88c8E'yzŠ8 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb b/test/core/slice/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb new file mode 100644 index 0000000000..88c739ecaa --- /dev/null +++ b/test/core/slice/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb @@ -0,0 +1 @@ +))'x;x_%C88xy(Pyz) \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 b/test/core/slice/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 new file mode 100644 index 0000000000..5e6f546ff5 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 @@ -0,0 +1 @@ +_x;x)x;x_x;x_%88%8888: \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a b/test/core/slice/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a new file mode 100644 index 0000000000..71d688b694 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a @@ -0,0 +1 @@ +x8 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 b/test/core/slice/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 new file mode 100644 index 0000000000..5a89a07ba7 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 @@ -0,0 +1 @@ +x);x(_%88x;x_%88 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 b/test/core/slice/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 new file mode 100644 index 0000000000..cfa2be994f --- /dev/null +++ b/test/core/slice/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 @@ -0,0 +1 @@ +)x;x_x;x_%88%88: \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 b/test/core/slice/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 new file mode 100644 index 0000000000..c1ddf65acd --- /dev/null +++ b/test/core/slice/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 @@ -0,0 +1 @@ +%cyzŠ \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 b/test/core/slice/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 new file mode 100644 index 0000000000..dc427d1e12 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 @@ -0,0 +1 @@ +%øyzŠ \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d b/test/core/slice/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d new file mode 100644 index 0000000000..154449d0ef --- /dev/null +++ b/test/core/slice/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d @@ -0,0 +1 @@ +Ê:%Ec \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 b/test/core/slice/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 new file mode 100644 index 0000000000..841ced83c3 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 @@ -0,0 +1,2 @@ +xxyyz!úyzŠ[zxy'zyz +Š diff --git a/test/core/slice/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f b/test/core/slice/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f new file mode 100644 index 0000000000..6790bc2798 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f @@ -0,0 +1 @@ +x;:Ê%)x_%C8cE'yzŠ8 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 b/test/core/slice/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 new file mode 100644 index 0000000000..1625d0a1ae --- /dev/null +++ b/test/core/slice/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 @@ -0,0 +1 @@ +x;x_%88 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 b/test/core/slice/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 new file mode 100644 index 0000000000..125c330b3e --- /dev/null +++ b/test/core/slice/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 @@ -0,0 +1 @@ +)))'x;x_%C88)'x;x_%C89xyyzxyyz) \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 b/test/core/slice/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 new file mode 100644 index 0000000000..6e6f08cb07 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 @@ -0,0 +1 @@ +))'x;x_%C88xyyz) \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 b/test/core/slice/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 new file mode 100644 index 0000000000..ab4a1c7657 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 @@ -0,0 +1 @@ +x%8 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae b/test/core/slice/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae new file mode 100644 index 0000000000..4ac1945a84 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae @@ -0,0 +1 @@ +x);x(_%88x;x_xxyyz \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 b/test/core/slice/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 new file mode 100644 index 0000000000..5c673ae28a --- /dev/null +++ b/test/core/slice/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 @@ -0,0 +1 @@ +Ê%ccyzyzŠ \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b b/test/core/slice/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b new file mode 100644 index 0000000000..e478275ed4 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b @@ -0,0 +1,2 @@ +)'xyyz!úyzŠ[zxÊ%ccyzyzy'z*zŠ +Š diff --git a/test/core/slice/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 b/test/core/slice/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 new file mode 100644 index 0000000000..c73cbfe8af --- /dev/null +++ b/test/core/slice/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 @@ -0,0 +1,2 @@ +)'xyyz)úyzŠ[zxÊ%cCyzyzy'z*zŠ +Š diff --git a/test/core/slice/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 b/test/core/slice/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 new file mode 100644 index 0000000000..f9f7246e9c --- /dev/null +++ b/test/core/slice/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 @@ -0,0 +1,2 @@ +xxyyz%%øyzŠ[zxy'zyz +Š diff --git a/test/core/slice/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a b/test/core/slice/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a new file mode 100644 index 0000000000..83ac46d833 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a @@ -0,0 +1 @@ +Ê:%Dx;:Ê%)x_%C8cc \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a b/test/core/slice/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a new file mode 100644 index 0000000000..e8a0f87653 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a @@ -0,0 +1 @@ +) \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/xyz b/test/core/slice/percent_decode_corpus/xyz new file mode 100644 index 0000000000..cd470e6190 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/xyz @@ -0,0 +1 @@ +xyz diff --git a/test/core/slice/percent_decode_fuzzer.c b/test/core/slice/percent_decode_fuzzer.c new file mode 100644 index 0000000000..69d74816a7 --- /dev/null +++ b/test/core/slice/percent_decode_fuzzer.c @@ -0,0 +1,66 @@ +/* + * + * 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 +#include +#include + +#include +#include + +#include "src/core/lib/support/percent_encoding.h" +#include "test/core/util/memory_counters.h" + +bool squelch = true; +bool leak_check = true; + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + struct grpc_memory_counters counters; + grpc_memory_counters_init(); + grpc_slice input = grpc_slice_from_copied_buffer((const char *)data, size); + grpc_slice output; + if (gpr_strict_percent_decode_slice( + input, gpr_url_percent_encoding_unreserved_bytes, &output)) { + grpc_slice_unref(output); + } + if (gpr_strict_percent_decode_slice( + input, gpr_compatible_percent_encoding_unreserved_bytes, &output)) { + grpc_slice_unref(output); + } + grpc_slice_unref(gpr_permissive_percent_decode_slice(input)); + grpc_slice_unref(input); + counters = grpc_memory_counters_snapshot(); + grpc_memory_counters_destroy(); + GPR_ASSERT(counters.total_size_relative == 0); + return 0; +} diff --git a/test/core/slice/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f b/test/core/slice/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f new file mode 100644 index 0000000000..d09c4a039c --- /dev/null +++ b/test/core/slice/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f @@ -0,0 +1,3 @@ +_x;7y +xyz')S)xy-zý +Æ* \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 b/test/core/slice/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 new file mode 100644 index 0000000000..4d0c38d0e2 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 @@ -0,0 +1 @@ +xyx \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf b/test/core/slice/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf new file mode 100644 index 0000000000..fc6e93342a --- /dev/null +++ b/test/core/slice/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf @@ -0,0 +1 @@ +.yx.yxxxyzxyyzxy \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 b/test/core/slice/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 new file mode 100644 index 0000000000..6823c73f76 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 @@ -0,0 +1 @@ +xyrxyxyzxxyzxyzxyxyy \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 b/test/core/slice/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 new file mode 100644 index 0000000000..a65cbb4d5b --- /dev/null +++ b/test/core/slice/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 @@ -0,0 +1,3 @@ +xy +xyz +)S-Æþ \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a b/test/core/slice/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a new file mode 100644 index 0000000000..8d031d7e2d --- /dev/null +++ b/test/core/slice/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a @@ -0,0 +1,3 @@ +xy +xyz +)S)Æ* \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e b/test/core/slice/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e new file mode 100644 index 0000000000..4d82ca3953 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e @@ -0,0 +1,4 @@ +x;7y +xyz +)S)xyz +Æ* \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 b/test/core/slice/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 new file mode 100644 index 0000000000..bb7f4ae07e --- /dev/null +++ b/test/core/slice/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 @@ -0,0 +1 @@ +xyzxy \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 b/test/core/slice/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 new file mode 100644 index 0000000000..50879d0f37 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 @@ -0,0 +1,3 @@ +xy +xz +)Sxy-Æzx_yþ \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b b/test/core/slice/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b new file mode 100644 index 0000000000..dc1ab9bfc2 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b @@ -0,0 +1,3 @@ +_x;7y +xyz')S)xyz +Æ* \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 b/test/core/slice/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 new file mode 100644 index 0000000000..3476e0b70b --- /dev/null +++ b/test/core/slice/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 @@ -0,0 +1,2 @@ +xyz +)S \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 b/test/core/slice/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 new file mode 100644 index 0000000000..822d50abf8 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 @@ -0,0 +1 @@ +.yx \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 b/test/core/slice/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 new file mode 100644 index 0000000000..101639c93d --- /dev/null +++ b/test/core/slice/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 @@ -0,0 +1,4 @@ +x;y +xyz +)S)xyz +Æ* \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 b/test/core/slice/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 new file mode 100644 index 0000000000..6e07ab342f --- /dev/null +++ b/test/core/slice/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 @@ -0,0 +1,5 @@ +x;y +xøyz +)S)xyz +Æ.y~ +)S \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 b/test/core/slice/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 new file mode 100644 index 0000000000..13d7fab596 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 @@ -0,0 +1,3 @@ +xy +xyz +)S)S \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/xyz b/test/core/slice/percent_encode_corpus/xyz new file mode 100644 index 0000000000..cd470e6190 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/xyz @@ -0,0 +1 @@ +xyz diff --git a/test/core/slice/percent_encode_fuzzer.c b/test/core/slice/percent_encode_fuzzer.c new file mode 100644 index 0000000000..99599bf16e --- /dev/null +++ b/test/core/slice/percent_encode_fuzzer.c @@ -0,0 +1,73 @@ +/* + * + * 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 +#include +#include + +#include +#include + +#include "src/core/lib/support/percent_encoding.h" +#include "test/core/util/memory_counters.h" + +bool squelch = true; +bool leak_check = true; + +static void test(const uint8_t *data, size_t size, const uint8_t *dict) { + struct grpc_memory_counters counters; + grpc_memory_counters_init(); + grpc_slice input = grpc_slice_from_copied_buffer((const char *)data, size); + grpc_slice output = gpr_percent_encode_slice(input, dict); + grpc_slice decoded_output; + // encoder must always produce decodable output + GPR_ASSERT(gpr_strict_percent_decode_slice(output, dict, &decoded_output)); + grpc_slice permissive_decoded_output = + gpr_permissive_percent_decode_slice(output); + // and decoded output must always match the input + GPR_ASSERT(grpc_slice_cmp(input, decoded_output) == 0); + GPR_ASSERT(grpc_slice_cmp(input, permissive_decoded_output) == 0); + grpc_slice_unref(input); + grpc_slice_unref(output); + grpc_slice_unref(decoded_output); + grpc_slice_unref(permissive_decoded_output); + counters = grpc_memory_counters_snapshot(); + grpc_memory_counters_destroy(); + GPR_ASSERT(counters.total_size_relative == 0); +} + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + test(data, size, gpr_url_percent_encoding_unreserved_bytes); + test(data, size, gpr_compatible_percent_encoding_unreserved_bytes); + return 0; +} diff --git a/test/core/slice/percent_encoding_test.c b/test/core/slice/percent_encoding_test.c new file mode 100644 index 0000000000..e9ba8f5ec4 --- /dev/null +++ b/test/core/slice/percent_encoding_test.c @@ -0,0 +1,157 @@ +/* + * + * 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 "src/core/lib/support/percent_encoding.h" + +#include +#include + +#include "src/core/lib/support/string.h" +#include "test/core/util/test_config.h" + +#define TEST_VECTOR(raw, encoded, dict) \ + test_vector(raw, sizeof(raw) - 1, encoded, sizeof(encoded) - 1, dict) + +#define TEST_NONCONFORMANT_VECTOR(encoded, permissive_unencoded, dict) \ + test_nonconformant_vector(encoded, sizeof(encoded) - 1, \ + permissive_unencoded, \ + sizeof(permissive_unencoded) - 1, dict) + +static void test_vector(const char *raw, size_t raw_length, const char *encoded, + size_t encoded_length, const uint8_t *dict) { + char *raw_msg = gpr_dump(raw, raw_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *encoded_msg = + gpr_dump(encoded, encoded_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, "Trial:\nraw = %s\nencoded = %s", raw_msg, encoded_msg); + gpr_free(raw_msg); + gpr_free(encoded_msg); + + grpc_slice raw_slice = grpc_slice_from_copied_buffer(raw, raw_length); + grpc_slice encoded_slice = + grpc_slice_from_copied_buffer(encoded, encoded_length); + grpc_slice raw2encoded_slice = gpr_percent_encode_slice(raw_slice, dict); + grpc_slice encoded2raw_slice; + GPR_ASSERT( + gpr_strict_percent_decode_slice(encoded_slice, dict, &encoded2raw_slice)); + grpc_slice encoded2raw_permissive_slice = + gpr_permissive_percent_decode_slice(encoded_slice); + + char *raw2encoded_msg = + gpr_dump_slice(raw2encoded_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *encoded2raw_msg = + gpr_dump_slice(encoded2raw_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *encoded2raw_permissive_msg = gpr_dump_slice( + encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, + "Result:\nraw2encoded = %s\nencoded2raw = %s\nencoded2raw_permissive " + "= %s", + raw2encoded_msg, encoded2raw_msg, encoded2raw_permissive_msg); + gpr_free(raw2encoded_msg); + gpr_free(encoded2raw_msg); + gpr_free(encoded2raw_permissive_msg); + + GPR_ASSERT(0 == grpc_slice_cmp(raw_slice, encoded2raw_slice)); + GPR_ASSERT(0 == grpc_slice_cmp(raw_slice, encoded2raw_permissive_slice)); + GPR_ASSERT(0 == grpc_slice_cmp(encoded_slice, raw2encoded_slice)); + + grpc_slice_unref(encoded2raw_slice); + grpc_slice_unref(encoded2raw_permissive_slice); + grpc_slice_unref(raw2encoded_slice); + grpc_slice_unref(raw_slice); + grpc_slice_unref(encoded_slice); +} + +static void test_nonconformant_vector(const char *encoded, + size_t encoded_length, + const char *permissive_unencoded, + size_t permissive_unencoded_length, + const uint8_t *dict) { + char *permissive_unencoded_msg = + gpr_dump(permissive_unencoded, permissive_unencoded_length, + GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *encoded_msg = + gpr_dump(encoded, encoded_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, "Trial:\nraw = %s\nencoded = %s", permissive_unencoded_msg, + encoded_msg); + gpr_free(permissive_unencoded_msg); + gpr_free(encoded_msg); + + grpc_slice permissive_unencoded_slice = grpc_slice_from_copied_buffer( + permissive_unencoded, permissive_unencoded_length); + grpc_slice encoded_slice = + grpc_slice_from_copied_buffer(encoded, encoded_length); + grpc_slice encoded2raw_slice; + GPR_ASSERT(!gpr_strict_percent_decode_slice(encoded_slice, dict, + &encoded2raw_slice)); + grpc_slice encoded2raw_permissive_slice = + gpr_permissive_percent_decode_slice(encoded_slice); + + char *encoded2raw_permissive_msg = gpr_dump_slice( + encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, "Result:\nencoded2raw_permissive = %s", + encoded2raw_permissive_msg); + gpr_free(encoded2raw_permissive_msg); + + GPR_ASSERT(0 == grpc_slice_cmp(permissive_unencoded_slice, + encoded2raw_permissive_slice)); + + grpc_slice_unref(permissive_unencoded_slice); + grpc_slice_unref(encoded2raw_permissive_slice); + grpc_slice_unref(encoded_slice); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + TEST_VECTOR( + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", + gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x00", "%00", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x01", "%01", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("a b", "a%20b", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR(" b", "%20b", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("a b", "a b", gpr_compatible_percent_encoding_unreserved_bytes); + TEST_VECTOR(" b", " b", gpr_compatible_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x0f", "%0F", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\xff", "%FF", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\xee", "%EE", gpr_url_percent_encoding_unreserved_bytes); + TEST_NONCONFORMANT_VECTOR("%", "%", + gpr_url_percent_encoding_unreserved_bytes); + TEST_NONCONFORMANT_VECTOR("%A", "%A", + gpr_url_percent_encoding_unreserved_bytes); + TEST_NONCONFORMANT_VECTOR("%AG", "%AG", + gpr_url_percent_encoding_unreserved_bytes); + TEST_NONCONFORMANT_VECTOR("\0", "\0", + gpr_url_percent_encoding_unreserved_bytes); + return 0; +} diff --git a/test/core/slice/slice_buffer_test.c b/test/core/slice/slice_buffer_test.c new file mode 100644 index 0000000000..9c55a5c473 --- /dev/null +++ b/test/core/slice/slice_buffer_test.c @@ -0,0 +1,129 @@ +/* + * + * Copyright 2015, 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 +#include +#include "test/core/util/test_config.h" + +void test_slice_buffer_add() { + grpc_slice_buffer buf; + grpc_slice aaa = grpc_slice_from_copied_string("aaa"); + grpc_slice bb = grpc_slice_from_copied_string("bb"); + size_t i; + + grpc_slice_buffer_init(&buf); + for (i = 0; i < 10; i++) { + grpc_slice_ref(aaa); + grpc_slice_ref(bb); + grpc_slice_buffer_add(&buf, aaa); + grpc_slice_buffer_add(&buf, bb); + } + GPR_ASSERT(buf.count > 0); + GPR_ASSERT(buf.length == 50); + grpc_slice_buffer_reset_and_unref(&buf); + GPR_ASSERT(buf.count == 0); + GPR_ASSERT(buf.length == 0); + for (i = 0; i < 10; i++) { + grpc_slice_ref(aaa); + grpc_slice_ref(bb); + grpc_slice_buffer_add(&buf, aaa); + grpc_slice_buffer_add(&buf, bb); + } + GPR_ASSERT(buf.count > 0); + GPR_ASSERT(buf.length == 50); + for (i = 0; i < 10; i++) { + grpc_slice_buffer_pop(&buf); + grpc_slice_unref(aaa); + grpc_slice_unref(bb); + } + GPR_ASSERT(buf.count == 0); + GPR_ASSERT(buf.length == 0); + grpc_slice_buffer_destroy(&buf); +} + +void test_slice_buffer_move_first() { + grpc_slice slices[3]; + grpc_slice_buffer src; + grpc_slice_buffer dst; + int idx = 0; + size_t src_len = 0; + size_t dst_len = 0; + + slices[0] = grpc_slice_from_copied_string("aaa"); + slices[1] = grpc_slice_from_copied_string("bbbb"); + slices[2] = grpc_slice_from_copied_string("ccc"); + + grpc_slice_buffer_init(&src); + grpc_slice_buffer_init(&dst); + for (idx = 0; idx < 3; idx++) { + grpc_slice_ref(slices[idx]); + /* For this test, it is important that we add each slice at a new + slice index */ + grpc_slice_buffer_add_indexed(&src, slices[idx]); + grpc_slice_buffer_add_indexed(&dst, slices[idx]); + } + + /* Case 1: Move more than the first slice's length from src to dst */ + src_len = src.length; + dst_len = dst.length; + grpc_slice_buffer_move_first(&src, 4, &dst); + src_len -= 4; + dst_len += 4; + GPR_ASSERT(src.length == src_len); + GPR_ASSERT(dst.length == dst_len); + + /* src now has two slices ["bbb"] and ["ccc"] */ + /* Case 2: Move the first slice from src to dst */ + grpc_slice_buffer_move_first(&src, 3, &dst); + src_len -= 3; + dst_len += 3; + GPR_ASSERT(src.length == src_len); + GPR_ASSERT(dst.length == dst_len); + + /* src now has one slice ["ccc"] */ + /* Case 3: Move less than the first slice's length from src to dst*/ + grpc_slice_buffer_move_first(&src, 2, &dst); + src_len -= 2; + dst_len += 2; + GPR_ASSERT(src.length == src.length); + GPR_ASSERT(dst.length == dst.length); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + + test_slice_buffer_add(); + test_slice_buffer_move_first(); + + return 0; +} diff --git a/test/core/slice/slice_string_helpers_test.c b/test/core/slice/slice_string_helpers_test.c new file mode 100644 index 0000000000..d3dbb1e7f9 --- /dev/null +++ b/test/core/slice/slice_string_helpers_test.c @@ -0,0 +1,148 @@ +/* + * + * Copyright 2015, 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 "src/core/lib/support/string.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include "test/core/util/test_config.h" + +#define LOG_TEST_NAME(x) gpr_log(GPR_INFO, "%s", x) + +static void expect_slice_dump(grpc_slice slice, uint32_t flags, + const char *result) { + char *got = gpr_dump_slice(slice, flags); + GPR_ASSERT(0 == strcmp(got, result)); + gpr_free(got); + grpc_slice_unref(slice); +} + +static void test_dump_slice(void) { + static const char *text = "HELLO WORLD!"; + static const char *long_text = + "It was a bright cold day in April, and the clocks were striking " + "thirteen. Winston Smith, his chin nuzzled into his breast in an effort " + "to escape the vile wind, slipped quickly through the glass doors of " + "Victory Mansions, though not quickly enough to prevent a swirl of " + "gritty dust from entering along with him."; + + LOG_TEST_NAME("test_dump_slice"); + + expect_slice_dump(grpc_slice_from_copied_string(text), GPR_DUMP_ASCII, text); + expect_slice_dump(grpc_slice_from_copied_string(long_text), GPR_DUMP_ASCII, + long_text); + expect_slice_dump(grpc_slice_from_copied_buffer("\x01", 1), GPR_DUMP_HEX, + "01"); + expect_slice_dump(grpc_slice_from_copied_buffer("\x01", 1), + GPR_DUMP_HEX | GPR_DUMP_ASCII, "01 '.'"); +} + +static void test_strsplit(void) { + grpc_slice_buffer *parts; + grpc_slice str; + + LOG_TEST_NAME("test_strsplit"); + + parts = gpr_malloc(sizeof(grpc_slice_buffer)); + grpc_slice_buffer_init(parts); + + str = grpc_slice_from_copied_string("one, two, three, four"); + grpc_slice_split(str, ", ", parts); + GPR_ASSERT(4 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "one")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[1], "two")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[2], "three")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[3], "four")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + /* separator not present in string */ + str = grpc_slice_from_copied_string("one two three four"); + grpc_slice_split(str, ", ", parts); + GPR_ASSERT(1 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "one two three four")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + /* separator at the end */ + str = grpc_slice_from_copied_string("foo,"); + grpc_slice_split(str, ",", parts); + GPR_ASSERT(2 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "foo")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[1], "")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + /* separator at the beginning */ + str = grpc_slice_from_copied_string(",foo"); + grpc_slice_split(str, ",", parts); + GPR_ASSERT(2 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[1], "foo")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + /* standalone separator */ + str = grpc_slice_from_copied_string(","); + grpc_slice_split(str, ",", parts); + GPR_ASSERT(2 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[1], "")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + /* empty input */ + str = grpc_slice_from_copied_string(""); + grpc_slice_split(str, ", ", parts); + GPR_ASSERT(1 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + grpc_slice_buffer_destroy(parts); + gpr_free(parts); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + test_dump_slice(); + test_strsplit(); + return 0; +} diff --git a/test/core/slice/slice_test.c b/test/core/slice/slice_test.c new file mode 100644 index 0000000000..c263fe27d6 --- /dev/null +++ b/test/core/slice/slice_test.c @@ -0,0 +1,265 @@ +/* + * + * Copyright 2015, 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 + +#include + +#include +#include +#include "test/core/util/test_config.h" + +#define LOG_TEST_NAME(x) gpr_log(GPR_INFO, "%s", x); + +static void test_slice_malloc_returns_something_sensible(void) { + /* Calls grpc_slice_create for various lengths and verifies the internals for + consistency. */ + size_t length; + size_t i; + grpc_slice slice; + + LOG_TEST_NAME("test_slice_malloc_returns_something_sensible"); + + for (length = 0; length <= 1024; length++) { + slice = grpc_slice_malloc(length); + /* If there is a length, slice.data must be non-NULL. If length is zero + we don't care. */ + if (length) { + GPR_ASSERT(GPR_SLICE_START_PTR(slice)); + } + /* Returned slice length must be what was requested. */ + GPR_ASSERT(GPR_SLICE_LENGTH(slice) == length); + /* If the slice has a refcount, it must be destroyable. */ + if (slice.refcount) { + GPR_ASSERT(slice.refcount->ref != NULL); + GPR_ASSERT(slice.refcount->unref != NULL); + } + /* We must be able to write to every byte of the data */ + for (i = 0; i < length; i++) { + GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + } + /* And finally we must succeed in destroying the slice */ + grpc_slice_unref(slice); + } +} + +static void do_nothing(void *ignored) {} + +static void test_slice_new_returns_something_sensible(void) { + uint8_t x; + + grpc_slice slice = grpc_slice_new(&x, 1, do_nothing); + GPR_ASSERT(slice.refcount); + GPR_ASSERT(slice.data.refcounted.bytes == &x); + GPR_ASSERT(slice.data.refcounted.length == 1); + grpc_slice_unref(slice); +} + +/* destroy function that sets a mark to indicate it was called. */ +static void set_mark(void *p) { *((int *)p) = 1; } + +static void test_slice_new_with_user_data(void) { + int marker = 0; + uint8_t buf[2]; + grpc_slice slice; + + buf[0] = 0; + buf[1] = 1; + slice = grpc_slice_new_with_user_data(buf, 2, set_mark, &marker); + GPR_ASSERT(marker == 0); + GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 2); + GPR_ASSERT(GPR_SLICE_START_PTR(slice)[0] == 0); + GPR_ASSERT(GPR_SLICE_START_PTR(slice)[1] == 1); + + /* unref should cause destroy function to run. */ + grpc_slice_unref(slice); + GPR_ASSERT(marker == 1); +} + +static int do_nothing_with_len_1_calls = 0; + +static void do_nothing_with_len_1(void *ignored, size_t len) { + GPR_ASSERT(len == 1); + do_nothing_with_len_1_calls++; +} + +static void test_slice_new_with_len_returns_something_sensible(void) { + uint8_t x; + int num_refs = 5; /* To test adding/removing an arbitrary number of refs */ + int i; + + grpc_slice slice = grpc_slice_new_with_len(&x, 1, do_nothing_with_len_1); + GPR_ASSERT(slice.refcount); /* ref count is initialized to 1 at this point */ + GPR_ASSERT(slice.data.refcounted.bytes == &x); + GPR_ASSERT(slice.data.refcounted.length == 1); + GPR_ASSERT(do_nothing_with_len_1_calls == 0); + + /* Add an arbitrary number of refs to the slice and remoe the refs. This is to + make sure that that the destroy callback (i.e do_nothing_with_len_1()) is + not called until the last unref operation */ + for (i = 0; i < num_refs; i++) { + grpc_slice_ref(slice); + } + for (i = 0; i < num_refs; i++) { + grpc_slice_unref(slice); + } + GPR_ASSERT(do_nothing_with_len_1_calls == 0); /* Shouldn't be called yet */ + + /* last unref */ + grpc_slice_unref(slice); + GPR_ASSERT(do_nothing_with_len_1_calls == 1); +} + +static void test_slice_sub_works(unsigned length) { + grpc_slice slice; + grpc_slice sub; + unsigned i, j, k; + + LOG_TEST_NAME("test_slice_sub_works"); + gpr_log(GPR_INFO, "length=%d", length); + + /* Create a slice in which each byte is equal to the distance from it to the + beginning of the slice. */ + slice = grpc_slice_malloc(length); + for (i = 0; i < length; i++) { + GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + } + + /* Ensure that for all subsets length is correct and that we start on the + correct byte. Additionally check that no copies were made. */ + for (i = 0; i < length; i++) { + for (j = i; j < length; j++) { + sub = grpc_slice_sub(slice, i, j); + GPR_ASSERT(GPR_SLICE_LENGTH(sub) == j - i); + for (k = 0; k < j - i; k++) { + GPR_ASSERT(GPR_SLICE_START_PTR(sub)[k] == (uint8_t)(i + k)); + } + grpc_slice_unref(sub); + } + } + grpc_slice_unref(slice); +} + +static void check_head_tail(grpc_slice slice, grpc_slice head, grpc_slice tail) { + GPR_ASSERT(GPR_SLICE_LENGTH(slice) == + GPR_SLICE_LENGTH(head) + GPR_SLICE_LENGTH(tail)); + GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice), GPR_SLICE_START_PTR(head), + GPR_SLICE_LENGTH(head))); + GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(head), + GPR_SLICE_START_PTR(tail), GPR_SLICE_LENGTH(tail))); +} + +static void test_slice_split_head_works(size_t length) { + grpc_slice slice; + grpc_slice head, tail; + size_t i; + + LOG_TEST_NAME("test_slice_split_head_works"); + gpr_log(GPR_INFO, "length=%" PRIuPTR, length); + + /* Create a slice in which each byte is equal to the distance from it to the + beginning of the slice. */ + slice = grpc_slice_malloc(length); + for (i = 0; i < length; i++) { + GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + } + + /* Ensure that for all subsets length is correct and that we start on the + correct byte. Additionally check that no copies were made. */ + for (i = 0; i < length; i++) { + tail = grpc_slice_ref(slice); + head = grpc_slice_split_head(&tail, i); + check_head_tail(slice, head, tail); + grpc_slice_unref(tail); + grpc_slice_unref(head); + } + + grpc_slice_unref(slice); +} + +static void test_slice_split_tail_works(size_t length) { + grpc_slice slice; + grpc_slice head, tail; + size_t i; + + LOG_TEST_NAME("test_slice_split_tail_works"); + gpr_log(GPR_INFO, "length=%" PRIuPTR, length); + + /* Create a slice in which each byte is equal to the distance from it to the + beginning of the slice. */ + slice = grpc_slice_malloc(length); + for (i = 0; i < length; i++) { + GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + } + + /* Ensure that for all subsets length is correct and that we start on the + correct byte. Additionally check that no copies were made. */ + for (i = 0; i < length; i++) { + head = grpc_slice_ref(slice); + tail = grpc_slice_split_tail(&head, i); + check_head_tail(slice, head, tail); + grpc_slice_unref(tail); + grpc_slice_unref(head); + } + + grpc_slice_unref(slice); +} + +static void test_slice_from_copied_string_works(void) { + static const char *text = "HELLO WORLD!"; + grpc_slice slice; + + LOG_TEST_NAME("test_slice_from_copied_string_works"); + + slice = grpc_slice_from_copied_string(text); + GPR_ASSERT(strlen(text) == GPR_SLICE_LENGTH(slice)); + GPR_ASSERT(0 == + memcmp(text, GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice))); + grpc_slice_unref(slice); +} + +int main(int argc, char **argv) { + unsigned length; + grpc_test_init(argc, argv); + test_slice_malloc_returns_something_sensible(); + test_slice_new_returns_something_sensible(); + test_slice_new_with_user_data(); + test_slice_new_with_len_returns_something_sensible(); + for (length = 0; length < 128; length++) { + test_slice_sub_works(length); + test_slice_split_head_works(length); + test_slice_split_tail_works(length); + } + test_slice_from_copied_string_works(); + return 0; +} diff --git a/test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 b/test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 deleted file mode 100644 index a0c7605580..0000000000 --- a/test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 +++ /dev/null @@ -1 +0,0 @@ -:Ê%cE'yzŠ \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 b/test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 deleted file mode 100644 index 8b36124b3f..0000000000 --- a/test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 +++ /dev/null @@ -1 +0,0 @@ -x;x_%C88 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 b/test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 deleted file mode 100644 index ea02afac49..0000000000 --- a/test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 +++ /dev/null @@ -1,2 +0,0 @@ -xxyyz%øyzŠ[zxy'z - diff --git a/test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 b/test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 deleted file mode 100644 index 9e9b466b2f..0000000000 --- a/test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 +++ /dev/null @@ -1 +0,0 @@ -xx;x_%;:Ê%C)x_%C88c8E'yzŠ8 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb b/test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb deleted file mode 100644 index 88c739ecaa..0000000000 --- a/test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb +++ /dev/null @@ -1 +0,0 @@ -))'x;x_%C88xy(Pyz) \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 b/test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 deleted file mode 100644 index 5e6f546ff5..0000000000 --- a/test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 +++ /dev/null @@ -1 +0,0 @@ -_x;x)x;x_x;x_%88%8888: \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a b/test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a deleted file mode 100644 index 71d688b694..0000000000 --- a/test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a +++ /dev/null @@ -1 +0,0 @@ -x8 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 b/test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 deleted file mode 100644 index 5a89a07ba7..0000000000 --- a/test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 +++ /dev/null @@ -1 +0,0 @@ -x);x(_%88x;x_%88 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 b/test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 deleted file mode 100644 index cfa2be994f..0000000000 --- a/test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 +++ /dev/null @@ -1 +0,0 @@ -)x;x_x;x_%88%88: \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 b/test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 deleted file mode 100644 index c1ddf65acd..0000000000 --- a/test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 +++ /dev/null @@ -1 +0,0 @@ -%cyzŠ \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 b/test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 deleted file mode 100644 index dc427d1e12..0000000000 --- a/test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 +++ /dev/null @@ -1 +0,0 @@ -%øyzŠ \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d b/test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d deleted file mode 100644 index 154449d0ef..0000000000 --- a/test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d +++ /dev/null @@ -1 +0,0 @@ -Ê:%Ec \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 b/test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 deleted file mode 100644 index 841ced83c3..0000000000 --- a/test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 +++ /dev/null @@ -1,2 +0,0 @@ -xxyyz!úyzŠ[zxy'zyz -Š diff --git a/test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f b/test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f deleted file mode 100644 index 6790bc2798..0000000000 --- a/test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f +++ /dev/null @@ -1 +0,0 @@ -x;:Ê%)x_%C8cE'yzŠ8 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 b/test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 deleted file mode 100644 index 1625d0a1ae..0000000000 --- a/test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 +++ /dev/null @@ -1 +0,0 @@ -x;x_%88 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 b/test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 deleted file mode 100644 index 125c330b3e..0000000000 --- a/test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 +++ /dev/null @@ -1 +0,0 @@ -)))'x;x_%C88)'x;x_%C89xyyzxyyz) \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 b/test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 deleted file mode 100644 index 6e6f08cb07..0000000000 --- a/test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 +++ /dev/null @@ -1 +0,0 @@ -))'x;x_%C88xyyz) \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 b/test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 deleted file mode 100644 index ab4a1c7657..0000000000 --- a/test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 +++ /dev/null @@ -1 +0,0 @@ -x%8 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae b/test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae deleted file mode 100644 index 4ac1945a84..0000000000 --- a/test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae +++ /dev/null @@ -1 +0,0 @@ -x);x(_%88x;x_xxyyz \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 b/test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 deleted file mode 100644 index 5c673ae28a..0000000000 --- a/test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 +++ /dev/null @@ -1 +0,0 @@ -Ê%ccyzyzŠ \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b b/test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b deleted file mode 100644 index e478275ed4..0000000000 --- a/test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b +++ /dev/null @@ -1,2 +0,0 @@ -)'xyyz!úyzŠ[zxÊ%ccyzyzy'z*zŠ -Š diff --git a/test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 b/test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 deleted file mode 100644 index c73cbfe8af..0000000000 --- a/test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 +++ /dev/null @@ -1,2 +0,0 @@ -)'xyyz)úyzŠ[zxÊ%cCyzyzy'z*zŠ -Š diff --git a/test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 b/test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 deleted file mode 100644 index f9f7246e9c..0000000000 --- a/test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 +++ /dev/null @@ -1,2 +0,0 @@ -xxyyz%%øyzŠ[zxy'zyz -Š diff --git a/test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a b/test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a deleted file mode 100644 index 83ac46d833..0000000000 --- a/test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a +++ /dev/null @@ -1 +0,0 @@ -Ê:%Dx;:Ê%)x_%C8cc \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a b/test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a deleted file mode 100644 index e8a0f87653..0000000000 --- a/test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a +++ /dev/null @@ -1 +0,0 @@ -) \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/xyz b/test/core/support/percent_decode_corpus/xyz deleted file mode 100644 index cd470e6190..0000000000 --- a/test/core/support/percent_decode_corpus/xyz +++ /dev/null @@ -1 +0,0 @@ -xyz diff --git a/test/core/support/percent_decode_fuzzer.c b/test/core/support/percent_decode_fuzzer.c deleted file mode 100644 index 3e02980e05..0000000000 --- a/test/core/support/percent_decode_fuzzer.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * 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 -#include -#include - -#include -#include - -#include "src/core/lib/support/percent_encoding.h" -#include "test/core/util/memory_counters.h" - -bool squelch = true; -bool leak_check = true; - -int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { - struct grpc_memory_counters counters; - grpc_memory_counters_init(); - gpr_slice input = gpr_slice_from_copied_buffer((const char *)data, size); - gpr_slice output; - if (gpr_strict_percent_decode_slice( - input, gpr_url_percent_encoding_unreserved_bytes, &output)) { - gpr_slice_unref(output); - } - if (gpr_strict_percent_decode_slice( - input, gpr_compatible_percent_encoding_unreserved_bytes, &output)) { - gpr_slice_unref(output); - } - gpr_slice_unref(gpr_permissive_percent_decode_slice(input)); - gpr_slice_unref(input); - counters = grpc_memory_counters_snapshot(); - grpc_memory_counters_destroy(); - GPR_ASSERT(counters.total_size_relative == 0); - return 0; -} diff --git a/test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f b/test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f deleted file mode 100644 index d09c4a039c..0000000000 --- a/test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f +++ /dev/null @@ -1,3 +0,0 @@ -_x;7y -xyz')S)xy-zý -Æ* \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 b/test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 deleted file mode 100644 index 4d0c38d0e2..0000000000 --- a/test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 +++ /dev/null @@ -1 +0,0 @@ -xyx \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf b/test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf deleted file mode 100644 index fc6e93342a..0000000000 --- a/test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf +++ /dev/null @@ -1 +0,0 @@ -.yx.yxxxyzxyyzxy \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 b/test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 deleted file mode 100644 index 6823c73f76..0000000000 --- a/test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 +++ /dev/null @@ -1 +0,0 @@ -xyrxyxyzxxyzxyzxyxyy \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 b/test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 deleted file mode 100644 index a65cbb4d5b..0000000000 --- a/test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 +++ /dev/null @@ -1,3 +0,0 @@ -xy -xyz -)S-Æþ \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a b/test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a deleted file mode 100644 index 8d031d7e2d..0000000000 --- a/test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a +++ /dev/null @@ -1,3 +0,0 @@ -xy -xyz -)S)Æ* \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e b/test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e deleted file mode 100644 index 4d82ca3953..0000000000 --- a/test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e +++ /dev/null @@ -1,4 +0,0 @@ -x;7y -xyz -)S)xyz -Æ* \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 b/test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 deleted file mode 100644 index bb7f4ae07e..0000000000 --- a/test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 +++ /dev/null @@ -1 +0,0 @@ -xyzxy \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 b/test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 deleted file mode 100644 index 50879d0f37..0000000000 --- a/test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 +++ /dev/null @@ -1,3 +0,0 @@ -xy -xz -)Sxy-Æzx_yþ \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b b/test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b deleted file mode 100644 index dc1ab9bfc2..0000000000 --- a/test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b +++ /dev/null @@ -1,3 +0,0 @@ -_x;7y -xyz')S)xyz -Æ* \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 b/test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 deleted file mode 100644 index 3476e0b70b..0000000000 --- a/test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 +++ /dev/null @@ -1,2 +0,0 @@ -xyz -)S \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 b/test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 deleted file mode 100644 index 822d50abf8..0000000000 --- a/test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 +++ /dev/null @@ -1 +0,0 @@ -.yx \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 b/test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 deleted file mode 100644 index 101639c93d..0000000000 --- a/test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 +++ /dev/null @@ -1,4 +0,0 @@ -x;y -xyz -)S)xyz -Æ* \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 b/test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 deleted file mode 100644 index 6e07ab342f..0000000000 --- a/test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 +++ /dev/null @@ -1,5 +0,0 @@ -x;y -xøyz -)S)xyz -Æ.y~ -)S \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 b/test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 deleted file mode 100644 index 13d7fab596..0000000000 --- a/test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 +++ /dev/null @@ -1,3 +0,0 @@ -xy -xyz -)S)S \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/xyz b/test/core/support/percent_encode_corpus/xyz deleted file mode 100644 index cd470e6190..0000000000 --- a/test/core/support/percent_encode_corpus/xyz +++ /dev/null @@ -1 +0,0 @@ -xyz diff --git a/test/core/support/percent_encode_fuzzer.c b/test/core/support/percent_encode_fuzzer.c deleted file mode 100644 index c9548232b5..0000000000 --- a/test/core/support/percent_encode_fuzzer.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * - * 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 -#include -#include - -#include -#include - -#include "src/core/lib/support/percent_encoding.h" -#include "test/core/util/memory_counters.h" - -bool squelch = true; -bool leak_check = true; - -static void test(const uint8_t *data, size_t size, const uint8_t *dict) { - struct grpc_memory_counters counters; - grpc_memory_counters_init(); - gpr_slice input = gpr_slice_from_copied_buffer((const char *)data, size); - gpr_slice output = gpr_percent_encode_slice(input, dict); - gpr_slice decoded_output; - // encoder must always produce decodable output - GPR_ASSERT(gpr_strict_percent_decode_slice(output, dict, &decoded_output)); - gpr_slice permissive_decoded_output = - gpr_permissive_percent_decode_slice(output); - // and decoded output must always match the input - GPR_ASSERT(gpr_slice_cmp(input, decoded_output) == 0); - GPR_ASSERT(gpr_slice_cmp(input, permissive_decoded_output) == 0); - gpr_slice_unref(input); - gpr_slice_unref(output); - gpr_slice_unref(decoded_output); - gpr_slice_unref(permissive_decoded_output); - counters = grpc_memory_counters_snapshot(); - grpc_memory_counters_destroy(); - GPR_ASSERT(counters.total_size_relative == 0); -} - -int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { - test(data, size, gpr_url_percent_encoding_unreserved_bytes); - test(data, size, gpr_compatible_percent_encoding_unreserved_bytes); - return 0; -} diff --git a/test/core/support/percent_encoding_test.c b/test/core/support/percent_encoding_test.c deleted file mode 100644 index ab5f3f2d14..0000000000 --- a/test/core/support/percent_encoding_test.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * - * 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 "src/core/lib/support/percent_encoding.h" - -#include -#include - -#include "src/core/lib/support/string.h" -#include "test/core/util/test_config.h" - -#define TEST_VECTOR(raw, encoded, dict) \ - test_vector(raw, sizeof(raw) - 1, encoded, sizeof(encoded) - 1, dict) - -#define TEST_NONCONFORMANT_VECTOR(encoded, permissive_unencoded, dict) \ - test_nonconformant_vector(encoded, sizeof(encoded) - 1, \ - permissive_unencoded, \ - sizeof(permissive_unencoded) - 1, dict) - -static void test_vector(const char *raw, size_t raw_length, const char *encoded, - size_t encoded_length, const uint8_t *dict) { - char *raw_msg = gpr_dump(raw, raw_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *encoded_msg = - gpr_dump(encoded, encoded_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "Trial:\nraw = %s\nencoded = %s", raw_msg, encoded_msg); - gpr_free(raw_msg); - gpr_free(encoded_msg); - - gpr_slice raw_slice = gpr_slice_from_copied_buffer(raw, raw_length); - gpr_slice encoded_slice = - gpr_slice_from_copied_buffer(encoded, encoded_length); - gpr_slice raw2encoded_slice = gpr_percent_encode_slice(raw_slice, dict); - gpr_slice encoded2raw_slice; - GPR_ASSERT( - gpr_strict_percent_decode_slice(encoded_slice, dict, &encoded2raw_slice)); - gpr_slice encoded2raw_permissive_slice = - gpr_permissive_percent_decode_slice(encoded_slice); - - char *raw2encoded_msg = - gpr_dump_slice(raw2encoded_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *encoded2raw_msg = - gpr_dump_slice(encoded2raw_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *encoded2raw_permissive_msg = gpr_dump_slice( - encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, - "Result:\nraw2encoded = %s\nencoded2raw = %s\nencoded2raw_permissive " - "= %s", - raw2encoded_msg, encoded2raw_msg, encoded2raw_permissive_msg); - gpr_free(raw2encoded_msg); - gpr_free(encoded2raw_msg); - gpr_free(encoded2raw_permissive_msg); - - GPR_ASSERT(0 == gpr_slice_cmp(raw_slice, encoded2raw_slice)); - GPR_ASSERT(0 == gpr_slice_cmp(raw_slice, encoded2raw_permissive_slice)); - GPR_ASSERT(0 == gpr_slice_cmp(encoded_slice, raw2encoded_slice)); - - gpr_slice_unref(encoded2raw_slice); - gpr_slice_unref(encoded2raw_permissive_slice); - gpr_slice_unref(raw2encoded_slice); - gpr_slice_unref(raw_slice); - gpr_slice_unref(encoded_slice); -} - -static void test_nonconformant_vector(const char *encoded, - size_t encoded_length, - const char *permissive_unencoded, - size_t permissive_unencoded_length, - const uint8_t *dict) { - char *permissive_unencoded_msg = - gpr_dump(permissive_unencoded, permissive_unencoded_length, - GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *encoded_msg = - gpr_dump(encoded, encoded_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "Trial:\nraw = %s\nencoded = %s", permissive_unencoded_msg, - encoded_msg); - gpr_free(permissive_unencoded_msg); - gpr_free(encoded_msg); - - gpr_slice permissive_unencoded_slice = gpr_slice_from_copied_buffer( - permissive_unencoded, permissive_unencoded_length); - gpr_slice encoded_slice = - gpr_slice_from_copied_buffer(encoded, encoded_length); - gpr_slice encoded2raw_slice; - GPR_ASSERT(!gpr_strict_percent_decode_slice(encoded_slice, dict, - &encoded2raw_slice)); - gpr_slice encoded2raw_permissive_slice = - gpr_permissive_percent_decode_slice(encoded_slice); - - char *encoded2raw_permissive_msg = gpr_dump_slice( - encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "Result:\nencoded2raw_permissive = %s", - encoded2raw_permissive_msg); - gpr_free(encoded2raw_permissive_msg); - - GPR_ASSERT(0 == gpr_slice_cmp(permissive_unencoded_slice, - encoded2raw_permissive_slice)); - - gpr_slice_unref(permissive_unencoded_slice); - gpr_slice_unref(encoded2raw_permissive_slice); - gpr_slice_unref(encoded_slice); -} - -int main(int argc, char **argv) { - grpc_test_init(argc, argv); - TEST_VECTOR( - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", - gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x00", "%00", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x01", "%01", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("a b", "a%20b", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR(" b", "%20b", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("a b", "a b", gpr_compatible_percent_encoding_unreserved_bytes); - TEST_VECTOR(" b", " b", gpr_compatible_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x0f", "%0F", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\xff", "%FF", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\xee", "%EE", gpr_url_percent_encoding_unreserved_bytes); - TEST_NONCONFORMANT_VECTOR("%", "%", - gpr_url_percent_encoding_unreserved_bytes); - TEST_NONCONFORMANT_VECTOR("%A", "%A", - gpr_url_percent_encoding_unreserved_bytes); - TEST_NONCONFORMANT_VECTOR("%AG", "%AG", - gpr_url_percent_encoding_unreserved_bytes); - TEST_NONCONFORMANT_VECTOR("\0", "\0", - gpr_url_percent_encoding_unreserved_bytes); - return 0; -} diff --git a/test/core/support/slice_buffer_test.c b/test/core/support/slice_buffer_test.c deleted file mode 100644 index cf2da84c2b..0000000000 --- a/test/core/support/slice_buffer_test.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * - * Copyright 2015, 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 -#include -#include "test/core/util/test_config.h" - -void test_slice_buffer_add() { - gpr_slice_buffer buf; - gpr_slice aaa = gpr_slice_from_copied_string("aaa"); - gpr_slice bb = gpr_slice_from_copied_string("bb"); - size_t i; - - gpr_slice_buffer_init(&buf); - for (i = 0; i < 10; i++) { - gpr_slice_ref(aaa); - gpr_slice_ref(bb); - gpr_slice_buffer_add(&buf, aaa); - gpr_slice_buffer_add(&buf, bb); - } - GPR_ASSERT(buf.count > 0); - GPR_ASSERT(buf.length == 50); - gpr_slice_buffer_reset_and_unref(&buf); - GPR_ASSERT(buf.count == 0); - GPR_ASSERT(buf.length == 0); - for (i = 0; i < 10; i++) { - gpr_slice_ref(aaa); - gpr_slice_ref(bb); - gpr_slice_buffer_add(&buf, aaa); - gpr_slice_buffer_add(&buf, bb); - } - GPR_ASSERT(buf.count > 0); - GPR_ASSERT(buf.length == 50); - for (i = 0; i < 10; i++) { - gpr_slice_buffer_pop(&buf); - gpr_slice_unref(aaa); - gpr_slice_unref(bb); - } - GPR_ASSERT(buf.count == 0); - GPR_ASSERT(buf.length == 0); - gpr_slice_buffer_destroy(&buf); -} - -void test_slice_buffer_move_first() { - gpr_slice slices[3]; - gpr_slice_buffer src; - gpr_slice_buffer dst; - int idx = 0; - size_t src_len = 0; - size_t dst_len = 0; - - slices[0] = gpr_slice_from_copied_string("aaa"); - slices[1] = gpr_slice_from_copied_string("bbbb"); - slices[2] = gpr_slice_from_copied_string("ccc"); - - gpr_slice_buffer_init(&src); - gpr_slice_buffer_init(&dst); - for (idx = 0; idx < 3; idx++) { - gpr_slice_ref(slices[idx]); - /* For this test, it is important that we add each slice at a new - slice index */ - gpr_slice_buffer_add_indexed(&src, slices[idx]); - gpr_slice_buffer_add_indexed(&dst, slices[idx]); - } - - /* Case 1: Move more than the first slice's length from src to dst */ - src_len = src.length; - dst_len = dst.length; - gpr_slice_buffer_move_first(&src, 4, &dst); - src_len -= 4; - dst_len += 4; - GPR_ASSERT(src.length == src_len); - GPR_ASSERT(dst.length == dst_len); - - /* src now has two slices ["bbb"] and ["ccc"] */ - /* Case 2: Move the first slice from src to dst */ - gpr_slice_buffer_move_first(&src, 3, &dst); - src_len -= 3; - dst_len += 3; - GPR_ASSERT(src.length == src_len); - GPR_ASSERT(dst.length == dst_len); - - /* src now has one slice ["ccc"] */ - /* Case 3: Move less than the first slice's length from src to dst*/ - gpr_slice_buffer_move_first(&src, 2, &dst); - src_len -= 2; - dst_len += 2; - GPR_ASSERT(src.length == src.length); - GPR_ASSERT(dst.length == dst.length); -} - -int main(int argc, char **argv) { - grpc_test_init(argc, argv); - - test_slice_buffer_add(); - test_slice_buffer_move_first(); - - return 0; -} diff --git a/test/core/support/slice_test.c b/test/core/support/slice_test.c deleted file mode 100644 index 06c364b368..0000000000 --- a/test/core/support/slice_test.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - * - * Copyright 2015, 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 - -#include - -#include -#include -#include "test/core/util/test_config.h" - -#define LOG_TEST_NAME(x) gpr_log(GPR_INFO, "%s", x); - -static void test_slice_malloc_returns_something_sensible(void) { - /* Calls gpr_slice_create for various lengths and verifies the internals for - consistency. */ - size_t length; - size_t i; - gpr_slice slice; - - LOG_TEST_NAME("test_slice_malloc_returns_something_sensible"); - - for (length = 0; length <= 1024; length++) { - slice = gpr_slice_malloc(length); - /* If there is a length, slice.data must be non-NULL. If length is zero - we don't care. */ - if (length) { - GPR_ASSERT(GPR_SLICE_START_PTR(slice)); - } - /* Returned slice length must be what was requested. */ - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == length); - /* If the slice has a refcount, it must be destroyable. */ - if (slice.refcount) { - GPR_ASSERT(slice.refcount->ref != NULL); - GPR_ASSERT(slice.refcount->unref != NULL); - } - /* We must be able to write to every byte of the data */ - for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; - } - /* And finally we must succeed in destroying the slice */ - gpr_slice_unref(slice); - } -} - -static void do_nothing(void *ignored) {} - -static void test_slice_new_returns_something_sensible(void) { - uint8_t x; - - gpr_slice slice = gpr_slice_new(&x, 1, do_nothing); - GPR_ASSERT(slice.refcount); - GPR_ASSERT(slice.data.refcounted.bytes == &x); - GPR_ASSERT(slice.data.refcounted.length == 1); - gpr_slice_unref(slice); -} - -/* destroy function that sets a mark to indicate it was called. */ -static void set_mark(void *p) { *((int *)p) = 1; } - -static void test_slice_new_with_user_data(void) { - int marker = 0; - uint8_t buf[2]; - gpr_slice slice; - - buf[0] = 0; - buf[1] = 1; - slice = gpr_slice_new_with_user_data(buf, 2, set_mark, &marker); - GPR_ASSERT(marker == 0); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 2); - GPR_ASSERT(GPR_SLICE_START_PTR(slice)[0] == 0); - GPR_ASSERT(GPR_SLICE_START_PTR(slice)[1] == 1); - - /* unref should cause destroy function to run. */ - gpr_slice_unref(slice); - GPR_ASSERT(marker == 1); -} - -static int do_nothing_with_len_1_calls = 0; - -static void do_nothing_with_len_1(void *ignored, size_t len) { - GPR_ASSERT(len == 1); - do_nothing_with_len_1_calls++; -} - -static void test_slice_new_with_len_returns_something_sensible(void) { - uint8_t x; - int num_refs = 5; /* To test adding/removing an arbitrary number of refs */ - int i; - - gpr_slice slice = gpr_slice_new_with_len(&x, 1, do_nothing_with_len_1); - GPR_ASSERT(slice.refcount); /* ref count is initialized to 1 at this point */ - GPR_ASSERT(slice.data.refcounted.bytes == &x); - GPR_ASSERT(slice.data.refcounted.length == 1); - GPR_ASSERT(do_nothing_with_len_1_calls == 0); - - /* Add an arbitrary number of refs to the slice and remoe the refs. This is to - make sure that that the destroy callback (i.e do_nothing_with_len_1()) is - not called until the last unref operation */ - for (i = 0; i < num_refs; i++) { - gpr_slice_ref(slice); - } - for (i = 0; i < num_refs; i++) { - gpr_slice_unref(slice); - } - GPR_ASSERT(do_nothing_with_len_1_calls == 0); /* Shouldn't be called yet */ - - /* last unref */ - gpr_slice_unref(slice); - GPR_ASSERT(do_nothing_with_len_1_calls == 1); -} - -static void test_slice_sub_works(unsigned length) { - gpr_slice slice; - gpr_slice sub; - unsigned i, j, k; - - LOG_TEST_NAME("test_slice_sub_works"); - gpr_log(GPR_INFO, "length=%d", length); - - /* Create a slice in which each byte is equal to the distance from it to the - beginning of the slice. */ - slice = gpr_slice_malloc(length); - for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; - } - - /* Ensure that for all subsets length is correct and that we start on the - correct byte. Additionally check that no copies were made. */ - for (i = 0; i < length; i++) { - for (j = i; j < length; j++) { - sub = gpr_slice_sub(slice, i, j); - GPR_ASSERT(GPR_SLICE_LENGTH(sub) == j - i); - for (k = 0; k < j - i; k++) { - GPR_ASSERT(GPR_SLICE_START_PTR(sub)[k] == (uint8_t)(i + k)); - } - gpr_slice_unref(sub); - } - } - gpr_slice_unref(slice); -} - -static void check_head_tail(gpr_slice slice, gpr_slice head, gpr_slice tail) { - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == - GPR_SLICE_LENGTH(head) + GPR_SLICE_LENGTH(tail)); - GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice), GPR_SLICE_START_PTR(head), - GPR_SLICE_LENGTH(head))); - GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(head), - GPR_SLICE_START_PTR(tail), GPR_SLICE_LENGTH(tail))); -} - -static void test_slice_split_head_works(size_t length) { - gpr_slice slice; - gpr_slice head, tail; - size_t i; - - LOG_TEST_NAME("test_slice_split_head_works"); - gpr_log(GPR_INFO, "length=%" PRIuPTR, length); - - /* Create a slice in which each byte is equal to the distance from it to the - beginning of the slice. */ - slice = gpr_slice_malloc(length); - for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; - } - - /* Ensure that for all subsets length is correct and that we start on the - correct byte. Additionally check that no copies were made. */ - for (i = 0; i < length; i++) { - tail = gpr_slice_ref(slice); - head = gpr_slice_split_head(&tail, i); - check_head_tail(slice, head, tail); - gpr_slice_unref(tail); - gpr_slice_unref(head); - } - - gpr_slice_unref(slice); -} - -static void test_slice_split_tail_works(size_t length) { - gpr_slice slice; - gpr_slice head, tail; - size_t i; - - LOG_TEST_NAME("test_slice_split_tail_works"); - gpr_log(GPR_INFO, "length=%" PRIuPTR, length); - - /* Create a slice in which each byte is equal to the distance from it to the - beginning of the slice. */ - slice = gpr_slice_malloc(length); - for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; - } - - /* Ensure that for all subsets length is correct and that we start on the - correct byte. Additionally check that no copies were made. */ - for (i = 0; i < length; i++) { - head = gpr_slice_ref(slice); - tail = gpr_slice_split_tail(&head, i); - check_head_tail(slice, head, tail); - gpr_slice_unref(tail); - gpr_slice_unref(head); - } - - gpr_slice_unref(slice); -} - -static void test_slice_from_copied_string_works(void) { - static const char *text = "HELLO WORLD!"; - gpr_slice slice; - - LOG_TEST_NAME("test_slice_from_copied_string_works"); - - slice = gpr_slice_from_copied_string(text); - GPR_ASSERT(strlen(text) == GPR_SLICE_LENGTH(slice)); - GPR_ASSERT(0 == - memcmp(text, GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice))); - gpr_slice_unref(slice); -} - -int main(int argc, char **argv) { - unsigned length; - grpc_test_init(argc, argv); - test_slice_malloc_returns_something_sensible(); - test_slice_new_returns_something_sensible(); - test_slice_new_with_user_data(); - test_slice_new_with_len_returns_something_sensible(); - for (length = 0; length < 128; length++) { - test_slice_sub_works(length); - test_slice_split_head_works(length); - test_slice_split_tail_works(length); - } - test_slice_from_copied_string_works(); - return 0; -} diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c index 378e45a942..53709ed6f7 100644 --- a/test/core/support/string_test.c +++ b/test/core/support/string_test.c @@ -76,34 +76,6 @@ static void test_dump(void) { expect_dump("ab", 2, GPR_DUMP_HEX | GPR_DUMP_ASCII, "61 62 'ab'"); } -static void expect_slice_dump(gpr_slice slice, uint32_t flags, - const char *result) { - char *got = gpr_dump_slice(slice, flags); - GPR_ASSERT(0 == strcmp(got, result)); - gpr_free(got); - gpr_slice_unref(slice); -} - -static void test_dump_slice(void) { - static const char *text = "HELLO WORLD!"; - static const char *long_text = - "It was a bright cold day in April, and the clocks were striking " - "thirteen. Winston Smith, his chin nuzzled into his breast in an effort " - "to escape the vile wind, slipped quickly through the glass doors of " - "Victory Mansions, though not quickly enough to prevent a swirl of " - "gritty dust from entering along with him."; - - LOG_TEST_NAME("test_dump_slice"); - - expect_slice_dump(gpr_slice_from_copied_string(text), GPR_DUMP_ASCII, text); - expect_slice_dump(gpr_slice_from_copied_string(long_text), GPR_DUMP_ASCII, - long_text); - expect_slice_dump(gpr_slice_from_copied_buffer("\x01", 1), GPR_DUMP_HEX, - "01"); - expect_slice_dump(gpr_slice_from_copied_buffer("\x01", 1), - GPR_DUMP_HEX | GPR_DUMP_ASCII, "01 '.'"); -} - static void test_pu32_fail(const char *s) { uint32_t out; GPR_ASSERT(!gpr_parse_bytes_to_uint32(s, strlen(s), &out)); @@ -221,72 +193,6 @@ static void test_strjoin_sep(void) { gpr_free(joined); } -static void test_strsplit(void) { - gpr_slice_buffer *parts; - gpr_slice str; - - LOG_TEST_NAME("test_strsplit"); - - parts = gpr_malloc(sizeof(gpr_slice_buffer)); - gpr_slice_buffer_init(parts); - - str = gpr_slice_from_copied_string("one, two, three, four"); - gpr_slice_split(str, ", ", parts); - GPR_ASSERT(4 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "one")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[1], "two")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[2], "three")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[3], "four")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - /* separator not present in string */ - str = gpr_slice_from_copied_string("one two three four"); - gpr_slice_split(str, ", ", parts); - GPR_ASSERT(1 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "one two three four")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - /* separator at the end */ - str = gpr_slice_from_copied_string("foo,"); - gpr_slice_split(str, ",", parts); - GPR_ASSERT(2 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "foo")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[1], "")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - /* separator at the beginning */ - str = gpr_slice_from_copied_string(",foo"); - gpr_slice_split(str, ",", parts); - GPR_ASSERT(2 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[1], "foo")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - /* standalone separator */ - str = gpr_slice_from_copied_string(","); - gpr_slice_split(str, ",", parts); - GPR_ASSERT(2 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[1], "")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - /* empty input */ - str = gpr_slice_from_copied_string(""); - gpr_slice_split(str, ", ", parts); - GPR_ASSERT(1 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - gpr_slice_buffer_destroy(parts); - gpr_free(parts); -} - static void test_ltoa() { char *str; char buf[GPR_LTOA_MIN_BUFSIZE]; diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index 1ab1a06211..eafeb04b11 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -49,102 +49,102 @@ #define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x) static void test_read_one_slice(void) { - gpr_slice slice; + grpc_slice slice; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; - gpr_slice first_slice, second_slice; + grpc_slice first_slice, second_slice; int first_code, second_code; LOG_TEST("test_read_one_slice"); - slice = gpr_slice_from_copied_string("test"); + slice = grpc_slice_from_copied_string("test"); buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); - gpr_slice_unref(first_slice); + grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); grpc_byte_buffer_destroy(buffer); } static void test_read_one_slice_malloc(void) { - gpr_slice slice; + grpc_slice slice; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; - gpr_slice first_slice, second_slice; + grpc_slice first_slice, second_slice; int first_code, second_code; LOG_TEST("test_read_one_slice_malloc"); - slice = gpr_slice_malloc(4); + slice = grpc_slice_malloc(4); memcpy(GPR_SLICE_START_PTR(slice), "test", 4); buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); - gpr_slice_unref(first_slice); + grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); grpc_byte_buffer_destroy(buffer); } static void test_read_none_compressed_slice(void) { - gpr_slice slice; + grpc_slice slice; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; - gpr_slice first_slice, second_slice; + grpc_slice first_slice, second_slice; int first_code, second_code; LOG_TEST("test_read_none_compressed_slice"); - slice = gpr_slice_from_copied_string("test"); + slice = grpc_slice_from_copied_string("test"); buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); - gpr_slice_unref(first_slice); + grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); grpc_byte_buffer_destroy(buffer); } static void test_read_corrupted_slice(void) { - gpr_slice slice; + grpc_slice slice; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; LOG_TEST("test_read_corrupted_slice"); - slice = gpr_slice_from_copied_string("test"); + slice = grpc_slice_from_copied_string("test"); buffer = grpc_raw_byte_buffer_create(&slice, 1); buffer->data.raw.compression = GRPC_COMPRESS_GZIP; /* lies! */ - gpr_slice_unref(slice); + grpc_slice_unref(slice); GPR_ASSERT(!grpc_byte_buffer_reader_init(&reader, buffer)); grpc_byte_buffer_destroy(buffer); } static void read_compressed_slice(grpc_compression_algorithm algorithm, size_t input_size) { - gpr_slice input_slice; - gpr_slice_buffer sliceb_in; - gpr_slice_buffer sliceb_out; + grpc_slice input_slice; + grpc_slice_buffer sliceb_in; + grpc_slice_buffer sliceb_out; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; - gpr_slice read_slice; + grpc_slice read_slice; size_t read_count = 0; - gpr_slice_buffer_init(&sliceb_in); - gpr_slice_buffer_init(&sliceb_out); + grpc_slice_buffer_init(&sliceb_in); + grpc_slice_buffer_init(&sliceb_out); - input_slice = gpr_slice_malloc(input_size); + input_slice = grpc_slice_malloc(input_size); memset(GPR_SLICE_START_PTR(input_slice), 'a', input_size); - gpr_slice_buffer_add(&sliceb_in, input_slice); /* takes ownership */ + grpc_slice_buffer_add(&sliceb_in, input_slice); /* takes ownership */ GPR_ASSERT(grpc_msg_compress(algorithm, &sliceb_in, &sliceb_out)); buffer = grpc_raw_compressed_byte_buffer_create(sliceb_out.slices, @@ -157,13 +157,13 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm, GPR_SLICE_START_PTR(input_slice) + read_count, GPR_SLICE_LENGTH(read_slice)) == 0); read_count += GPR_SLICE_LENGTH(read_slice); - gpr_slice_unref(read_slice); + grpc_slice_unref(read_slice); } GPR_ASSERT(read_count == input_size); grpc_byte_buffer_reader_destroy(&reader); grpc_byte_buffer_destroy(buffer); - gpr_slice_buffer_destroy(&sliceb_out); - gpr_slice_buffer_destroy(&sliceb_in); + grpc_slice_buffer_destroy(&sliceb_out); + grpc_slice_buffer_destroy(&sliceb_in); } static void test_read_gzip_compressed_slice(void) { @@ -179,15 +179,15 @@ static void test_read_deflate_compressed_slice(void) { } static void test_byte_buffer_from_reader(void) { - gpr_slice slice; + grpc_slice slice; grpc_byte_buffer *buffer, *buffer_from_reader; grpc_byte_buffer_reader reader; LOG_TEST("test_byte_buffer_from_reader"); - slice = gpr_slice_malloc(4); + slice = grpc_slice_malloc(4); memcpy(GPR_SLICE_START_PTR(slice), "test", 4); buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); @@ -206,24 +206,24 @@ static void test_byte_buffer_from_reader(void) { static void test_readall(void) { char *lotsa_as[512]; char *lotsa_bs[1024]; - gpr_slice slices[2]; + grpc_slice slices[2]; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; - gpr_slice slice_out; + grpc_slice slice_out; LOG_TEST("test_readall"); memset(lotsa_as, 'a', 512); memset(lotsa_bs, 'b', 1024); /* use slices large enough to overflow inlining */ - slices[0] = gpr_slice_malloc(512); + slices[0] = grpc_slice_malloc(512); memcpy(GPR_SLICE_START_PTR(slices[0]), lotsa_as, 512); - slices[1] = gpr_slice_malloc(1024); + slices[1] = grpc_slice_malloc(1024); memcpy(GPR_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); buffer = grpc_raw_byte_buffer_create(slices, 2); - gpr_slice_unref(slices[0]); - gpr_slice_unref(slices[1]); + grpc_slice_unref(slices[0]); + grpc_slice_unref(slices[1]); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); @@ -233,32 +233,32 @@ static void test_readall(void) { GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); GPR_ASSERT(memcmp(&(GPR_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == 0); - gpr_slice_unref(slice_out); + grpc_slice_unref(slice_out); grpc_byte_buffer_destroy(buffer); } static void test_byte_buffer_copy(void) { char *lotsa_as[512]; char *lotsa_bs[1024]; - gpr_slice slices[2]; + grpc_slice slices[2]; grpc_byte_buffer *buffer; grpc_byte_buffer *copied_buffer; grpc_byte_buffer_reader reader; - gpr_slice slice_out; + grpc_slice slice_out; LOG_TEST("test_byte_buffer_copy"); memset(lotsa_as, 'a', 512); memset(lotsa_bs, 'b', 1024); /* use slices large enough to overflow inlining */ - slices[0] = gpr_slice_malloc(512); + slices[0] = grpc_slice_malloc(512); memcpy(GPR_SLICE_START_PTR(slices[0]), lotsa_as, 512); - slices[1] = gpr_slice_malloc(1024); + slices[1] = grpc_slice_malloc(1024); memcpy(GPR_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); buffer = grpc_raw_byte_buffer_create(slices, 2); - gpr_slice_unref(slices[0]); - gpr_slice_unref(slices[1]); + grpc_slice_unref(slices[0]); + grpc_slice_unref(slices[1]); copied_buffer = grpc_byte_buffer_copy(buffer); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && @@ -269,7 +269,7 @@ static void test_byte_buffer_copy(void) { GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); GPR_ASSERT(memcmp(&(GPR_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == 0); - gpr_slice_unref(slice_out); + grpc_slice_unref(slice_out); grpc_byte_buffer_destroy(buffer); grpc_byte_buffer_destroy(copied_buffer); } diff --git a/test/core/transport/chttp2/bin_decoder_test.c b/test/core/transport/chttp2/bin_decoder_test.c index c4e6cd332f..3b111934ad 100644 --- a/test/core/transport/chttp2/bin_decoder_test.c +++ b/test/core/transport/chttp2/bin_decoder_test.c @@ -42,9 +42,9 @@ static int all_ok = 1; -static void expect_slice_eq(gpr_slice expected, gpr_slice slice, char *debug, +static void expect_slice_eq(grpc_slice expected, grpc_slice slice, char *debug, int line) { - if (0 != gpr_slice_cmp(slice, expected)) { + if (0 != grpc_slice_cmp(slice, expected)) { char *hs = gpr_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *he = gpr_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "FAILED:%d: %s\ngot: %s\nwant: %s", line, debug, hs, @@ -53,35 +53,35 @@ static void expect_slice_eq(gpr_slice expected, gpr_slice slice, char *debug, gpr_free(he); all_ok = 0; } - gpr_slice_unref(expected); - gpr_slice_unref(slice); + grpc_slice_unref(expected); + grpc_slice_unref(slice); } -static gpr_slice base64_encode(const char *s) { - gpr_slice ss = gpr_slice_from_copied_string(s); - gpr_slice out = grpc_chttp2_base64_encode(ss); - gpr_slice_unref(ss); +static grpc_slice base64_encode(const char *s) { + grpc_slice ss = grpc_slice_from_copied_string(s); + grpc_slice out = grpc_chttp2_base64_encode(ss); + grpc_slice_unref(ss); return out; } -static gpr_slice base64_decode(const char *s) { - gpr_slice ss = gpr_slice_from_copied_string(s); - gpr_slice out = grpc_chttp2_base64_decode(ss); - gpr_slice_unref(ss); +static grpc_slice base64_decode(const char *s) { + grpc_slice ss = grpc_slice_from_copied_string(s); + grpc_slice out = grpc_chttp2_base64_decode(ss); + grpc_slice_unref(ss); return out; } -static gpr_slice base64_decode_with_length(const char *s, +static grpc_slice base64_decode_with_length(const char *s, size_t output_length) { - gpr_slice ss = gpr_slice_from_copied_string(s); - gpr_slice out = grpc_chttp2_base64_decode_with_length(ss, output_length); - gpr_slice_unref(ss); + grpc_slice ss = grpc_slice_from_copied_string(s); + grpc_slice out = grpc_chttp2_base64_decode_with_length(ss, output_length); + grpc_slice_unref(ss); return out; } #define EXPECT_SLICE_EQ(expected, slice) \ expect_slice_eq( \ - gpr_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ + grpc_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ #slice, __LINE__); #define ENCODE_AND_DECODE(s) \ diff --git a/test/core/transport/chttp2/bin_encoder_test.c b/test/core/transport/chttp2/bin_encoder_test.c index 08d10735a5..f7df4452ce 100644 --- a/test/core/transport/chttp2/bin_encoder_test.c +++ b/test/core/transport/chttp2/bin_encoder_test.c @@ -45,9 +45,9 @@ static int all_ok = 1; -static void expect_slice_eq(gpr_slice expected, gpr_slice slice, char *debug, +static void expect_slice_eq(grpc_slice expected, grpc_slice slice, char *debug, int line) { - if (0 != gpr_slice_cmp(slice, expected)) { + if (0 != grpc_slice_cmp(slice, expected)) { char *hs = gpr_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *he = gpr_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "FAILED:%d: %s\ngot: %s\nwant: %s", line, debug, hs, @@ -56,35 +56,35 @@ static void expect_slice_eq(gpr_slice expected, gpr_slice slice, char *debug, gpr_free(he); all_ok = 0; } - gpr_slice_unref(expected); - gpr_slice_unref(slice); + grpc_slice_unref(expected); + grpc_slice_unref(slice); } -static gpr_slice B64(const char *s) { - gpr_slice ss = gpr_slice_from_copied_string(s); - gpr_slice out = grpc_chttp2_base64_encode(ss); - gpr_slice_unref(ss); +static grpc_slice B64(const char *s) { + grpc_slice ss = grpc_slice_from_copied_string(s); + grpc_slice out = grpc_chttp2_base64_encode(ss); + grpc_slice_unref(ss); return out; } -static gpr_slice HUFF(const char *s) { - gpr_slice ss = gpr_slice_from_copied_string(s); - gpr_slice out = grpc_chttp2_huffman_compress(ss); - gpr_slice_unref(ss); +static grpc_slice HUFF(const char *s) { + grpc_slice ss = grpc_slice_from_copied_string(s); + grpc_slice out = grpc_chttp2_huffman_compress(ss); + grpc_slice_unref(ss); return out; } #define EXPECT_SLICE_EQ(expected, slice) \ expect_slice_eq( \ - gpr_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ + grpc_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ #slice, __LINE__); static void expect_combined_equiv(const char *s, size_t len, int line) { - gpr_slice input = gpr_slice_from_copied_buffer(s, len); - gpr_slice base64 = grpc_chttp2_base64_encode(input); - gpr_slice expect = grpc_chttp2_huffman_compress(base64); - gpr_slice got = grpc_chttp2_base64_encode_and_huffman_compress_impl(input); - if (0 != gpr_slice_cmp(expect, got)) { + grpc_slice input = grpc_slice_from_copied_buffer(s, len); + grpc_slice base64 = grpc_chttp2_base64_encode(input); + grpc_slice expect = grpc_chttp2_huffman_compress(base64); + grpc_slice got = grpc_chttp2_base64_encode_and_huffman_compress_impl(input); + if (0 != grpc_slice_cmp(expect, got)) { char *t = gpr_dump_slice(input, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *e = gpr_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *g = gpr_dump_slice(got, GPR_DUMP_HEX | GPR_DUMP_ASCII); @@ -95,10 +95,10 @@ static void expect_combined_equiv(const char *s, size_t len, int line) { gpr_free(g); all_ok = 0; } - gpr_slice_unref(input); - gpr_slice_unref(base64); - gpr_slice_unref(expect); - gpr_slice_unref(got); + grpc_slice_unref(input); + grpc_slice_unref(base64); + grpc_slice_unref(expect); + grpc_slice_unref(got); } #define EXPECT_COMBINED_EQUIV(x) \ diff --git a/test/core/transport/chttp2/hpack_encoder_test.c b/test/core/transport/chttp2/hpack_encoder_test.c index 1c1c74879b..2b4279673a 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.c +++ b/test/core/transport/chttp2/hpack_encoder_test.c @@ -60,9 +60,9 @@ size_t cap_to_delete = 0; hexstring passed in */ static void verify(size_t window_available, int eof, size_t expect_window_used, const char *expected, size_t nheaders, ...) { - gpr_slice_buffer output; - gpr_slice merged; - gpr_slice expect = parse_hexstring(expected); + grpc_slice_buffer output; + grpc_slice merged; + grpc_slice expect = parse_hexstring(expected); size_t i; va_list l; grpc_linked_mdelem *e = gpr_malloc(sizeof(*e) * nheaders); @@ -93,17 +93,17 @@ static void verify(size_t window_available, int eof, size_t expect_window_used, } to_delete[num_to_delete++] = e; - gpr_slice_buffer_init(&output); + grpc_slice_buffer_init(&output); grpc_transport_one_way_stats stats; memset(&stats, 0, sizeof(stats)); grpc_chttp2_encode_header(&g_compressor, 0xdeadbeef, &b, eof, 16384, &stats, &output); merged = grpc_slice_merge(output.slices, output.count); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&output); grpc_metadata_batch_destroy(&b); - if (0 != gpr_slice_cmp(merged, expect)) { + if (0 != grpc_slice_cmp(merged, expect)) { char *expect_str = gpr_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *got_str = gpr_dump_slice(merged, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "mismatched output for %s", expected); @@ -114,8 +114,8 @@ static void verify(size_t window_available, int eof, size_t expect_window_used, g_failure = 1; } - gpr_slice_unref(merged); - gpr_slice_unref(expect); + grpc_slice_unref(merged); + grpc_slice_unref(expect); } static void test_basic_headers(void) { @@ -186,7 +186,7 @@ static void test_decode_table_overflow(void) { static void verify_table_size_change_match_elem_size(const char *key, const char *value) { - gpr_slice_buffer output; + grpc_slice_buffer output; grpc_mdelem *elem = grpc_mdelem_from_strings(key, value); size_t elem_size = grpc_mdelem_get_size_in_hpack_table(elem); size_t initial_table_size = g_compressor.table_size; @@ -198,13 +198,13 @@ static void verify_table_size_change_match_elem_size(const char *key, e[0].next = NULL; b.list.head = &e[0]; b.list.tail = &e[0]; - gpr_slice_buffer_init(&output); + grpc_slice_buffer_init(&output); grpc_transport_one_way_stats stats; memset(&stats, 0, sizeof(stats)); grpc_chttp2_encode_header(&g_compressor, 0xdeadbeef, &b, 0, 16384, &stats, &output); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&output); grpc_metadata_batch_destroy(&b); GPR_ASSERT(g_compressor.table_size == elem_size + initial_table_size); diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index 55b64f5d99..ffea0e19e2 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -52,16 +52,16 @@ static void onhdr(grpc_exec_ctx *exec_ctx, void *ud, grpc_mdelem *md) { GPR_ASSERT(ekey); evalue = va_arg(chk->args, char *); GPR_ASSERT(evalue); - GPR_ASSERT(gpr_slice_str_cmp(md->key->slice, ekey) == 0); - GPR_ASSERT(gpr_slice_str_cmp(md->value->slice, evalue) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md->key->slice, ekey) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md->value->slice, evalue) == 0); GRPC_MDELEM_UNREF(md); } static void test_vector(grpc_chttp2_hpack_parser *parser, grpc_slice_split_mode mode, const char *hexstring, ... /* char *key, char *value */) { - gpr_slice input = parse_hexstring(hexstring); - gpr_slice *slices; + grpc_slice input = parse_hexstring(hexstring); + grpc_slice *slices; size_t nslices; size_t i; test_checker chk; @@ -72,7 +72,7 @@ static void test_vector(grpc_chttp2_hpack_parser *parser, parser->on_header_user_data = &chk; grpc_split_slices(mode, &input, 1, &slices, &nslices); - gpr_slice_unref(input); + grpc_slice_unref(input); for (i = 0; i < nslices; i++) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -83,7 +83,7 @@ static void test_vector(grpc_chttp2_hpack_parser *parser, } for (i = 0; i < nslices; i++) { - gpr_slice_unref(slices[i]); + grpc_slice_unref(slices[i]); } gpr_free(slices); diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c index 75b0ef4629..1a7e2442ca 100644 --- a/test/core/transport/chttp2/hpack_table_test.c +++ b/test/core/transport/chttp2/hpack_table_test.c @@ -48,7 +48,7 @@ static void assert_str(const grpc_chttp2_hptbl *tbl, grpc_mdstr *mdstr, const char *str) { - GPR_ASSERT(gpr_slice_str_cmp(mdstr->slice, str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(mdstr->slice, str) == 0); } static void assert_index(const grpc_chttp2_hptbl *tbl, uint32_t idx, diff --git a/test/core/transport/chttp2/varint_test.c b/test/core/transport/chttp2/varint_test.c index 3552bf0c59..28cb404ce2 100644 --- a/test/core/transport/chttp2/varint_test.c +++ b/test/core/transport/chttp2/varint_test.c @@ -41,16 +41,16 @@ static void test_varint(uint32_t value, uint32_t prefix_bits, uint8_t prefix_or, const char *expect_bytes, size_t expect_length) { uint32_t nbytes = GRPC_CHTTP2_VARINT_LENGTH(value, prefix_bits); - gpr_slice expect = gpr_slice_from_copied_buffer(expect_bytes, expect_length); - gpr_slice slice; + grpc_slice expect = grpc_slice_from_copied_buffer(expect_bytes, expect_length); + grpc_slice slice; gpr_log(GPR_DEBUG, "Test: 0x%08x", value); GPR_ASSERT(nbytes == expect_length); - slice = gpr_slice_malloc(nbytes); + slice = grpc_slice_malloc(nbytes); GRPC_CHTTP2_WRITE_VARINT(value, prefix_bits, prefix_or, GPR_SLICE_START_PTR(slice), nbytes); - GPR_ASSERT(gpr_slice_cmp(expect, slice) == 0); - gpr_slice_unref(expect); - gpr_slice_unref(slice); + GPR_ASSERT(grpc_slice_cmp(expect, slice) == 0); + grpc_slice_unref(expect); + grpc_slice_unref(slice); } #define TEST_VARINT(value, prefix_bits, prefix_or, expect) \ diff --git a/test/core/transport/metadata_test.c b/test/core/transport/metadata_test.c index 007892930c..e47777ee72 100644 --- a/test/core/transport/metadata_test.c +++ b/test/core/transport/metadata_test.c @@ -68,8 +68,8 @@ static void test_create_string(void) { s3 = grpc_mdstr_from_string("very much not hello"); GPR_ASSERT(s1 == s2); GPR_ASSERT(s3 != s1); - GPR_ASSERT(gpr_slice_str_cmp(s1->slice, "hello") == 0); - GPR_ASSERT(gpr_slice_str_cmp(s3->slice, "very much not hello") == 0); + GPR_ASSERT(grpc_slice_str_cmp(s1->slice, "hello") == 0); + GPR_ASSERT(grpc_slice_str_cmp(s3->slice, "very much not hello") == 0); GRPC_MDSTR_UNREF(s1); GRPC_MDSTR_UNREF(s2); GRPC_MDSTR_UNREF(s3); @@ -89,9 +89,9 @@ static void test_create_metadata(void) { GPR_ASSERT(m3 != m1); GPR_ASSERT(m3->key == m1->key); GPR_ASSERT(m3->value != m1->value); - GPR_ASSERT(gpr_slice_str_cmp(m1->key->slice, "a") == 0); - GPR_ASSERT(gpr_slice_str_cmp(m1->value->slice, "b") == 0); - GPR_ASSERT(gpr_slice_str_cmp(m3->value->slice, "c") == 0); + GPR_ASSERT(grpc_slice_str_cmp(m1->key->slice, "a") == 0); + GPR_ASSERT(grpc_slice_str_cmp(m1->value->slice, "b") == 0); + GPR_ASSERT(grpc_slice_str_cmp(m3->value->slice, "c") == 0); GRPC_MDELEM_UNREF(m1); GRPC_MDELEM_UNREF(m2); GRPC_MDELEM_UNREF(m3); @@ -205,7 +205,7 @@ static void test_things_stick_around(void) { static void test_slices_work(void) { /* ensure no memory leaks when switching representation from mdstr to slice */ grpc_mdstr *str; - gpr_slice slice; + grpc_slice slice; LOG_TEST("test_slices_work"); @@ -213,14 +213,14 @@ static void test_slices_work(void) { str = grpc_mdstr_from_string( "123456789012345678901234567890123456789012345678901234567890"); - slice = gpr_slice_ref(str->slice); + slice = grpc_slice_ref(str->slice); GRPC_MDSTR_UNREF(str); - gpr_slice_unref(slice); + grpc_slice_unref(slice); str = grpc_mdstr_from_string( "123456789012345678901234567890123456789012345678901234567890"); - slice = gpr_slice_ref(str->slice); - gpr_slice_unref(slice); + slice = grpc_slice_ref(str->slice); + grpc_slice_unref(slice); GRPC_MDSTR_UNREF(str); grpc_shutdown(); @@ -228,8 +228,8 @@ static void test_slices_work(void) { static void test_base64_and_huffman_works(void) { grpc_mdstr *str; - gpr_slice slice1; - gpr_slice slice2; + grpc_slice slice1; + grpc_slice slice2; LOG_TEST("test_base64_and_huffman_works"); @@ -237,9 +237,9 @@ static void test_base64_and_huffman_works(void) { str = grpc_mdstr_from_string("abcdefg"); slice1 = grpc_mdstr_as_base64_encoded_and_huffman_compressed(str); slice2 = grpc_chttp2_base64_encode_and_huffman_compress(str->slice); - GPR_ASSERT(0 == gpr_slice_cmp(slice1, slice2)); + GPR_ASSERT(0 == grpc_slice_cmp(slice1, slice2)); - gpr_slice_unref(slice2); + grpc_slice_unref(slice2); GRPC_MDSTR_UNREF(str); grpc_shutdown(); } @@ -276,13 +276,13 @@ static void verify_binary_header_size(const char *key, const uint8_t *value, grpc_mdelem *elem = grpc_mdelem_from_string_and_buffer(key, value, value_len); GPR_ASSERT(grpc_is_binary_header(key, strlen(key))); size_t elem_size = grpc_mdelem_get_size_in_hpack_table(elem); - gpr_slice value_slice = - gpr_slice_from_copied_buffer((const char *)value, value_len); - gpr_slice base64_encoded = grpc_chttp2_base64_encode(value_slice); + grpc_slice value_slice = + grpc_slice_from_copied_buffer((const char *)value, value_len); + grpc_slice base64_encoded = grpc_chttp2_base64_encode(value_slice); size_t expected_size = 32 + strlen(key) + GPR_SLICE_LENGTH(base64_encoded); GPR_ASSERT(expected_size == elem_size); - gpr_slice_unref(value_slice); - gpr_slice_unref(base64_encoded); + grpc_slice_unref(value_slice); + grpc_slice_unref(base64_encoded); GRPC_MDELEM_UNREF(elem); } diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index 2b041a4484..6e09427c2b 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -42,19 +42,19 @@ typedef struct grpc_mock_endpoint { grpc_endpoint base; gpr_mu mu; int refs; - void (*on_write)(gpr_slice slice); - gpr_slice_buffer read_buffer; - gpr_slice_buffer *on_read_out; + void (*on_write)(grpc_slice slice); + grpc_slice_buffer read_buffer; + grpc_slice_buffer *on_read_out; grpc_closure *on_read; grpc_resource_user resource_user; } grpc_mock_endpoint; static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; gpr_mu_lock(&m->mu); if (m->read_buffer.count > 0) { - gpr_slice_buffer_swap(&m->read_buffer, slices); + grpc_slice_buffer_swap(&m->read_buffer, slices); grpc_exec_ctx_sched(exec_ctx, cb, GRPC_ERROR_NONE, NULL); } else { m->on_read = cb; @@ -64,7 +64,7 @@ static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, } static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; for (size_t i = 0; i < slices->count; i++) { m->on_write(slices->slices[i]); @@ -82,7 +82,7 @@ static void unref(grpc_exec_ctx *exec_ctx, grpc_mock_endpoint *m) { gpr_mu_lock(&m->mu); if (0 == --m->refs) { gpr_mu_unlock(&m->mu); - gpr_slice_buffer_destroy(&m->read_buffer); + grpc_slice_buffer_destroy(&m->read_buffer); grpc_resource_user_destroy(exec_ctx, &m->resource_user); gpr_free(m); } else { @@ -137,7 +137,7 @@ static const grpc_endpoint_vtable vtable = { me_get_peer, }; -grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), +grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(grpc_slice slice), grpc_resource_quota *resource_quota) { grpc_mock_endpoint *m = gpr_malloc(sizeof(*m)); m->base.vtable = &vtable; @@ -146,7 +146,7 @@ grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), gpr_asprintf(&name, "mock_endpoint_%" PRIxPTR, (intptr_t)m); grpc_resource_user_init(&m->resource_user, resource_quota, name); gpr_free(name); - gpr_slice_buffer_init(&m->read_buffer); + grpc_slice_buffer_init(&m->read_buffer); gpr_mu_init(&m->mu); m->on_write = on_write; m->on_read = NULL; @@ -154,15 +154,15 @@ grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), } void grpc_mock_endpoint_put_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice slice) { + grpc_slice slice) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; gpr_mu_lock(&m->mu); if (m->on_read != NULL) { - gpr_slice_buffer_add(m->on_read_out, slice); + grpc_slice_buffer_add(m->on_read_out, slice); grpc_exec_ctx_sched(exec_ctx, m->on_read, GRPC_ERROR_NONE, NULL); m->on_read = NULL; } else { - gpr_slice_buffer_add(&m->read_buffer, slice); + grpc_slice_buffer_add(&m->read_buffer, slice); } gpr_mu_unlock(&m->mu); } diff --git a/test/core/util/mock_endpoint.h b/test/core/util/mock_endpoint.h index b3a464ca01..8f8d2a412d 100644 --- a/test/core/util/mock_endpoint.h +++ b/test/core/util/mock_endpoint.h @@ -36,9 +36,9 @@ #include "src/core/lib/iomgr/endpoint.h" -grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), +grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(grpc_slice slice), grpc_resource_quota *resource_quota); void grpc_mock_endpoint_put_read(grpc_exec_ctx *exec_ctx, - grpc_endpoint *mock_endpoint, gpr_slice slice); + grpc_endpoint *mock_endpoint, grpc_slice slice); #endif diff --git a/test/core/util/one_corpus_entry_fuzzer.c b/test/core/util/one_corpus_entry_fuzzer.c index 95ae4cf706..a07e83b775 100644 --- a/test/core/util/one_corpus_entry_fuzzer.c +++ b/test/core/util/one_corpus_entry_fuzzer.c @@ -42,12 +42,12 @@ extern bool squelch; extern bool leak_check; int main(int argc, char **argv) { - gpr_slice buffer; + grpc_slice buffer; squelch = false; leak_check = false; GPR_ASSERT( GRPC_LOG_IF_ERROR("load_file", grpc_load_file(argv[1], 0, &buffer))); LLVMFuzzerTestOneInput(GPR_SLICE_START_PTR(buffer), GPR_SLICE_LENGTH(buffer)); - gpr_slice_unref(buffer); + grpc_slice_unref(buffer); return 0; } diff --git a/test/core/util/parse_hexstring.c b/test/core/util/parse_hexstring.c index 3ad7ce5828..91149a691a 100644 --- a/test/core/util/parse_hexstring.c +++ b/test/core/util/parse_hexstring.c @@ -34,12 +34,12 @@ #include "test/core/util/parse_hexstring.h" #include -gpr_slice parse_hexstring(const char *hexstring) { +grpc_slice parse_hexstring(const char *hexstring) { size_t nibbles = 0; const char *p = 0; uint8_t *out; uint8_t temp; - gpr_slice slice; + grpc_slice slice; for (p = hexstring; *p; p++) { nibbles += (*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f'); @@ -47,7 +47,7 @@ gpr_slice parse_hexstring(const char *hexstring) { GPR_ASSERT((nibbles & 1) == 0); - slice = gpr_slice_malloc(nibbles / 2); + slice = grpc_slice_malloc(nibbles / 2); out = GPR_SLICE_START_PTR(slice); nibbles = 0; diff --git a/test/core/util/parse_hexstring.h b/test/core/util/parse_hexstring.h index ddbfe541c6..bfdc23299a 100644 --- a/test/core/util/parse_hexstring.h +++ b/test/core/util/parse_hexstring.h @@ -36,6 +36,6 @@ #include -gpr_slice parse_hexstring(const char *hexstring); +grpc_slice parse_hexstring(const char *hexstring); #endif /* GRPC_TEST_CORE_UTIL_PARSE_HEXSTRING_H */ diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index ee6ef7da60..a5bac8aaa8 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -43,8 +43,8 @@ typedef struct passthru_endpoint passthru_endpoint; typedef struct { grpc_endpoint base; passthru_endpoint *parent; - gpr_slice_buffer read_buffer; - gpr_slice_buffer *on_read_out; + grpc_slice_buffer read_buffer; + grpc_slice_buffer *on_read_out; grpc_closure *on_read; grpc_resource_user resource_user; } half; @@ -58,14 +58,14 @@ struct passthru_endpoint { }; static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { half *m = (half *)ep; gpr_mu_lock(&m->parent->mu); if (m->parent->shutdown) { grpc_exec_ctx_sched(exec_ctx, cb, GRPC_ERROR_CREATE("Already shutdown"), NULL); } else if (m->read_buffer.count > 0) { - gpr_slice_buffer_swap(&m->read_buffer, slices); + grpc_slice_buffer_swap(&m->read_buffer, slices); grpc_exec_ctx_sched(exec_ctx, cb, GRPC_ERROR_NONE, NULL); } else { m->on_read = cb; @@ -80,7 +80,7 @@ static half *other_half(half *h) { } static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { half *m = other_half((half *)ep); gpr_mu_lock(&m->parent->mu); grpc_error *error = GRPC_ERROR_NONE; @@ -88,13 +88,13 @@ static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, error = GRPC_ERROR_CREATE("Endpoint already shutdown"); } else if (m->on_read != NULL) { for (size_t i = 0; i < slices->count; i++) { - gpr_slice_buffer_add(m->on_read_out, gpr_slice_ref(slices->slices[i])); + grpc_slice_buffer_add(m->on_read_out, grpc_slice_ref(slices->slices[i])); } grpc_exec_ctx_sched(exec_ctx, m->on_read, GRPC_ERROR_NONE, NULL); m->on_read = NULL; } else { for (size_t i = 0; i < slices->count; i++) { - gpr_slice_buffer_add(&m->read_buffer, gpr_slice_ref(slices->slices[i])); + grpc_slice_buffer_add(&m->read_buffer, grpc_slice_ref(slices->slices[i])); } } gpr_mu_unlock(&m->parent->mu); @@ -132,8 +132,8 @@ static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep, if (0 == --p->halves) { gpr_mu_unlock(&p->mu); gpr_mu_destroy(&p->mu); - gpr_slice_buffer_destroy(&p->client.read_buffer); - gpr_slice_buffer_destroy(&p->server.read_buffer); + grpc_slice_buffer_destroy(&p->client.read_buffer); + grpc_slice_buffer_destroy(&p->server.read_buffer); gpr_free(p); } else { gpr_mu_unlock(&p->mu); @@ -174,7 +174,7 @@ static void half_init(half *m, passthru_endpoint *parent, const char *half_name) { m->base.vtable = &vtable; m->parent = parent; - gpr_slice_buffer_init(&m->read_buffer); + grpc_slice_buffer_init(&m->read_buffer); m->on_read = NULL; char *name; gpr_asprintf(&name, "passthru_endpoint_%s_%" PRIxPTR, half_name, diff --git a/test/core/util/slice_splitter.c b/test/core/util/slice_splitter.c index 95b55a6505..6647b8fbb3 100644 --- a/test/core/util/slice_splitter.c +++ b/test/core/util/slice_splitter.c @@ -50,8 +50,8 @@ const char *grpc_slice_split_mode_name(grpc_slice_split_mode mode) { return "error"; } -void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, - size_t src_slice_count, gpr_slice **dst_slices, +void grpc_split_slices(grpc_slice_split_mode mode, grpc_slice *src_slices, + size_t src_slice_count, grpc_slice **dst_slices, size_t *dst_slice_count) { size_t i, j; size_t length; @@ -59,10 +59,10 @@ void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, switch (mode) { case GRPC_SLICE_SPLIT_IDENTITY: *dst_slice_count = src_slice_count; - *dst_slices = gpr_malloc(sizeof(gpr_slice) * src_slice_count); + *dst_slices = gpr_malloc(sizeof(grpc_slice) * src_slice_count); for (i = 0; i < src_slice_count; i++) { (*dst_slices)[i] = src_slices[i]; - gpr_slice_ref((*dst_slices)[i]); + grpc_slice_ref((*dst_slices)[i]); } break; case GRPC_SLICE_SPLIT_MERGE_ALL: @@ -71,8 +71,8 @@ void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, for (i = 0; i < src_slice_count; i++) { length += GPR_SLICE_LENGTH(src_slices[i]); } - *dst_slices = gpr_malloc(sizeof(gpr_slice)); - **dst_slices = gpr_slice_malloc(length); + *dst_slices = gpr_malloc(sizeof(grpc_slice)); + **dst_slices = grpc_slice_malloc(length); length = 0; for (i = 0; i < src_slice_count; i++) { memcpy(GPR_SLICE_START_PTR(**dst_slices) + length, @@ -87,11 +87,11 @@ void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, length += GPR_SLICE_LENGTH(src_slices[i]); } *dst_slice_count = length; - *dst_slices = gpr_malloc(sizeof(gpr_slice) * length); + *dst_slices = gpr_malloc(sizeof(grpc_slice) * length); length = 0; for (i = 0; i < src_slice_count; i++) { for (j = 0; j < GPR_SLICE_LENGTH(src_slices[i]); j++) { - (*dst_slices)[length] = gpr_slice_sub(src_slices[i], j, j + 1); + (*dst_slices)[length] = grpc_slice_sub(src_slices[i], j, j + 1); length++; } } @@ -100,25 +100,25 @@ void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, } void grpc_split_slices_to_buffer(grpc_slice_split_mode mode, - gpr_slice *src_slices, size_t src_slice_count, - gpr_slice_buffer *dst) { - gpr_slice *slices; + grpc_slice *src_slices, size_t src_slice_count, + grpc_slice_buffer *dst) { + grpc_slice *slices; size_t nslices; size_t i; grpc_split_slices(mode, src_slices, src_slice_count, &slices, &nslices); for (i = 0; i < nslices; i++) { /* add indexed to avoid re-merging split slices */ - gpr_slice_buffer_add_indexed(dst, slices[i]); + grpc_slice_buffer_add_indexed(dst, slices[i]); } gpr_free(slices); } -void grpc_split_slice_buffer(grpc_slice_split_mode mode, gpr_slice_buffer *src, - gpr_slice_buffer *dst) { +void grpc_split_slice_buffer(grpc_slice_split_mode mode, grpc_slice_buffer *src, + grpc_slice_buffer *dst) { grpc_split_slices_to_buffer(mode, src->slices, src->count, dst); } -gpr_slice grpc_slice_merge(gpr_slice *slices, size_t nslices) { +grpc_slice grpc_slice_merge(grpc_slice *slices, size_t nslices) { uint8_t *out = NULL; size_t length = 0; size_t capacity = 0; @@ -134,5 +134,5 @@ gpr_slice grpc_slice_merge(gpr_slice *slices, size_t nslices) { length += GPR_SLICE_LENGTH(slices[i]); } - return gpr_slice_new(out, length, gpr_free); + return grpc_slice_new(out, length, gpr_free); } diff --git a/test/core/util/slice_splitter.h b/test/core/util/slice_splitter.h index d030c2cb55..9e62dfa0f3 100644 --- a/test/core/util/slice_splitter.h +++ b/test/core/util/slice_splitter.h @@ -51,17 +51,17 @@ typedef enum { /* allocates *dst_slices; caller must unref all slices in dst_slices then free it */ -void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, - size_t src_slice_count, gpr_slice **dst_slices, +void grpc_split_slices(grpc_slice_split_mode mode, grpc_slice *src_slices, + size_t src_slice_count, grpc_slice **dst_slices, size_t *dst_slice_count); void grpc_split_slices_to_buffer(grpc_slice_split_mode mode, - gpr_slice *src_slices, size_t src_slice_count, - gpr_slice_buffer *dst); -void grpc_split_slice_buffer(grpc_slice_split_mode mode, gpr_slice_buffer *src, - gpr_slice_buffer *dst); + grpc_slice *src_slices, size_t src_slice_count, + grpc_slice_buffer *dst); +void grpc_split_slice_buffer(grpc_slice_split_mode mode, grpc_slice_buffer *src, + grpc_slice_buffer *dst); -gpr_slice grpc_slice_merge(gpr_slice *slices, size_t nslices); +grpc_slice grpc_slice_merge(grpc_slice *slices, size_t nslices); const char *grpc_slice_split_mode_name(grpc_slice_split_mode mode); diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index e67189c69e..fed5a2cce1 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -71,12 +71,12 @@ TEST_F(GrpclbTest, CreateRequest) { const grpc::string service_name = "AServiceName"; LoadBalanceRequest request; grpc_grpclb_request* c_req = grpc_grpclb_request_create(service_name.c_str()); - gpr_slice slice = grpc_grpclb_request_encode(c_req); + grpc_slice slice = grpc_grpclb_request_encode(c_req); const int num_bytes_written = GPR_SLICE_LENGTH(slice); EXPECT_GT(num_bytes_written, 0); request.ParseFromArray(GPR_SLICE_START_PTR(slice), num_bytes_written); EXPECT_EQ(request.initial_request().name(), service_name); - gpr_slice_unref(slice); + grpc_slice_unref(slice); grpc_grpclb_request_destroy(c_req); } @@ -88,15 +88,15 @@ TEST_F(GrpclbTest, ParseInitialResponse) { client_stats_report_interval->set_seconds(123); client_stats_report_interval->set_nanos(456); const grpc::string encoded_response = response.SerializeAsString(); - gpr_slice encoded_slice = - gpr_slice_from_copied_string(encoded_response.c_str()); + grpc_slice encoded_slice = + grpc_slice_from_copied_string(encoded_response.c_str()); grpc_grpclb_initial_response* c_initial_response = grpc_grpclb_initial_response_parse(encoded_slice); EXPECT_FALSE(c_initial_response->has_load_balancer_delegate); EXPECT_EQ(c_initial_response->client_stats_report_interval.seconds, 123); EXPECT_EQ(c_initial_response->client_stats_report_interval.nanos, 456); - gpr_slice_unref(encoded_slice); + grpc_slice_unref(encoded_slice); grpc_grpclb_initial_response_destroy(c_initial_response); } @@ -116,7 +116,7 @@ TEST_F(GrpclbTest, ParseResponseServerList) { expiration_interval->set_nanos(999); const grpc::string encoded_response = response.SerializeAsString(); - const gpr_slice encoded_slice = gpr_slice_from_copied_buffer( + const grpc_slice encoded_slice = grpc_slice_from_copied_buffer( encoded_response.data(), encoded_response.size()); grpc_grpclb_serverlist* c_serverlist = grpc_grpclb_response_parse_serverlist(encoded_slice); @@ -137,7 +137,7 @@ TEST_F(GrpclbTest, ParseResponseServerList) { EXPECT_TRUE(c_serverlist->expiration_interval.has_nanos); EXPECT_EQ(c_serverlist->expiration_interval.nanos, 999); - gpr_slice_unref(encoded_slice); + grpc_slice_unref(encoded_slice); grpc_grpclb_destroy_serverlist(c_serverlist); } diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index b6056f9ae4..a65e425625 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -109,7 +109,7 @@ typedef struct test_fixture { static void *tag(intptr_t t) { return (void *)t; } -static gpr_slice build_response_payload_slice( +static grpc_slice build_response_payload_slice( const char *host, int *ports, size_t nports, int64_t expiration_interval_secs, int32_t expiration_interval_nanos) { // server_list { @@ -148,7 +148,7 @@ static gpr_slice build_response_payload_slice( server->set_load_balance_token(token_data); } const grpc::string &enc_resp = response.SerializeAsString(); - return gpr_slice_from_copied_buffer(enc_resp.data(), enc_resp.size()); + return grpc_slice_from_copied_buffer(enc_resp.data(), enc_resp.size()); } static void drain_cq(grpc_completion_queue *cq) { @@ -210,17 +210,17 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports, // validate initial request. grpc_byte_buffer_reader bbr; grpc_byte_buffer_reader_init(&bbr, request_payload_recv); - gpr_slice request_payload_slice = grpc_byte_buffer_reader_readall(&bbr); + grpc_slice request_payload_slice = grpc_byte_buffer_reader_readall(&bbr); grpc::lb::v1::LoadBalanceRequest request; request.ParseFromArray(GPR_SLICE_START_PTR(request_payload_slice), GPR_SLICE_LENGTH(request_payload_slice)); GPR_ASSERT(request.has_initial_request()); GPR_ASSERT(request.initial_request().name() == sf->servers_hostport); - gpr_slice_unref(request_payload_slice); + grpc_slice_unref(request_payload_slice); grpc_byte_buffer_reader_destroy(&bbr); grpc_byte_buffer_destroy(request_payload_recv); - gpr_slice response_payload_slice; + grpc_slice response_payload_slice; op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -264,7 +264,7 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports, sf->servers_hostport, i); grpc_byte_buffer_destroy(response_payload); - gpr_slice_unref(response_payload_slice); + grpc_slice_unref(response_payload_slice); } gpr_log(GPR_INFO, "LB Server[%s] shutting down", sf->servers_hostport); @@ -355,7 +355,7 @@ static void start_backend_server(server_fixture *sf) { gpr_log(GPR_INFO, "Server[%s] after tag 101", sf->servers_hostport); bool exit = false; - gpr_slice response_payload_slice = gpr_slice_from_copied_string(PAYLOAD); + grpc_slice response_payload_slice = grpc_slice_from_copied_string(PAYLOAD); while (!exit) { op = ops; op->op = GRPC_OP_RECV_MESSAGE; @@ -414,7 +414,7 @@ static void start_backend_server(server_fixture *sf) { ++sf->num_calls_serviced; gpr_log(GPR_INFO, "Server[%s] OUT OF THE LOOP", sf->servers_hostport); - gpr_slice_unref(response_payload_slice); + grpc_slice_unref(response_payload_slice); op = ops; op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; @@ -456,7 +456,7 @@ static void perform_request(client_fixture *cf) { int i; memset(ops, 0, sizeof(ops)); - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); c = grpc_channel_create_call(cf->client, NULL, GRPC_PROPAGATE_DEFAULTS, cf->cq, "/foo", "foo.test.google.fr:1234", @@ -515,7 +515,7 @@ static void perform_request(client_fixture *cf) { grpc_byte_buffer_destroy(response_payload_recv); } - gpr_slice_unref(request_payload_slice); + grpc_slice_unref(request_payload_slice); op = ops; op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 9983c8a7b0..d63346a582 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -103,7 +103,7 @@ class ClientRequestCreator { if (payload_config.has_bytebuf_params()) { std::unique_ptr buf( new char[payload_config.bytebuf_params().req_size()]); - gpr_slice s = gpr_slice_from_copied_buffer( + grpc_slice s = grpc_slice_from_copied_buffer( buf.get(), payload_config.bytebuf_params().req_size()); Slice slice(s, Slice::STEAL_REF); *req = ByteBuffer(&slice, 1); diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index bc4c896d83..4fcdb4f083 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -380,7 +380,7 @@ static Status ProcessGenericRPC(const PayloadConfig &payload_config, ByteBuffer *response) { int resp_size = payload_config.bytebuf_params().resp_size(); std::unique_ptr buf(new char[resp_size]); - gpr_slice s = gpr_slice_from_copied_buffer(buf.get(), resp_size); + grpc_slice s = grpc_slice_from_copied_buffer(buf.get(), resp_size); Slice slice(s, Slice::STEAL_REF); *response = ByteBuffer(&slice, 1); return Status::OK; diff --git a/test/cpp/util/byte_buffer_proto_helper.cc b/test/cpp/util/byte_buffer_proto_helper.cc index d625d6f3f4..ab5ca261e6 100644 --- a/test/cpp/util/byte_buffer_proto_helper.cc +++ b/test/cpp/util/byte_buffer_proto_helper.cc @@ -51,7 +51,7 @@ std::unique_ptr SerializeToByteBuffer( grpc::protobuf::Message* message) { grpc::string buf; message->SerializeToString(&buf); - gpr_slice s = gpr_slice_from_copied_string(buf.c_str()); + grpc_slice s = grpc_slice_from_copied_string(buf.c_str()); Slice slice(s, Slice::STEAL_REF); return std::unique_ptr(new ByteBuffer(&slice, 1)); } diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc index 2089a62011..f66f471d7e 100644 --- a/test/cpp/util/byte_buffer_test.cc +++ b/test/cpp/util/byte_buffer_test.cc @@ -49,14 +49,14 @@ const char* kContent2 = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy world"; class ByteBufferTest : public ::testing::Test {}; TEST_F(ByteBufferTest, CreateFromSingleSlice) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); Slice s(hello, Slice::STEAL_REF); ByteBuffer buffer(&s, 1); } TEST_F(ByteBufferTest, CreateFromVector) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); - gpr_slice world = gpr_slice_from_copied_string(kContent2); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); + grpc_slice world = grpc_slice_from_copied_string(kContent2); std::vector slices; slices.push_back(Slice(hello, Slice::STEAL_REF)); slices.push_back(Slice(world, Slice::STEAL_REF)); @@ -64,15 +64,15 @@ TEST_F(ByteBufferTest, CreateFromVector) { } TEST_F(ByteBufferTest, Clear) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); Slice s(hello, Slice::STEAL_REF); ByteBuffer buffer(&s, 1); buffer.Clear(); } TEST_F(ByteBufferTest, Length) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); - gpr_slice world = gpr_slice_from_copied_string(kContent2); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); + grpc_slice world = grpc_slice_from_copied_string(kContent2); std::vector slices; slices.push_back(Slice(hello, Slice::STEAL_REF)); slices.push_back(Slice(world, Slice::STEAL_REF)); @@ -80,7 +80,7 @@ TEST_F(ByteBufferTest, Length) { EXPECT_EQ(strlen(kContent1) + strlen(kContent2), buffer.Length()); } -bool SliceEqual(const Slice& a, gpr_slice b) { +bool SliceEqual(const Slice& a, grpc_slice b) { if (a.size() != GPR_SLICE_LENGTH(b)) { return false; } @@ -93,8 +93,8 @@ bool SliceEqual(const Slice& a, gpr_slice b) { } TEST_F(ByteBufferTest, Dump) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); - gpr_slice world = gpr_slice_from_copied_string(kContent2); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); + grpc_slice world = grpc_slice_from_copied_string(kContent2); std::vector slices; slices.push_back(Slice(hello, Slice::STEAL_REF)); slices.push_back(Slice(world, Slice::STEAL_REF)); @@ -106,8 +106,8 @@ TEST_F(ByteBufferTest, Dump) { } TEST_F(ByteBufferTest, SerializationMakesCopy) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); - gpr_slice world = gpr_slice_from_copied_string(kContent2); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); + grpc_slice world = grpc_slice_from_copied_string(kContent2); std::vector slices; slices.push_back(Slice(hello, Slice::STEAL_REF)); slices.push_back(Slice(world, Slice::STEAL_REF)); diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc index 1edffbe08e..e36475bc9e 100644 --- a/test/cpp/util/cli_call.cc +++ b/test/cpp/util/cli_call.cc @@ -72,7 +72,7 @@ Status CliCall::Call(std::shared_ptr channel, cq.Next(&got_tag, &ok); GPR_ASSERT(ok); - gpr_slice s = gpr_slice_from_copied_string(request.c_str()); + grpc_slice s = grpc_slice_from_copied_string(request.c_str()); grpc::Slice req_slice(s, grpc::Slice::STEAL_REF); grpc::ByteBuffer send_buffer(&req_slice, 1); call->Write(send_buffer, tag(2)); diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index 45799ae157..3e50700303 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -51,15 +51,15 @@ class SliceTest : public ::testing::Test { }; TEST_F(SliceTest, Steal) { - gpr_slice s = gpr_slice_from_copied_string(kContent); + grpc_slice s = grpc_slice_from_copied_string(kContent); Slice spp(s, Slice::STEAL_REF); CheckSlice(spp, kContent); } TEST_F(SliceTest, Add) { - gpr_slice s = gpr_slice_from_copied_string(kContent); + grpc_slice s = grpc_slice_from_copied_string(kContent); Slice spp(s, Slice::ADD_REF); - gpr_slice_unref(s); + grpc_slice_unref(s); CheckSlice(spp, kContent); } @@ -69,13 +69,13 @@ TEST_F(SliceTest, Empty) { } TEST_F(SliceTest, Cslice) { - gpr_slice s = gpr_slice_from_copied_string(kContent); + grpc_slice s = grpc_slice_from_copied_string(kContent); Slice spp(s, Slice::STEAL_REF); CheckSlice(spp, kContent); - gpr_slice c_slice = spp.c_slice(); + grpc_slice c_slice = spp.c_slice(); EXPECT_EQ(GPR_SLICE_START_PTR(s), GPR_SLICE_START_PTR(c_slice)); EXPECT_EQ(GPR_SLICE_END_PTR(s), GPR_SLICE_END_PTR(c_slice)); - gpr_slice_unref(c_slice); + grpc_slice_unref(c_slice); } } // namespace diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 9a49c61480..9ae5627a77 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -754,7 +754,7 @@ "headers": [], "is_filegroup": false, "language": "c", - "name": "gpr_slice_buffer_test", + "name": "grpc_slice_buffer_test", "src": [ "test/core/support/slice_buffer_test.c" ], @@ -769,7 +769,7 @@ "headers": [], "is_filegroup": false, "language": "c", - "name": "gpr_slice_test", + "name": "grpc_slice_test", "src": [ "test/core/support/slice_test.c" ], diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index a1d59c0053..8713578f4a 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -815,7 +815,7 @@ "flaky": false, "gtest": false, "language": "c", - "name": "gpr_slice_buffer_test", + "name": "grpc_slice_buffer_test", "platforms": [ "linux", "mac", @@ -836,7 +836,7 @@ "flaky": false, "gtest": false, "language": "c", - "name": "gpr_slice_test", + "name": "grpc_slice_test", "platforms": [ "linux", "mac", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index b1918809bf..08feb72861 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -433,7 +433,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_percent_encoding_test", {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_slice_buffer_test", "vcxproj\test\gpr_slice_buffer_test\gpr_slice_buffer_test.vcxproj", "{E679773D-DE89-AEBB-9787-59019989B825}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_slice_buffer_test", "vcxproj\test\grpc_slice_buffer_test\grpc_slice_buffer_test.vcxproj", "{E679773D-DE89-AEBB-9787-59019989B825}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection @@ -442,7 +442,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_slice_buffer_test", "vc {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_slice_test", "vcxproj\test\gpr_slice_test\gpr_slice_test.vcxproj", "{7F2D1623-AF04-DD98-BCE6-61ADB9A52366}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_slice_test", "vcxproj\test\grpc_slice_test\grpc_slice_test.vcxproj", "{7F2D1623-AF04-DD98-BCE6-61ADB9A52366}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection diff --git a/vsprojects/vcxproj/test/gpr_slice_buffer_test/gpr_slice_buffer_test.vcxproj b/vsprojects/vcxproj/test/gpr_slice_buffer_test/gpr_slice_buffer_test.vcxproj index 33926ff116..6343575915 100644 --- a/vsprojects/vcxproj/test/gpr_slice_buffer_test/gpr_slice_buffer_test.vcxproj +++ b/vsprojects/vcxproj/test/gpr_slice_buffer_test/gpr_slice_buffer_test.vcxproj @@ -60,14 +60,14 @@ - gpr_slice_buffer_test + grpc_slice_buffer_test static Debug static Debug - gpr_slice_buffer_test + grpc_slice_buffer_test static Release static diff --git a/vsprojects/vcxproj/test/gpr_slice_test/gpr_slice_test.vcxproj b/vsprojects/vcxproj/test/gpr_slice_test/gpr_slice_test.vcxproj index bb2badc35c..bfd3468ff9 100644 --- a/vsprojects/vcxproj/test/gpr_slice_test/gpr_slice_test.vcxproj +++ b/vsprojects/vcxproj/test/gpr_slice_test/gpr_slice_test.vcxproj @@ -60,14 +60,14 @@ - gpr_slice_test + grpc_slice_test static Debug static Debug - gpr_slice_test + grpc_slice_test static Release static -- cgit v1.2.3 From b37d53ebc0414777e3999bcad820b174a24291a9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 16:16:35 -0700 Subject: Bulk update #includes --- include/grpc++/support/slice.h | 2 +- include/grpc/byte_buffer.h | 2 +- include/grpc/grpc.h | 2 +- include/grpc/slice_buffer.h | 2 +- src/core/ext/census/grpc_filter.c | 2 +- src/core/ext/client_channel/default_initial_connect_string.c | 2 +- src/core/ext/client_channel/http_connect_handshaker.c | 2 +- src/core/ext/client_channel/initial_connect_string.h | 2 +- src/core/ext/client_channel/uri_parser.c | 4 ++-- src/core/ext/lb_policy/grpclb/load_balancer_api.h | 2 +- src/core/ext/transport/chttp2/client/insecure/channel_create.c | 4 ++-- src/core/ext/transport/chttp2/client/secure/secure_channel_create.c | 4 ++-- src/core/ext/transport/chttp2/transport/bin_decoder.h | 2 +- src/core/ext/transport/chttp2/transport/bin_encoder.h | 2 +- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 2 +- src/core/ext/transport/chttp2/transport/frame.h | 2 +- src/core/ext/transport/chttp2/transport/frame_data.h | 4 ++-- src/core/ext/transport/chttp2/transport/frame_goaway.h | 4 ++-- src/core/ext/transport/chttp2/transport/frame_ping.h | 2 +- src/core/ext/transport/chttp2/transport/frame_rst_stream.h | 2 +- src/core/ext/transport/chttp2/transport/frame_settings.h | 2 +- src/core/ext/transport/chttp2/transport/frame_window_update.h | 2 +- src/core/ext/transport/chttp2/transport/hpack_encoder.h | 4 ++-- src/core/ext/transport/chttp2/transport/hpack_table.h | 2 +- src/core/ext/transport/cronet/transport/cronet_transport.c | 2 +- src/core/lib/channel/compress_filter.c | 2 +- src/core/lib/channel/connected_channel.c | 2 +- src/core/lib/compression/message_compress.h | 2 +- src/core/lib/http/format_request.c | 2 +- src/core/lib/http/format_request.h | 2 +- src/core/lib/http/parser.h | 2 +- src/core/lib/iomgr/endpoint.h | 4 ++-- src/core/lib/iomgr/load_file.h | 2 +- src/core/lib/iomgr/tcp_client_windows.c | 2 +- src/core/lib/iomgr/tcp_posix.c | 2 +- src/core/lib/iomgr/tcp_windows.c | 2 +- src/core/lib/security/credentials/jwt/json_token.h | 2 +- src/core/lib/security/credentials/jwt/jwt_verifier.h | 2 +- src/core/lib/security/transport/handshake.c | 2 +- src/core/lib/security/transport/secure_endpoint.c | 4 ++-- src/core/lib/security/transport/secure_endpoint.h | 2 +- src/core/lib/security/transport/security_connector.c | 2 +- src/core/lib/security/util/b64.h | 2 +- src/core/lib/slice/percent_encoding.h | 2 +- src/core/lib/slice/slice.c | 2 +- src/core/lib/slice/slice_buffer.c | 2 +- src/core/lib/slice/slice_string_helpers.h | 4 ++-- src/core/lib/support/env.h | 2 +- src/core/lib/support/string.h | 4 ++-- src/core/lib/support/tmpfile.h | 2 +- src/core/lib/surface/byte_buffer_reader.c | 2 +- src/core/lib/surface/call.c | 2 +- src/core/lib/transport/byte_stream.h | 2 +- src/core/lib/transport/metadata.h | 2 +- src/core/lib/transport/metadata_batch.h | 2 +- src/cpp/client/channel_cc.cc | 2 +- src/cpp/common/core_codegen.cc | 4 ++-- src/csharp/ext/grpc_csharp_ext.c | 2 +- src/php/ext/grpc/byte_buffer.c | 2 +- src/ruby/ext/grpc/rb_byte_buffer.c | 2 +- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 4 ++-- test/core/client_channel/set_initial_connect_string_test.c | 2 +- test/core/end2end/bad_server_response_test.c | 2 +- test/core/end2end/fixtures/http_proxy.c | 2 +- test/core/iomgr/endpoint_tests.c | 2 +- test/core/iomgr/load_file_test.c | 2 +- test/core/security/b64_test.c | 2 +- test/core/security/create_jwt.c | 2 +- test/core/security/fetch_oauth2.c | 2 +- test/core/security/json_token_test.c | 2 +- test/core/security/jwt_verifier_test.c | 2 +- test/core/security/oauth2_utils.c | 2 +- test/core/security/print_google_default_creds_token.c | 2 +- test/core/security/verify_jwt.c | 2 +- test/core/slice/slice_buffer_test.c | 2 +- test/core/slice/slice_test.c | 2 +- test/core/surface/byte_buffer_reader_test.c | 2 +- test/core/surface/public_headers_must_be_c89.c | 4 ++-- test/core/transport/chttp2/hpack_parser_test.c | 2 +- test/core/transport/chttp2/varint_test.c | 2 +- test/core/util/parse_hexstring.h | 2 +- test/core/util/slice_splitter.h | 4 ++-- test/cpp/util/byte_buffer_test.cc | 2 +- test/cpp/util/cli_call.cc | 2 +- test/cpp/util/slice_test.cc | 2 +- 85 files changed, 99 insertions(+), 99 deletions(-) (limited to 'src/core') diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index b06b1b69e5..699148ccda 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -35,7 +35,7 @@ #define GRPCXX_SUPPORT_SLICE_H #include -#include +#include namespace grpc { diff --git a/include/grpc/byte_buffer.h b/include/grpc/byte_buffer.h index 3cf31df0df..395ebef744 100644 --- a/include/grpc/byte_buffer.h +++ b/include/grpc/byte_buffer.h @@ -35,7 +35,7 @@ #define GRPC_BYTE_BUFFER_H #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index f8e442274e..23d15fdc0b 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h index bff0d76914..f7a2f58f8e 100644 --- a/include/grpc/slice_buffer.h +++ b/include/grpc/slice_buffer.h @@ -34,7 +34,7 @@ #ifndef GRPC_SUPPORT_SLICE_BUFFER_H #define GRPC_SUPPORT_SLICE_BUFFER_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index a4cf6f37bd..d84d715031 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/ext/census/census_interface.h" diff --git a/src/core/ext/client_channel/default_initial_connect_string.c b/src/core/ext/client_channel/default_initial_connect_string.c index 784173f0e2..da90677db2 100644 --- a/src/core/ext/client_channel/default_initial_connect_string.c +++ b/src/core/ext/client_channel/default_initial_connect_string.c @@ -31,7 +31,7 @@ * */ -#include +#include #include "src/core/lib/iomgr/sockaddr.h" void grpc_set_default_initial_connect_string(struct sockaddr **addr, diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 9c175af09a..d80f710b72 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include "src/core/ext/client_channel/uri_parser.h" diff --git a/src/core/ext/client_channel/initial_connect_string.h b/src/core/ext/client_channel/initial_connect_string.h index 4cfe8b5fe7..3c221d3d97 100644 --- a/src/core/ext/client_channel/initial_connect_string.h +++ b/src/core/ext/client_channel/initial_connect_string.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H #define GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H -#include +#include #include "src/core/lib/iomgr/sockaddr.h" typedef void (*grpc_set_initial_connect_string_func)(struct sockaddr **addr, diff --git a/src/core/ext/client_channel/uri_parser.c b/src/core/ext/client_channel/uri_parser.c index 7bdc5373d9..01c348f2df 100644 --- a/src/core/ext/client_channel/uri_parser.c +++ b/src/core/ext/client_channel/uri_parser.c @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include "src/core/lib/support/string.h" diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/lb_policy/grpclb/load_balancer_api.h index 235ccf6cb4..b4c967e426 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.h +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H #define GRPC_CORE_EXT_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H -#include +#include #include "src/core/ext/client_channel/lb_policy_factory.h" #include "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index eee38a0b90..0c4dbee8d9 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -37,8 +37,8 @@ #include #include -#include -#include +#include +#include #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index d396a1bc36..c135f69820 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -37,8 +37,8 @@ #include #include -#include -#include +#include +#include #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h index c416608a0b..5e00fd8143 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H -#include +#include #include struct grpc_base64_decode_context { diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h index 878390cde6..3d86a41a11 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H -#include +#include /* base64 encode a slice. Returns a new slice, does not take ownership of the input */ diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 3a551d449b..93c14217cc 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/src/core/ext/transport/chttp2/transport/frame.h b/src/core/ext/transport/chttp2/transport/frame.h index 1e444a91fd..0b3842b4a1 100644 --- a/src/core/ext/transport/chttp2/transport/frame.h +++ b/src/core/ext/transport/chttp2/transport/frame.h @@ -35,7 +35,7 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H #include -#include +#include #include "src/core/lib/iomgr/error.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h index 471f615c67..264ad14608 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.h +++ b/src/core/ext/transport/chttp2/transport/frame_data.h @@ -36,8 +36,8 @@ /* Parser for GRPC streams embedded in DATA frames */ -#include -#include +#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/transport/byte_stream.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h index c2b82d85b3..927b7fbd48 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.h +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h @@ -35,8 +35,8 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H #include -#include -#include +#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h index dcc95db4ca..b9889e2d11 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.h +++ b/src/core/ext/transport/chttp2/transport/frame_ping.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H -#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h index d837e95da4..f39002a3e9 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H -#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h index cb2c8de0a0..bbbecec518 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -35,7 +35,7 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H #include -#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h index b0f6a0a9d0..b5f40335a4 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.h +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H -#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h index abbd514fc2..9188d9c6c5 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -35,8 +35,8 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H #include -#include -#include +#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h index 45bd9255bf..bc5a2d2463 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_table.h @@ -35,7 +35,7 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H #include -#include +#include #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/metadata.h" diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 87b2c0880f..6f55b69c84 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index f797d82eb9..c42a81b3b5 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/compress_filter.h" diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 918379c845..2ae86f5507 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/lib/compression/message_compress.h b/src/core/lib/compression/message_compress.h index d28b5a36b3..448d36a863 100644 --- a/src/core/lib/compression/message_compress.h +++ b/src/core/lib/compression/message_compress.h @@ -35,7 +35,7 @@ #define GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H #include -#include +#include /* compress 'input' to 'output' using 'algorithm'. On success, appends compressed slices to output and returns 1. diff --git a/src/core/lib/http/format_request.c b/src/core/lib/http/format_request.c index 03f705ee97..59ff28f67f 100644 --- a/src/core/lib/http/format_request.c +++ b/src/core/lib/http/format_request.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include "src/core/lib/support/string.h" diff --git a/src/core/lib/http/format_request.h b/src/core/lib/http/format_request.h index 939401be48..ad51701bbb 100644 --- a/src/core/lib/http/format_request.h +++ b/src/core/lib/http/format_request.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H #define GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H -#include +#include #include "src/core/lib/http/httpcli.h" grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request); diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h index 102ffba05d..6d003cd68c 100644 --- a/src/core/lib/http/parser.h +++ b/src/core/lib/http/parser.h @@ -35,7 +35,7 @@ #define GRPC_CORE_LIB_HTTP_PARSER_H #include -#include +#include #include "src/core/lib/iomgr/error.h" /* Maximum length of a header string of the form 'Key: Value\r\n' */ diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index d05998ec85..bf211ca16a 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_ENDPOINT_H #define GRPC_CORE_LIB_IOMGR_ENDPOINT_H -#include -#include +#include +#include #include #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" diff --git a/src/core/lib/iomgr/load_file.h b/src/core/lib/iomgr/load_file.h index 31cec92cb1..73ee8c3abf 100644 --- a/src/core/lib/iomgr/load_file.h +++ b/src/core/lib/iomgr/load_file.h @@ -36,7 +36,7 @@ #include -#include +#include #include "src/core/lib/iomgr/error.h" diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 562cb9c6bf..c8a531f40a 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include "src/core/lib/iomgr/iocp_windows.h" diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 909237d84d..419d23de00 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -48,7 +48,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 6f63f80021..1ff6cdc5bc 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/core/lib/security/credentials/jwt/json_token.h b/src/core/lib/security/credentials/jwt/json_token.h index 07fc5bf0e0..c13eb55803 100644 --- a/src/core/lib/security/credentials/jwt/json_token.h +++ b/src/core/lib/security/credentials/jwt/json_token.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H -#include +#include #include #include "src/core/lib/json/json.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h index e05a9f1824..f09f9d5d47 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.h +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h @@ -37,7 +37,7 @@ #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/json/json.h" -#include +#include #include /* --- Constants. --- */ diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 2d33521d94..58d896b32e 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/transport/secure_endpoint.h" diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 865a0ec4cf..5497dea640 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -34,8 +34,8 @@ #include "src/core/lib/security/transport/secure_endpoint.h" #include #include -#include -#include +#include +#include #include #include "src/core/lib/debug/trace.h" #include "src/core/lib/profiling/timers.h" diff --git a/src/core/lib/security/transport/secure_endpoint.h b/src/core/lib/security/transport/secure_endpoint.h index 986e5e9f2e..a61f40a4fa 100644 --- a/src/core/lib/security/transport/secure_endpoint.h +++ b/src/core/lib/security/transport/secure_endpoint.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H #define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H -#include +#include #include "src/core/lib/iomgr/endpoint.h" struct tsi_frame_protector; diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 9de69f2288..cea94bfbba 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/ext/transport/chttp2/alpn/alpn.h" diff --git a/src/core/lib/security/util/b64.h b/src/core/lib/security/util/b64.h index f1b9bb2f2e..f3218b9c4f 100644 --- a/src/core/lib/security/util/b64.h +++ b/src/core/lib/security/util/b64.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_SECURITY_UTIL_B64_H #define GRPC_CORE_LIB_SECURITY_UTIL_B64_H -#include +#include /* Encodes data using base64. It is the caller's responsability to free the returned char * using gpr_free. Returns NULL on NULL input. */ diff --git a/src/core/lib/slice/percent_encoding.h b/src/core/lib/slice/percent_encoding.h index a560d74a79..3cb4a61423 100644 --- a/src/core/lib/slice/percent_encoding.h +++ b/src/core/lib/slice/percent_encoding.h @@ -43,7 +43,7 @@ #include -#include +#include /* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in gpr_percent_encode_slice, gpr_strict_percent_decode_slice). diff --git a/src/core/lib/slice/slice.c b/src/core/lib/slice/slice.c index 602dd86eca..1db1211938 100644 --- a/src/core/lib/slice/slice.c +++ b/src/core/lib/slice/slice.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include diff --git a/src/core/lib/slice/slice_buffer.c b/src/core/lib/slice/slice_buffer.c index c92797233d..a18309f3c4 100644 --- a/src/core/lib/slice/slice_buffer.c +++ b/src/core/lib/slice/slice_buffer.c @@ -32,7 +32,7 @@ */ #include -#include +#include #include diff --git a/src/core/lib/slice/slice_string_helpers.h b/src/core/lib/slice/slice_string_helpers.h index d144a70889..dea9a19025 100644 --- a/src/core/lib/slice/slice_string_helpers.h +++ b/src/core/lib/slice/slice_string_helpers.h @@ -36,9 +36,9 @@ #include +#include +#include #include -#include -#include #ifdef __cplusplus extern "C" { diff --git a/src/core/lib/support/env.h b/src/core/lib/support/env.h index ec3959bc6e..1a24216656 100644 --- a/src/core/lib/support/env.h +++ b/src/core/lib/support/env.h @@ -36,7 +36,7 @@ #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index 2cd908aad6..13891d0b9e 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -36,9 +36,9 @@ #include +#include +#include #include -#include -#include #ifdef __cplusplus extern "C" { diff --git a/src/core/lib/support/tmpfile.h b/src/core/lib/support/tmpfile.h index 059142ab0f..8952e5ec3d 100644 --- a/src/core/lib/support/tmpfile.h +++ b/src/core/lib/support/tmpfile.h @@ -36,7 +36,7 @@ #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index 9455709b4b..6bf3c01e65 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "src/core/lib/compression/message_compress.h" diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 06dc5f5942..653de714ae 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/core/lib/transport/byte_stream.h b/src/core/lib/transport/byte_stream.h index 8139782701..1fdd5b4d77 100644 --- a/src/core/lib/transport/byte_stream.h +++ b/src/core/lib/transport/byte_stream.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H #define GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H -#include +#include #include "src/core/lib/iomgr/exec_ctx.h" /** Internal bit flag for grpc_begin_message's \a flags signaling the use of diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 5875ffb323..c63bce8310 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_METADATA_H #define GRPC_CORE_LIB_TRANSPORT_METADATA_H -#include +#include #include #ifdef __cplusplus diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index 0424b4db98..1b5525e631 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include "src/core/lib/transport/metadata.h" diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc index 43b3875cb3..e18f9f527c 100644 --- a/src/cpp/client/channel_cc.cc +++ b/src/cpp/client/channel_cc.cc @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include "src/core/lib/profiling/timers.h" namespace grpc { diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index ad874bb369..fef8cc3d22 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -42,8 +42,8 @@ #include #include #include -#include -#include +#include +#include #include #include "src/core/lib/profiling/timers.h" diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 0f725f5e23..a178776d73 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/php/ext/grpc/byte_buffer.c b/src/php/ext/grpc/byte_buffer.c index 56fd11d09b..2d48841dfa 100644 --- a/src/php/ext/grpc/byte_buffer.c +++ b/src/php/ext/grpc/byte_buffer.c @@ -47,7 +47,7 @@ #include #include -#include +#include grpc_byte_buffer *string_to_byte_buffer(char *string, size_t length) { grpc_slice slice = grpc_slice_from_copied_buffer(string, length); diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index 511abe3fbe..f0bacc3d7c 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include "rb_grpc.h" grpc_byte_buffer* grpc_rb_s_to_byte_buffer(char *string, size_t length) { diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 30962a1c79..3f1821bfe0 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -54,8 +54,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/core/client_channel/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c index 350f2884d7..1f7dce3d87 100644 --- a/test/core/client_channel/set_initial_connect_string_test.c +++ b/test/core/client_channel/set_initial_connect_string_test.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include "src/core/ext/client_channel/initial_connect_string.h" diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index cb2030a7d7..04095807c4 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include // #include "src/core/ext/transport/chttp2/transport/internal.h" diff --git a/test/core/end2end/fixtures/http_proxy.c b/test/core/end2end/fixtures/http_proxy.c index 88c77a5168..3616fa2723 100644 --- a/test/core/end2end/fixtures/http_proxy.c +++ b/test/core/end2end/fixtures/http_proxy.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index 775c0a3e6b..86afdfba72 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include "test/core/util/test_config.h" diff --git a/test/core/iomgr/load_file_test.c b/test/core/iomgr/load_file_test.c index c7387fe7a4..b4e1b52d05 100644 --- a/test/core/iomgr/load_file_test.c +++ b/test/core/iomgr/load_file_test.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/support/string.h" diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c index f88be392a2..b5c123b4b8 100644 --- a/test/core/security/b64_test.c +++ b/test/core/security/b64_test.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include "test/core/util/test_config.h" static int buffers_are_equal(const unsigned char *buf1, diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c index 8b78dc5da5..157e78092d 100644 --- a/test/core/security/create_jwt.c +++ b/test/core/security/create_jwt.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include void create_jwt(const char *json_key_file_path, const char *service_url, const char *scope) { diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index aa3db9f398..95706a5b81 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/lib/iomgr/load_file.h" diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c index 162997662e..c5b0ae9425 100644 --- a/test/core/security/json_token_test.c +++ b/test/core/security/json_token_test.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "src/core/lib/json/json.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index ce2ee04c99..5c716235cd 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include "src/core/lib/http/httpcli.h" diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 3b774fecb6..92059bf270 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/lib/security/credentials/credentials.h" diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index a391c0876b..d239712426 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/lib/security/credentials/composite/composite_credentials.h" diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c index 728d2d637a..4d0ff242ea 100644 --- a/test/core/security/verify_jwt.c +++ b/test/core/security/verify_jwt.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/lib/security/credentials/jwt/jwt_verifier.h" diff --git a/test/core/slice/slice_buffer_test.c b/test/core/slice/slice_buffer_test.c index 9c55a5c473..4c26113d05 100644 --- a/test/core/slice/slice_buffer_test.c +++ b/test/core/slice/slice_buffer_test.c @@ -32,7 +32,7 @@ */ #include -#include +#include #include "test/core/util/test_config.h" void test_slice_buffer_add() { diff --git a/test/core/slice/slice_test.c b/test/core/slice/slice_test.c index c263fe27d6..19c4657cde 100644 --- a/test/core/slice/slice_test.c +++ b/test/core/slice/slice_test.c @@ -31,7 +31,7 @@ * */ -#include +#include #include diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index eafeb04b11..fe70f22c2b 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index 53bdf612fc..636a44f32a 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -60,8 +60,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index ffea0e19e2..a051dc8cf3 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include "test/core/util/parse_hexstring.h" #include "test/core/util/slice_splitter.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/varint_test.c b/test/core/transport/chttp2/varint_test.c index 28cb404ce2..0d9460afc1 100644 --- a/test/core/transport/chttp2/varint_test.c +++ b/test/core/transport/chttp2/varint_test.c @@ -34,7 +34,7 @@ #include "src/core/ext/transport/chttp2/transport/varint.h" #include -#include +#include #include "test/core/util/test_config.h" diff --git a/test/core/util/parse_hexstring.h b/test/core/util/parse_hexstring.h index bfdc23299a..32a4426812 100644 --- a/test/core/util/parse_hexstring.h +++ b/test/core/util/parse_hexstring.h @@ -34,7 +34,7 @@ #ifndef GRPC_TEST_CORE_UTIL_PARSE_HEXSTRING_H #define GRPC_TEST_CORE_UTIL_PARSE_HEXSTRING_H -#include +#include grpc_slice parse_hexstring(const char *hexstring); diff --git a/test/core/util/slice_splitter.h b/test/core/util/slice_splitter.h index 9e62dfa0f3..61628092b3 100644 --- a/test/core/util/slice_splitter.h +++ b/test/core/util/slice_splitter.h @@ -37,8 +37,8 @@ /* utility function to split/merge slices together to help create test cases */ -#include -#include +#include +#include typedef enum { /* merge all input slices into a single slice */ diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc index f66f471d7e..2630c76e87 100644 --- a/test/cpp/util/byte_buffer_test.cc +++ b/test/cpp/util/byte_buffer_test.cc @@ -37,7 +37,7 @@ #include #include -#include +#include #include namespace grpc { diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc index e36475bc9e..0517610f10 100644 --- a/test/cpp/util/cli_call.cc +++ b/test/cpp/util/cli_call.cc @@ -42,7 +42,7 @@ #include #include #include -#include +#include namespace grpc { namespace testing { diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index 3e50700303..df8179586a 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -33,7 +33,7 @@ #include -#include +#include #include namespace grpc { -- cgit v1.2.3 From 0f310807ffa59b3c8f0459c757372478d31c3c66 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 16:25:56 -0700 Subject: Update includes, s/gpr_dump_slice/grpc_dump_slice/g --- build.yaml | 4 ++-- src/core/ext/client_channel/uri_parser.c | 11 ++++++----- src/core/ext/lb_policy/grpclb/grpclb.c | 3 ++- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 3 ++- src/core/ext/transport/chttp2/transport/bin_decoder.c | 7 ++++--- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 9 +++++---- src/core/ext/transport/chttp2/transport/frame_data.c | 5 +++-- src/core/lib/iomgr/tcp_posix.c | 9 +++++---- .../credentials/google_default/google_default_credentials.c | 3 ++- src/core/lib/security/transport/secure_endpoint.c | 13 +++++++------ src/core/lib/slice/percent_encoding.c | 4 ++-- src/core/lib/slice/slice_string_helpers.c | 10 +++++++++- src/core/lib/slice/slice_string_helpers.h | 2 +- src/core/lib/surface/call.c | 9 +++++---- src/core/lib/transport/transport.c | 5 +++-- src/core/lib/transport/transport_op_string.c | 11 ++++++----- test/core/client_channel/set_initial_connect_string_test.c | 2 +- test/core/end2end/bad_server_response_test.c | 2 +- test/core/end2end/dualstack_socket_test.c | 2 +- test/core/end2end/fake_resolver.c | 3 ++- test/core/security/print_google_default_creds_token.c | 2 +- test/core/security/security_connector_test.c | 6 +++--- test/core/slice/percent_encoding_test.c | 8 ++++---- test/core/slice/slice_string_helpers_test.c | 2 +- test/core/support/string_test.c | 2 -- test/core/transport/chttp2/bin_decoder_test.c | 11 ++++++----- test/core/transport/chttp2/bin_encoder_test.c | 10 +++++----- test/core/transport/chttp2/hpack_encoder_test.c | 4 ++-- 28 files changed, 91 insertions(+), 71 deletions(-) (limited to 'src/core') diff --git a/build.yaml b/build.yaml index 799cd85c05..4513522237 100644 --- a/build.yaml +++ b/build.yaml @@ -1742,11 +1742,11 @@ targets: deps: - gpr_test_util - gpr -- name: gpr_percent_encoding_test +- name: percent_encoding_test build: test language: c src: - - test/core/support/percent_encoding_test.c + - test/core/slice/percent_encoding_test.c deps: - gpr_test_util - gpr diff --git a/src/core/ext/client_channel/uri_parser.c b/src/core/ext/client_channel/uri_parser.c index 01c348f2df..0fbc542ef8 100644 --- a/src/core/ext/client_channel/uri_parser.c +++ b/src/core/ext/client_channel/uri_parser.c @@ -35,13 +35,14 @@ #include +#include +#include #include #include #include -#include -#include #include +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" /** a size_t default value... maps to all 1's */ @@ -162,16 +163,16 @@ static void parse_query_parts(grpc_uri *uri) { uri->num_query_parts = query_parts.count; for (size_t i = 0; i < query_parts.count; i++) { grpc_slice_split(query_parts.slices[i], QUERY_PARTS_VALUE_SEPARATOR, - &query_param_parts); + &query_param_parts); GPR_ASSERT(query_param_parts.count > 0); uri->query_parts[i] = - gpr_dump_slice(query_param_parts.slices[0], GPR_DUMP_ASCII); + grpc_dump_slice(query_param_parts.slices[0], GPR_DUMP_ASCII); if (query_param_parts.count > 1) { /* TODO(dgq): only the first value after the separator is considered. * Perhaps all chars after the first separator for the query part should * be included, even if they include the separator. */ uri->query_parts_values[i] = - gpr_dump_slice(query_param_parts.slices[1], GPR_DUMP_ASCII); + grpc_dump_slice(query_param_parts.slices[1], GPR_DUMP_ASCII); } else { uri->query_parts_values[i] = NULL; } diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 3c2b87f2cb..3514d20655 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -116,6 +116,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/call.h" #include "src/core/lib/surface/channel.h" @@ -1135,7 +1136,7 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(serverlist == NULL); gpr_log(GPR_ERROR, "Invalid LB response received: '%s'", - gpr_dump_slice(response_slice, GPR_DUMP_ASCII)); + grpc_dump_slice(response_slice, GPR_DUMP_ASCII)); grpc_slice_unref(response_slice); /* Disconnect from server returning invalid response. */ diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index cd0c45e407..6f49c41700 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -45,6 +45,7 @@ #include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" typedef struct { @@ -178,7 +179,7 @@ static grpc_resolver *sockaddr_create(grpc_resolver_args *args, bool errors_found = false; for (size_t i = 0; i < addresses->num_addresses; i++) { grpc_uri ith_uri = *args->uri; - char *part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII); + char *part_str = grpc_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII); ith_uri.path = part_str; if (!parse( &ith_uri, diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.c b/src/core/ext/transport/chttp2/transport/bin_decoder.c index d8948bdfdb..f8db92dff5 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.c @@ -34,6 +34,7 @@ #include "src/core/ext/transport/chttp2/transport/bin_decoder.h" #include #include +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" static uint8_t decode_table[] = { @@ -175,7 +176,7 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { ctx.contains_tail = false; if (!grpc_base64_decode_partial(&ctx)) { - char *s = gpr_dump_slice(input, GPR_DUMP_ASCII); + char *s = grpc_dump_slice(input, GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "Base64 decoding failed, input string:\n%s\n", s); gpr_free(s); grpc_slice_unref(output); @@ -187,7 +188,7 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { } grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, - size_t output_length) { + size_t output_length) { size_t input_length = GPR_SLICE_LENGTH(input); grpc_slice output = grpc_slice_malloc(output_length); struct grpc_base64_decode_context ctx; @@ -220,7 +221,7 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, ctx.contains_tail = true; if (!grpc_base64_decode_partial(&ctx)) { - char *s = gpr_dump_slice(input, GPR_DUMP_ASCII); + char *s = grpc_dump_slice(input, GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "Base64 decoding failed, input string:\n%s\n", s); gpr_free(s); grpc_slice_unref(output); diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 93c14217cc..98190f7fb9 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -38,9 +38,9 @@ #include #include +#include #include #include -#include #include #include @@ -51,6 +51,7 @@ #include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/workqueue.h" #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/timeout_encoding.h" @@ -287,7 +288,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, if (is_client) { grpc_slice_buffer_add(&t->outbuf, grpc_slice_from_copied_string( - GRPC_CHTTP2_CLIENT_CONNECT_STRING)); + GRPC_CHTTP2_CLIENT_CONNECT_STRING)); grpc_chttp2_initiate_write(exec_ctx, t, false, "initial_write"); } @@ -757,7 +758,7 @@ void grpc_chttp2_add_incoming_goaway(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, uint32_t goaway_error, grpc_slice goaway_text) { - char *msg = gpr_dump_slice(goaway_text, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *msg = grpc_dump_slice(goaway_text, GPR_DUMP_HEX | GPR_DUMP_ASCII); GRPC_CHTTP2_IF_TRACING( gpr_log(GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg)); grpc_slice_unref(goaway_text); @@ -1673,7 +1674,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, if (optional_message) { grpc_slice_buffer_add(&t->qbuf, message_pfx); grpc_slice_buffer_add(&t->qbuf, - grpc_slice_from_copied_string(optional_message)); + grpc_slice_from_copied_string(optional_message)); } grpc_slice_buffer_add( &t->qbuf, grpc_chttp2_rst_stream_create(s->id, GRPC_CHTTP2_NO_ERROR, diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index 3081a03929..5700a01a9a 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -40,6 +40,7 @@ #include #include #include "src/core/ext/transport/chttp2/transport/internal.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/transport.h" @@ -176,7 +177,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, p->error = grpc_error_set_int(p->error, GRPC_ERROR_INT_STREAM_ID, (intptr_t)s->id); gpr_free(msg); - msg = gpr_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + msg = grpc_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); p->error = grpc_error_set_str(p->error, GRPC_ERROR_STR_RAW_BYTES, msg); gpr_free(msg); @@ -247,7 +248,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream_push( exec_ctx, p->parsing_frame, grpc_slice_sub(slice, (size_t)(cur - beg), - (size_t)(cur + p->frame_size - beg))); + (size_t)(cur + p->frame_size - beg))); grpc_chttp2_incoming_byte_stream_finished(exec_ctx, p->parsing_frame, GRPC_ERROR_NONE); p->parsing_frame = NULL; diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 419d23de00..a2a56d6972 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -46,9 +46,9 @@ #include #include +#include #include #include -#include #include #include #include @@ -56,6 +56,7 @@ #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #ifdef GPR_HAVE_MSG_NOSIGNAL @@ -191,8 +192,8 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, gpr_log(GPR_DEBUG, "read: error=%s", str); grpc_error_free_string(str); for (i = 0; i < tcp->incoming_buffer->count; i++) { - char *dump = gpr_dump_slice(tcp->incoming_buffer->slices[i], - GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *dump = grpc_dump_slice(tcp->incoming_buffer->slices[i], + GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, dump); gpr_free(dump); } @@ -451,7 +452,7 @@ static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, for (i = 0; i < buf->count; i++) { char *data = - gpr_dump_slice(buf->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); + grpc_dump_slice(buf->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data); gpr_free(data); } diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index b92f29a0d8..aaa82976fb 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -45,6 +45,7 @@ #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/api_trace.h" @@ -187,7 +188,7 @@ static grpc_error *create_default_creds_from_path( json = grpc_json_parse_string_with_len( (char *)GPR_SLICE_START_PTR(creds_data), GPR_SLICE_LENGTH(creds_data)); if (json == NULL) { - char *dump = gpr_dump_slice(creds_data, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *dump = grpc_dump_slice(creds_data, GPR_DUMP_HEX | GPR_DUMP_ASCII); error = grpc_error_set_str(GRPC_ERROR_CREATE("Failed to parse JSON"), GRPC_ERROR_STR_RAW_BYTES, dump); gpr_free(dump); diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 5497dea640..9acfd421a7 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -32,14 +32,15 @@ */ #include "src/core/lib/security/transport/secure_endpoint.h" -#include -#include #include #include +#include +#include #include #include "src/core/lib/debug/trace.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/security/transport/tsi_error.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/tsi/transport_security_interface.h" @@ -132,8 +133,8 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, if (grpc_trace_secure_endpoint) { size_t i; for (i = 0; i < ep->read_buffer->count; i++) { - char *data = gpr_dump_slice(ep->read_buffer->slices[i], - GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *data = grpc_dump_slice(ep->read_buffer->slices[i], + GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "READ %p: %s", ep, data); gpr_free(data); } @@ -262,7 +263,7 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, if (grpc_trace_secure_endpoint) { for (i = 0; i < slices->count; i++) { char *data = - gpr_dump_slice(slices->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); + grpc_dump_slice(slices->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "WRITE %p: %s", ep, data); gpr_free(data); } @@ -397,7 +398,7 @@ grpc_endpoint *grpc_secure_endpoint_create( grpc_slice_buffer_init(&ep->leftover_bytes); for (i = 0; i < leftover_nslices; i++) { grpc_slice_buffer_add(&ep->leftover_bytes, - grpc_slice_ref(leftover_slices[i])); + grpc_slice_ref(leftover_slices[i])); } ep->write_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); ep->read_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); diff --git a/src/core/lib/slice/percent_encoding.c b/src/core/lib/slice/percent_encoding.c index ae11e225e7..27a8f50a48 100644 --- a/src/core/lib/slice/percent_encoding.c +++ b/src/core/lib/slice/percent_encoding.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/support/percent_encoding.h" +#include "src/core/lib/slice/percent_encoding.h" #include @@ -50,7 +50,7 @@ static bool is_unreserved_character(uint8_t c, } grpc_slice gpr_percent_encode_slice(grpc_slice slice, - const uint8_t *unreserved_bytes) { + const uint8_t *unreserved_bytes) { static const uint8_t hex[] = "0123456789ABCDEF"; // first pass: count the number of bytes needed to output this string diff --git a/src/core/lib/slice/slice_string_helpers.c b/src/core/lib/slice/slice_string_helpers.c index cc8b80d3b8..eaffb63686 100644 --- a/src/core/lib/slice/slice_string_helpers.c +++ b/src/core/lib/slice/slice_string_helpers.c @@ -31,7 +31,15 @@ * */ -char *gpr_dump_slice(grpc_slice s, uint32_t flags) { +#include "src/core/lib/slice/slice_string_helpers.h" + +#include + +#include + +#include "src/core/lib/support/string.h" + +char *grpc_dump_slice(grpc_slice s, uint32_t flags) { return gpr_dump((const char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s), flags); } diff --git a/src/core/lib/slice/slice_string_helpers.h b/src/core/lib/slice/slice_string_helpers.h index dea9a19025..19625c66af 100644 --- a/src/core/lib/slice/slice_string_helpers.h +++ b/src/core/lib/slice/slice_string_helpers.h @@ -45,7 +45,7 @@ extern "C" { #endif /* Calls gpr_dump on a slice. */ -char *gpr_dump_slice(grpc_slice slice, uint32_t flags); +char *grpc_dump_slice(grpc_slice slice, uint32_t flags); /** Split \a str by the separator \a sep. Results are stored in \a dst, which * should be a properly initialized instance. */ diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 653de714ae..47f24ef58a 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -38,9 +38,9 @@ #include #include +#include #include #include -#include #include #include @@ -48,6 +48,7 @@ #include "src/core/lib/compression/algorithm_metadata.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/call.h" @@ -521,7 +522,7 @@ static void set_encodings_accepted_by_peer(grpc_call *call, grpc_mdelem *mdel) { GPR_BITSET(&call->encodings_accepted_by_peer, algorithm); } else { char *accept_encoding_entry_str = - gpr_dump_slice(*accept_encoding_entry_slice, GPR_DUMP_ASCII); + grpc_dump_slice(*accept_encoding_entry_slice, GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "Invalid entry in accept encoding metadata: '%s'. Ignoring.", accept_encoding_entry_str); @@ -1085,7 +1086,7 @@ static void continue_receiving_slices(grpc_exec_ctx *exec_ctx, &call->receiving_slice, remaining, &call->receiving_slice_ready)) { grpc_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, - call->receiving_slice); + call->receiving_slice); } else { return; } @@ -1099,7 +1100,7 @@ static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp, if (error == GRPC_ERROR_NONE) { grpc_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, - call->receiving_slice); + call->receiving_slice); continue_receiving_slices(exec_ctx, bctl); } else { if (grpc_trace_operation_failures) { diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 3ca85b12e9..866cd9ea87 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -40,6 +40,7 @@ #include #include +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/transport_impl.h" @@ -217,7 +218,7 @@ void grpc_transport_stream_op_add_cancellation_with_message( } grpc_error *error; if (optional_message != NULL) { - char *msg = gpr_dump_slice(*optional_message, GPR_DUMP_ASCII); + char *msg = grpc_dump_slice(*optional_message, GPR_DUMP_ASCII); error = grpc_error_set_str(GRPC_ERROR_CREATE(msg), GRPC_ERROR_STR_GRPC_MESSAGE, msg); gpr_free(msg); @@ -242,7 +243,7 @@ void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, } grpc_error *error; if (optional_message != NULL) { - char *msg = gpr_dump_slice(*optional_message, GPR_DUMP_ASCII); + char *msg = grpc_dump_slice(*optional_message, GPR_DUMP_ASCII); error = grpc_error_set_str(GRPC_ERROR_CREATE(msg), GRPC_ERROR_STR_GRPC_MESSAGE, msg); gpr_free(msg); diff --git a/src/core/lib/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.c index 533ec52077..58d6ad508e 100644 --- a/src/core/lib/transport/transport_op_string.c +++ b/src/core/lib/transport/transport_op_string.c @@ -40,6 +40,7 @@ #include #include #include +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/connectivity_state.h" @@ -48,12 +49,12 @@ static void put_metadata(gpr_strvec *b, grpc_mdelem *md) { gpr_strvec_add(b, gpr_strdup("key=")); - gpr_strvec_add(b, - gpr_dump_slice(md->key->slice, GPR_DUMP_HEX | GPR_DUMP_ASCII)); + gpr_strvec_add( + b, grpc_dump_slice(md->key->slice, GPR_DUMP_HEX | GPR_DUMP_ASCII)); gpr_strvec_add(b, gpr_strdup(" value=")); gpr_strvec_add( - b, gpr_dump_slice(md->value->slice, GPR_DUMP_HEX | GPR_DUMP_ASCII)); + b, grpc_dump_slice(md->value->slice, GPR_DUMP_HEX | GPR_DUMP_ASCII)); } static void put_metadata_list(gpr_strvec *b, grpc_metadata_batch md) { @@ -175,8 +176,8 @@ char *grpc_transport_op_string(grpc_transport_op *op) { first = false; char *msg = op->goaway_message == NULL ? "null" - : gpr_dump_slice(*op->goaway_message, - GPR_DUMP_ASCII | GPR_DUMP_HEX); + : grpc_dump_slice(*op->goaway_message, + GPR_DUMP_ASCII | GPR_DUMP_HEX); gpr_asprintf(&tmp, "SEND_GOAWAY:status=%d:msg=%s", op->goaway_status, msg); if (op->goaway_message != NULL) gpr_free(msg); gpr_strvec_add(&b, tmp); diff --git a/test/core/client_channel/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c index 1f7dce3d87..35f8abf728 100644 --- a/test/core/client_channel/set_initial_connect_string_test.c +++ b/test/core/client_channel/set_initial_connect_string_test.c @@ -200,7 +200,7 @@ static void match_initial_magic_string(grpc_slice_buffer *buffer) { GPR_ASSERT(buffer->length >= magic_length); for (i = 0, j = 0; i < state.incoming_buffer.count && j < magic_length; i++) { char *dump = - gpr_dump_slice(state.incoming_buffer.slices[i], GPR_DUMP_ASCII); + grpc_dump_slice(state.incoming_buffer.slices[i], GPR_DUMP_ASCII); cmp_length = GPR_MIN(strlen(dump), magic_length - j); GPR_ASSERT(strncmp(dump, magic_connect_string + j, cmp_length) == 0); j += cmp_length; diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 04095807c4..5ad13ae7ec 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -119,7 +119,7 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { size_t i; for (i = 0; i < state.temp_incoming_buffer.count; i++) { - char *dump = gpr_dump_slice(state.temp_incoming_buffer.slices[i], + char *dump = grpc_dump_slice(state.temp_incoming_buffer.slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "Server received: %s", dump); gpr_free(dump); diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index 5860257607..10b5e61b89 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -130,7 +130,7 @@ void test_connect(const char *server_host, const char *client_host, int port, grpc_slice_split(uri_slice, ",", &uri_parts); hosts_with_port = gpr_malloc(sizeof(char *) * uri_parts.count); for (i = 0; i < uri_parts.count; i++) { - char *uri_part_str = gpr_dump_slice(uri_parts.slices[i], GPR_DUMP_ASCII); + char *uri_part_str = grpc_dump_slice(uri_parts.slices[i], GPR_DUMP_ASCII); gpr_asprintf(&hosts_with_port[i], "%s:%d", uri_part_str, port); gpr_free(uri_part_str); } diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c index 4687e52313..7c06462264 100644 --- a/test/core/end2end/fake_resolver.c +++ b/test/core/end2end/fake_resolver.c @@ -48,6 +48,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" // @@ -172,7 +173,7 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory, bool errors_found = false; for (size_t i = 0; i < addresses->num_addresses; i++) { grpc_uri ith_uri = *args->uri; - char* part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII); + char* part_str = grpc_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII); ith_uri.path = part_str; if (!parse_ipv4( &ith_uri, diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index d239712426..3a04c6e3eb 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -62,7 +62,7 @@ static void on_metadata_response(grpc_exec_ctx *exec_ctx, void *user_data, } else { char *token; GPR_ASSERT(num_md == 1); - token = gpr_dump_slice(md_elems[0].value, GPR_DUMP_ASCII); + token = grpc_dump_slice(md_elems[0].value, GPR_DUMP_ASCII); printf("\nGot token: %s\n\n", token); gpr_free(token); } diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c index 4692db1853..7ef182b317 100644 --- a/test/core/security/security_connector_test.c +++ b/test/core/security/security_connector_test.c @@ -369,7 +369,7 @@ static void test_default_ssl_roots(void) { gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, ""); grpc_set_ssl_roots_override_callback(override_roots_success); grpc_slice roots = grpc_get_default_ssl_roots_for_testing(); - char *roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); + char *roots_contents = grpc_dump_slice(roots, GPR_DUMP_ASCII); grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_override_api) == 0); gpr_free(roots_contents); @@ -378,7 +378,7 @@ static void test_default_ssl_roots(void) { instead. */ gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, roots_env_var_file_path); roots = grpc_get_default_ssl_roots_for_testing(); - roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); + roots_contents = grpc_dump_slice(roots, GPR_DUMP_ASCII); grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_env_var) == 0); gpr_free(roots_contents); @@ -387,7 +387,7 @@ static void test_default_ssl_roots(void) { the api. */ gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, ""); roots = grpc_get_default_ssl_roots_for_testing(); - roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); + roots_contents = grpc_dump_slice(roots, GPR_DUMP_ASCII); grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_override_api) == 0); gpr_free(roots_contents); diff --git a/test/core/slice/percent_encoding_test.c b/test/core/slice/percent_encoding_test.c index e9ba8f5ec4..fc8d131cc0 100644 --- a/test/core/slice/percent_encoding_test.c +++ b/test/core/slice/percent_encoding_test.c @@ -67,10 +67,10 @@ static void test_vector(const char *raw, size_t raw_length, const char *encoded, gpr_permissive_percent_decode_slice(encoded_slice); char *raw2encoded_msg = - gpr_dump_slice(raw2encoded_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + grpc_dump_slice(raw2encoded_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *encoded2raw_msg = - gpr_dump_slice(encoded2raw_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *encoded2raw_permissive_msg = gpr_dump_slice( + grpc_dump_slice(encoded2raw_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *encoded2raw_permissive_msg = grpc_dump_slice( encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "Result:\nraw2encoded = %s\nencoded2raw = %s\nencoded2raw_permissive " @@ -116,7 +116,7 @@ static void test_nonconformant_vector(const char *encoded, grpc_slice encoded2raw_permissive_slice = gpr_permissive_percent_decode_slice(encoded_slice); - char *encoded2raw_permissive_msg = gpr_dump_slice( + char *encoded2raw_permissive_msg = grpc_dump_slice( encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "Result:\nencoded2raw_permissive = %s", encoded2raw_permissive_msg); diff --git a/test/core/slice/slice_string_helpers_test.c b/test/core/slice/slice_string_helpers_test.c index d3dbb1e7f9..caa87ed755 100644 --- a/test/core/slice/slice_string_helpers_test.c +++ b/test/core/slice/slice_string_helpers_test.c @@ -48,7 +48,7 @@ static void expect_slice_dump(grpc_slice slice, uint32_t flags, const char *result) { - char *got = gpr_dump_slice(slice, flags); + char *got = grpc_dump_slice(slice, flags); GPR_ASSERT(0 == strcmp(got, result)); gpr_free(got); grpc_slice_unref(slice); diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c index 53709ed6f7..78b77fad8e 100644 --- a/test/core/support/string_test.c +++ b/test/core/support/string_test.c @@ -283,12 +283,10 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); test_strdup(); test_dump(); - test_dump_slice(); test_parse_uint32(); test_asprintf(); test_strjoin(); test_strjoin_sep(); - test_strsplit(); test_ltoa(); test_int64toa(); test_leftpad(); diff --git a/test/core/transport/chttp2/bin_decoder_test.c b/test/core/transport/chttp2/bin_decoder_test.c index 3b111934ad..7ddc30291a 100644 --- a/test/core/transport/chttp2/bin_decoder_test.c +++ b/test/core/transport/chttp2/bin_decoder_test.c @@ -38,6 +38,7 @@ #include #include #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" static int all_ok = 1; @@ -45,8 +46,8 @@ static int all_ok = 1; static void expect_slice_eq(grpc_slice expected, grpc_slice slice, char *debug, int line) { if (0 != grpc_slice_cmp(slice, expected)) { - char *hs = gpr_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *he = gpr_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *hs = grpc_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *he = grpc_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "FAILED:%d: %s\ngot: %s\nwant: %s", line, debug, hs, he); gpr_free(hs); @@ -72,15 +73,15 @@ static grpc_slice base64_decode(const char *s) { } static grpc_slice base64_decode_with_length(const char *s, - size_t output_length) { + size_t output_length) { grpc_slice ss = grpc_slice_from_copied_string(s); grpc_slice out = grpc_chttp2_base64_decode_with_length(ss, output_length); grpc_slice_unref(ss); return out; } -#define EXPECT_SLICE_EQ(expected, slice) \ - expect_slice_eq( \ +#define EXPECT_SLICE_EQ(expected, slice) \ + expect_slice_eq( \ grpc_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ #slice, __LINE__); diff --git a/test/core/transport/chttp2/bin_encoder_test.c b/test/core/transport/chttp2/bin_encoder_test.c index f7df4452ce..706eef0c9c 100644 --- a/test/core/transport/chttp2/bin_encoder_test.c +++ b/test/core/transport/chttp2/bin_encoder_test.c @@ -48,8 +48,8 @@ static int all_ok = 1; static void expect_slice_eq(grpc_slice expected, grpc_slice slice, char *debug, int line) { if (0 != grpc_slice_cmp(slice, expected)) { - char *hs = gpr_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *he = gpr_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *hs = grpc_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *he = grpc_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "FAILED:%d: %s\ngot: %s\nwant: %s", line, debug, hs, he); gpr_free(hs); @@ -85,9 +85,9 @@ static void expect_combined_equiv(const char *s, size_t len, int line) { grpc_slice expect = grpc_chttp2_huffman_compress(base64); grpc_slice got = grpc_chttp2_base64_encode_and_huffman_compress_impl(input); if (0 != grpc_slice_cmp(expect, got)) { - char *t = gpr_dump_slice(input, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *e = gpr_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *g = gpr_dump_slice(got, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *t = grpc_dump_slice(input, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *e = grpc_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *g = grpc_dump_slice(got, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "FAILED:%d:\ntest: %s\ngot: %s\nwant: %s", line, t, g, e); gpr_free(t); diff --git a/test/core/transport/chttp2/hpack_encoder_test.c b/test/core/transport/chttp2/hpack_encoder_test.c index 2b4279673a..2445d91530 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.c +++ b/test/core/transport/chttp2/hpack_encoder_test.c @@ -104,8 +104,8 @@ static void verify(size_t window_available, int eof, size_t expect_window_used, grpc_metadata_batch_destroy(&b); if (0 != grpc_slice_cmp(merged, expect)) { - char *expect_str = gpr_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *got_str = gpr_dump_slice(merged, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *expect_str = grpc_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *got_str = grpc_dump_slice(merged, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "mismatched output for %s", expected); gpr_log(GPR_ERROR, "EXPECT: %s", expect_str); gpr_log(GPR_ERROR, "GOT: %s", got_str); -- cgit v1.2.3 From e4222b4cbdc8ff1d128d35a55c2309f3e029483a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 17:15:30 -0700 Subject: Add incldues, fix function names --- src/core/lib/slice/percent_encoding.c | 16 ++++----- src/core/lib/slice/percent_encoding.h | 20 +++++------ test/core/end2end/bad_server_response_test.c | 9 ++--- test/core/end2end/dualstack_socket_test.c | 2 +- test/core/security/security_connector_test.c | 1 + test/core/slice/percent_decode_fuzzer.c | 10 +++--- test/core/slice/percent_encode_fuzzer.c | 10 +++--- test/core/slice/percent_encoding_test.c | 42 ++++++++++++------------ test/core/transport/chttp2/bin_encoder_test.c | 5 +-- test/core/transport/chttp2/hpack_encoder_test.c | 1 + tools/codegen/core/gen_percent_encoding_tables.c | 4 +-- 11 files changed, 62 insertions(+), 58 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/slice/percent_encoding.c b/src/core/lib/slice/percent_encoding.c index 27a8f50a48..19f5f96cc3 100644 --- a/src/core/lib/slice/percent_encoding.c +++ b/src/core/lib/slice/percent_encoding.c @@ -35,11 +35,11 @@ #include -const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8] = { +const uint8_t grpc_url_percent_encoding_unreserved_bytes[256 / 8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xff, 0x03, 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8] = { +const uint8_t grpc_compatible_percent_encoding_unreserved_bytes[256 / 8] = { 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; @@ -49,8 +49,8 @@ static bool is_unreserved_character(uint8_t c, return ((unreserved_bytes[c / 8] >> (c % 8)) & 1) != 0; } -grpc_slice gpr_percent_encode_slice(grpc_slice slice, - const uint8_t *unreserved_bytes) { +grpc_slice grpc_percent_encode_slice(grpc_slice slice, + const uint8_t *unreserved_bytes) { static const uint8_t hex[] = "0123456789ABCDEF"; // first pass: count the number of bytes needed to output this string @@ -97,9 +97,9 @@ static uint8_t dehex(uint8_t c) { GPR_UNREACHABLE_CODE(return 255); } -bool gpr_strict_percent_decode_slice(grpc_slice slice_in, - const uint8_t *unreserved_bytes, - grpc_slice *slice_out) { +bool grpc_strict_percent_decode_slice(grpc_slice slice_in, + const uint8_t *unreserved_bytes, + grpc_slice *slice_out) { const uint8_t *p = GPR_SLICE_START_PTR(slice_in); const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); size_t out_length = 0; @@ -137,7 +137,7 @@ bool gpr_strict_percent_decode_slice(grpc_slice slice_in, return true; } -grpc_slice gpr_permissive_percent_decode_slice(grpc_slice slice_in) { +grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in) { const uint8_t *p = GPR_SLICE_START_PTR(slice_in); const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); size_t out_length = 0; diff --git a/src/core/lib/slice/percent_encoding.h b/src/core/lib/slice/percent_encoding.h index 3cb4a61423..bb5b1b75bc 100644 --- a/src/core/lib/slice/percent_encoding.h +++ b/src/core/lib/slice/percent_encoding.h @@ -46,33 +46,33 @@ #include /* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in - gpr_percent_encode_slice, gpr_strict_percent_decode_slice). + grpc_percent_encode_slice, grpc_strict_percent_decode_slice). Flags [A-Za-z0-9-_.~] as unreserved bytes for the percent encoding routines */ -extern const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8]; +extern const uint8_t grpc_url_percent_encoding_unreserved_bytes[256 / 8]; /* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in - gpr_percent_encode_slice, gpr_strict_percent_decode_slice). + grpc_percent_encode_slice, grpc_strict_percent_decode_slice). Flags ascii7 non-control characters excluding '%' as unreserved bytes for the percent encoding routines */ -extern const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8]; +extern const uint8_t grpc_compatible_percent_encoding_unreserved_bytes[256 / 8]; /* Percent-encode a slice, returning the new slice (this cannot fail): unreserved_bytes is a bitfield indicating which bytes are considered unreserved and thus do not need percent encoding */ -grpc_slice gpr_percent_encode_slice(grpc_slice slice, - const uint8_t *unreserved_bytes); +grpc_slice grpc_percent_encode_slice(grpc_slice slice, + const uint8_t *unreserved_bytes); /* Percent-decode a slice, strictly. If the input is legal (contains no unreserved bytes, and legal % encodings), returns true and sets *slice_out to the decoded slice. If the input is not legal, returns false and leaves *slice_out untouched. unreserved_bytes is a bitfield indicating which bytes are considered unreserved and thus do not need percent encoding */ -bool gpr_strict_percent_decode_slice(grpc_slice slice_in, - const uint8_t *unreserved_bytes, - grpc_slice *slice_out); +bool grpc_strict_percent_decode_slice(grpc_slice slice_in, + const uint8_t *unreserved_bytes, + grpc_slice *slice_out); /* Percent-decode a slice, permissively. If a % triplet can not be decoded, pass it through verbatim. This cannot fail. */ -grpc_slice gpr_permissive_percent_decode_slice(grpc_slice slice_in); +grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in); #endif /* GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H */ diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 5ad13ae7ec..262c4263d4 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -33,14 +33,15 @@ #include #include +#include #include #include #include -#include #include // #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" @@ -105,8 +106,8 @@ static void done_write(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } static void handle_write(grpc_exec_ctx *exec_ctx) { - grpc_slice slice = grpc_slice_from_copied_buffer(state.response_payload, - state.response_payload_length); + grpc_slice slice = grpc_slice_from_copied_buffer( + state.response_payload, state.response_payload_length); grpc_slice_buffer_reset_and_unref(&state.outgoing_buffer); grpc_slice_buffer_add(&state.outgoing_buffer, slice); @@ -120,7 +121,7 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { size_t i; for (i = 0; i < state.temp_incoming_buffer.count; i++) { char *dump = grpc_dump_slice(state.temp_incoming_buffer.slices[i], - GPR_DUMP_HEX | GPR_DUMP_ASCII); + GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "Server received: %s", dump); gpr_free(dump); } diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index 10b5e61b89..b8a8058b82 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -41,8 +41,8 @@ #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" - #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c index 7ef182b317..898aeb6f42 100644 --- a/test/core/security/security_connector_test.c +++ b/test/core/security/security_connector_test.c @@ -42,6 +42,7 @@ #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" #include "src/core/lib/support/tmpfile.h" diff --git a/test/core/slice/percent_decode_fuzzer.c b/test/core/slice/percent_decode_fuzzer.c index 69d74816a7..0a05b33584 100644 --- a/test/core/slice/percent_decode_fuzzer.c +++ b/test/core/slice/percent_decode_fuzzer.c @@ -49,15 +49,15 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_memory_counters_init(); grpc_slice input = grpc_slice_from_copied_buffer((const char *)data, size); grpc_slice output; - if (gpr_strict_percent_decode_slice( - input, gpr_url_percent_encoding_unreserved_bytes, &output)) { + if (grpc_strict_percent_decode_slice( + input, grpc_url_percent_encoding_unreserved_bytes, &output)) { grpc_slice_unref(output); } - if (gpr_strict_percent_decode_slice( - input, gpr_compatible_percent_encoding_unreserved_bytes, &output)) { + if (grpc_strict_percent_decode_slice( + input, grpc_compatible_percent_encoding_unreserved_bytes, &output)) { grpc_slice_unref(output); } - grpc_slice_unref(gpr_permissive_percent_decode_slice(input)); + grpc_slice_unref(grpc_permissive_percent_decode_slice(input)); grpc_slice_unref(input); counters = grpc_memory_counters_snapshot(); grpc_memory_counters_destroy(); diff --git a/test/core/slice/percent_encode_fuzzer.c b/test/core/slice/percent_encode_fuzzer.c index 99599bf16e..3aa12c2b1e 100644 --- a/test/core/slice/percent_encode_fuzzer.c +++ b/test/core/slice/percent_encode_fuzzer.c @@ -48,12 +48,12 @@ static void test(const uint8_t *data, size_t size, const uint8_t *dict) { struct grpc_memory_counters counters; grpc_memory_counters_init(); grpc_slice input = grpc_slice_from_copied_buffer((const char *)data, size); - grpc_slice output = gpr_percent_encode_slice(input, dict); + grpc_slice output = grpc_percent_encode_slice(input, dict); grpc_slice decoded_output; // encoder must always produce decodable output - GPR_ASSERT(gpr_strict_percent_decode_slice(output, dict, &decoded_output)); + GPR_ASSERT(grpc_strict_percent_decode_slice(output, dict, &decoded_output)); grpc_slice permissive_decoded_output = - gpr_permissive_percent_decode_slice(output); + grpc_permissive_percent_decode_slice(output); // and decoded output must always match the input GPR_ASSERT(grpc_slice_cmp(input, decoded_output) == 0); GPR_ASSERT(grpc_slice_cmp(input, permissive_decoded_output) == 0); @@ -67,7 +67,7 @@ static void test(const uint8_t *data, size_t size, const uint8_t *dict) { } int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { - test(data, size, gpr_url_percent_encoding_unreserved_bytes); - test(data, size, gpr_compatible_percent_encoding_unreserved_bytes); + test(data, size, grpc_url_percent_encoding_unreserved_bytes); + test(data, size, grpc_compatible_percent_encoding_unreserved_bytes); return 0; } diff --git a/test/core/slice/percent_encoding_test.c b/test/core/slice/percent_encoding_test.c index 4f5cd2a65c..d71c99f54c 100644 --- a/test/core/slice/percent_encoding_test.c +++ b/test/core/slice/percent_encoding_test.c @@ -60,12 +60,12 @@ static void test_vector(const char *raw, size_t raw_length, const char *encoded, grpc_slice raw_slice = grpc_slice_from_copied_buffer(raw, raw_length); grpc_slice encoded_slice = grpc_slice_from_copied_buffer(encoded, encoded_length); - grpc_slice raw2encoded_slice = gpr_percent_encode_slice(raw_slice, dict); + grpc_slice raw2encoded_slice = grpc_percent_encode_slice(raw_slice, dict); grpc_slice encoded2raw_slice; - GPR_ASSERT( - gpr_strict_percent_decode_slice(encoded_slice, dict, &encoded2raw_slice)); + GPR_ASSERT(grpc_strict_percent_decode_slice(encoded_slice, dict, + &encoded2raw_slice)); grpc_slice encoded2raw_permissive_slice = - gpr_permissive_percent_decode_slice(encoded_slice); + grpc_permissive_percent_decode_slice(encoded_slice); char *raw2encoded_msg = grpc_dump_slice(raw2encoded_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); @@ -112,10 +112,10 @@ static void test_nonconformant_vector(const char *encoded, grpc_slice encoded_slice = grpc_slice_from_copied_buffer(encoded, encoded_length); grpc_slice encoded2raw_slice; - GPR_ASSERT(!gpr_strict_percent_decode_slice(encoded_slice, dict, - &encoded2raw_slice)); + GPR_ASSERT(!grpc_strict_percent_decode_slice(encoded_slice, dict, + &encoded2raw_slice)); grpc_slice encoded2raw_permissive_slice = - gpr_permissive_percent_decode_slice(encoded_slice); + grpc_permissive_percent_decode_slice(encoded_slice); char *encoded2raw_permissive_msg = grpc_dump_slice( encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); @@ -136,23 +136,23 @@ int main(int argc, char **argv) { TEST_VECTOR( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", - gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x00", "%00", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x01", "%01", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("a b", "a%20b", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR(" b", "%20b", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("a b", "a b", gpr_compatible_percent_encoding_unreserved_bytes); - TEST_VECTOR(" b", " b", gpr_compatible_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x0f", "%0F", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\xff", "%FF", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\xee", "%EE", gpr_url_percent_encoding_unreserved_bytes); + grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x00", "%00", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x01", "%01", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("a b", "a%20b", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR(" b", "%20b", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("a b", "a b", grpc_compatible_percent_encoding_unreserved_bytes); + TEST_VECTOR(" b", " b", grpc_compatible_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x0f", "%0F", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\xff", "%FF", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\xee", "%EE", grpc_url_percent_encoding_unreserved_bytes); TEST_NONCONFORMANT_VECTOR("%", "%", - gpr_url_percent_encoding_unreserved_bytes); + grpc_url_percent_encoding_unreserved_bytes); TEST_NONCONFORMANT_VECTOR("%A", "%A", - gpr_url_percent_encoding_unreserved_bytes); + grpc_url_percent_encoding_unreserved_bytes); TEST_NONCONFORMANT_VECTOR("%AG", "%AG", - gpr_url_percent_encoding_unreserved_bytes); + grpc_url_percent_encoding_unreserved_bytes); TEST_NONCONFORMANT_VECTOR("\0", "\0", - gpr_url_percent_encoding_unreserved_bytes); + grpc_url_percent_encoding_unreserved_bytes); return 0; } diff --git a/test/core/transport/chttp2/bin_encoder_test.c b/test/core/transport/chttp2/bin_encoder_test.c index 706eef0c9c..53b55a301e 100644 --- a/test/core/transport/chttp2/bin_encoder_test.c +++ b/test/core/transport/chttp2/bin_encoder_test.c @@ -41,6 +41,7 @@ #include #include #include +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" static int all_ok = 1; @@ -74,8 +75,8 @@ static grpc_slice HUFF(const char *s) { return out; } -#define EXPECT_SLICE_EQ(expected, slice) \ - expect_slice_eq( \ +#define EXPECT_SLICE_EQ(expected, slice) \ + expect_slice_eq( \ grpc_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ #slice, __LINE__); diff --git a/test/core/transport/chttp2/hpack_encoder_test.c b/test/core/transport/chttp2/hpack_encoder_test.c index 2445d91530..91421e18f4 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.c +++ b/test/core/transport/chttp2/hpack_encoder_test.c @@ -41,6 +41,7 @@ #include #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/metadata.h" #include "test/core/util/parse_hexstring.h" diff --git a/tools/codegen/core/gen_percent_encoding_tables.c b/tools/codegen/core/gen_percent_encoding_tables.c index 93f30deeb3..347c210330 100644 --- a/tools/codegen/core/gen_percent_encoding_tables.c +++ b/tools/codegen/core/gen_percent_encoding_tables.c @@ -71,14 +71,14 @@ int main(void) { legal('_'); legal('.'); legal('~'); - dump("gpr_url_percent_encoding_unreserved_bytes"); + dump("grpc_url_percent_encoding_unreserved_bytes"); clear(); for (i = 32; i <= 126; i++) { if (i == '%') continue; legal(i); } - dump("gpr_compatible_percent_encoding_unreserved_bytes"); + dump("grpc_compatible_percent_encoding_unreserved_bytes"); return 0; } -- cgit v1.2.3 From 618e67d655d8a0a345463d6e3e690e258dadd763 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 21:08:10 -0700 Subject: s/GPR_SLICE/GRPC_SLICE/g --- include/grpc++/impl/codegen/proto_utils.h | 20 +++++------ include/grpc++/impl/codegen/thrift_serializer.h | 2 +- include/grpc++/support/slice.h | 6 ++-- include/grpc/impl/codegen/slice.h | 16 ++++----- src/core/ext/census/grpc_filter.c | 2 +- .../ext/client_channel/http_connect_handshaker.c | 4 +-- src/core/ext/lb_policy/grpclb/load_balancer_api.c | 10 +++--- .../chttp2/client/insecure/channel_create.c | 6 ++-- .../chttp2/client/secure/secure_channel_create.c | 6 ++-- .../ext/transport/chttp2/transport/bin_decoder.c | 30 ++++++++-------- .../ext/transport/chttp2/transport/bin_encoder.c | 30 ++++++++-------- .../transport/chttp2/transport/chttp2_transport.c | 22 ++++++------ .../ext/transport/chttp2/transport/frame_data.c | 6 ++-- .../ext/transport/chttp2/transport/frame_goaway.c | 12 +++---- .../ext/transport/chttp2/transport/frame_ping.c | 6 ++-- .../transport/chttp2/transport/frame_rst_stream.c | 6 ++-- .../transport/chttp2/transport/frame_settings.c | 10 +++--- .../chttp2/transport/frame_window_update.c | 6 ++-- .../ext/transport/chttp2/transport/hpack_encoder.c | 28 +++++++-------- .../ext/transport/chttp2/transport/hpack_parser.c | 8 ++--- .../ext/transport/chttp2/transport/hpack_table.c | 8 ++--- src/core/ext/transport/chttp2/transport/parsing.c | 4 +-- .../transport/cronet/transport/cronet_transport.c | 6 ++-- src/core/lib/channel/http_client_filter.c | 6 ++-- src/core/lib/compression/message_compress.c | 18 +++++----- src/core/lib/http/httpcli.c | 2 +- src/core/lib/http/parser.c | 4 +-- src/core/lib/iomgr/tcp_posix.c | 10 +++--- src/core/lib/iomgr/tcp_uv.c | 30 ++++++++-------- src/core/lib/iomgr/tcp_windows.c | 8 ++--- .../google_default/google_default_credentials.c | 2 +- .../lib/security/credentials/jwt/jwt_verifier.c | 22 ++++++------ src/core/lib/security/transport/handshake.c | 6 ++-- src/core/lib/security/transport/secure_endpoint.c | 32 ++++++++--------- .../lib/security/transport/security_connector.c | 8 ++--- .../lib/security/transport/server_auth_filter.c | 14 ++++---- src/core/lib/security/util/b64.c | 4 +-- src/core/lib/slice/percent_encoding.c | 28 +++++++-------- src/core/lib/slice/slice.c | 14 ++++---- src/core/lib/slice/slice_buffer.c | 22 ++++++------ src/core/lib/slice/slice_string_helpers.c | 8 ++--- src/core/lib/surface/byte_buffer_reader.c | 6 ++-- src/core/lib/surface/call.c | 12 +++---- src/core/lib/surface/server.c | 2 +- src/core/lib/transport/metadata.c | 28 +++++++-------- src/core/lib/transport/metadata.h | 2 +- src/csharp/ext/grpc_csharp_ext.c | 6 ++-- src/node/ext/byte_buffer.cc | 6 ++-- src/objective-c/GRPCClient/private/NSData+GRPC.m | 4 +-- src/php/ext/grpc/byte_buffer.c | 4 +-- src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi | 4 +-- src/ruby/ext/grpc/rb_byte_buffer.c | 4 +-- test/core/bad_client/tests/large_metadata.c | 2 +- test/core/bad_ssl/servers/cert.c | 4 +-- test/core/compression/message_compress_test.c | 12 +++---- test/core/end2end/cq_verifier.c | 14 ++++---- test/core/end2end/fixtures/http_proxy.c | 16 ++++----- test/core/end2end/fuzzers/api_fuzzer.c | 2 +- test/core/end2end/tests/invoke_large_request.c | 2 +- test/core/handshake/client_ssl.c | 6 ++-- test/core/handshake/server_ssl.c | 6 ++-- test/core/iomgr/endpoint_tests.c | 12 +++---- test/core/iomgr/load_file_test.c | 20 +++++------ test/core/iomgr/tcp_posix_test.c | 12 +++---- test/core/security/b64_test.c | 28 +++++++-------- test/core/security/create_jwt.c | 2 +- test/core/security/fetch_oauth2.c | 2 +- test/core/security/json_token_test.c | 18 +++++----- test/core/security/jwt_verifier_test.c | 14 ++++---- test/core/security/oauth2_utils.c | 8 ++--- test/core/security/secure_endpoint_test.c | 4 +-- test/core/security/security_connector_test.c | 2 +- test/core/slice/slice_test.c | 38 ++++++++++---------- test/core/surface/byte_buffer_reader_test.c | 42 +++++++++++----------- test/core/transport/chttp2/hpack_parser_test.c | 4 +-- test/core/transport/chttp2/varint_test.c | 2 +- test/core/transport/metadata_test.c | 2 +- test/core/util/one_corpus_entry_fuzzer.c | 2 +- test/core/util/parse_hexstring.c | 2 +- test/core/util/slice_splitter.c | 24 ++++++------- test/cpp/grpclb/grpclb_api_test.cc | 4 +-- test/cpp/grpclb/grpclb_test.cc | 4 +-- test/cpp/util/byte_buffer_test.cc | 4 +-- test/cpp/util/slice_test.cc | 4 +-- 84 files changed, 444 insertions(+), 444 deletions(-) (limited to 'src/core') diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index 4885ea0ee7..d3be48984e 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -74,10 +74,10 @@ class GrpcBufferWriter GRPC_FINAL } else { slice_ = g_core_codegen_interface->grpc_slice_malloc(block_size_); } - *data = GPR_SLICE_START_PTR(slice_); + *data = GRPC_SLICE_START_PTR(slice_); // On win x64, int is only 32bit - GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); - byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); + GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX); + byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_); g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_); return true; } @@ -88,7 +88,7 @@ class GrpcBufferWriter GRPC_FINAL backup_slice_ = slice_; } else { backup_slice_ = g_core_codegen_interface->grpc_slice_split_tail( - &slice_, GPR_SLICE_LENGTH(slice_) - count); + &slice_, GRPC_SLICE_LENGTH(slice_) - count); g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_); } have_backup_ = true; @@ -126,7 +126,7 @@ class GrpcBufferReader GRPC_FINAL return false; } if (backup_count_ > 0) { - *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) - + *data = GRPC_SLICE_START_PTR(slice_) + GRPC_SLICE_LENGTH(slice_) - backup_count_; GPR_CODEGEN_ASSERT(backup_count_ <= INT_MAX); *size = (int)backup_count_; @@ -138,10 +138,10 @@ class GrpcBufferReader GRPC_FINAL return false; } g_core_codegen_interface->grpc_slice_unref(slice_); - *data = GPR_SLICE_START_PTR(slice_); + *data = GRPC_SLICE_START_PTR(slice_); // On win x64, int is only 32bit - GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); - byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); + GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX); + byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_); return true; } @@ -188,8 +188,8 @@ class SerializationTraitsgrpc_slice_malloc(byte_size); GPR_CODEGEN_ASSERT( - GPR_SLICE_END_PTR(slice) == - msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); + GRPC_SLICE_END_PTR(slice) == + msg.SerializeWithCachedSizesToArray(GRPC_SLICE_START_PTR(slice))); *bp = g_core_codegen_interface->grpc_raw_byte_buffer_create(&slice, 1); g_core_codegen_interface->grpc_slice_unref(slice); return g_core_codegen_interface->ok(); diff --git a/include/grpc++/impl/codegen/thrift_serializer.h b/include/grpc++/impl/codegen/thrift_serializer.h index 691ce1af48..4d3af91b02 100644 --- a/include/grpc++/impl/codegen/thrift_serializer.h +++ b/include/grpc++/impl/codegen/thrift_serializer.h @@ -159,7 +159,7 @@ class ThriftSerializer { grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); uint32_t len = - Deserialize(GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice), msg); + Deserialize(GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice), msg); grpc_slice_unref(slice); diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index 699148ccda..6ee582275d 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -69,13 +69,13 @@ class Slice GRPC_FINAL { } /// Byte size. - size_t size() const { return GPR_SLICE_LENGTH(slice_); } + size_t size() const { return GRPC_SLICE_LENGTH(slice_); } /// Raw pointer to the beginning (first element) of the slice. - const uint8_t* begin() const { return GPR_SLICE_START_PTR(slice_); } + const uint8_t* begin() const { return GRPC_SLICE_START_PTR(slice_); } /// Raw pointer to the end (one byte \em past the last element) of the slice. - const uint8_t* end() const { return GPR_SLICE_END_PTR(slice_); } + const uint8_t* end() const { return GRPC_SLICE_END_PTR(slice_); } /// Raw C slice. Caller needs to call grpc_slice_unref when done. grpc_slice c_slice() const { return grpc_slice_ref(slice_); } diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index 79297ce23d..774ba0e95d 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -60,7 +60,7 @@ typedef struct grpc_slice_refcount { void (*unref)(void *); } grpc_slice_refcount; -#define GPR_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1) +#define GRPC_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1) /* A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1]. @@ -80,7 +80,7 @@ typedef struct grpc_slice { } refcounted; struct { uint8_t length; - uint8_t bytes[GPR_SLICE_INLINED_SIZE]; + uint8_t bytes[GRPC_SLICE_INLINED_SIZE]; } inlined; } data; } grpc_slice; @@ -102,17 +102,17 @@ typedef struct { grpc_slice inlined[GRPC_SLICE_BUFFER_INLINE_ELEMENTS]; } grpc_slice_buffer; -#define GPR_SLICE_START_PTR(slice) \ +#define GRPC_SLICE_START_PTR(slice) \ ((slice).refcount ? (slice).data.refcounted.bytes \ : (slice).data.inlined.bytes) -#define GPR_SLICE_LENGTH(slice) \ +#define GRPC_SLICE_LENGTH(slice) \ ((slice).refcount ? (slice).data.refcounted.length \ : (slice).data.inlined.length) -#define GPR_SLICE_SET_LENGTH(slice, newlen) \ +#define GRPC_SLICE_SET_LENGTH(slice, newlen) \ ((slice).refcount ? ((slice).data.refcounted.length = (size_t)(newlen)) \ : ((slice).data.inlined.length = (uint8_t)(newlen))) -#define GPR_SLICE_END_PTR(slice) \ - GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(slice) -#define GPR_SLICE_IS_EMPTY(slice) (GPR_SLICE_LENGTH(slice) == 0) +#define GRPC_SLICE_END_PTR(slice) \ + GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice) +#define GRPC_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0) #endif /* GRPC_IMPL_CODEGEN_SLICE_H */ diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index d84d715031..aa6d24e076 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -69,7 +69,7 @@ static void extract_and_annotate_method_tag(grpc_metadata_batch *md, for (m = md->list.head; m != NULL; m = m->next) { if (m->md->key == GRPC_MDSTR_PATH) { gpr_log(GPR_DEBUG, "%s", - (const char *)GPR_SLICE_START_PTR(m->md->value->slice)); + (const char *)GRPC_SLICE_START_PTR(m->md->value->slice)); /* Add method tag here */ } } diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index d80f710b72..6f1956add9 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -118,7 +118,7 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, } // Add buffer to parser. for (size_t i = 0; i < handshaker->read_buffer->count; ++i) { - if (GPR_SLICE_LENGTH(handshaker->read_buffer->slices[i]) > 0) { + if (GRPC_SLICE_LENGTH(handshaker->read_buffer->slices[i]) > 0) { size_t body_start_offset = 0; error = grpc_http_parser_parse(&handshaker->http_parser, handshaker->read_buffer->slices[i], @@ -132,7 +132,7 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_slice_buffer tmp_buffer; grpc_slice_buffer_init(&tmp_buffer); if (body_start_offset < - GPR_SLICE_LENGTH(handshaker->read_buffer->slices[i])) { + GRPC_SLICE_LENGTH(handshaker->read_buffer->slices[i])) { grpc_slice_buffer_add( &tmp_buffer, grpc_slice_split_tail(&handshaker->read_buffer->slices[i], diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.c b/src/core/ext/lb_policy/grpclb/load_balancer_api.c index f3860d119d..837e9c1113 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.c +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.c @@ -101,7 +101,7 @@ grpc_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request) { slice = grpc_slice_malloc(encoded_length); outputstream = - pb_ostream_from_buffer(GPR_SLICE_START_PTR(slice), encoded_length); + pb_ostream_from_buffer(GRPC_SLICE_START_PTR(slice), encoded_length); GPR_ASSERT(pb_encode(&outputstream, grpc_lb_v1_LoadBalanceRequest_fields, request) != 0); return slice; @@ -115,8 +115,8 @@ typedef grpc_lb_v1_LoadBalanceResponse grpc_grpclb_response; grpc_grpclb_initial_response *grpc_grpclb_initial_response_parse( grpc_slice encoded_grpc_grpclb_response) { pb_istream_t stream = - pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_grpc_grpclb_response), - GPR_SLICE_LENGTH(encoded_grpc_grpclb_response)); + pb_istream_from_buffer(GRPC_SLICE_START_PTR(encoded_grpc_grpclb_response), + GRPC_SLICE_LENGTH(encoded_grpc_grpclb_response)); grpc_grpclb_response res; memset(&res, 0, sizeof(grpc_grpclb_response)); if (!pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, &res)) { @@ -136,8 +136,8 @@ grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist( bool status; decode_serverlist_arg arg; pb_istream_t stream = - pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_grpc_grpclb_response), - GPR_SLICE_LENGTH(encoded_grpc_grpclb_response)); + pb_istream_from_buffer(GRPC_SLICE_START_PTR(encoded_grpc_grpclb_response), + GRPC_SLICE_LENGTH(encoded_grpc_grpclb_response)); pb_istream_t stream_at_start = stream; grpc_grpclb_response res; memset(&res, 0, sizeof(grpc_grpclb_response)); diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 03dc955b27..8e03fd82c1 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -36,9 +36,9 @@ #include #include -#include #include #include +#include #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" @@ -117,12 +117,12 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { connector *c = arg; grpc_endpoint *tcp = c->tcp; if (tcp != NULL) { - if (!GPR_SLICE_IS_EMPTY(c->args.initial_connect_string)) { + if (!GRPC_SLICE_IS_EMPTY(c->args.initial_connect_string)) { grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, c); grpc_slice_buffer_init(&c->initial_string_buffer); grpc_slice_buffer_add(&c->initial_string_buffer, - c->args.initial_connect_string); + c->args.initial_connect_string); connector_ref(arg); grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, &c->initial_string_sent); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 7f9c365799..22d7ab0d14 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -36,9 +36,9 @@ #include #include -#include #include #include +#include #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" @@ -166,12 +166,12 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(c->connecting_endpoint == NULL); c->connecting_endpoint = tcp; gpr_mu_unlock(&c->mu); - if (!GPR_SLICE_IS_EMPTY(c->args.initial_connect_string)) { + if (!GRPC_SLICE_IS_EMPTY(c->args.initial_connect_string)) { grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, c); grpc_slice_buffer_init(&c->initial_string_buffer); grpc_slice_buffer_add(&c->initial_string_buffer, - c->args.initial_connect_string); + c->args.initial_connect_string); grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, &c->initial_string_sent); } else { diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.c b/src/core/ext/transport/chttp2/transport/bin_decoder.c index f8db92dff5..3eef80b557 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.c @@ -144,7 +144,7 @@ bool grpc_base64_decode_partial(struct grpc_base64_decode_context *ctx) { } grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { - size_t input_length = GPR_SLICE_LENGTH(input); + size_t input_length = GRPC_SLICE_LENGTH(input); size_t output_length = input_length / 4 * 3; struct grpc_base64_decode_context ctx; grpc_slice output; @@ -159,7 +159,7 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { } if (input_length > 0) { - uint8_t *input_end = GPR_SLICE_END_PTR(input); + uint8_t *input_end = GRPC_SLICE_END_PTR(input); if (*(--input_end) == '=') { output_length--; if (*(--input_end) == '=') { @@ -169,10 +169,10 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { } output = grpc_slice_malloc(output_length); - ctx.input_cur = GPR_SLICE_START_PTR(input); - ctx.input_end = GPR_SLICE_END_PTR(input); - ctx.output_cur = GPR_SLICE_START_PTR(output); - ctx.output_end = GPR_SLICE_END_PTR(output); + ctx.input_cur = GRPC_SLICE_START_PTR(input); + ctx.input_end = GRPC_SLICE_END_PTR(input); + ctx.output_cur = GRPC_SLICE_START_PTR(output); + ctx.output_end = GRPC_SLICE_END_PTR(output); ctx.contains_tail = false; if (!grpc_base64_decode_partial(&ctx)) { @@ -182,14 +182,14 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { grpc_slice_unref(output); return gpr_empty_slice(); } - GPR_ASSERT(ctx.output_cur == GPR_SLICE_END_PTR(output)); - GPR_ASSERT(ctx.input_cur == GPR_SLICE_END_PTR(input)); + GPR_ASSERT(ctx.output_cur == GRPC_SLICE_END_PTR(output)); + GPR_ASSERT(ctx.input_cur == GRPC_SLICE_END_PTR(input)); return output; } grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, size_t output_length) { - size_t input_length = GPR_SLICE_LENGTH(input); + size_t input_length = GRPC_SLICE_LENGTH(input); grpc_slice output = grpc_slice_malloc(output_length); struct grpc_base64_decode_context ctx; @@ -214,10 +214,10 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, return gpr_empty_slice(); } - ctx.input_cur = GPR_SLICE_START_PTR(input); - ctx.input_end = GPR_SLICE_END_PTR(input); - ctx.output_cur = GPR_SLICE_START_PTR(output); - ctx.output_end = GPR_SLICE_END_PTR(output); + ctx.input_cur = GRPC_SLICE_START_PTR(input); + ctx.input_end = GRPC_SLICE_END_PTR(input); + ctx.output_cur = GRPC_SLICE_START_PTR(output); + ctx.output_end = GRPC_SLICE_END_PTR(output); ctx.contains_tail = true; if (!grpc_base64_decode_partial(&ctx)) { @@ -227,7 +227,7 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, grpc_slice_unref(output); return gpr_empty_slice(); } - GPR_ASSERT(ctx.output_cur == GPR_SLICE_END_PTR(output)); - GPR_ASSERT(ctx.input_cur <= GPR_SLICE_END_PTR(input)); + GPR_ASSERT(ctx.output_cur == GRPC_SLICE_END_PTR(output)); + GPR_ASSERT(ctx.input_cur <= GRPC_SLICE_END_PTR(input)); return output; } diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.c b/src/core/ext/transport/chttp2/transport/bin_encoder.c index 09b961533a..2baa1dc97b 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.c @@ -62,13 +62,13 @@ static const b64_huff_sym huff_alphabet[64] = { static const uint8_t tail_xtra[3] = {0, 2, 3}; grpc_slice grpc_chttp2_base64_encode(grpc_slice input) { - size_t input_length = GPR_SLICE_LENGTH(input); + size_t input_length = GRPC_SLICE_LENGTH(input); size_t input_triplets = input_length / 3; size_t tail_case = input_length % 3; size_t output_length = input_triplets * 4 + tail_xtra[tail_case]; grpc_slice output = grpc_slice_malloc(output_length); - uint8_t *in = GPR_SLICE_START_PTR(input); - char *out = (char *)GPR_SLICE_START_PTR(output); + uint8_t *in = GRPC_SLICE_START_PTR(input); + char *out = (char *)GRPC_SLICE_START_PTR(output); size_t i; /* encode full triplets */ @@ -100,8 +100,8 @@ grpc_slice grpc_chttp2_base64_encode(grpc_slice input) { break; } - GPR_ASSERT(out == (char *)GPR_SLICE_END_PTR(output)); - GPR_ASSERT(in == GPR_SLICE_END_PTR(input)); + GPR_ASSERT(out == (char *)GRPC_SLICE_END_PTR(output)); + GPR_ASSERT(in == GRPC_SLICE_END_PTR(input)); return output; } @@ -114,13 +114,13 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input) { uint32_t temp_length = 0; nbits = 0; - for (in = GPR_SLICE_START_PTR(input); in != GPR_SLICE_END_PTR(input); ++in) { + for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); ++in) { nbits += grpc_chttp2_huffsyms[*in].length; } output = grpc_slice_malloc(nbits / 8 + (nbits % 8 != 0)); - out = GPR_SLICE_START_PTR(output); - for (in = GPR_SLICE_START_PTR(input); in != GPR_SLICE_END_PTR(input); ++in) { + out = GRPC_SLICE_START_PTR(output); + for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); ++in) { int sym = *in; temp <<= grpc_chttp2_huffsyms[sym].length; temp |= grpc_chttp2_huffsyms[sym].bits; @@ -141,7 +141,7 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input) { (uint8_t)(0xffu >> temp_length)); } - GPR_ASSERT(out == GPR_SLICE_END_PTR(output)); + GPR_ASSERT(out == GRPC_SLICE_END_PTR(output)); return output; } @@ -176,15 +176,15 @@ static void enc_add1(huff_out *out, uint8_t a) { } grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input) { - size_t input_length = GPR_SLICE_LENGTH(input); + size_t input_length = GRPC_SLICE_LENGTH(input); size_t input_triplets = input_length / 3; size_t tail_case = input_length % 3; size_t output_syms = input_triplets * 4 + tail_xtra[tail_case]; size_t max_output_bits = 11 * output_syms; size_t max_output_length = max_output_bits / 8 + (max_output_bits % 8 != 0); grpc_slice output = grpc_slice_malloc(max_output_length); - uint8_t *in = GPR_SLICE_START_PTR(input); - uint8_t *start_out = GPR_SLICE_START_PTR(output); + uint8_t *in = GRPC_SLICE_START_PTR(input); + uint8_t *start_out = GRPC_SLICE_START_PTR(output); huff_out out; size_t i; @@ -231,9 +231,9 @@ grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input) (uint8_t)(0xffu >> out.temp_length)); } - GPR_ASSERT(out.out <= GPR_SLICE_END_PTR(output)); - GPR_SLICE_SET_LENGTH(output, out.out - start_out); + GPR_ASSERT(out.out <= GRPC_SLICE_END_PTR(output)); + GRPC_SLICE_SET_LENGTH(output, out.out - start_out); - GPR_ASSERT(in == GPR_SLICE_END_PTR(input)); + GPR_ASSERT(in == GRPC_SLICE_END_PTR(input)); return output; } diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 07639c1223..3df64faa1f 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -885,7 +885,7 @@ static void add_fetched_slice_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s) { s->fetched_send_message_length += - (uint32_t)GPR_SLICE_LENGTH(s->fetching_slice); + (uint32_t)GRPC_SLICE_LENGTH(s->fetching_slice); grpc_slice_buffer_add(&s->flow_controlled_buffer, s->fetching_slice); if (s->id != 0) { grpc_chttp2_become_writable(exec_ctx, t, s, true, "op.send_message"); @@ -1602,7 +1602,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, compression and just write the uncompressed bytes onto the wire. */ status_hdr = grpc_slice_malloc(15 + (grpc_status >= 10)); - p = GPR_SLICE_START_PTR(status_hdr); + p = GRPC_SLICE_START_PTR(status_hdr); *p++ = 0x40; /* literal header */ *p++ = 11; /* len(grpc-status) */ *p++ = 'g'; @@ -1624,8 +1624,8 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, *p++ = (uint8_t)('0' + (grpc_status / 10)); *p++ = (uint8_t)('0' + (grpc_status % 10)); } - GPR_ASSERT(p == GPR_SLICE_END_PTR(status_hdr)); - len += (uint32_t)GPR_SLICE_LENGTH(status_hdr); + GPR_ASSERT(p == GRPC_SLICE_END_PTR(status_hdr)); + len += (uint32_t)GRPC_SLICE_LENGTH(status_hdr); const char *optional_message = grpc_error_get_str(error, GRPC_ERROR_STR_GRPC_MESSAGE); @@ -1634,7 +1634,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, size_t msg_len = strlen(optional_message); GPR_ASSERT(msg_len < 127); message_pfx = grpc_slice_malloc(15); - p = GPR_SLICE_START_PTR(message_pfx); + p = GRPC_SLICE_START_PTR(message_pfx); *p++ = 0x40; *p++ = 12; /* len(grpc-message) */ *p++ = 'g'; @@ -1650,13 +1650,13 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, *p++ = 'g'; *p++ = 'e'; *p++ = (uint8_t)msg_len; - GPR_ASSERT(p == GPR_SLICE_END_PTR(message_pfx)); - len += (uint32_t)GPR_SLICE_LENGTH(message_pfx); + GPR_ASSERT(p == GRPC_SLICE_END_PTR(message_pfx)); + len += (uint32_t)GRPC_SLICE_LENGTH(message_pfx); len += (uint32_t)msg_len; } hdr = grpc_slice_malloc(9); - p = GPR_SLICE_START_PTR(hdr); + p = GRPC_SLICE_START_PTR(hdr); *p++ = (uint8_t)(len >> 16); *p++ = (uint8_t)(len >> 8); *p++ = (uint8_t)(len); @@ -1666,7 +1666,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, *p++ = (uint8_t)(s->id >> 16); *p++ = (uint8_t)(s->id >> 8); *p++ = (uint8_t)(s->id); - GPR_ASSERT(p == GPR_SLICE_END_PTR(hdr)); + GPR_ASSERT(p == GRPC_SLICE_END_PTR(hdr)); grpc_slice_buffer_add(&t->qbuf, hdr); grpc_slice_buffer_add(&t->qbuf, status_hdr); @@ -2043,11 +2043,11 @@ void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, grpc_slice slice) { gpr_mu_lock(&bs->slice_mu); - if (bs->remaining_bytes < GPR_SLICE_LENGTH(slice)) { + if (bs->remaining_bytes < GRPC_SLICE_LENGTH(slice)) { incoming_byte_stream_publish_error( exec_ctx, bs, GRPC_ERROR_CREATE("Too many bytes in stream")); } else { - bs->remaining_bytes -= (uint32_t)GPR_SLICE_LENGTH(slice); + bs->remaining_bytes -= (uint32_t)GRPC_SLICE_LENGTH(slice); if (bs->on_next != NULL) { *bs->next = slice; grpc_exec_ctx_sched(exec_ctx, bs->on_next, GRPC_ERROR_NONE, NULL); diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index 5700a01a9a..f9b9e1b309 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -122,7 +122,7 @@ void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer *inbuf, static const size_t header_size = 9; hdr = grpc_slice_malloc(header_size); - p = GPR_SLICE_START_PTR(hdr); + p = GRPC_SLICE_START_PTR(hdr); GPR_ASSERT(write_bytes < (1 << 24)); *p++ = (uint8_t)(write_bytes >> 16); *p++ = (uint8_t)(write_bytes >> 8); @@ -145,8 +145,8 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, grpc_chttp2_data_parser *p, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_slice slice) { - uint8_t *const beg = GPR_SLICE_START_PTR(slice); - uint8_t *const end = GPR_SLICE_END_PTR(slice); + uint8_t *const beg = GRPC_SLICE_START_PTR(slice); + uint8_t *const end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; uint32_t message_flags; grpc_chttp2_incoming_byte_stream *incoming_byte_stream; diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.c b/src/core/ext/transport/chttp2/transport/frame_goaway.c index 16c6819aca..d99d486c1b 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.c +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.c @@ -72,8 +72,8 @@ grpc_error *grpc_chttp2_goaway_parser_parse(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_slice slice, int is_last) { - uint8_t *const beg = GPR_SLICE_START_PTR(slice); - uint8_t *const end = GPR_SLICE_END_PTR(slice); + uint8_t *const beg = GRPC_SLICE_START_PTR(slice); + uint8_t *const end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; grpc_chttp2_goaway_parser *p = parser; @@ -163,10 +163,10 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, grpc_slice debug_data, grpc_slice_buffer *slice_buffer) { grpc_slice header = grpc_slice_malloc(9 + 4 + 4); - uint8_t *p = GPR_SLICE_START_PTR(header); + uint8_t *p = GRPC_SLICE_START_PTR(header); uint32_t frame_length; - GPR_ASSERT(GPR_SLICE_LENGTH(debug_data) < UINT32_MAX - 4 - 4); - frame_length = 4 + 4 + (uint32_t)GPR_SLICE_LENGTH(debug_data); + GPR_ASSERT(GRPC_SLICE_LENGTH(debug_data) < UINT32_MAX - 4 - 4); + frame_length = 4 + 4 + (uint32_t)GRPC_SLICE_LENGTH(debug_data); /* frame header: length */ *p++ = (uint8_t)(frame_length >> 16); @@ -191,7 +191,7 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, *p++ = (uint8_t)(error_code >> 16); *p++ = (uint8_t)(error_code >> 8); *p++ = (uint8_t)(error_code); - GPR_ASSERT(p == GPR_SLICE_END_PTR(header)); + GPR_ASSERT(p == GRPC_SLICE_END_PTR(header)); grpc_slice_buffer_add(slice_buffer, header); grpc_slice_buffer_add(slice_buffer, debug_data); } diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.c b/src/core/ext/transport/chttp2/transport/frame_ping.c index f8d73539ae..18ecb4d1e9 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.c +++ b/src/core/ext/transport/chttp2/transport/frame_ping.c @@ -42,7 +42,7 @@ grpc_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes) { grpc_slice slice = grpc_slice_malloc(9 + 8); - uint8_t *p = GPR_SLICE_START_PTR(slice); + uint8_t *p = GRPC_SLICE_START_PTR(slice); *p++ = 0; *p++ = 0; @@ -77,8 +77,8 @@ grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_slice slice, int is_last) { - uint8_t *const beg = GPR_SLICE_START_PTR(slice); - uint8_t *const end = GPR_SLICE_END_PTR(slice); + uint8_t *const beg = GRPC_SLICE_START_PTR(slice); + uint8_t *const end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; grpc_chttp2_ping_parser *p = parser; diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c index 7def454915..75e4101035 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -47,7 +47,7 @@ grpc_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code, static const size_t frame_size = 13; grpc_slice slice = grpc_slice_malloc(frame_size); stats->framing_bytes += frame_size; - uint8_t *p = GPR_SLICE_START_PTR(slice); + uint8_t *p = GRPC_SLICE_START_PTR(slice); // Frame size. *p++ = 0; @@ -90,8 +90,8 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_slice slice, int is_last) { - uint8_t *const beg = GPR_SLICE_START_PTR(slice); - uint8_t *const end = GPR_SLICE_END_PTR(slice); + uint8_t *const beg = GRPC_SLICE_START_PTR(slice); + uint8_t *const end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; grpc_chttp2_rst_stream_parser *p = parser; diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c index d9ea1f91a7..d3b235183b 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.c +++ b/src/core/ext/transport/chttp2/transport/frame_settings.c @@ -94,7 +94,7 @@ grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, } output = grpc_slice_malloc(9 + 6 * n); - p = fill_header(GPR_SLICE_START_PTR(output), 6 * n, 0); + p = fill_header(GRPC_SLICE_START_PTR(output), 6 * n, 0); for (i = 0; i < count; i++) { if (new[i] != old[i] || (force_mask & (1u << i)) != 0) { @@ -109,14 +109,14 @@ grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, } } - GPR_ASSERT(p == GPR_SLICE_END_PTR(output)); + GPR_ASSERT(p == GRPC_SLICE_END_PTR(output)); return output; } grpc_slice grpc_chttp2_settings_ack_create(void) { grpc_slice output = grpc_slice_malloc(9); - fill_header(GPR_SLICE_START_PTR(output), 0, GRPC_CHTTP2_FLAG_ACK); + fill_header(GRPC_SLICE_START_PTR(output), 0, GRPC_CHTTP2_FLAG_ACK); return output; } @@ -148,8 +148,8 @@ grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx, void *p, grpc_chttp2_stream *s, grpc_slice slice, int is_last) { grpc_chttp2_settings_parser *parser = p; - const uint8_t *cur = GPR_SLICE_START_PTR(slice); - const uint8_t *end = GPR_SLICE_END_PTR(slice); + const uint8_t *cur = GRPC_SLICE_START_PTR(slice); + const uint8_t *end = GRPC_SLICE_END_PTR(slice); char *msg; if (parser->is_ack) { diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.c b/src/core/ext/transport/chttp2/transport/frame_window_update.c index b32f1403e1..31a31c2871 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.c +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.c @@ -43,7 +43,7 @@ grpc_slice grpc_chttp2_window_update_create( static const size_t frame_size = 13; grpc_slice slice = grpc_slice_malloc(frame_size); stats->header_bytes += frame_size; - uint8_t *p = GPR_SLICE_START_PTR(slice); + uint8_t *p = GRPC_SLICE_START_PTR(slice); GPR_ASSERT(window_update); @@ -82,8 +82,8 @@ grpc_error *grpc_chttp2_window_update_parser_begin_frame( grpc_error *grpc_chttp2_window_update_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_slice slice, int is_last) { - uint8_t *const beg = GPR_SLICE_START_PTR(slice); - uint8_t *const end = GPR_SLICE_END_PTR(slice); + uint8_t *const beg = GRPC_SLICE_START_PTR(slice); + uint8_t *const end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; grpc_chttp2_window_update_parser *p = parser; diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c index d8de7d0719..3c5bcd3412 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c @@ -104,7 +104,7 @@ static void finish_frame(framer_state *st, int is_header_boundary, type = st->is_first_frame ? GRPC_CHTTP2_FRAME_HEADER : GRPC_CHTTP2_FRAME_CONTINUATION; fill_header( - GPR_SLICE_START_PTR(st->output->slices[st->header_idx]), type, + GRPC_SLICE_START_PTR(st->output->slices[st->header_idx]), type, st->stream_id, st->output->length - st->output_length_at_start_of_frame, (uint8_t)((is_last_in_stream ? GRPC_CHTTP2_DATA_FLAG_END_STREAM : 0) | (is_header_boundary ? GRPC_CHTTP2_DATA_FLAG_END_HEADERS : 0))); @@ -148,7 +148,7 @@ static void inc_filter(uint8_t idx, uint32_t *sum, uint8_t *elems) { } static void add_header_data(framer_state *st, grpc_slice slice) { - size_t len = GPR_SLICE_LENGTH(slice); + size_t len = GRPC_SLICE_LENGTH(slice); size_t remaining; if (len == 0) return; remaining = st->max_frame_size + st->output_length_at_start_of_frame - @@ -269,8 +269,8 @@ static void emit_indexed(grpc_chttp2_hpack_compressor *c, uint32_t elem_index, } static grpc_slice get_wire_value(grpc_mdelem *elem, uint8_t *huffman_prefix) { - if (grpc_is_binary_header((const char *)GPR_SLICE_START_PTR(elem->key->slice), - GPR_SLICE_LENGTH(elem->key->slice))) { + if (grpc_is_binary_header((const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice))) { *huffman_prefix = 0x80; return grpc_mdstr_as_base64_encoded_and_huffman_compressed(elem->value); } @@ -285,7 +285,7 @@ static void emit_lithdr_incidx(grpc_chttp2_hpack_compressor *c, uint32_t len_pfx = GRPC_CHTTP2_VARINT_LENGTH(key_index, 2); uint8_t huffman_prefix; grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); - size_t len_val = GPR_SLICE_LENGTH(value_slice); + size_t len_val = GRPC_SLICE_LENGTH(value_slice); uint32_t len_val_len; GPR_ASSERT(len_val <= UINT32_MAX); len_val_len = GRPC_CHTTP2_VARINT_LENGTH((uint32_t)len_val, 1); @@ -302,7 +302,7 @@ static void emit_lithdr_noidx(grpc_chttp2_hpack_compressor *c, uint32_t len_pfx = GRPC_CHTTP2_VARINT_LENGTH(key_index, 4); uint8_t huffman_prefix; grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); - size_t len_val = GPR_SLICE_LENGTH(value_slice); + size_t len_val = GRPC_SLICE_LENGTH(value_slice); uint32_t len_val_len; GPR_ASSERT(len_val <= UINT32_MAX); len_val_len = GRPC_CHTTP2_VARINT_LENGTH((uint32_t)len_val, 1); @@ -315,14 +315,14 @@ static void emit_lithdr_noidx(grpc_chttp2_hpack_compressor *c, static void emit_lithdr_incidx_v(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem, framer_state *st) { - uint32_t len_key = (uint32_t)GPR_SLICE_LENGTH(elem->key->slice); + uint32_t len_key = (uint32_t)GRPC_SLICE_LENGTH(elem->key->slice); uint8_t huffman_prefix; grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); - uint32_t len_val = (uint32_t)GPR_SLICE_LENGTH(value_slice); + uint32_t len_val = (uint32_t)GRPC_SLICE_LENGTH(value_slice); uint32_t len_key_len = GRPC_CHTTP2_VARINT_LENGTH(len_key, 1); uint32_t len_val_len = GRPC_CHTTP2_VARINT_LENGTH(len_val, 1); GPR_ASSERT(len_key <= UINT32_MAX); - GPR_ASSERT(GPR_SLICE_LENGTH(value_slice) <= UINT32_MAX); + GPR_ASSERT(GRPC_SLICE_LENGTH(value_slice) <= UINT32_MAX); *add_tiny_header_data(st, 1) = 0x40; GRPC_CHTTP2_WRITE_VARINT(len_key, 1, 0x00, add_tiny_header_data(st, len_key_len), len_key_len); @@ -334,14 +334,14 @@ static void emit_lithdr_incidx_v(grpc_chttp2_hpack_compressor *c, static void emit_lithdr_noidx_v(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem, framer_state *st) { - uint32_t len_key = (uint32_t)GPR_SLICE_LENGTH(elem->key->slice); + uint32_t len_key = (uint32_t)GRPC_SLICE_LENGTH(elem->key->slice); uint8_t huffman_prefix; grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); - uint32_t len_val = (uint32_t)GPR_SLICE_LENGTH(value_slice); + uint32_t len_val = (uint32_t)GRPC_SLICE_LENGTH(value_slice); uint32_t len_key_len = GRPC_CHTTP2_VARINT_LENGTH(len_key, 1); uint32_t len_val_len = GRPC_CHTTP2_VARINT_LENGTH(len_val, 1); GPR_ASSERT(len_key <= UINT32_MAX); - GPR_ASSERT(GPR_SLICE_LENGTH(value_slice) <= UINT32_MAX); + GPR_ASSERT(GRPC_SLICE_LENGTH(value_slice) <= UINT32_MAX); *add_tiny_header_data(st, 1) = 0x00; GRPC_CHTTP2_WRITE_VARINT(len_key, 1, 0x00, add_tiny_header_data(st, len_key_len), len_key_len); @@ -373,8 +373,8 @@ static void hpack_enc(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem, uint32_t indices_key; int should_add_elem; - GPR_ASSERT(GPR_SLICE_LENGTH(elem->key->slice) > 0); - if (GPR_SLICE_START_PTR(elem->key->slice)[0] != ':') { /* regular header */ + GPR_ASSERT(GRPC_SLICE_LENGTH(elem->key->slice) > 0); + if (GRPC_SLICE_START_PTR(elem->key->slice)[0] != ':') { /* regular header */ st->seen_regular_header = 1; } else { GPR_ASSERT( diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 0e721b181a..3c1c6ba5a6 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -1502,8 +1502,8 @@ static grpc_error *is_binary_indexed_header(grpc_chttp2_hpack_parser *p, GRPC_ERROR_INT_SIZE, (intptr_t)p->table.num_ents); } *is = - grpc_is_binary_header((const char *)GPR_SLICE_START_PTR(elem->key->slice), - GPR_SLICE_LENGTH(elem->key->slice)); + grpc_is_binary_header((const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice)); return GRPC_ERROR_NONE; } @@ -1586,10 +1586,10 @@ grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx, grpc_chttp2_hpack_parser *parser = hpack_parser; GPR_TIMER_BEGIN("grpc_chttp2_hpack_parser_parse", 0); if (s != NULL) { - s->stats.incoming.header_bytes += GPR_SLICE_LENGTH(slice); + s->stats.incoming.header_bytes += GRPC_SLICE_LENGTH(slice); } grpc_error *error = grpc_chttp2_hpack_parser_parse( - exec_ctx, parser, GPR_SLICE_START_PTR(slice), GPR_SLICE_END_PTR(slice)); + exec_ctx, parser, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_END_PTR(slice)); if (error != GRPC_ERROR_NONE) { GPR_TIMER_END("grpc_chttp2_hpack_parser_parse", 0); return error; diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.c b/src/core/ext/transport/chttp2/transport/hpack_table.c index 2b73ec969e..2dc793d304 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.c +++ b/src/core/ext/transport/chttp2/transport/hpack_table.c @@ -226,8 +226,8 @@ grpc_mdelem *grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl *tbl, /* Evict one element from the table */ static void evict1(grpc_chttp2_hptbl *tbl) { grpc_mdelem *first_ent = tbl->ents[tbl->first_ent]; - size_t elem_bytes = GPR_SLICE_LENGTH(first_ent->key->slice) + - GPR_SLICE_LENGTH(first_ent->value->slice) + + size_t elem_bytes = GRPC_SLICE_LENGTH(first_ent->key->slice) + + GRPC_SLICE_LENGTH(first_ent->value->slice) + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; GPR_ASSERT(elem_bytes <= tbl->mem_used); tbl->mem_used -= (uint32_t)elem_bytes; @@ -298,8 +298,8 @@ grpc_error *grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, grpc_error *grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { /* determine how many bytes of buffer this entry represents */ - size_t elem_bytes = GPR_SLICE_LENGTH(md->key->slice) + - GPR_SLICE_LENGTH(md->value->slice) + + size_t elem_bytes = GRPC_SLICE_LENGTH(md->key->slice) + + GRPC_SLICE_LENGTH(md->value->slice) + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; if (tbl->current_table_bytes > tbl->max_bytes) { diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 6941a1e397..cb88fd5baf 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -73,8 +73,8 @@ static grpc_error *parse_frame_slice(grpc_exec_ctx *exec_ctx, grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_slice slice) { - uint8_t *beg = GPR_SLICE_START_PTR(slice); - uint8_t *end = GPR_SLICE_END_PTR(slice); + uint8_t *beg = GRPC_SLICE_START_PTR(slice); + uint8_t *end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; grpc_error *err; diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 6f55b69c84..73fda07ee1 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -521,7 +521,7 @@ static void create_grpc_frame(grpc_slice_buffer *write_slice_buffer, char **pp_write_buffer, size_t *p_write_buffer_size) { grpc_slice slice = grpc_slice_buffer_take_first(write_slice_buffer); - size_t length = GPR_SLICE_LENGTH(slice); + size_t length = GRPC_SLICE_LENGTH(slice); *p_write_buffer_size = length + GRPC_HEADER_SIZE_IN_BYTES; /* This is freed in the on_write_completed callback */ char *write_buffer = gpr_malloc(length + GRPC_HEADER_SIZE_IN_BYTES); @@ -534,7 +534,7 @@ static void create_grpc_frame(grpc_slice_buffer *write_slice_buffer, *p++ = (uint8_t)(length >> 8); *p++ = (uint8_t)(length); /* append actual data */ - memcpy(p, GPR_SLICE_START_PTR(slice), length); + memcpy(p, GRPC_SLICE_START_PTR(slice), length); } /* @@ -920,7 +920,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, CRONET_LOG(GPR_DEBUG, "read operation complete"); grpc_slice read_data_slice = grpc_slice_malloc((uint32_t)stream_state->rs.length_field); - uint8_t *dst_p = GPR_SLICE_START_PTR(read_data_slice); + uint8_t *dst_p = GRPC_SLICE_START_PTR(read_data_slice); memcpy(dst_p, stream_state->rs.read_buffer, (size_t)stream_state->rs.length_field); free_read_buffer(s); diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 110c1cb546..0714f31bdd 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -176,9 +176,9 @@ static void continue_send_message(grpc_exec_ctx *exec_ctx, while (grpc_byte_stream_next(exec_ctx, calld->send_op.send_message, &calld->incoming_slice, ~(size_t)0, &calld->got_slice)) { - memcpy(wrptr, GPR_SLICE_START_PTR(calld->incoming_slice), - GPR_SLICE_LENGTH(calld->incoming_slice)); - wrptr += GPR_SLICE_LENGTH(calld->incoming_slice); + memcpy(wrptr, GRPC_SLICE_START_PTR(calld->incoming_slice), + GRPC_SLICE_LENGTH(calld->incoming_slice)); + wrptr += GRPC_SLICE_LENGTH(calld->incoming_slice); grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); if (calld->send_length == calld->slices.length) { calld->send_message_blocked = false; diff --git a/src/core/lib/compression/message_compress.c b/src/core/lib/compression/message_compress.c index 501cb8be69..6c245acf61 100644 --- a/src/core/lib/compression/message_compress.c +++ b/src/core/lib/compression/message_compress.c @@ -51,22 +51,22 @@ static int zlib_body(z_stream* zs, grpc_slice_buffer* input, grpc_slice outbuf = grpc_slice_malloc(OUTPUT_BLOCK_SIZE); const uInt uint_max = ~(uInt)0; - GPR_ASSERT(GPR_SLICE_LENGTH(outbuf) <= uint_max); - zs->avail_out = (uInt)GPR_SLICE_LENGTH(outbuf); - zs->next_out = GPR_SLICE_START_PTR(outbuf); + GPR_ASSERT(GRPC_SLICE_LENGTH(outbuf) <= uint_max); + zs->avail_out = (uInt)GRPC_SLICE_LENGTH(outbuf); + zs->next_out = GRPC_SLICE_START_PTR(outbuf); flush = Z_NO_FLUSH; for (i = 0; i < input->count; i++) { if (i == input->count - 1) flush = Z_FINISH; - GPR_ASSERT(GPR_SLICE_LENGTH(input->slices[i]) <= uint_max); - zs->avail_in = (uInt)GPR_SLICE_LENGTH(input->slices[i]); - zs->next_in = GPR_SLICE_START_PTR(input->slices[i]); + GPR_ASSERT(GRPC_SLICE_LENGTH(input->slices[i]) <= uint_max); + zs->avail_in = (uInt)GRPC_SLICE_LENGTH(input->slices[i]); + zs->next_in = GRPC_SLICE_START_PTR(input->slices[i]); do { if (zs->avail_out == 0) { grpc_slice_buffer_add_indexed(output, outbuf); outbuf = grpc_slice_malloc(OUTPUT_BLOCK_SIZE); - GPR_ASSERT(GPR_SLICE_LENGTH(outbuf) <= uint_max); - zs->avail_out = (uInt)GPR_SLICE_LENGTH(outbuf); - zs->next_out = GPR_SLICE_START_PTR(outbuf); + GPR_ASSERT(GRPC_SLICE_LENGTH(outbuf) <= uint_max); + zs->avail_out = (uInt)GRPC_SLICE_LENGTH(outbuf); + zs->next_out = GRPC_SLICE_START_PTR(outbuf); } r = flate(zs, flush); if (r < 0 && r != Z_BUF_ERROR /* not fatal */) { diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 31294efcc6..fdb8abaa2d 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -144,7 +144,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, size_t i; for (i = 0; i < req->incoming.count; i++) { - if (GPR_SLICE_LENGTH(req->incoming.slices[i])) { + if (GRPC_SLICE_LENGTH(req->incoming.slices[i])) { req->have_read_byte = 1; grpc_error *err = grpc_http_parser_parse(&req->parser, req->incoming.slices[i], NULL); diff --git a/src/core/lib/http/parser.c b/src/core/lib/http/parser.c index 14abb1da69..2f84adc187 100644 --- a/src/core/lib/http/parser.c +++ b/src/core/lib/http/parser.c @@ -335,10 +335,10 @@ void grpc_http_response_destroy(grpc_http_response *response) { grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, grpc_slice slice, size_t *start_of_body) { - for (size_t i = 0; i < GPR_SLICE_LENGTH(slice); i++) { + for (size_t i = 0; i < GRPC_SLICE_LENGTH(slice); i++) { bool found_body_start = false; grpc_error *err = - addbyte(parser, GPR_SLICE_START_PTR(slice)[i], &found_body_start); + addbyte(parser, GRPC_SLICE_START_PTR(slice)[i], &found_body_start); if (err != GRPC_ERROR_NONE) return err; if (found_body_start && start_of_body != NULL) *start_of_body = i + 1; } diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 0d8bd04af9..584fc2fe2e 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -217,8 +217,8 @@ static void tcp_do_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { GPR_TIMER_BEGIN("tcp_continue_read", 0); for (i = 0; i < tcp->incoming_buffer->count; i++) { - iov[i].iov_base = GPR_SLICE_START_PTR(tcp->incoming_buffer->slices[i]); - iov[i].iov_len = GPR_SLICE_LENGTH(tcp->incoming_buffer->slices[i]); + iov[i].iov_base = GRPC_SLICE_START_PTR(tcp->incoming_buffer->slices[i]); + iov[i].iov_len = GRPC_SLICE_LENGTH(tcp->incoming_buffer->slices[i]); } msg.msg_name = NULL; @@ -348,11 +348,11 @@ static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) { iov_size != MAX_WRITE_IOVEC; iov_size++) { iov[iov_size].iov_base = - GPR_SLICE_START_PTR( + GRPC_SLICE_START_PTR( tcp->outgoing_buffer->slices[tcp->outgoing_slice_idx]) + tcp->outgoing_byte_idx; iov[iov_size].iov_len = - GPR_SLICE_LENGTH( + GRPC_SLICE_LENGTH( tcp->outgoing_buffer->slices[tcp->outgoing_slice_idx]) - tcp->outgoing_byte_idx; sending_length += iov[iov_size].iov_len; @@ -393,7 +393,7 @@ static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) { size_t slice_length; tcp->outgoing_slice_idx--; - slice_length = GPR_SLICE_LENGTH( + slice_length = GRPC_SLICE_LENGTH( tcp->outgoing_buffer->slices[tcp->outgoing_slice_idx]); if (slice_length > trailing) { tcp->outgoing_byte_idx = slice_length - trailing; diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index 05d6eeb240..f44829959d 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -59,9 +59,9 @@ typedef struct { grpc_closure *read_cb; grpc_closure *write_cb; - gpr_slice read_slice; - gpr_slice_buffer *read_slices; - gpr_slice_buffer *write_slices; + GRPC_SLICE read_slice; + GRPC_SLICE_buffer *read_slices; + GRPC_SLICE_buffer *write_slices; uv_buf_t *write_buffers; bool shutting_down; @@ -108,14 +108,14 @@ static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) { grpc_tcp *tcp = handle->data; (void)suggested_size; - tcp->read_slice = gpr_slice_malloc(GRPC_TCP_DEFAULT_READ_SLICE_SIZE); - buf->base = (char *)GPR_SLICE_START_PTR(tcp->read_slice); - buf->len = GPR_SLICE_LENGTH(tcp->read_slice); + tcp->read_slice = GRPC_SLICE_malloc(GRPC_TCP_DEFAULT_READ_SLICE_SIZE); + buf->base = (char *)GRPC_SLICE_START_PTR(tcp->read_slice); + buf->len = GRPC_SLICE_LENGTH(tcp->read_slice); } static void read_callback(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf) { - gpr_slice sub; + GRPC_SLICE sub; grpc_error *error; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_tcp *tcp = stream->data; @@ -132,8 +132,8 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, error = GRPC_ERROR_CREATE("EOF"); } else if (nread > 0) { // Successful read - sub = gpr_slice_sub_no_ref(tcp->read_slice, 0, (size_t)nread); - gpr_slice_buffer_add(tcp->read_slices, sub); + sub = GRPC_SLICE_sub_no_ref(tcp->read_slice, 0, (size_t)nread); + GRPC_SLICE_buffer_add(tcp->read_slices, sub); error = GRPC_ERROR_NONE; if (grpc_tcp_trace) { size_t i; @@ -157,14 +157,14 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, } static void uv_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *read_slices, grpc_closure *cb) { + GRPC_SLICE_buffer *read_slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; int status; grpc_error *error = GRPC_ERROR_NONE; GPR_ASSERT(tcp->read_cb == NULL); tcp->read_cb = cb; tcp->read_slices = read_slices; - gpr_slice_buffer_reset_and_unref(read_slices); + GRPC_SLICE_buffer_reset_and_unref(read_slices); TCP_REF(tcp, "read"); // TODO(murgatroid99): figure out what the return value here means status = @@ -204,13 +204,13 @@ static void write_callback(uv_write_t *req, int status) { } static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *write_slices, + GRPC_SLICE_buffer *write_slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; uv_buf_t *buffers; unsigned int buffer_count; unsigned int i; - gpr_slice *slice; + GRPC_SLICE *slice; uv_write_t *write_req; if (grpc_tcp_trace) { @@ -245,8 +245,8 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, buffers = gpr_malloc(sizeof(uv_buf_t) * buffer_count); for (i = 0; i < buffer_count; i++) { slice = &tcp->write_slices->slices[i]; - buffers[i].base = (char *)GPR_SLICE_START_PTR(*slice); - buffers[i].len = GPR_SLICE_LENGTH(*slice); + buffers[i].base = (char *)GRPC_SLICE_START_PTR(*slice); + buffers[i].len = GRPC_SLICE_LENGTH(*slice); } write_req = gpr_malloc(sizeof(uv_write_t)); write_req->data = tcp; diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index fda26f52a9..9fe7662e96 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -209,9 +209,9 @@ static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->read_slice = grpc_slice_malloc(8192); - buffer.len = (ULONG)GPR_SLICE_LENGTH( + buffer.len = (ULONG)GRPC_SLICE_LENGTH( tcp->read_slice); // we know slice size fits in 32bit. - buffer.buf = (char *)GPR_SLICE_START_PTR(tcp->read_slice); + buffer.buf = (char *)GRPC_SLICE_START_PTR(tcp->read_slice); TCP_REF(tcp, "read"); @@ -300,10 +300,10 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, } for (i = 0; i < tcp->write_slices->count; i++) { - len = GPR_SLICE_LENGTH(tcp->write_slices->slices[i]); + len = GRPC_SLICE_LENGTH(tcp->write_slices->slices[i]); GPR_ASSERT(len <= ULONG_MAX); buffers[i].len = (ULONG)len; - buffers[i].buf = (char *)GPR_SLICE_START_PTR(tcp->write_slices->slices[i]); + buffers[i].buf = (char *)GRPC_SLICE_START_PTR(tcp->write_slices->slices[i]); } /* First, let's try a synchronous, non-blocking write. */ diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index aaa82976fb..afe0e3d357 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -186,7 +186,7 @@ static grpc_error *create_default_creds_from_path( goto end; } json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(creds_data), GPR_SLICE_LENGTH(creds_data)); + (char *)GRPC_SLICE_START_PTR(creds_data), GRPC_SLICE_LENGTH(creds_data)); if (json == NULL) { char *dump = grpc_dump_slice(creds_data, GPR_DUMP_HEX | GPR_DUMP_ASCII); error = grpc_error_set_str(GRPC_ERROR_CREATE("Failed to parse JSON"), diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index 9cb8cd64f6..42bd89dd0a 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -89,12 +89,12 @@ static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, grpc_json *json; *buffer = grpc_base64_decode_with_len(str, len, 1); - if (GPR_SLICE_IS_EMPTY(*buffer)) { + if (GRPC_SLICE_IS_EMPTY(*buffer)) { gpr_log(GPR_ERROR, "Invalid base64."); return NULL; } - json = grpc_json_parse_string_with_len((char *)GPR_SLICE_START_PTR(*buffer), - GPR_SLICE_LENGTH(*buffer)); + json = grpc_json_parse_string_with_len((char *)GRPC_SLICE_START_PTR(*buffer), + GRPC_SLICE_LENGTH(*buffer)); if (json == NULL) { grpc_slice_unref(*buffer); gpr_log(GPR_ERROR, "JSON parsing error."); @@ -453,12 +453,12 @@ static BIGNUM *bignum_from_base64(const char *b64) { if (b64 == NULL) return NULL; bin = grpc_base64_decode(b64, 1); - if (GPR_SLICE_IS_EMPTY(bin)) { + if (GRPC_SLICE_IS_EMPTY(bin)) { gpr_log(GPR_ERROR, "Invalid base64 for big num."); return NULL; } - result = BN_bin2bn(GPR_SLICE_START_PTR(bin), - TSI_SIZE_AS_SIZE(GPR_SLICE_LENGTH(bin)), NULL); + result = BN_bin2bn(GRPC_SLICE_START_PTR(bin), + TSI_SIZE_AS_SIZE(GRPC_SLICE_LENGTH(bin)), NULL); grpc_slice_unref(bin); return result; } @@ -567,13 +567,13 @@ static int verify_jwt_signature(EVP_PKEY *key, const char *alg, gpr_log(GPR_ERROR, "EVP_DigestVerifyInit failed."); goto end; } - if (EVP_DigestVerifyUpdate(md_ctx, GPR_SLICE_START_PTR(signed_data), - GPR_SLICE_LENGTH(signed_data)) != 1) { + if (EVP_DigestVerifyUpdate(md_ctx, GRPC_SLICE_START_PTR(signed_data), + GRPC_SLICE_LENGTH(signed_data)) != 1) { gpr_log(GPR_ERROR, "EVP_DigestVerifyUpdate failed."); goto end; } - if (EVP_DigestVerifyFinal(md_ctx, GPR_SLICE_START_PTR(signature), - GPR_SLICE_LENGTH(signature)) != 1) { + if (EVP_DigestVerifyFinal(md_ctx, GRPC_SLICE_START_PTR(signature), + GRPC_SLICE_LENGTH(signature)) != 1) { gpr_log(GPR_ERROR, "JWT signature verification failed."); goto end; } @@ -824,7 +824,7 @@ void grpc_jwt_verifier_verify(grpc_exec_ctx *exec_ctx, signed_jwt_len = (size_t)(dot - jwt); cur = dot + 1; signature = grpc_base64_decode(cur, 1); - if (GPR_SLICE_IS_EMPTY(signature)) goto error; + if (GRPC_SLICE_IS_EMPTY(signature)) goto error; retrieve_key_and_verify( exec_ctx, verifier_cb_ctx_create(verifier, pollset, header, claims, audience, diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 58d896b32e..07f16df51f 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -239,9 +239,9 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, } for (i = 0; i < h->incoming.count; i++) { - consumed_slice_size = GPR_SLICE_LENGTH(h->incoming.slices[i]); + consumed_slice_size = GRPC_SLICE_LENGTH(h->incoming.slices[i]); result = tsi_handshaker_process_bytes_from_peer( - h->handshaker, GPR_SLICE_START_PTR(h->incoming.slices[i]), + h->handshaker, GRPC_SLICE_START_PTR(h->incoming.slices[i]), &consumed_slice_size); if (!tsi_handshaker_is_in_progress(h->handshaker)) break; } @@ -267,7 +267,7 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, /* Handshake is done and successful this point. */ has_left_overs_in_current_slice = - (consumed_slice_size < GPR_SLICE_LENGTH(h->incoming.slices[i])); + (consumed_slice_size < GRPC_SLICE_LENGTH(h->incoming.slices[i])); num_left_overs = (has_left_overs_in_current_slice ? 1 : 0) + h->incoming.count - i - 1; if (num_left_overs == 0) { diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 9acfd421a7..fba3314812 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -124,8 +124,8 @@ static void flush_read_staging_buffer(secure_endpoint *ep, uint8_t **cur, uint8_t **end) { grpc_slice_buffer_add(ep->read_buffer, ep->read_staging_buffer); ep->read_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); - *cur = GPR_SLICE_START_PTR(ep->read_staging_buffer); - *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); + *cur = GRPC_SLICE_START_PTR(ep->read_staging_buffer); + *end = GRPC_SLICE_END_PTR(ep->read_staging_buffer); } static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, @@ -150,8 +150,8 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, uint8_t keep_looping = 0; tsi_result result = TSI_OK; secure_endpoint *ep = (secure_endpoint *)user_data; - uint8_t *cur = GPR_SLICE_START_PTR(ep->read_staging_buffer); - uint8_t *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); + uint8_t *cur = GRPC_SLICE_START_PTR(ep->read_staging_buffer); + uint8_t *end = GRPC_SLICE_END_PTR(ep->read_staging_buffer); if (error != GRPC_ERROR_NONE) { grpc_slice_buffer_reset_and_unref(ep->read_buffer); @@ -163,8 +163,8 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, /* TODO(yangg) check error, maybe bail out early */ for (i = 0; i < ep->source_buffer.count; i++) { grpc_slice encrypted = ep->source_buffer.slices[i]; - uint8_t *message_bytes = GPR_SLICE_START_PTR(encrypted); - size_t message_size = GPR_SLICE_LENGTH(encrypted); + uint8_t *message_bytes = GRPC_SLICE_START_PTR(encrypted); + size_t message_size = GRPC_SLICE_LENGTH(encrypted); while (message_size > 0 || keep_looping) { size_t unprotected_buffer_size_written = (size_t)(end - cur); @@ -199,12 +199,12 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, if (result != TSI_OK) break; } - if (cur != GPR_SLICE_START_PTR(ep->read_staging_buffer)) { + if (cur != GRPC_SLICE_START_PTR(ep->read_staging_buffer)) { grpc_slice_buffer_add( ep->read_buffer, grpc_slice_split_head( &ep->read_staging_buffer, - (size_t)(cur - GPR_SLICE_START_PTR(ep->read_staging_buffer)))); + (size_t)(cur - GRPC_SLICE_START_PTR(ep->read_staging_buffer)))); } /* TODO(yangg) experiment with moving this block after read_cb to see if it @@ -244,8 +244,8 @@ static void flush_write_staging_buffer(secure_endpoint *ep, uint8_t **cur, uint8_t **end) { grpc_slice_buffer_add(&ep->output_buffer, ep->write_staging_buffer); ep->write_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); - *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); - *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); + *cur = GRPC_SLICE_START_PTR(ep->write_staging_buffer); + *end = GRPC_SLICE_END_PTR(ep->write_staging_buffer); } static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, @@ -255,8 +255,8 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, unsigned i; tsi_result result = TSI_OK; secure_endpoint *ep = (secure_endpoint *)secure_ep; - uint8_t *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); - uint8_t *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); + uint8_t *cur = GRPC_SLICE_START_PTR(ep->write_staging_buffer); + uint8_t *end = GRPC_SLICE_END_PTR(ep->write_staging_buffer); grpc_slice_buffer_reset_and_unref(&ep->output_buffer); @@ -271,8 +271,8 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, for (i = 0; i < slices->count; i++) { grpc_slice plain = slices->slices[i]; - uint8_t *message_bytes = GPR_SLICE_START_PTR(plain); - size_t message_size = GPR_SLICE_LENGTH(plain); + uint8_t *message_bytes = GRPC_SLICE_START_PTR(plain); + size_t message_size = GRPC_SLICE_LENGTH(plain); while (message_size > 0) { size_t protected_buffer_size_to_send = (size_t)(end - cur); size_t processed_message_size = message_size; @@ -311,12 +311,12 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, flush_write_staging_buffer(ep, &cur, &end); } } while (still_pending_size > 0); - if (cur != GPR_SLICE_START_PTR(ep->write_staging_buffer)) { + if (cur != GRPC_SLICE_START_PTR(ep->write_staging_buffer)) { grpc_slice_buffer_add( &ep->output_buffer, grpc_slice_split_head( &ep->write_staging_buffer, - (size_t)(cur - GPR_SLICE_START_PTR(ep->write_staging_buffer)))); + (size_t)(cur - GRPC_SLICE_START_PTR(ep->write_staging_buffer)))); } } diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index cea94bfbba..3d39cf5dda 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -656,7 +656,7 @@ static grpc_slice compute_default_pem_root_certs_once(void) { /* Try overridden roots if needed. */ grpc_ssl_roots_override_result ovrd_res = GRPC_SSL_ROOTS_OVERRIDE_FAIL; - if (GPR_SLICE_IS_EMPTY(result) && ssl_roots_override_cb != NULL) { + if (GRPC_SLICE_IS_EMPTY(result) && ssl_roots_override_cb != NULL) { char *pem_root_certs = NULL; ovrd_res = ssl_roots_override_cb(&pem_root_certs); if (ovrd_res == GRPC_SSL_ROOTS_OVERRIDE_OK) { @@ -666,7 +666,7 @@ static grpc_slice compute_default_pem_root_certs_once(void) { } /* Fall back to installed certs if needed. */ - if (GPR_SLICE_IS_EMPTY(result) && + if (GRPC_SLICE_IS_EMPTY(result) && ovrd_res != GRPC_SSL_ROOTS_OVERRIDE_FAIL_PERMANENTLY) { GRPC_LOG_IF_ERROR("load_file", grpc_load_file(installed_roots_path, 0, &result)); @@ -714,8 +714,8 @@ size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs) { loading all the roots once for the lifetime of the process. */ static gpr_once once = GPR_ONCE_INIT; gpr_once_init(&once, init_default_pem_root_certs); - *pem_root_certs = GPR_SLICE_START_PTR(default_pem_root_certs); - return GPR_SLICE_LENGTH(default_pem_root_certs); + *pem_root_certs = GRPC_SLICE_START_PTR(default_pem_root_certs); + return GRPC_SLICE_LENGTH(default_pem_root_certs); } grpc_security_status grpc_ssl_channel_security_connector_create( diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index 39973ab036..dd465be6f5 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -78,7 +78,7 @@ static grpc_metadata_array metadata_batch_to_md_array( usr_md = &result.metadata[result.count++]; usr_md->key = grpc_mdstr_as_c_string(key); usr_md->value = grpc_mdstr_as_c_string(value); - usr_md->value_length = GPR_SLICE_LENGTH(value->slice); + usr_md->value_length = GRPC_SLICE_LENGTH(value->slice); } return result; } @@ -92,14 +92,14 @@ static grpc_mdelem *remove_consumed_md(void *user_data, grpc_mdelem *md) { /* Maybe we could do a pointer comparison but we do not have any guarantee that the metadata processor used the same pointers for consumed_md in the callback. */ - if (GPR_SLICE_LENGTH(md->key->slice) != strlen(consumed_md->key) || - GPR_SLICE_LENGTH(md->value->slice) != consumed_md->value_length) { + if (GRPC_SLICE_LENGTH(md->key->slice) != strlen(consumed_md->key) || + GRPC_SLICE_LENGTH(md->value->slice) != consumed_md->value_length) { continue; } - if (memcmp(GPR_SLICE_START_PTR(md->key->slice), consumed_md->key, - GPR_SLICE_LENGTH(md->key->slice)) == 0 && - memcmp(GPR_SLICE_START_PTR(md->value->slice), consumed_md->value, - GPR_SLICE_LENGTH(md->value->slice)) == 0) { + if (memcmp(GRPC_SLICE_START_PTR(md->key->slice), consumed_md->key, + GRPC_SLICE_LENGTH(md->key->slice)) == 0 && + memcmp(GRPC_SLICE_START_PTR(md->value->slice), consumed_md->value, + GRPC_SLICE_LENGTH(md->value->slice)) == 0) { return NULL; /* Delete. */ } } diff --git a/src/core/lib/security/util/b64.c b/src/core/lib/security/util/b64.c index f4f0092c3d..6270277914 100644 --- a/src/core/lib/security/util/b64.c +++ b/src/core/lib/security/util/b64.c @@ -185,7 +185,7 @@ static int decode_group(const unsigned char *codes, size_t num_codes, grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, int url_safe) { grpc_slice result = grpc_slice_malloc(b64_len); - unsigned char *current = GPR_SLICE_START_PTR(result); + unsigned char *current = GRPC_SLICE_START_PTR(result); size_t result_size = 0; unsigned char codes[4]; size_t num_codes = 0; @@ -224,7 +224,7 @@ grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, !decode_group(codes, num_codes, current, &result_size)) { goto fail; } - GPR_SLICE_SET_LENGTH(result, result_size); + GRPC_SLICE_SET_LENGTH(result, result_size); return result; fail: diff --git a/src/core/lib/slice/percent_encoding.c b/src/core/lib/slice/percent_encoding.c index 19f5f96cc3..b9e35f1c71 100644 --- a/src/core/lib/slice/percent_encoding.c +++ b/src/core/lib/slice/percent_encoding.c @@ -55,8 +55,8 @@ grpc_slice grpc_percent_encode_slice(grpc_slice slice, // first pass: count the number of bytes needed to output this string size_t output_length = 0; - const uint8_t *slice_start = GPR_SLICE_START_PTR(slice); - const uint8_t *slice_end = GPR_SLICE_END_PTR(slice); + const uint8_t *slice_start = GRPC_SLICE_START_PTR(slice); + const uint8_t *slice_end = GRPC_SLICE_END_PTR(slice); const uint8_t *p; bool any_reserved_bytes = false; for (p = slice_start; p < slice_end; p++) { @@ -70,7 +70,7 @@ grpc_slice grpc_percent_encode_slice(grpc_slice slice, } // second pass: actually encode grpc_slice out = grpc_slice_malloc(output_length); - uint8_t *q = GPR_SLICE_START_PTR(out); + uint8_t *q = GRPC_SLICE_START_PTR(out); for (p = slice_start; p < slice_end; p++) { if (is_unreserved_character(*p, unreserved_bytes)) { *q++ = *p; @@ -80,7 +80,7 @@ grpc_slice grpc_percent_encode_slice(grpc_slice slice, *q++ = hex[*p & 15]; } } - GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); + GPR_ASSERT(q == GRPC_SLICE_END_PTR(out)); return out; } @@ -100,8 +100,8 @@ static uint8_t dehex(uint8_t c) { bool grpc_strict_percent_decode_slice(grpc_slice slice_in, const uint8_t *unreserved_bytes, grpc_slice *slice_out) { - const uint8_t *p = GPR_SLICE_START_PTR(slice_in); - const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); + const uint8_t *p = GRPC_SLICE_START_PTR(slice_in); + const uint8_t *in_end = GRPC_SLICE_END_PTR(slice_in); size_t out_length = 0; bool any_percent_encoded_stuff = false; while (p != in_end) { @@ -122,9 +122,9 @@ bool grpc_strict_percent_decode_slice(grpc_slice slice_in, *slice_out = grpc_slice_ref(slice_in); return true; } - p = GPR_SLICE_START_PTR(slice_in); + p = GRPC_SLICE_START_PTR(slice_in); *slice_out = grpc_slice_malloc(out_length); - uint8_t *q = GPR_SLICE_START_PTR(*slice_out); + uint8_t *q = GRPC_SLICE_START_PTR(*slice_out); while (p != in_end) { if (*p == '%') { *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2])); @@ -133,13 +133,13 @@ bool grpc_strict_percent_decode_slice(grpc_slice slice_in, *q++ = *p++; } } - GPR_ASSERT(q == GPR_SLICE_END_PTR(*slice_out)); + GPR_ASSERT(q == GRPC_SLICE_END_PTR(*slice_out)); return true; } grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in) { - const uint8_t *p = GPR_SLICE_START_PTR(slice_in); - const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); + const uint8_t *p = GRPC_SLICE_START_PTR(slice_in); + const uint8_t *in_end = GRPC_SLICE_END_PTR(slice_in); size_t out_length = 0; bool any_percent_encoded_stuff = false; while (p != in_end) { @@ -160,9 +160,9 @@ grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in) { if (!any_percent_encoded_stuff) { return grpc_slice_ref(slice_in); } - p = GPR_SLICE_START_PTR(slice_in); + p = GRPC_SLICE_START_PTR(slice_in); grpc_slice out = grpc_slice_malloc(out_length); - uint8_t *q = GPR_SLICE_START_PTR(out); + uint8_t *q = GRPC_SLICE_START_PTR(out); while (p != in_end) { if (*p == '%') { if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) { @@ -175,6 +175,6 @@ grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in) { *q++ = *p++; } } - GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); + GPR_ASSERT(q == GRPC_SLICE_END_PTR(out)); return out; } diff --git a/src/core/lib/slice/slice.c b/src/core/lib/slice/slice.c index 1db1211938..54ff6f6baa 100644 --- a/src/core/lib/slice/slice.c +++ b/src/core/lib/slice/slice.c @@ -159,7 +159,7 @@ grpc_slice grpc_slice_new_with_len(void *p, size_t len, grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t length) { grpc_slice slice = grpc_slice_malloc(length); - memcpy(GPR_SLICE_START_PTR(slice), source, length); + memcpy(GRPC_SLICE_START_PTR(slice), source, length); return slice; } @@ -252,7 +252,7 @@ grpc_slice grpc_slice_sub(grpc_slice source, size_t begin, size_t end) { if (end - begin <= sizeof(subset.data.inlined.bytes)) { subset.refcount = NULL; subset.data.inlined.length = (uint8_t)(end - begin); - memcpy(subset.data.inlined.bytes, GPR_SLICE_START_PTR(source) + begin, + memcpy(subset.data.inlined.bytes, GRPC_SLICE_START_PTR(source) + begin, end - begin); } else { subset = grpc_slice_sub_no_ref(source, begin, end); @@ -336,15 +336,15 @@ grpc_slice grpc_slice_split_head(grpc_slice *source, size_t split) { } int grpc_slice_cmp(grpc_slice a, grpc_slice b) { - int d = (int)(GPR_SLICE_LENGTH(a) - GPR_SLICE_LENGTH(b)); + int d = (int)(GRPC_SLICE_LENGTH(a) - GRPC_SLICE_LENGTH(b)); if (d != 0) return d; - return memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), - GPR_SLICE_LENGTH(a)); + return memcmp(GRPC_SLICE_START_PTR(a), GRPC_SLICE_START_PTR(b), + GRPC_SLICE_LENGTH(a)); } int grpc_slice_str_cmp(grpc_slice a, const char *b) { size_t b_length = strlen(b); - int d = (int)(GPR_SLICE_LENGTH(a) - b_length); + int d = (int)(GRPC_SLICE_LENGTH(a) - b_length); if (d != 0) return d; - return memcmp(GPR_SLICE_START_PTR(a), b, b_length); + return memcmp(GRPC_SLICE_START_PTR(a), b, b_length); } diff --git a/src/core/lib/slice/slice_buffer.c b/src/core/lib/slice/slice_buffer.c index a18309f3c4..8416237631 100644 --- a/src/core/lib/slice/slice_buffer.c +++ b/src/core/lib/slice/slice_buffer.c @@ -98,7 +98,7 @@ size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer *sb, grpc_slice s) { size_t out = sb->count; maybe_embiggen(sb); sb->slices[out] = s; - sb->length += GPR_SLICE_LENGTH(s); + sb->length += GRPC_SLICE_LENGTH(s); sb->count = out + 1; return out; } @@ -112,18 +112,18 @@ void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice s) { writes */ if (!s.refcount && n) { grpc_slice *back = &sb->slices[n - 1]; - if (!back->refcount && back->data.inlined.length < GPR_SLICE_INLINED_SIZE) { + if (!back->refcount && back->data.inlined.length < GRPC_SLICE_INLINED_SIZE) { if (s.data.inlined.length + back->data.inlined.length <= - GPR_SLICE_INLINED_SIZE) { + GRPC_SLICE_INLINED_SIZE) { memcpy(back->data.inlined.bytes + back->data.inlined.length, s.data.inlined.bytes, s.data.inlined.length); back->data.inlined.length = (uint8_t)(back->data.inlined.length + s.data.inlined.length); } else { - size_t cp1 = GPR_SLICE_INLINED_SIZE - back->data.inlined.length; + size_t cp1 = GRPC_SLICE_INLINED_SIZE - back->data.inlined.length; memcpy(back->data.inlined.bytes + back->data.inlined.length, s.data.inlined.bytes, cp1); - back->data.inlined.length = GPR_SLICE_INLINED_SIZE; + back->data.inlined.length = GRPC_SLICE_INLINED_SIZE; maybe_embiggen(sb); back = &sb->slices[n]; sb->count = n + 1; @@ -149,7 +149,7 @@ void grpc_slice_buffer_addn(grpc_slice_buffer *sb, grpc_slice *s, size_t n) { void grpc_slice_buffer_pop(grpc_slice_buffer *sb) { if (sb->count != 0) { size_t count = --sb->count; - sb->length -= GPR_SLICE_LENGTH(sb->slices[count]); + sb->length -= GRPC_SLICE_LENGTH(sb->slices[count]); } } @@ -222,7 +222,7 @@ void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, src_idx = 0; while (src_idx < src->capacity) { grpc_slice slice = src->slices[src_idx]; - size_t slice_len = GPR_SLICE_LENGTH(slice); + size_t slice_len = GRPC_SLICE_LENGTH(slice); if (n > slice_len) { grpc_slice_buffer_add(dst, slice); n -= slice_len; @@ -233,8 +233,8 @@ void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, break; } else { /* n < slice_len */ src->slices[src_idx] = grpc_slice_split_tail(&slice, n); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == n); - GPR_ASSERT(GPR_SLICE_LENGTH(src->slices[src_idx]) == slice_len - n); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == n); + GPR_ASSERT(GRPC_SLICE_LENGTH(src->slices[src_idx]) == slice_len - n); grpc_slice_buffer_add(dst, slice); break; } @@ -254,7 +254,7 @@ void grpc_slice_buffer_trim_end(grpc_slice_buffer *sb, size_t n, for (;;) { size_t idx = sb->count - 1; grpc_slice slice = sb->slices[idx]; - size_t slice_len = GPR_SLICE_LENGTH(slice); + size_t slice_len = GRPC_SLICE_LENGTH(slice); if (slice_len > n) { sb->slices[idx] = grpc_slice_split_head(&slice, slice_len - n); grpc_slice_buffer_add_indexed(garbage, slice); @@ -277,6 +277,6 @@ grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *sb) { slice = sb->slices[0]; memmove(&sb->slices[0], &sb->slices[1], (sb->count - 1) * sizeof(grpc_slice)); sb->count--; - sb->length -= GPR_SLICE_LENGTH(slice); + sb->length -= GRPC_SLICE_LENGTH(slice); return slice; } diff --git a/src/core/lib/slice/slice_string_helpers.c b/src/core/lib/slice/slice_string_helpers.c index eaffb63686..4731762ece 100644 --- a/src/core/lib/slice/slice_string_helpers.c +++ b/src/core/lib/slice/slice_string_helpers.c @@ -40,7 +40,7 @@ #include "src/core/lib/support/string.h" char *grpc_dump_slice(grpc_slice s, uint32_t flags) { - return gpr_dump((const char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s), + return gpr_dump((const char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s), flags); } @@ -53,8 +53,8 @@ static int slice_find_separator_offset(const grpc_slice str, const char *sep, const size_t read_offset, size_t *begin, size_t *end) { size_t i; - const uint8_t *str_ptr = GPR_SLICE_START_PTR(str) + read_offset; - const size_t str_len = GPR_SLICE_LENGTH(str) - read_offset; + const uint8_t *str_ptr = GRPC_SLICE_START_PTR(str) + read_offset; + const size_t str_len = GRPC_SLICE_LENGTH(str) - read_offset; const size_t sep_len = strlen(sep); if (str_len < sep_len) { return 0; @@ -82,7 +82,7 @@ void grpc_slice_split(grpc_slice str, const char *sep, grpc_slice_buffer *dst) { } while (slice_find_separator_offset(str, sep, end + sep_len, &begin, &end) != 0); grpc_slice_buffer_add_indexed( - dst, grpc_slice_sub(str, end + sep_len, GPR_SLICE_LENGTH(str))); + dst, grpc_slice_sub(str, end + sep_len, GRPC_SLICE_LENGTH(str))); } else { /* no sep found, add whole input */ grpc_slice_buffer_add_indexed(dst, grpc_slice_ref(str)); } diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index 6bf3c01e65..6a1ef2ba2d 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -119,11 +119,11 @@ grpc_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader) { size_t bytes_read = 0; const size_t input_size = grpc_byte_buffer_length(reader->buffer_out); grpc_slice out_slice = grpc_slice_malloc(input_size); - uint8_t *const outbuf = GPR_SLICE_START_PTR(out_slice); /* just an alias */ + uint8_t *const outbuf = GRPC_SLICE_START_PTR(out_slice); /* just an alias */ while (grpc_byte_buffer_reader_next(reader, &in_slice) != 0) { - const size_t slice_length = GPR_SLICE_LENGTH(in_slice); - memcpy(&(outbuf[bytes_read]), GPR_SLICE_START_PTR(in_slice), slice_length); + const size_t slice_length = GRPC_SLICE_LENGTH(in_slice); + memcpy(&(outbuf[bytes_read]), GRPC_SLICE_START_PTR(in_slice), slice_length); bytes_read += slice_length; grpc_slice_unref(in_slice); GPR_ASSERT(bytes_read <= input_size); diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 278f04a7f5..62c0ec83a1 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -518,8 +518,8 @@ static void set_encodings_accepted_by_peer(grpc_call *call, grpc_mdelem *mdel) { const grpc_slice *accept_encoding_entry_slice = &accept_encoding_parts.slices[i]; if (grpc_compression_algorithm_parse( - (const char *)GPR_SLICE_START_PTR(*accept_encoding_entry_slice), - GPR_SLICE_LENGTH(*accept_encoding_entry_slice), &algorithm)) { + (const char *)GRPC_SLICE_START_PTR(*accept_encoding_entry_slice), + GRPC_SLICE_LENGTH(*accept_encoding_entry_slice), &algorithm)) { GPR_BITSET(&call->encodings_accepted_by_peer, algorithm); } else { char *accept_encoding_entry_str = @@ -553,13 +553,13 @@ static void get_final_details(grpc_call *call, char **out_details, if (call->status[i].is_set) { if (call->status[i].details) { grpc_slice details = call->status[i].details->slice; - size_t len = GPR_SLICE_LENGTH(details); + size_t len = GRPC_SLICE_LENGTH(details); if (len + 1 > *out_details_capacity) { *out_details_capacity = GPR_MAX(len + 1, *out_details_capacity * 3 / 2); *out_details = gpr_realloc(*out_details, *out_details_capacity); } - memcpy(*out_details, GPR_SLICE_START_PTR(details), len); + memcpy(*out_details, GRPC_SLICE_START_PTR(details), len); (*out_details)[len] = 0; } else { goto no_details; @@ -901,7 +901,7 @@ static uint32_t decode_status(grpc_mdelem *md) { status = ((uint32_t)(intptr_t)user_data) - STATUS_OFFSET; } else { if (!gpr_parse_bytes_to_uint32(grpc_mdstr_as_c_string(md->value), - GPR_SLICE_LENGTH(md->value->slice), + GRPC_SLICE_LENGTH(md->value->slice), &status)) { status = GRPC_STATUS_UNKNOWN; /* could not parse status code */ } @@ -954,7 +954,7 @@ static grpc_mdelem *publish_app_metadata(grpc_call *call, grpc_mdelem *elem, mdusr = &dest->metadata[dest->count++]; mdusr->key = grpc_mdstr_as_c_string(elem->key); mdusr->value = grpc_mdstr_as_c_string(elem->value); - mdusr->value_length = GPR_SLICE_LENGTH(elem->value->slice); + mdusr->value_length = GRPC_SLICE_LENGTH(elem->value->slice); GPR_TIMER_END("publish_app_metadata", 0); return elem; } diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 2045e59e53..5d763b3875 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -460,7 +460,7 @@ static void destroy_channel(grpc_exec_ctx *exec_ctx, channel_data *chand, static void cpstr(char **dest, size_t *capacity, grpc_mdstr *value) { grpc_slice slice = value->slice; - size_t len = GPR_SLICE_LENGTH(slice); + size_t len = GRPC_SLICE_LENGTH(slice); if (len + 1 > *capacity) { *capacity = GPR_MAX(len + 1, *capacity * 2); diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index b8364c4cb7..a1748c033b 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -351,8 +351,8 @@ grpc_mdstr *grpc_mdstr_from_string(const char *str) { } grpc_mdstr *grpc_mdstr_from_slice(grpc_slice slice) { - grpc_mdstr *result = grpc_mdstr_from_buffer(GPR_SLICE_START_PTR(slice), - GPR_SLICE_LENGTH(slice)); + grpc_mdstr *result = grpc_mdstr_from_buffer(GRPC_SLICE_START_PTR(slice), + GRPC_SLICE_LENGTH(slice)); grpc_slice_unref(slice); return result; } @@ -373,9 +373,9 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) { idx = (hash + i) % GPR_ARRAY_SIZE(g_static_strtab); ss = g_static_strtab[idx]; if (ss == NULL) break; - if (ss->hash == hash && GPR_SLICE_LENGTH(ss->slice) == length && + if (ss->hash == hash && GRPC_SLICE_LENGTH(ss->slice) == length && (length == 0 || - 0 == memcmp(buf, GPR_SLICE_START_PTR(ss->slice), length))) { + 0 == memcmp(buf, GRPC_SLICE_START_PTR(ss->slice), length))) { GPR_TIMER_END("grpc_mdstr_from_buffer", 0); return ss; } @@ -386,8 +386,8 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) { /* search for an existing string */ idx = TABLE_IDX(hash, LOG2_STRTAB_SHARD_COUNT, shard->capacity); for (s = shard->strs[idx]; s; s = s->bucket_next) { - if (s->hash == hash && GPR_SLICE_LENGTH(s->slice) == length && - 0 == memcmp(buf, GPR_SLICE_START_PTR(s->slice), length)) { + if (s->hash == hash && GRPC_SLICE_LENGTH(s->slice) == length && + 0 == memcmp(buf, GRPC_SLICE_START_PTR(s->slice), length)) { if (gpr_atm_full_fetch_add(&s->refcnt, 1) == 0) { /* If we get here, we've added a ref to something that was about to * die - drop it immediately. @@ -404,7 +404,7 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) { } /* not found: create a new string */ - if (length + 1 < GPR_SLICE_INLINED_SIZE) { + if (length + 1 < GRPC_SLICE_INLINED_SIZE) { /* string data goes directly into the slice */ s = gpr_malloc(sizeof(internal_string)); gpr_atm_rel_store(&s->refcnt, 1); @@ -607,12 +607,12 @@ static size_t get_base64_encoded_size(size_t raw_length) { } size_t grpc_mdelem_get_size_in_hpack_table(grpc_mdelem *elem) { - size_t overhead_and_key = 32 + GPR_SLICE_LENGTH(elem->key->slice); - size_t value_len = GPR_SLICE_LENGTH(elem->value->slice); + size_t overhead_and_key = 32 + GRPC_SLICE_LENGTH(elem->key->slice); + size_t value_len = GRPC_SLICE_LENGTH(elem->value->slice); if (is_mdstr_static(elem->value)) { if (grpc_is_binary_header( - (const char *)GPR_SLICE_START_PTR(elem->key->slice), - GPR_SLICE_LENGTH(elem->key->slice))) { + (const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice))) { return overhead_and_key + get_base64_encoded_size(value_len); } else { return overhead_and_key + value_len; @@ -622,8 +622,8 @@ size_t grpc_mdelem_get_size_in_hpack_table(grpc_mdelem *elem) { gpr_atm current_size = gpr_atm_acq_load(&is->size_in_decoder_table); if (current_size == SIZE_IN_DECODER_TABLE_NOT_SET) { if (grpc_is_binary_header( - (const char *)GPR_SLICE_START_PTR(elem->key->slice), - GPR_SLICE_LENGTH(elem->key->slice))) { + (const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice))) { current_size = (gpr_atm)get_base64_encoded_size(value_len); } else { current_size = (gpr_atm)value_len; @@ -679,7 +679,7 @@ void grpc_mdelem_unref(grpc_mdelem *gmd DEBUG_ARGS) { } const char *grpc_mdstr_as_c_string(const grpc_mdstr *s) { - return (const char *)GPR_SLICE_START_PTR(s->slice); + return (const char *)GRPC_SLICE_START_PTR(s->slice); } size_t grpc_mdstr_length(const grpc_mdstr *s) { return GRPC_MDSTR_LENGTH(s); } diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index c63bce8310..8dcfbb98bb 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -149,7 +149,7 @@ void grpc_mdelem_unref(grpc_mdelem *md); Does not promise that the returned string has no embedded nulls however. */ const char *grpc_mdstr_as_c_string(const grpc_mdstr *s); -#define GRPC_MDSTR_LENGTH(s) (GPR_SLICE_LENGTH(s->slice)) +#define GRPC_MDSTR_LENGTH(s) (GRPC_SLICE_LENGTH(s->slice)) /* We add 32 bytes of padding as per RFC-7540 section 6.5.2. */ #define GRPC_MDELEM_LENGTH(e) \ diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index a178776d73..0bf5b0acf3 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -288,10 +288,10 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_recv_message_to_buffer( GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, ctx->recv_message)); while (grpc_byte_buffer_reader_next(&reader, &slice)) { - size_t len = GPR_SLICE_LENGTH(slice); + size_t len = GRPC_SLICE_LENGTH(slice); GPR_ASSERT(offset + len <= buffer_len); - memcpy(buffer + offset, GPR_SLICE_START_PTR(slice), - GPR_SLICE_LENGTH(slice)); + memcpy(buffer + offset, GRPC_SLICE_START_PTR(slice), + GRPC_SLICE_LENGTH(slice)); offset += len; grpc_slice_unref(slice); } diff --git a/src/node/ext/byte_buffer.cc b/src/node/ext/byte_buffer.cc index 76aa611a5d..399cdcd814 100644 --- a/src/node/ext/byte_buffer.cc +++ b/src/node/ext/byte_buffer.cc @@ -57,7 +57,7 @@ grpc_byte_buffer *BufferToByteBuffer(Local buffer) { int length = ::node::Buffer::Length(buffer); char *data = ::node::Buffer::Data(buffer); grpc_slice slice = grpc_slice_malloc(length); - memcpy(GPR_SLICE_START_PTR(slice), data, length); + memcpy(GRPC_SLICE_START_PTR(slice), data, length); grpc_byte_buffer *byte_buffer(grpc_raw_byte_buffer_create(&slice, 1)); grpc_slice_unref(slice); return byte_buffer; @@ -78,9 +78,9 @@ Local ByteBufferToBuffer(grpc_byte_buffer *buffer) { return scope.Escape(Nan::Undefined()); } grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); - size_t length = GPR_SLICE_LENGTH(slice); + size_t length = GRPC_SLICE_LENGTH(slice); char *result = new char[length]; - memcpy(result, GPR_SLICE_START_PTR(slice), length); + memcpy(result, GRPC_SLICE_START_PTR(slice), length); grpc_slice_unref(slice); return scope.Escape(MakeFastBuffer( Nan::NewBuffer(result, length, delete_buffer, NULL).ToLocalChecked())); diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m index 45d23d8651..6d2ad0a3bd 100644 --- a/src/objective-c/GRPCClient/private/NSData+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m @@ -54,10 +54,10 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer, // The slice contains uncompressed data even if compressed data was received // because the reader takes care of automatically decompressing it grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); - size_t uncompressed_length = GPR_SLICE_LENGTH(slice); + size_t uncompressed_length = GRPC_SLICE_LENGTH(slice); char *result = malloc(uncompressed_length); if (result) { - memcpy(result, GPR_SLICE_START_PTR(slice), uncompressed_length); + memcpy(result, GRPC_SLICE_START_PTR(slice), uncompressed_length); } grpc_slice_unref(slice); *array = result; diff --git a/src/php/ext/grpc/byte_buffer.c b/src/php/ext/grpc/byte_buffer.c index 2d48841dfa..b0269854e8 100644 --- a/src/php/ext/grpc/byte_buffer.c +++ b/src/php/ext/grpc/byte_buffer.c @@ -67,9 +67,9 @@ void byte_buffer_to_string(grpc_byte_buffer *buffer, char **out_string, } grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); - size_t length = GPR_SLICE_LENGTH(slice); + size_t length = GRPC_SLICE_LENGTH(slice); char *string = ecalloc(length + 1, sizeof(char)); - memcpy(string, GPR_SLICE_START_PTR(slice), length); + memcpy(string, GRPC_SLICE_START_PTR(slice), length); grpc_slice_unref(slice); *out_string = string; diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index ba26284b2c..ad766186bd 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -68,8 +68,8 @@ cdef extern from "grpc/grpc.h": grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t len) nogil # Declare functions for function-like macros (because Cython)... - void *grpc_slice_start_ptr "GPR_SLICE_START_PTR" (grpc_slice s) nogil - size_t grpc_slice_length "GPR_SLICE_LENGTH" (grpc_slice s) nogil + void *grpc_slice_start_ptr "GRPC_SLICE_START_PTR" (grpc_slice s) nogil + size_t grpc_slice_length "GRPC_SLICE_LENGTH" (grpc_slice s) nogil ctypedef enum gpr_clock_type: GPR_CLOCK_MONOTONIC diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index f0bacc3d7c..f97890e4a2 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -61,8 +61,8 @@ VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer *buffer) { return Qnil; } while (grpc_byte_buffer_reader_next(&reader, &next) != 0) { - rb_str_cat(rb_string, (const char *) GPR_SLICE_START_PTR(next), - GPR_SLICE_LENGTH(next)); + rb_str_cat(rb_string, (const char *) GRPC_SLICE_START_PTR(next), + GRPC_SLICE_LENGTH(next)); grpc_slice_unref(next); } return rb_string; diff --git a/test/core/bad_client/tests/large_metadata.c b/test/core/bad_client/tests/large_metadata.c index 124035c070..9c804e78c1 100644 --- a/test/core/bad_client/tests/large_metadata.c +++ b/test/core/bad_client/tests/large_metadata.c @@ -192,7 +192,7 @@ static void client_validator(grpc_slice_buffer *incoming) { grpc_slice last_frame = last_frame_buffer.slices[0]; // Construct expected frame. grpc_slice expected = grpc_slice_malloc(13); - uint8_t *p = GPR_SLICE_START_PTR(expected); + uint8_t *p = GRPC_SLICE_START_PTR(expected); // Length. *p++ = 0; *p++ = 0; diff --git a/test/core/bad_ssl/servers/cert.c b/test/core/bad_ssl/servers/cert.c index 52922f5d6b..9aadf452e2 100644 --- a/test/core/bad_ssl/servers/cert.c +++ b/test/core/bad_ssl/servers/cert.c @@ -61,8 +61,8 @@ int main(int argc, char **argv) { GPR_ASSERT(GRPC_LOG_IF_ERROR( "load_file", grpc_load_file("src/core/lib/tsi/test_creds/badserver.key", 1, &key_slice))); - pem_key_cert_pair.private_key = (const char *)GPR_SLICE_START_PTR(key_slice); - pem_key_cert_pair.cert_chain = (const char *)GPR_SLICE_START_PTR(cert_slice); + pem_key_cert_pair.private_key = (const char *)GRPC_SLICE_START_PTR(key_slice); + pem_key_cert_pair.cert_chain = (const char *)GRPC_SLICE_START_PTR(cert_slice); ssl_creds = grpc_ssl_server_credentials_create(NULL, &pem_key_cert_pair, 1, 0, NULL); diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c index c6963df85d..680850af33 100644 --- a/test/core/compression/message_compress_test.c +++ b/test/core/compression/message_compress_test.c @@ -70,8 +70,8 @@ static void assert_passthrough(grpc_slice value, GPR_INFO, "assert_passthrough: value_length=%" PRIuPTR " value_hash=0x%08x " "algorithm='%s' uncompressed_split='%s' compressed_split='%s'", - GPR_SLICE_LENGTH(value), - gpr_murmur_hash3(GPR_SLICE_START_PTR(value), GPR_SLICE_LENGTH(value), 0), + GRPC_SLICE_LENGTH(value), + gpr_murmur_hash3(GRPC_SLICE_START_PTR(value), GRPC_SLICE_LENGTH(value), 0), algorithm_name, grpc_slice_split_mode_name(uncompressed_split_mode), grpc_slice_split_mode_name(compressed_split_mode)); @@ -114,7 +114,7 @@ static void assert_passthrough(grpc_slice value, static grpc_slice repeated(char c, size_t length) { grpc_slice out = grpc_slice_malloc(length); - memset(GPR_SLICE_START_PTR(out), c, length); + memset(GRPC_SLICE_START_PTR(out), c, length); return out; } @@ -184,9 +184,9 @@ static void test_bad_decompression_data_crc(void) { grpc_msg_compress(GRPC_COMPRESS_GZIP, &input, &corrupted); /* corrupt the output by smashing the CRC */ GPR_ASSERT(corrupted.count > 1); - GPR_ASSERT(GPR_SLICE_LENGTH(corrupted.slices[1]) > 8); - idx = GPR_SLICE_LENGTH(corrupted.slices[1]) - 8; - memcpy(GPR_SLICE_START_PTR(corrupted.slices[1]) + idx, &bad, 4); + GPR_ASSERT(GRPC_SLICE_LENGTH(corrupted.slices[1]) > 8); + idx = GRPC_SLICE_LENGTH(corrupted.slices[1]) - 8; + memcpy(GRPC_SLICE_START_PTR(corrupted.slices[1]) + idx, &bad, 4); /* try (and fail) to decompress the corrupted compresed buffer */ GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_GZIP, &corrupted, &output)); diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 3b9aa24368..4fb89eb96e 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -112,15 +112,15 @@ static grpc_slice merge_slices(grpc_slice *slices, size_t nslices) { grpc_slice out; for (i = 0; i < nslices; i++) { - len += GPR_SLICE_LENGTH(slices[i]); + len += GRPC_SLICE_LENGTH(slices[i]); } out = grpc_slice_malloc(len); - cursor = GPR_SLICE_START_PTR(out); + cursor = GRPC_SLICE_START_PTR(out); for (i = 0; i < nslices; i++) { - memcpy(cursor, GPR_SLICE_START_PTR(slices[i]), GPR_SLICE_LENGTH(slices[i])); - cursor += GPR_SLICE_LENGTH(slices[i]); + memcpy(cursor, GRPC_SLICE_START_PTR(slices[i]), GRPC_SLICE_LENGTH(slices[i])); + cursor += GRPC_SLICE_LENGTH(slices[i]); } return out; @@ -134,9 +134,9 @@ int raw_byte_buffer_eq_slice(grpc_byte_buffer *rbb, grpc_slice b) { a = merge_slices(rbb->data.raw.slice_buffer.slices, rbb->data.raw.slice_buffer.count); - ok = GPR_SLICE_LENGTH(a) == GPR_SLICE_LENGTH(b) && - 0 == memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), - GPR_SLICE_LENGTH(a)); + ok = GRPC_SLICE_LENGTH(a) == GRPC_SLICE_LENGTH(b) && + 0 == memcmp(GRPC_SLICE_START_PTR(a), GRPC_SLICE_START_PTR(b), + GRPC_SLICE_LENGTH(a)); grpc_slice_unref(a); grpc_slice_unref(b); return ok; diff --git a/test/core/end2end/fixtures/http_proxy.c b/test/core/end2end/fixtures/http_proxy.c index 80b9677577..57fc4a38f8 100644 --- a/test/core/end2end/fixtures/http_proxy.c +++ b/test/core/end2end/fixtures/http_proxy.c @@ -37,11 +37,11 @@ #include +#include #include #include #include #include -#include #include #include #include @@ -151,7 +151,7 @@ static void on_client_write_done(grpc_exec_ctx* exec_ctx, void* arg, // write that data now. if (conn->client_deferred_write_buffer.length > 0) { grpc_slice_buffer_move_into(&conn->client_deferred_write_buffer, - &conn->client_write_buffer); + &conn->client_write_buffer); grpc_endpoint_write(exec_ctx, conn->client_endpoint, &conn->client_write_buffer, &conn->on_client_write_done); @@ -176,7 +176,7 @@ static void on_server_write_done(grpc_exec_ctx* exec_ctx, void* arg, // write that data now. if (conn->server_deferred_write_buffer.length > 0) { grpc_slice_buffer_move_into(&conn->server_deferred_write_buffer, - &conn->server_write_buffer); + &conn->server_write_buffer); grpc_endpoint_write(exec_ctx, conn->server_endpoint, &conn->server_write_buffer, &conn->on_server_write_done); @@ -204,10 +204,10 @@ static void on_client_read_done(grpc_exec_ctx* exec_ctx, void* arg, // Otherwise, move the read data into the write buffer and write it. if (conn->server_write_buffer.length > 0) { grpc_slice_buffer_move_into(&conn->client_read_buffer, - &conn->server_deferred_write_buffer); + &conn->server_deferred_write_buffer); } else { grpc_slice_buffer_move_into(&conn->client_read_buffer, - &conn->server_write_buffer); + &conn->server_write_buffer); gpr_ref(&conn->refcount); grpc_endpoint_write(exec_ctx, conn->server_endpoint, &conn->server_write_buffer, @@ -236,10 +236,10 @@ static void on_server_read_done(grpc_exec_ctx* exec_ctx, void* arg, // Otherwise, move the read data into the write buffer and write it. if (conn->client_write_buffer.length > 0) { grpc_slice_buffer_move_into(&conn->server_read_buffer, - &conn->client_deferred_write_buffer); + &conn->client_deferred_write_buffer); } else { grpc_slice_buffer_move_into(&conn->server_read_buffer, - &conn->client_write_buffer); + &conn->client_write_buffer); gpr_ref(&conn->refcount); grpc_endpoint_write(exec_ctx, conn->client_endpoint, &conn->client_write_buffer, @@ -313,7 +313,7 @@ static void on_read_request_done(grpc_exec_ctx* exec_ctx, void* arg, } // Read request and feed it to the parser. for (size_t i = 0; i < conn->client_read_buffer.count; ++i) { - if (GPR_SLICE_LENGTH(conn->client_read_buffer.slices[i]) > 0) { + if (GRPC_SLICE_LENGTH(conn->client_read_buffer.slices[i]) > 0) { error = grpc_http_parser_parse(&conn->http_parser, conn->client_read_buffer.slices[i], NULL); if (error != GRPC_ERROR_NONE) { diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 6834922299..4c8aafd8b3 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -138,7 +138,7 @@ static uint32_t read_uint32(input_stream *inp) { static grpc_byte_buffer *read_message(input_stream *inp) { grpc_slice slice = grpc_slice_malloc(read_uint22(inp)); - memset(GPR_SLICE_START_PTR(slice), 0, GPR_SLICE_LENGTH(slice)); + memset(GRPC_SLICE_START_PTR(slice), 0, GRPC_SLICE_LENGTH(slice)); grpc_byte_buffer *out = grpc_raw_byte_buffer_create(&slice, 1); grpc_slice_unref(slice); return out; diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c index 0a4d87c2fb..41d5627b59 100644 --- a/test/core/end2end/tests/invoke_large_request.c +++ b/test/core/end2end/tests/invoke_large_request.c @@ -96,7 +96,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static grpc_slice large_slice(void) { grpc_slice slice = grpc_slice_malloc(1000000); - memset(GPR_SLICE_START_PTR(slice), 'x', GPR_SLICE_LENGTH(slice)); + memset(GRPC_SLICE_START_PTR(slice), 'x', GRPC_SLICE_LENGTH(slice)); return slice; } diff --git a/test/core/handshake/client_ssl.c b/test/core/handshake/client_ssl.c index fdece99720..44efe4dbac 100644 --- a/test/core/handshake/client_ssl.c +++ b/test/core/handshake/client_ssl.c @@ -238,9 +238,9 @@ static bool client_ssl_test(char *server_alpn_preferred) { grpc_load_file(SSL_CERT_PATH, 1, &cert_slice))); GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", grpc_load_file(SSL_KEY_PATH, 1, &key_slice))); - const char *ca_cert = (const char *)GPR_SLICE_START_PTR(ca_slice); - pem_key_cert_pair.private_key = (const char *)GPR_SLICE_START_PTR(key_slice); - pem_key_cert_pair.cert_chain = (const char *)GPR_SLICE_START_PTR(cert_slice); + const char *ca_cert = (const char *)GRPC_SLICE_START_PTR(ca_slice); + pem_key_cert_pair.private_key = (const char *)GRPC_SLICE_START_PTR(key_slice); + pem_key_cert_pair.cert_chain = (const char *)GRPC_SLICE_START_PTR(cert_slice); grpc_channel_credentials *ssl_creds = grpc_ssl_credentials_create(ca_cert, &pem_key_cert_pair, NULL); diff --git a/test/core/handshake/server_ssl.c b/test/core/handshake/server_ssl.c index f49f98ad9a..f39b0040a6 100644 --- a/test/core/handshake/server_ssl.c +++ b/test/core/handshake/server_ssl.c @@ -91,9 +91,9 @@ static void server_thread(void *arg) { grpc_load_file(SSL_CERT_PATH, 1, &cert_slice))); GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", grpc_load_file(SSL_KEY_PATH, 1, &key_slice))); - const char *ca_cert = (const char *)GPR_SLICE_START_PTR(ca_slice); - pem_key_cert_pair.private_key = (const char *)GPR_SLICE_START_PTR(key_slice); - pem_key_cert_pair.cert_chain = (const char *)GPR_SLICE_START_PTR(cert_slice); + const char *ca_cert = (const char *)GRPC_SLICE_START_PTR(ca_slice); + pem_key_cert_pair.private_key = (const char *)GRPC_SLICE_START_PTR(key_slice); + pem_key_cert_pair.cert_chain = (const char *)GRPC_SLICE_START_PTR(cert_slice); grpc_server_credentials *ssl_creds = grpc_ssl_server_credentials_create( ca_cert, &pem_key_cert_pair, 1, 0, NULL); diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index 86afdfba72..8a1699608e 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -68,12 +68,12 @@ size_t count_slices(grpc_slice *slices, size_t nslices, int *current_data) { size_t j; unsigned char *buf; for (i = 0; i < nslices; ++i) { - buf = GPR_SLICE_START_PTR(slices[i]); - for (j = 0; j < GPR_SLICE_LENGTH(slices[i]); ++j) { + buf = GRPC_SLICE_START_PTR(slices[i]); + for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { GPR_ASSERT(buf[j] == *current_data); *current_data = (*current_data + 1) % 256; } - num_bytes += GPR_SLICE_LENGTH(slices[i]); + num_bytes += GRPC_SLICE_LENGTH(slices[i]); } return num_bytes; } @@ -100,9 +100,9 @@ static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, for (i = 0; i < nslices; ++i) { slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left : slice_size); - num_bytes_left -= GPR_SLICE_LENGTH(slices[i]); - buf = GPR_SLICE_START_PTR(slices[i]); - for (j = 0; j < GPR_SLICE_LENGTH(slices[i]); ++j) { + num_bytes_left -= GRPC_SLICE_LENGTH(slices[i]); + buf = GRPC_SLICE_START_PTR(slices[i]); + for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { buf[j] = *current_data; (*current_data)++; } diff --git a/test/core/iomgr/load_file_test.c b/test/core/iomgr/load_file_test.c index b4e1b52d05..af822466d7 100644 --- a/test/core/iomgr/load_file_test.c +++ b/test/core/iomgr/load_file_test.c @@ -63,12 +63,12 @@ static void test_load_empty_file(void) { error = grpc_load_file(tmp_name, 0, &slice); GPR_ASSERT(error == GRPC_ERROR_NONE); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 0); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 0); error = grpc_load_file(tmp_name, 1, &slice_with_null_term); GPR_ASSERT(error == GRPC_ERROR_NONE); - GPR_ASSERT(GPR_SLICE_LENGTH(slice_with_null_term) == 1); - GPR_ASSERT(GPR_SLICE_START_PTR(slice_with_null_term)[0] == 0); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice_with_null_term) == 1); + GPR_ASSERT(GRPC_SLICE_START_PTR(slice_with_null_term)[0] == 0); remove(tmp_name); gpr_free(tmp_name); @@ -93,7 +93,7 @@ static void test_load_failure(void) { error = grpc_load_file(tmp_name, 0, &slice); GPR_ASSERT(error != GRPC_ERROR_NONE); GRPC_ERROR_UNREF(error); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 0); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 0); gpr_free(tmp_name); grpc_slice_unref(slice); } @@ -116,13 +116,13 @@ static void test_load_small_file(void) { error = grpc_load_file(tmp_name, 0, &slice); GPR_ASSERT(error == GRPC_ERROR_NONE); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == strlen(blah)); - GPR_ASSERT(!memcmp(GPR_SLICE_START_PTR(slice), blah, strlen(blah))); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == strlen(blah)); + GPR_ASSERT(!memcmp(GRPC_SLICE_START_PTR(slice), blah, strlen(blah))); error = grpc_load_file(tmp_name, 1, &slice_with_null_term); GPR_ASSERT(error == GRPC_ERROR_NONE); - GPR_ASSERT(GPR_SLICE_LENGTH(slice_with_null_term) == (strlen(blah) + 1)); - GPR_ASSERT(strcmp((const char *)GPR_SLICE_START_PTR(slice_with_null_term), + GPR_ASSERT(GRPC_SLICE_LENGTH(slice_with_null_term) == (strlen(blah) + 1)); + GPR_ASSERT(strcmp((const char *)GRPC_SLICE_START_PTR(slice_with_null_term), blah) == 0); remove(tmp_name); @@ -153,8 +153,8 @@ static void test_load_big_file(void) { error = grpc_load_file(tmp_name, 0, &slice); GPR_ASSERT(error == GRPC_ERROR_NONE); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == buffer_size); - current = GPR_SLICE_START_PTR(slice); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == buffer_size); + current = GRPC_SLICE_START_PTR(slice); for (i = 0; i < buffer_size; i++) { GPR_ASSERT(current[i] == 42); } diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index f23e23f03e..bba1900987 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -134,12 +134,12 @@ static size_t count_slices(grpc_slice *slices, size_t nslices, unsigned i, j; unsigned char *buf; for (i = 0; i < nslices; ++i) { - buf = GPR_SLICE_START_PTR(slices[i]); - for (j = 0; j < GPR_SLICE_LENGTH(slices[i]); ++j) { + buf = GRPC_SLICE_START_PTR(slices[i]); + for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { GPR_ASSERT(buf[j] == *current_data); *current_data = (*current_data + 1) % 256; } - num_bytes += GPR_SLICE_LENGTH(slices[i]); + num_bytes += GRPC_SLICE_LENGTH(slices[i]); } return num_bytes; } @@ -285,9 +285,9 @@ static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, for (i = 0; i < nslices; ++i) { slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left : slice_size); - num_bytes_left -= GPR_SLICE_LENGTH(slices[i]); - buf = GPR_SLICE_START_PTR(slices[i]); - for (j = 0; j < GPR_SLICE_LENGTH(slices[i]); ++j) { + num_bytes_left -= GRPC_SLICE_LENGTH(slices[i]); + buf = GRPC_SLICE_START_PTR(slices[i]); + for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { buf[j] = *current_data; (*current_data)++; } diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c index b5c123b4b8..dea0f56266 100644 --- a/test/core/security/b64_test.c +++ b/test/core/security/b64_test.c @@ -58,9 +58,9 @@ static void test_simple_encode_decode_b64(int url_safe, int multiline) { char *hello_b64 = grpc_base64_encode(hello, strlen(hello), url_safe, multiline); grpc_slice hello_slice = grpc_base64_decode(hello_b64, url_safe); - GPR_ASSERT(GPR_SLICE_LENGTH(hello_slice) == strlen(hello)); - GPR_ASSERT(strncmp((const char *)GPR_SLICE_START_PTR(hello_slice), hello, - GPR_SLICE_LENGTH(hello_slice)) == 0); + GPR_ASSERT(GRPC_SLICE_LENGTH(hello_slice) == strlen(hello)); + GPR_ASSERT(strncmp((const char *)GRPC_SLICE_START_PTR(hello_slice), hello, + GRPC_SLICE_LENGTH(hello_slice)) == 0); grpc_slice_unref(hello_slice); gpr_free(hello_b64); @@ -77,8 +77,8 @@ static void test_full_range_encode_decode_b64(int url_safe, int multiline) { for (i = 0; i < 3; i++) { b64 = grpc_base64_encode(orig, sizeof(orig) - i, url_safe, multiline); orig_decoded = grpc_base64_decode(b64, url_safe); - GPR_ASSERT(GPR_SLICE_LENGTH(orig_decoded) == (sizeof(orig) - i)); - GPR_ASSERT(buffers_are_equal(orig, GPR_SLICE_START_PTR(orig_decoded), + GPR_ASSERT(GRPC_SLICE_LENGTH(orig_decoded) == (sizeof(orig) - i)); + GPR_ASSERT(buffers_are_equal(orig, GRPC_SLICE_START_PTR(orig_decoded), sizeof(orig) - i)); grpc_slice_unref(orig_decoded); gpr_free(b64); @@ -127,13 +127,13 @@ static void test_url_safe_unsafe_mismtach_failure(void) { b64 = grpc_base64_encode(orig, sizeof(orig), url_safe, 0); orig_decoded = grpc_base64_decode(b64, !url_safe); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(orig_decoded)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(orig_decoded)); gpr_free(b64); grpc_slice_unref(orig_decoded); b64 = grpc_base64_encode(orig, sizeof(orig), !url_safe, 0); orig_decoded = grpc_base64_decode(b64, url_safe); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(orig_decoded)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(orig_decoded)); gpr_free(b64); grpc_slice_unref(orig_decoded); } @@ -174,37 +174,37 @@ static void test_unpadded_decode(void) { grpc_slice decoded; decoded = grpc_base64_decode("Zm9vYmFy", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "foobar") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9vYmE", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "fooba") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9vYg", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "foob") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9v", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "foo") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm8", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "fo") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zg", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "f") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("", 0); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(decoded)); } int main(int argc, char **argv) { diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c index 157e78092d..0303b791ae 100644 --- a/test/core/security/create_jwt.c +++ b/test/core/security/create_jwt.c @@ -50,7 +50,7 @@ void create_jwt(const char *json_key_file_path, const char *service_url, GPR_ASSERT(GRPC_LOG_IF_ERROR( "load_file", grpc_load_file(json_key_file_path, 1, &json_key_data))); key = grpc_auth_json_key_create_from_string( - (const char *)GPR_SLICE_START_PTR(json_key_data)); + (const char *)GRPC_SLICE_START_PTR(json_key_data)); grpc_slice_unref(json_key_data); if (!grpc_auth_json_key_is_valid(&key)) { fprintf(stderr, "Could not parse json key.\n"); diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index 95706a5b81..ca093095c3 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -53,7 +53,7 @@ static grpc_call_credentials *create_refresh_token_creds( "load_file", grpc_load_file(json_refresh_token_file_path, 1, &refresh_token))); return grpc_google_refresh_token_credentials_create( - (const char *)GPR_SLICE_START_PTR(refresh_token), NULL); + (const char *)GRPC_SLICE_START_PTR(refresh_token), NULL); } int main(int argc, char **argv) { diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c index c5b0ae9425..593b79855f 100644 --- a/test/core/security/json_token_test.c +++ b/test/core/security/json_token_test.c @@ -228,11 +228,11 @@ static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, strncpy(b64, str, len); b64[len] = '\0'; slice = grpc_base64_decode(b64, 1); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(slice)); - decoded = gpr_malloc(GPR_SLICE_LENGTH(slice) + 1); - strncpy(decoded, (const char *)GPR_SLICE_START_PTR(slice), - GPR_SLICE_LENGTH(slice)); - decoded[GPR_SLICE_LENGTH(slice)] = '\0'; + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(slice)); + decoded = gpr_malloc(GRPC_SLICE_LENGTH(slice) + 1); + strncpy(decoded, (const char *)GRPC_SLICE_START_PTR(slice), + GRPC_SLICE_LENGTH(slice)); + decoded[GRPC_SLICE_LENGTH(slice)] = '\0'; json = grpc_json_parse_string(decoded); gpr_free(b64); *scratchpad = decoded; @@ -342,8 +342,8 @@ static void check_jwt_signature(const char *b64_signature, RSA *rsa_key, EVP_PKEY *key = EVP_PKEY_new(); grpc_slice sig = grpc_base64_decode(b64_signature, 1); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(sig)); - GPR_ASSERT(GPR_SLICE_LENGTH(sig) == 128); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig)); + GPR_ASSERT(GRPC_SLICE_LENGTH(sig) == 128); GPR_ASSERT(md_ctx != NULL); GPR_ASSERT(key != NULL); @@ -352,8 +352,8 @@ static void check_jwt_signature(const char *b64_signature, RSA *rsa_key, GPR_ASSERT(EVP_DigestVerifyInit(md_ctx, NULL, EVP_sha256(), NULL, key) == 1); GPR_ASSERT(EVP_DigestVerifyUpdate(md_ctx, signed_data, signed_data_size) == 1); - GPR_ASSERT(EVP_DigestVerifyFinal(md_ctx, GPR_SLICE_START_PTR(sig), - GPR_SLICE_LENGTH(sig)) == 1); + GPR_ASSERT(EVP_DigestVerifyFinal(md_ctx, GRPC_SLICE_START_PTR(sig), + GRPC_SLICE_LENGTH(sig)) == 1); grpc_slice_unref(sig); if (key != NULL) EVP_PKEY_free(key); diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 5c716235cd..01fe436f27 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -183,7 +183,7 @@ static void test_claims_success(void) { grpc_jwt_claims *claims; grpc_slice s = grpc_slice_from_copied_string(claims_without_time_constraint); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != NULL); @@ -201,7 +201,7 @@ static void test_expired_claims_failure(void) { grpc_jwt_claims *claims; grpc_slice s = grpc_slice_from_copied_string(expired_claims); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); gpr_timespec exp_iat = {100, 0, GPR_CLOCK_REALTIME}; gpr_timespec exp_exp = {120, 0, GPR_CLOCK_REALTIME}; gpr_timespec exp_nbf = {60, 0, GPR_CLOCK_REALTIME}; @@ -225,7 +225,7 @@ static void test_expired_claims_failure(void) { static void test_invalid_claims_failure(void) { grpc_slice s = grpc_slice_from_copied_string(invalid_claims); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(grpc_jwt_claims_from_json(json, s) == NULL); } @@ -233,7 +233,7 @@ static void test_bad_audience_claims_failure(void) { grpc_jwt_claims *claims; grpc_slice s = grpc_slice_from_copied_string(claims_without_time_constraint); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != NULL); @@ -484,11 +484,11 @@ static void corrupt_jwt_sig(char *jwt) { char *last_dot = strrchr(jwt, '.'); GPR_ASSERT(last_dot != NULL); sig = grpc_base64_decode(last_dot + 1, 1); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(sig)); - sig_bytes = GPR_SLICE_START_PTR(sig); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig)); + sig_bytes = GRPC_SLICE_START_PTR(sig); (*sig_bytes)++; /* Corrupt first byte. */ bad_b64_sig = - grpc_base64_encode(GPR_SLICE_START_PTR(sig), GPR_SLICE_LENGTH(sig), 1, 0); + grpc_base64_encode(GRPC_SLICE_START_PTR(sig), GRPC_SLICE_LENGTH(sig), 1, 0); memcpy(last_dot + 1, bad_b64_sig, strlen(bad_b64_sig)); gpr_free(bad_b64_sig); grpc_slice_unref(sig); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 92059bf270..22dbf0428d 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -63,10 +63,10 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, } else { GPR_ASSERT(num_md == 1); token_slice = md_elems[0].value; - token = gpr_malloc(GPR_SLICE_LENGTH(token_slice) + 1); - memcpy(token, GPR_SLICE_START_PTR(token_slice), - GPR_SLICE_LENGTH(token_slice)); - token[GPR_SLICE_LENGTH(token_slice)] = '\0'; + token = gpr_malloc(GRPC_SLICE_LENGTH(token_slice) + 1); + memcpy(token, GRPC_SLICE_START_PTR(token_slice), + GRPC_SLICE_LENGTH(token_slice)); + token[GRPC_SLICE_LENGTH(token_slice)] = '\0'; } gpr_mu_lock(request->mu); request->is_done = 1; diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index e12ca48c2f..b5d95004fe 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -77,8 +77,8 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( grpc_slice encrypted_leftover; for (i = 0; i < leftover_nslices; i++) { grpc_slice plain = leftover_slices[i]; - uint8_t *message_bytes = GPR_SLICE_START_PTR(plain); - size_t message_size = GPR_SLICE_LENGTH(plain); + uint8_t *message_bytes = GRPC_SLICE_START_PTR(plain); + size_t message_size = GRPC_SLICE_LENGTH(plain); while (message_size > 0) { size_t protected_buffer_size_to_send = buffer_size; size_t processed_message_size = message_size; diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c index 898aeb6f42..8872cbe278 100644 --- a/test/core/security/security_connector_test.c +++ b/test/core/security/security_connector_test.c @@ -397,7 +397,7 @@ static void test_default_ssl_roots(void) { an empty slice. */ grpc_set_ssl_roots_override_callback(override_roots_permanent_failure); roots = grpc_get_default_ssl_roots_for_testing(); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(roots)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(roots)); /* Cleanup. */ remove(roots_env_var_file_path); diff --git a/test/core/slice/slice_test.c b/test/core/slice/slice_test.c index 19c4657cde..e6d29e7459 100644 --- a/test/core/slice/slice_test.c +++ b/test/core/slice/slice_test.c @@ -55,10 +55,10 @@ static void test_slice_malloc_returns_something_sensible(void) { /* If there is a length, slice.data must be non-NULL. If length is zero we don't care. */ if (length) { - GPR_ASSERT(GPR_SLICE_START_PTR(slice)); + GPR_ASSERT(GRPC_SLICE_START_PTR(slice)); } /* Returned slice length must be what was requested. */ - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == length); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == length); /* If the slice has a refcount, it must be destroyable. */ if (slice.refcount) { GPR_ASSERT(slice.refcount->ref != NULL); @@ -66,7 +66,7 @@ static void test_slice_malloc_returns_something_sensible(void) { } /* We must be able to write to every byte of the data */ for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; } /* And finally we must succeed in destroying the slice */ grpc_slice_unref(slice); @@ -97,9 +97,9 @@ static void test_slice_new_with_user_data(void) { buf[1] = 1; slice = grpc_slice_new_with_user_data(buf, 2, set_mark, &marker); GPR_ASSERT(marker == 0); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 2); - GPR_ASSERT(GPR_SLICE_START_PTR(slice)[0] == 0); - GPR_ASSERT(GPR_SLICE_START_PTR(slice)[1] == 1); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 2); + GPR_ASSERT(GRPC_SLICE_START_PTR(slice)[0] == 0); + GPR_ASSERT(GRPC_SLICE_START_PTR(slice)[1] == 1); /* unref should cause destroy function to run. */ grpc_slice_unref(slice); @@ -152,7 +152,7 @@ static void test_slice_sub_works(unsigned length) { beginning of the slice. */ slice = grpc_slice_malloc(length); for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; } /* Ensure that for all subsets length is correct and that we start on the @@ -160,9 +160,9 @@ static void test_slice_sub_works(unsigned length) { for (i = 0; i < length; i++) { for (j = i; j < length; j++) { sub = grpc_slice_sub(slice, i, j); - GPR_ASSERT(GPR_SLICE_LENGTH(sub) == j - i); + GPR_ASSERT(GRPC_SLICE_LENGTH(sub) == j - i); for (k = 0; k < j - i; k++) { - GPR_ASSERT(GPR_SLICE_START_PTR(sub)[k] == (uint8_t)(i + k)); + GPR_ASSERT(GRPC_SLICE_START_PTR(sub)[k] == (uint8_t)(i + k)); } grpc_slice_unref(sub); } @@ -171,12 +171,12 @@ static void test_slice_sub_works(unsigned length) { } static void check_head_tail(grpc_slice slice, grpc_slice head, grpc_slice tail) { - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == - GPR_SLICE_LENGTH(head) + GPR_SLICE_LENGTH(tail)); - GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice), GPR_SLICE_START_PTR(head), - GPR_SLICE_LENGTH(head))); - GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(head), - GPR_SLICE_START_PTR(tail), GPR_SLICE_LENGTH(tail))); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == + GRPC_SLICE_LENGTH(head) + GRPC_SLICE_LENGTH(tail)); + GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice), GRPC_SLICE_START_PTR(head), + GRPC_SLICE_LENGTH(head))); + GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(head), + GRPC_SLICE_START_PTR(tail), GRPC_SLICE_LENGTH(tail))); } static void test_slice_split_head_works(size_t length) { @@ -191,7 +191,7 @@ static void test_slice_split_head_works(size_t length) { beginning of the slice. */ slice = grpc_slice_malloc(length); for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; } /* Ensure that for all subsets length is correct and that we start on the @@ -219,7 +219,7 @@ static void test_slice_split_tail_works(size_t length) { beginning of the slice. */ slice = grpc_slice_malloc(length); for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; } /* Ensure that for all subsets length is correct and that we start on the @@ -242,9 +242,9 @@ static void test_slice_from_copied_string_works(void) { LOG_TEST_NAME("test_slice_from_copied_string_works"); slice = grpc_slice_from_copied_string(text); - GPR_ASSERT(strlen(text) == GPR_SLICE_LENGTH(slice)); + GPR_ASSERT(strlen(text) == GRPC_SLICE_LENGTH(slice)); GPR_ASSERT(0 == - memcmp(text, GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice))); + memcmp(text, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice))); grpc_slice_unref(slice); } diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index fe70f22c2b..d8d7a52d15 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -63,7 +63,7 @@ static void test_read_one_slice(void) { "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(first_slice), "test", 4) == 0); grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); @@ -79,14 +79,14 @@ static void test_read_one_slice_malloc(void) { LOG_TEST("test_read_one_slice_malloc"); slice = grpc_slice_malloc(4); - memcpy(GPR_SLICE_START_PTR(slice), "test", 4); + memcpy(GRPC_SLICE_START_PTR(slice), "test", 4); buffer = grpc_raw_byte_buffer_create(&slice, 1); grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(first_slice), "test", 4) == 0); grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); @@ -108,7 +108,7 @@ static void test_read_none_compressed_slice(void) { "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(first_slice), "test", 4) == 0); grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); @@ -143,7 +143,7 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm, grpc_slice_buffer_init(&sliceb_out); input_slice = grpc_slice_malloc(input_size); - memset(GPR_SLICE_START_PTR(input_slice), 'a', input_size); + memset(GRPC_SLICE_START_PTR(input_slice), 'a', input_size); grpc_slice_buffer_add(&sliceb_in, input_slice); /* takes ownership */ GPR_ASSERT(grpc_msg_compress(algorithm, &sliceb_in, &sliceb_out)); @@ -153,10 +153,10 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm, "Couldn't init byte buffer reader"); while (grpc_byte_buffer_reader_next(&reader, &read_slice)) { - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(read_slice), - GPR_SLICE_START_PTR(input_slice) + read_count, - GPR_SLICE_LENGTH(read_slice)) == 0); - read_count += GPR_SLICE_LENGTH(read_slice); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(read_slice), + GRPC_SLICE_START_PTR(input_slice) + read_count, + GRPC_SLICE_LENGTH(read_slice)) == 0); + read_count += GRPC_SLICE_LENGTH(read_slice); grpc_slice_unref(read_slice); } GPR_ASSERT(read_count == input_size); @@ -185,7 +185,7 @@ static void test_byte_buffer_from_reader(void) { LOG_TEST("test_byte_buffer_from_reader"); slice = grpc_slice_malloc(4); - memcpy(GPR_SLICE_START_PTR(slice), "test", 4); + memcpy(GRPC_SLICE_START_PTR(slice), "test", 4); buffer = grpc_raw_byte_buffer_create(&slice, 1); grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && @@ -195,7 +195,7 @@ static void test_byte_buffer_from_reader(void) { GPR_ASSERT(buffer->type == buffer_from_reader->type); GPR_ASSERT(buffer_from_reader->data.raw.compression == GRPC_COMPRESS_NONE); GPR_ASSERT(buffer_from_reader->data.raw.slice_buffer.count == 1); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR( + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR( buffer_from_reader->data.raw.slice_buffer.slices[0]), "test", 4) == 0); @@ -217,9 +217,9 @@ static void test_readall(void) { memset(lotsa_bs, 'b', 1024); /* use slices large enough to overflow inlining */ slices[0] = grpc_slice_malloc(512); - memcpy(GPR_SLICE_START_PTR(slices[0]), lotsa_as, 512); + memcpy(GRPC_SLICE_START_PTR(slices[0]), lotsa_as, 512); slices[1] = grpc_slice_malloc(1024); - memcpy(GPR_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); + memcpy(GRPC_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); buffer = grpc_raw_byte_buffer_create(slices, 2); grpc_slice_unref(slices[0]); @@ -229,9 +229,9 @@ static void test_readall(void) { "Couldn't init byte buffer reader"); slice_out = grpc_byte_buffer_reader_readall(&reader); - GPR_ASSERT(GPR_SLICE_LENGTH(slice_out) == 512 + 1024); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); - GPR_ASSERT(memcmp(&(GPR_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == + GPR_ASSERT(GRPC_SLICE_LENGTH(slice_out) == 512 + 1024); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); + GPR_ASSERT(memcmp(&(GRPC_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == 0); grpc_slice_unref(slice_out); grpc_byte_buffer_destroy(buffer); @@ -252,9 +252,9 @@ static void test_byte_buffer_copy(void) { memset(lotsa_bs, 'b', 1024); /* use slices large enough to overflow inlining */ slices[0] = grpc_slice_malloc(512); - memcpy(GPR_SLICE_START_PTR(slices[0]), lotsa_as, 512); + memcpy(GRPC_SLICE_START_PTR(slices[0]), lotsa_as, 512); slices[1] = grpc_slice_malloc(1024); - memcpy(GPR_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); + memcpy(GRPC_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); buffer = grpc_raw_byte_buffer_create(slices, 2); grpc_slice_unref(slices[0]); @@ -265,9 +265,9 @@ static void test_byte_buffer_copy(void) { "Couldn't init byte buffer reader"); slice_out = grpc_byte_buffer_reader_readall(&reader); - GPR_ASSERT(GPR_SLICE_LENGTH(slice_out) == 512 + 1024); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); - GPR_ASSERT(memcmp(&(GPR_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == + GPR_ASSERT(GRPC_SLICE_LENGTH(slice_out) == 512 + 1024); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); + GPR_ASSERT(memcmp(&(GRPC_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == 0); grpc_slice_unref(slice_out); grpc_byte_buffer_destroy(buffer); diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index a051dc8cf3..c7e8f3a050 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -77,8 +77,8 @@ static void test_vector(grpc_chttp2_hpack_parser *parser, for (i = 0; i < nslices; i++) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; GPR_ASSERT(grpc_chttp2_hpack_parser_parse( - &exec_ctx, parser, GPR_SLICE_START_PTR(slices[i]), - GPR_SLICE_END_PTR(slices[i])) == GRPC_ERROR_NONE); + &exec_ctx, parser, GRPC_SLICE_START_PTR(slices[i]), + GRPC_SLICE_END_PTR(slices[i])) == GRPC_ERROR_NONE); grpc_exec_ctx_finish(&exec_ctx); } diff --git a/test/core/transport/chttp2/varint_test.c b/test/core/transport/chttp2/varint_test.c index 0d9460afc1..5b831c71b2 100644 --- a/test/core/transport/chttp2/varint_test.c +++ b/test/core/transport/chttp2/varint_test.c @@ -47,7 +47,7 @@ static void test_varint(uint32_t value, uint32_t prefix_bits, uint8_t prefix_or, GPR_ASSERT(nbytes == expect_length); slice = grpc_slice_malloc(nbytes); GRPC_CHTTP2_WRITE_VARINT(value, prefix_bits, prefix_or, - GPR_SLICE_START_PTR(slice), nbytes); + GRPC_SLICE_START_PTR(slice), nbytes); GPR_ASSERT(grpc_slice_cmp(expect, slice) == 0); grpc_slice_unref(expect); grpc_slice_unref(slice); diff --git a/test/core/transport/metadata_test.c b/test/core/transport/metadata_test.c index e47777ee72..5c89d8530a 100644 --- a/test/core/transport/metadata_test.c +++ b/test/core/transport/metadata_test.c @@ -279,7 +279,7 @@ static void verify_binary_header_size(const char *key, const uint8_t *value, grpc_slice value_slice = grpc_slice_from_copied_buffer((const char *)value, value_len); grpc_slice base64_encoded = grpc_chttp2_base64_encode(value_slice); - size_t expected_size = 32 + strlen(key) + GPR_SLICE_LENGTH(base64_encoded); + size_t expected_size = 32 + strlen(key) + GRPC_SLICE_LENGTH(base64_encoded); GPR_ASSERT(expected_size == elem_size); grpc_slice_unref(value_slice); grpc_slice_unref(base64_encoded); diff --git a/test/core/util/one_corpus_entry_fuzzer.c b/test/core/util/one_corpus_entry_fuzzer.c index a07e83b775..6b572bb3c3 100644 --- a/test/core/util/one_corpus_entry_fuzzer.c +++ b/test/core/util/one_corpus_entry_fuzzer.c @@ -47,7 +47,7 @@ int main(int argc, char **argv) { leak_check = false; GPR_ASSERT( GRPC_LOG_IF_ERROR("load_file", grpc_load_file(argv[1], 0, &buffer))); - LLVMFuzzerTestOneInput(GPR_SLICE_START_PTR(buffer), GPR_SLICE_LENGTH(buffer)); + LLVMFuzzerTestOneInput(GRPC_SLICE_START_PTR(buffer), GRPC_SLICE_LENGTH(buffer)); grpc_slice_unref(buffer); return 0; } diff --git a/test/core/util/parse_hexstring.c b/test/core/util/parse_hexstring.c index 91149a691a..60ab1bb0c4 100644 --- a/test/core/util/parse_hexstring.c +++ b/test/core/util/parse_hexstring.c @@ -48,7 +48,7 @@ grpc_slice parse_hexstring(const char *hexstring) { GPR_ASSERT((nibbles & 1) == 0); slice = grpc_slice_malloc(nibbles / 2); - out = GPR_SLICE_START_PTR(slice); + out = GRPC_SLICE_START_PTR(slice); nibbles = 0; temp = 0; diff --git a/test/core/util/slice_splitter.c b/test/core/util/slice_splitter.c index 6647b8fbb3..177c9892a5 100644 --- a/test/core/util/slice_splitter.c +++ b/test/core/util/slice_splitter.c @@ -69,28 +69,28 @@ void grpc_split_slices(grpc_slice_split_mode mode, grpc_slice *src_slices, *dst_slice_count = 1; length = 0; for (i = 0; i < src_slice_count; i++) { - length += GPR_SLICE_LENGTH(src_slices[i]); + length += GRPC_SLICE_LENGTH(src_slices[i]); } *dst_slices = gpr_malloc(sizeof(grpc_slice)); **dst_slices = grpc_slice_malloc(length); length = 0; for (i = 0; i < src_slice_count; i++) { - memcpy(GPR_SLICE_START_PTR(**dst_slices) + length, - GPR_SLICE_START_PTR(src_slices[i]), - GPR_SLICE_LENGTH(src_slices[i])); - length += GPR_SLICE_LENGTH(src_slices[i]); + memcpy(GRPC_SLICE_START_PTR(**dst_slices) + length, + GRPC_SLICE_START_PTR(src_slices[i]), + GRPC_SLICE_LENGTH(src_slices[i])); + length += GRPC_SLICE_LENGTH(src_slices[i]); } break; case GRPC_SLICE_SPLIT_ONE_BYTE: length = 0; for (i = 0; i < src_slice_count; i++) { - length += GPR_SLICE_LENGTH(src_slices[i]); + length += GRPC_SLICE_LENGTH(src_slices[i]); } *dst_slice_count = length; *dst_slices = gpr_malloc(sizeof(grpc_slice) * length); length = 0; for (i = 0; i < src_slice_count; i++) { - for (j = 0; j < GPR_SLICE_LENGTH(src_slices[i]); j++) { + for (j = 0; j < GRPC_SLICE_LENGTH(src_slices[i]); j++) { (*dst_slices)[length] = grpc_slice_sub(src_slices[i], j, j + 1); length++; } @@ -125,13 +125,13 @@ grpc_slice grpc_slice_merge(grpc_slice *slices, size_t nslices) { size_t i; for (i = 0; i < nslices; i++) { - if (GPR_SLICE_LENGTH(slices[i]) + length > capacity) { - capacity = GPR_MAX(capacity * 2, GPR_SLICE_LENGTH(slices[i]) + length); + if (GRPC_SLICE_LENGTH(slices[i]) + length > capacity) { + capacity = GPR_MAX(capacity * 2, GRPC_SLICE_LENGTH(slices[i]) + length); out = gpr_realloc(out, capacity); } - memcpy(out + length, GPR_SLICE_START_PTR(slices[i]), - GPR_SLICE_LENGTH(slices[i])); - length += GPR_SLICE_LENGTH(slices[i]); + memcpy(out + length, GRPC_SLICE_START_PTR(slices[i]), + GRPC_SLICE_LENGTH(slices[i])); + length += GRPC_SLICE_LENGTH(slices[i]); } return grpc_slice_new(out, length, gpr_free); diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index fed5a2cce1..191d729a9e 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -72,9 +72,9 @@ TEST_F(GrpclbTest, CreateRequest) { LoadBalanceRequest request; grpc_grpclb_request* c_req = grpc_grpclb_request_create(service_name.c_str()); grpc_slice slice = grpc_grpclb_request_encode(c_req); - const int num_bytes_written = GPR_SLICE_LENGTH(slice); + const int num_bytes_written = GRPC_SLICE_LENGTH(slice); EXPECT_GT(num_bytes_written, 0); - request.ParseFromArray(GPR_SLICE_START_PTR(slice), num_bytes_written); + request.ParseFromArray(GRPC_SLICE_START_PTR(slice), num_bytes_written); EXPECT_EQ(request.initial_request().name(), service_name); grpc_slice_unref(slice); grpc_grpclb_request_destroy(c_req); diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index a65e425625..a56667585f 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -212,8 +212,8 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports, grpc_byte_buffer_reader_init(&bbr, request_payload_recv); grpc_slice request_payload_slice = grpc_byte_buffer_reader_readall(&bbr); grpc::lb::v1::LoadBalanceRequest request; - request.ParseFromArray(GPR_SLICE_START_PTR(request_payload_slice), - GPR_SLICE_LENGTH(request_payload_slice)); + request.ParseFromArray(GRPC_SLICE_START_PTR(request_payload_slice), + GRPC_SLICE_LENGTH(request_payload_slice)); GPR_ASSERT(request.has_initial_request()); GPR_ASSERT(request.initial_request().name() == sf->servers_hostport); grpc_slice_unref(request_payload_slice); diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc index 2630c76e87..470ce0cbf4 100644 --- a/test/cpp/util/byte_buffer_test.cc +++ b/test/cpp/util/byte_buffer_test.cc @@ -81,11 +81,11 @@ TEST_F(ByteBufferTest, Length) { } bool SliceEqual(const Slice& a, grpc_slice b) { - if (a.size() != GPR_SLICE_LENGTH(b)) { + if (a.size() != GRPC_SLICE_LENGTH(b)) { return false; } for (size_t i = 0; i < a.size(); i++) { - if (a.begin()[i] != GPR_SLICE_START_PTR(b)[i]) { + if (a.begin()[i] != GRPC_SLICE_START_PTR(b)[i]) { return false; } } diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index df8179586a..8926fb7d5a 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -73,8 +73,8 @@ TEST_F(SliceTest, Cslice) { Slice spp(s, Slice::STEAL_REF); CheckSlice(spp, kContent); grpc_slice c_slice = spp.c_slice(); - EXPECT_EQ(GPR_SLICE_START_PTR(s), GPR_SLICE_START_PTR(c_slice)); - EXPECT_EQ(GPR_SLICE_END_PTR(s), GPR_SLICE_END_PTR(c_slice)); + EXPECT_EQ(GRPC_SLICE_START_PTR(s), GRPC_SLICE_START_PTR(c_slice)); + EXPECT_EQ(GRPC_SLICE_END_PTR(s), GRPC_SLICE_END_PTR(c_slice)); grpc_slice_unref(c_slice); } -- cgit v1.2.3 From 5b676a6b1ae667ab82f56d5485bf0da229091101 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 21:09:29 -0700 Subject: Fix include guards --- include/grpc++/impl/codegen/thrift_serializer.h | 2 +- include/grpc/slice.h | 6 +++--- include/grpc/slice_buffer.h | 6 +++--- src/core/ext/census/trace_context.h | 2 +- src/core/lib/slice/percent_encoding.h | 6 +++--- src/core/lib/slice/slice_string_helpers.h | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/core') diff --git a/include/grpc++/impl/codegen/thrift_serializer.h b/include/grpc++/impl/codegen/thrift_serializer.h index 4d3af91b02..86bc7105c0 100644 --- a/include/grpc++/impl/codegen/thrift_serializer.h +++ b/include/grpc++/impl/codegen/thrift_serializer.h @@ -214,4 +214,4 @@ typedef ThriftSerializer> } // namespace thrift } // namespace apache -#endif +#endif // GRPCXX_IMPL_CODEGEN_THRIFT_SERIALIZER_H diff --git a/include/grpc/slice.h b/include/grpc/slice.h index 5953e0ccb7..ee0bb4928e 100644 --- a/include/grpc/slice.h +++ b/include/grpc/slice.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_SUPPORT_SLICE_H -#define GRPC_SUPPORT_SLICE_H +#ifndef GRPC_SLICE_H +#define GRPC_SLICE_H #include #include @@ -125,4 +125,4 @@ GPRAPI int grpc_slice_str_cmp(grpc_slice a, const char *b); } #endif -#endif /* GRPC_SUPPORT_SLICE_H */ +#endif /* GRPC_SLICE_H */ diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h index f7a2f58f8e..44876f5a30 100644 --- a/include/grpc/slice_buffer.h +++ b/include/grpc/slice_buffer.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_SUPPORT_SLICE_BUFFER_H -#define GRPC_SUPPORT_SLICE_BUFFER_H +#ifndef GRPC_SLICE_BUFFER_H +#define GRPC_SLICE_BUFFER_H #include @@ -84,4 +84,4 @@ GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *src); } #endif -#endif /* GRPC_SUPPORT_SLICE_BUFFER_H */ +#endif /* GRPC_SLICE_BUFFER_H */ diff --git a/src/core/ext/census/trace_context.h b/src/core/ext/census/trace_context.h index ee71fef460..1cb5e26ea7 100644 --- a/src/core/ext/census/trace_context.h +++ b/src/core/ext/census/trace_context.h @@ -65,4 +65,4 @@ of these do not exist. On success, returns true and false otherwise. */ bool decode_trace_context(google_trace_TraceContext *ctxt, uint8_t *buffer, const size_t nbytes); -#endif +#endif /* GRPC_CORE_EXT_CENSUS_TRACE_CONTEXT_H */ diff --git a/src/core/lib/slice/percent_encoding.h b/src/core/lib/slice/percent_encoding.h index bb5b1b75bc..189bdbe312 100644 --- a/src/core/lib/slice/percent_encoding.h +++ b/src/core/lib/slice/percent_encoding.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H -#define GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H +#ifndef GRPC_CORE_LIB_SLICE_PERCENT_ENCODING_H +#define GRPC_CORE_LIB_SLICE_PERCENT_ENCODING_H /* Percent encoding and decoding of slices. Transforms arbitrary strings into safe-for-transmission strings by using @@ -75,4 +75,4 @@ bool grpc_strict_percent_decode_slice(grpc_slice slice_in, This cannot fail. */ grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in); -#endif /* GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H */ +#endif /* GRPC_CORE_LIB_SLICE_PERCENT_ENCODING_H */ diff --git a/src/core/lib/slice/slice_string_helpers.h b/src/core/lib/slice/slice_string_helpers.h index 19625c66af..151c720777 100644 --- a/src/core/lib/slice/slice_string_helpers.h +++ b/src/core/lib/slice/slice_string_helpers.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SUPPORT_SLICE_STRING_H -#define GRPC_CORE_LIB_SUPPORT_SLICE_STRING_H +#ifndef GRPC_CORE_LIB_SLICE_SLICE_STRING_HELPERS_H +#define GRPC_CORE_LIB_SLICE_SLICE_STRING_HELPERS_H #include @@ -55,4 +55,4 @@ void grpc_slice_split(grpc_slice str, const char *sep, grpc_slice_buffer *dst); } #endif -#endif /* GRPC_CORE_LIB_SUPPORT_STRING_H */ +#endif /* GRPC_CORE_LIB_SLICE_SLICE_STRING_HELPERS_H */ -- cgit v1.2.3 From 28b72428a84ae7d23c106fb282478fa94951c9c0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 21:15:29 -0700 Subject: clang-format --- include/grpc++/impl/codegen/core_codegen.h | 2 +- .../grpc++/impl/codegen/core_codegen_interface.h | 3 +- include/grpc/slice_buffer.h | 10 ++--- src/core/ext/census/grpc_filter.c | 2 +- .../ext/client_channel/http_connect_handshaker.c | 8 ++-- .../ext/transport/chttp2/transport/bin_decoder.h | 2 +- .../ext/transport/chttp2/transport/bin_encoder.c | 9 ++-- .../ext/transport/chttp2/transport/bin_encoder.h | 3 +- src/core/ext/transport/chttp2/transport/frame.h | 2 +- .../ext/transport/chttp2/transport/frame_goaway.h | 2 +- .../ext/transport/chttp2/transport/frame_ping.c | 2 +- .../transport/chttp2/transport/frame_rst_stream.c | 2 +- .../transport/chttp2/transport/frame_rst_stream.h | 2 +- .../transport/chttp2/transport/frame_settings.c | 2 +- .../transport/chttp2/transport/frame_settings.h | 4 +- .../chttp2/transport/frame_window_update.h | 4 +- .../ext/transport/chttp2/transport/hpack_encoder.c | 5 ++- .../ext/transport/chttp2/transport/hpack_encoder.h | 2 +- .../ext/transport/chttp2/transport/hpack_parser.c | 6 +-- .../ext/transport/chttp2/transport/hpack_table.h | 2 +- src/core/ext/transport/chttp2/transport/internal.h | 3 +- src/core/ext/transport/chttp2/transport/parsing.c | 18 ++++---- src/core/ext/transport/chttp2/transport/writing.c | 10 ++--- .../transport/cronet/transport/cronet_transport.c | 4 +- src/core/lib/channel/compress_filter.c | 2 +- src/core/lib/channel/connected_channel.c | 2 +- src/core/lib/channel/handshaker.c | 4 +- src/core/lib/channel/http_server_filter.c | 2 +- src/core/lib/http/format_request.c | 9 ++-- src/core/lib/http/format_request.h | 4 +- src/core/lib/http/parser.h | 2 +- src/core/lib/iomgr/resource_quota.c | 2 +- src/core/lib/iomgr/tcp_client_windows.c | 2 +- src/core/lib/iomgr/tcp_windows.c | 2 +- src/core/lib/security/transport/handshake.c | 2 +- .../lib/security/transport/security_connector.c | 2 +- src/core/lib/security/util/b64.c | 2 +- src/core/lib/security/util/b64.h | 2 +- src/core/lib/slice/slice.c | 10 ++--- src/core/lib/slice/slice_buffer.c | 12 +++--- src/core/lib/surface/byte_buffer.c | 3 +- src/core/lib/surface/byte_buffer_reader.c | 2 +- src/core/lib/transport/metadata_batch.h | 2 +- src/cpp/client/channel_cc.cc | 2 +- src/cpp/common/core_codegen.cc | 11 +++-- test/core/compression/message_compress_test.c | 14 +++---- test/core/end2end/cq_verifier.c | 3 +- test/core/end2end/invalid_call_argument_test.c | 3 +- test/core/end2end/tests/binary_metadata.c | 6 ++- test/core/end2end/tests/call_creds.c | 9 ++-- test/core/end2end/tests/cancel_after_accept.c | 6 ++- test/core/end2end/tests/cancel_after_client_done.c | 6 ++- test/core/end2end/tests/cancel_after_invoke.c | 3 +- test/core/end2end/tests/cancel_before_invoke.c | 3 +- test/core/end2end/tests/compressed_payload.c | 3 +- test/core/end2end/tests/filter_call_init_fails.c | 3 +- test/core/end2end/tests/filter_causes_close.c | 3 +- test/core/end2end/tests/large_metadata.c | 3 +- test/core/end2end/tests/load_reporting_hook.c | 3 +- test/core/end2end/tests/max_message_length.c | 3 +- test/core/end2end/tests/network_status_change.c | 3 +- test/core/end2end/tests/payload.c | 3 +- test/core/end2end/tests/ping_pong_streaming.c | 6 ++- test/core/end2end/tests/request_with_flags.c | 3 +- test/core/end2end/tests/request_with_payload.c | 3 +- test/core/end2end/tests/resource_quota_server.c | 3 +- test/core/end2end/tests/simple_cacheable_request.c | 6 ++- test/core/end2end/tests/simple_metadata.c | 6 ++- test/core/end2end/tests/trailing_metadata.c | 6 ++- test/core/http/format_request_test.c | 48 +++++++++++----------- test/core/iomgr/endpoint_tests.c | 6 +-- test/core/iomgr/load_file_test.c | 2 +- test/core/iomgr/tcp_posix_test.c | 4 +- test/core/security/b64_test.c | 2 +- test/core/security/create_jwt.c | 2 +- test/core/security/credentials_test.c | 7 ++-- test/core/security/fetch_oauth2.c | 2 +- test/core/security/json_token_test.c | 2 +- test/core/security/jwt_verifier_test.c | 6 +-- test/core/security/oauth2_utils.c | 2 +- .../security/print_google_default_creds_token.c | 2 +- test/core/security/verify_jwt.c | 2 +- test/core/slice/slice_buffer_test.c | 2 +- test/core/slice/slice_test.c | 11 ++--- test/core/transport/chttp2/hpack_parser_test.c | 2 +- test/core/transport/chttp2/varint_test.c | 5 ++- test/core/util/mock_endpoint.h | 3 +- test/core/util/one_corpus_entry_fuzzer.c | 3 +- test/cpp/grpclb/grpclb_test.cc | 3 +- test/cpp/util/cli_call.cc | 2 +- 90 files changed, 235 insertions(+), 183 deletions(-) (limited to 'src/core') diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h index c2127a771a..6ab0e17db9 100644 --- a/include/grpc++/impl/codegen/core_codegen.h +++ b/include/grpc++/impl/codegen/core_codegen.h @@ -82,7 +82,7 @@ class CoreCodegen : public CoreCodegenInterface { void grpc_slice_unref(grpc_slice slice) GRPC_OVERRIDE; grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) GRPC_OVERRIDE; void grpc_slice_buffer_add(grpc_slice_buffer* sb, - grpc_slice slice) GRPC_OVERRIDE; + grpc_slice slice) GRPC_OVERRIDE; void grpc_slice_buffer_pop(grpc_slice_buffer* sb) GRPC_OVERRIDE; void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE; diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index 743f528373..4783a43454 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -96,7 +96,8 @@ class CoreCodegenInterface { virtual grpc_slice grpc_slice_malloc(size_t length) = 0; virtual void grpc_slice_unref(grpc_slice slice) = 0; virtual grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) = 0; - virtual void grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice slice) = 0; + virtual void grpc_slice_buffer_add(grpc_slice_buffer* sb, + grpc_slice slice) = 0; virtual void grpc_slice_buffer_pop(grpc_slice_buffer* sb) = 0; virtual void grpc_metadata_array_init(grpc_metadata_array* array) = 0; diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h index 44876f5a30..f1de653af4 100644 --- a/include/grpc/slice_buffer.h +++ b/include/grpc/slice_buffer.h @@ -56,9 +56,9 @@ GPRAPI void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice slice); The implementation MAY decide to concatenate data at the end of a small slice added in this fashion. */ GPRAPI size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer *sb, - grpc_slice slice); + grpc_slice slice); GPRAPI void grpc_slice_buffer_addn(grpc_slice_buffer *sb, grpc_slice *slices, - size_t n); + size_t n); /* add a very small (less than 8 bytes) amount of data to the end of a slice buffer: returns a pointer into which to add the data */ GPRAPI uint8_t *grpc_slice_buffer_tiny_add(grpc_slice_buffer *sb, size_t len); @@ -70,13 +70,13 @@ GPRAPI void grpc_slice_buffer_reset_and_unref(grpc_slice_buffer *sb); GPRAPI void grpc_slice_buffer_swap(grpc_slice_buffer *a, grpc_slice_buffer *b); /* move all of the elements of src into dst */ GPRAPI void grpc_slice_buffer_move_into(grpc_slice_buffer *src, - grpc_slice_buffer *dst); + grpc_slice_buffer *dst); /* remove n bytes from the end of a slice buffer */ GPRAPI void grpc_slice_buffer_trim_end(grpc_slice_buffer *src, size_t n, - grpc_slice_buffer *garbage); + grpc_slice_buffer *garbage); /* move the first n bytes of src into dst */ GPRAPI void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, - grpc_slice_buffer *dst); + grpc_slice_buffer *dst); /* take the first slice in the slice buffer */ GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *src); diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index aa6d24e076..5a283de468 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -37,9 +37,9 @@ #include #include +#include #include #include -#include #include #include "src/core/ext/census/census_interface.h" diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 6f1956add9..82042897b2 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -35,9 +35,9 @@ #include +#include #include #include -#include #include #include "src/core/ext/client_channel/uri_parser.h" @@ -136,11 +136,11 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_slice_buffer_add( &tmp_buffer, grpc_slice_split_tail(&handshaker->read_buffer->slices[i], - body_start_offset)); + body_start_offset)); } grpc_slice_buffer_addn(&tmp_buffer, - &handshaker->read_buffer->slices[i + 1], - handshaker->read_buffer->count - i - 1); + &handshaker->read_buffer->slices[i + 1], + handshaker->read_buffer->count - i - 1); grpc_slice_buffer_swap(handshaker->read_buffer, &tmp_buffer); grpc_slice_buffer_destroy(&tmp_buffer); break; diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h index 5e00fd8143..83a90be519 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h @@ -61,6 +61,6 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input); slice, does not take ownership of the input. Returns an empty slice if decoding is failed. */ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, - size_t output_length); + size_t output_length); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */ diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.c b/src/core/ext/transport/chttp2/transport/bin_encoder.c index 2baa1dc97b..af25a4352a 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.c @@ -114,13 +114,15 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input) { uint32_t temp_length = 0; nbits = 0; - for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); ++in) { + for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); + ++in) { nbits += grpc_chttp2_huffsyms[*in].length; } output = grpc_slice_malloc(nbits / 8 + (nbits % 8 != 0)); out = GRPC_SLICE_START_PTR(output); - for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); ++in) { + for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); + ++in) { int sym = *in; temp <<= grpc_chttp2_huffsyms[sym].length; temp |= grpc_chttp2_huffsyms[sym].bits; @@ -175,7 +177,8 @@ static void enc_add1(huff_out *out, uint8_t a) { enc_flush_some(out); } -grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input) { +grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl( + grpc_slice input) { size_t input_length = GRPC_SLICE_LENGTH(input); size_t input_triplets = input_length / 3; size_t tail_case = input_length % 3; diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h index 3d86a41a11..9e143b46e2 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h @@ -49,6 +49,7 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input); grpc_slice y = grpc_chttp2_huffman_compress(x); grpc_slice_unref(x); return y; */ -grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input); +grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl( + grpc_slice input); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame.h b/src/core/ext/transport/chttp2/transport/frame.h index 0b3842b4a1..ffd4d9669b 100644 --- a/src/core/ext/transport/chttp2/transport/frame.h +++ b/src/core/ext/transport/chttp2/transport/frame.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H -#include #include +#include #include "src/core/lib/iomgr/error.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h index 927b7fbd48..21fe819488 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.h +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h @@ -34,9 +34,9 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H -#include #include #include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.c b/src/core/ext/transport/chttp2/transport/frame_ping.c index 18ecb4d1e9..7de5f6362d 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.c +++ b/src/core/ext/transport/chttp2/transport/frame_ping.c @@ -94,7 +94,7 @@ grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_ack_ping(exec_ctx, t, p->opaque_8bytes); } else { grpc_slice_buffer_add(&t->qbuf, - grpc_chttp2_ping_create(1, p->opaque_8bytes)); + grpc_chttp2_ping_create(1, p->opaque_8bytes)); grpc_chttp2_initiate_write(exec_ctx, t, false, "ping response"); } } diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c index 75e4101035..b4c5ed769b 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -43,7 +43,7 @@ #include "src/core/ext/transport/chttp2/transport/status_conversion.h" grpc_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code, - grpc_transport_one_way_stats *stats) { + grpc_transport_one_way_stats *stats) { static const size_t frame_size = 13; grpc_slice slice = grpc_slice_malloc(frame_size); stats->framing_bytes += frame_size; diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h index f39002a3e9..779507a617 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h @@ -45,7 +45,7 @@ typedef struct { } grpc_chttp2_rst_stream_parser; grpc_slice grpc_chttp2_rst_stream_create(uint32_t stream_id, uint32_t code, - grpc_transport_one_way_stats *stats); + grpc_transport_one_way_stats *stats); grpc_error *grpc_chttp2_rst_stream_parser_begin_frame( grpc_chttp2_rst_stream_parser *parser, uint32_t length, uint8_t flags); diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c index d3b235183b..98facae87f 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.c +++ b/src/core/ext/transport/chttp2/transport/frame_settings.c @@ -83,7 +83,7 @@ static uint8_t *fill_header(uint8_t *out, uint32_t length, uint8_t flags) { } grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, - uint32_t force_mask, size_t count) { + uint32_t force_mask, size_t count) { size_t i; uint32_t n = 0; grpc_slice output; diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h index bbbecec518..a29dc82106 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H -#include #include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -88,7 +88,7 @@ extern const grpc_chttp2_setting_parameters /* Create a settings frame by diffing old & new, and updating old to be new */ grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, - uint32_t force_mask, size_t count); + uint32_t force_mask, size_t count); /* Create an ack settings frame */ grpc_slice grpc_chttp2_settings_ack_create(void); diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h index b5f40335a4..f75dfb3d87 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.h +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h @@ -45,8 +45,8 @@ typedef struct { uint32_t amount; } grpc_chttp2_window_update_parser; -grpc_slice grpc_chttp2_window_update_create(uint32_t id, uint32_t window_delta, - grpc_transport_one_way_stats *stats); +grpc_slice grpc_chttp2_window_update_create( + uint32_t id, uint32_t window_delta, grpc_transport_one_way_stats *stats); grpc_error *grpc_chttp2_window_update_parser_begin_frame( grpc_chttp2_window_update_parser *parser, uint32_t length, uint8_t flags); diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c index 3c5bcd3412..eb68fe3138 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c @@ -269,8 +269,9 @@ static void emit_indexed(grpc_chttp2_hpack_compressor *c, uint32_t elem_index, } static grpc_slice get_wire_value(grpc_mdelem *elem, uint8_t *huffman_prefix) { - if (grpc_is_binary_header((const char *)GRPC_SLICE_START_PTR(elem->key->slice), - GRPC_SLICE_LENGTH(elem->key->slice))) { + if (grpc_is_binary_header( + (const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice))) { *huffman_prefix = 0x80; return grpc_mdstr_as_base64_encoded_and_huffman_compressed(elem->value); } diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h index 9188d9c6c5..bcbd675ca2 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -34,9 +34,9 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H -#include #include #include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 3c1c6ba5a6..1046c31dda 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -1501,9 +1501,9 @@ static grpc_error *is_binary_indexed_header(grpc_chttp2_hpack_parser *p, GRPC_ERROR_INT_INDEX, (intptr_t)p->index), GRPC_ERROR_INT_SIZE, (intptr_t)p->table.num_ents); } - *is = - grpc_is_binary_header((const char *)GRPC_SLICE_START_PTR(elem->key->slice), - GRPC_SLICE_LENGTH(elem->key->slice)); + *is = grpc_is_binary_header( + (const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice)); return GRPC_ERROR_NONE; } diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h index bc5a2d2463..2ca130e64b 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_table.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H -#include #include +#include #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/metadata.h" diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 18fa2b4890..b74233d992 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -466,7 +466,8 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, /** Process one slice of incoming data; return 1 if the connection is still viable after reading, or 0 if the connection should be torn down */ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, grpc_slice slice); + grpc_chttp2_transport *t, + grpc_slice slice); bool grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s); diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index cb88fd5baf..b9c405158f 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -229,10 +229,10 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, case GRPC_DTS_FRAME: GPR_ASSERT(cur < end); if ((uint32_t)(end - cur) == t->incoming_frame_size) { - err = parse_frame_slice(exec_ctx, t, - grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), - (size_t)(end - beg)), - 1); + err = parse_frame_slice( + exec_ctx, t, grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), + (size_t)(end - beg)), + 1); if (err != GRPC_ERROR_NONE) { return err; } @@ -244,7 +244,7 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, err = parse_frame_slice( exec_ctx, t, grpc_slice_sub_no_ref(slice, cur_offset, - cur_offset + t->incoming_frame_size), + cur_offset + t->incoming_frame_size), 1); if (err != GRPC_ERROR_NONE) { return err; @@ -253,10 +253,10 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, t->incoming_stream = NULL; goto dts_fh_0; /* loop */ } else { - err = parse_frame_slice(exec_ctx, t, - grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), - (size_t)(end - beg)), - 0); + err = parse_frame_slice( + exec_ctx, t, grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), + (size_t)(end - beg)), + 0); if (err != GRPC_ERROR_NONE) { return err; } diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index 1486a7edb4..139e7387c4 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -131,8 +131,8 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, if (s->announce_window > 0) { uint32_t announce = s->announce_window; grpc_slice_buffer_add(&t->outbuf, - grpc_chttp2_window_update_create( - s->id, s->announce_window, &s->stats.outgoing)); + grpc_chttp2_window_update_create( + s->id, s->announce_window, &s->stats.outgoing)); GRPC_CHTTP2_FLOW_DEBIT_STREAM("write", t, s, announce_window, announce); } if (sent_initial_metadata) { @@ -163,8 +163,8 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, s->sent_trailing_metadata = true; if (!t->is_client && !s->read_closed) { grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_rst_stream_create( - s->id, GRPC_CHTTP2_NO_ERROR, - &s->stats.outgoing)); + s->id, GRPC_CHTTP2_NO_ERROR, + &s->stats.outgoing)); } } s->sending_bytes += send_bytes; @@ -221,7 +221,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, announced); grpc_transport_one_way_stats throwaway_stats; grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_window_update_create( - 0, announced, &throwaway_stats)); + 0, announced, &throwaway_stats)); } GPR_TIMER_END("grpc_chttp2_begin_write", 0); diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 73fda07ee1..1e5377c2b4 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -34,10 +34,10 @@ #include #include +#include #include #include #include -#include #include #include @@ -926,7 +926,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, free_read_buffer(s); grpc_slice_buffer_init(&stream_state->rs.read_slice_buffer); grpc_slice_buffer_add(&stream_state->rs.read_slice_buffer, - read_data_slice); + read_data_slice); grpc_slice_buffer_stream_init(&stream_state->rs.sbs, &stream_state->rs.read_slice_buffer, 0); *((grpc_byte_buffer **)stream_op->recv_message) = diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index c42a81b3b5..de71bcc22b 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -35,9 +35,9 @@ #include #include +#include #include #include -#include #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/compress_filter.h" diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 2ae86f5507..0e62d58475 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -38,9 +38,9 @@ #include #include +#include #include #include -#include #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 00d39764d7..a45a39981c 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -146,8 +146,8 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, static void call_next_handshaker(grpc_exec_ctx* exec_ctx, grpc_endpoint* endpoint, grpc_channel_args* args, - grpc_slice_buffer* read_buffer, void* user_data, - grpc_error* error) { + grpc_slice_buffer* read_buffer, + void* user_data, grpc_error* error) { grpc_handshake_manager* mgr = user_data; GPR_ASSERT(mgr->state != NULL); GPR_ASSERT(mgr->state->index < mgr->count); diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 1a73a07b81..10631850cd 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -164,7 +164,7 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { calld->seen_payload_bin = 1; grpc_slice_buffer_init(&calld->read_slice_buffer); grpc_slice_buffer_add(&calld->read_slice_buffer, - grpc_slice_ref(md->value->slice)); + grpc_slice_ref(md->value->slice)); grpc_slice_buffer_stream_init(&calld->read_stream, &calld->read_slice_buffer, 0); return NULL; diff --git a/src/core/lib/http/format_request.c b/src/core/lib/http/format_request.c index 59ff28f67f..024664b6ee 100644 --- a/src/core/lib/http/format_request.c +++ b/src/core/lib/http/format_request.c @@ -37,8 +37,8 @@ #include #include -#include #include +#include #include #include #include "src/core/lib/support/string.h" @@ -65,7 +65,8 @@ static void fill_common_header(const grpc_httpcli_request *request, } } -grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) { +grpc_slice grpc_httpcli_format_get_request( + const grpc_httpcli_request *request) { gpr_strvec out; char *flat; size_t flat_len; @@ -82,8 +83,8 @@ grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) } grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, - const char *body_bytes, - size_t body_size) { + const char *body_bytes, + size_t body_size) { gpr_strvec out; char *tmp; size_t out_len; diff --git a/src/core/lib/http/format_request.h b/src/core/lib/http/format_request.h index ad51701bbb..1c8e3f68c5 100644 --- a/src/core/lib/http/format_request.h +++ b/src/core/lib/http/format_request.h @@ -39,8 +39,8 @@ grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request); grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, - const char *body_bytes, - size_t body_size); + const char *body_bytes, + size_t body_size); grpc_slice grpc_httpcli_format_connect_request( const grpc_httpcli_request *request); diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h index 6d003cd68c..a68011dd43 100644 --- a/src/core/lib/http/parser.h +++ b/src/core/lib/http/parser.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_LIB_HTTP_PARSER_H #define GRPC_CORE_LIB_HTTP_PARSER_H -#include #include +#include #include "src/core/lib/iomgr/error.h" /* Maximum length of a header string of the form 'Key: Value\r\n' */ diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index f047f45b43..6d7e549bb7 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -300,7 +300,7 @@ static void ru_slice_unref(void *p) { } static grpc_slice ru_slice_create(grpc_resource_user *resource_user, - size_t size) { + size_t size) { ru_slice_refcount *rc = gpr_malloc(sizeof(ru_slice_refcount) + size); rc->base.ref = ru_slice_ref; rc->base.unref = ru_slice_unref; diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 9f28c056d9..598c012589 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -37,10 +37,10 @@ #include "src/core/lib/iomgr/sockaddr_windows.h" +#include #include #include #include -#include #include #include "src/core/lib/iomgr/iocp_windows.h" diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 9fe7662e96..bc1b91e109 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -40,10 +40,10 @@ #include "src/core/lib/iomgr/network_status_tracker.h" #include "src/core/lib/iomgr/sockaddr_windows.h" +#include #include #include #include -#include #include #include diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 07f16df51f..01e7fab773 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -36,9 +36,9 @@ #include #include +#include #include #include -#include #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/transport/secure_endpoint.h" diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 3d39cf5dda..f7e3264bda 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -36,10 +36,10 @@ #include #include +#include #include #include #include -#include #include #include "src/core/ext/transport/chttp2/alpn/alpn.h" diff --git a/src/core/lib/security/util/b64.c b/src/core/lib/security/util/b64.c index 6270277914..4892e8e621 100644 --- a/src/core/lib/security/util/b64.c +++ b/src/core/lib/security/util/b64.c @@ -183,7 +183,7 @@ static int decode_group(const unsigned char *codes, size_t num_codes, } grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, - int url_safe) { + int url_safe) { grpc_slice result = grpc_slice_malloc(b64_len); unsigned char *current = GRPC_SLICE_START_PTR(result); size_t result_size = 0; diff --git a/src/core/lib/security/util/b64.h b/src/core/lib/security/util/b64.h index f3218b9c4f..6ea0b5365b 100644 --- a/src/core/lib/security/util/b64.h +++ b/src/core/lib/security/util/b64.h @@ -47,6 +47,6 @@ grpc_slice grpc_base64_decode(const char *b64, int url_safe); /* Same as above except that the length is provided by the caller. */ grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, - int url_safe); + int url_safe); #endif /* GRPC_CORE_LIB_SECURITY_UTIL_B64_H */ diff --git a/src/core/lib/slice/slice.c b/src/core/lib/slice/slice.c index 54ff6f6baa..3dac18df61 100644 --- a/src/core/lib/slice/slice.c +++ b/src/core/lib/slice/slice.c @@ -31,9 +31,9 @@ * */ +#include #include #include -#include #include @@ -62,7 +62,7 @@ void grpc_slice_unref(grpc_slice slice) { static void noop_ref_or_unref(void *unused) {} static grpc_slice_refcount noop_refcount = {noop_ref_or_unref, - noop_ref_or_unref}; + noop_ref_or_unref}; grpc_slice grpc_slice_from_static_string(const char *s) { grpc_slice slice; @@ -95,8 +95,8 @@ static void new_slice_unref(void *p) { } grpc_slice grpc_slice_new_with_user_data(void *p, size_t len, - void (*destroy)(void *), - void *user_data) { + void (*destroy)(void *), + void *user_data) { grpc_slice slice; new_slice_refcount *rc = gpr_malloc(sizeof(new_slice_refcount)); gpr_ref_init(&rc->refs, 1); @@ -140,7 +140,7 @@ static void new_with_len_unref(void *p) { } grpc_slice grpc_slice_new_with_len(void *p, size_t len, - void (*destroy)(void *, size_t)) { + void (*destroy)(void *, size_t)) { grpc_slice slice; new_with_len_slice_refcount *rc = gpr_malloc(sizeof(new_with_len_slice_refcount)); diff --git a/src/core/lib/slice/slice_buffer.c b/src/core/lib/slice/slice_buffer.c index 8416237631..990ef128bd 100644 --- a/src/core/lib/slice/slice_buffer.c +++ b/src/core/lib/slice/slice_buffer.c @@ -31,8 +31,8 @@ * */ -#include #include +#include #include @@ -112,7 +112,8 @@ void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice s) { writes */ if (!s.refcount && n) { grpc_slice *back = &sb->slices[n - 1]; - if (!back->refcount && back->data.inlined.length < GRPC_SLICE_INLINED_SIZE) { + if (!back->refcount && + back->data.inlined.length < GRPC_SLICE_INLINED_SIZE) { if (s.data.inlined.length + back->data.inlined.length <= GRPC_SLICE_INLINED_SIZE) { memcpy(back->data.inlined.bytes + back->data.inlined.length, @@ -193,7 +194,8 @@ void grpc_slice_buffer_swap(grpc_slice_buffer *a, grpc_slice_buffer *b) { } } -void grpc_slice_buffer_move_into(grpc_slice_buffer *src, grpc_slice_buffer *dst) { +void grpc_slice_buffer_move_into(grpc_slice_buffer *src, + grpc_slice_buffer *dst) { /* anything to move? */ if (src->count == 0) { return; @@ -210,7 +212,7 @@ void grpc_slice_buffer_move_into(grpc_slice_buffer *src, grpc_slice_buffer *dst) } void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, - grpc_slice_buffer *dst) { + grpc_slice_buffer *dst) { size_t src_idx; size_t output_len = dst->length + n; size_t new_input_len = src->length - n; @@ -248,7 +250,7 @@ void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, } void grpc_slice_buffer_trim_end(grpc_slice_buffer *sb, size_t n, - grpc_slice_buffer *garbage) { + grpc_slice_buffer *garbage) { GPR_ASSERT(n <= sb->length); sb->length -= n; for (;;) { diff --git a/src/core/lib/surface/byte_buffer.c b/src/core/lib/surface/byte_buffer.c index 5ae7e3264b..d646591a65 100644 --- a/src/core/lib/surface/byte_buffer.c +++ b/src/core/lib/surface/byte_buffer.c @@ -42,7 +42,8 @@ grpc_byte_buffer *grpc_raw_byte_buffer_create(grpc_slice *slices, } grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create( - grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression) { + grpc_slice *slices, size_t nslices, + grpc_compression_algorithm compression) { size_t i; grpc_byte_buffer *bb = gpr_malloc(sizeof(grpc_byte_buffer)); bb->type = GRPC_BB_RAW; diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index 6a1ef2ba2d..0089959fbb 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -37,9 +37,9 @@ #include #include #include +#include #include #include -#include #include "src/core/lib/compression/message_compress.h" diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index 1b5525e631..7a9ccb4bc8 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -37,8 +37,8 @@ #include #include -#include #include +#include #include #include "src/core/lib/transport/metadata.h" diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc index e18f9f527c..d4afb1f00e 100644 --- a/src/cpp/client/channel_cc.cc +++ b/src/cpp/client/channel_cc.cc @@ -47,8 +47,8 @@ #include #include #include -#include #include +#include #include "src/core/lib/profiling/timers.h" namespace grpc { diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index fef8cc3d22..a07ad54376 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -39,11 +39,11 @@ #include #include #include +#include +#include #include #include #include -#include -#include #include #include "src/core/lib/profiling/timers.h" @@ -115,13 +115,16 @@ grpc_slice CoreCodegen::grpc_slice_malloc(size_t length) { return ::grpc_slice_malloc(length); } -void CoreCodegen::grpc_slice_unref(grpc_slice slice) { ::grpc_slice_unref(slice); } +void CoreCodegen::grpc_slice_unref(grpc_slice slice) { + ::grpc_slice_unref(slice); +} grpc_slice CoreCodegen::grpc_slice_split_tail(grpc_slice* s, size_t split) { return ::grpc_slice_split_tail(s, split); } -void CoreCodegen::grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice slice) { +void CoreCodegen::grpc_slice_buffer_add(grpc_slice_buffer* sb, + grpc_slice slice) { ::grpc_slice_buffer_add(sb, slice); } diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c index 680850af33..fc53cd9d36 100644 --- a/test/core/compression/message_compress_test.c +++ b/test/core/compression/message_compress_test.c @@ -70,8 +70,8 @@ static void assert_passthrough(grpc_slice value, GPR_INFO, "assert_passthrough: value_length=%" PRIuPTR " value_hash=0x%08x " "algorithm='%s' uncompressed_split='%s' compressed_split='%s'", - GRPC_SLICE_LENGTH(value), - gpr_murmur_hash3(GRPC_SLICE_START_PTR(value), GRPC_SLICE_LENGTH(value), 0), + GRPC_SLICE_LENGTH(value), gpr_murmur_hash3(GRPC_SLICE_START_PTR(value), + GRPC_SLICE_LENGTH(value), 0), algorithm_name, grpc_slice_split_mode_name(uncompressed_split_mode), grpc_slice_split_mode_name(compressed_split_mode)); @@ -221,7 +221,7 @@ static void test_bad_decompression_data_stream(void) { grpc_slice_buffer_init(&input); grpc_slice_buffer_init(&output); grpc_slice_buffer_add(&input, - grpc_slice_from_copied_buffer("\x78\xda\xff\xff", 4)); + grpc_slice_from_copied_buffer("\x78\xda\xff\xff", 4)); /* try (and fail) to decompress the invalid compresed buffer */ GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output)); @@ -237,8 +237,8 @@ static void test_bad_compression_algorithm(void) { grpc_slice_buffer_init(&input); grpc_slice_buffer_init(&output); - grpc_slice_buffer_add(&input, - grpc_slice_from_copied_string("Never gonna give you up")); + grpc_slice_buffer_add( + &input, grpc_slice_from_copied_string("Never gonna give you up")); was_compressed = grpc_msg_compress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); GPR_ASSERT(0 == was_compressed); @@ -259,8 +259,8 @@ static void test_bad_decompression_algorithm(void) { grpc_slice_buffer_init(&input); grpc_slice_buffer_init(&output); grpc_slice_buffer_add(&input, - grpc_slice_from_copied_string( - "I'm not really compressed but it doesn't matter")); + grpc_slice_from_copied_string( + "I'm not really compressed but it doesn't matter")); was_decompressed = grpc_msg_decompress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); GPR_ASSERT(0 == was_decompressed); diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 4fb89eb96e..57373970c4 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -119,7 +119,8 @@ static grpc_slice merge_slices(grpc_slice *slices, size_t nslices) { cursor = GRPC_SLICE_START_PTR(out); for (i = 0; i < nslices; i++) { - memcpy(cursor, GRPC_SLICE_START_PTR(slices[i]), GRPC_SLICE_LENGTH(slices[i])); + memcpy(cursor, GRPC_SLICE_START_PTR(slices[i]), + GRPC_SLICE_LENGTH(slices[i])); cursor += GRPC_SLICE_LENGTH(slices[i]); } diff --git a/test/core/end2end/invalid_call_argument_test.c b/test/core/end2end/invalid_call_argument_test.c index 6cc7d28489..765b6ad1be 100644 --- a/test/core/end2end/invalid_call_argument_test.c +++ b/test/core/end2end/invalid_call_argument_test.c @@ -251,7 +251,8 @@ static void test_send_messages_at_the_same_time() { gpr_log(GPR_INFO, "test_send_messages_at_the_same_time"); grpc_op *op; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); prepare_test(1); diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c index 317ca3110b..b0d18191e0 100644 --- a/test/core/end2end/tests/binary_metadata.c +++ b/test/core/end2end/tests/binary_metadata.c @@ -100,8 +100,10 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c index 8f8b7d5119..05a379cf1b 100644 --- a/test/core/end2end/tests/call_creds.c +++ b/test/core/end2end/tests/call_creds.c @@ -135,8 +135,10 @@ static void request_response_with_payload_and_call_creds( override_mode mode) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = @@ -389,7 +391,8 @@ static void test_request_with_server_rejecting_client_creds( char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_call_credentials *creds; diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index 4bf55c8725..f67da2d90d 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -118,8 +118,10 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, size_t details_capacity = 0; grpc_byte_buffer *request_payload_recv = NULL; grpc_byte_buffer *response_payload_recv = NULL; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/cancel_after_client_done.c b/test/core/end2end/tests/cancel_after_client_done.c index afb17b0719..44be85435d 100644 --- a/test/core/end2end/tests/cancel_after_client_done.c +++ b/test/core/end2end/tests/cancel_after_client_done.c @@ -117,8 +117,10 @@ static void test_cancel_after_accept_and_writes_closed( size_t details_capacity = 0; grpc_byte_buffer *request_payload_recv = NULL; grpc_byte_buffer *response_payload_recv = NULL; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c index fe0e0d689c..c276f5e2fa 100644 --- a/test/core/end2end/tests/cancel_after_invoke.c +++ b/test/core/end2end/tests/cancel_after_invoke.c @@ -116,7 +116,8 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config, char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c index 3a0b83c4d2..e33b120a5b 100644 --- a/test/core/end2end/tests/cancel_before_invoke.c +++ b/test/core/end2end/tests/cancel_before_invoke.c @@ -114,7 +114,8 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config, char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index 92788dd8fa..4ed24baf67 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -308,7 +308,8 @@ static void request_with_payload_template( response_str[1023] = '\0'; request_payload_slice = grpc_slice_from_copied_string(request_str); - grpc_slice response_payload_slice = grpc_slice_from_copied_string(response_str); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string(response_str); client_args = grpc_channel_args_set_compression_algorithm( NULL, default_client_channel_compression_algorithm); diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c index 36f98694b6..b180957d4f 100644 --- a/test/core/end2end/tests/filter_call_init_fails.c +++ b/test/core/end2end/tests/filter_call_init_fails.c @@ -108,7 +108,8 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index 66449558c7..943a3df90d 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -104,7 +104,8 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index 29dcafb985..26a4eef7d9 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -99,7 +99,8 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request_with_large_metadata(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c index 1dba200c02..046e0c321b 100644 --- a/test/core/end2end/tests/load_reporting_hook.c +++ b/test/core/end2end/tests/load_reporting_hook.c @@ -128,7 +128,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f, grpc_metadata *initial_lr_metadata, grpc_metadata *trailing_lr_metadata) { grpc_slice request_payload_slice = grpc_slice_from_static_string(request_msg); - grpc_slice response_payload_slice = grpc_slice_from_static_string(response_msg); + grpc_slice response_payload_slice = + grpc_slice_from_static_string(response_msg); grpc_call *c; grpc_call *s; grpc_byte_buffer *request_payload = diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index cdf52f9838..559b00d828 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -116,7 +116,8 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config, cq_verifier *cqv; grpc_op ops[6]; grpc_op *op; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *recv_payload = NULL; diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c index e9528ff105..84447e6a2f 100644 --- a/test/core/end2end/tests/network_status_change.c +++ b/test/core/end2end/tests/network_status_change.c @@ -102,7 +102,8 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_invoke_network_status_change(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c index 5a19950726..01ba964ef0 100644 --- a/test/core/end2end/tests/payload.c +++ b/test/core/end2end/tests/payload.c @@ -95,7 +95,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -/* Creates and returns a grpc_slice containing random alphanumeric characters. */ +/* Creates and returns a grpc_slice containing random alphanumeric characters. + */ static grpc_slice generate_random_slice() { size_t i; static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c index 3398a9cff7..317788f7fa 100644 --- a/test/core/end2end/tests/ping_pong_streaming.c +++ b/test/core/end2end/tests/ping_pong_streaming.c @@ -120,8 +120,10 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, grpc_byte_buffer *response_payload; grpc_byte_buffer *response_payload_recv; int i; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", "foo.test.google.fr:1234", deadline, diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c index a37fc645b4..8649c1563f 100644 --- a/test/core/end2end/tests/request_with_flags.c +++ b/test/core/end2end/tests/request_with_flags.c @@ -100,7 +100,8 @@ static void test_invoke_request_with_flags( grpc_end2end_test_config config, uint32_t *flags_for_op, grpc_call_error call_start_batch_expected_result) { grpc_call *c; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c index 3e2bbb3b0e..144cd58ec0 100644 --- a/test/core/end2end/tests/request_with_payload.c +++ b/test/core/end2end/tests/request_with_payload.c @@ -99,7 +99,8 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_invoke_request_with_payload(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c index 280bad5749..cf81b06692 100644 --- a/test/core/end2end/tests/resource_quota_server.c +++ b/test/core/end2end/tests/resource_quota_server.c @@ -95,7 +95,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -/* Creates and returns a grpc_slice containing random alphanumeric characters. */ +/* Creates and returns a grpc_slice containing random alphanumeric characters. + */ static grpc_slice generate_random_slice() { size_t i; static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; diff --git a/test/core/end2end/tests/simple_cacheable_request.c b/test/core/end2end/tests/simple_cacheable_request.c index 40dd3983e1..4284175214 100644 --- a/test/core/end2end/tests/simple_cacheable_request.c +++ b/test/core/end2end/tests/simple_cacheable_request.c @@ -102,8 +102,10 @@ static void test_cacheable_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/simple_metadata.c b/test/core/end2end/tests/simple_metadata.c index 1ac9dc8210..e11981f92b 100644 --- a/test/core/end2end/tests/simple_metadata.c +++ b/test/core/end2end/tests/simple_metadata.c @@ -100,8 +100,10 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/trailing_metadata.c b/test/core/end2end/tests/trailing_metadata.c index 0bbf0879cc..f88d5edeae 100644 --- a/test/core/end2end/tests/trailing_metadata.c +++ b/test/core/end2end/tests/trailing_metadata.c @@ -100,8 +100,10 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/http/format_request_test.c b/test/core/http/format_request_test.c index bd31e5e8ab..290990c906 100644 --- a/test/core/http/format_request_test.c +++ b/test/core/http/format_request_test.c @@ -52,13 +52,13 @@ static void test_format_get_request(void) { slice = grpc_httpcli_format_get_request(&req); GPR_ASSERT(0 == grpc_slice_str_cmp(slice, - "GET /index.html HTTP/1.0\r\n" - "Host: example.com\r\n" - "Connection: close\r\n" - "User-Agent: " GRPC_HTTPCLI_USER_AGENT - "\r\n" - "x-yz: abc\r\n" - "\r\n")); + "GET /index.html HTTP/1.0\r\n" + "Host: example.com\r\n" + "Connection: close\r\n" + "User-Agent: " GRPC_HTTPCLI_USER_AGENT + "\r\n" + "x-yz: abc\r\n" + "\r\n")); grpc_slice_unref(slice); } @@ -79,16 +79,16 @@ static void test_format_post_request(void) { slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len); GPR_ASSERT(0 == grpc_slice_str_cmp(slice, - "POST /index.html HTTP/1.0\r\n" - "Host: example.com\r\n" - "Connection: close\r\n" - "User-Agent: " GRPC_HTTPCLI_USER_AGENT - "\r\n" - "x-yz: abc\r\n" - "Content-Type: text/plain\r\n" - "Content-Length: 9\r\n" - "\r\n" - "fake body")); + "POST /index.html HTTP/1.0\r\n" + "Host: example.com\r\n" + "Connection: close\r\n" + "User-Agent: " GRPC_HTTPCLI_USER_AGENT + "\r\n" + "x-yz: abc\r\n" + "Content-Type: text/plain\r\n" + "Content-Length: 9\r\n" + "\r\n" + "fake body")); grpc_slice_unref(slice); } @@ -107,13 +107,13 @@ static void test_format_post_request_no_body(void) { slice = grpc_httpcli_format_post_request(&req, NULL, 0); GPR_ASSERT(0 == grpc_slice_str_cmp(slice, - "POST /index.html HTTP/1.0\r\n" - "Host: example.com\r\n" - "Connection: close\r\n" - "User-Agent: " GRPC_HTTPCLI_USER_AGENT - "\r\n" - "x-yz: abc\r\n" - "\r\n")); + "POST /index.html HTTP/1.0\r\n" + "Host: example.com\r\n" + "Connection: close\r\n" + "User-Agent: " GRPC_HTTPCLI_USER_AGENT + "\r\n" + "x-yz: abc\r\n" + "\r\n")); grpc_slice_unref(slice); } diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index 8a1699608e..8186ea7e85 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -36,9 +36,9 @@ #include #include +#include #include #include -#include #include #include #include "test/core/util/test_config.h" @@ -88,7 +88,7 @@ static grpc_endpoint_test_fixture begin_test(grpc_endpoint_test_config config, static void end_test(grpc_endpoint_test_config config) { config.clean_up(); } static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, - size_t *num_blocks, uint8_t *current_data) { + size_t *num_blocks, uint8_t *current_data) { size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1 : 0); grpc_slice *slices = gpr_malloc(sizeof(grpc_slice) * nslices); size_t num_bytes_left = num_bytes; @@ -99,7 +99,7 @@ static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, for (i = 0; i < nslices; ++i) { slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left - : slice_size); + : slice_size); num_bytes_left -= GRPC_SLICE_LENGTH(slices[i]); buf = GRPC_SLICE_START_PTR(slices[i]); for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { diff --git a/test/core/iomgr/load_file_test.c b/test/core/iomgr/load_file_test.c index af822466d7..8714e1f368 100644 --- a/test/core/iomgr/load_file_test.c +++ b/test/core/iomgr/load_file_test.c @@ -34,9 +34,9 @@ #include #include +#include #include #include -#include #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/support/string.h" diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index bba1900987..5eafa570bb 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -274,7 +274,7 @@ struct write_socket_state { }; static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, - size_t *num_blocks, uint8_t *current_data) { + size_t *num_blocks, uint8_t *current_data) { size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1u : 0u); grpc_slice *slices = gpr_malloc(sizeof(grpc_slice) * nslices); size_t num_bytes_left = num_bytes; @@ -284,7 +284,7 @@ static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, for (i = 0; i < nslices; ++i) { slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left - : slice_size); + : slice_size); num_bytes_left -= GRPC_SLICE_LENGTH(slices[i]); buf = GRPC_SLICE_START_PTR(slices[i]); for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c index dea0f56266..af883f51e9 100644 --- a/test/core/security/b64_test.c +++ b/test/core/security/b64_test.c @@ -35,9 +35,9 @@ #include +#include #include #include -#include #include "test/core/util/test_config.h" static int buffers_are_equal(const unsigned char *buf1, diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c index 0303b791ae..741ace9bdd 100644 --- a/test/core/security/create_jwt.c +++ b/test/core/security/create_jwt.c @@ -37,10 +37,10 @@ #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" +#include #include #include #include -#include void create_jwt(const char *json_key_file_path, const char *service_url, const char *scope) { diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 0637215915..d4c755088d 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -243,9 +243,10 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) { GPR_ASSERT(token_lifetime.tv_sec == 3599); GPR_ASSERT(token_lifetime.tv_nsec == 0); GPR_ASSERT(token_md->num_entries == 1); - GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].key, "authorization") == 0); + GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].key, "authorization") == + 0); GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].value, - "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == + "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); grpc_credentials_md_store_unref(token_md); grpc_http_response_destroy(&response); @@ -530,7 +531,7 @@ static void on_oauth2_creds_get_metadata_success( GPR_ASSERT(num_md == 1); GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].key, "authorization") == 0); GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].value, - "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == + "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); GPR_ASSERT(user_data != NULL); GPR_ASSERT(strcmp((const char *)user_data, test_user_data) == 0); diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index ca093095c3..e9e211206c 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -36,10 +36,10 @@ #include #include +#include #include #include #include -#include #include #include "src/core/lib/iomgr/load_file.h" diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c index 593b79855f..201655881f 100644 --- a/test/core/security/json_token_test.c +++ b/test/core/security/json_token_test.c @@ -37,9 +37,9 @@ #include #include +#include #include #include -#include #include "src/core/lib/json/json.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 01fe436f27..f8afba8d6d 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -37,9 +37,9 @@ #include +#include #include #include -#include #include #include "src/core/lib/http/httpcli.h" @@ -487,8 +487,8 @@ static void corrupt_jwt_sig(char *jwt) { GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig)); sig_bytes = GRPC_SLICE_START_PTR(sig); (*sig_bytes)++; /* Corrupt first byte. */ - bad_b64_sig = - grpc_base64_encode(GRPC_SLICE_START_PTR(sig), GRPC_SLICE_LENGTH(sig), 1, 0); + bad_b64_sig = grpc_base64_encode(GRPC_SLICE_START_PTR(sig), + GRPC_SLICE_LENGTH(sig), 1, 0); memcpy(last_dot + 1, bad_b64_sig, strlen(bad_b64_sig)); gpr_free(bad_b64_sig); grpc_slice_unref(sig); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 22dbf0428d..44a209258d 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -37,9 +37,9 @@ #include #include +#include #include #include -#include #include #include "src/core/lib/security/credentials/credentials.h" diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 3a04c6e3eb..157b7bf5ff 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -36,10 +36,10 @@ #include #include +#include #include #include #include -#include #include #include "src/core/lib/security/credentials/composite/composite_credentials.h" diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c index 4d0ff242ea..043d29e6bb 100644 --- a/test/core/security/verify_jwt.c +++ b/test/core/security/verify_jwt.c @@ -36,10 +36,10 @@ #include #include +#include #include #include #include -#include #include #include "src/core/lib/security/credentials/jwt/jwt_verifier.h" diff --git a/test/core/slice/slice_buffer_test.c b/test/core/slice/slice_buffer_test.c index 4c26113d05..bf9ae197d2 100644 --- a/test/core/slice/slice_buffer_test.c +++ b/test/core/slice/slice_buffer_test.c @@ -31,8 +31,8 @@ * */ -#include #include +#include #include "test/core/util/test_config.h" void test_slice_buffer_add() { diff --git a/test/core/slice/slice_test.c b/test/core/slice/slice_test.c index e6d29e7459..ca44becfd0 100644 --- a/test/core/slice/slice_test.c +++ b/test/core/slice/slice_test.c @@ -170,11 +170,12 @@ static void test_slice_sub_works(unsigned length) { grpc_slice_unref(slice); } -static void check_head_tail(grpc_slice slice, grpc_slice head, grpc_slice tail) { +static void check_head_tail(grpc_slice slice, grpc_slice head, + grpc_slice tail) { GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == GRPC_SLICE_LENGTH(head) + GRPC_SLICE_LENGTH(tail)); - GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice), GRPC_SLICE_START_PTR(head), - GRPC_SLICE_LENGTH(head))); + GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice), + GRPC_SLICE_START_PTR(head), GRPC_SLICE_LENGTH(head))); GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(head), GRPC_SLICE_START_PTR(tail), GRPC_SLICE_LENGTH(tail))); } @@ -243,8 +244,8 @@ static void test_slice_from_copied_string_works(void) { slice = grpc_slice_from_copied_string(text); GPR_ASSERT(strlen(text) == GRPC_SLICE_LENGTH(slice)); - GPR_ASSERT(0 == - memcmp(text, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice))); + GPR_ASSERT( + 0 == memcmp(text, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice))); grpc_slice_unref(slice); } diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index c7e8f3a050..e2813df70c 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -36,9 +36,9 @@ #include #include +#include #include #include -#include #include "test/core/util/parse_hexstring.h" #include "test/core/util/slice_splitter.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/varint_test.c b/test/core/transport/chttp2/varint_test.c index 5b831c71b2..e29be4b056 100644 --- a/test/core/transport/chttp2/varint_test.c +++ b/test/core/transport/chttp2/varint_test.c @@ -33,15 +33,16 @@ #include "src/core/ext/transport/chttp2/transport/varint.h" -#include #include +#include #include "test/core/util/test_config.h" static void test_varint(uint32_t value, uint32_t prefix_bits, uint8_t prefix_or, const char *expect_bytes, size_t expect_length) { uint32_t nbytes = GRPC_CHTTP2_VARINT_LENGTH(value, prefix_bits); - grpc_slice expect = grpc_slice_from_copied_buffer(expect_bytes, expect_length); + grpc_slice expect = + grpc_slice_from_copied_buffer(expect_bytes, expect_length); grpc_slice slice; gpr_log(GPR_DEBUG, "Test: 0x%08x", value); GPR_ASSERT(nbytes == expect_length); diff --git a/test/core/util/mock_endpoint.h b/test/core/util/mock_endpoint.h index 8f8d2a412d..ec7f0fcfcd 100644 --- a/test/core/util/mock_endpoint.h +++ b/test/core/util/mock_endpoint.h @@ -39,6 +39,7 @@ grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(grpc_slice slice), grpc_resource_quota *resource_quota); void grpc_mock_endpoint_put_read(grpc_exec_ctx *exec_ctx, - grpc_endpoint *mock_endpoint, grpc_slice slice); + grpc_endpoint *mock_endpoint, + grpc_slice slice); #endif diff --git a/test/core/util/one_corpus_entry_fuzzer.c b/test/core/util/one_corpus_entry_fuzzer.c index 6b572bb3c3..c016ebb536 100644 --- a/test/core/util/one_corpus_entry_fuzzer.c +++ b/test/core/util/one_corpus_entry_fuzzer.c @@ -47,7 +47,8 @@ int main(int argc, char **argv) { leak_check = false; GPR_ASSERT( GRPC_LOG_IF_ERROR("load_file", grpc_load_file(argv[1], 0, &buffer))); - LLVMFuzzerTestOneInput(GRPC_SLICE_START_PTR(buffer), GRPC_SLICE_LENGTH(buffer)); + LLVMFuzzerTestOneInput(GRPC_SLICE_START_PTR(buffer), + GRPC_SLICE_LENGTH(buffer)); grpc_slice_unref(buffer); return 0; } diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index a56667585f..f3cfe53bda 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -456,7 +456,8 @@ static void perform_request(client_fixture *cf) { int i; memset(ops, 0, sizeof(ops)); - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); c = grpc_channel_create_call(cf->client, NULL, GRPC_PROPAGATE_DEFAULTS, cf->cq, "/foo", "foo.test.google.fr:1234", diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc index 0517610f10..a02a8b2ee2 100644 --- a/test/cpp/util/cli_call.cc +++ b/test/cpp/util/cli_call.cc @@ -41,8 +41,8 @@ #include #include #include -#include #include +#include namespace grpc { namespace testing { -- cgit v1.2.3 From 24392f375f202a7001063488bdead6fdb5c86381 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 27 Oct 2016 11:29:33 -0700 Subject: MAC and FreeBSD do not have IP_PKTINFO as a meaningful setsockopt --- src/core/lib/iomgr/port.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index c0bb3b5a23..f1897bb91f 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -90,7 +90,6 @@ #define GRPC_POSIX_SOCKETUTILS #endif #elif defined(GPR_APPLE) -#define GRPC_HAVE_IP_PKTINFO 1 #define GRPC_HAVE_SO_NOSIGPIPE 1 #define GRPC_HAVE_UNIX_SOCKET 1 #define GRPC_MSG_IOVLEN_TYPE int @@ -102,7 +101,6 @@ #define GRPC_TIMER_USE_GENERIC 1 #elif defined(GPR_FREEBSD) #define GRPC_HAVE_IPV6_RECVPKTINFO 1 -#define GRPC_HAVE_IP_PKTINFO 1 #define GRPC_HAVE_SO_NOSIGPIPE 1 #define GRPC_HAVE_UNIX_SOCKET 1 #define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 -- cgit v1.2.3 From b2d24886196c5000cc15bb5953659ff50b09ad87 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 27 Oct 2016 15:44:07 -0700 Subject: Add grpc_channel_get_info() to C-core API. --- include/grpc/grpc.h | 4 +++ include/grpc/impl/codegen/grpc_types.h | 7 ++++++ src/core/ext/census/grpc_filter.c | 2 ++ src/core/ext/client_channel/client_channel.c | 29 +++++++++++++++++++--- .../ext/load_reporting/load_reporting_filter.c | 1 + src/core/lib/channel/channel_stack.c | 7 ++++++ src/core/lib/channel/channel_stack.h | 8 ++++++ src/core/lib/channel/compress_filter.c | 1 + src/core/lib/channel/connected_channel.c | 6 +++++ src/core/lib/channel/deadline_filter.c | 2 ++ src/core/lib/channel/http_client_filter.c | 1 + src/core/lib/channel/http_server_filter.c | 1 + src/core/lib/channel/message_size_filter.c | 1 + .../lib/security/transport/client_auth_filter.c | 1 + .../lib/security/transport/server_auth_filter.c | 1 + src/core/lib/surface/channel.c | 9 +++++++ src/core/lib/surface/lame_client.c | 5 ++++ src/core/lib/surface/server.c | 1 + test/core/client_channel/lb_policies_test.c | 16 ++++++++++++ test/core/end2end/tests/filter_call_init_fails.c | 1 + test/core/end2end/tests/filter_causes_close.c | 1 + 21 files changed, 101 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 587d86c98f..dbd125e57a 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -237,6 +237,10 @@ GRPCAPI struct census_context *grpc_census_call_get_context(grpc_call *call); created for. */ GRPCAPI char *grpc_channel_get_target(grpc_channel *channel); +/** Request info about the channel. */ +GRPCAPI void grpc_channel_get_info(grpc_channel *channel, + grpc_channel_info *channel_info); + /** Create a client channel to 'target'. Additional channel level configuration MAY be provided by grpc_channel_args, though the expectation is that most clients will want to simply pass NULL. See grpc_channel_args definition for diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 0be7ab2ad2..0fc86b57cc 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -467,6 +467,13 @@ typedef struct grpc_op { } data; } grpc_op; +/** Information requested from the channel. */ +typedef struct { + /* If non-NULL, will be set to point to a string indicating the LB + * policy name. Caller takes ownership. */ + char **lb_policy_name; +} grpc_channel_info; + #ifdef __cplusplus } #endif diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index a4cf6f37bd..7ace2f671e 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -191,6 +191,7 @@ const grpc_channel_filter grpc_client_census_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "census-client"}; const grpc_channel_filter grpc_server_census_filter = { @@ -204,4 +205,5 @@ const grpc_channel_filter grpc_server_census_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "census-server"}; diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 80b4f048c2..d15af0b438 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -123,6 +124,7 @@ typedef struct client_channel_channel_data { /** mutex protecting all variables below in this data structure */ gpr_mu mu; /** currently active load balancer */ + char* lb_policy_name; grpc_lb_policy *lb_policy; /** maps method names to method_parameters structs */ grpc_mdstr_hash_table *method_params_table; @@ -223,6 +225,7 @@ static void watch_lb_policy(grpc_exec_ctx *exec_ctx, channel_data *chand, static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { channel_data *chand = arg; + char *lb_policy_name = NULL; grpc_lb_policy *lb_policy = NULL; grpc_lb_policy *old_lb_policy; grpc_mdstr_hash_table *method_params_table = NULL; @@ -236,12 +239,11 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, lb_policy_args.client_channel_factory = chand->client_channel_factory; // Find LB policy name. - const char *lb_policy_name = NULL; const grpc_arg *channel_arg = grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_LB_POLICY_NAME); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); - lb_policy_name = channel_arg->value.string; + lb_policy_name = gpr_strdup(channel_arg->value.string); } // Special case: If all of the addresses are balancer addresses, // assume that we should use the grpclb policy, regardless of what the @@ -265,13 +267,14 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, "addresses, no backend addresses -- forcing use of grpclb LB " "policy", lb_policy_name); + gpr_free(lb_policy_name); } - lb_policy_name = "grpclb"; + lb_policy_name = gpr_strdup("grpclb"); } } // Use pick_first if nothing was specified and we didn't select grpclb // above. - if (lb_policy_name == NULL) lb_policy_name = "pick_first"; + if (lb_policy_name == NULL) lb_policy_name = gpr_strdup("pick_first"); lb_policy = grpc_lb_policy_create(exec_ctx, lb_policy_name, &lb_policy_args); @@ -299,6 +302,10 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, } gpr_mu_lock(&chand->mu); + if (lb_policy_name != NULL) { + gpr_free(chand->lb_policy_name); + chand->lb_policy_name = lb_policy_name; + } old_lb_policy = chand->lb_policy; chand->lb_policy = lb_policy; if (chand->method_params_table != NULL) { @@ -426,6 +433,18 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&chand->mu); } +static void cc_get_channel_info(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_info *info) { + channel_data *chand = elem->channel_data; + gpr_mu_lock(&chand->mu); + if (info->lb_policy_name != NULL) { + *info->lb_policy_name = chand->lb_policy_name == NULL + ? NULL : gpr_strdup(chand->lb_policy_name); + } + gpr_mu_unlock(&chand->mu); +} + /* Constructor for channel_data */ static void cc_init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, @@ -465,6 +484,7 @@ static void cc_destroy_channel_elem(grpc_exec_ctx *exec_ctx, chand->interested_parties); GRPC_LB_POLICY_UNREF(exec_ctx, chand->lb_policy, "channel"); } + gpr_free(chand->lb_policy_name); if (chand->method_params_table != NULL) { grpc_mdstr_hash_table_unref(chand->method_params_table); } @@ -1048,6 +1068,7 @@ const grpc_channel_filter grpc_client_channel_filter = { cc_init_channel_elem, cc_destroy_channel_elem, cc_get_peer, + cc_get_channel_info, "client-channel", }; diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index eeae2400fb..b810e20bb9 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -232,4 +232,5 @@ const grpc_channel_filter grpc_load_reporting_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "load_reporting"}; diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 2c5367901d..3370f0ef45 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -255,6 +255,13 @@ char *grpc_call_next_get_peer(grpc_exec_ctx *exec_ctx, return next_elem->filter->get_peer(exec_ctx, next_elem); } +void grpc_channel_next_get_info(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_info *channel_info) { + grpc_channel_element *next_elem = elem + 1; + return next_elem->filter->get_channel_info(exec_ctx, next_elem, channel_info); +} + void grpc_channel_next_op(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_transport_op *op) { grpc_channel_element *next_elem = elem + 1; diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 27f3be7b29..6fbcd87064 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -156,6 +156,10 @@ typedef struct { /* Implement grpc_call_get_peer() */ char *(*get_peer)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); + /* Implement grpc_channel_get_info() */ + void (*get_channel_info)(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, + grpc_channel_info *channel_info); + /* The name of this filter */ const char *name; } grpc_channel_filter; @@ -273,6 +277,10 @@ void grpc_channel_next_op(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_transport_op *op); /* Pass through a request to get_peer to the next child element */ char *grpc_call_next_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); +/* Pass through a request to get_channel_info() to the next child element */ +void grpc_channel_next_get_info(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_info *channel_info); /* Given the top element of a channel stack, get the channel stack itself */ grpc_channel_stack *grpc_channel_stack_from_top_element( diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 0981d59f63..7968cf7e26 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -328,4 +328,5 @@ const grpc_channel_filter grpc_compress_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "compress"}; diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 918379c845..6ae2b3b6b7 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -134,6 +134,11 @@ static char *con_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { return grpc_transport_get_peer(exec_ctx, chand->transport); } +/* No-op. */ +static void con_get_channel_info(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_info *channel_info) {} + static const grpc_channel_filter connected_channel_filter = { con_start_transport_stream_op, con_start_transport_op, @@ -145,6 +150,7 @@ static const grpc_channel_filter connected_channel_filter = { init_channel_elem, destroy_channel_elem, con_get_peer, + con_get_channel_info, "connected", }; diff --git a/src/core/lib/channel/deadline_filter.c b/src/core/lib/channel/deadline_filter.c index d2ea5250f6..224c823a4f 100644 --- a/src/core/lib/channel/deadline_filter.c +++ b/src/core/lib/channel/deadline_filter.c @@ -316,6 +316,7 @@ const grpc_channel_filter grpc_client_deadline_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "deadline", }; @@ -330,5 +331,6 @@ const grpc_channel_filter grpc_server_deadline_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "deadline", }; diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 1dc05fb20d..b5ab4dd5ca 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -448,4 +448,5 @@ const grpc_channel_filter grpc_http_client_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "http-client"}; diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index f2221fb0fb..d02a765d0d 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -344,4 +344,5 @@ const grpc_channel_filter grpc_http_server_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "http-server"}; diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 7dc5ae0df1..bbcd2a2145 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -248,4 +248,5 @@ const grpc_channel_filter grpc_message_size_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "message_size"}; diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index b366d1410f..3a96af2c69 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -351,4 +351,5 @@ const grpc_channel_filter grpc_client_auth_filter = {auth_start_transport_op, init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "client-auth"}; diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index b2c6815af8..8ecc5fd088 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -278,4 +278,5 @@ const grpc_channel_filter grpc_server_auth_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "server-auth"}; diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 92d783b78d..22bf85b126 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -175,6 +175,15 @@ char *grpc_channel_get_target(grpc_channel *channel) { return gpr_strdup(channel->target); } +void grpc_channel_get_info(grpc_channel *channel, + grpc_channel_info *channel_info) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_channel_element *elem = + grpc_channel_stack_element(CHANNEL_STACK_FROM_CHANNEL(channel), 0); + elem->filter->get_channel_info(&exec_ctx, elem, channel_info); + grpc_exec_ctx_finish(&exec_ctx); +} + static grpc_call *grpc_channel_create_call_internal( grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *cq, grpc_pollset_set *pollset_set_alternative, diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index d32c884e8e..6fd1dd921c 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -88,6 +88,10 @@ static char *lame_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { return NULL; } +static void lame_get_channel_info(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_info *channel_info) {} + static void lame_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_transport_op *op) { @@ -140,6 +144,7 @@ const grpc_channel_filter grpc_lame_filter = { init_channel_elem, destroy_channel_elem, lame_get_peer, + lame_get_channel_info, "lame-client", }; diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 3a90308058..914b62e176 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -965,6 +965,7 @@ const grpc_channel_filter grpc_server_top_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "server", }; diff --git a/test/core/client_channel/lb_policies_test.c b/test/core/client_channel/lb_policies_test.c index 844db5e6cb..857ba6bd52 100644 --- a/test/core/client_channel/lb_policies_test.c +++ b/test/core/client_channel/lb_policies_test.c @@ -638,6 +638,21 @@ static void test_pending_calls(size_t concurrent_calls) { test_spec_destroy(spec); } +static void test_get_channel_info() { + grpc_channel *channel = grpc_insecure_channel_create( + "test:127.0.0.1:1234?lb_policy=round_robin", NULL, NULL); + // Ensures that resolver returns. + grpc_channel_check_connectivity_state(channel, true /* try_to_connect */); + char *lb_policy_name = NULL; + grpc_channel_info channel_info; + channel_info.lb_policy_name = &lb_policy_name; + grpc_channel_get_info(channel, &channel_info); + GPR_ASSERT(lb_policy_name != NULL); + GPR_ASSERT(strcmp(lb_policy_name, "round_robin") == 0); + gpr_free(lb_policy_name); + grpc_channel_destroy(channel); +} + static void print_failed_expectations(const int *expected_connection_sequence, const int *actual_connection_sequence, const size_t expected_seq_length, @@ -933,6 +948,7 @@ int main(int argc, char **argv) { test_pending_calls(4); test_ping(); + test_get_channel_info(); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c index 0e5692f4c9..2f8a2a4d04 100644 --- a/test/core/end2end/tests/filter_call_init_fails.c +++ b/test/core/end2end/tests/filter_call_init_fails.c @@ -231,6 +231,7 @@ static const grpc_channel_filter test_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "filter_call_init_fails"}; /******************************************************************************* diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index d5eddc7330..da554142e8 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -258,6 +258,7 @@ static const grpc_channel_filter test_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "filter_causes_close"}; /******************************************************************************* -- cgit v1.2.3 From 0baf1dc569a112bc71039b84bdaef0bad68cf852 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 28 Oct 2016 04:44:01 +0200 Subject: Made LB token dynamic size <= 50 bytes --- src/core/ext/lb_policy/grpclb/grpclb.c | 8 +++++--- src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h | 4 ++-- src/proto/grpc/lb/v1/load_balancer.options | 2 +- test/cpp/grpclb/grpclb_test.cc | 2 -- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 6da4febf26..5bbf857079 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -407,10 +407,12 @@ static grpc_lb_addresses *process_serverlist( /* lb token processing */ void *user_data; if (server->has_load_balance_token) { - const size_t lb_token_size = - GPR_ARRAY_SIZE(server->load_balance_token) - 1; + const size_t lb_token_max_length = + GPR_ARRAY_SIZE(server->load_balance_token); + const size_t lb_token_length = + strnlen(server->load_balance_token, lb_token_max_length); grpc_mdstr *lb_token_mdstr = grpc_mdstr_from_buffer( - (uint8_t *)server->load_balance_token, lb_token_size); + (uint8_t *)server->load_balance_token, lb_token_length); user_data = grpc_mdelem_from_metadata_strings(GRPC_MDSTR_LB_TOKEN, lb_token_mdstr); } else { diff --git a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h index 53fed22bae..e36d0966f8 100644 --- a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h @@ -77,7 +77,7 @@ typedef struct _grpc_lb_v1_Server { bool has_port; int32_t port; bool has_load_balance_token; - char load_balance_token[65]; + char load_balance_token[50]; bool has_drop_request; bool drop_request; /* @@protoc_insertion_point(struct:grpc_lb_v1_Server) */ @@ -172,7 +172,7 @@ extern const pb_field_t grpc_lb_v1_Server_fields[5]; #define grpc_lb_v1_LoadBalanceResponse_size (98 + grpc_lb_v1_ServerList_size) #define grpc_lb_v1_InitialLoadBalanceResponse_size 90 /* grpc_lb_v1_ServerList_size depends on runtime parameters */ -#define grpc_lb_v1_Server_size 98 +#define grpc_lb_v1_Server_size 83 /* Message IDs (where set with "msgid" option) */ #ifdef PB_MSGID diff --git a/src/proto/grpc/lb/v1/load_balancer.options b/src/proto/grpc/lb/v1/load_balancer.options index a9398d5f47..f4afc1ee61 100644 --- a/src/proto/grpc/lb/v1/load_balancer.options +++ b/src/proto/grpc/lb/v1/load_balancer.options @@ -2,5 +2,5 @@ grpc.lb.v1.InitialLoadBalanceRequest.name max_size:128 grpc.lb.v1.InitialLoadBalanceResponse.client_config max_size:64 grpc.lb.v1.InitialLoadBalanceResponse.load_balancer_delegate max_size:64 grpc.lb.v1.Server.ip_address max_size:16 -grpc.lb.v1.Server.load_balance_token max_size:65 +grpc.lb.v1.Server.load_balance_token max_size:50 load_balancer.proto no_unions:true diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index b6056f9ae4..d788240438 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -144,7 +144,6 @@ static gpr_slice build_response_payload_slice( // disfunctional implementation of std::to_string in gcc 4.4, which doesn't // have a version for int but does have one for long long int. string token_data = "token" + std::to_string((long long int)ports[i]); - token_data.resize(64, '-'); server->set_load_balance_token(token_data); } const grpc::string &enc_resp = response.SerializeAsString(); @@ -333,7 +332,6 @@ static void start_backend_server(server_fixture *sf) { // disfunctional implementation of std::to_string in gcc 4.4, which doesn't // have a version for int but does have one for long long int. string expected_token = "token" + std::to_string((long long int)sf->port); - expected_token.resize(64, '-'); GPR_ASSERT(contains_metadata(&request_metadata_recv, "lb-token", expected_token.c_str())); -- cgit v1.2.3 From 290e9a726d8764eb3c2deb239c4d689f4b3c4cf8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 28 Oct 2016 08:17:00 -0700 Subject: Fix resource quotas on Windows --- src/core/lib/iomgr/endpoint_pair_windows.c | 6 +++--- src/core/lib/iomgr/tcp_client_windows.c | 26 +++++++++++++++++++---- src/core/lib/iomgr/tcp_server_windows.c | 22 ++++++++++++++++++-- src/core/lib/iomgr/tcp_windows.c | 33 ++++++++++++++++++++++++++++-- src/core/lib/iomgr/tcp_windows.h | 2 +- 5 files changed, 77 insertions(+), 12 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/endpoint_pair_windows.c b/src/core/lib/iomgr/endpoint_pair_windows.c index 5c78c95492..cb23e314cc 100644 --- a/src/core/lib/iomgr/endpoint_pair_windows.c +++ b/src/core/lib/iomgr/endpoint_pair_windows.c @@ -82,14 +82,14 @@ static void create_sockets(SOCKET sv[2]) { sv[0] = svr_sock; } -grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, +grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, grpc_resource_quota *resource_quota, size_t read_slice_size) { SOCKET sv[2]; grpc_endpoint_pair p; create_sockets(sv); - p.client = grpc_tcp_create(grpc_winsocket_create(sv[1], "endpoint:client"), + p.client = grpc_tcp_create(grpc_winsocket_create(sv[1], "endpoint:client"),resource_quota, "endpoint:server"); - p.server = grpc_tcp_create(grpc_winsocket_create(sv[0], "endpoint:server"), + p.server = grpc_tcp_create(grpc_winsocket_create(sv[0], "endpoint:server"), resource_quota, "endpoint:client"); return p; } diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index fdd8c1a1f8..ef9e5d6f94 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -50,6 +50,7 @@ #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_windows.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/channel/channel_args.h" typedef struct { grpc_closure *on_done; @@ -61,13 +62,15 @@ typedef struct { int refs; grpc_closure on_connect; grpc_endpoint **endpoint; + grpc_resource_quota *resource_quota; } async_connect; -static void async_connect_unlock_and_cleanup(async_connect *ac, +static void async_connect_unlock_and_cleanup(grpc_exec_ctx *exec_ctx, async_connect *ac, grpc_winsocket *socket) { int done = (--ac->refs == 0); gpr_mu_unlock(&ac->mu); if (done) { + grpc_resource_quota_internal_unref(exec_ctx, ac->resource_quota); gpr_mu_destroy(&ac->mu); gpr_free(ac->addr_name); gpr_free(ac); @@ -83,7 +86,7 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { if (socket != NULL) { grpc_winsocket_shutdown(socket); } - async_connect_unlock_and_cleanup(ac, socket); + async_connect_unlock_and_cleanup(exec_ctx, ac, socket); } static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { @@ -113,12 +116,12 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { if (!wsa_success) { error = GRPC_WSA_ERROR(WSAGetLastError(), "ConnectEx"); } else { - *ep = grpc_tcp_create(socket, ac->addr_name); + *ep = grpc_tcp_create(socket, ac->resource_quota, ac->addr_name); socket = NULL; } } - async_connect_unlock_and_cleanup(ac, socket); + async_connect_unlock_and_cleanup(exec_ctx, ac, socket); /* If the connection was aborted, the callback was already called when the deadline was met. */ grpc_exec_ctx_sched(exec_ctx, on_done, error, NULL); @@ -129,6 +132,7 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_endpoint **endpoint, grpc_pollset_set *interested_parties, + const grpc_channel_args *channel_args, const grpc_resolved_address *addr, gpr_timespec deadline) { SOCKET sock = INVALID_SOCKET; @@ -144,6 +148,18 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_winsocket_callback_info *info; grpc_error *error = GRPC_ERROR_NONE; + grpc_resource_quota *resource_quota = grpc_resource_quota_create(NULL); + if (channel_args != NULL) { + for (size_t i = 0; i < channel_args->num_args; i++) { + if (0 == + strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) { + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); + resource_quota = grpc_resource_quota_internal_ref( + channel_args->args[i].value.pointer.p); + } + } + } + *endpoint = NULL; /* Use dualstack sockets where available. */ @@ -206,6 +222,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, ac->refs = 2; ac->addr_name = grpc_sockaddr_to_uri(addr); ac->endpoint = endpoint; + ac->resource_quota = resource_quota; grpc_closure_init(&ac->on_connect, on_connect, ac); grpc_timer_init(exec_ctx, &ac->alarm, deadline, on_alarm, ac, @@ -225,6 +242,7 @@ failure: } else if (sock != INVALID_SOCKET) { closesocket(sock); } + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); grpc_exec_ctx_sched(exec_ctx, on_done, final_error, NULL); } diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index ad6769a6ba..eb965c8ccf 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -100,14 +100,31 @@ struct grpc_tcp_server { /* shutdown callback */ grpc_closure *shutdown_complete; + + grpc_resource_quota *resource_quota; }; /* Public function. Allocates the proper data structures to hold a grpc_tcp_server. */ -grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, +grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, grpc_closure *shutdown_complete, const grpc_channel_args *args, grpc_tcp_server **server) { grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); + s->resource_quota = grpc_resource_quota_create(NULL); + for (size_t i = 0; i < (args == NULL ? 0 : args->num_args); i++) { + if (0 == strcmp(GRPC_ARG_RESOURCE_QUOTA, args->args[i].key)) { + if (args->args[i].type == GRPC_ARG_POINTER) { + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); + s->resource_quota = + grpc_resource_quota_internal_ref(args->args[i].value.pointer.p); + } else { + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); + gpr_free(s); + return GRPC_ERROR_CREATE(GRPC_ARG_RESOURCE_QUOTA + " must be a pointer to a buffer pool"); + } + } + } gpr_ref_init(&s->refs, 1); gpr_mu_init(&s->mu); s->active_ports = 0; @@ -137,6 +154,7 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { grpc_winsocket_destroy(sp->socket); gpr_free(sp); } + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); gpr_free(s); } @@ -367,7 +385,7 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_free(utf8_message); } gpr_asprintf(&fd_name, "tcp_server:%s", peer_name_string); - ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name), + ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name), sp->server->resource_quota, peer_name_string); gpr_free(fd_name); gpr_free(peer_name_string); diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index a5f508a2c3..5782fe9bc3 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -109,14 +109,29 @@ typedef struct grpc_tcp { gpr_slice_buffer *write_slices; gpr_slice_buffer *read_slices; + grpc_resource_user resource_user; + /* The IO Completion Port runs from another thread. We need some mechanism to protect ourselves when requesting a shutdown. */ gpr_mu mu; int shutting_down; + gpr_atm resource_user_shutdown_count; + char *peer_string; } grpc_tcp; +static void win_unref_closure(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, + grpc_error *error); + +static void win_maybe_shutdown_resource_user(grpc_exec_ctx *exec_ctx, + grpc_tcp *tcp) { + if (gpr_atm_full_fetch_add(&tcp->resource_user_shutdown_count, 1) == 0) { + grpc_resource_user_shutdown(exec_ctx, &tcp->resource_user, + grpc_closure_create(win_unref_closure, tcp)); + } +} + static void tcp_free(grpc_tcp *tcp) { grpc_winsocket_destroy(tcp->socket); gpr_mu_destroy(&tcp->mu); @@ -155,6 +170,11 @@ static void tcp_unref(grpc_tcp *tcp) { static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } #endif +static void win_unref_closure(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + TCP_UNREF(arg, "resource_user"); +} + /* Asynchronous callback from the IOCP, or the background thread. */ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { grpc_tcp *tcp = tcpp; @@ -376,12 +396,14 @@ static void win_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { callback. See the comments in on_read and on_write. */ tcp->shutting_down = 1; grpc_winsocket_shutdown(tcp->socket); + win_maybe_shutdown_resource_user(exec_ctx, tcp); gpr_mu_unlock(&tcp->mu); } static void win_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; + win_maybe_shutdown_resource_user(exec_ctx, tcp); TCP_UNREF(tcp, "destroy"); } @@ -392,6 +414,11 @@ static char *win_get_peer(grpc_endpoint *ep) { static grpc_workqueue *win_get_workqueue(grpc_endpoint *ep) { return NULL; } +static grpc_resource_user *win_get_resource_user(grpc_endpoint *ep) { + grpc_tcp *tcp = (grpc_tcp *)ep; + return &tcp->resource_user; +} + static grpc_endpoint_vtable vtable = {win_read, win_write, win_get_workqueue, @@ -399,18 +426,20 @@ static grpc_endpoint_vtable vtable = {win_read, win_add_to_pollset_set, win_shutdown, win_destroy, + win_get_resource_user, win_get_peer}; -grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string) { +grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, grpc_resource_quota *resource_quota, char *peer_string) { grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp)); memset(tcp, 0, sizeof(grpc_tcp)); tcp->base.vtable = &vtable; tcp->socket = socket; gpr_mu_init(&tcp->mu); - gpr_ref_init(&tcp->refcount, 1); + gpr_ref_init(&tcp->refcount, 2); grpc_closure_init(&tcp->on_read, on_read, tcp); grpc_closure_init(&tcp->on_write, on_write, tcp); tcp->peer_string = gpr_strdup(peer_string); + grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); /* Tell network status tracking code about the new endpoint */ grpc_network_status_register_endpoint(&tcp->base); diff --git a/src/core/lib/iomgr/tcp_windows.h b/src/core/lib/iomgr/tcp_windows.h index 86d777235e..40dca72936 100644 --- a/src/core/lib/iomgr/tcp_windows.h +++ b/src/core/lib/iomgr/tcp_windows.h @@ -50,7 +50,7 @@ /* Create a tcp endpoint given a winsock handle. * Takes ownership of the handle. */ -grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string); +grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, grpc_resource_quota *resource_quota, char *peer_string); grpc_error *grpc_tcp_prepare_socket(SOCKET sock); -- cgit v1.2.3 From a5ea56b68f0159f03da8442469ac4341e284b275 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 28 Oct 2016 08:19:02 -0700 Subject: clang-format code --- src/core/lib/iomgr/endpoint_pair_windows.c | 13 +++++++------ src/core/lib/iomgr/tcp_client_windows.c | 10 +++++----- src/core/lib/iomgr/tcp_server_windows.c | 9 +++++---- src/core/lib/iomgr/tcp_windows.c | 4 +++- src/core/lib/iomgr/tcp_windows.h | 4 +++- 5 files changed, 23 insertions(+), 17 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/endpoint_pair_windows.c b/src/core/lib/iomgr/endpoint_pair_windows.c index cb23e314cc..93f71b745c 100644 --- a/src/core/lib/iomgr/endpoint_pair_windows.c +++ b/src/core/lib/iomgr/endpoint_pair_windows.c @@ -82,15 +82,16 @@ static void create_sockets(SOCKET sv[2]) { sv[0] = svr_sock; } -grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, grpc_resource_quota *resource_quota, - size_t read_slice_size) { +grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( + const char *name, grpc_resource_quota *resource_quota, + size_t read_slice_size) { SOCKET sv[2]; grpc_endpoint_pair p; create_sockets(sv); - p.client = grpc_tcp_create(grpc_winsocket_create(sv[1], "endpoint:client"),resource_quota, - "endpoint:server"); - p.server = grpc_tcp_create(grpc_winsocket_create(sv[0], "endpoint:server"), resource_quota, - "endpoint:client"); + p.client = grpc_tcp_create(grpc_winsocket_create(sv[1], "endpoint:client"), + resource_quota, "endpoint:server"); + p.server = grpc_tcp_create(grpc_winsocket_create(sv[0], "endpoint:server"), + resource_quota, "endpoint:client"); return p; } diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index ef9e5d6f94..620b38c825 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -43,6 +43,7 @@ #include #include +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" @@ -50,7 +51,6 @@ #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_windows.h" #include "src/core/lib/iomgr/timer.h" -#include "src/core/lib/channel/channel_args.h" typedef struct { grpc_closure *on_done; @@ -65,7 +65,8 @@ typedef struct { grpc_resource_quota *resource_quota; } async_connect; -static void async_connect_unlock_and_cleanup(grpc_exec_ctx *exec_ctx, async_connect *ac, +static void async_connect_unlock_and_cleanup(grpc_exec_ctx *exec_ctx, + async_connect *ac, grpc_winsocket *socket) { int done = (--ac->refs == 0); gpr_mu_unlock(&ac->mu); @@ -151,11 +152,10 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_resource_quota *resource_quota = grpc_resource_quota_create(NULL); if (channel_args != NULL) { for (size_t i = 0; i < channel_args->num_args; i++) { - if (0 == - strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) { + if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) { grpc_resource_quota_internal_unref(exec_ctx, resource_quota); resource_quota = grpc_resource_quota_internal_ref( - channel_args->args[i].value.pointer.p); + channel_args->args[i].value.pointer.p); } } } diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index eb965c8ccf..21d4f8bd71 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -106,7 +106,8 @@ struct grpc_tcp_server { /* Public function. Allocates the proper data structures to hold a grpc_tcp_server. */ -grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, grpc_closure *shutdown_complete, +grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, + grpc_closure *shutdown_complete, const grpc_channel_args *args, grpc_tcp_server **server) { grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); @@ -116,7 +117,7 @@ grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, grpc_closure *shutdo if (args->args[i].type == GRPC_ARG_POINTER) { grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); s->resource_quota = - grpc_resource_quota_internal_ref(args->args[i].value.pointer.p); + grpc_resource_quota_internal_ref(args->args[i].value.pointer.p); } else { grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); gpr_free(s); @@ -385,8 +386,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_free(utf8_message); } gpr_asprintf(&fd_name, "tcp_server:%s", peer_name_string); - ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name), sp->server->resource_quota, - peer_name_string); + ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name), + sp->server->resource_quota, peer_name_string); gpr_free(fd_name); gpr_free(peer_name_string); } else { diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 5782fe9bc3..46f0491d10 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -429,7 +429,9 @@ static grpc_endpoint_vtable vtable = {win_read, win_get_resource_user, win_get_peer}; -grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, grpc_resource_quota *resource_quota, char *peer_string) { +grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, + grpc_resource_quota *resource_quota, + char *peer_string) { grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp)); memset(tcp, 0, sizeof(grpc_tcp)); tcp->base.vtable = &vtable; diff --git a/src/core/lib/iomgr/tcp_windows.h b/src/core/lib/iomgr/tcp_windows.h index 40dca72936..4402de1c38 100644 --- a/src/core/lib/iomgr/tcp_windows.h +++ b/src/core/lib/iomgr/tcp_windows.h @@ -50,7 +50,9 @@ /* Create a tcp endpoint given a winsock handle. * Takes ownership of the handle. */ -grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, grpc_resource_quota *resource_quota, char *peer_string); +grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, + grpc_resource_quota *resource_quota, + char *peer_string); grpc_error *grpc_tcp_prepare_socket(SOCKET sock); -- cgit v1.2.3 From 85fe038342d307ea69dfee5bc2f1a0ff778cd409 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 28 Oct 2016 08:43:01 -0700 Subject: Fix some other Windows bugs while we're here --- src/core/lib/iomgr/tcp_client_windows.c | 2 +- src/core/lib/iomgr/tcp_server_windows.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 620b38c825..f5145abdc5 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -194,7 +194,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_sockaddr_make_wildcard6(0, &local_address); status = - bind(sock, (struct sockaddr *)&local_address.addr, local_address.len); + bind(sock, (struct sockaddr *)&local_address.addr, (int)local_address.len); if (status != 0) { error = GRPC_WSA_ERROR(WSAGetLastError(), "bind"); goto failure; diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 21d4f8bd71..4f04ecc03d 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -226,12 +226,13 @@ static grpc_error *prepare_socket(SOCKET sock, goto failure; } - sockname_temp.len = sizeof(struct sockaddr_storage); + int sockname_temp_len = sizeof(struct sockaddr_storage); if (getsockname(sock, (struct sockaddr *)sockname_temp.addr, - &sockname_temp.len) == SOCKET_ERROR) { + &sockname_temp_len) == SOCKET_ERROR) { error = GRPC_WSA_ERROR(WSAGetLastError(), "getsockname"); goto failure; } + sockname_temp.len = sockname_temp_len; *port = grpc_sockaddr_get_port(&sockname_temp); return GRPC_ERROR_NONE; @@ -376,8 +377,10 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_log(GPR_ERROR, "setsockopt error: %s", utf8_message); gpr_free(utf8_message); } + int peer_name_len = (int) peer_name.len; err = - getpeername(sock, (struct sockaddr *)peer_name.addr, &peer_name.len); + getpeername(sock, (struct sockaddr *)peer_name.addr, &peer_name_len); + peer_name.len = peer_name_len; if (!err) { peer_name_string = grpc_sockaddr_to_uri(&peer_name); } else { @@ -485,10 +488,11 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, as some previously created listener. */ if (grpc_sockaddr_get_port(addr) == 0) { for (sp = s->head; sp; sp = sp->next) { - sockname_temp.len = sizeof(struct sockaddr_storage); + int sockname_temp_len = sizeof(struct sockaddr_storage); if (0 == getsockname(sp->socket->socket, (struct sockaddr *)sockname_temp.addr, - &sockname_temp.len)) { + &sockname_temp_len)) { + sockname_temp.len = sockname_temp_len; *port = grpc_sockaddr_get_port(&sockname_temp); if (*port > 0) { allocated_addr = gpr_malloc(sizeof(grpc_resolved_address)); -- cgit v1.2.3 From 6108d1fee3880ebce9c0f1234f51216ece036659 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 28 Oct 2016 08:43:21 -0700 Subject: clang-format code --- src/core/lib/iomgr/tcp_client_windows.c | 4 ++-- src/core/lib/iomgr/tcp_server_windows.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index f5145abdc5..30f7c66f15 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -193,8 +193,8 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_sockaddr_make_wildcard6(0, &local_address); - status = - bind(sock, (struct sockaddr *)&local_address.addr, (int)local_address.len); + status = bind(sock, (struct sockaddr *)&local_address.addr, + (int)local_address.len); if (status != 0) { error = GRPC_WSA_ERROR(WSAGetLastError(), "bind"); goto failure; diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 4f04ecc03d..ae54c70d2d 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -377,7 +377,7 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_log(GPR_ERROR, "setsockopt error: %s", utf8_message); gpr_free(utf8_message); } - int peer_name_len = (int) peer_name.len; + int peer_name_len = (int)peer_name.len; err = getpeername(sock, (struct sockaddr *)peer_name.addr, &peer_name_len); peer_name.len = peer_name_len; -- cgit v1.2.3 From 61f0973e55c40146e11492ff7b6de39426f7e3ca Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 26 Oct 2016 14:09:52 -0700 Subject: Skip compress filter if byte_buffer is compressed --- src/core/lib/channel/compress_filter.c | 10 +++++++--- src/core/lib/surface/call.c | 6 ++++++ 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 0981d59f63..23b7dfb8fd 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -111,9 +111,13 @@ static grpc_mdelem *compression_md_filter(void *user_data, grpc_mdelem *md) { return md; } -static int skip_compression(grpc_call_element *elem) { +static int skip_compression(grpc_call_element *elem, uint32_t flags) { call_data *calld = elem->call_data; channel_data *channeld = elem->channel_data; + + if (flags & (GRPC_WRITE_NO_COMPRESS | GRPC_WRITE_INTERNAL_COMPRESS)) { + return 1; + } if (calld->has_compression_algorithm) { if (calld->compression_algorithm == GRPC_COMPRESS_NONE) { return 1; @@ -241,8 +245,8 @@ static void compress_start_transport_stream_op(grpc_exec_ctx *exec_ctx, if (op->send_initial_metadata) { process_send_initial_metadata(elem, op->send_initial_metadata); } - if (op->send_message != NULL && !skip_compression(elem) && - 0 == (op->send_message->flags & GRPC_WRITE_NO_COMPRESS)) { + if (op->send_message != NULL && + !skip_compression(elem, op->send_message->flags)) { calld->send_op = op; calld->send_length = op->send_message->length; calld->send_flags = op->send_message->flags; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 02a5de0857..255876134f 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1461,6 +1461,12 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, grpc_slice_buffer_stream_init( &call->sending_stream, &op->data.send_message->data.raw.slice_buffer, op->flags); + /* If the outgoing buffer is already compressed, mark it as so in the + flags. These will be picked up by the compression filter and further + (wasteful) attempts at compression skipped. */ + if (op->data.send_message->data.raw.compression > GRPC_COMPRESS_NONE) { + call->sending_stream.base.flags |= GRPC_WRITE_INTERNAL_COMPRESS; + } stream_op->send_message = &call->sending_stream.base; break; case GRPC_OP_SEND_CLOSE_FROM_CLIENT: -- cgit v1.2.3 From a0d2468b57b39de0855832db336130000a08cced Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 28 Oct 2016 18:18:07 -0700 Subject: Fix compilation bug when GRPC_UV is defined --- src/core/lib/iomgr/endpoint_pair_uv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/endpoint_pair_uv.c b/src/core/lib/iomgr/endpoint_pair_uv.c index 7941e20388..ff24894c6d 100644 --- a/src/core/lib/iomgr/endpoint_pair_uv.c +++ b/src/core/lib/iomgr/endpoint_pair_uv.c @@ -41,8 +41,9 @@ #include "src/core/lib/iomgr/endpoint_pair.h" -grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, - size_t read_slice_size) { +grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( + const char *name, grpc_resource_quota *resource_quota, + size_t read_slice_size) { grpc_endpoint_pair endpoint_pair; // TODO(mlumish): implement this properly under libuv GPR_ASSERT(false && -- cgit v1.2.3 From 894db55ab97aac8ea97602af0c06ba0031c3af97 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 28 Oct 2016 18:25:24 -0700 Subject: Fix compiler errors in gcc4.4 and 4.6 --- src/core/lib/iomgr/resource_quota.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index bfc905845d..e39cf28e35 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -166,8 +166,11 @@ static void rq_step(grpc_exec_ctx *exec_ctx, void *rq, grpc_error *error) { do { if (rq_alloc(exec_ctx, resource_quota)) goto done; } while (rq_reclaim_from_per_user_free_pool(exec_ctx, resource_quota)); - rq_reclaim(exec_ctx, resource_quota, false) || - rq_reclaim(exec_ctx, resource_quota, true); + + if (!rq_reclaim(exec_ctx, resource_quota, false)) { + rq_reclaim(exec_ctx, resource_quota, true); + } + done: grpc_resource_quota_internal_unref(exec_ctx, resource_quota); } -- cgit v1.2.3 From 98da61ba109405f173fbe8e11d169ab41fc407fb Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sat, 29 Oct 2016 08:46:31 +0200 Subject: gRPC LB fixes from end two end testing --- src/core/ext/lb_policy/grpclb/grpclb.c | 632 +++++++++++---------- src/core/ext/lb_policy/round_robin/round_robin.c | 39 +- .../chttp2/client/secure/secure_channel_create.c | 2 +- .../lib/security/transport/security_connector.c | 4 +- 4 files changed, 364 insertions(+), 313 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 6da4febf26..d2af27e7bf 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -43,30 +43,26 @@ * policy to select from this list of LB server backends. * * The first time the policy gets a request for a pick, a ping, or to exit the - * idle state, \a query_for_backends() is called. It creates an instance of \a - * lb_client_data, an internal struct meant to contain the data associated with - * the internal communication with the LB server. This instance is created via - * \a lb_client_data_create(). There, the call over lb_channel to pick-first - * from {a1..an} is created, the \a LoadBalancingRequest message is assembled - * and all necessary callbacks for the progress of the internal call configured. + * idle state, \a query_for_backends_locked() is called. This function sets up + * and initiates the internal communication with the LB server. In particular, + * it's responsible for instantiating the internal *streaming* call to the LB + * server (whichever address from {a1..an} pick-first chose). This call is + * serviced by two callbacks, \a srv_status_rcvd and \a res_rcvd. The former + * will be called when the call to the LB server completes. This can happen if + * the LB server closes the connection or if this policy itself cancels the call + * (for example because it's shutting down). If the call fails with + * UNIMPLEMENTED, the original picks/pings will fail. This signals that there's + * a misconfiguration somewhere: at least one of {a1..an} isn't an LB server, + * which contradicts the LB bit being set. If the internal call times out, the + * usual behavior of pick-first applies, continuing to pick from the list + * {a1..an}. * - * Back in \a query_for_backends(), the internal *streaming* call to the LB - * server (whichever address from {a1..an} pick-first chose) is kicked off. - * It'll progress over the callbacks configured in \a lb_client_data_create() - * (see the field docstrings of \a lb_client_data for more details). - * - * If the call fails with UNIMPLEMENTED, the original call will also fail. - * There's a misconfiguration somewhere: at least one of {a1..an} isn't a LB - * server, which contradicts the LB bit being set. If the internal call times - * out, the usual behavior of pick-first applies, continuing to pick from the - * list {a1..an}. - * - * Upon sucesss, a \a LoadBalancingResponse is expected in \a res_recv_cb. An - * invalid one results in the termination of the streaming call. A new streaming - * call should be created if possible, failing the original call otherwise. - * For a valid \a LoadBalancingResponse, the server list of actual backends is - * extracted. A Round Robin policy will be created from this list. There are two - * possible scenarios: + * Upon sucesss, the incoming \a LoadBalancingResponse is processed by \a + * res_recv. An invalid one results in the termination of the streaming call. A + * new streaming call should be created if possible, failing the original call + * otherwise. For a valid \a LoadBalancingResponse, the server list of actual + * backends is extracted. A Round Robin policy will be created from this list. + * There are two possible scenarios: * * 1. This is the first server list received. There was no previous instance of * the Round Robin policy. \a rr_handover_locked() will instantiate the RR @@ -120,12 +116,20 @@ #include "src/core/ext/lb_policy/grpclb/grpclb.h" #include "src/core/ext/lb_policy/grpclb/load_balancer_api.h" #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/support/backoff.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/call.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/static_metadata.h" +#define BACKOFF_MULTIPLIER 1.6 +#define BACKOFF_JITTER 0.2 +#define BACKOFF_MIN_SECONDS 10 +#define BACKOFF_MAX_SECONDS 60 + int grpc_lb_glb_trace = 0; /* add lb_token of selected subchannel (address) to the call's initial @@ -174,13 +178,12 @@ typedef struct wrapped_rr_closure_arg { static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { wrapped_rr_closure_arg *wc_arg = arg; - if (wc_arg->rr_policy != NULL) { - if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")", - (intptr_t)wc_arg->rr_policy); - } - GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "wrapped_rr_closure"); + GPR_ASSERT(wc_arg->wrapped_closure != NULL); + grpc_exec_ctx_sched(exec_ctx, wc_arg->wrapped_closure, GRPC_ERROR_REF(error), + NULL); + + if (wc_arg->rr_policy != NULL) { /* if target is NULL, no pick has been made by the RR policy (eg, all * addresses failed to connect). There won't be any user_data/token * available */ @@ -189,10 +192,12 @@ static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg, wc_arg->lb_token_mdelem_storage, GRPC_MDELEM_REF(wc_arg->lb_token)); } + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")", + (intptr_t)wc_arg->rr_policy); + } + GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "wrapped_rr_closure"); } - GPR_ASSERT(wc_arg->wrapped_closure != NULL); - grpc_exec_ctx_sched(exec_ctx, wc_arg->wrapped_closure, GRPC_ERROR_REF(error), - NULL); GPR_ASSERT(wc_arg->free_when_done != NULL); gpr_free(wc_arg->free_when_done); } @@ -264,7 +269,6 @@ static void add_pending_ping(pending_ping **root, grpc_closure *notify) { * glb_lb_policy */ typedef struct rr_connectivity_data rr_connectivity_data; -struct lb_client_data; static const grpc_lb_policy_vtable glb_lb_policy_vtable; typedef struct glb_lb_policy { /** base policy: must be first */ @@ -296,20 +300,53 @@ typedef struct glb_lb_policy { * response has arrived. */ grpc_grpclb_serverlist *serverlist; - /** addresses from \a serverlist */ - grpc_lb_addresses *addresses; - /** list of picks that are waiting on RR's policy connectivity */ pending_pick *pending_picks; /** list of pings that are waiting on RR's policy connectivity */ pending_ping *pending_pings; - /** client data associated with the LB server communication */ - struct lb_client_data *lb_client; + bool shutting_down; + + /************************************************************/ + /* client data associated with the LB server communication */ + /************************************************************/ + /* called once initial metadata's been sent */ + grpc_closure md_sent; + + /* called once the LoadBalanceRequest has been sent to the LB server. See + * src/proto/grpc/.../load_balancer.proto */ + grpc_closure req_sent; + + /* A response from the LB server has been received (or error). Process it */ + grpc_closure res_rcvd; + + /* ... and the status from the LB server has been received */ + grpc_closure srv_status_rcvd; + + grpc_call *lb_call; /* streaming call to the LB server, */ + + grpc_metadata_array initial_metadata_recv; /* initial MD from LB server */ + grpc_metadata_array trailing_metadata_recv; /* trailing MD from LB server */ + + /* what's being sent to the LB server. Note that its value may vary if the LB + * server indicates a redirect. */ + grpc_byte_buffer *request_payload; + + /* response from the LB server, if any. Processed in res_recv_cb() */ + grpc_byte_buffer *response_payload; + + /* the call's status and status detailset in srv_status_rcvd_cb() */ + grpc_status_code lb_call_status; + char *lb_call_status_details; + size_t lb_call_status_details_capacity; + + /** LB call retry backoff state */ + gpr_backoff lb_call_backoff_state; + + /** LB call retry timer */ + grpc_timer lb_call_retry_timer; - /** for tracking of the RR connectivity */ - rr_connectivity_data *rr_connectivity; } glb_lb_policy; /* Keeps track and reacts to changes in connectivity of the RR instance */ @@ -427,7 +464,6 @@ static grpc_lb_addresses *process_serverlist( ++addr_idx; } GPR_ASSERT(addr_idx == num_valid); - return lb_addresses; } @@ -448,7 +484,7 @@ static bool pick_from_internal_rr_locked( gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")", (intptr_t)wc_arg->rr_policy); } - GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "glb_pick"); + GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "glb_pick_sync"); /* add the load reporting initial metadata */ initial_metadata_add_lb_token(pick_args->initial_metadata, @@ -461,7 +497,6 @@ static bool pick_from_internal_rr_locked( * pending pick list inside the RR policy (glb_policy->rr_policy). * Eventually, wrapped_on_complete will be called, which will -among other * things- add the LB token to the call's initial metadata */ - return pick_done; } @@ -470,54 +505,69 @@ static grpc_lb_policy *create_rr_locked( glb_lb_policy *glb_policy) { GPR_ASSERT(serverlist != NULL && serverlist->num_servers > 0); - if (glb_policy->addresses != NULL) { - /* dispose of the previous version */ - grpc_lb_addresses_destroy(glb_policy->addresses); - } - glb_policy->addresses = process_serverlist(serverlist); - grpc_lb_policy_args args; memset(&args, 0, sizeof(args)); args.client_channel_factory = glb_policy->cc_factory; + grpc_lb_addresses *addresses = process_serverlist(serverlist); // Replace the LB addresses in the channel args that we pass down to // the subchannel. static const char *keys_to_remove[] = {GRPC_ARG_LB_ADDRESSES}; - const grpc_arg arg = - grpc_lb_addresses_create_channel_arg(glb_policy->addresses); + const grpc_arg arg = grpc_lb_addresses_create_channel_arg(addresses); args.args = grpc_channel_args_copy_and_add_and_remove( glb_policy->args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), &arg, 1); grpc_lb_policy *rr = grpc_lb_policy_create(exec_ctx, "round_robin", &args); + GPR_ASSERT(rr != NULL); + grpc_lb_addresses_destroy(addresses); grpc_channel_args_destroy(args.args); - return rr; } +static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error); +/* glb_policy->rr_policy may be NULL (initial handover) */ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy, grpc_error *error) { GPR_ASSERT(glb_policy->serverlist != NULL && glb_policy->serverlist->num_servers > 0); + + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "RR handover. Old RR: %p", (void *)glb_policy->rr_policy); + } + if (glb_policy->rr_policy != NULL) { + /* if we are phasing out an existing RR instance, unref it. */ + GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "rr_handover_locked"); + } + glb_policy->rr_policy = create_rr_locked(exec_ctx, glb_policy->serverlist, glb_policy); - if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "Created RR policy (0x%" PRIxPTR ")", - (intptr_t)glb_policy->rr_policy); + gpr_log(GPR_INFO, "Created RR policy (%p)", (void *)glb_policy->rr_policy); } + GPR_ASSERT(glb_policy->rr_policy != NULL); grpc_pollset_set_add_pollset_set(exec_ctx, glb_policy->rr_policy->interested_parties, glb_policy->base.interested_parties); - glb_policy->rr_connectivity->state = grpc_lb_policy_check_connectivity( + + rr_connectivity_data *rr_connectivity = + gpr_malloc(sizeof(rr_connectivity_data)); + memset(rr_connectivity, 0, sizeof(rr_connectivity_data)); + grpc_closure_init(&rr_connectivity->on_change, glb_rr_connectivity_changed, + rr_connectivity); + rr_connectivity->glb_policy = glb_policy; + rr_connectivity->state = grpc_lb_policy_check_connectivity( exec_ctx, glb_policy->rr_policy, &error); - grpc_lb_policy_notify_on_state_change( - exec_ctx, glb_policy->rr_policy, &glb_policy->rr_connectivity->state, - &glb_policy->rr_connectivity->on_change); + grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, - glb_policy->rr_connectivity->state, - GRPC_ERROR_REF(error), "rr_handover"); + rr_connectivity->state, GRPC_ERROR_REF(error), + "rr_handover"); + /* subscribe */ + grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, + &rr_connectivity->state, + &rr_connectivity->on_change); grpc_lb_policy_exit_idle(exec_ctx, glb_policy->rr_policy); /* flush pending ops */ @@ -551,35 +601,24 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + /* If shutdown or error free the arg. Rely on the rest of the code to set the + * right grpclb status. */ rr_connectivity_data *rr_conn_data = arg; glb_lb_policy *glb_policy = rr_conn_data->glb_policy; - if (rr_conn_data->state == GRPC_CHANNEL_SHUTDOWN) { - if (glb_policy->serverlist != NULL) { - /* a RR policy is shutting down but there's a serverlist available -> - * perform a handover */ - gpr_mu_lock(&glb_policy->mu); - rr_handover_locked(exec_ctx, glb_policy, error); - gpr_mu_unlock(&glb_policy->mu); - } else { - /* shutting down and no new serverlist available. Bail out. */ - gpr_free(rr_conn_data); - } + if (rr_conn_data->state != GRPC_CHANNEL_SHUTDOWN) { + gpr_mu_lock(&glb_policy->mu); + /* RR not shutting down. Mimic the RR's policy state */ + grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, + rr_conn_data->state, GRPC_ERROR_REF(error), + "glb_rr_connectivity_changed"); + /* resubscribe */ + grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, + &rr_conn_data->state, + &rr_conn_data->on_change); + gpr_mu_unlock(&glb_policy->mu); } else { - if (error == GRPC_ERROR_NONE) { - gpr_mu_lock(&glb_policy->mu); - /* RR not shutting down. Mimic the RR's policy state */ - grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, - rr_conn_data->state, GRPC_ERROR_REF(error), - "glb_rr_connectivity_changed"); - /* resubscribe */ - grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, - &rr_conn_data->state, - &rr_conn_data->on_change); - gpr_mu_unlock(&glb_policy->mu); - } else { /* error */ - gpr_free(rr_conn_data); - } + gpr_free(rr_conn_data); } } @@ -682,18 +721,11 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, return NULL; } - rr_connectivity_data *rr_connectivity = - gpr_malloc(sizeof(rr_connectivity_data)); - memset(rr_connectivity, 0, sizeof(rr_connectivity_data)); - grpc_closure_init(&rr_connectivity->on_change, glb_rr_connectivity_changed, - rr_connectivity); - rr_connectivity->glb_policy = glb_policy; - glb_policy->rr_connectivity = rr_connectivity; - grpc_lb_policy_init(&glb_policy->base, &glb_lb_policy_vtable); gpr_mu_init(&glb_policy->mu); grpc_connectivity_state_init(&glb_policy->state_tracker, GRPC_CHANNEL_IDLE, "grpclb"); + return &glb_policy->base; } @@ -710,14 +742,13 @@ static void glb_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { grpc_grpclb_destroy_serverlist(glb_policy->serverlist); } gpr_mu_destroy(&glb_policy->mu); - grpc_lb_addresses_destroy(glb_policy->addresses); gpr_free(glb_policy); } -static void lb_client_data_destroy(struct lb_client_data *lb_client); static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { glb_lb_policy *glb_policy = (glb_lb_policy *)pol; gpr_mu_lock(&glb_policy->mu); + glb_policy->shutting_down = true; pending_pick *pp = glb_policy->pending_picks; glb_policy->pending_picks = NULL; @@ -741,15 +772,15 @@ static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { } if (glb_policy->rr_policy) { - /* unsubscribe */ - grpc_lb_policy_notify_on_state_change( - exec_ctx, glb_policy->rr_policy, NULL, - &glb_policy->rr_connectivity->on_change); GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "glb_shutdown"); } - lb_client_data_destroy(glb_policy->lb_client); - glb_policy->lb_client = NULL; + if (glb_policy->started_picking) { + if (glb_policy->lb_call != NULL) { + grpc_call_cancel(glb_policy->lb_call, NULL); + /* srv_status_rcvd_cb will pick up the cancellation and clean up */ + } + } grpc_connectivity_state_set( exec_ctx, &glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN, @@ -780,17 +811,12 @@ static void glb_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, GRPC_ERROR_UNREF(error); } -static grpc_call *lb_client_data_get_call(struct lb_client_data *lb_client); static void glb_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, uint32_t initial_metadata_flags_mask, uint32_t initial_metadata_flags_eq, grpc_error *error) { glb_lb_policy *glb_policy = (glb_lb_policy *)pol; gpr_mu_lock(&glb_policy->mu); - if (glb_policy->lb_client != NULL) { - /* cancel the call to the load balancer service, if any */ - grpc_call_cancel(lb_client_data_get_call(glb_policy->lb_client), NULL); - } pending_pick *pp = glb_policy->pending_picks; glb_policy->pending_picks = NULL; while (pp != NULL) { @@ -810,18 +836,20 @@ static void glb_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, GRPC_ERROR_UNREF(error); } -static void query_for_backends(grpc_exec_ctx *exec_ctx, - glb_lb_policy *glb_policy); -static void start_picking(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy) { +static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, + glb_lb_policy *glb_policy); +static void start_picking_locked(grpc_exec_ctx *exec_ctx, + glb_lb_policy *glb_policy) { glb_policy->started_picking = true; - query_for_backends(exec_ctx, glb_policy); + gpr_backoff_reset(&glb_policy->lb_call_backoff_state); + query_for_backends_locked(exec_ctx, glb_policy); } static void glb_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { glb_lb_policy *glb_policy = (glb_lb_policy *)pol; gpr_mu_lock(&glb_policy->mu); if (!glb_policy->started_picking) { - start_picking(exec_ctx, glb_policy); + start_picking_locked(exec_ctx, glb_policy); } gpr_mu_unlock(&glb_policy->mu); } @@ -847,8 +875,8 @@ static int glb_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (glb_policy->rr_policy != NULL) { if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "about to PICK from 0x%" PRIxPTR "", - (intptr_t)glb_policy->rr_policy); + gpr_log(GPR_INFO, "grpclb %p about to PICK from RR %p", + (void *)glb_policy, (void *)glb_policy->rr_policy); } GRPC_LB_POLICY_REF(glb_policy->rr_policy, "glb_pick"); @@ -865,11 +893,17 @@ static int glb_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pick_done = pick_from_internal_rr_locked(exec_ctx, glb_policy->rr_policy, pick_args, target, wc_arg); } else { + if (grpc_lb_glb_trace) { + gpr_log(GPR_DEBUG, + "No RR policy in grpclb instance %p. Adding to grpclb's pending " + "picks", + (void *)(glb_policy)); + } add_pending_pick(&glb_policy->pending_picks, pick_args, target, on_complete); if (!glb_policy->started_picking) { - start_picking(exec_ctx, glb_policy); + start_picking_locked(exec_ctx, glb_policy); } pick_done = false; } @@ -898,7 +932,7 @@ static void glb_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, } else { add_pending_ping(&glb_policy->pending_pings, closure); if (!glb_policy->started_picking) { - start_picking(exec_ctx, glb_policy); + start_picking_locked(exec_ctx, glb_policy); } } gpr_mu_unlock(&glb_policy->mu); @@ -916,250 +950,181 @@ static void glb_notify_on_state_change(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&glb_policy->mu); } -/* - * lb_client_data - * - * Used internally for the client call to the LB */ -typedef struct lb_client_data { - gpr_mu mu; - - /* called once initial metadata's been sent */ - grpc_closure md_sent; - - /* called once the LoadBalanceRequest has been sent to the LB server. See - * src/proto/grpc/.../load_balancer.proto */ - grpc_closure req_sent; - - /* A response from the LB server has been received (or error). Process it */ - grpc_closure res_rcvd; - - /* After the client has sent a close to the LB server */ - grpc_closure close_sent; - - /* ... and the status from the LB server has been received */ - grpc_closure srv_status_rcvd; - - grpc_call *lb_call; /* streaming call to the LB server, */ - gpr_timespec deadline; /* for the streaming call to the LB server */ - - grpc_metadata_array initial_metadata_recv; /* initial MD from LB server */ - grpc_metadata_array trailing_metadata_recv; /* trailing MD from LB server */ - - /* what's being sent to the LB server. Note that its value may vary if the LB - * server indicates a redirect. */ - grpc_byte_buffer *request_payload; - - /* response from the LB server, if any. Processed in res_recv_cb() */ - grpc_byte_buffer *response_payload; - - /* the call's status and status detailset in srv_status_rcvd_cb() */ - grpc_status_code status; - char *status_details; - size_t status_details_capacity; - - /* pointer back to the enclosing policy */ - glb_lb_policy *glb_policy; -} lb_client_data; - -static void md_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); -static void req_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); -static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); -static void close_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error); static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); - -static lb_client_data *lb_client_data_create(glb_lb_policy *glb_policy) { +static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); +static void lb_client_init(glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->server_name != NULL); GPR_ASSERT(glb_policy->server_name[0] != '\0'); - lb_client_data *lb_client = gpr_malloc(sizeof(lb_client_data)); - memset(lb_client, 0, sizeof(lb_client_data)); - - gpr_mu_init(&lb_client->mu); - grpc_closure_init(&lb_client->md_sent, md_sent_cb, lb_client); - - grpc_closure_init(&lb_client->req_sent, req_sent_cb, lb_client); - grpc_closure_init(&lb_client->res_rcvd, res_recv_cb, lb_client); - grpc_closure_init(&lb_client->close_sent, close_sent_cb, lb_client); - grpc_closure_init(&lb_client->srv_status_rcvd, srv_status_rcvd_cb, lb_client); - - lb_client->deadline = glb_policy->deadline; - /* Note the following LB call progresses every time there's activity in \a * glb_policy->base.interested_parties, which is comprised of the polling * entities from \a client_channel. */ - lb_client->lb_call = grpc_channel_create_pollset_set_call( + glb_policy->lb_call = grpc_channel_create_pollset_set_call( glb_policy->lb_channel, NULL, GRPC_PROPAGATE_DEFAULTS, glb_policy->base.interested_parties, "/grpc.lb.v1.LoadBalancer/BalanceLoad", glb_policy->server_name, - lb_client->deadline, NULL); + glb_policy->deadline, NULL); - grpc_metadata_array_init(&lb_client->initial_metadata_recv); - grpc_metadata_array_init(&lb_client->trailing_metadata_recv); + grpc_metadata_array_init(&glb_policy->initial_metadata_recv); + grpc_metadata_array_init(&glb_policy->trailing_metadata_recv); grpc_grpclb_request *request = grpc_grpclb_request_create(glb_policy->server_name); gpr_slice request_payload_slice = grpc_grpclb_request_encode(request); - lb_client->request_payload = + glb_policy->request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_slice_unref(request_payload_slice); grpc_grpclb_request_destroy(request); - lb_client->status_details = NULL; - lb_client->status_details_capacity = 0; - lb_client->glb_policy = glb_policy; - return lb_client; + glb_policy->lb_call_status_details = NULL; + glb_policy->lb_call_status_details_capacity = 0; + + grpc_closure_init(&glb_policy->srv_status_rcvd, srv_status_rcvd_cb, + glb_policy); + grpc_closure_init(&glb_policy->res_rcvd, res_recv_cb, glb_policy); + + gpr_backoff_init(&glb_policy->lb_call_backoff_state, BACKOFF_MULTIPLIER, + BACKOFF_JITTER, BACKOFF_MIN_SECONDS * 1000, + BACKOFF_MAX_SECONDS * 1000); } -static void lb_client_data_destroy(lb_client_data *lb_client) { - grpc_call_destroy(lb_client->lb_call); - grpc_metadata_array_destroy(&lb_client->initial_metadata_recv); - grpc_metadata_array_destroy(&lb_client->trailing_metadata_recv); +static void lb_client_destroy(glb_lb_policy *glb_policy) { + GPR_ASSERT(glb_policy->lb_call != NULL); + grpc_call_destroy(glb_policy->lb_call); + glb_policy->lb_call = NULL; - grpc_byte_buffer_destroy(lb_client->request_payload); + grpc_metadata_array_destroy(&glb_policy->initial_metadata_recv); + grpc_metadata_array_destroy(&glb_policy->trailing_metadata_recv); - gpr_free(lb_client->status_details); - gpr_mu_destroy(&lb_client->mu); - gpr_free(lb_client); -} -static grpc_call *lb_client_data_get_call(lb_client_data *lb_client) { - return lb_client->lb_call; + grpc_byte_buffer_destroy(glb_policy->request_payload); + gpr_free(glb_policy->lb_call_status_details); } /* * Auxiliary functions and LB client callbacks. */ -static void query_for_backends(grpc_exec_ctx *exec_ctx, - glb_lb_policy *glb_policy) { +static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, + glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->lb_channel != NULL); + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "query_for_backends_locked"); + lb_client_init(glb_policy); + + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Query for backends (grpclb: %p, lb_call: %p)", + (void *)glb_policy, (void *)glb_policy->lb_call); + } + GPR_ASSERT(glb_policy->lb_call != NULL); - glb_policy->lb_client = lb_client_data_create(glb_policy); grpc_call_error call_error; - grpc_op ops[1]; + grpc_op ops[4]; memset(ops, 0, sizeof(ops)); + 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++; - call_error = grpc_call_start_batch_and_execute( - exec_ctx, glb_policy->lb_client->lb_call, ops, (size_t)(op - ops), - &glb_policy->lb_client->md_sent); - GPR_ASSERT(GRPC_CALL_OK == call_error); - op = ops; - op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; - op->data.recv_status_on_client.trailing_metadata = - &glb_policy->lb_client->trailing_metadata_recv; - op->data.recv_status_on_client.status = &glb_policy->lb_client->status; - op->data.recv_status_on_client.status_details = - &glb_policy->lb_client->status_details; - op->data.recv_status_on_client.status_details_capacity = - &glb_policy->lb_client->status_details_capacity; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &glb_policy->initial_metadata_recv; op->flags = 0; op->reserved = NULL; op++; - call_error = grpc_call_start_batch_and_execute( - exec_ctx, glb_policy->lb_client->lb_call, ops, (size_t)(op - ops), - &glb_policy->lb_client->srv_status_rcvd); - GPR_ASSERT(GRPC_CALL_OK == call_error); -} - -static void md_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - lb_client_data *lb_client = arg; - GPR_ASSERT(lb_client->lb_call); - grpc_op ops[1]; - memset(ops, 0, sizeof(ops)); - grpc_op *op = ops; + GPR_ASSERT(glb_policy->request_payload != NULL); op->op = GRPC_OP_SEND_MESSAGE; - op->data.send_message = lb_client->request_payload; + op->data.send_message = glb_policy->request_payload; op->flags = 0; op->reserved = NULL; op++; - grpc_call_error call_error = grpc_call_start_batch_and_execute( - exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops), - &lb_client->req_sent); - GPR_ASSERT(GRPC_CALL_OK == call_error); -} -static void req_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - lb_client_data *lb_client = arg; - GPR_ASSERT(lb_client->lb_call); - - grpc_op ops[2]; - memset(ops, 0, sizeof(ops)); - grpc_op *op = ops; - - op->op = GRPC_OP_RECV_INITIAL_METADATA; - op->data.recv_initial_metadata = &lb_client->initial_metadata_recv; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = + &glb_policy->trailing_metadata_recv; + op->data.recv_status_on_client.status = &glb_policy->lb_call_status; + op->data.recv_status_on_client.status_details = + &glb_policy->lb_call_status_details; + op->data.recv_status_on_client.status_details_capacity = + &glb_policy->lb_call_status_details_capacity; op->flags = 0; op->reserved = NULL; op++; + call_error = grpc_call_start_batch_and_execute(exec_ctx, glb_policy->lb_call, + ops, (size_t)(op - ops), + &glb_policy->srv_status_rcvd); + GPR_ASSERT(GRPC_CALL_OK == call_error); + op = ops; op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &lb_client->response_payload; + op->data.recv_message = &glb_policy->response_payload; op->flags = 0; op->reserved = NULL; op++; - grpc_call_error call_error = grpc_call_start_batch_and_execute( - exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops), - &lb_client->res_rcvd); + call_error = grpc_call_start_batch_and_execute(exec_ctx, glb_policy->lb_call, + ops, (size_t)(op - ops), + &glb_policy->res_rcvd); GPR_ASSERT(GRPC_CALL_OK == call_error); } static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - lb_client_data *lb_client = arg; + glb_lb_policy *glb_policy = arg; + grpc_op ops[2]; memset(ops, 0, sizeof(ops)); grpc_op *op = ops; - if (lb_client->response_payload != NULL) { + if (glb_policy->response_payload != NULL) { + gpr_backoff_reset(&glb_policy->lb_call_backoff_state); /* Received data from the LB server. Look inside - * lb_client->response_payload, for a serverlist. */ + * glb_policy->response_payload, for a serverlist. */ grpc_byte_buffer_reader bbr; - grpc_byte_buffer_reader_init(&bbr, lb_client->response_payload); + grpc_byte_buffer_reader_init(&bbr, glb_policy->response_payload); gpr_slice response_slice = grpc_byte_buffer_reader_readall(&bbr); - grpc_byte_buffer_destroy(lb_client->response_payload); + grpc_byte_buffer_destroy(glb_policy->response_payload); grpc_grpclb_serverlist *serverlist = grpc_grpclb_response_parse_serverlist(response_slice); if (serverlist != NULL) { + GPR_ASSERT(glb_policy->lb_call != NULL); gpr_slice_unref(response_slice); if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Serverlist with %lu servers received", (unsigned long)serverlist->num_servers); + /* TODO(dgq): this needs to work with ipv6. */ + for (size_t i = 0; i < serverlist->num_servers; ++i) { + grpc_resolved_address addr; + struct sockaddr_in *sa = (struct sockaddr_in *)&addr.addr; + addr.len = sizeof(struct sockaddr_in); + sa->sin_family = AF_INET; + sa->sin_port = htons((uint16_t)serverlist->servers[i]->port); + memcpy(&sa->sin_addr, serverlist->servers[i]->ip_address.bytes, + serverlist->servers[i]->ip_address.size); + char *ipport; + grpc_sockaddr_to_string(&ipport, &addr, false); + gpr_log(GPR_INFO, "Serverlist[%lu]: %s", (unsigned long)i, ipport); + gpr_free(ipport); + } } /* update serverlist */ if (serverlist->num_servers > 0) { - gpr_mu_lock(&lb_client->glb_policy->mu); - if (grpc_grpclb_serverlist_equals(lb_client->glb_policy->serverlist, - serverlist)) { + gpr_mu_lock(&glb_policy->mu); + if (grpc_grpclb_serverlist_equals(glb_policy->serverlist, serverlist)) { if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Incoming server list identical to current, ignoring."); } } else { /* new serverlist */ - if (lb_client->glb_policy->serverlist != NULL) { + if (glb_policy->serverlist != NULL) { /* dispose of the old serverlist */ - grpc_grpclb_destroy_serverlist(lb_client->glb_policy->serverlist); + grpc_grpclb_destroy_serverlist(glb_policy->serverlist); } /* and update the copy in the glb_lb_policy instance */ - lb_client->glb_policy->serverlist = serverlist; - } - if (lb_client->glb_policy->rr_policy == NULL) { - /* initial "handover", in this case from a null RR policy, meaning - * it'll just create the first RR policy instance */ - rr_handover_locked(exec_ctx, lb_client->glb_policy, error); - } else { - /* unref the RR policy, eventually leading to its substitution with a - * new one constructed from the received serverlist (see - * glb_rr_connectivity_changed) */ - GRPC_LB_POLICY_UNREF(exec_ctx, lb_client->glb_policy->rr_policy, - "serverlist_received"); + glb_policy->serverlist = serverlist; + + rr_handover_locked(exec_ctx, glb_policy, error); } - gpr_mu_unlock(&lb_client->glb_policy->mu); + gpr_mu_unlock(&glb_policy->mu); } else { if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, @@ -1170,13 +1135,13 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { /* keep listening for serverlist updates */ op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &lb_client->response_payload; + op->data.recv_message = &glb_policy->response_payload; op->flags = 0; op->reserved = NULL; op++; const grpc_call_error call_error = grpc_call_start_batch_and_execute( - exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops), - &lb_client->res_rcvd); /* loop */ + exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), + &glb_policy->res_rcvd); /* loop */ GPR_ASSERT(GRPC_CALL_OK == call_error); return; } @@ -1185,42 +1150,105 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_log(GPR_ERROR, "Invalid LB response received: '%s'", gpr_dump_slice(response_slice, GPR_DUMP_ASCII)); gpr_slice_unref(response_slice); - - /* Disconnect from server returning invalid response. */ - op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; - op->flags = 0; - op->reserved = NULL; - op++; - grpc_call_error call_error = grpc_call_start_batch_and_execute( - exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops), - &lb_client->close_sent); - GPR_ASSERT(GRPC_CALL_OK == call_error); + grpc_call_cancel(glb_policy->lb_call, NULL); + /* srv_status_rcvd_cb will pick up the cancellation and clean up */ } - /* empty payload: call cancelled by server. Cleanups happening in - * srv_status_rcvd_cb */ + /* else, empty payload: call cancelled by server. */ + grpc_metadata_array_destroy(&glb_policy->initial_metadata_recv); } -static void close_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, - "Close from LB client sent. Waiting from server status now"); +static void lb_call_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + glb_lb_policy *glb_policy = arg; + gpr_mu_lock(&glb_policy->mu); + + if (!glb_policy->shutting_down) { + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Restaring call to LB server (grpclb %p)", + (void *)glb_policy); + } + GPR_ASSERT(glb_policy->lb_call == NULL); + query_for_backends_locked(exec_ctx, glb_policy); } + gpr_mu_unlock(&glb_policy->mu); + + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, + "grpclb_on_retry_timer"); } static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - lb_client_data *lb_client = arg; + glb_lb_policy *glb_policy = arg; + gpr_mu_lock(&glb_policy->mu); + + GPR_ASSERT(glb_policy->lb_call != NULL); + if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, - "status from lb server received. Status = %d, Details = '%s', " - "Capacity " - "= %lu", - lb_client->status, lb_client->status_details, - (unsigned long)lb_client->status_details_capacity); + gpr_log(GPR_DEBUG, + "Status from LB server received. Status = %d, Details = '%s', " + "(call: %p)", + glb_policy->lb_call_status, glb_policy->lb_call_status_details, + (void *)glb_policy->lb_call); + } + + if (glb_policy->lb_call_status == GRPC_STATUS_UNIMPLEMENTED) { + char *failing_server = grpc_call_get_peer(glb_policy->lb_call); + char *error_desc; + gpr_asprintf(&error_desc, "Invalid LB server '%s'", failing_server); + gpr_free(failing_server); + /* flush pending ops */ + pending_pick *pp; + while ((pp = glb_policy->pending_picks)) { + glb_policy->pending_picks = pp->next; + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Cancelling pending pick: %s", error_desc); + } + grpc_exec_ctx_sched(exec_ctx, + &pp->wrapped_on_complete_arg.wrapper_closure, + GRPC_ERROR_CREATE(error_desc), NULL); + } + + pending_ping *pping; + while ((pping = glb_policy->pending_pings)) { + glb_policy->pending_pings = pping->next; + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Cancelling pending ping: %s", error_desc); + } + grpc_exec_ctx_sched(exec_ctx, &pping->wrapped_notify_arg.wrapper_closure, + GRPC_ERROR_CREATE(error_desc), NULL); + } + gpr_free(error_desc); + } + + const bool was_cancelled = + (glb_policy->lb_call_status == GRPC_STATUS_CANCELLED); + + /* We need to performe cleanups no matter what. */ + lb_client_destroy(glb_policy); + + if (!glb_policy->shutting_down) { + GPR_ASSERT(!was_cancelled); + /* if we aren't shutting down, restart the LB client call after some time */ + gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); + gpr_timespec next_try = + gpr_backoff_step(&glb_policy->lb_call_backoff_state, now); + if (grpc_lb_glb_trace) { + gpr_log(GPR_DEBUG, "Connection to LB server lost (grpclb: %p)...", + (void *)glb_policy); + gpr_timespec timeout = gpr_time_sub(next_try, now); + if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) > 0) { + gpr_log(GPR_DEBUG, "... retrying in %" PRId64 ".%09d seconds.", + timeout.tv_sec, timeout.tv_nsec); + } else { + gpr_log(GPR_DEBUG, "... retrying immediately."); + } + } + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "grpclb_retry_timer"); + grpc_timer_init(exec_ctx, &glb_policy->lb_call_retry_timer, next_try, + lb_call_on_retry_timer, glb_policy, now); } - /* TODO(dgq): deal with stream termination properly (fire up another one? - * fail the original call?) */ + gpr_mu_unlock(&glb_policy->mu); + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, "srv_status_rcvd_cb"); } /* Code wiring the policy with the rest of the core */ diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 37a9b18b97..5f530d54fe 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -120,6 +120,8 @@ typedef struct { grpc_connectivity_state connectivity_state; /** the subchannel's target user data */ void *user_data; + /** vtable to operate over \a user_data */ + grpc_lb_user_data_vtable user_data_vtable; } subchannel_data; struct round_robin_lb_policy { @@ -186,9 +188,13 @@ static void advance_last_picked_locked(round_robin_lb_policy *p) { } if (grpc_lb_round_robin_trace) { - gpr_log(GPR_DEBUG, "[READYLIST] ADVANCED LAST PICK. NOW AT NODE %p (SC %p)", - (void *)p->ready_list_last_pick, - (void *)p->ready_list_last_pick->subchannel); + gpr_log(GPR_DEBUG, + "[READYLIST, RR: %p] ADVANCED LAST PICK. NOW AT NODE %p (SC %p, " + "CSC %p)", + (void *)p, (void *)p->ready_list_last_pick, + (void *)p->ready_list_last_pick->subchannel, + (void *)grpc_subchannel_get_connected_subchannel( + p->ready_list_last_pick->subchannel)); } } @@ -255,9 +261,15 @@ static void remove_disconnected_sc_locked(round_robin_lb_policy *p, static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { round_robin_lb_policy *p = (round_robin_lb_policy *)pol; ready_list *elem; + + if (grpc_lb_round_robin_trace) { + gpr_log(GPR_DEBUG, "Destroying Round Robin policy at %p", (void*)pol); + } + for (size_t i = 0; i < p->num_subchannels; i++) { subchannel_data *sd = p->subchannels[i]; - GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin"); + GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin_destroy"); + sd->user_data_vtable.destroy(sd->user_data); gpr_free(sd); } @@ -285,6 +297,9 @@ static void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { size_t i; gpr_mu_lock(&p->mu); + if (grpc_lb_round_robin_trace) { + gpr_log(GPR_DEBUG, "Shutting down Round Robin policy at %p", pol); + } p->shutdown = 1; while ((pp = p->pending_picks)) { @@ -296,7 +311,7 @@ static void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { } grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_SHUTDOWN, - GRPC_ERROR_CREATE("Channel Shutdown"), "shutdown"); + GRPC_ERROR_CREATE("Channel Shutdown"), "rr_shutdown"); for (i = 0; i < p->num_subchannels; i++) { subchannel_data *sd = p->subchannels[i]; grpc_subchannel_notify_on_state_change(exec_ctx, sd->subchannel, NULL, NULL, @@ -395,6 +410,11 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *pp; ready_list *selected; gpr_mu_lock(&p->mu); + + if (grpc_lb_round_robin_trace) { + gpr_log(GPR_INFO, "Round Robin %p trying to pick", pol); + } + if ((selected = peek_next_connected_locked(p))) { /* readily available, report right away */ *target = GRPC_CONNECTED_SUBCHANNEL_REF( @@ -435,7 +455,6 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, subchannel_data *sd = arg; round_robin_lb_policy *p = sd->policy; pending_pick *pp; - ready_list *selected; int unref = 0; @@ -456,12 +475,14 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, /* at this point we know there's at least one suitable subchannel. Go * ahead and pick one and notify the pending suitors in * p->pending_picks. This preemtively replicates rr_pick()'s actions. */ - selected = peek_next_connected_locked(p); + ready_list *selected = peek_next_connected_locked(p); + GPR_ASSERT(selected != NULL); if (p->pending_picks != NULL) { /* if the selected subchannel is going to be used for the pending * picks, update the last picked pointer */ advance_last_picked_locked(p); } + while ((pp = p->pending_picks)) { p->pending_picks = pp->next; @@ -653,7 +674,9 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, sd->policy = p; sd->index = subchannel_idx; sd->subchannel = subchannel; - sd->user_data = addresses->addresses[i].user_data; + sd->user_data_vtable = *addresses->user_data_vtable; + sd->user_data = + sd->user_data_vtable.copy(addresses->addresses[i].user_data); ++subchannel_idx; grpc_closure_init(&sd->connectivity_changed_closure, rr_connectivity_changed, sd); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 57e1a8ec01..d0ac72a011 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -347,7 +347,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, &exec_ctx, &f->base, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, new_args); // Clean up. GRPC_SECURITY_CONNECTOR_UNREF(&f->security_connector->base, - "client_channel_factory_create_channel"); + "secure_client_channel_factory_create_channel"); grpc_channel_args_destroy(new_args); grpc_client_channel_factory_unref(&exec_ctx, &f->base); grpc_exec_ctx_finish(&exec_ctx); diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 0eca46eb52..ebf72a3abb 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -210,11 +210,11 @@ void grpc_security_connector_unref(grpc_security_connector *sc) { } static void connector_pointer_arg_destroy(void *p) { - GRPC_SECURITY_CONNECTOR_UNREF(p, "connector_pointer_arg"); + GRPC_SECURITY_CONNECTOR_UNREF(p, "connector_pointer_arg_destroy"); } static void *connector_pointer_arg_copy(void *p) { - return GRPC_SECURITY_CONNECTOR_REF(p, "connector_pointer_arg"); + return GRPC_SECURITY_CONNECTOR_REF(p, "connector_pointer_arg_copy"); } static int connector_pointer_cmp(void *a, void *b) { return GPR_ICMP(a, b); } -- cgit v1.2.3 From 8c2e8b44b9b90a15bac0bb36f6dab3b82195a788 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sun, 30 Oct 2016 15:13:04 +0100 Subject: Fixed wrong sign for dns timeout debug msg --- src/core/ext/resolver/dns/native/dns_resolver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index 958b8af8b2..665439f360 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -190,7 +190,7 @@ static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(!r->have_retry_timer); r->have_retry_timer = true; GRPC_RESOLVER_REF(&r->base, "retry-timer"); - if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) <= 0) { + if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) > 0) { gpr_log(GPR_DEBUG, "retrying in %" PRId64 ".%09d seconds", timeout.tv_sec, timeout.tv_nsec); } else { -- cgit v1.2.3 From f37cd4f84448d9a9bb96cb16e1f616811e42f9af Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sun, 30 Oct 2016 15:18:27 +0100 Subject: Updated max length of load balanced service to 255 bytes --- .../ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c | 9 +-------- .../ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h | 6 +++--- src/proto/grpc/lb/v1/load_balancer.options | 2 +- src/proto/grpc/lb/v1/load_balancer.proto | 2 +- 4 files changed, 6 insertions(+), 13 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c index afecb716fb..c90d3f9ff5 100644 --- a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c @@ -106,14 +106,7 @@ PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) -/* If you get an error here, it means that you need to define PB_FIELD_16BIT - * compile-time option. You can do that in pb.h or on compiler command line. - * - * The reason you need to do this is that some of your messages contain tag - * numbers or field sizes that are larger than what can fit in the default - * 8 bit descriptors. - */ -PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 256 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 256 && pb_membersize(grpc_lb_v1_ServerList, servers) < 256 && pb_membersize(grpc_lb_v1_ServerList, expiration_interval) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_lb_v1_Duration_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server) +#error Field descriptor for grpc_lb_v1_InitialLoadBalanceRequest.name is too large. Define PB_FIELD_16BIT to fix this. #endif diff --git a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h index e36d0966f8..81e89254d1 100644 --- a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h @@ -66,7 +66,7 @@ typedef struct _grpc_lb_v1_Duration { typedef struct _grpc_lb_v1_InitialLoadBalanceRequest { bool has_name; - char name[128]; + char name[256]; /* @@protoc_insertion_point(struct:grpc_lb_v1_InitialLoadBalanceRequest) */ } grpc_lb_v1_InitialLoadBalanceRequest; @@ -166,8 +166,8 @@ extern const pb_field_t grpc_lb_v1_Server_fields[5]; /* Maximum encoded size of messages (where known) */ #define grpc_lb_v1_Duration_size 22 -#define grpc_lb_v1_LoadBalanceRequest_size 169 -#define grpc_lb_v1_InitialLoadBalanceRequest_size 131 +#define grpc_lb_v1_LoadBalanceRequest_size 297 +#define grpc_lb_v1_InitialLoadBalanceRequest_size 259 #define grpc_lb_v1_ClientStats_size 33 #define grpc_lb_v1_LoadBalanceResponse_size (98 + grpc_lb_v1_ServerList_size) #define grpc_lb_v1_InitialLoadBalanceResponse_size 90 diff --git a/src/proto/grpc/lb/v1/load_balancer.options b/src/proto/grpc/lb/v1/load_balancer.options index 7fbd44b9de..46e27fa2c1 100644 --- a/src/proto/grpc/lb/v1/load_balancer.options +++ b/src/proto/grpc/lb/v1/load_balancer.options @@ -1,4 +1,4 @@ -grpc.lb.v1.InitialLoadBalanceRequest.name max_size:128 +grpc.lb.v1.InitialLoadBalanceRequest.name max_size:256 grpc.lb.v1.InitialLoadBalanceResponse.load_balancer_delegate max_size:64 grpc.lb.v1.Server.ip_address max_size:16 grpc.lb.v1.Server.load_balance_token max_size:50 diff --git a/src/proto/grpc/lb/v1/load_balancer.proto b/src/proto/grpc/lb/v1/load_balancer.proto index 7736a14b9a..44a5150a7e 100644 --- a/src/proto/grpc/lb/v1/load_balancer.proto +++ b/src/proto/grpc/lb/v1/load_balancer.proto @@ -64,7 +64,7 @@ message LoadBalanceRequest { message InitialLoadBalanceRequest { // Name of load balanced service (IE, service.grpc.gslb.google.com). Its - // length should be less than 128 bytes. + // length should be less than 256 bytes. string name = 1; } -- cgit v1.2.3 From 378856babe572d6e616940eb9cda5bc8fe4c2d29 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 31 Oct 2016 07:47:08 -0700 Subject: Fix memory leak --- src/core/lib/channel/http_server_filter.c | 6 +++++- src/core/lib/transport/metadata.c | 10 ++++++++++ src/core/lib/transport/metadata.h | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index f2221fb0fb..8340b5cd0f 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -314,13 +314,17 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_closure_init(&calld->hs_on_recv, hs_on_recv, elem); grpc_closure_init(&calld->hs_on_complete, hs_on_complete, elem); grpc_closure_init(&calld->hs_recv_message_ready, hs_recv_message_ready, elem); + gpr_slice_buffer_init(&calld->read_slice_buffer); return GRPC_ERROR_NONE; } /* Destructor for call_data */ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_final_info *final_info, - void *ignored) {} + void *ignored) { + call_data *calld = elem->call_data; + gpr_slice_buffer_destroy(&calld->read_slice_buffer); +} /* Constructor for channel_data */ static void init_channel_elem(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 4b40c275ad..f3c5321fe9 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -687,6 +687,11 @@ size_t grpc_mdstr_length(const grpc_mdstr *s) { return GRPC_MDSTR_LENGTH(s); } grpc_mdstr *grpc_mdstr_ref(grpc_mdstr *gs DEBUG_ARGS) { internal_string *s = (internal_string *)gs; if (is_mdstr_static(gs)) return gs; +#ifdef GRPC_METADATA_REFCOUNT_DEBUG + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "STR REF:%p:%zu->%zu: '%s'", + (void *)s, gpr_atm_no_barrier_load(&s->refcnt), + gpr_atm_no_barrier_load(&s->refcnt) + 1, grpc_mdstr_as_c_string(gs)); +#endif GPR_ASSERT(gpr_atm_full_fetch_add(&s->refcnt, 1) > 0); return gs; } @@ -694,6 +699,11 @@ grpc_mdstr *grpc_mdstr_ref(grpc_mdstr *gs DEBUG_ARGS) { void grpc_mdstr_unref(grpc_mdstr *gs DEBUG_ARGS) { internal_string *s = (internal_string *)gs; if (is_mdstr_static(gs)) return; +#ifdef GRPC_METADATA_REFCOUNT_DEBUG + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "STR UNREF:%p:%zu->%zu: '%s'", + (void *)s, gpr_atm_no_barrier_load(&s->refcnt), + gpr_atm_no_barrier_load(&s->refcnt) - 1, grpc_mdstr_as_c_string(gs)); +#endif if (1 == gpr_atm_full_fetch_add(&s->refcnt, -1)) { strtab_shard *shard = &g_strtab_shard[SHARD_IDX(s->hash, LOG2_STRTAB_SHARD_COUNT)]; diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 71eff0acf2..36b277cac4 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -124,7 +124,7 @@ void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), void *user_data); /* Reference counting */ -//#define GRPC_METADATA_REFCOUNT_DEBUG +#define GRPC_METADATA_REFCOUNT_DEBUG #ifdef GRPC_METADATA_REFCOUNT_DEBUG #define GRPC_MDSTR_REF(s) grpc_mdstr_ref((s), __FILE__, __LINE__) #define GRPC_MDSTR_UNREF(s) grpc_mdstr_unref((s), __FILE__, __LINE__) -- cgit v1.2.3 From 99c4136900ca02172406852a91adbfc9f3e50374 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 31 Oct 2016 07:52:53 -0700 Subject: Revert errant change --- src/core/lib/transport/metadata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 36b277cac4..71eff0acf2 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -124,7 +124,7 @@ void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), void *user_data); /* Reference counting */ -#define GRPC_METADATA_REFCOUNT_DEBUG +//#define GRPC_METADATA_REFCOUNT_DEBUG #ifdef GRPC_METADATA_REFCOUNT_DEBUG #define GRPC_MDSTR_REF(s) grpc_mdstr_ref((s), __FILE__, __LINE__) #define GRPC_MDSTR_UNREF(s) grpc_mdstr_unref((s), __FILE__, __LINE__) -- cgit v1.2.3 From 69259d425111696dd2df5a243e8b714db3dc3dac Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 31 Oct 2016 14:34:10 -0700 Subject: Add resource quota support to uv TCP code --- src/core/lib/iomgr/endpoint_pair_uv.c | 5 +- src/core/lib/iomgr/resource_quota.c | 7 ++ src/core/lib/iomgr/resource_quota.h | 5 ++ src/core/lib/iomgr/tcp_client_uv.c | 36 +++++++-- src/core/lib/iomgr/tcp_server_uv.c | 24 +++++- src/core/lib/iomgr/tcp_uv.c | 133 ++++++++++++++++++++++------------ src/core/lib/iomgr/tcp_uv.h | 4 +- 7 files changed, 154 insertions(+), 60 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/endpoint_pair_uv.c b/src/core/lib/iomgr/endpoint_pair_uv.c index 7941e20388..ff24894c6d 100644 --- a/src/core/lib/iomgr/endpoint_pair_uv.c +++ b/src/core/lib/iomgr/endpoint_pair_uv.c @@ -41,8 +41,9 @@ #include "src/core/lib/iomgr/endpoint_pair.h" -grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, - size_t read_slice_size) { +grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( + const char *name, grpc_resource_quota *resource_quota, + size_t read_slice_size) { grpc_endpoint_pair endpoint_pair; // TODO(mlumish): implement this properly under libuv GPR_ASSERT(false && diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index bfc905845d..40c847a1b3 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -712,3 +712,10 @@ void grpc_resource_user_alloc_slices( grpc_resource_user_alloc(exec_ctx, slice_allocator->resource_user, count * length, &slice_allocator->on_allocated); } + +gpr_slice grpc_resource_user_slice_malloc(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, + size_t size) { + grpc_resource_user_alloc(exec_ctx, resource_user, size, NULL); + return ru_slice_create(resource_user, size); +} diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index 6dfac55f88..da68f21a2c 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -221,4 +221,9 @@ void grpc_resource_user_alloc_slices( grpc_resource_user_slice_allocator *slice_allocator, size_t length, size_t count, gpr_slice_buffer *dest); +/* Allocate one slice of length \a size synchronously. */ +gpr_slice grpc_resource_user_slice_malloc(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, + size_t size); + #endif /* GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H */ diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c index 6274667042..b07f9ceffa 100644 --- a/src/core/lib/iomgr/tcp_client_uv.c +++ b/src/core/lib/iomgr/tcp_client_uv.c @@ -54,9 +54,12 @@ typedef struct grpc_uv_tcp_connect { grpc_endpoint **endpoint; int refs; char *addr_name; + grpc_resource_quota *resource_quota; } grpc_uv_tcp_connect; -static void uv_tcp_connect_cleanup(grpc_uv_tcp_connect *connect) { +static void uv_tcp_connect_cleanup(grpc_exec_ctx *exec_ctx, + grpc_uv_tcp_connect *connect) { + grpc_resource_quota_internal_unref(exec_ctx, connect->resource_quota); gpr_free(connect); } @@ -74,7 +77,7 @@ static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, } done = (--connect->refs == 0); if (done) { - uv_tcp_connect_cleanup(connect); + uv_tcp_connect_cleanup(exec_ctx, connect); } } @@ -86,8 +89,8 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) { grpc_closure *closure = connect->closure; grpc_timer_cancel(&exec_ctx, &connect->alarm); if (status == 0) { - *connect->endpoint = - grpc_tcp_create(connect->tcp_handle, connect->addr_name); + *connect->endpoint = grpc_tcp_create( + connect->tcp_handle, connect->resource_quota, connect->addr_name); } else { error = GRPC_ERROR_CREATE("Failed to connect to remote host"); error = grpc_error_set_int(error, GRPC_ERROR_INT_ERRNO, -status); @@ -105,7 +108,7 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) { } done = (--connect->refs == 0); if (done) { - uv_tcp_connect_cleanup(connect); + uv_tcp_connect_cleanup(&exec_ctx, connect); } grpc_exec_ctx_sched(&exec_ctx, closure, error, NULL); grpc_exec_ctx_finish(&exec_ctx); @@ -114,16 +117,31 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) { static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, + const grpc_channel_args *channel_args, const grpc_resolved_address *resolved_addr, gpr_timespec deadline) { grpc_uv_tcp_connect *connect; + grpc_resource_quota *resource_quota = grpc_resource_quota_create(NULL); + (void)channel_args; (void)interested_parties; + + if (channel_args != NULL) { + for (size_t i = 0; i < channel_args->num_args; i++) { + if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) { + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); + resource_quota = grpc_resource_quota_internal_ref( + channel_args->args[i].value.pointer.p); + } + } + } + connect = gpr_malloc(sizeof(grpc_uv_tcp_connect)); memset(connect, 0, sizeof(grpc_uv_tcp_connect)); connect->closure = closure; connect->endpoint = ep; connect->tcp_handle = gpr_malloc(sizeof(uv_tcp_t)); connect->addr_name = grpc_sockaddr_to_uri(resolved_addr); + connect->resource_quota = resource_quota; uv_tcp_init(uv_default_loop(), connect->tcp_handle); connect->connect_req.data = connect; // TODO(murgatroid99): figure out what the return value here means @@ -138,16 +156,18 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, // overridden by api_fuzzer.c void (*grpc_tcp_client_connect_impl)( grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, const grpc_resolved_address *addr, + grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args, + const grpc_resolved_address *addr, gpr_timespec deadline) = tcp_client_connect_impl; void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, + const grpc_channel_args *channel_args, const grpc_resolved_address *addr, gpr_timespec deadline) { - grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, addr, - deadline); + grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, + channel_args, addr, deadline); } #endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/tcp_server_uv.c b/src/core/lib/iomgr/tcp_server_uv.c index 73e4db3d65..b5b9b92a20 100644 --- a/src/core/lib/iomgr/tcp_server_uv.c +++ b/src/core/lib/iomgr/tcp_server_uv.c @@ -76,13 +76,30 @@ struct grpc_tcp_server { /* shutdown callback */ grpc_closure *shutdown_complete; + + grpc_resource_quota *resource_quota; }; -grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, +grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, + grpc_closure *shutdown_complete, const grpc_channel_args *args, grpc_tcp_server **server) { grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); - (void)args; + s->resource_quota = grpc_resource_quota_create(NULL); + for (size_t i = 0; i < (args == NULL ? 0 : args->num_args); i++) { + if (0 == strcmp(GRPC_ARG_RESOURCE_QUOTA, args->args[i].key)) { + if (args->args[i].type == GRPC_ARG_POINTER) { + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); + s->resource_quota = + grpc_resource_quota_internal_ref(args->args[i].value.pointer.p); + } else { + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); + gpr_free(s); + return GRPC_ERROR_CREATE(GRPC_ARG_RESOURCE_QUOTA + " must be a pointer to a buffer pool"); + } + } + } gpr_ref_init(&s->refs, 1); s->on_accept_cb = NULL; s->on_accept_cb_arg = NULL; @@ -119,6 +136,7 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { gpr_free(sp->handle); gpr_free(sp); } + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); gpr_free(s); } @@ -201,7 +219,7 @@ static void on_connect(uv_stream_t *server, int status) { } else { gpr_log(GPR_INFO, "uv_tcp_getpeername error: %s", uv_strerror(status)); } - ep = grpc_tcp_create(client, peer_name_string); + ep = grpc_tcp_create(client, sp->server->resource_quota, peer_name_string); sp->server->on_accept_cb(&exec_ctx, sp->server->on_accept_cb_arg, ep, NULL, &acceptor); grpc_exec_ctx_finish(&exec_ctx); diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index 3860fe3e9b..b90e0c8008 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -1,35 +1,35 @@ /* - * - * 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. - * - */ +* +* 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 "src/core/lib/iomgr/port.h" @@ -54,6 +54,9 @@ typedef struct { grpc_endpoint base; gpr_refcount refcount; + uv_write_t write_req; + uv_shutdown_t shutdown_req; + uv_tcp_t *handle; grpc_closure *read_cb; @@ -64,14 +67,23 @@ typedef struct { gpr_slice_buffer *write_slices; uv_buf_t *write_buffers; + grpc_resource_user resource_user; + bool shutting_down; + bool resource_user_shutting_down; + char *peer_string; grpc_pollset *pollset; } grpc_tcp; static void uv_close_callback(uv_handle_t *handle) { gpr_free(handle); } -static void tcp_free(grpc_tcp *tcp) { gpr_free(tcp); } +static void tcp_free(grpc_tcp *tcp) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_destroy(&exec_ctx, &tcp->resource_user); + gpr_free(tcp); + grpc_exec_ctx_finish(&exec_ctx); +} /*#define GRPC_TCP_REFCOUNT_DEBUG*/ #ifdef GRPC_TCP_REFCOUNT_DEBUG @@ -106,11 +118,14 @@ static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_tcp *tcp = handle->data; (void)suggested_size; - tcp->read_slice = gpr_slice_malloc(GRPC_TCP_DEFAULT_READ_SLICE_SIZE); + tcp->read_slice = grpc_resource_user_slice_malloc( + &exec_ctx, &tcp->resource_user, GRPC_TCP_DEFAULT_READ_SLICE_SIZE); buf->base = (char *)GPR_SLICE_START_PTR(tcp->read_slice); buf->len = GPR_SLICE_LENGTH(tcp->read_slice); + grpc_exec_ctx_finish(&exec_ctx); } static void read_callback(uv_stream_t *stream, ssize_t nread, @@ -198,7 +213,8 @@ static void write_callback(uv_write_t *req, int status) { gpr_log(GPR_DEBUG, "write complete on %p: error=%s", tcp, str); } gpr_free(tcp->write_buffers); - gpr_free(req); + grpc_resource_user_free(&exec_ctx, &tcp->resource_user, + sizeof(uv_buf_t) * tcp->write_slices->count); grpc_exec_ctx_sched(&exec_ctx, cb, error, NULL); grpc_exec_ctx_finish(&exec_ctx); } @@ -243,12 +259,15 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->write_cb = cb; buffer_count = (unsigned int)tcp->write_slices->count; buffers = gpr_malloc(sizeof(uv_buf_t) * buffer_count); + grpc_resource_user_alloc(exec_ctx, &tcp->resource_user, + sizeof(uv_buf_t) * buffer_count, NULL); for (i = 0; i < buffer_count; i++) { slice = &tcp->write_slices->slices[i]; buffers[i].base = (char *)GPR_SLICE_START_PTR(*slice); buffers[i].len = GPR_SLICE_LENGTH(*slice); } - write_req = gpr_malloc(sizeof(uv_write_t)); + tcp->write_buffers = buffers; + write_req = &tcp->write_req; write_req->data = tcp; TCP_REF(tcp, "write"); // TODO(murgatroid99): figure out what the return value here means @@ -274,13 +293,29 @@ static void uv_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, (void)pollset; } -static void shutdown_callback(uv_shutdown_t *req, int status) { gpr_free(req); } +static void shutdown_callback(uv_shutdown_t *req, int status) {} + +static void resource_user_shutdown_done(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + TCP_UNREF(arg, "resource_user"); +} + +static void uv_resource_user_maybe_shutdown(grpc_exec_ctx *exec_ctx, + grpc_tcp *tcp) { + if (!tcp->resource_user_shutting_down) { + tcp->resource_user_shutting_down = true; + TCP_REF(tcp, "resource_user"); + grpc_resource_user_shutdown( + exec_ctx, &tcp->resource_user, + grpc_closure_create(resource_user_shutdown_done, tcp)); + } +} static void uv_endpoint_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; if (!tcp->shutting_down) { tcp->shutting_down = true; - uv_shutdown_t *req = gpr_malloc(sizeof(uv_shutdown_t)); + uv_shutdown_t *req = &tcp->shutdown_req; uv_shutdown(req, (uv_stream_t *)tcp->handle, shutdown_callback); } } @@ -289,6 +324,7 @@ static void uv_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; uv_close((uv_handle_t *)tcp->handle, uv_close_callback); + uv_resource_user_maybe_shutdown(exec_ctx, tcp); TCP_UNREF(tcp, "destroy"); } @@ -297,18 +333,21 @@ static char *uv_get_peer(grpc_endpoint *ep) { return gpr_strdup(tcp->peer_string); } +static grpc_resource_user *uv_get_resource_user(grpc_endpoint *ep) { + grpc_tcp *tcp = (grpc_tcp *)ep; + return &tcp->resource_user; +} + static grpc_workqueue *uv_get_workqueue(grpc_endpoint *ep) { return NULL; } -static grpc_endpoint_vtable vtable = {uv_endpoint_read, - uv_endpoint_write, - uv_get_workqueue, - uv_add_to_pollset, - uv_add_to_pollset_set, - uv_endpoint_shutdown, - uv_destroy, - uv_get_peer}; +static grpc_endpoint_vtable vtable = { + uv_endpoint_read, uv_endpoint_write, uv_get_workqueue, + uv_add_to_pollset, uv_add_to_pollset_set, uv_endpoint_shutdown, + uv_destroy, uv_get_resource_user, uv_get_peer}; -grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string) { +grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, + grpc_resource_quota *resource_quota, + char *peer_string) { grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp)); if (grpc_tcp_trace) { @@ -325,6 +364,8 @@ grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string) { gpr_ref_init(&tcp->refcount, 1); tcp->peer_string = gpr_strdup(peer_string); tcp->shutting_down = false; + tcp->resource_user_shutting_down = false; + grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); /* Tell network status tracking code about the new endpoint */ grpc_network_status_register_endpoint(&tcp->base); diff --git a/src/core/lib/iomgr/tcp_uv.h b/src/core/lib/iomgr/tcp_uv.h index eed41151ea..970fcafe4a 100644 --- a/src/core/lib/iomgr/tcp_uv.h +++ b/src/core/lib/iomgr/tcp_uv.h @@ -52,6 +52,8 @@ extern int grpc_tcp_trace; #define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192 -grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string); +grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, + grpc_resource_quota *resource_quota, + char *peer_string); #endif /* GRPC_CORE_LIB_IOMGR_TCP_UV_H */ -- cgit v1.2.3 From 7ec291330c4442bc2d4adc1f93ff8f7bd9149c14 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 1 Nov 2016 04:09:05 +0100 Subject: PR comments --- src/core/ext/lb_policy/grpclb/grpclb.c | 253 ++++++++++------------- src/core/ext/lb_policy/round_robin/round_robin.c | 14 +- test/cpp/grpclb/grpclb_test.cc | 16 +- 3 files changed, 133 insertions(+), 150 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index d2af27e7bf..9a608fd477 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -47,15 +47,12 @@ * and initiates the internal communication with the LB server. In particular, * it's responsible for instantiating the internal *streaming* call to the LB * server (whichever address from {a1..an} pick-first chose). This call is - * serviced by two callbacks, \a srv_status_rcvd and \a res_rcvd. The former - * will be called when the call to the LB server completes. This can happen if - * the LB server closes the connection or if this policy itself cancels the call - * (for example because it's shutting down). If the call fails with - * UNIMPLEMENTED, the original picks/pings will fail. This signals that there's - * a misconfiguration somewhere: at least one of {a1..an} isn't an LB server, - * which contradicts the LB bit being set. If the internal call times out, the - * usual behavior of pick-first applies, continuing to pick from the list - * {a1..an}. + * serviced by two callbacks, \a lb_on_server_status_received and \a + * lb_on_response_received. The former will be called when the call to the LB + * server completes. This can happen if the LB server closes the connection or + * if this policy itself cancels the call (for example because it's shutting + * down).If the internal call times out, the usual behavior of pick-first + * applies, continuing to pick from the list {a1..an}. * * Upon sucesss, the incoming \a LoadBalancingResponse is processed by \a * res_recv. An invalid one results in the termination of the streaming call. A @@ -80,10 +77,10 @@ * Once a RR policy instance is in place (and getting updated as described), * calls to for a pick, a ping or a cancellation will be serviced right away by * forwarding them to the RR instance. Any time there's no RR policy available - * (ie, right after the creation of the gRPCLB policy, if an empty serverlist - * is received, etc), pick/ping requests are added to a list of pending - * picks/pings to be flushed and serviced as part of \a rr_handover_locked() the - * moment the RR policy instance becomes available. + * (ie, right after the creation of the gRPCLB policy, if an empty serverlist is + * received, etc), pick/ping requests are added to a list of pending picks/pings + * to be flushed and serviced as part of \a rr_handover_locked() the moment the + * RR policy instance becomes available. * * \see https://github.com/grpc/grpc/blob/master/doc/load-balancing.md for the * high level design and details. */ @@ -311,32 +308,28 @@ typedef struct glb_lb_policy { /************************************************************/ /* client data associated with the LB server communication */ /************************************************************/ - /* called once initial metadata's been sent */ - grpc_closure md_sent; + /* Status from the LB server has been received. This signals the end of the LB + * call. */ + grpc_closure lb_on_server_status_received; - /* called once the LoadBalanceRequest has been sent to the LB server. See - * src/proto/grpc/.../load_balancer.proto */ - grpc_closure req_sent; - - /* A response from the LB server has been received (or error). Process it */ - grpc_closure res_rcvd; - - /* ... and the status from the LB server has been received */ - grpc_closure srv_status_rcvd; + /* A response from the LB server has been received. Process it */ + grpc_closure lb_on_response_received; grpc_call *lb_call; /* streaming call to the LB server, */ - grpc_metadata_array initial_metadata_recv; /* initial MD from LB server */ - grpc_metadata_array trailing_metadata_recv; /* trailing MD from LB server */ + grpc_metadata_array lb_initial_metadata_recv; /* initial MD from LB server */ + grpc_metadata_array + lb_trailing_metadata_recv; /* trailing MD from LB server */ /* what's being sent to the LB server. Note that its value may vary if the LB * server indicates a redirect. */ - grpc_byte_buffer *request_payload; + grpc_byte_buffer *lb_request_payload; - /* response from the LB server, if any. Processed in res_recv_cb() */ - grpc_byte_buffer *response_payload; + /* response from the LB server, if any. Processed in lb_on_response_received() + */ + grpc_byte_buffer *lb_response_payload; - /* the call's status and status detailset in srv_status_rcvd_cb() */ + /* the call's status and status detailset in lb_on_server_status_received() */ grpc_status_code lb_call_status; char *lb_call_status_details; size_t lb_call_status_details_capacity; @@ -346,7 +339,6 @@ typedef struct glb_lb_policy { /** LB call retry timer */ grpc_timer lb_call_retry_timer; - } glb_lb_policy; /* Keeps track and reacts to changes in connectivity of the RR instance */ @@ -395,6 +387,28 @@ static int lb_token_cmp(void *token1, void *token2) { static const grpc_lb_user_data_vtable lb_token_vtable = { lb_token_copy, lb_token_destroy, lb_token_cmp}; +static void parse_server(const grpc_grpclb_server *server, + grpc_resolved_address *addr) { + const uint16_t netorder_port = htons((uint16_t)server->port); + /* the addresses are given in binary format (a in(6)_addr struct) in + * server->ip_address.bytes. */ + const grpc_grpclb_ip_address *ip = &server->ip_address; + memset(addr, 0, sizeof(*addr)); + if (ip->size == 4) { + addr->len = sizeof(struct sockaddr_in); + struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr->addr; + addr4->sin_family = AF_INET; + memcpy(&addr4->sin_addr, ip->bytes, ip->size); + addr4->sin_port = netorder_port; + } else if (ip->size == 16) { + addr->len = sizeof(struct sockaddr_in6); + struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr->addr; + addr6->sin6_family = AF_INET; + memcpy(&addr6->sin6_addr, ip->bytes, ip->size); + addr6->sin6_port = netorder_port; + } +} + /* Returns addresses extracted from \a serverlist. */ static grpc_lb_addresses *process_serverlist( const grpc_grpclb_serverlist *serverlist) { @@ -421,25 +435,8 @@ static grpc_lb_addresses *process_serverlist( if (!is_server_valid(serverlist->servers[sl_idx], sl_idx, false)) continue; /* address processing */ - const uint16_t netorder_port = htons((uint16_t)server->port); - /* the addresses are given in binary format (a in(6)_addr struct) in - * server->ip_address.bytes. */ - const grpc_grpclb_ip_address *ip = &server->ip_address; grpc_resolved_address addr; - memset(&addr, 0, sizeof(addr)); - if (ip->size == 4) { - addr.len = sizeof(struct sockaddr_in); - struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr.addr; - addr4->sin_family = AF_INET; - memcpy(&addr4->sin_addr, ip->bytes, ip->size); - addr4->sin_port = netorder_port; - } else if (ip->size == 16) { - addr.len = sizeof(struct sockaddr_in6); - struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr.addr; - addr6->sin6_family = AF_INET; - memcpy(&addr6->sin6_addr, ip->bytes, ip->size); - addr6->sin6_port = netorder_port; - } + parse_server(server, &addr); /* lb token processing */ void *user_data; @@ -538,7 +535,7 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, } if (glb_policy->rr_policy != NULL) { /* if we are phasing out an existing RR instance, unref it. */ - GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "rr_handover_locked"); + GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "rr_handover"); } glb_policy->rr_policy = @@ -565,6 +562,7 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, rr_connectivity->state, GRPC_ERROR_REF(error), "rr_handover"); /* subscribe */ + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "rr_connectiviby_cb"); grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, &rr_connectivity->state, &rr_connectivity->on_change); @@ -606,7 +604,8 @@ static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, rr_connectivity_data *rr_conn_data = arg; glb_lb_policy *glb_policy = rr_conn_data->glb_policy; - if (rr_conn_data->state != GRPC_CHANNEL_SHUTDOWN) { + if (rr_conn_data->state != GRPC_CHANNEL_SHUTDOWN && + !glb_policy->shutting_down) { gpr_mu_lock(&glb_policy->mu); /* RR not shutting down. Mimic the RR's policy state */ grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, @@ -618,6 +617,8 @@ static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, &rr_conn_data->on_change); gpr_mu_unlock(&glb_policy->mu); } else { + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, + "rr_connectiviby_cb"); gpr_free(rr_conn_data); } } @@ -778,7 +779,8 @@ static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { if (glb_policy->started_picking) { if (glb_policy->lb_call != NULL) { grpc_call_cancel(glb_policy->lb_call, NULL); - /* srv_status_rcvd_cb will pick up the cancellation and clean up */ + /* lb_on_server_status_received will pick up the cancellation and clean up + */ } } @@ -950,10 +952,11 @@ static void glb_notify_on_state_change(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&glb_policy->mu); } -static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error); -static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); -static void lb_client_init(glb_lb_policy *glb_policy) { +static void lb_on_server_status_received(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error); +static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error); +static void lb_call_init(glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->server_name != NULL); GPR_ASSERT(glb_policy->server_name[0] != '\0'); @@ -966,13 +969,13 @@ static void lb_client_init(glb_lb_policy *glb_policy) { "/grpc.lb.v1.LoadBalancer/BalanceLoad", glb_policy->server_name, glb_policy->deadline, NULL); - grpc_metadata_array_init(&glb_policy->initial_metadata_recv); - grpc_metadata_array_init(&glb_policy->trailing_metadata_recv); + grpc_metadata_array_init(&glb_policy->lb_initial_metadata_recv); + grpc_metadata_array_init(&glb_policy->lb_trailing_metadata_recv); grpc_grpclb_request *request = grpc_grpclb_request_create(glb_policy->server_name); gpr_slice request_payload_slice = grpc_grpclb_request_encode(request); - glb_policy->request_payload = + glb_policy->lb_request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_slice_unref(request_payload_slice); grpc_grpclb_request_destroy(request); @@ -980,24 +983,25 @@ static void lb_client_init(glb_lb_policy *glb_policy) { glb_policy->lb_call_status_details = NULL; glb_policy->lb_call_status_details_capacity = 0; - grpc_closure_init(&glb_policy->srv_status_rcvd, srv_status_rcvd_cb, - glb_policy); - grpc_closure_init(&glb_policy->res_rcvd, res_recv_cb, glb_policy); + grpc_closure_init(&glb_policy->lb_on_server_status_received, + lb_on_server_status_received, glb_policy); + grpc_closure_init(&glb_policy->lb_on_response_received, + lb_on_response_received, glb_policy); gpr_backoff_init(&glb_policy->lb_call_backoff_state, BACKOFF_MULTIPLIER, BACKOFF_JITTER, BACKOFF_MIN_SECONDS * 1000, BACKOFF_MAX_SECONDS * 1000); } -static void lb_client_destroy(glb_lb_policy *glb_policy) { +static void lb_call_destroy(glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->lb_call != NULL); grpc_call_destroy(glb_policy->lb_call); glb_policy->lb_call = NULL; - grpc_metadata_array_destroy(&glb_policy->initial_metadata_recv); - grpc_metadata_array_destroy(&glb_policy->trailing_metadata_recv); + grpc_metadata_array_destroy(&glb_policy->lb_initial_metadata_recv); + grpc_metadata_array_destroy(&glb_policy->lb_trailing_metadata_recv); - grpc_byte_buffer_destroy(glb_policy->request_payload); + grpc_byte_buffer_destroy(glb_policy->lb_request_payload); gpr_free(glb_policy->lb_call_status_details); } @@ -1007,8 +1011,10 @@ static void lb_client_destroy(glb_lb_policy *glb_policy) { static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->lb_channel != NULL); + /* take a weak ref (won't prevent calling of \a glb_shutdown if the strong ref + * count goes to zero) to be unref'd in lb_on_server_status_received */ GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "query_for_backends_locked"); - lb_client_init(glb_policy); + lb_call_init(glb_policy); if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Query for backends (grpclb: %p, lb_call: %p)", @@ -1028,21 +1034,21 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, op++; op->op = GRPC_OP_RECV_INITIAL_METADATA; - op->data.recv_initial_metadata = &glb_policy->initial_metadata_recv; + op->data.recv_initial_metadata = &glb_policy->lb_initial_metadata_recv; op->flags = 0; op->reserved = NULL; op++; - GPR_ASSERT(glb_policy->request_payload != NULL); + GPR_ASSERT(glb_policy->lb_request_payload != NULL); op->op = GRPC_OP_SEND_MESSAGE; - op->data.send_message = glb_policy->request_payload; + op->data.send_message = glb_policy->lb_request_payload; op->flags = 0; op->reserved = NULL; op++; op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; op->data.recv_status_on_client.trailing_metadata = - &glb_policy->trailing_metadata_recv; + &glb_policy->lb_trailing_metadata_recv; op->data.recv_status_on_client.status = &glb_policy->lb_call_status; op->data.recv_status_on_client.status_details = &glb_policy->lb_call_status_details; @@ -1051,37 +1057,38 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, op->flags = 0; op->reserved = NULL; op++; - call_error = grpc_call_start_batch_and_execute(exec_ctx, glb_policy->lb_call, - ops, (size_t)(op - ops), - &glb_policy->srv_status_rcvd); + call_error = grpc_call_start_batch_and_execute( + exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), + &glb_policy->lb_on_server_status_received); GPR_ASSERT(GRPC_CALL_OK == call_error); op = ops; op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &glb_policy->response_payload; + op->data.recv_message = &glb_policy->lb_response_payload; op->flags = 0; op->reserved = NULL; op++; - call_error = grpc_call_start_batch_and_execute(exec_ctx, glb_policy->lb_call, - ops, (size_t)(op - ops), - &glb_policy->res_rcvd); + call_error = grpc_call_start_batch_and_execute( + exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), + &glb_policy->lb_on_response_received); GPR_ASSERT(GRPC_CALL_OK == call_error); } -static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { +static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { glb_lb_policy *glb_policy = arg; grpc_op ops[2]; memset(ops, 0, sizeof(ops)); grpc_op *op = ops; - if (glb_policy->response_payload != NULL) { + if (glb_policy->lb_response_payload != NULL) { gpr_backoff_reset(&glb_policy->lb_call_backoff_state); /* Received data from the LB server. Look inside - * glb_policy->response_payload, for a serverlist. */ + * glb_policy->lb_response_payload, for a serverlist. */ grpc_byte_buffer_reader bbr; - grpc_byte_buffer_reader_init(&bbr, glb_policy->response_payload); + grpc_byte_buffer_reader_init(&bbr, glb_policy->lb_response_payload); gpr_slice response_slice = grpc_byte_buffer_reader_readall(&bbr); - grpc_byte_buffer_destroy(glb_policy->response_payload); + grpc_byte_buffer_destroy(glb_policy->lb_response_payload); grpc_grpclb_serverlist *serverlist = grpc_grpclb_response_parse_serverlist(response_slice); if (serverlist != NULL) { @@ -1090,15 +1097,9 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Serverlist with %lu servers received", (unsigned long)serverlist->num_servers); - /* TODO(dgq): this needs to work with ipv6. */ for (size_t i = 0; i < serverlist->num_servers; ++i) { grpc_resolved_address addr; - struct sockaddr_in *sa = (struct sockaddr_in *)&addr.addr; - addr.len = sizeof(struct sockaddr_in); - sa->sin_family = AF_INET; - sa->sin_port = htons((uint16_t)serverlist->servers[i]->port); - memcpy(&sa->sin_addr, serverlist->servers[i]->ip_address.bytes, - serverlist->servers[i]->ip_address.size); + parse_server(serverlist->servers[i], &addr); char *ipport; grpc_sockaddr_to_string(&ipport, &addr, false); gpr_log(GPR_INFO, "Serverlist[%lu]: %s", (unsigned long)i, ipport); @@ -1132,29 +1133,25 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { "response with > 0 servers is received"); } } - - /* keep listening for serverlist updates */ - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &glb_policy->response_payload; - op->flags = 0; - op->reserved = NULL; - op++; - const grpc_call_error call_error = grpc_call_start_batch_and_execute( - exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), - &glb_policy->res_rcvd); /* loop */ - GPR_ASSERT(GRPC_CALL_OK == call_error); - return; + } else { /* serverlist == NULL */ + gpr_log(GPR_ERROR, "Invalid LB response received: '%s'. Ignoring.", + gpr_dump_slice(response_slice, GPR_DUMP_ASCII | GPR_DUMP_HEX)); + gpr_slice_unref(response_slice); } - GPR_ASSERT(serverlist == NULL); - gpr_log(GPR_ERROR, "Invalid LB response received: '%s'", - gpr_dump_slice(response_slice, GPR_DUMP_ASCII)); - gpr_slice_unref(response_slice); - grpc_call_cancel(glb_policy->lb_call, NULL); - /* srv_status_rcvd_cb will pick up the cancellation and clean up */ + /* keep listening for serverlist updates */ + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &glb_policy->lb_response_payload; + op->flags = 0; + op->reserved = NULL; + op++; + const grpc_call_error call_error = grpc_call_start_batch_and_execute( + exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), + &glb_policy->lb_on_response_received); /* loop */ + GPR_ASSERT(GRPC_CALL_OK == call_error); + return; } /* else, empty payload: call cancelled by server. */ - grpc_metadata_array_destroy(&glb_policy->initial_metadata_recv); } static void lb_call_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg, @@ -1176,8 +1173,8 @@ static void lb_call_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg, "grpclb_on_retry_timer"); } -static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { +static void lb_on_server_status_received(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { glb_lb_policy *glb_policy = arg; gpr_mu_lock(&glb_policy->mu); @@ -1191,40 +1188,11 @@ static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg, (void *)glb_policy->lb_call); } - if (glb_policy->lb_call_status == GRPC_STATUS_UNIMPLEMENTED) { - char *failing_server = grpc_call_get_peer(glb_policy->lb_call); - char *error_desc; - gpr_asprintf(&error_desc, "Invalid LB server '%s'", failing_server); - gpr_free(failing_server); - /* flush pending ops */ - pending_pick *pp; - while ((pp = glb_policy->pending_picks)) { - glb_policy->pending_picks = pp->next; - if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "Cancelling pending pick: %s", error_desc); - } - grpc_exec_ctx_sched(exec_ctx, - &pp->wrapped_on_complete_arg.wrapper_closure, - GRPC_ERROR_CREATE(error_desc), NULL); - } - - pending_ping *pping; - while ((pping = glb_policy->pending_pings)) { - glb_policy->pending_pings = pping->next; - if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "Cancelling pending ping: %s", error_desc); - } - grpc_exec_ctx_sched(exec_ctx, &pping->wrapped_notify_arg.wrapper_closure, - GRPC_ERROR_CREATE(error_desc), NULL); - } - gpr_free(error_desc); - } - const bool was_cancelled = (glb_policy->lb_call_status == GRPC_STATUS_CANCELLED); /* We need to performe cleanups no matter what. */ - lb_client_destroy(glb_policy); + lb_call_destroy(glb_policy); if (!glb_policy->shutting_down) { GPR_ASSERT(!was_cancelled); @@ -1248,7 +1216,8 @@ static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg, lb_call_on_retry_timer, glb_policy, now); } gpr_mu_unlock(&glb_policy->mu); - GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, "srv_status_rcvd_cb"); + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, + "lb_on_server_status_received"); } /* Code wiring the policy with the rest of the core */ diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 5f530d54fe..3611287450 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -121,7 +121,7 @@ typedef struct { /** the subchannel's target user data */ void *user_data; /** vtable to operate over \a user_data */ - grpc_lb_user_data_vtable user_data_vtable; + const grpc_lb_user_data_vtable *user_data_vtable; } subchannel_data; struct round_robin_lb_policy { @@ -269,7 +269,9 @@ static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { for (size_t i = 0; i < p->num_subchannels; i++) { subchannel_data *sd = p->subchannels[i]; GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin_destroy"); - sd->user_data_vtable.destroy(sd->user_data); + if (sd->user_data_vtable != NULL) { + sd->user_data_vtable->destroy(sd->user_data); + } gpr_free(sd); } @@ -298,7 +300,7 @@ static void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { gpr_mu_lock(&p->mu); if (grpc_lb_round_robin_trace) { - gpr_log(GPR_DEBUG, "Shutting down Round Robin policy at %p", pol); + gpr_log(GPR_DEBUG, "Shutting down Round Robin policy at %p", (void *)pol); } p->shutdown = 1; @@ -412,7 +414,7 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, gpr_mu_lock(&p->mu); if (grpc_lb_round_robin_trace) { - gpr_log(GPR_INFO, "Round Robin %p trying to pick", pol); + gpr_log(GPR_INFO, "Round Robin %p trying to pick", (void *)pol); } if ((selected = peek_next_connected_locked(p))) { @@ -674,9 +676,9 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, sd->policy = p; sd->index = subchannel_idx; sd->subchannel = subchannel; - sd->user_data_vtable = *addresses->user_data_vtable; + sd->user_data_vtable = addresses->user_data_vtable; sd->user_data = - sd->user_data_vtable.copy(addresses->addresses[i].user_data); + sd->user_data_vtable->copy(addresses->addresses[i].user_data); ++subchannel_idx; grpc_closure_init(&sd->connectivity_changed_closure, rr_connectivity_changed, sd); diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index b6056f9ae4..3a92eb56b7 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -76,10 +76,22 @@ extern "C" { // - Send a serverlist with faulty ip:port addresses (port > 2^16, etc). // - Test reception of invalid serverlist // - Test pinging -// - Test against a non-LB server. That server should return UNIMPLEMENTED and -// the call should fail. +// - Test against a non-LB server. // - Random LB server closing the stream unexpectedly. // - Test using DNS-resolvable names (localhost?) +// +// Findings from end to end testing to be covered here: +// - Handling of LB servers restart, including reconnection after backing-off +// retries. +// - Destruction of load balanced channel (and therefore of grpclb instance) +// while: +// 1) the internal LB call is still active. This should work by virtue +// of the weak reference the LB call holds. The call should be terminated as +// part of the grpclb shutdown process. +// 2) the retry timer is active. Again, the weak reference it holds should +// prevent a premature call to \a glb_destroy. +// - Restart of backend servers with no changes to serverlist. This exercises +// the RR handover mechanism. namespace grpc { namespace { -- cgit v1.2.3 From a59c4755d3b83f1cb06ad63d4deaaeec33fd07ba Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 1 Nov 2016 11:34:40 -0700 Subject: Send a RST_STREAM from the client if servers dont properly close streams --- .../ext/transport/chttp2/transport/hpack_parser.c | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 8180f78fc0..9702cb2c81 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -50,6 +50,7 @@ #include #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" +#include "src/core/ext/transport/chttp2/transport/http2_errors.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/string.h" @@ -1578,6 +1579,20 @@ static const maybe_complete_func_type maybe_complete_funcs[] = { grpc_chttp2_maybe_complete_recv_initial_metadata, grpc_chttp2_maybe_complete_recv_trailing_metadata}; +static void force_client_rst_stream(grpc_exec_ctx *exec_ctx, void *sp, + grpc_error *error) { + grpc_chttp2_stream *s = sp; + grpc_chttp2_transport *t = s->t; + if (!s->write_closed) { + gpr_slice_buffer_add( + &t->qbuf, grpc_chttp2_rst_stream_create(s->id, GRPC_CHTTP2_NO_ERROR, + &s->stats.outgoing)); + grpc_chttp2_initiate_write(exec_ctx, t, false, "force_rst_stream"); + grpc_chttp2_mark_stream_closed(exec_ctx, t, s, true, true, GRPC_ERROR_NONE); + } + GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "final_rst"); +} + grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx, void *hpack_parser, grpc_chttp2_transport *t, @@ -1613,6 +1628,17 @@ grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx, s->header_frames_received++; } if (parser->is_eof) { + if (t->is_client && !s->write_closed) { + /* server eof ==> complete closure; we may need to forcefully close + the stream. Wait until the combiner lock is ready to be released + however -- it might be that we receive a RST_STREAM following this + and can avoid the extra write */ + GRPC_CHTTP2_STREAM_REF(s, "final_rst"); + grpc_combiner_execute_finally( + exec_ctx, t->combiner, + grpc_closure_create(force_client_rst_stream, s), GRPC_ERROR_NONE, + false); + } grpc_chttp2_mark_stream_closed(exec_ctx, t, s, true, false, GRPC_ERROR_NONE); } -- cgit v1.2.3 From 246c564bb89ec9f52e9ddbdd8a2df4e6df259e08 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 1 Nov 2016 11:16:52 -0700 Subject: PR comments, take two --- src/core/ext/lb_policy/grpclb/grpclb.c | 37 +++++++++++------------- src/core/ext/lb_policy/round_robin/round_robin.c | 3 +- 2 files changed, 19 insertions(+), 21 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 9a608fd477..bfcb9e6418 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -51,7 +51,7 @@ * lb_on_response_received. The former will be called when the call to the LB * server completes. This can happen if the LB server closes the connection or * if this policy itself cancels the call (for example because it's shutting - * down).If the internal call times out, the usual behavior of pick-first + * down). If the internal call times out, the usual behavior of pick-first * applies, continuing to pick from the list {a1..an}. * * Upon sucesss, the incoming \a LoadBalancingResponse is processed by \a @@ -325,11 +325,10 @@ typedef struct glb_lb_policy { * server indicates a redirect. */ grpc_byte_buffer *lb_request_payload; - /* response from the LB server, if any. Processed in lb_on_response_received() - */ + /* response the LB server, if any. Processed in lb_on_response_received() */ grpc_byte_buffer *lb_response_payload; - /* the call's status and status detailset in lb_on_server_status_received() */ + /* call status code and details, set in lb_on_server_status_received() */ grpc_status_code lb_call_status; char *lb_call_status_details; size_t lb_call_status_details_capacity; @@ -1013,7 +1012,7 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, GPR_ASSERT(glb_policy->lb_channel != NULL); /* take a weak ref (won't prevent calling of \a glb_shutdown if the strong ref * count goes to zero) to be unref'd in lb_on_server_status_received */ - GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "query_for_backends_locked"); + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "query_for_backends"); lb_call_init(glb_policy); if (grpc_lb_glb_trace) { @@ -1139,19 +1138,21 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, gpr_slice_unref(response_slice); } - /* keep listening for serverlist updates */ - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &glb_policy->lb_response_payload; - op->flags = 0; - op->reserved = NULL; - op++; - const grpc_call_error call_error = grpc_call_start_batch_and_execute( - exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), - &glb_policy->lb_on_response_received); /* loop */ - GPR_ASSERT(GRPC_CALL_OK == call_error); + if (!glb_policy->shutting_down) { + /* keep listening for serverlist updates */ + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &glb_policy->lb_response_payload; + op->flags = 0; + op->reserved = NULL; + op++; + const grpc_call_error call_error = grpc_call_start_batch_and_execute( + exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), + &glb_policy->lb_on_response_received); /* loop */ + GPR_ASSERT(GRPC_CALL_OK == call_error); + } return; } - /* else, empty payload: call cancelled by server. */ + /* else, empty payload: call cancelled. */ } static void lb_call_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg, @@ -1188,14 +1189,10 @@ static void lb_on_server_status_received(grpc_exec_ctx *exec_ctx, void *arg, (void *)glb_policy->lb_call); } - const bool was_cancelled = - (glb_policy->lb_call_status == GRPC_STATUS_CANCELLED); - /* We need to performe cleanups no matter what. */ lb_call_destroy(glb_policy); if (!glb_policy->shutting_down) { - GPR_ASSERT(!was_cancelled); /* if we aren't shutting down, restart the LB client call after some time */ gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); gpr_timespec next_try = diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 3611287450..9b20edec92 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -269,7 +269,8 @@ static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { for (size_t i = 0; i < p->num_subchannels; i++) { subchannel_data *sd = p->subchannels[i]; GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin_destroy"); - if (sd->user_data_vtable != NULL) { + if (sd->user_data != NULL) { + GPR_ASSERT(sd->user_data_vtable); sd->user_data_vtable->destroy(sd->user_data); } gpr_free(sd); -- cgit v1.2.3 From e224a76a6e7523012d8be899240c4cee1ba6f2b4 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 1 Nov 2016 13:00:58 -0700 Subject: PR comments, take three --- src/core/ext/client_channel/lb_policy.h | 6 ++++++ src/core/ext/lb_policy/grpclb/grpclb.c | 25 +++++++++++++++--------- src/core/ext/lb_policy/round_robin/round_robin.c | 2 +- 3 files changed, 23 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/lb_policy.h b/src/core/ext/client_channel/lb_policy.h index 54ad779792..120c641edc 100644 --- a/src/core/ext/client_channel/lb_policy.h +++ b/src/core/ext/client_channel/lb_policy.h @@ -109,10 +109,16 @@ struct grpc_lb_policy_vtable { /*#define GRPC_LB_POLICY_REFCOUNT_DEBUG*/ #ifdef GRPC_LB_POLICY_REFCOUNT_DEBUG + +/* Strong references: the policy will shutdown when they reach zero */ #define GRPC_LB_POLICY_REF(p, r) \ grpc_lb_policy_ref((p), __FILE__, __LINE__, (r)) #define GRPC_LB_POLICY_UNREF(exec_ctx, p, r) \ grpc_lb_policy_unref((exec_ctx), (p), __FILE__, __LINE__, (r)) + +/* Weak references: they don't prevent the shutdown of the LB policy. When no + * strong references are left but there are still weak ones, shutdown is called. + * Once the weak reference also reaches zero, the LB policy is destroyed. */ #define GRPC_LB_POLICY_WEAK_REF(p, r) \ grpc_lb_policy_weak_ref((p), __FILE__, __LINE__, (r)) #define GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, p, r) \ diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index bfcb9e6418..451fbd65de 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -561,7 +561,7 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, rr_connectivity->state, GRPC_ERROR_REF(error), "rr_handover"); /* subscribe */ - GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "rr_connectiviby_cb"); + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "rr_connectivity_cb"); grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, &rr_connectivity->state, &rr_connectivity->on_change); @@ -609,15 +609,15 @@ static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, /* RR not shutting down. Mimic the RR's policy state */ grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, rr_conn_data->state, GRPC_ERROR_REF(error), - "glb_rr_connectivity_changed"); - /* resubscribe */ + "rr_connectivity_cb"); + /* resubscribe. Reuse the "rr_connectivity_cb" weak ref. */ grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, &rr_conn_data->state, &rr_conn_data->on_change); gpr_mu_unlock(&glb_policy->mu); } else { GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, - "rr_connectiviby_cb"); + "rr_connectivity_cb"); gpr_free(rr_conn_data); } } @@ -1010,9 +1010,6 @@ static void lb_call_destroy(glb_lb_policy *glb_policy) { static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->lb_channel != NULL); - /* take a weak ref (won't prevent calling of \a glb_shutdown if the strong ref - * count goes to zero) to be unref'd in lb_on_server_status_received */ - GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "query_for_backends"); lb_call_init(glb_policy); if (grpc_lb_glb_trace) { @@ -1056,6 +1053,9 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, op->flags = 0; op->reserved = NULL; op++; + /* take a weak ref (won't prevent calling of \a glb_shutdown if the strong ref + * count goes to zero) to be unref'd in lb_on_server_status_received */ + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "lb_on_server_status_received"); call_error = grpc_call_start_batch_and_execute( exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), &glb_policy->lb_on_server_status_received); @@ -1067,6 +1067,8 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, op->flags = 0; op->reserved = NULL; op++; + /* take another weak ref to be unref'd in lb_on_response_received */ + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "lb_on_response_received"); call_error = grpc_call_start_batch_and_execute( exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), &glb_policy->lb_on_response_received); @@ -1145,14 +1147,19 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, op->flags = 0; op->reserved = NULL; op++; + /* reuse the "lb_on_response_received" weak ref taken in + * query_for_backends_locked() */ const grpc_call_error call_error = grpc_call_start_batch_and_execute( exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), &glb_policy->lb_on_response_received); /* loop */ GPR_ASSERT(GRPC_CALL_OK == call_error); } - return; + } else { /* empty payload: call cancelled. */ + /* dispose of the "lb_on_response_received" weak ref taken in + * query_for_backends_locked() and reused in every reception loop */ + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, + "lb_on_response_received_empty_payload"); } - /* else, empty payload: call cancelled. */ } static void lb_call_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg, diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 9b20edec92..4700267ba2 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -270,7 +270,7 @@ static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { subchannel_data *sd = p->subchannels[i]; GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin_destroy"); if (sd->user_data != NULL) { - GPR_ASSERT(sd->user_data_vtable); + GPR_ASSERT(sd->user_data_vtable != NULL); sd->user_data_vtable->destroy(sd->user_data); } gpr_free(sd); -- cgit v1.2.3 From d14458f5894444aeaf3793d29d3c3d299493ecd1 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 1 Nov 2016 13:19:40 -0700 Subject: Reverted back to using 128 bytes for service name --- .../ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c | 9 ++++++++- .../ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h | 6 +++--- src/proto/grpc/lb/v1/load_balancer.options | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c index c90d3f9ff5..afecb716fb 100644 --- a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c @@ -106,7 +106,14 @@ PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) -#error Field descriptor for grpc_lb_v1_InitialLoadBalanceRequest.name is too large. Define PB_FIELD_16BIT to fix this. +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 256 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 256 && pb_membersize(grpc_lb_v1_ServerList, servers) < 256 && pb_membersize(grpc_lb_v1_ServerList, expiration_interval) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_lb_v1_Duration_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server) #endif diff --git a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h index 81e89254d1..e36d0966f8 100644 --- a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h @@ -66,7 +66,7 @@ typedef struct _grpc_lb_v1_Duration { typedef struct _grpc_lb_v1_InitialLoadBalanceRequest { bool has_name; - char name[256]; + char name[128]; /* @@protoc_insertion_point(struct:grpc_lb_v1_InitialLoadBalanceRequest) */ } grpc_lb_v1_InitialLoadBalanceRequest; @@ -166,8 +166,8 @@ extern const pb_field_t grpc_lb_v1_Server_fields[5]; /* Maximum encoded size of messages (where known) */ #define grpc_lb_v1_Duration_size 22 -#define grpc_lb_v1_LoadBalanceRequest_size 297 -#define grpc_lb_v1_InitialLoadBalanceRequest_size 259 +#define grpc_lb_v1_LoadBalanceRequest_size 169 +#define grpc_lb_v1_InitialLoadBalanceRequest_size 131 #define grpc_lb_v1_ClientStats_size 33 #define grpc_lb_v1_LoadBalanceResponse_size (98 + grpc_lb_v1_ServerList_size) #define grpc_lb_v1_InitialLoadBalanceResponse_size 90 diff --git a/src/proto/grpc/lb/v1/load_balancer.options b/src/proto/grpc/lb/v1/load_balancer.options index 46e27fa2c1..7fbd44b9de 100644 --- a/src/proto/grpc/lb/v1/load_balancer.options +++ b/src/proto/grpc/lb/v1/load_balancer.options @@ -1,4 +1,4 @@ -grpc.lb.v1.InitialLoadBalanceRequest.name max_size:256 +grpc.lb.v1.InitialLoadBalanceRequest.name max_size:128 grpc.lb.v1.InitialLoadBalanceResponse.load_balancer_delegate max_size:64 grpc.lb.v1.Server.ip_address max_size:16 grpc.lb.v1.Server.load_balance_token max_size:50 -- cgit v1.2.3 From da050b643e302db24d840f02c475655c01182333 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 1 Nov 2016 17:17:28 -0700 Subject: Fixed weird whitespace change --- src/core/lib/iomgr/tcp_uv.c | 62 ++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index b90e0c8008..8e74c9e863 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -1,35 +1,35 @@ /* -* -* 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. -* -*/ + * + * 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 "src/core/lib/iomgr/port.h" -- cgit v1.2.3 From 2ff8180b33dfa0fc4191d2608cae4e08860543df Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 1 Nov 2016 21:58:16 -0700 Subject: clang-format --- src/core/ext/lb_policy/round_robin/round_robin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 4700267ba2..b0c461730b 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -263,7 +263,7 @@ static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { ready_list *elem; if (grpc_lb_round_robin_trace) { - gpr_log(GPR_DEBUG, "Destroying Round Robin policy at %p", (void*)pol); + gpr_log(GPR_DEBUG, "Destroying Round Robin policy at %p", (void *)pol); } for (size_t i = 0; i < p->num_subchannels; i++) { -- cgit v1.2.3 From 68413c221e341f4f00326e892077c5fcd4b4f788 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 2 Nov 2016 11:57:37 -0700 Subject: Remove GRPC_SOCKET --- src/core/lib/iomgr/endpoint.c | 2 ++ src/core/lib/iomgr/endpoint.h | 9 ++++----- src/core/lib/iomgr/sockaddr_posix.h | 2 -- src/core/lib/iomgr/sockaddr_windows.h | 2 -- src/core/lib/iomgr/tcp_posix.c | 6 +++--- src/core/lib/security/transport/secure_endpoint.c | 6 ++---- test/core/internal_api_canaries/iomgr.c | 2 +- test/core/util/mock_endpoint.c | 4 ++-- test/core/util/passthru_endpoint.c | 4 ++-- 9 files changed, 16 insertions(+), 21 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/endpoint.c b/src/core/lib/iomgr/endpoint.c index f901fcf962..e70b5599a1 100644 --- a/src/core/lib/iomgr/endpoint.c +++ b/src/core/lib/iomgr/endpoint.c @@ -66,6 +66,8 @@ char* grpc_endpoint_get_peer(grpc_endpoint* ep) { return ep->vtable->get_peer(ep); } +int grpc_endpoint_get_fd(grpc_endpoint* ep) { return ep->vtable->get_fd(ep); } + grpc_workqueue* grpc_endpoint_get_workqueue(grpc_endpoint* ep) { return ep->vtable->get_workqueue(ep); } diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index 22979982e4..2fa59cfc07 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -39,7 +39,6 @@ #include #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" -#include "src/core/lib/iomgr/sockaddr.h" /* An endpoint caps a streaming channel between two communicating processes. Examples may be: a tcp socket, , or some shared memory. */ @@ -60,7 +59,7 @@ struct grpc_endpoint_vtable { void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); char *(*get_peer)(grpc_endpoint *ep); - GRPC_SOCKET *(*get_socket)(grpc_endpoint *ep); + int (*get_fd)(grpc_endpoint *ep); }; /* When data is available on the connection, calls the callback with slices. @@ -73,9 +72,9 @@ void grpc_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, char *grpc_endpoint_get_peer(grpc_endpoint *ep); -/* Get the socket (file descriptor or SOCKET) used by \a ep. Return NULL if - \a ep is not using a socket. */ -GRPC_SOCKET *grpc_endpoint_get_socket(grpc_endpoint *ep); +/* Get the file descriptor used by \a ep. Return -1 if \a ep is not using a fd. + */ +int grpc_endpoint_get_fd(grpc_endpoint *ep); /* Retrieve a reference to the workqueue associated with this endpoint */ grpc_workqueue *grpc_endpoint_get_workqueue(grpc_endpoint *ep); diff --git a/src/core/lib/iomgr/sockaddr_posix.h b/src/core/lib/iomgr/sockaddr_posix.h index a4236ffaee..b150de42f7 100644 --- a/src/core/lib/iomgr/sockaddr_posix.h +++ b/src/core/lib/iomgr/sockaddr_posix.h @@ -41,6 +41,4 @@ #include #include -typedef int GRPC_SOCKET; - #endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_POSIX_H */ diff --git a/src/core/lib/iomgr/sockaddr_windows.h b/src/core/lib/iomgr/sockaddr_windows.h index 507fc71f63..971db5b32b 100644 --- a/src/core/lib/iomgr/sockaddr_windows.h +++ b/src/core/lib/iomgr/sockaddr_windows.h @@ -40,6 +40,4 @@ // must be included after the above #include -typedef SOCKET GRPC_SOCKET; - #endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H */ diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 5ed00a8e98..73e28ef5dd 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -464,9 +464,9 @@ static char *tcp_get_peer(grpc_endpoint *ep) { return gpr_strdup(tcp->peer_string); } -static int *tcp_get_socket(grpc_endpoint *ep) { +static int tcp_get_fd(grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - return &tcp->fd; + return tcp->fd; } static grpc_workqueue *tcp_get_workqueue(grpc_endpoint *ep) { @@ -482,7 +482,7 @@ static const grpc_endpoint_vtable vtable = {tcp_read, tcp_shutdown, tcp_destroy, tcp_get_peer, - tcp_get_socket}; + tcp_get_fd}; grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, size_t slice_size, const char *peer_string) { diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 1086c3be6a..22dc05e9f9 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -366,9 +366,7 @@ static char *endpoint_get_peer(grpc_endpoint *secure_ep) { return grpc_endpoint_get_peer(ep->wrapped_ep); } -static GRPC_SOCKET *endpoint_get_socket(grpc_endpoint *secure_ep) { - return NULL; -} +static int endpoint_get_fd(grpc_endpoint *secure_ep) { return -1; } static grpc_workqueue *endpoint_get_workqueue(grpc_endpoint *secure_ep) { secure_endpoint *ep = (secure_endpoint *)secure_ep; @@ -383,7 +381,7 @@ static const grpc_endpoint_vtable vtable = {endpoint_read, endpoint_shutdown, endpoint_destroy, endpoint_get_peer, - endpoint_get_socket}; + endpoint_get_fd}; grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *transport, diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index 3620b93285..0995332933 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -85,7 +85,7 @@ static void test_code(void) { grpc_endpoint_shutdown, grpc_endpoint_destroy, grpc_endpoint_get_peer, - grpc_endpoint_get_socket}; + grpc_endpoint_get_fd}; endpoint.vtable = &vtable; grpc_endpoint_read(&exec_ctx, &endpoint, NULL, NULL); diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index 15e88968e8..063d4366cf 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -96,7 +96,7 @@ static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } -static GRPC_SOCKET *me_get_socket(grpc_endpoint *ep) { return NULL; } +static int me_get_fd(grpc_endpoint *ep) { return -1; } static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } @@ -108,7 +108,7 @@ static const grpc_endpoint_vtable vtable = {me_read, me_shutdown, me_destroy, me_get_peer, - me_get_socket}; + me_get_fd}; grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice)) { grpc_mock_endpoint *m = gpr_malloc(sizeof(*m)); diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index 5c7167207f..f40177819e 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -141,7 +141,7 @@ static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } -static GRPC_SOCKET *me_get_socket(grpc_endpoint *ep) { return NULL; } +static int me_get_fd(grpc_endpoint *ep) { return -1; } static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } @@ -153,7 +153,7 @@ static const grpc_endpoint_vtable vtable = {me_read, me_shutdown, me_destroy, me_get_peer, - me_get_socket}; + me_get_fd}; static void half_init(half *m, passthru_endpoint *parent) { m->base.vtable = &vtable; -- cgit v1.2.3 From c968e60e2ef60cd20353c34fb6260a63ce9db031 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 2 Nov 2016 14:07:36 -0700 Subject: Use JSON for service config channel arg. --- src/core/ext/client_channel/client_channel.c | 51 ++++++++--- src/core/lib/channel/message_size_filter.c | 34 +++++--- src/core/lib/support/string.c | 9 ++ src/core/lib/support/string.h | 3 + src/core/lib/transport/method_config.c | 122 +++++++++++++++++++++++++++ src/core/lib/transport/method_config.h | 7 ++ 6 files changed, 202 insertions(+), 24 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index ff773ac334..e569af68e9 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -94,17 +94,44 @@ static int method_parameters_cmp(void *value1, void *value2) { static const grpc_mdstr_hash_table_vtable method_parameters_vtable = { gpr_free, method_parameters_copy, method_parameters_cmp}; -static void *method_config_convert_value( - const grpc_method_config *method_config) { +static void *method_config_convert_value(const grpc_json *json) { + wait_for_ready_value wait_for_ready = WAIT_FOR_READY_UNSET; + gpr_timespec timeout = { 0, 0, GPR_TIMESPAN }; + for (grpc_json* field = json->child; field != NULL; field = field->next) { + if (field->key == NULL) continue; + if (strcmp(field->key, "wait_for_ready") == 0) { + if (wait_for_ready != WAIT_FOR_READY_UNSET) return NULL; // Duplicate. + if (field->type != GRPC_JSON_TRUE && field->type != GRPC_JSON_FALSE) { + return NULL; + } + wait_for_ready = field->type == GRPC_JSON_TRUE; + } else if (strcmp(field->key, "timeout") == 0) { + if (timeout.tv_sec > 0 || timeout.tv_nsec > 0) return NULL; // Duplicate. + if (field->type != GRPC_JSON_OBJECT) return NULL; + if (field->child == NULL) return NULL; + for (grpc_json* subfield = field->child; subfield != NULL; + subfield = subfield->next) { + if (subfield->key == NULL) return NULL; + if (strcmp(subfield->key, "seconds") == 0) { + if (timeout.tv_sec > 0) return NULL; // Duplicate. + if (subfield->type != GRPC_JSON_NUMBER) return NULL; + timeout.tv_sec = gpr_parse_nonnegative_number(subfield->value); + if (timeout.tv_sec == -1) return NULL; + } else if (strcmp(subfield->key, "nanos") == 0) { + if (timeout.tv_nsec > 0) return NULL; // Duplicate. + if (subfield->type != GRPC_JSON_NUMBER) return NULL; + timeout.tv_nsec = gpr_parse_nonnegative_number(subfield->value); + if (timeout.tv_nsec == -1) return NULL; + } else { + // Unknown key. + return NULL; + } + } + } + } method_parameters *value = gpr_malloc(sizeof(method_parameters)); - const gpr_timespec *timeout = grpc_method_config_get_timeout(method_config); - value->timeout = timeout != NULL ? *timeout : gpr_time_0(GPR_TIMESPAN); - const bool *wait_for_ready = - grpc_method_config_get_wait_for_ready(method_config); - value->wait_for_ready = - wait_for_ready == NULL - ? WAIT_FOR_READY_UNSET - : (wait_for_ready ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE); + value->timeout = timeout; + value->wait_for_ready = wait_for_ready; return value; } @@ -285,8 +312,8 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); - method_params_table = grpc_method_config_table_convert( - (grpc_method_config_table *)channel_arg->value.pointer.p, + method_params_table = grpc_method_config_table_create_from_json( + (grpc_json *)channel_arg->value.pointer.p, method_config_convert_value, &method_parameters_vtable); } grpc_channel_args_destroy(chand->resolver_result); diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 7dc5ae0df1..4723ab8098 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -39,6 +39,7 @@ #include #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/support/string.h" #include "src/core/lib/transport/method_config.h" #define DEFAULT_MAX_SEND_MESSAGE_LENGTH -1 // Unlimited. @@ -69,17 +70,26 @@ static int message_size_limits_cmp(void* value1, void* value2) { static const grpc_mdstr_hash_table_vtable message_size_limits_vtable = { gpr_free, message_size_limits_copy, message_size_limits_cmp}; -static void* method_config_convert_value( - const grpc_method_config* method_config) { +static void* method_config_convert_value(const grpc_json* json) { + int max_request_message_bytes = -1; + int max_response_message_bytes = -1; + for (grpc_json* field = json->child; field != NULL; field = field->next) { + if (field->key == NULL) continue; + if (strcmp(field->key, "max_request_message_bytes") == 0) { + if (max_request_message_bytes >= 0) return NULL; // Duplicate. + if (field->type != GRPC_JSON_NUMBER) return NULL; + max_request_message_bytes = gpr_parse_nonnegative_number(field->value); + if (max_request_message_bytes == -1) return NULL; + } else if (strcmp(field->key, "max_response_message_bytes") == 0) { + if (max_response_message_bytes >= 0) return NULL; // Duplicate. + if (field->type != GRPC_JSON_NUMBER) return NULL; + max_response_message_bytes = gpr_parse_nonnegative_number(field->value); + if (max_response_message_bytes == -1) return NULL; + } + } message_size_limits* value = gpr_malloc(sizeof(message_size_limits)); - const int32_t* max_request_message_bytes = - grpc_method_config_get_max_request_message_bytes(method_config); - value->max_send_size = - max_request_message_bytes != NULL ? *max_request_message_bytes : -1; - const int32_t* max_response_message_bytes = - grpc_method_config_get_max_response_message_bytes(method_config); - value->max_recv_size = - max_response_message_bytes != NULL ? *max_response_message_bytes : -1; + value->max_send_size = max_request_message_bytes; + value->max_recv_size = max_response_message_bytes; return value; } @@ -224,8 +234,8 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); - chand->method_limit_table = grpc_method_config_table_convert( - (grpc_method_config_table*)channel_arg->value.pointer.p, + chand->method_limit_table = grpc_method_config_table_create_from_json( + (grpc_json*)channel_arg->value.pointer.p, method_config_convert_value, &message_size_limits_vtable); } } diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c index d17fb9da4b..56f29492bf 100644 --- a/src/core/lib/support/string.c +++ b/src/core/lib/support/string.c @@ -34,7 +34,9 @@ #include "src/core/lib/support/string.h" #include +#include #include +#include #include #include @@ -194,6 +196,13 @@ int int64_ttoa(int64_t value, char *string) { return i; } +int gpr_parse_nonnegative_number(const char* value) { + char* end; + long result = strtol(value, &end, 0); + if (*end != '\0' || result < 0 || result > INT_MAX) return -1; + return (int)result; +} + char *gpr_leftpad(const char *str, char flag, size_t length) { const size_t str_length = strlen(str); const size_t out_length = str_length > length ? str_length : length; diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index 9a94e9471c..3a5a8ed826 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -80,6 +80,9 @@ NOTE: This function ensures sufficient bit width even on Win x64, where long is 32bit is size.*/ int int64_ttoa(int64_t value, char *output); +// Parses a non-negative number from a value string. Returns -1 on error. +int gpr_parse_nonnegative_number(const char* value); + /* Reverse a run of bytes */ void gpr_reverse_bytes(char *str, int len); diff --git a/src/core/lib/transport/method_config.c b/src/core/lib/transport/method_config.c index 57d97700bf..23cab2b96b 100644 --- a/src/core/lib/transport/method_config.c +++ b/src/core/lib/transport/method_config.c @@ -39,6 +39,8 @@ #include #include +#include "src/core/lib/json/json.h" +#include "src/core/lib/support/string.h" #include "src/core/lib/transport/mdstr_hash_table.h" #include "src/core/lib/transport/metadata.h" @@ -338,3 +340,123 @@ grpc_mdstr_hash_table* grpc_method_config_table_convert( // Return the new table. return new_table; } + +// Returns the number of names specified in the method config \a json. +static size_t count_names_in_method_config_json(grpc_json* json) { + size_t num_names = 0; + for (grpc_json* field = json->child; field != NULL; field = field->next) { + if (field->key != NULL && strcmp(field->key, "name") == 0) ++num_names; + } + return num_names; +} + +// Returns a path string for the name specified by \a json. +// Returns NULL on error. Caller takes ownership of result. +static char* parse_json_method_name(grpc_json* json) { + if (json->type != GRPC_JSON_OBJECT) return NULL; + const char* service_name = NULL; + const char* method_name = NULL; + for (grpc_json* child = json->child; child != NULL; child = child->next) { + if (child->key == NULL) return NULL; + if (child->type != GRPC_JSON_STRING) return NULL; + if (strcmp(child->key, "service") == 0) { + if (service_name != NULL) return NULL; // Duplicate. + if (child->value == NULL) return NULL; + service_name = child->value; + } else if (strcmp(child->key, "method") == 0) { + if (method_name != NULL) return NULL; // Duplicate. + if (child->value == NULL) return NULL; + method_name = child->value; + } + } + if (service_name == NULL) return NULL; // Required field. + char* path; + gpr_asprintf(&path, "/%s/%s", service_name, + method_name == NULL ? "*" : method_name); + return path; +} + +// Parses the method config from \a json. Adds an entry to \a entries for +// each name found, incrementing \a idx for each entry added. +static bool parse_json_method_config( + grpc_json* json, + void* (*create_value)(const grpc_json* method_config_json), + const grpc_mdstr_hash_table_vtable* vtable, + grpc_mdstr_hash_table_entry* entries, size_t *idx) { + // Construct value. + void* method_config = create_value(json); + if (method_config == NULL) return NULL; + // Construct list of paths. + bool retval = false; + gpr_strvec paths; + gpr_strvec_init(&paths); + for (grpc_json* child = json->child; child != NULL; child = child->next) { + if (child->key == NULL) continue; + if (strcmp(child->key, "name") == 0) { + if (child->type != GRPC_JSON_ARRAY) goto done; + for (grpc_json* name = child->child; name != NULL; name = name->next) { + char* path = parse_json_method_name(name); + gpr_strvec_add(&paths, path); + } + } + } + if (paths.count == 0) goto done; // No names specified. + // Add entry for each path. + for (size_t i = 0; i < paths.count; ++i) { + entries[*idx].key = grpc_mdstr_from_string(paths.strs[i]); + entries[*idx].value = vtable->copy_value(method_config); + entries[*idx].vtable = vtable; + ++*idx; + } + retval = true; +done: + vtable->destroy_value(method_config); + gpr_strvec_destroy(&paths); + return retval; +} + +grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( + const grpc_json* json, + void* (*create_value)(const grpc_json* method_config_json), + const grpc_mdstr_hash_table_vtable* vtable) { + // Traverse parsed JSON tree. + if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return NULL; + size_t num_entries = 0; + grpc_mdstr_hash_table_entry* entries = NULL; + for (grpc_json* field = json->child; field != NULL; field = field->next) { + if (field->key == NULL) return NULL; + if (strcmp(field->key, "method_config") == 0) { + if (entries != NULL) return NULL; // Duplicate. + if (field->type != GRPC_JSON_ARRAY) return NULL; + // Find number of entries. + for (grpc_json* method = field->child; method != NULL; + method = method->next) { + num_entries += count_names_in_method_config_json(method); + } + // Populate method config table entries. + entries = + gpr_malloc(num_entries * sizeof(grpc_method_config_table_entry)); + size_t idx = 0; + for (grpc_json* method = field->child; method != NULL; + method = method->next) { + if (!parse_json_method_config(method, create_value, vtable, entries, + &idx)) { + return NULL; + } + } + GPR_ASSERT(idx == num_entries); + } + } + // Instantiate method config table. + grpc_mdstr_hash_table* method_config_table = NULL; + if (entries != NULL) { + method_config_table = grpc_mdstr_hash_table_create(num_entries, entries); + // Clean up. + for (size_t i = 0; i < num_entries; ++i) { + GRPC_MDSTR_UNREF(entries[i].key); + vtable->destroy_value(entries[i].value); + } + gpr_free(entries); + } + return method_config_table; +} diff --git a/src/core/lib/transport/method_config.h b/src/core/lib/transport/method_config.h index 58fedd9436..eac05f8173 100644 --- a/src/core/lib/transport/method_config.h +++ b/src/core/lib/transport/method_config.h @@ -37,6 +37,7 @@ #include #include +#include "src/core/lib/json/json.h" #include "src/core/lib/transport/mdstr_hash_table.h" #include "src/core/lib/transport/metadata.h" @@ -133,4 +134,10 @@ grpc_mdstr_hash_table* grpc_method_config_table_convert( void* (*convert_value)(const grpc_method_config* method_config), const grpc_mdstr_hash_table_vtable* vtable); +// FIXME: document +grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( + const grpc_json* json, + void* (*create_value)(const grpc_json* method_config_json), + const grpc_mdstr_hash_table_vtable* vtable); + #endif /* GRPC_CORE_LIB_TRANSPORT_METHOD_CONFIG_H */ -- cgit v1.2.3 From 5bdcd237fc907eb4dc334e89d8ae2fa00c0f2720 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 2 Nov 2016 15:47:02 -0700 Subject: RR: Don't copy user_data is no vtable --- src/core/ext/lb_policy/round_robin/round_robin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index b0c461730b..427999aa6b 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -678,8 +678,10 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, sd->index = subchannel_idx; sd->subchannel = subchannel; sd->user_data_vtable = addresses->user_data_vtable; - sd->user_data = - sd->user_data_vtable->copy(addresses->addresses[i].user_data); + if (sd->user_data_vtable != NULL) { + sd->user_data = + sd->user_data_vtable->copy(addresses->addresses[i].user_data); + } ++subchannel_idx; grpc_closure_init(&sd->connectivity_changed_closure, rr_connectivity_changed, sd); -- cgit v1.2.3 From 107ca164b061ce01163bbfa8c7433fba52f38526 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 2 Nov 2016 18:17:03 -0700 Subject: Use the right address family --- src/core/ext/lb_policy/grpclb/grpclb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 734108a9db..30e412e358 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -402,7 +402,7 @@ static void parse_server(const grpc_grpclb_server *server, } else if (ip->size == 16) { addr->len = sizeof(struct sockaddr_in6); struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr->addr; - addr6->sin6_family = AF_INET; + addr6->sin6_family = AF_INET6; memcpy(&addr6->sin6_addr, ip->bytes, ip->size); addr6->sin6_port = netorder_port; } -- cgit v1.2.3 From 896d92568b1b615a19dec26035596de244cbf535 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 3 Nov 2016 07:58:25 -0700 Subject: Add grpc_json_tree to handle refcounting for channel arg. --- src/core/ext/client_channel/client_channel.c | 8 ++-- src/core/lib/channel/message_size_filter.c | 5 ++- src/core/lib/json/json.c | 59 +++++++++++++++++++++++++++ src/core/lib/json/json.h | 19 +++++++++ src/core/lib/transport/method_config.c | 23 +++++++++++ src/core/lib/transport/method_config.h | 2 + test/core/end2end/connection_refused_test.c | 22 +++++----- test/core/end2end/tests/cancel_after_accept.c | 23 +++++------ test/core/end2end/tests/max_message_length.c | 47 ++++++++++----------- 9 files changed, 155 insertions(+), 53 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index e569af68e9..4a1c0ae1a2 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -104,7 +104,8 @@ static void *method_config_convert_value(const grpc_json *json) { if (field->type != GRPC_JSON_TRUE && field->type != GRPC_JSON_FALSE) { return NULL; } - wait_for_ready = field->type == GRPC_JSON_TRUE; + wait_for_ready = field->type == GRPC_JSON_TRUE + ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE; } else if (strcmp(field->key, "timeout") == 0) { if (timeout.tv_sec > 0 || timeout.tv_nsec > 0) return NULL; // Duplicate. if (field->type != GRPC_JSON_OBJECT) return NULL; @@ -312,9 +313,10 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); + grpc_json_tree* json_tree = channel_arg->value.pointer.p; method_params_table = grpc_method_config_table_create_from_json( - (grpc_json *)channel_arg->value.pointer.p, - method_config_convert_value, &method_parameters_vtable); + json_tree->root, method_config_convert_value, + &method_parameters_vtable); } grpc_channel_args_destroy(chand->resolver_result); chand->resolver_result = NULL; diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 4723ab8098..86fdf72684 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -234,9 +234,10 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); + grpc_json_tree* json_tree = channel_arg->value.pointer.p; chand->method_limit_table = grpc_method_config_table_create_from_json( - (grpc_json*)channel_arg->value.pointer.p, - method_config_convert_value, &message_size_limits_vtable); + json_tree->root, method_config_convert_value, + &message_size_limits_vtable); } } diff --git a/src/core/lib/json/json.c b/src/core/lib/json/json.c index 5b583a1f2e..c1a99df6c3 100644 --- a/src/core/lib/json/json.c +++ b/src/core/lib/json/json.c @@ -34,6 +34,8 @@ #include #include +#include +#include #include "src/core/lib/json/json.h" @@ -62,3 +64,60 @@ void grpc_json_destroy(grpc_json *json) { gpr_free(json); } + +int grpc_json_cmp(const grpc_json* json1, const grpc_json* json2) { + if (json1 == NULL) { + if (json2 != NULL) return 1; + return 0; // Both NULL. + } else { + if (json2 == NULL) return -1; + } + // Compare type. + if (json1->type > json2->type) return 1; + if (json1->type < json2->type) return -1; + // Compare key. + if (json1->key == NULL) { + if (json2->key != NULL) return -1; + } else { + if (json2->key == NULL) return 1; + int retval = strcmp(json1->key, json2->key); + if (retval != 0) return retval; + } + // Compare value. + if (json1->value == NULL) { + if (json2->value != NULL) return -1; + } else { + if (json2->value == NULL) return 1; + int retval = strcmp(json1->value, json2->value); + if (retval != 0) return retval; + } + // Recursively compare the next pointer. + int retval = grpc_json_cmp(json1->next, json2->next); + if (retval != 0) return retval; + // Recursively compare the child pointer. + retval = grpc_json_cmp(json1->child, json2->child); + if (retval != 0) return retval; + // Both are the same. + return 0; +} + +grpc_json_tree* grpc_json_tree_create(const char* json_string) { + grpc_json_tree* tree = gpr_malloc(sizeof(*tree)); + tree->string = gpr_strdup(json_string); + tree->root = grpc_json_parse_string(tree->string); + gpr_ref_init(&tree->refs, 1); + return tree; +} + +grpc_json_tree* grpc_json_tree_ref(grpc_json_tree* tree) { + gpr_ref(&tree->refs); + return tree; +} + +void grpc_json_tree_unref(grpc_json_tree* tree) { + if (gpr_unref(&tree->refs)) { + grpc_json_destroy(tree->root); + gpr_free(tree->string); + gpr_free(tree); + } +} diff --git a/src/core/lib/json/json.h b/src/core/lib/json/json.h index 681df4bb77..e18ace7547 100644 --- a/src/core/lib/json/json.h +++ b/src/core/lib/json/json.h @@ -36,6 +36,8 @@ #include +#include + #include "src/core/lib/json/json_common.h" /* A tree-like structure to hold json values. The key and value pointers @@ -85,4 +87,21 @@ char *grpc_json_dump_to_string(grpc_json *json, int indent); grpc_json *grpc_json_create(grpc_json_type type); void grpc_json_destroy(grpc_json *json); +/* Compares two JSON trees. */ +int grpc_json_cmp(const grpc_json* json1, const grpc_json* json2); + +/* A wrapper that contains the string used for underlying allocation and + is refcounted. */ +typedef struct { + grpc_json* root; + char* string; + gpr_refcount refs; +} grpc_json_tree; + +/* Creates a copy of \a json_string. */ +grpc_json_tree* grpc_json_tree_create(const char* json_string); + +grpc_json_tree* grpc_json_tree_ref(grpc_json_tree* tree); +void grpc_json_tree_unref(grpc_json_tree* tree); + #endif /* GRPC_CORE_LIB_JSON_JSON_H */ diff --git a/src/core/lib/transport/method_config.c b/src/core/lib/transport/method_config.c index 23cab2b96b..c2bf88a250 100644 --- a/src/core/lib/transport/method_config.c +++ b/src/core/lib/transport/method_config.c @@ -460,3 +460,26 @@ grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( } return method_config_table; } + +static void* copy_json_tree(void* t) { return grpc_json_tree_ref(t); } + +static void destroy_json_tree(void* t) { grpc_json_tree_unref(t); } + +static int cmp_json_tree(void* t1, void* t2) { + grpc_json_tree* tree1 = t1; + grpc_json_tree* tree2 = t2; + return grpc_json_cmp(tree1->root, tree2->root); +} + +static grpc_arg_pointer_vtable service_config_arg_vtable = { + copy_json_tree, destroy_json_tree, cmp_json_tree}; + +grpc_arg grpc_service_config_create_channel_arg( + grpc_json_tree* service_config) { + grpc_arg arg; + arg.type = GRPC_ARG_POINTER; + arg.key = GRPC_ARG_SERVICE_CONFIG; + arg.value.pointer.p = service_config; + arg.value.pointer.vtable = &service_config_arg_vtable; + return arg; +} diff --git a/src/core/lib/transport/method_config.h b/src/core/lib/transport/method_config.h index eac05f8173..84c6329415 100644 --- a/src/core/lib/transport/method_config.h +++ b/src/core/lib/transport/method_config.h @@ -140,4 +140,6 @@ grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( void* (*create_value)(const grpc_json* method_config_json), const grpc_mdstr_hash_table_vtable* vtable); +grpc_arg grpc_service_config_create_channel_arg(grpc_json_tree* service_config); + #endif /* GRPC_CORE_LIB_TRANSPORT_METHOD_CONFIG_H */ diff --git a/test/core/end2end/connection_refused_test.c b/test/core/end2end/connection_refused_test.c index 13414c0378..ba9fb3d30a 100644 --- a/test/core/end2end/connection_refused_test.c +++ b/test/core/end2end/connection_refused_test.c @@ -76,18 +76,18 @@ static void run_test(bool wait_for_ready, bool use_service_config) { grpc_channel_args *args = NULL; if (use_service_config) { GPR_ASSERT(wait_for_ready); - grpc_method_config_table_entry entry = { - grpc_mdstr_from_string("/service/method"), - grpc_method_config_create(&wait_for_ready, NULL, NULL, NULL), - }; - grpc_method_config_table *method_config_table = - grpc_method_config_table_create(1, &entry); - GRPC_MDSTR_UNREF(entry.method_name); - grpc_method_config_unref(entry.method_config); - grpc_arg arg = - grpc_method_config_table_create_channel_arg(method_config_table); + grpc_json_tree* service_config_json = grpc_json_tree_create( + "{\n" + " \"method_config\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"wait_for_ready\": true\n" + " } ]\n" + "}"); + grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json); args = grpc_channel_args_copy_and_add(args, &arg, 1); - grpc_method_config_table_unref(method_config_table); + grpc_json_tree_unref(service_config_json); } /* create a call, channel to a port which will refuse connection */ diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index 104d8fd54f..68a8256092 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -132,19 +132,18 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, grpc_channel_args *args = NULL; if (use_service_config) { - gpr_timespec timeout = {5, 0, GPR_TIMESPAN}; - grpc_method_config_table_entry entry = { - grpc_mdstr_from_string("/service/method"), - grpc_method_config_create(NULL, &timeout, NULL, NULL), - }; - grpc_method_config_table *method_config_table = - grpc_method_config_table_create(1, &entry); - GRPC_MDSTR_UNREF(entry.method_name); - grpc_method_config_unref(entry.method_config); - grpc_arg arg = - grpc_method_config_table_create_channel_arg(method_config_table); + grpc_json_tree* service_config_json = grpc_json_tree_create( + "{\n" + " \"method_config\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"timeout\": { \"seconds\": 5 }\n" + " } ]\n" + "}"); + grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json); args = grpc_channel_args_copy_and_add(args, &arg, 1); - grpc_method_config_table_unref(method_config_table); + grpc_json_tree_unref(service_config_json); } grpc_end2end_test_fixture f = diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index 3a927ddcbc..f0bc7acdff 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -137,19 +137,18 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config, if (use_service_config) { // We don't currently support service configs on the server side. GPR_ASSERT(send_limit); - int32_t max_request_message_bytes = 5; - grpc_method_config_table_entry entry = { - grpc_mdstr_from_string("/service/method"), - grpc_method_config_create(NULL, NULL, &max_request_message_bytes, NULL), - }; - grpc_method_config_table *method_config_table = - grpc_method_config_table_create(1, &entry); - GRPC_MDSTR_UNREF(entry.method_name); - grpc_method_config_unref(entry.method_config); - grpc_arg arg = - grpc_method_config_table_create_channel_arg(method_config_table); + grpc_json_tree* service_config_json = grpc_json_tree_create( + "{\n" + " \"method_config\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"max_request_message_bytes\": 5\n" + " } ]\n" + "}"); + grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json); client_args = grpc_channel_args_copy_and_add(NULL, &arg, 1); - grpc_method_config_table_unref(method_config_table); + grpc_json_tree_unref(service_config_json); } else { // Set limit via channel args. grpc_arg arg; @@ -309,20 +308,18 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, if (use_service_config) { // We don't currently support service configs on the server side. GPR_ASSERT(!send_limit); - int32_t max_response_message_bytes = 5; - grpc_method_config_table_entry entry = { - grpc_mdstr_from_string("/service/method"), - grpc_method_config_create(NULL, NULL, NULL, - &max_response_message_bytes), - }; - grpc_method_config_table *method_config_table = - grpc_method_config_table_create(1, &entry); - GRPC_MDSTR_UNREF(entry.method_name); - grpc_method_config_unref(entry.method_config); - grpc_arg arg = - grpc_method_config_table_create_channel_arg(method_config_table); + grpc_json_tree* service_config_json = grpc_json_tree_create( + "{\n" + " \"method_config\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"max_response_message_bytes\": 5\n" + " } ]\n" + "}"); + grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json); client_args = grpc_channel_args_copy_and_add(NULL, &arg, 1); - grpc_method_config_table_unref(method_config_table); + grpc_json_tree_unref(service_config_json); } else { // Set limit via channel args. grpc_arg arg; -- cgit v1.2.3 From 638c38a79cf69577d2fa2ff4b546bc3ea97da860 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 3 Nov 2016 08:09:34 -0700 Subject: Remove now-unnecessary code. --- src/core/lib/transport/method_config.c | 322 +++------------------------------ src/core/lib/transport/method_config.h | 105 +---------- 2 files changed, 32 insertions(+), 395 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/transport/method_config.c b/src/core/lib/transport/method_config.c index c2bf88a250..a163af91d6 100644 --- a/src/core/lib/transport/method_config.c +++ b/src/core/lib/transport/method_config.c @@ -37,309 +37,10 @@ #include #include #include -#include #include "src/core/lib/json/json.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/mdstr_hash_table.h" -#include "src/core/lib/transport/metadata.h" - -// -// grpc_method_config -// - -// bool vtable - -static void* bool_copy(void* valuep) { - bool value = *(bool*)valuep; - bool* new_value = gpr_malloc(sizeof(bool)); - *new_value = value; - return new_value; -} - -static int bool_cmp(void* v1, void* v2) { - bool b1 = *(bool*)v1; - bool b2 = *(bool*)v2; - if (!b1 && b2) return -1; - if (b1 && !b2) return 1; - return 0; -} - -static grpc_mdstr_hash_table_vtable bool_vtable = {gpr_free, bool_copy, - bool_cmp}; - -// timespec vtable - -static void* timespec_copy(void* valuep) { - gpr_timespec value = *(gpr_timespec*)valuep; - gpr_timespec* new_value = gpr_malloc(sizeof(gpr_timespec)); - *new_value = value; - return new_value; -} - -static int timespec_cmp(void* v1, void* v2) { - return gpr_time_cmp(*(gpr_timespec*)v1, *(gpr_timespec*)v2); -} - -static grpc_mdstr_hash_table_vtable timespec_vtable = {gpr_free, timespec_copy, - timespec_cmp}; - -// int32 vtable - -static void* int32_copy(void* valuep) { - int32_t value = *(int32_t*)valuep; - int32_t* new_value = gpr_malloc(sizeof(int32_t)); - *new_value = value; - return new_value; -} - -static int int32_cmp(void* v1, void* v2) { - int32_t i1 = *(int32_t*)v1; - int32_t i2 = *(int32_t*)v2; - if (i1 < i2) return -1; - if (i1 > i2) return 1; - return 0; -} - -static grpc_mdstr_hash_table_vtable int32_vtable = {gpr_free, int32_copy, - int32_cmp}; - -// Hash table keys. -#define GRPC_METHOD_CONFIG_WAIT_FOR_READY "grpc.wait_for_ready" // bool -#define GRPC_METHOD_CONFIG_TIMEOUT "grpc.timeout" // gpr_timespec -#define GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES \ - "grpc.max_request_message_bytes" // int32 -#define GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES \ - "grpc.max_response_message_bytes" // int32 - -struct grpc_method_config { - grpc_mdstr_hash_table* table; - grpc_mdstr* wait_for_ready_key; - grpc_mdstr* timeout_key; - grpc_mdstr* max_request_message_bytes_key; - grpc_mdstr* max_response_message_bytes_key; -}; - -grpc_method_config* grpc_method_config_create( - bool* wait_for_ready, gpr_timespec* timeout, - int32_t* max_request_message_bytes, int32_t* max_response_message_bytes) { - grpc_method_config* method_config = gpr_malloc(sizeof(grpc_method_config)); - memset(method_config, 0, sizeof(grpc_method_config)); - method_config->wait_for_ready_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_WAIT_FOR_READY); - method_config->timeout_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_TIMEOUT); - method_config->max_request_message_bytes_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES); - method_config->max_response_message_bytes_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES); - grpc_mdstr_hash_table_entry entries[4]; - size_t num_entries = 0; - if (wait_for_ready != NULL) { - entries[num_entries].key = method_config->wait_for_ready_key; - entries[num_entries].value = wait_for_ready; - entries[num_entries].vtable = &bool_vtable; - ++num_entries; - } - if (timeout != NULL) { - entries[num_entries].key = method_config->timeout_key; - entries[num_entries].value = timeout; - entries[num_entries].vtable = ×pec_vtable; - ++num_entries; - } - if (max_request_message_bytes != NULL) { - entries[num_entries].key = method_config->max_request_message_bytes_key; - entries[num_entries].value = max_request_message_bytes; - entries[num_entries].vtable = &int32_vtable; - ++num_entries; - } - if (max_response_message_bytes != NULL) { - entries[num_entries].key = method_config->max_response_message_bytes_key; - entries[num_entries].value = max_response_message_bytes; - entries[num_entries].vtable = &int32_vtable; - ++num_entries; - } - method_config->table = grpc_mdstr_hash_table_create(num_entries, entries); - return method_config; -} - -grpc_method_config* grpc_method_config_ref(grpc_method_config* method_config) { - grpc_mdstr_hash_table_ref(method_config->table); - return method_config; -} - -void grpc_method_config_unref(grpc_method_config* method_config) { - if (grpc_mdstr_hash_table_unref(method_config->table)) { - GRPC_MDSTR_UNREF(method_config->wait_for_ready_key); - GRPC_MDSTR_UNREF(method_config->timeout_key); - GRPC_MDSTR_UNREF(method_config->max_request_message_bytes_key); - GRPC_MDSTR_UNREF(method_config->max_response_message_bytes_key); - gpr_free(method_config); - } -} - -int grpc_method_config_cmp(const grpc_method_config* method_config1, - const grpc_method_config* method_config2) { - return grpc_mdstr_hash_table_cmp(method_config1->table, - method_config2->table); -} - -const bool* grpc_method_config_get_wait_for_ready( - const grpc_method_config* method_config) { - return grpc_mdstr_hash_table_get(method_config->table, - method_config->wait_for_ready_key); -} - -const gpr_timespec* grpc_method_config_get_timeout( - const grpc_method_config* method_config) { - return grpc_mdstr_hash_table_get(method_config->table, - method_config->timeout_key); -} - -const int32_t* grpc_method_config_get_max_request_message_bytes( - const grpc_method_config* method_config) { - return grpc_mdstr_hash_table_get( - method_config->table, method_config->max_request_message_bytes_key); -} - -const int32_t* grpc_method_config_get_max_response_message_bytes( - const grpc_method_config* method_config) { - return grpc_mdstr_hash_table_get( - method_config->table, method_config->max_response_message_bytes_key); -} - -// -// grpc_method_config_table -// - -static void method_config_unref(void* valuep) { - grpc_method_config_unref(valuep); -} - -static void* method_config_ref(void* valuep) { - return grpc_method_config_ref(valuep); -} - -static int method_config_cmp(void* valuep1, void* valuep2) { - return grpc_method_config_cmp(valuep1, valuep2); -} - -static const grpc_mdstr_hash_table_vtable method_config_table_vtable = { - method_config_unref, method_config_ref, method_config_cmp}; - -grpc_method_config_table* grpc_method_config_table_create( - size_t num_entries, grpc_method_config_table_entry* entries) { - grpc_mdstr_hash_table_entry* hash_table_entries = - gpr_malloc(sizeof(grpc_mdstr_hash_table_entry) * num_entries); - for (size_t i = 0; i < num_entries; ++i) { - hash_table_entries[i].key = entries[i].method_name; - hash_table_entries[i].value = entries[i].method_config; - hash_table_entries[i].vtable = &method_config_table_vtable; - } - grpc_method_config_table* method_config_table = - grpc_mdstr_hash_table_create(num_entries, hash_table_entries); - gpr_free(hash_table_entries); - return method_config_table; -} - -grpc_method_config_table* grpc_method_config_table_ref( - grpc_method_config_table* table) { - return grpc_mdstr_hash_table_ref(table); -} - -void grpc_method_config_table_unref(grpc_method_config_table* table) { - grpc_mdstr_hash_table_unref(table); -} - -int grpc_method_config_table_cmp(const grpc_method_config_table* table1, - const grpc_method_config_table* table2) { - return grpc_mdstr_hash_table_cmp(table1, table2); -} - -void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, - const grpc_mdstr* path) { - void* value = grpc_mdstr_hash_table_get(table, path); - // If we didn't find a match for the path, try looking for a wildcard - // entry (i.e., change "/service/method" to "/service/*"). - if (value == NULL) { - const char* path_str = grpc_mdstr_as_c_string(path); - const char* sep = strrchr(path_str, '/') + 1; - const size_t len = (size_t)(sep - path_str); - char* buf = gpr_malloc(len + 2); // '*' and NUL - memcpy(buf, path_str, len); - buf[len] = '*'; - buf[len + 1] = '\0'; - grpc_mdstr* wildcard_path = grpc_mdstr_from_string(buf); - gpr_free(buf); - value = grpc_mdstr_hash_table_get(table, wildcard_path); - GRPC_MDSTR_UNREF(wildcard_path); - } - return value; -} - -static void* copy_arg(void* p) { return grpc_method_config_table_ref(p); } - -static void destroy_arg(void* p) { grpc_method_config_table_unref(p); } - -static int cmp_arg(void* p1, void* p2) { - return grpc_method_config_table_cmp(p1, p2); -} - -static grpc_arg_pointer_vtable arg_vtable = {copy_arg, destroy_arg, cmp_arg}; - -grpc_arg grpc_method_config_table_create_channel_arg( - grpc_method_config_table* table) { - grpc_arg arg; - arg.type = GRPC_ARG_POINTER; - arg.key = GRPC_ARG_SERVICE_CONFIG; - arg.value.pointer.p = table; - arg.value.pointer.vtable = &arg_vtable; - return arg; -} - -// State used by convert_entry() below. -typedef struct conversion_state { - void* (*convert_value)(const grpc_method_config* method_config); - const grpc_mdstr_hash_table_vtable* vtable; - size_t num_entries; - grpc_mdstr_hash_table_entry* entries; -} conversion_state; - -// A function to be passed to grpc_mdstr_hash_table_iterate() to create -// a copy of the entries. -static void convert_entry(const grpc_mdstr_hash_table_entry* entry, - void* user_data) { - conversion_state* state = user_data; - state->entries[state->num_entries].key = GRPC_MDSTR_REF(entry->key); - state->entries[state->num_entries].value = state->convert_value(entry->value); - state->entries[state->num_entries].vtable = state->vtable; - ++state->num_entries; -} - -grpc_mdstr_hash_table* grpc_method_config_table_convert( - const grpc_method_config_table* table, - void* (*convert_value)(const grpc_method_config* method_config), - const grpc_mdstr_hash_table_vtable* vtable) { - // Create an array of the entries in the table with converted values. - conversion_state state; - state.convert_value = convert_value; - state.vtable = vtable; - state.num_entries = 0; - state.entries = gpr_malloc(sizeof(grpc_mdstr_hash_table_entry) * - grpc_mdstr_hash_table_num_entries(table)); - grpc_mdstr_hash_table_iterate(table, convert_entry, &state); - // Create a new table based on the array we just constructed. - grpc_mdstr_hash_table* new_table = - grpc_mdstr_hash_table_create(state.num_entries, state.entries); - // Clean up the array. - for (size_t i = 0; i < state.num_entries; ++i) { - GRPC_MDSTR_UNREF(state.entries[i].key); - vtable->destroy_value(state.entries[i].value); - } - gpr_free(state.entries); - // Return the new table. - return new_table; -} // Returns the number of names specified in the method config \a json. static size_t count_names_in_method_config_json(grpc_json* json) { @@ -435,7 +136,7 @@ grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( } // Populate method config table entries. entries = - gpr_malloc(num_entries * sizeof(grpc_method_config_table_entry)); + gpr_malloc(num_entries * sizeof(grpc_mdstr_hash_table_entry)); size_t idx = 0; for (grpc_json* method = field->child; method != NULL; method = method->next) { @@ -461,6 +162,27 @@ grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( return method_config_table; } +void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, + const grpc_mdstr* path) { + void* value = grpc_mdstr_hash_table_get(table, path); + // If we didn't find a match for the path, try looking for a wildcard + // entry (i.e., change "/service/method" to "/service/*"). + if (value == NULL) { + const char* path_str = grpc_mdstr_as_c_string(path); + const char* sep = strrchr(path_str, '/') + 1; + const size_t len = (size_t)(sep - path_str); + char* buf = gpr_malloc(len + 2); // '*' and NUL + memcpy(buf, path_str, len); + buf[len] = '*'; + buf[len + 1] = '\0'; + grpc_mdstr* wildcard_path = grpc_mdstr_from_string(buf); + gpr_free(buf); + value = grpc_mdstr_hash_table_get(table, wildcard_path); + GRPC_MDSTR_UNREF(wildcard_path); + } + return value; +} + static void* copy_json_tree(void* t) { return grpc_json_tree_ref(t); } static void destroy_json_tree(void* t) { grpc_json_tree_unref(t); } diff --git a/src/core/lib/transport/method_config.h b/src/core/lib/transport/method_config.h index 84c6329415..f33f4279d6 100644 --- a/src/core/lib/transport/method_config.h +++ b/src/core/lib/transport/method_config.h @@ -32,114 +32,29 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_METHOD_CONFIG_H #define GRPC_CORE_LIB_TRANSPORT_METHOD_CONFIG_H -#include - -#include #include #include "src/core/lib/json/json.h" #include "src/core/lib/transport/mdstr_hash_table.h" -#include "src/core/lib/transport/metadata.h" - -/// Per-method configuration. -typedef struct grpc_method_config grpc_method_config; - -/// Creates a grpc_method_config with the specified parameters. -/// Any parameter may be NULL to indicate that the value is unset. -/// -/// \a wait_for_ready indicates whether the client should wait until the -/// request deadline for the channel to become ready, even if there is a -/// temporary failure before the deadline while attempting to connect. -/// -/// \a timeout indicates the timeout for calls. -/// -/// \a max_request_message_bytes and \a max_response_message_bytes -/// indicate the maximum sizes of the request (checked when sending) and -/// response (checked when receiving) messages. -grpc_method_config* grpc_method_config_create( - bool* wait_for_ready, gpr_timespec* timeout, - int32_t* max_request_message_bytes, int32_t* max_response_message_bytes); - -grpc_method_config* grpc_method_config_ref(grpc_method_config* method_config); -void grpc_method_config_unref(grpc_method_config* method_config); - -/// Compares two grpc_method_configs. -/// The sort order is stable but undefined. -int grpc_method_config_cmp(const grpc_method_config* method_config1, - const grpc_method_config* method_config2); - -/// These methods return NULL if the requested field is unset. -/// The caller does NOT take ownership of the result. -const bool* grpc_method_config_get_wait_for_ready( - const grpc_method_config* method_config); -const gpr_timespec* grpc_method_config_get_timeout( - const grpc_method_config* method_config); -const int32_t* grpc_method_config_get_max_request_message_bytes( - const grpc_method_config* method_config); -const int32_t* grpc_method_config_get_max_response_message_bytes( - const grpc_method_config* method_config); -/// A table of method configs. -typedef grpc_mdstr_hash_table grpc_method_config_table; - -typedef struct grpc_method_config_table_entry { - /// The name is of one of the following forms: - /// service/method -- specifies exact service and method name - /// service/* -- matches all methods for the specified service - grpc_mdstr* method_name; - grpc_method_config* method_config; -} grpc_method_config_table_entry; - -/// Takes new references to all keys and values in \a entries. -grpc_method_config_table* grpc_method_config_table_create( - size_t num_entries, grpc_method_config_table_entry* entries); - -grpc_method_config_table* grpc_method_config_table_ref( - grpc_method_config_table* table); -void grpc_method_config_table_unref(grpc_method_config_table* table); - -/// Compares two grpc_method_config_tables. -/// The sort order is stable but undefined. -int grpc_method_config_table_cmp(const grpc_method_config_table* table1, - const grpc_method_config_table* table2); +/// Creates a method config table based on the data in \a json. +/// The table's keys are request paths. The table's value type is +/// returned by \a create_value(), based on data parsed from the JSON tree. +/// \a vtable provides methods used to manage the values. +/// Returns NULL on error. +grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( + const grpc_json* json, + void* (*create_value)(const grpc_json* method_config_json), + const grpc_mdstr_hash_table_vtable* vtable); /// Gets the method config for the specified \a path, which should be of /// the form "/service/method". /// Returns NULL if the method has no config. /// Caller does NOT own a reference to the result. -/// -/// Note: This returns a void* instead of a grpc_method_config* so that -/// it can also be used for tables constructed via -/// grpc_method_config_table_convert(). void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, const grpc_mdstr* path); -/// Returns a channel arg containing \a table. -grpc_arg grpc_method_config_table_create_channel_arg( - grpc_method_config_table* table); - -/// Generates a new table from \a table whose values are converted to a -/// new form via the \a convert_value function. The new table will use -/// \a vtable for its values. -/// -/// This is generally used to convert the table's value type from -/// grpc_method_config to a simple struct containing only the parameters -/// relevant to a particular filter, thus avoiding the need for a hash -/// table lookup on the fast path. In that scenario, \a convert_value -/// will return a new instance of the struct containing the values from -/// the grpc_method_config, and \a vtable provides the methods for -/// operating on the struct type. -grpc_mdstr_hash_table* grpc_method_config_table_convert( - const grpc_method_config_table* table, - void* (*convert_value)(const grpc_method_config* method_config), - const grpc_mdstr_hash_table_vtable* vtable); - -// FIXME: document -grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( - const grpc_json* json, - void* (*create_value)(const grpc_json* method_config_json), - const grpc_mdstr_hash_table_vtable* vtable); - +/// Creates a channel arg containing \a service_config. grpc_arg grpc_service_config_create_channel_arg(grpc_json_tree* service_config); #endif /* GRPC_CORE_LIB_TRANSPORT_METHOD_CONFIG_H */ -- cgit v1.2.3 From e30baeb6a3de046ccd4d6120a2b2a2dba67aef82 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 3 Nov 2016 08:16:19 -0700 Subject: Minor cleanups. --- src/core/ext/client_channel/client_channel.c | 4 ++-- src/core/lib/channel/message_size_filter.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 4a1c0ae1a2..1f27761b65 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -94,7 +94,7 @@ static int method_parameters_cmp(void *value1, void *value2) { static const grpc_mdstr_hash_table_vtable method_parameters_vtable = { gpr_free, method_parameters_copy, method_parameters_cmp}; -static void *method_config_convert_value(const grpc_json *json) { +static void *method_parameters_create_from_json(const grpc_json *json) { wait_for_ready_value wait_for_ready = WAIT_FOR_READY_UNSET; gpr_timespec timeout = { 0, 0, GPR_TIMESPAN }; for (grpc_json* field = json->child; field != NULL; field = field->next) { @@ -315,7 +315,7 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); grpc_json_tree* json_tree = channel_arg->value.pointer.p; method_params_table = grpc_method_config_table_create_from_json( - json_tree->root, method_config_convert_value, + json_tree->root, method_parameters_create_from_json, &method_parameters_vtable); } grpc_channel_args_destroy(chand->resolver_result); diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 86fdf72684..726bc4f165 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -70,7 +70,7 @@ static int message_size_limits_cmp(void* value1, void* value2) { static const grpc_mdstr_hash_table_vtable message_size_limits_vtable = { gpr_free, message_size_limits_copy, message_size_limits_cmp}; -static void* method_config_convert_value(const grpc_json* json) { +static void* message_size_limits_create_from_json(const grpc_json* json) { int max_request_message_bytes = -1; int max_response_message_bytes = -1; for (grpc_json* field = json->child; field != NULL; field = field->next) { @@ -236,7 +236,7 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); grpc_json_tree* json_tree = channel_arg->value.pointer.p; chand->method_limit_table = grpc_method_config_table_create_from_json( - json_tree->root, method_config_convert_value, + json_tree->root, message_size_limits_create_from_json, &message_size_limits_vtable); } } -- cgit v1.2.3 From 6ad80579de9f995ec210f40447bffe986cd4cb98 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 3 Nov 2016 08:33:17 -0700 Subject: Remove more now-unnecessary code. --- src/core/ext/client_channel/client_channel.c | 12 +------- src/core/lib/channel/message_size_filter.c | 12 +------- src/core/lib/transport/mdstr_hash_table.c | 42 +--------------------------- src/core/lib/transport/mdstr_hash_table.h | 18 +----------- 4 files changed, 4 insertions(+), 80 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 1f27761b65..d53265bc9c 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -81,18 +81,8 @@ static void *method_parameters_copy(void *value) { return new_value; } -static int method_parameters_cmp(void *value1, void *value2) { - const method_parameters *v1 = value1; - const method_parameters *v2 = value2; - const int retval = gpr_time_cmp(v1->timeout, v2->timeout); - if (retval != 0) return retval; - if (v1->wait_for_ready > v2->wait_for_ready) return 1; - if (v1->wait_for_ready < v2->wait_for_ready) return -1; - return 0; -} - static const grpc_mdstr_hash_table_vtable method_parameters_vtable = { - gpr_free, method_parameters_copy, method_parameters_cmp}; + gpr_free, method_parameters_copy}; static void *method_parameters_create_from_json(const grpc_json *json) { wait_for_ready_value wait_for_ready = WAIT_FOR_READY_UNSET; diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 726bc4f165..2950eef87e 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -57,18 +57,8 @@ static void* message_size_limits_copy(void* value) { return new_value; } -static int message_size_limits_cmp(void* value1, void* value2) { - const message_size_limits* v1 = value1; - const message_size_limits* v2 = value2; - if (v1->max_send_size > v2->max_send_size) return 1; - if (v1->max_send_size < v2->max_send_size) return -1; - if (v1->max_recv_size > v2->max_recv_size) return 1; - if (v1->max_recv_size < v2->max_recv_size) return -1; - return 0; -} - static const grpc_mdstr_hash_table_vtable message_size_limits_vtable = { - gpr_free, message_size_limits_copy, message_size_limits_cmp}; + gpr_free, message_size_limits_copy}; static void* message_size_limits_create_from_json(const grpc_json* json) { int max_request_message_bytes = -1; diff --git a/src/core/lib/transport/mdstr_hash_table.c b/src/core/lib/transport/mdstr_hash_table.c index 8e914c420b..3d01e56df7 100644 --- a/src/core/lib/transport/mdstr_hash_table.c +++ b/src/core/lib/transport/mdstr_hash_table.c @@ -41,7 +41,6 @@ struct grpc_mdstr_hash_table { gpr_refcount refs; - size_t num_entries; size_t size; grpc_mdstr_hash_table_entry* entries; }; @@ -77,7 +76,6 @@ grpc_mdstr_hash_table* grpc_mdstr_hash_table_create( grpc_mdstr_hash_table* table = gpr_malloc(sizeof(*table)); memset(table, 0, sizeof(*table)); gpr_ref_init(&table->refs, 1); - table->num_entries = num_entries; // Quadratic probing gets best performance when the table is no more // than half full. table->size = num_entries * 2; @@ -96,7 +94,7 @@ grpc_mdstr_hash_table* grpc_mdstr_hash_table_ref(grpc_mdstr_hash_table* table) { return table; } -int grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table) { +void grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table) { if (table != NULL && gpr_unref(&table->refs)) { for (size_t i = 0; i < table->size; ++i) { grpc_mdstr_hash_table_entry* entry = &table->entries[i]; @@ -107,13 +105,7 @@ int grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table) { } gpr_free(table->entries); gpr_free(table); - return 1; } - return 0; -} - -size_t grpc_mdstr_hash_table_num_entries(const grpc_mdstr_hash_table* table) { - return table->num_entries; } void* grpc_mdstr_hash_table_get(const grpc_mdstr_hash_table* table, @@ -123,35 +115,3 @@ void* grpc_mdstr_hash_table_get(const grpc_mdstr_hash_table* table, if (idx == table->size) return NULL; // Not found. return table->entries[idx].value; } - -int grpc_mdstr_hash_table_cmp(const grpc_mdstr_hash_table* table1, - const grpc_mdstr_hash_table* table2) { - // Compare by num_entries. - if (table1->num_entries < table2->num_entries) return -1; - if (table1->num_entries > table2->num_entries) return 1; - for (size_t i = 0; i < table1->num_entries; ++i) { - grpc_mdstr_hash_table_entry* e1 = &table1->entries[i]; - grpc_mdstr_hash_table_entry* e2 = &table2->entries[i]; - // Compare keys by hash value. - if (e1->key->hash < e2->key->hash) return -1; - if (e1->key->hash > e2->key->hash) return 1; - // Compare by vtable (pointer equality). - if (e1->vtable < e2->vtable) return -1; - if (e1->vtable > e2->vtable) return 1; - // Compare values via vtable. - const int value_result = e1->vtable->compare_value(e1->value, e2->value); - if (value_result != 0) return value_result; - } - return 0; -} - -void grpc_mdstr_hash_table_iterate( - const grpc_mdstr_hash_table* table, - void (*func)(const grpc_mdstr_hash_table_entry* entry, void* user_data), - void* user_data) { - for (size_t i = 0; i < table->size; ++i) { - if (table->entries[i].key != NULL) { - func(&table->entries[i], user_data); - } - } -} diff --git a/src/core/lib/transport/mdstr_hash_table.h b/src/core/lib/transport/mdstr_hash_table.h index bceb4df93d..8982ec3a8d 100644 --- a/src/core/lib/transport/mdstr_hash_table.h +++ b/src/core/lib/transport/mdstr_hash_table.h @@ -51,7 +51,6 @@ typedef struct grpc_mdstr_hash_table grpc_mdstr_hash_table; typedef struct grpc_mdstr_hash_table_vtable { void (*destroy_value)(void* value); void* (*copy_value)(void* value); - int (*compare_value)(void* value1, void* value2); } grpc_mdstr_hash_table_vtable; typedef struct grpc_mdstr_hash_table_entry { @@ -67,26 +66,11 @@ grpc_mdstr_hash_table* grpc_mdstr_hash_table_create( size_t num_entries, grpc_mdstr_hash_table_entry* entries); grpc_mdstr_hash_table* grpc_mdstr_hash_table_ref(grpc_mdstr_hash_table* table); -/** Returns 1 when \a table is destroyed. */ -int grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table); - -/** Returns the number of entries in \a table. */ -size_t grpc_mdstr_hash_table_num_entries(const grpc_mdstr_hash_table* table); +void grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table); /** Returns the value from \a table associated with \a key. Returns NULL if \a key is not found. */ void* grpc_mdstr_hash_table_get(const grpc_mdstr_hash_table* table, const grpc_mdstr* key); -/** Compares two hash tables. - The sort order is stable but undefined. */ -int grpc_mdstr_hash_table_cmp(const grpc_mdstr_hash_table* table1, - const grpc_mdstr_hash_table* table2); - -/** Iterates over the entries in \a table, calling \a func for each entry. */ -void grpc_mdstr_hash_table_iterate( - const grpc_mdstr_hash_table* table, - void (*func)(const grpc_mdstr_hash_table_entry* entry, void* user_data), - void* user_data); - #endif /* GRPC_CORE_LIB_TRANSPORT_MDSTR_HASH_TABLE_H */ -- cgit v1.2.3 From 47f1084ce835d4288ddfa9f280e07d0a8d5719c5 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 3 Nov 2016 08:45:27 -0700 Subject: clang-format --- src/core/ext/client_channel/client_channel.c | 12 ++++++------ src/core/lib/json/json.c | 6 +++--- src/core/lib/json/json.h | 22 +++++++++++----------- src/core/lib/support/string.c | 4 ++-- src/core/lib/support/string.h | 2 +- src/core/lib/transport/method_config.c | 8 +++----- test/core/end2end/connection_refused_test.c | 2 +- test/core/end2end/tests/cancel_after_accept.c | 2 +- test/core/end2end/tests/max_message_length.c | 4 ++-- 9 files changed, 30 insertions(+), 32 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index d53265bc9c..4ca24c4dbc 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -86,21 +86,21 @@ static const grpc_mdstr_hash_table_vtable method_parameters_vtable = { static void *method_parameters_create_from_json(const grpc_json *json) { wait_for_ready_value wait_for_ready = WAIT_FOR_READY_UNSET; - gpr_timespec timeout = { 0, 0, GPR_TIMESPAN }; - for (grpc_json* field = json->child; field != NULL; field = field->next) { + gpr_timespec timeout = {0, 0, GPR_TIMESPAN}; + for (grpc_json *field = json->child; field != NULL; field = field->next) { if (field->key == NULL) continue; if (strcmp(field->key, "wait_for_ready") == 0) { if (wait_for_ready != WAIT_FOR_READY_UNSET) return NULL; // Duplicate. if (field->type != GRPC_JSON_TRUE && field->type != GRPC_JSON_FALSE) { return NULL; } - wait_for_ready = field->type == GRPC_JSON_TRUE - ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE; + wait_for_ready = field->type == GRPC_JSON_TRUE ? WAIT_FOR_READY_TRUE + : WAIT_FOR_READY_FALSE; } else if (strcmp(field->key, "timeout") == 0) { if (timeout.tv_sec > 0 || timeout.tv_nsec > 0) return NULL; // Duplicate. if (field->type != GRPC_JSON_OBJECT) return NULL; if (field->child == NULL) return NULL; - for (grpc_json* subfield = field->child; subfield != NULL; + for (grpc_json *subfield = field->child; subfield != NULL; subfield = subfield->next) { if (subfield->key == NULL) return NULL; if (strcmp(subfield->key, "seconds") == 0) { @@ -303,7 +303,7 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); - grpc_json_tree* json_tree = channel_arg->value.pointer.p; + grpc_json_tree *json_tree = channel_arg->value.pointer.p; method_params_table = grpc_method_config_table_create_from_json( json_tree->root, method_parameters_create_from_json, &method_parameters_vtable); diff --git a/src/core/lib/json/json.c b/src/core/lib/json/json.c index c1a99df6c3..9acf3b0438 100644 --- a/src/core/lib/json/json.c +++ b/src/core/lib/json/json.c @@ -39,15 +39,15 @@ #include "src/core/lib/json/json.h" -grpc_json *grpc_json_create(grpc_json_type type) { - grpc_json *json = gpr_malloc(sizeof(*json)); +grpc_json* grpc_json_create(grpc_json_type type) { + grpc_json* json = gpr_malloc(sizeof(*json)); memset(json, 0, sizeof(*json)); json->type = type; return json; } -void grpc_json_destroy(grpc_json *json) { +void grpc_json_destroy(grpc_json* json) { while (json->child) { grpc_json_destroy(json->child); } diff --git a/src/core/lib/json/json.h b/src/core/lib/json/json.h index e18ace7547..1663c690e5 100644 --- a/src/core/lib/json/json.h +++ b/src/core/lib/json/json.h @@ -44,14 +44,14 @@ * are not owned by it. */ typedef struct grpc_json { - struct grpc_json *next; - struct grpc_json *prev; - struct grpc_json *child; - struct grpc_json *parent; + struct grpc_json* next; + struct grpc_json* prev; + struct grpc_json* child; + struct grpc_json* parent; grpc_json_type type; - const char *key; - const char *value; + const char* key; + const char* value; } grpc_json; /* The next two functions are going to parse the input string, and @@ -67,8 +67,8 @@ typedef struct grpc_json { * * Delete the allocated tree afterward using grpc_json_destroy(). */ -grpc_json *grpc_json_parse_string_with_len(char *input, size_t size); -grpc_json *grpc_json_parse_string(char *input); +grpc_json* grpc_json_parse_string_with_len(char* input, size_t size); +grpc_json* grpc_json_parse_string(char* input); /* This function will create a new string using gpr_realloc, and will * deserialize the grpc_json tree into it. It'll be zero-terminated, @@ -78,14 +78,14 @@ grpc_json *grpc_json_parse_string(char *input); * If indent is 0, then newlines will be suppressed as well, and the * output will be condensed at its maximum. */ -char *grpc_json_dump_to_string(grpc_json *json, int indent); +char* grpc_json_dump_to_string(grpc_json* json, int indent); /* Use these to create or delete a grpc_json object. * Deletion is recursive. We will not attempt to free any of the strings * in any of the objects of that tree. */ -grpc_json *grpc_json_create(grpc_json_type type); -void grpc_json_destroy(grpc_json *json); +grpc_json* grpc_json_create(grpc_json_type type); +void grpc_json_destroy(grpc_json* json); /* Compares two JSON trees. */ int grpc_json_cmp(const grpc_json* json1, const grpc_json* json2); diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c index 56f29492bf..165b3189a5 100644 --- a/src/core/lib/support/string.c +++ b/src/core/lib/support/string.c @@ -196,8 +196,8 @@ int int64_ttoa(int64_t value, char *string) { return i; } -int gpr_parse_nonnegative_number(const char* value) { - char* end; +int gpr_parse_nonnegative_number(const char *value) { + char *end; long result = strtol(value, &end, 0); if (*end != '\0' || result < 0 || result > INT_MAX) return -1; return (int)result; diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index 3a5a8ed826..34fd154a83 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -81,7 +81,7 @@ where long is 32bit is size.*/ int int64_ttoa(int64_t value, char *output); // Parses a non-negative number from a value string. Returns -1 on error. -int gpr_parse_nonnegative_number(const char* value); +int gpr_parse_nonnegative_number(const char *value); /* Reverse a run of bytes */ void gpr_reverse_bytes(char *str, int len); diff --git a/src/core/lib/transport/method_config.c b/src/core/lib/transport/method_config.c index a163af91d6..1ce43ca13f 100644 --- a/src/core/lib/transport/method_config.c +++ b/src/core/lib/transport/method_config.c @@ -80,10 +80,9 @@ static char* parse_json_method_name(grpc_json* json) { // Parses the method config from \a json. Adds an entry to \a entries for // each name found, incrementing \a idx for each entry added. static bool parse_json_method_config( - grpc_json* json, - void* (*create_value)(const grpc_json* method_config_json), + grpc_json* json, void* (*create_value)(const grpc_json* method_config_json), const grpc_mdstr_hash_table_vtable* vtable, - grpc_mdstr_hash_table_entry* entries, size_t *idx) { + grpc_mdstr_hash_table_entry* entries, size_t* idx) { // Construct value. void* method_config = create_value(json); if (method_config == NULL) return NULL; @@ -135,8 +134,7 @@ grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( num_entries += count_names_in_method_config_json(method); } // Populate method config table entries. - entries = - gpr_malloc(num_entries * sizeof(grpc_mdstr_hash_table_entry)); + entries = gpr_malloc(num_entries * sizeof(grpc_mdstr_hash_table_entry)); size_t idx = 0; for (grpc_json* method = field->child; method != NULL; method = method->next) { diff --git a/test/core/end2end/connection_refused_test.c b/test/core/end2end/connection_refused_test.c index ba9fb3d30a..2857ca70e8 100644 --- a/test/core/end2end/connection_refused_test.c +++ b/test/core/end2end/connection_refused_test.c @@ -76,7 +76,7 @@ static void run_test(bool wait_for_ready, bool use_service_config) { grpc_channel_args *args = NULL; if (use_service_config) { GPR_ASSERT(wait_for_ready); - grpc_json_tree* service_config_json = grpc_json_tree_create( + grpc_json_tree *service_config_json = grpc_json_tree_create( "{\n" " \"method_config\": [ {\n" " \"name\": [\n" diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index 68a8256092..bef33f2a33 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -132,7 +132,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, grpc_channel_args *args = NULL; if (use_service_config) { - grpc_json_tree* service_config_json = grpc_json_tree_create( + grpc_json_tree *service_config_json = grpc_json_tree_create( "{\n" " \"method_config\": [ {\n" " \"name\": [\n" diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index f0bc7acdff..4cffff915e 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -137,7 +137,7 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config, if (use_service_config) { // We don't currently support service configs on the server side. GPR_ASSERT(send_limit); - grpc_json_tree* service_config_json = grpc_json_tree_create( + grpc_json_tree *service_config_json = grpc_json_tree_create( "{\n" " \"method_config\": [ {\n" " \"name\": [\n" @@ -308,7 +308,7 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, if (use_service_config) { // We don't currently support service configs on the server side. GPR_ASSERT(!send_limit); - grpc_json_tree* service_config_json = grpc_json_tree_create( + grpc_json_tree *service_config_json = grpc_json_tree_create( "{\n" " \"method_config\": [ {\n" " \"name\": [\n" -- cgit v1.2.3 From 4112499c2822d37efdb6c5dfb73438c8ad606247 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 3 Nov 2016 11:22:20 -0700 Subject: Minor cleanups. --- src/core/ext/client_channel/client_channel.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 4ca24c4dbc..d96ec57f04 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -249,14 +249,10 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *state_error = GRPC_ERROR_CREATE("No load balancing policy"); if (chand->resolver_result != NULL) { - grpc_lb_policy_args lb_policy_args; - lb_policy_args.args = chand->resolver_result; - lb_policy_args.client_channel_factory = chand->client_channel_factory; - // Find LB policy name. const char *lb_policy_name = NULL; const grpc_arg *channel_arg = - grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_LB_POLICY_NAME); + grpc_channel_args_find(chand->resolver_result, GRPC_ARG_LB_POLICY_NAME); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); lb_policy_name = channel_arg->value.string; @@ -265,7 +261,7 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, // assume that we should use the grpclb policy, regardless of what the // resolver actually specified. channel_arg = - grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_LB_ADDRESSES); + grpc_channel_args_find(chand->resolver_result, GRPC_ARG_LB_ADDRESSES); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); grpc_lb_addresses *addresses = channel_arg->value.pointer.p; @@ -290,7 +286,10 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, // Use pick_first if nothing was specified and we didn't select grpclb // above. if (lb_policy_name == NULL) lb_policy_name = "pick_first"; - + // Instantiate LB policy. + grpc_lb_policy_args lb_policy_args; + lb_policy_args.args = chand->resolver_result; + lb_policy_args.client_channel_factory = chand->client_channel_factory; lb_policy = grpc_lb_policy_create(exec_ctx, lb_policy_name, &lb_policy_args); if (lb_policy != NULL) { @@ -299,15 +298,17 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, state = grpc_lb_policy_check_connectivity(exec_ctx, lb_policy, &state_error); } + // Find service config. channel_arg = - grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_SERVICE_CONFIG); + grpc_channel_args_find(chand->resolver_result, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); - grpc_json_tree *json_tree = channel_arg->value.pointer.p; + grpc_json_tree *service_config_json = channel_arg->value.pointer.p; method_params_table = grpc_method_config_table_create_from_json( - json_tree->root, method_parameters_create_from_json, + service_config_json->root, method_parameters_create_from_json, &method_parameters_vtable); } + // Clean up. grpc_channel_args_destroy(chand->resolver_result); chand->resolver_result = NULL; } -- cgit v1.2.3 From f2e8a6a138d4d5988ffef3c79a7a64d586c041fc Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 3 Nov 2016 11:25:22 -0700 Subject: Add method to extract LB policy name from service config JSON. --- src/core/lib/transport/method_config.c | 16 ++++++++++++++++ src/core/lib/transport/method_config.h | 6 ++++++ 2 files changed, 22 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/transport/method_config.c b/src/core/lib/transport/method_config.c index 1ce43ca13f..49e60a47bc 100644 --- a/src/core/lib/transport/method_config.c +++ b/src/core/lib/transport/method_config.c @@ -181,6 +181,22 @@ void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, return value; } +const char* grpc_service_config_get_lb_policy_name( + grpc_json_tree* service_config) { + grpc_json* json = service_config->root; + if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return NULL; + const char* lb_policy_name = NULL; + for (grpc_json* field = json->child; field != NULL; field = field->next) { + if (field->key == NULL) return NULL; + if (strcmp(field->key, "lb_policy_name") == 0) { + if (lb_policy_name != NULL) return NULL; // Duplicate. + if (field->type != GRPC_JSON_STRING) return NULL; + lb_policy_name = field->value; + } + } + return lb_policy_name; +} + static void* copy_json_tree(void* t) { return grpc_json_tree_ref(t); } static void destroy_json_tree(void* t) { grpc_json_tree_unref(t); } diff --git a/src/core/lib/transport/method_config.h b/src/core/lib/transport/method_config.h index f33f4279d6..9922a7a657 100644 --- a/src/core/lib/transport/method_config.h +++ b/src/core/lib/transport/method_config.h @@ -54,6 +54,12 @@ grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, const grpc_mdstr* path); +/// Gets the LB policy name from \a service_config. +/// Returns NULL if no LB policy name was specified. +/// Caller does NOT take ownership. +const char* grpc_service_config_get_lb_policy_name( + grpc_json_tree* service_config); + /// Creates a channel arg containing \a service_config. grpc_arg grpc_service_config_create_channel_arg(grpc_json_tree* service_config); -- cgit v1.2.3 From ea846a08004501fa4b63dbb5bd7bb12bd1017a33 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 3 Nov 2016 11:32:54 -0700 Subject: Rename method_config.[ch] to service_config.[ch]. --- BUILD | 16 +- CMakeLists.txt | 6 +- Makefile | 8 +- binding.gyp | 2 +- build.yaml | 4 +- config.m4 | 2 +- gRPC-Core.podspec | 6 +- grpc.gemspec | 4 +- package.xml | 4 +- src/core/ext/client_channel/client_channel.c | 2 +- src/core/lib/channel/message_size_filter.c | 2 +- src/core/lib/transport/method_config.c | 221 --------------------- src/core/lib/transport/method_config.h | 66 ------ src/core/lib/transport/service_config.c | 221 +++++++++++++++++++++ src/core/lib/transport/service_config.h | 66 ++++++ src/python/grpcio/grpc_core_dependencies.py | 2 +- test/core/end2end/connection_refused_test.c | 2 +- test/core/end2end/tests/cancel_after_accept.c | 2 +- test/core/end2end/tests/max_message_length.c | 2 +- tools/doxygen/Doxyfile.core.internal | 4 +- tools/run_tests/sources_and_headers.json | 6 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 4 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 4 +- .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 4 +- .../grpc_test_util/grpc_test_util.vcxproj.filters | 4 +- .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 4 +- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 4 +- 27 files changed, 336 insertions(+), 336 deletions(-) delete mode 100644 src/core/lib/transport/method_config.c delete mode 100644 src/core/lib/transport/method_config.h create mode 100644 src/core/lib/transport/service_config.c create mode 100644 src/core/lib/transport/service_config.h (limited to 'src/core') diff --git a/BUILD b/BUILD index 97ddc56b41..d747e71dde 100644 --- a/BUILD +++ b/BUILD @@ -251,7 +251,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/method_config.h", + "src/core/lib/transport/service_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -435,7 +435,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/method_config.c", + "src/core/lib/transport/service_config.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -675,7 +675,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/method_config.h", + "src/core/lib/transport/service_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -844,7 +844,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/method_config.c", + "src/core/lib/transport/service_config.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -1054,7 +1054,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/method_config.h", + "src/core/lib/transport/service_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -1215,7 +1215,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/method_config.c", + "src/core/lib/transport/service_config.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -2072,7 +2072,7 @@ objc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/method_config.c", + "src/core/lib/transport/service_config.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -2291,7 +2291,7 @@ objc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/method_config.h", + "src/core/lib/transport/service_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b073b0d68..dec3c8a7f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -392,7 +392,7 @@ add_library(grpc src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c - src/core/lib/transport/method_config.c + src/core/lib/transport/service_config.c src/core/lib/transport/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c @@ -664,7 +664,7 @@ add_library(grpc_cronet src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c - src/core/lib/transport/method_config.c + src/core/lib/transport/service_config.c src/core/lib/transport/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c @@ -908,7 +908,7 @@ add_library(grpc_unsecure src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c - src/core/lib/transport/method_config.c + src/core/lib/transport/service_config.c src/core/lib/transport/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c diff --git a/Makefile b/Makefile index 4b713cef3b..2d4acb8757 100644 --- a/Makefile +++ b/Makefile @@ -2687,7 +2687,7 @@ LIBGRPC_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ - src/core/lib/transport/method_config.c \ + src/core/lib/transport/service_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -2977,7 +2977,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ - src/core/lib/transport/method_config.c \ + src/core/lib/transport/service_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -3258,7 +3258,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ - src/core/lib/transport/method_config.c \ + src/core/lib/transport/service_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -3468,7 +3468,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ - src/core/lib/transport/method_config.c \ + src/core/lib/transport/service_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ diff --git a/binding.gyp b/binding.gyp index 9f3b75aaf3..7f6e06b1c3 100644 --- a/binding.gyp +++ b/binding.gyp @@ -670,7 +670,7 @@ 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', - 'src/core/lib/transport/method_config.c', + 'src/core/lib/transport/service_config.c', 'src/core/lib/transport/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', diff --git a/build.yaml b/build.yaml index 56c220d4ab..c7bfc58ea4 100644 --- a/build.yaml +++ b/build.yaml @@ -255,7 +255,7 @@ filegroups: - src/core/lib/transport/mdstr_hash_table.h - src/core/lib/transport/metadata.h - src/core/lib/transport/metadata_batch.h - - src/core/lib/transport/method_config.h + - src/core/lib/transport/service_config.h - src/core/lib/transport/static_metadata.h - src/core/lib/transport/timeout_encoding.h - src/core/lib/transport/transport.h @@ -363,7 +363,7 @@ filegroups: - src/core/lib/transport/mdstr_hash_table.c - src/core/lib/transport/metadata.c - src/core/lib/transport/metadata_batch.c - - src/core/lib/transport/method_config.c + - src/core/lib/transport/service_config.c - src/core/lib/transport/static_metadata.c - src/core/lib/transport/timeout_encoding.c - src/core/lib/transport/transport.c diff --git a/config.m4 b/config.m4 index 8f26e42678..ff94bbc79a 100644 --- a/config.m4 +++ b/config.m4 @@ -186,7 +186,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ - src/core/lib/transport/method_config.c \ + src/core/lib/transport/service_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 43aedecd06..a6abebcac7 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -338,7 +338,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', - 'src/core/lib/transport/method_config.h', + 'src/core/lib/transport/service_config.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', @@ -526,7 +526,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', - 'src/core/lib/transport/method_config.c', + 'src/core/lib/transport/service_config.c', 'src/core/lib/transport/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', @@ -734,7 +734,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', - 'src/core/lib/transport/method_config.h', + 'src/core/lib/transport/service_config.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', diff --git a/grpc.gemspec b/grpc.gemspec index 615a962cdb..16f8381859 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -258,7 +258,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/mdstr_hash_table.h ) s.files += %w( src/core/lib/transport/metadata.h ) s.files += %w( src/core/lib/transport/metadata_batch.h ) - s.files += %w( src/core/lib/transport/method_config.h ) + s.files += %w( src/core/lib/transport/service_config.h ) s.files += %w( src/core/lib/transport/static_metadata.h ) s.files += %w( src/core/lib/transport/timeout_encoding.h ) s.files += %w( src/core/lib/transport/transport.h ) @@ -446,7 +446,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/mdstr_hash_table.c ) s.files += %w( src/core/lib/transport/metadata.c ) s.files += %w( src/core/lib/transport/metadata_batch.c ) - s.files += %w( src/core/lib/transport/method_config.c ) + s.files += %w( src/core/lib/transport/service_config.c ) s.files += %w( src/core/lib/transport/static_metadata.c ) s.files += %w( src/core/lib/transport/timeout_encoding.c ) s.files += %w( src/core/lib/transport/transport.c ) diff --git a/package.xml b/package.xml index a60eac6820..d402154434 100644 --- a/package.xml +++ b/package.xml @@ -265,7 +265,7 @@ - + @@ -453,7 +453,7 @@ - + diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index d96ec57f04..d9161f47cd 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -55,7 +55,7 @@ #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" -#include "src/core/lib/transport/method_config.h" +#include "src/core/lib/transport/service_config.h" #include "src/core/lib/transport/static_metadata.h" /* Client channel implementation */ diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 2950eef87e..f826c74f89 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -40,7 +40,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/support/string.h" -#include "src/core/lib/transport/method_config.h" +#include "src/core/lib/transport/service_config.h" #define DEFAULT_MAX_SEND_MESSAGE_LENGTH -1 // Unlimited. // The protobuf library will (by default) start warning at 100 megs. diff --git a/src/core/lib/transport/method_config.c b/src/core/lib/transport/method_config.c deleted file mode 100644 index 49e60a47bc..0000000000 --- a/src/core/lib/transport/method_config.c +++ /dev/null @@ -1,221 +0,0 @@ -// -// Copyright 2015, 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 "src/core/lib/transport/method_config.h" - -#include - -#include -#include -#include -#include - -#include "src/core/lib/json/json.h" -#include "src/core/lib/support/string.h" -#include "src/core/lib/transport/mdstr_hash_table.h" - -// Returns the number of names specified in the method config \a json. -static size_t count_names_in_method_config_json(grpc_json* json) { - size_t num_names = 0; - for (grpc_json* field = json->child; field != NULL; field = field->next) { - if (field->key != NULL && strcmp(field->key, "name") == 0) ++num_names; - } - return num_names; -} - -// Returns a path string for the name specified by \a json. -// Returns NULL on error. Caller takes ownership of result. -static char* parse_json_method_name(grpc_json* json) { - if (json->type != GRPC_JSON_OBJECT) return NULL; - const char* service_name = NULL; - const char* method_name = NULL; - for (grpc_json* child = json->child; child != NULL; child = child->next) { - if (child->key == NULL) return NULL; - if (child->type != GRPC_JSON_STRING) return NULL; - if (strcmp(child->key, "service") == 0) { - if (service_name != NULL) return NULL; // Duplicate. - if (child->value == NULL) return NULL; - service_name = child->value; - } else if (strcmp(child->key, "method") == 0) { - if (method_name != NULL) return NULL; // Duplicate. - if (child->value == NULL) return NULL; - method_name = child->value; - } - } - if (service_name == NULL) return NULL; // Required field. - char* path; - gpr_asprintf(&path, "/%s/%s", service_name, - method_name == NULL ? "*" : method_name); - return path; -} - -// Parses the method config from \a json. Adds an entry to \a entries for -// each name found, incrementing \a idx for each entry added. -static bool parse_json_method_config( - grpc_json* json, void* (*create_value)(const grpc_json* method_config_json), - const grpc_mdstr_hash_table_vtable* vtable, - grpc_mdstr_hash_table_entry* entries, size_t* idx) { - // Construct value. - void* method_config = create_value(json); - if (method_config == NULL) return NULL; - // Construct list of paths. - bool retval = false; - gpr_strvec paths; - gpr_strvec_init(&paths); - for (grpc_json* child = json->child; child != NULL; child = child->next) { - if (child->key == NULL) continue; - if (strcmp(child->key, "name") == 0) { - if (child->type != GRPC_JSON_ARRAY) goto done; - for (grpc_json* name = child->child; name != NULL; name = name->next) { - char* path = parse_json_method_name(name); - gpr_strvec_add(&paths, path); - } - } - } - if (paths.count == 0) goto done; // No names specified. - // Add entry for each path. - for (size_t i = 0; i < paths.count; ++i) { - entries[*idx].key = grpc_mdstr_from_string(paths.strs[i]); - entries[*idx].value = vtable->copy_value(method_config); - entries[*idx].vtable = vtable; - ++*idx; - } - retval = true; -done: - vtable->destroy_value(method_config); - gpr_strvec_destroy(&paths); - return retval; -} - -grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( - const grpc_json* json, - void* (*create_value)(const grpc_json* method_config_json), - const grpc_mdstr_hash_table_vtable* vtable) { - // Traverse parsed JSON tree. - if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return NULL; - size_t num_entries = 0; - grpc_mdstr_hash_table_entry* entries = NULL; - for (grpc_json* field = json->child; field != NULL; field = field->next) { - if (field->key == NULL) return NULL; - if (strcmp(field->key, "method_config") == 0) { - if (entries != NULL) return NULL; // Duplicate. - if (field->type != GRPC_JSON_ARRAY) return NULL; - // Find number of entries. - for (grpc_json* method = field->child; method != NULL; - method = method->next) { - num_entries += count_names_in_method_config_json(method); - } - // Populate method config table entries. - entries = gpr_malloc(num_entries * sizeof(grpc_mdstr_hash_table_entry)); - size_t idx = 0; - for (grpc_json* method = field->child; method != NULL; - method = method->next) { - if (!parse_json_method_config(method, create_value, vtable, entries, - &idx)) { - return NULL; - } - } - GPR_ASSERT(idx == num_entries); - } - } - // Instantiate method config table. - grpc_mdstr_hash_table* method_config_table = NULL; - if (entries != NULL) { - method_config_table = grpc_mdstr_hash_table_create(num_entries, entries); - // Clean up. - for (size_t i = 0; i < num_entries; ++i) { - GRPC_MDSTR_UNREF(entries[i].key); - vtable->destroy_value(entries[i].value); - } - gpr_free(entries); - } - return method_config_table; -} - -void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, - const grpc_mdstr* path) { - void* value = grpc_mdstr_hash_table_get(table, path); - // If we didn't find a match for the path, try looking for a wildcard - // entry (i.e., change "/service/method" to "/service/*"). - if (value == NULL) { - const char* path_str = grpc_mdstr_as_c_string(path); - const char* sep = strrchr(path_str, '/') + 1; - const size_t len = (size_t)(sep - path_str); - char* buf = gpr_malloc(len + 2); // '*' and NUL - memcpy(buf, path_str, len); - buf[len] = '*'; - buf[len + 1] = '\0'; - grpc_mdstr* wildcard_path = grpc_mdstr_from_string(buf); - gpr_free(buf); - value = grpc_mdstr_hash_table_get(table, wildcard_path); - GRPC_MDSTR_UNREF(wildcard_path); - } - return value; -} - -const char* grpc_service_config_get_lb_policy_name( - grpc_json_tree* service_config) { - grpc_json* json = service_config->root; - if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return NULL; - const char* lb_policy_name = NULL; - for (grpc_json* field = json->child; field != NULL; field = field->next) { - if (field->key == NULL) return NULL; - if (strcmp(field->key, "lb_policy_name") == 0) { - if (lb_policy_name != NULL) return NULL; // Duplicate. - if (field->type != GRPC_JSON_STRING) return NULL; - lb_policy_name = field->value; - } - } - return lb_policy_name; -} - -static void* copy_json_tree(void* t) { return grpc_json_tree_ref(t); } - -static void destroy_json_tree(void* t) { grpc_json_tree_unref(t); } - -static int cmp_json_tree(void* t1, void* t2) { - grpc_json_tree* tree1 = t1; - grpc_json_tree* tree2 = t2; - return grpc_json_cmp(tree1->root, tree2->root); -} - -static grpc_arg_pointer_vtable service_config_arg_vtable = { - copy_json_tree, destroy_json_tree, cmp_json_tree}; - -grpc_arg grpc_service_config_create_channel_arg( - grpc_json_tree* service_config) { - grpc_arg arg; - arg.type = GRPC_ARG_POINTER; - arg.key = GRPC_ARG_SERVICE_CONFIG; - arg.value.pointer.p = service_config; - arg.value.pointer.vtable = &service_config_arg_vtable; - return arg; -} diff --git a/src/core/lib/transport/method_config.h b/src/core/lib/transport/method_config.h deleted file mode 100644 index 9922a7a657..0000000000 --- a/src/core/lib/transport/method_config.h +++ /dev/null @@ -1,66 +0,0 @@ -// -// 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. -// - -#ifndef GRPC_CORE_LIB_TRANSPORT_METHOD_CONFIG_H -#define GRPC_CORE_LIB_TRANSPORT_METHOD_CONFIG_H - -#include - -#include "src/core/lib/json/json.h" -#include "src/core/lib/transport/mdstr_hash_table.h" - -/// Creates a method config table based on the data in \a json. -/// The table's keys are request paths. The table's value type is -/// returned by \a create_value(), based on data parsed from the JSON tree. -/// \a vtable provides methods used to manage the values. -/// Returns NULL on error. -grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( - const grpc_json* json, - void* (*create_value)(const grpc_json* method_config_json), - const grpc_mdstr_hash_table_vtable* vtable); - -/// Gets the method config for the specified \a path, which should be of -/// the form "/service/method". -/// Returns NULL if the method has no config. -/// Caller does NOT own a reference to the result. -void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, - const grpc_mdstr* path); - -/// Gets the LB policy name from \a service_config. -/// Returns NULL if no LB policy name was specified. -/// Caller does NOT take ownership. -const char* grpc_service_config_get_lb_policy_name( - grpc_json_tree* service_config); - -/// Creates a channel arg containing \a service_config. -grpc_arg grpc_service_config_create_channel_arg(grpc_json_tree* service_config); - -#endif /* GRPC_CORE_LIB_TRANSPORT_METHOD_CONFIG_H */ diff --git a/src/core/lib/transport/service_config.c b/src/core/lib/transport/service_config.c new file mode 100644 index 0000000000..2a717e7b9b --- /dev/null +++ b/src/core/lib/transport/service_config.c @@ -0,0 +1,221 @@ +// +// Copyright 2015, 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 "src/core/lib/transport/service_config.h" + +#include + +#include +#include +#include +#include + +#include "src/core/lib/json/json.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/transport/mdstr_hash_table.h" + +// Returns the number of names specified in the method config \a json. +static size_t count_names_in_method_config_json(grpc_json* json) { + size_t num_names = 0; + for (grpc_json* field = json->child; field != NULL; field = field->next) { + if (field->key != NULL && strcmp(field->key, "name") == 0) ++num_names; + } + return num_names; +} + +// Returns a path string for the name specified by \a json. +// Returns NULL on error. Caller takes ownership of result. +static char* parse_json_method_name(grpc_json* json) { + if (json->type != GRPC_JSON_OBJECT) return NULL; + const char* service_name = NULL; + const char* method_name = NULL; + for (grpc_json* child = json->child; child != NULL; child = child->next) { + if (child->key == NULL) return NULL; + if (child->type != GRPC_JSON_STRING) return NULL; + if (strcmp(child->key, "service") == 0) { + if (service_name != NULL) return NULL; // Duplicate. + if (child->value == NULL) return NULL; + service_name = child->value; + } else if (strcmp(child->key, "method") == 0) { + if (method_name != NULL) return NULL; // Duplicate. + if (child->value == NULL) return NULL; + method_name = child->value; + } + } + if (service_name == NULL) return NULL; // Required field. + char* path; + gpr_asprintf(&path, "/%s/%s", service_name, + method_name == NULL ? "*" : method_name); + return path; +} + +// Parses the method config from \a json. Adds an entry to \a entries for +// each name found, incrementing \a idx for each entry added. +static bool parse_json_method_config( + grpc_json* json, void* (*create_value)(const grpc_json* method_config_json), + const grpc_mdstr_hash_table_vtable* vtable, + grpc_mdstr_hash_table_entry* entries, size_t* idx) { + // Construct value. + void* method_config = create_value(json); + if (method_config == NULL) return NULL; + // Construct list of paths. + bool retval = false; + gpr_strvec paths; + gpr_strvec_init(&paths); + for (grpc_json* child = json->child; child != NULL; child = child->next) { + if (child->key == NULL) continue; + if (strcmp(child->key, "name") == 0) { + if (child->type != GRPC_JSON_ARRAY) goto done; + for (grpc_json* name = child->child; name != NULL; name = name->next) { + char* path = parse_json_method_name(name); + gpr_strvec_add(&paths, path); + } + } + } + if (paths.count == 0) goto done; // No names specified. + // Add entry for each path. + for (size_t i = 0; i < paths.count; ++i) { + entries[*idx].key = grpc_mdstr_from_string(paths.strs[i]); + entries[*idx].value = vtable->copy_value(method_config); + entries[*idx].vtable = vtable; + ++*idx; + } + retval = true; +done: + vtable->destroy_value(method_config); + gpr_strvec_destroy(&paths); + return retval; +} + +grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( + const grpc_json* json, + void* (*create_value)(const grpc_json* method_config_json), + const grpc_mdstr_hash_table_vtable* vtable) { + // Traverse parsed JSON tree. + if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return NULL; + size_t num_entries = 0; + grpc_mdstr_hash_table_entry* entries = NULL; + for (grpc_json* field = json->child; field != NULL; field = field->next) { + if (field->key == NULL) return NULL; + if (strcmp(field->key, "method_config") == 0) { + if (entries != NULL) return NULL; // Duplicate. + if (field->type != GRPC_JSON_ARRAY) return NULL; + // Find number of entries. + for (grpc_json* method = field->child; method != NULL; + method = method->next) { + num_entries += count_names_in_method_config_json(method); + } + // Populate method config table entries. + entries = gpr_malloc(num_entries * sizeof(grpc_mdstr_hash_table_entry)); + size_t idx = 0; + for (grpc_json* method = field->child; method != NULL; + method = method->next) { + if (!parse_json_method_config(method, create_value, vtable, entries, + &idx)) { + return NULL; + } + } + GPR_ASSERT(idx == num_entries); + } + } + // Instantiate method config table. + grpc_mdstr_hash_table* method_config_table = NULL; + if (entries != NULL) { + method_config_table = grpc_mdstr_hash_table_create(num_entries, entries); + // Clean up. + for (size_t i = 0; i < num_entries; ++i) { + GRPC_MDSTR_UNREF(entries[i].key); + vtable->destroy_value(entries[i].value); + } + gpr_free(entries); + } + return method_config_table; +} + +void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, + const grpc_mdstr* path) { + void* value = grpc_mdstr_hash_table_get(table, path); + // If we didn't find a match for the path, try looking for a wildcard + // entry (i.e., change "/service/method" to "/service/*"). + if (value == NULL) { + const char* path_str = grpc_mdstr_as_c_string(path); + const char* sep = strrchr(path_str, '/') + 1; + const size_t len = (size_t)(sep - path_str); + char* buf = gpr_malloc(len + 2); // '*' and NUL + memcpy(buf, path_str, len); + buf[len] = '*'; + buf[len + 1] = '\0'; + grpc_mdstr* wildcard_path = grpc_mdstr_from_string(buf); + gpr_free(buf); + value = grpc_mdstr_hash_table_get(table, wildcard_path); + GRPC_MDSTR_UNREF(wildcard_path); + } + return value; +} + +const char* grpc_service_config_get_lb_policy_name( + grpc_json_tree* service_config) { + grpc_json* json = service_config->root; + if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return NULL; + const char* lb_policy_name = NULL; + for (grpc_json* field = json->child; field != NULL; field = field->next) { + if (field->key == NULL) return NULL; + if (strcmp(field->key, "lb_policy_name") == 0) { + if (lb_policy_name != NULL) return NULL; // Duplicate. + if (field->type != GRPC_JSON_STRING) return NULL; + lb_policy_name = field->value; + } + } + return lb_policy_name; +} + +static void* copy_json_tree(void* t) { return grpc_json_tree_ref(t); } + +static void destroy_json_tree(void* t) { grpc_json_tree_unref(t); } + +static int cmp_json_tree(void* t1, void* t2) { + grpc_json_tree* tree1 = t1; + grpc_json_tree* tree2 = t2; + return grpc_json_cmp(tree1->root, tree2->root); +} + +static grpc_arg_pointer_vtable service_config_arg_vtable = { + copy_json_tree, destroy_json_tree, cmp_json_tree}; + +grpc_arg grpc_service_config_create_channel_arg( + grpc_json_tree* service_config) { + grpc_arg arg; + arg.type = GRPC_ARG_POINTER; + arg.key = GRPC_ARG_SERVICE_CONFIG; + arg.value.pointer.p = service_config; + arg.value.pointer.vtable = &service_config_arg_vtable; + return arg; +} diff --git a/src/core/lib/transport/service_config.h b/src/core/lib/transport/service_config.h new file mode 100644 index 0000000000..c6c8e6be7f --- /dev/null +++ b/src/core/lib/transport/service_config.h @@ -0,0 +1,66 @@ +// +// 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. +// + +#ifndef GRPC_CORE_LIB_TRANSPORT_SERVICE_CONFIG_H +#define GRPC_CORE_LIB_TRANSPORT_SERVICE_CONFIG_H + +#include + +#include "src/core/lib/json/json.h" +#include "src/core/lib/transport/mdstr_hash_table.h" + +/// Creates a method config table based on the data in \a json. +/// The table's keys are request paths. The table's value type is +/// returned by \a create_value(), based on data parsed from the JSON tree. +/// \a vtable provides methods used to manage the values. +/// Returns NULL on error. +grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( + const grpc_json* json, + void* (*create_value)(const grpc_json* method_config_json), + const grpc_mdstr_hash_table_vtable* vtable); + +/// Gets the method config for the specified \a path, which should be of +/// the form "/service/method". +/// Returns NULL if the method has no config. +/// Caller does NOT own a reference to the result. +void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, + const grpc_mdstr* path); + +/// Gets the LB policy name from \a service_config. +/// Returns NULL if no LB policy name was specified. +/// Caller does NOT take ownership. +const char* grpc_service_config_get_lb_policy_name( + grpc_json_tree* service_config); + +/// Creates a channel arg containing \a service_config. +grpc_arg grpc_service_config_create_channel_arg(grpc_json_tree* service_config); + +#endif /* GRPC_CORE_LIB_TRANSPORT_SERVICE_CONFIG_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 1ad423909f..6ec2984721 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -180,7 +180,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', - 'src/core/lib/transport/method_config.c', + 'src/core/lib/transport/service_config.c', 'src/core/lib/transport/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', diff --git a/test/core/end2end/connection_refused_test.c b/test/core/end2end/connection_refused_test.c index 2857ca70e8..2814c94e2e 100644 --- a/test/core/end2end/connection_refused_test.c +++ b/test/core/end2end/connection_refused_test.c @@ -41,7 +41,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/transport/metadata.h" -#include "src/core/lib/transport/method_config.h" +#include "src/core/lib/transport/service_config.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index bef33f2a33..a187311b79 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -44,7 +44,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/transport/metadata.h" -#include "src/core/lib/transport/method_config.h" +#include "src/core/lib/transport/service_config.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/end2end/tests/cancel_test_helpers.h" diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index 4cffff915e..05ac087c13 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -44,7 +44,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/transport/metadata.h" -#include "src/core/lib/transport/method_config.h" +#include "src/core/lib/transport/service_config.h" #include "test/core/end2end/cq_verifier.h" diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e83298766f..c886c88402 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -875,7 +875,7 @@ src/core/lib/transport/connectivity_state.h \ src/core/lib/transport/mdstr_hash_table.h \ src/core/lib/transport/metadata.h \ src/core/lib/transport/metadata_batch.h \ -src/core/lib/transport/method_config.h \ +src/core/lib/transport/service_config.h \ src/core/lib/transport/static_metadata.h \ src/core/lib/transport/timeout_encoding.h \ src/core/lib/transport/transport.h \ @@ -1063,7 +1063,7 @@ src/core/lib/transport/connectivity_state.c \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ -src/core/lib/transport/method_config.c \ +src/core/lib/transport/service_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index b6c9e0ae94..bf5a0094cc 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6604,7 +6604,7 @@ "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/method_config.h", + "src/core/lib/transport/service_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -6812,8 +6812,8 @@ "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/method_config.c", - "src/core/lib/transport/method_config.h", + "src/core/lib/transport/service_config.c", + "src/core/lib/transport/service_config.h", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index d9d0d42d67..a7aecb1c98 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -384,7 +384,7 @@ - + @@ -677,7 +677,7 @@ - + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index ab9b76073c..9574f9784a 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -310,7 +310,7 @@ src\core\lib\transport - + src\core\lib\transport @@ -974,7 +974,7 @@ src\core\lib\transport - + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 39c144d992..9d3bfa808f 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -277,7 +277,7 @@ - + @@ -528,7 +528,7 @@ - + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 0fbfc3acd3..8257c731af 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -367,7 +367,7 @@ src\core\lib\transport - + src\core\lib\transport @@ -770,7 +770,7 @@ src\core\lib\transport - + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 87e3921ff9..1d334bdeee 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -374,7 +374,7 @@ - + @@ -645,7 +645,7 @@ - + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 1e719226fa..daed8db5ae 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -313,7 +313,7 @@ src\core\lib\transport - + src\core\lib\transport @@ -887,7 +887,7 @@ src\core\lib\transport - + src\core\lib\transport -- cgit v1.2.3 From 9ec28af03aaad085902c65b7a59fca5abbedcbad Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 3 Nov 2016 12:32:39 -0700 Subject: Change value of channel arg to string form, and reparse in each place we use it. --- src/core/ext/client_channel/client_channel.c | 10 ++-- src/core/lib/channel/message_size_filter.c | 10 ++-- src/core/lib/json/json.c | 59 -------------------- src/core/lib/json/json.h | 19 ------- src/core/lib/transport/service_config.c | 78 +++++++++++++-------------- src/core/lib/transport/service_config.h | 26 +++++---- test/core/end2end/connection_refused_test.c | 9 ++-- test/core/end2end/tests/cancel_after_accept.c | 9 ++-- test/core/end2end/tests/max_message_length.c | 18 ++++--- 9 files changed, 84 insertions(+), 154 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index d9161f47cd..023bd24c19 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -302,11 +302,13 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, channel_arg = grpc_channel_args_find(chand->resolver_result, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { - GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); - grpc_json_tree *service_config_json = channel_arg->value.pointer.p; - method_params_table = grpc_method_config_table_create_from_json( - service_config_json->root, method_parameters_create_from_json, + GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); + grpc_service_config* service_config = + grpc_service_config_create(channel_arg->value.string); + method_params_table = grpc_service_config_create_method_config_table( + service_config, method_parameters_create_from_json, &method_parameters_vtable); + grpc_service_config_destroy(service_config); } // Clean up. grpc_channel_args_destroy(chand->resolver_result); diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index f826c74f89..b579fa367a 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -223,11 +223,13 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, const grpc_arg* channel_arg = grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { - GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); - grpc_json_tree* json_tree = channel_arg->value.pointer.p; - chand->method_limit_table = grpc_method_config_table_create_from_json( - json_tree->root, message_size_limits_create_from_json, + GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); + grpc_service_config* service_config = + grpc_service_config_create(channel_arg->value.string); + chand->method_limit_table = grpc_service_config_create_method_config_table( + service_config, message_size_limits_create_from_json, &message_size_limits_vtable); + grpc_service_config_destroy(service_config); } } diff --git a/src/core/lib/json/json.c b/src/core/lib/json/json.c index 9acf3b0438..48b13686d7 100644 --- a/src/core/lib/json/json.c +++ b/src/core/lib/json/json.c @@ -34,8 +34,6 @@ #include #include -#include -#include #include "src/core/lib/json/json.h" @@ -64,60 +62,3 @@ void grpc_json_destroy(grpc_json* json) { gpr_free(json); } - -int grpc_json_cmp(const grpc_json* json1, const grpc_json* json2) { - if (json1 == NULL) { - if (json2 != NULL) return 1; - return 0; // Both NULL. - } else { - if (json2 == NULL) return -1; - } - // Compare type. - if (json1->type > json2->type) return 1; - if (json1->type < json2->type) return -1; - // Compare key. - if (json1->key == NULL) { - if (json2->key != NULL) return -1; - } else { - if (json2->key == NULL) return 1; - int retval = strcmp(json1->key, json2->key); - if (retval != 0) return retval; - } - // Compare value. - if (json1->value == NULL) { - if (json2->value != NULL) return -1; - } else { - if (json2->value == NULL) return 1; - int retval = strcmp(json1->value, json2->value); - if (retval != 0) return retval; - } - // Recursively compare the next pointer. - int retval = grpc_json_cmp(json1->next, json2->next); - if (retval != 0) return retval; - // Recursively compare the child pointer. - retval = grpc_json_cmp(json1->child, json2->child); - if (retval != 0) return retval; - // Both are the same. - return 0; -} - -grpc_json_tree* grpc_json_tree_create(const char* json_string) { - grpc_json_tree* tree = gpr_malloc(sizeof(*tree)); - tree->string = gpr_strdup(json_string); - tree->root = grpc_json_parse_string(tree->string); - gpr_ref_init(&tree->refs, 1); - return tree; -} - -grpc_json_tree* grpc_json_tree_ref(grpc_json_tree* tree) { - gpr_ref(&tree->refs); - return tree; -} - -void grpc_json_tree_unref(grpc_json_tree* tree) { - if (gpr_unref(&tree->refs)) { - grpc_json_destroy(tree->root); - gpr_free(tree->string); - gpr_free(tree); - } -} diff --git a/src/core/lib/json/json.h b/src/core/lib/json/json.h index 1663c690e5..7111db0b52 100644 --- a/src/core/lib/json/json.h +++ b/src/core/lib/json/json.h @@ -36,8 +36,6 @@ #include -#include - #include "src/core/lib/json/json_common.h" /* A tree-like structure to hold json values. The key and value pointers @@ -87,21 +85,4 @@ char* grpc_json_dump_to_string(grpc_json* json, int indent); grpc_json* grpc_json_create(grpc_json_type type); void grpc_json_destroy(grpc_json* json); -/* Compares two JSON trees. */ -int grpc_json_cmp(const grpc_json* json1, const grpc_json* json2); - -/* A wrapper that contains the string used for underlying allocation and - is refcounted. */ -typedef struct { - grpc_json* root; - char* string; - gpr_refcount refs; -} grpc_json_tree; - -/* Creates a copy of \a json_string. */ -grpc_json_tree* grpc_json_tree_create(const char* json_string); - -grpc_json_tree* grpc_json_tree_ref(grpc_json_tree* tree); -void grpc_json_tree_unref(grpc_json_tree* tree); - #endif /* GRPC_CORE_LIB_JSON_JSON_H */ diff --git a/src/core/lib/transport/service_config.c b/src/core/lib/transport/service_config.c index 2a717e7b9b..a467b8c6af 100644 --- a/src/core/lib/transport/service_config.c +++ b/src/core/lib/transport/service_config.c @@ -42,6 +42,40 @@ #include "src/core/lib/support/string.h" #include "src/core/lib/transport/mdstr_hash_table.h" +struct grpc_service_config { + char* string; + grpc_json* json; +}; + +grpc_service_config* grpc_service_config_create(const char* json_string) { + grpc_service_config* service_config = gpr_malloc(sizeof(*service_config)); + service_config->string = gpr_strdup(json_string); + service_config->json = grpc_json_parse_string(service_config->string); + return service_config; +} + +void grpc_service_config_destroy(grpc_service_config* service_config) { + grpc_json_destroy(service_config->json); + gpr_free(service_config->string); + gpr_free(service_config); +} + +const char* grpc_service_config_get_lb_policy_name( + const grpc_service_config* service_config) { + const grpc_json* json = service_config->json; + if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return NULL; + const char* lb_policy_name = NULL; + for (grpc_json* field = json->child; field != NULL; field = field->next) { + if (field->key == NULL) return NULL; + if (strcmp(field->key, "lb_policy_name") == 0) { + if (lb_policy_name != NULL) return NULL; // Duplicate. + if (field->type != GRPC_JSON_STRING) return NULL; + lb_policy_name = field->value; + } + } + return lb_policy_name; +} + // Returns the number of names specified in the method config \a json. static size_t count_names_in_method_config_json(grpc_json* json) { size_t num_names = 0; @@ -115,10 +149,11 @@ done: return retval; } -grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( - const grpc_json* json, +grpc_mdstr_hash_table* grpc_service_config_create_method_config_table( + const grpc_service_config* service_config, void* (*create_value)(const grpc_json* method_config_json), const grpc_mdstr_hash_table_vtable* vtable) { + const grpc_json* json = service_config->json; // Traverse parsed JSON tree. if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return NULL; size_t num_entries = 0; @@ -180,42 +215,3 @@ void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, } return value; } - -const char* grpc_service_config_get_lb_policy_name( - grpc_json_tree* service_config) { - grpc_json* json = service_config->root; - if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return NULL; - const char* lb_policy_name = NULL; - for (grpc_json* field = json->child; field != NULL; field = field->next) { - if (field->key == NULL) return NULL; - if (strcmp(field->key, "lb_policy_name") == 0) { - if (lb_policy_name != NULL) return NULL; // Duplicate. - if (field->type != GRPC_JSON_STRING) return NULL; - lb_policy_name = field->value; - } - } - return lb_policy_name; -} - -static void* copy_json_tree(void* t) { return grpc_json_tree_ref(t); } - -static void destroy_json_tree(void* t) { grpc_json_tree_unref(t); } - -static int cmp_json_tree(void* t1, void* t2) { - grpc_json_tree* tree1 = t1; - grpc_json_tree* tree2 = t2; - return grpc_json_cmp(tree1->root, tree2->root); -} - -static grpc_arg_pointer_vtable service_config_arg_vtable = { - copy_json_tree, destroy_json_tree, cmp_json_tree}; - -grpc_arg grpc_service_config_create_channel_arg( - grpc_json_tree* service_config) { - grpc_arg arg; - arg.type = GRPC_ARG_POINTER; - arg.key = GRPC_ARG_SERVICE_CONFIG; - arg.value.pointer.p = service_config; - arg.value.pointer.vtable = &service_config_arg_vtable; - return arg; -} diff --git a/src/core/lib/transport/service_config.h b/src/core/lib/transport/service_config.h index c6c8e6be7f..bf50226f96 100644 --- a/src/core/lib/transport/service_config.h +++ b/src/core/lib/transport/service_config.h @@ -37,16 +37,29 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/transport/mdstr_hash_table.h" +typedef struct grpc_service_config grpc_service_config; + +grpc_service_config* grpc_service_config_create(const char* json_string); +void grpc_service_config_destroy(grpc_service_config* service_config); + +/// Gets the LB policy name from \a service_config. +/// Returns NULL if no LB policy name was specified. +/// Caller does NOT take ownership. +const char* grpc_service_config_get_lb_policy_name( + const grpc_service_config* service_config); + /// Creates a method config table based on the data in \a json. /// The table's keys are request paths. The table's value type is /// returned by \a create_value(), based on data parsed from the JSON tree. /// \a vtable provides methods used to manage the values. /// Returns NULL on error. -grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( - const grpc_json* json, +grpc_mdstr_hash_table* grpc_service_config_create_method_config_table( + const grpc_service_config* service_config, void* (*create_value)(const grpc_json* method_config_json), const grpc_mdstr_hash_table_vtable* vtable); +/// A helper function for looking up values in the table returned by +/// grpc_service_config_create_method_config_table(). /// Gets the method config for the specified \a path, which should be of /// the form "/service/method". /// Returns NULL if the method has no config. @@ -54,13 +67,4 @@ grpc_mdstr_hash_table* grpc_method_config_table_create_from_json( void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, const grpc_mdstr* path); -/// Gets the LB policy name from \a service_config. -/// Returns NULL if no LB policy name was specified. -/// Caller does NOT take ownership. -const char* grpc_service_config_get_lb_policy_name( - grpc_json_tree* service_config); - -/// Creates a channel arg containing \a service_config. -grpc_arg grpc_service_config_create_channel_arg(grpc_json_tree* service_config); - #endif /* GRPC_CORE_LIB_TRANSPORT_SERVICE_CONFIG_H */ diff --git a/test/core/end2end/connection_refused_test.c b/test/core/end2end/connection_refused_test.c index 2814c94e2e..c14d72f49e 100644 --- a/test/core/end2end/connection_refused_test.c +++ b/test/core/end2end/connection_refused_test.c @@ -76,7 +76,10 @@ static void run_test(bool wait_for_ready, bool use_service_config) { grpc_channel_args *args = NULL; if (use_service_config) { GPR_ASSERT(wait_for_ready); - grpc_json_tree *service_config_json = grpc_json_tree_create( + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = GRPC_ARG_SERVICE_CONFIG; + arg.value.string = "{\n" " \"method_config\": [ {\n" " \"name\": [\n" @@ -84,10 +87,8 @@ static void run_test(bool wait_for_ready, bool use_service_config) { " ],\n" " \"wait_for_ready\": true\n" " } ]\n" - "}"); - grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json); + "}"; args = grpc_channel_args_copy_and_add(args, &arg, 1); - grpc_json_tree_unref(service_config_json); } /* create a call, channel to a port which will refuse connection */ diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index a187311b79..d3155f1902 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -132,7 +132,10 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, grpc_channel_args *args = NULL; if (use_service_config) { - grpc_json_tree *service_config_json = grpc_json_tree_create( + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = GRPC_ARG_SERVICE_CONFIG; + arg.value.string = "{\n" " \"method_config\": [ {\n" " \"name\": [\n" @@ -140,10 +143,8 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, " ],\n" " \"timeout\": { \"seconds\": 5 }\n" " } ]\n" - "}"); - grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json); + "}"; args = grpc_channel_args_copy_and_add(args, &arg, 1); - grpc_json_tree_unref(service_config_json); } grpc_end2end_test_fixture f = diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index 05ac087c13..f1dbc214dd 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -137,7 +137,10 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config, if (use_service_config) { // We don't currently support service configs on the server side. GPR_ASSERT(send_limit); - grpc_json_tree *service_config_json = grpc_json_tree_create( + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = GRPC_ARG_SERVICE_CONFIG; + arg.value.string = "{\n" " \"method_config\": [ {\n" " \"name\": [\n" @@ -145,10 +148,8 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config, " ],\n" " \"max_request_message_bytes\": 5\n" " } ]\n" - "}"); - grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json); + "}"; client_args = grpc_channel_args_copy_and_add(NULL, &arg, 1); - grpc_json_tree_unref(service_config_json); } else { // Set limit via channel args. grpc_arg arg; @@ -308,7 +309,10 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, if (use_service_config) { // We don't currently support service configs on the server side. GPR_ASSERT(!send_limit); - grpc_json_tree *service_config_json = grpc_json_tree_create( + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = GRPC_ARG_SERVICE_CONFIG; + arg.value.string = "{\n" " \"method_config\": [ {\n" " \"name\": [\n" @@ -316,10 +320,8 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, " ],\n" " \"max_response_message_bytes\": 5\n" " } ]\n" - "}"); - grpc_arg arg = grpc_service_config_create_channel_arg(service_config_json); + "}"; client_args = grpc_channel_args_copy_and_add(NULL, &arg, 1); - grpc_json_tree_unref(service_config_json); } else { // Set limit via channel args. grpc_arg arg; -- cgit v1.2.3 From 4aa3687b91a9e69b414fe2a5f1a17973f897309a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 3 Nov 2016 13:23:49 -0700 Subject: Fix build problem. --- src/core/lib/transport/service_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/transport/service_config.c b/src/core/lib/transport/service_config.c index a467b8c6af..fcb5c1f761 100644 --- a/src/core/lib/transport/service_config.c +++ b/src/core/lib/transport/service_config.c @@ -119,7 +119,7 @@ static bool parse_json_method_config( grpc_mdstr_hash_table_entry* entries, size_t* idx) { // Construct value. void* method_config = create_value(json); - if (method_config == NULL) return NULL; + if (method_config == NULL) return false; // Construct list of paths. bool retval = false; gpr_strvec paths; -- cgit v1.2.3 From b121fc7c3f4e766da11b80b939d5d161a831ba84 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 3 Nov 2016 15:22:59 -0700 Subject: Support percent-encoding status messages --- include/grpc/support/slice.h | 4 +++ src/core/lib/channel/http_client_filter.c | 57 ++++++++++++++++++++++++++----- src/core/lib/channel/http_server_filter.c | 28 +++++++++++++-- src/core/lib/support/slice.c | 8 +++++ src/core/lib/surface/call.c | 5 ++- src/core/lib/transport/metadata_batch.c | 1 + test/core/end2end/tests/binary_metadata.c | 37 ++++++++++++++++++-- 7 files changed, 124 insertions(+), 16 deletions(-) (limited to 'src/core') diff --git a/include/grpc/support/slice.h b/include/grpc/support/slice.h index b31fe6c0c5..ce7737e529 100644 --- a/include/grpc/support/slice.h +++ b/include/grpc/support/slice.h @@ -121,6 +121,10 @@ GPRAPI gpr_slice gpr_empty_slice(void); GPRAPI int gpr_slice_cmp(gpr_slice a, gpr_slice b); GPRAPI int gpr_slice_str_cmp(gpr_slice a, const char *b); +/* Do two slices point at the same memory, with the same length + If a or b is inlined, actually compares data */ +GPRAPI int gpr_slice_is_equivalent(gpr_slice a, gpr_slice b); + #ifdef __cplusplus } #endif diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 1dc05fb20d..0875cc18c4 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -36,6 +36,7 @@ #include #include #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/percent_encoding.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/transport_impl.h" @@ -56,6 +57,7 @@ typedef struct call_data { grpc_linked_mdelem payload_bin; grpc_metadata_batch *recv_initial_metadata; + grpc_metadata_batch *recv_trailing_metadata; uint8_t *payload_bytes; /* Vars to read data off of send_message */ @@ -69,14 +71,16 @@ typedef struct call_data { bool send_message_blocked; /** Closure to call when finished with the hc_on_recv hook */ - grpc_closure *on_done_recv; + grpc_closure *on_done_recv_initial_metadata; + grpc_closure *on_done_recv_trailing_metadata; grpc_closure *on_complete; grpc_closure *post_send; /** Receive closures are chained: we inject this closure as the on_done_recv up-call on transport_op, and remember to call our on_done_recv member after handling it. */ - grpc_closure hc_on_recv; + grpc_closure hc_on_recv_initial_metadata; + grpc_closure hc_on_recv_trailing_metadata; grpc_closure hc_on_complete; grpc_closure got_slice; grpc_closure send_done; @@ -106,6 +110,16 @@ static grpc_mdelem *client_recv_filter(void *user_data, grpc_mdelem *md) { grpc_call_element_send_close_with_message(a->exec_ctx, a->elem, GRPC_STATUS_CANCELLED, &message); return NULL; + } else if (md->key == GRPC_MDSTR_GRPC_MESSAGE) { + gpr_slice pct_decoded_msg = + gpr_permissive_percent_decode_slice(md->value->slice); + if (gpr_slice_is_equivalent(pct_decoded_msg, md->value->slice)) { + gpr_slice_unref(pct_decoded_msg); + return md; + } else { + return grpc_mdelem_from_metadata_strings( + GRPC_MDSTR_GRPC_MESSAGE, grpc_mdstr_from_slice(pct_decoded_msg)); + } } else if (md == GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC) { return NULL; } else if (md->key == GRPC_MDSTR_CONTENT_TYPE) { @@ -129,8 +143,8 @@ static grpc_mdelem *client_recv_filter(void *user_data, grpc_mdelem *md) { return md; } -static void hc_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_error *error) { +static void hc_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, + void *user_data, grpc_error *error) { grpc_call_element *elem = user_data; call_data *calld = elem->call_data; client_recv_filter_args a; @@ -138,7 +152,21 @@ static void hc_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, a.exec_ctx = exec_ctx; grpc_metadata_batch_filter(calld->recv_initial_metadata, client_recv_filter, &a); - calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, error); + grpc_closure_run(exec_ctx, calld->on_done_recv_initial_metadata, + GRPC_ERROR_REF(error)); +} + +static void hc_on_recv_trailing_metadata(grpc_exec_ctx *exec_ctx, + void *user_data, grpc_error *error) { + grpc_call_element *elem = user_data; + call_data *calld = elem->call_data; + client_recv_filter_args a; + a.elem = elem; + a.exec_ctx = exec_ctx; + grpc_metadata_batch_filter(calld->recv_trailing_metadata, client_recv_filter, + &a); + grpc_closure_run(exec_ctx, calld->on_done_recv_trailing_metadata, + GRPC_ERROR_REF(error)); } static void hc_on_complete(grpc_exec_ctx *exec_ctx, void *user_data, @@ -281,8 +309,15 @@ static void hc_mutate_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, if (op->recv_initial_metadata != NULL) { /* substitute our callback for the higher callback */ calld->recv_initial_metadata = op->recv_initial_metadata; - calld->on_done_recv = op->recv_initial_metadata_ready; - op->recv_initial_metadata_ready = &calld->hc_on_recv; + calld->on_done_recv_initial_metadata = op->recv_initial_metadata_ready; + op->recv_initial_metadata_ready = &calld->hc_on_recv_initial_metadata; + } + + if (op->recv_trailing_metadata != NULL) { + /* substitute our callback for the higher callback */ + calld->recv_trailing_metadata = op->recv_trailing_metadata; + calld->on_done_recv_trailing_metadata = op->on_complete; + op->on_complete = &calld->hc_on_recv_trailing_metadata; } } @@ -308,11 +343,15 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { call_data *calld = elem->call_data; - calld->on_done_recv = NULL; + calld->on_done_recv_initial_metadata = NULL; + calld->on_done_recv_trailing_metadata = NULL; calld->on_complete = NULL; calld->payload_bytes = NULL; gpr_slice_buffer_init(&calld->slices); - grpc_closure_init(&calld->hc_on_recv, hc_on_recv, elem); + grpc_closure_init(&calld->hc_on_recv_initial_metadata, + hc_on_recv_initial_metadata, elem); + grpc_closure_init(&calld->hc_on_recv_trailing_metadata, + hc_on_recv_trailing_metadata, elem); grpc_closure_init(&calld->hc_on_complete, hc_on_complete, elem); grpc_closure_init(&calld->got_slice, got_slice, elem); grpc_closure_init(&calld->send_done, send_done, elem); diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index f2221fb0fb..eb335b6b5c 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -37,6 +37,7 @@ #include #include #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/percent_encoding.h" #include "src/core/lib/transport/static_metadata.h" #define EXPECTED_CONTENT_TYPE "application/grpc" @@ -86,6 +87,23 @@ typedef struct { grpc_exec_ctx *exec_ctx; } server_filter_args; +static grpc_mdelem *server_filter_outgoing_metadata(void *user_data, + grpc_mdelem *md) { + if (md->key == GRPC_MDSTR_GRPC_MESSAGE) { + gpr_slice pct_encoded_msg = gpr_percent_encode_slice( + md->value->slice, gpr_compatible_percent_encoding_unreserved_bytes); + if (gpr_slice_is_equivalent(pct_encoded_msg, md->value->slice)) { + gpr_slice_unref(pct_encoded_msg); + return md; + } else { + return grpc_mdelem_from_metadata_strings( + GRPC_MDSTR_GRPC_MESSAGE, grpc_mdstr_from_slice(pct_encoded_msg)); + } + } else { + return md; + } +} + static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { server_filter_args *a = user_data; grpc_call_element *elem = a->elem; @@ -255,7 +273,7 @@ static void hs_recv_message_ready(grpc_exec_ctx *exec_ctx, void *user_data, } } -static void hs_mutate_op(grpc_call_element *elem, +static void hs_mutate_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_transport_stream_op *op) { /* grab pointers to our data from the call element */ call_data *calld = elem->call_data; @@ -291,6 +309,12 @@ static void hs_mutate_op(grpc_call_element *elem, op->on_complete = &calld->hs_on_complete; } } + + if (op->send_trailing_metadata) { + server_filter_args a = {elem, exec_ctx}; + grpc_metadata_batch_filter(op->send_trailing_metadata, + server_filter_outgoing_metadata, &a); + } } static void hs_start_transport_op(grpc_exec_ctx *exec_ctx, @@ -298,7 +322,7 @@ static void hs_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport_stream_op *op) { GRPC_CALL_LOG_OP(GPR_INFO, elem, op); GPR_TIMER_BEGIN("hs_start_transport_op", 0); - hs_mutate_op(elem, op); + hs_mutate_op(exec_ctx, elem, op); grpc_call_next_op(exec_ctx, elem, op); GPR_TIMER_END("hs_start_transport_op", 0); } diff --git a/src/core/lib/support/slice.c b/src/core/lib/support/slice.c index 8a2c0a9086..f15a9a1e21 100644 --- a/src/core/lib/support/slice.c +++ b/src/core/lib/support/slice.c @@ -348,3 +348,11 @@ int gpr_slice_str_cmp(gpr_slice a, const char *b) { if (d != 0) return d; return memcmp(GPR_SLICE_START_PTR(a), b, b_length); } + +int gpr_slice_is_equivalent(gpr_slice a, gpr_slice b) { + if (a.refcount == NULL || b.refcount == NULL) { + return gpr_slice_cmp(a, b); + } + return a.data.refcounted.length == b.data.refcounted.length && + a.data.refcounted.bytes == b.data.refcounted.bytes; +} diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 6c25952c0a..3f4afd9a29 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -632,9 +632,6 @@ static int prepare_application_metadata(grpc_call *call, int count, if (call->send_extra_metadata_count == 0) { prepend_extra_metadata = 0; } else { - for (i = 0; i < call->send_extra_metadata_count; i++) { - GRPC_MDELEM_REF(call->send_extra_metadata[i].md); - } for (i = 1; i < call->send_extra_metadata_count; i++) { call->send_extra_metadata[i].prev = &call->send_extra_metadata[i - 1]; } @@ -680,6 +677,7 @@ static int prepare_application_metadata(grpc_call *call, int count, &call->send_extra_metadata[call->send_extra_metadata_count - 1]; batch->list.head->prev = NULL; batch->list.tail->next = NULL; + call->send_extra_metadata_count = 0; break; case 3: { /* prepend AND md */ @@ -695,6 +693,7 @@ static int prepare_application_metadata(grpc_call *call, int count, batch->list.tail = linked_from_md(last_md); batch->list.head->prev = NULL; batch->list.tail->next = NULL; + call->send_extra_metadata_count = 0; break; } default: diff --git a/src/core/lib/transport/metadata_batch.c b/src/core/lib/transport/metadata_batch.c index 84b5a74d51..f2d4595d3a 100644 --- a/src/core/lib/transport/metadata_batch.c +++ b/src/core/lib/transport/metadata_batch.c @@ -154,6 +154,7 @@ void grpc_metadata_batch_filter(grpc_metadata_batch *batch, grpc_mdelem *orig = l->md; grpc_mdelem *filt = filter(user_data, orig); next = l->next; + gpr_log(GPR_DEBUG, "FILT: %p %p->%p", l, orig, filt); if (filt == NULL) { if (l->prev) { l->prev->next = l->next; diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c index 73b0f17c24..b94bb84e54 100644 --- a/test/core/end2end/tests/binary_metadata.c +++ b/test/core/end2end/tests/binary_metadata.c @@ -234,7 +234,22 @@ static void test_request_response_with_metadata_and_payload( op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; op->data.send_status_from_server.trailing_metadata_count = 0; op->data.send_status_from_server.status = GRPC_STATUS_OK; - op->data.send_status_from_server.status_details = "xyz"; + op->data.send_status_from_server.status_details = + "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12" + "\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24" + "\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36" + "\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40\x41\x42\x43\x44\x45\x46\x47\x48" + "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a" + "\x5b\x5c\x5d\x5e\x5f\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c" + "\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e" + "\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90" + "\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2" + "\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4" + "\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6" + "\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8" + "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea" + "\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc" + "\xfd\xfe\xff"; op->flags = 0; op->reserved = NULL; op++; @@ -246,7 +261,25 @@ static void test_request_response_with_metadata_and_payload( cq_verify(cqv); GPR_ASSERT(status == GRPC_STATUS_OK); - GPR_ASSERT(0 == strcmp(details, "xyz")); + GPR_ASSERT( + 0 == + strcmp(details, + "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10" + "\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20" + "\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30" + "\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40" + "\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50" + "\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60" + "\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70" + "\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80" + "\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90" + "\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0" + "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0" + "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0" + "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0" + "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0" + "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0" + "\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff")); GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr")); GPR_ASSERT(was_cancelled == 0); -- cgit v1.2.3 From 4253c1e9ecffb218a4c79b08c497c57a0ad3e998 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 3 Nov 2016 15:20:45 -0700 Subject: Say what we mean --- src/core/lib/iomgr/network_status_tracker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/network_status_tracker.c b/src/core/lib/iomgr/network_status_tracker.c index b4bb7e3cf7..a5ca9ed2c3 100644 --- a/src/core/lib/iomgr/network_status_tracker.c +++ b/src/core/lib/iomgr/network_status_tracker.c @@ -46,7 +46,7 @@ static gpr_mu g_endpoint_mutex; void grpc_network_status_shutdown(void) { if (head != NULL) { gpr_log(GPR_ERROR, - "Memory leaked as all network endpoints were not shut down"); + "Memory leaked as not all network endpoints were shut down"); } gpr_mu_destroy(&g_endpoint_mutex); } -- cgit v1.2.3 From 31c5ee230369b758978c5e4e87911d759a7f9184 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 08:05:59 -0700 Subject: Remove errant init --- src/core/lib/channel/http_server_filter.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 8340b5cd0f..04670ff233 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -162,7 +162,6 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { /* Retrieve the payload from the value of the 'grpc-internal-payload-bin' header field */ calld->seen_payload_bin = 1; - gpr_slice_buffer_init(&calld->read_slice_buffer); gpr_slice_buffer_add(&calld->read_slice_buffer, gpr_slice_ref(md->value->slice)); grpc_slice_buffer_stream_init(&calld->read_stream, -- cgit v1.2.3 From b044445174f0afd04c44b86813b49a222d6e25d0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 08:24:34 -0700 Subject: Remove spam --- src/core/lib/transport/metadata_batch.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/transport/metadata_batch.c b/src/core/lib/transport/metadata_batch.c index f2d4595d3a..84b5a74d51 100644 --- a/src/core/lib/transport/metadata_batch.c +++ b/src/core/lib/transport/metadata_batch.c @@ -154,7 +154,6 @@ void grpc_metadata_batch_filter(grpc_metadata_batch *batch, grpc_mdelem *orig = l->md; grpc_mdelem *filt = filter(user_data, orig); next = l->next; - gpr_log(GPR_DEBUG, "FILT: %p %p->%p", l, orig, filt); if (filt == NULL) { if (l->prev) { l->prev->next = l->next; -- cgit v1.2.3 From f79ce7d2016ecdd8e7b063de4a8fa9914e7148e6 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 4 Nov 2016 08:43:36 -0700 Subject: Code review changes. --- include/grpc/grpc.h | 7 +++++-- src/core/ext/client_channel/client_channel.c | 13 ++++++++----- src/core/lib/channel/channel_stack.c | 2 +- src/core/lib/channel/channel_stack.h | 4 ++-- src/core/lib/channel/connected_channel.c | 2 +- src/core/lib/surface/channel.c | 2 +- src/core/lib/surface/lame_client.c | 2 +- test/core/client_channel/lb_policies_test.c | 5 +++++ 8 files changed, 24 insertions(+), 13 deletions(-) (limited to 'src/core') diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 9dfcca9766..a228683d41 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -237,9 +237,12 @@ GRPCAPI struct census_context *grpc_census_call_get_context(grpc_call *call); created for. */ GRPCAPI char *grpc_channel_get_target(grpc_channel *channel); -/** Request info about the channel. */ +/** Request info about the channel. + \a channel_info indicates what information is being requested and + how that information will be returned. + \a channel_info is owned by the caller. */ GRPCAPI void grpc_channel_get_info(grpc_channel *channel, - grpc_channel_info *channel_info); + const grpc_channel_info *channel_info); /** Create a client channel to 'target'. Additional channel level configuration MAY be provided by grpc_channel_args, though the expectation is that most diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 3b89f938c2..1bed965ed1 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -243,7 +243,7 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_LB_POLICY_NAME); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); - lb_policy_name = gpr_strdup(channel_arg->value.string); + lb_policy_name = channel_arg->value.string; } // Special case: If all of the addresses are balancer addresses, // assume that we should use the grpclb policy, regardless of what the @@ -267,14 +267,13 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, "addresses, no backend addresses -- forcing use of grpclb LB " "policy", lb_policy_name); - gpr_free(lb_policy_name); } - lb_policy_name = gpr_strdup("grpclb"); + lb_policy_name = "grpclb"; } } // Use pick_first if nothing was specified and we didn't select grpclb // above. - if (lb_policy_name == NULL) lb_policy_name = gpr_strdup("pick_first"); + if (lb_policy_name == NULL) lb_policy_name = "pick_first"; lb_policy = grpc_lb_policy_create(exec_ctx, lb_policy_name, &lb_policy_args); @@ -292,6 +291,10 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, (grpc_method_config_table *)channel_arg->value.pointer.p, method_config_convert_value, &method_parameters_vtable); } + // Before we clean up, save a copy of lb_policy_name, since it might + // be pointing to data inside chand->resolver_result. + // The copy will be saved in chand->lb_policy_name below. + lb_policy_name = gpr_strdup(lb_policy_name); grpc_channel_args_destroy(chand->resolver_result); chand->resolver_result = NULL; } @@ -435,7 +438,7 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, static void cc_get_channel_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *info) { + const grpc_channel_info *info) { channel_data *chand = elem->channel_data; gpr_mu_lock(&chand->mu); if (info->lb_policy_name != NULL) { diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 3370f0ef45..c6c90d8c16 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -257,7 +257,7 @@ char *grpc_call_next_get_peer(grpc_exec_ctx *exec_ctx, void grpc_channel_next_get_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *channel_info) { + const grpc_channel_info *channel_info) { grpc_channel_element *next_elem = elem + 1; return next_elem->filter->get_channel_info(exec_ctx, next_elem, channel_info); } diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 6fbcd87064..9b9ded0aee 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -158,7 +158,7 @@ typedef struct { /* Implement grpc_channel_get_info() */ void (*get_channel_info)(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *channel_info); + const grpc_channel_info *channel_info); /* The name of this filter */ const char *name; @@ -280,7 +280,7 @@ char *grpc_call_next_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); /* Pass through a request to get_channel_info() to the next child element */ void grpc_channel_next_get_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *channel_info); + const grpc_channel_info *channel_info); /* Given the top element of a channel stack, get the channel stack itself */ grpc_channel_stack *grpc_channel_stack_from_top_element( diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 6ae2b3b6b7..bb6986438e 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -137,7 +137,7 @@ static char *con_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { /* No-op. */ static void con_get_channel_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *channel_info) {} + const grpc_channel_info *channel_info) {} static const grpc_channel_filter connected_channel_filter = { con_start_transport_stream_op, diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 22bf85b126..1389df6886 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -176,7 +176,7 @@ char *grpc_channel_get_target(grpc_channel *channel) { } void grpc_channel_get_info(grpc_channel *channel, - grpc_channel_info *channel_info) { + const grpc_channel_info *channel_info) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_channel_element *elem = grpc_channel_stack_element(CHANNEL_STACK_FROM_CHANNEL(channel), 0); diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index 6fd1dd921c..d0df8e7e17 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -90,7 +90,7 @@ static char *lame_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { static void lame_get_channel_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *channel_info) {} + const grpc_channel_info *channel_info) {} static void lame_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, diff --git a/test/core/client_channel/lb_policies_test.c b/test/core/client_channel/lb_policies_test.c index 857ba6bd52..7c639cbeb9 100644 --- a/test/core/client_channel/lb_policies_test.c +++ b/test/core/client_channel/lb_policies_test.c @@ -643,6 +643,7 @@ static void test_get_channel_info() { "test:127.0.0.1:1234?lb_policy=round_robin", NULL, NULL); // Ensures that resolver returns. grpc_channel_check_connectivity_state(channel, true /* try_to_connect */); + // Use grpc_channel_get_info() to get LB policy name. char *lb_policy_name = NULL; grpc_channel_info channel_info; channel_info.lb_policy_name = &lb_policy_name; @@ -650,6 +651,10 @@ static void test_get_channel_info() { GPR_ASSERT(lb_policy_name != NULL); GPR_ASSERT(strcmp(lb_policy_name, "round_robin") == 0); gpr_free(lb_policy_name); + // Try again without requesting anything. This is a no-op. + channel_info.lb_policy_name = NULL; + grpc_channel_get_info(channel, &channel_info); + // Clean up. grpc_channel_destroy(channel); } -- cgit v1.2.3 From bdc58b23566c91b6a911c7daaf122c74e8356cd7 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 4 Nov 2016 09:25:57 -0700 Subject: Code review changes. --- src/core/ext/client_channel/client_channel.c | 10 +++-- src/core/lib/channel/message_size_filter.c | 11 ++++-- src/core/lib/transport/service_config.c | 58 ++++++++++++++++++++++------ src/core/lib/transport/service_config.h | 2 +- 4 files changed, 60 insertions(+), 21 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 023bd24c19..e97587b0bd 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -305,10 +305,12 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); grpc_service_config* service_config = grpc_service_config_create(channel_arg->value.string); - method_params_table = grpc_service_config_create_method_config_table( - service_config, method_parameters_create_from_json, - &method_parameters_vtable); - grpc_service_config_destroy(service_config); + if (service_config != NULL) { + method_params_table = grpc_service_config_create_method_config_table( + service_config, method_parameters_create_from_json, + &method_parameters_vtable); + grpc_service_config_destroy(service_config); + } } // Clean up. grpc_channel_args_destroy(chand->resolver_result); diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index b579fa367a..c1b8deed5d 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -226,10 +226,13 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); grpc_service_config* service_config = grpc_service_config_create(channel_arg->value.string); - chand->method_limit_table = grpc_service_config_create_method_config_table( - service_config, message_size_limits_create_from_json, - &message_size_limits_vtable); - grpc_service_config_destroy(service_config); + if (service_config != NULL) { + chand->method_limit_table = + grpc_service_config_create_method_config_table( + service_config, message_size_limits_create_from_json, + &message_size_limits_vtable); + grpc_service_config_destroy(service_config); + } } } diff --git a/src/core/lib/transport/service_config.c b/src/core/lib/transport/service_config.c index fcb5c1f761..a8494cbe8b 100644 --- a/src/core/lib/transport/service_config.c +++ b/src/core/lib/transport/service_config.c @@ -42,27 +42,60 @@ #include "src/core/lib/support/string.h" #include "src/core/lib/transport/mdstr_hash_table.h" +// The main purpose of the code here is to parse the service config in +// JSON form, which will look like this: +// +// { +// "lb_policy_name": "string", // optional +// "method_config": [ // array of one or more method_config objects +// { +// "name": [ // array of one or more name objects +// { +// "service": "string", // required +// "method": "string", // optional +// } +// ], +// // remaining fields are optional +// "wait_for_ready": bool, +// "timeout": { +// // one or both of these fields may be specified +// "seconds": number, +// "nanos": number, +// }, +// "max_request_message_bytes": number, +// "max_response_message_bytes": number +// } +// ] +// } + struct grpc_service_config { - char* string; - grpc_json* json; + char* json_string; // Underlying storage for json_tree. + grpc_json* json_tree; }; grpc_service_config* grpc_service_config_create(const char* json_string) { grpc_service_config* service_config = gpr_malloc(sizeof(*service_config)); - service_config->string = gpr_strdup(json_string); - service_config->json = grpc_json_parse_string(service_config->string); + service_config->json_string = gpr_strdup(json_string); + service_config->json_tree = + grpc_json_parse_string(service_config->json_string); + if (service_config->json_tree == NULL) { + gpr_log(GPR_INFO, "failed to parse JSON for service config"); + gpr_free(service_config->json_string); + gpr_free(service_config); + return NULL; + } return service_config; } void grpc_service_config_destroy(grpc_service_config* service_config) { - grpc_json_destroy(service_config->json); - gpr_free(service_config->string); + grpc_json_destroy(service_config->json_tree); + gpr_free(service_config->json_string); gpr_free(service_config); } const char* grpc_service_config_get_lb_policy_name( const grpc_service_config* service_config) { - const grpc_json* json = service_config->json; + const grpc_json* json = service_config->json_tree; if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return NULL; const char* lb_policy_name = NULL; for (grpc_json* field = json->child; field != NULL; field = field->next) { @@ -85,7 +118,7 @@ static size_t count_names_in_method_config_json(grpc_json* json) { return num_names; } -// Returns a path string for the name specified by \a json. +// Returns a path string for the JSON name object specified by \a json. // Returns NULL on error. Caller takes ownership of result. static char* parse_json_method_name(grpc_json* json) { if (json->type != GRPC_JSON_OBJECT) return NULL; @@ -113,6 +146,7 @@ static char* parse_json_method_name(grpc_json* json) { // Parses the method config from \a json. Adds an entry to \a entries for // each name found, incrementing \a idx for each entry added. +// Returns false on error. static bool parse_json_method_config( grpc_json* json, void* (*create_value)(const grpc_json* method_config_json), const grpc_mdstr_hash_table_vtable* vtable, @@ -121,7 +155,7 @@ static bool parse_json_method_config( void* method_config = create_value(json); if (method_config == NULL) return false; // Construct list of paths. - bool retval = false; + bool success = false; gpr_strvec paths; gpr_strvec_init(&paths); for (grpc_json* child = json->child; child != NULL; child = child->next) { @@ -142,18 +176,18 @@ static bool parse_json_method_config( entries[*idx].vtable = vtable; ++*idx; } - retval = true; + success = true; done: vtable->destroy_value(method_config); gpr_strvec_destroy(&paths); - return retval; + return success; } grpc_mdstr_hash_table* grpc_service_config_create_method_config_table( const grpc_service_config* service_config, void* (*create_value)(const grpc_json* method_config_json), const grpc_mdstr_hash_table_vtable* vtable) { - const grpc_json* json = service_config->json; + const grpc_json* json = service_config->json_tree; // Traverse parsed JSON tree. if (json->type != GRPC_JSON_OBJECT || json->key != NULL) return NULL; size_t num_entries = 0; diff --git a/src/core/lib/transport/service_config.h b/src/core/lib/transport/service_config.h index bf50226f96..2ffe475193 100644 --- a/src/core/lib/transport/service_config.h +++ b/src/core/lib/transport/service_config.h @@ -59,7 +59,7 @@ grpc_mdstr_hash_table* grpc_service_config_create_method_config_table( const grpc_mdstr_hash_table_vtable* vtable); /// A helper function for looking up values in the table returned by -/// grpc_service_config_create_method_config_table(). +/// \a grpc_service_config_create_method_config_table(). /// Gets the method config for the specified \a path, which should be of /// the form "/service/method". /// Returns NULL if the method has no config. -- cgit v1.2.3 From 70a1abdb45d74ce46480d74d58a8b01887f96cac Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 4 Nov 2016 09:26:37 -0700 Subject: clang-format --- src/core/ext/client_channel/client_channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index e97587b0bd..2675063f86 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -303,7 +303,7 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_channel_args_find(chand->resolver_result, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); - grpc_service_config* service_config = + grpc_service_config *service_config = grpc_service_config_create(channel_arg->value.string); if (service_config != NULL) { method_params_table = grpc_service_config_create_method_config_table( -- cgit v1.2.3 From 268557790603150f3519b451b089b98d281d9b80 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 10:54:20 -0700 Subject: Fix memory leak --- src/core/lib/support/slice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/support/slice.c b/src/core/lib/support/slice.c index f15a9a1e21..2959a6716f 100644 --- a/src/core/lib/support/slice.c +++ b/src/core/lib/support/slice.c @@ -351,7 +351,7 @@ int gpr_slice_str_cmp(gpr_slice a, const char *b) { int gpr_slice_is_equivalent(gpr_slice a, gpr_slice b) { if (a.refcount == NULL || b.refcount == NULL) { - return gpr_slice_cmp(a, b); + return gpr_slice_cmp(a, b) == 0; } return a.data.refcounted.length == b.data.refcounted.length && a.data.refcounted.bytes == b.data.refcounted.bytes; -- cgit v1.2.3 From f81a5dca3dabd20be446f92642b1ae80ac0363e4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 11:33:26 -0700 Subject: Release target once pinged --- src/core/ext/lb_policy/round_robin/round_robin.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 427999aa6b..0fd3abe099 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -609,6 +609,7 @@ static void rr_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_subchannel_get_connected_subchannel(selected->subchannel), "picked"); grpc_connected_subchannel_ping(exec_ctx, target, closure); + GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, target, "picked"); } else { gpr_mu_unlock(&p->mu); grpc_exec_ctx_sched(exec_ctx, closure, -- cgit v1.2.3 From 78afd778009a2af0fcc6c05b5739e5bc457c9d6f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 4 Nov 2016 12:49:49 -0700 Subject: clang-format --- src/core/ext/client_channel/client_channel.c | 5 +++-- src/core/lib/security/transport/client_auth_filter.c | 17 +++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 1bed965ed1..1cce3bc329 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -124,7 +124,7 @@ typedef struct client_channel_channel_data { /** mutex protecting all variables below in this data structure */ gpr_mu mu; /** currently active load balancer */ - char* lb_policy_name; + char *lb_policy_name; grpc_lb_policy *lb_policy; /** maps method names to method_parameters structs */ grpc_mdstr_hash_table *method_params_table; @@ -443,7 +443,8 @@ static void cc_get_channel_info(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&chand->mu); if (info->lb_policy_name != NULL) { *info->lb_policy_name = chand->lb_policy_name == NULL - ? NULL : gpr_strdup(chand->lb_policy_name); + ? NULL + : gpr_strdup(chand->lb_policy_name); } gpr_mu_unlock(&chand->mu); } diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index 3a96af2c69..d075ed037b 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -341,15 +341,8 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, GRPC_AUTH_CONTEXT_UNREF(chand->auth_context, "client_auth_filter"); } -const grpc_channel_filter grpc_client_auth_filter = {auth_start_transport_op, - grpc_channel_next_op, - sizeof(call_data), - init_call_elem, - set_pollset_or_pollset_set, - destroy_call_elem, - sizeof(channel_data), - init_channel_elem, - destroy_channel_elem, - grpc_call_next_get_peer, - grpc_channel_next_get_info, - "client-auth"}; +const grpc_channel_filter grpc_client_auth_filter = { + auth_start_transport_op, grpc_channel_next_op, sizeof(call_data), + init_call_elem, set_pollset_or_pollset_set, destroy_call_elem, + sizeof(channel_data), init_channel_elem, destroy_channel_elem, + grpc_call_next_get_peer, grpc_channel_next_get_info, "client-auth"}; -- cgit v1.2.3 From 57b7760facc595d0bfe073b8765d5e0520433d8f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 13:48:49 -0700 Subject: Fix spelling --- src/core/lib/transport/pid_controller.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/transport/pid_controller.h b/src/core/lib/transport/pid_controller.h index ecb9deedaa..059b5b0834 100644 --- a/src/core/lib/transport/pid_controller.h +++ b/src/core/lib/transport/pid_controller.h @@ -35,7 +35,7 @@ #define GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H /* \file Simple PID controller. - Implements a proportial-integral-derivative controller. + Implements a proportional-integral-derivative controller. Used when we want to iteratively control a variable to converge some other observed value to a 'set-point'. Gains can be set to adjust sensitivity to current error (p), the integral -- cgit v1.2.3 From a947f1c32ed756dcd4f0460130ad8450e216e0aa Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 13:53:17 -0700 Subject: Make resource_quota a real object --- src/core/lib/iomgr/resource_quota.c | 197 ++++++++++++++++++-------- src/core/lib/iomgr/resource_quota.h | 88 +----------- src/core/lib/iomgr/tcp_posix.c | 37 ++--- test/core/iomgr/resource_quota_test.c | 253 ++++++++++++++-------------------- test/core/util/mock_endpoint.c | 33 +---- test/core/util/passthru_endpoint.c | 18 +-- 6 files changed, 266 insertions(+), 360 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 8a06443d58..1770d72268 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -44,6 +44,81 @@ int grpc_resource_quota_trace = 0; +/* Internal linked list pointers for a resource user */ +typedef struct { + grpc_resource_user *next; + grpc_resource_user *prev; +} grpc_resource_user_link; + +/* Resource users are kept in (potentially) several intrusive linked lists + at once. These are the list names. */ +typedef enum { + /* Resource users that are waiting for an allocation */ + GRPC_RULIST_AWAITING_ALLOCATION, + /* Resource users that have free memory available for internal reclamation */ + GRPC_RULIST_NON_EMPTY_FREE_POOL, + /* Resource users that have published a benign reclamation is available */ + GRPC_RULIST_RECLAIMER_BENIGN, + /* Resource users that have published a destructive reclamation is + available */ + GRPC_RULIST_RECLAIMER_DESTRUCTIVE, + /* Number of lists: must be last */ + GRPC_RULIST_COUNT +} grpc_rulist; + +struct grpc_resource_user { + /* The quota this resource user consumes from */ + grpc_resource_quota *resource_quota; + + /* Closure to schedule an allocation under the resource quota combiner lock */ + grpc_closure allocate_closure; + /* Closure to publish a non empty free pool under the resource quota combiner + lock */ + grpc_closure add_to_free_pool_closure; + + /* one ref for each ref call (released by grpc_resource_user_unref), and one + ref for each byte allocated (released by grpc_resource_user_free) */ + gpr_atm refs; + /* is this resource user unlocked? starts at 0, increases for each shutdown + call */ + gpr_atm shutdown; + + gpr_mu mu; + /* The amount of memory (in bytes) this user has cached for its own use: to + avoid quota contention, each resource user can keep some memory in + addition to what it is immediately using (e.g., for caching), and the quota + can pull it back under memory pressure. + This value can become negative if more memory has been requested than + existed in the free pool, at which point the quota is consulted to bring + this value non-negative (asynchronously). */ + int64_t free_pool; + /* A list of closures to call once free_pool becomes non-negative - ie when + all outstanding allocations have been granted. */ + grpc_closure_list on_allocated; + /* True if we are currently trying to allocate from the quota, false if not */ + bool allocating; + /* True if we are currently trying to add ourselves to the non-free quota + list, false otherwise */ + bool added_to_free_pool; + + /* Reclaimers: index 0 is the benign reclaimer, 1 is the destructive reclaimer + */ + grpc_closure *reclaimers[2]; + /* Trampoline closures to finish reclamation and re-enter the quota combiner + lock */ + grpc_closure post_reclaimer_closure[2]; + + /* Closure to execute under the quota combiner to de-register and shutdown the + resource user */ + grpc_closure destroy_closure; + + /* Links in the various grpc_rulist lists */ + grpc_resource_user_link links[GRPC_RULIST_COUNT]; + + /* The name of this resource user, for debugging/tracing */ + char *name; +}; + struct grpc_resource_quota { /* refcount */ gpr_refcount refs; @@ -373,9 +448,19 @@ static void ru_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *ru, rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE); } +static void ru_shutdown(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { + grpc_resource_user *resource_user = ru; + grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[0], + GRPC_ERROR_CANCELLED, NULL); + grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[1], + GRPC_ERROR_CANCELLED, NULL); + resource_user->reclaimers[0] = NULL; + resource_user->reclaimers[1] = NULL; +} + static void ru_destroy(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { grpc_resource_user *resource_user = ru; - GPR_ASSERT(resource_user->allocated == 0); + GPR_ASSERT(gpr_atm_no_barrier_load(&resource_user->refs) == 0); for (int i = 0; i < GRPC_RULIST_COUNT; i++) { rulist_remove(resource_user, (grpc_rulist)i); } @@ -383,13 +468,14 @@ static void ru_destroy(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { GRPC_ERROR_CANCELLED, NULL); grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[1], GRPC_ERROR_CANCELLED, NULL); - grpc_exec_ctx_sched(exec_ctx, (grpc_closure *)gpr_atm_no_barrier_load( - &resource_user->on_done_destroy_closure), - GRPC_ERROR_NONE, NULL); if (resource_user->free_pool != 0) { resource_user->resource_quota->free_pool += resource_user->free_pool; rq_step_sched(exec_ctx, resource_user->resource_quota); } + grpc_resource_quota_internal_unref(exec_ctx, resource_user->resource_quota); + gpr_mu_destroy(&resource_user->mu); + gpr_free(resource_user->name); + gpr_free(resource_user); } static void ru_allocated_slices(grpc_exec_ctx *exec_ctx, void *arg, @@ -539,9 +625,9 @@ const grpc_arg_pointer_vtable *grpc_resource_quota_arg_vtable(void) { * grpc_resource_user api */ -void grpc_resource_user_init(grpc_resource_user *resource_user, - grpc_resource_quota *resource_quota, - const char *name) { +grpc_resource_user *grpc_resource_user_create( + grpc_resource_quota *resource_quota, const char *name) { + grpc_resource_user *resource_user = gpr_malloc(sizeof(*resource_user)); resource_user->resource_quota = grpc_resource_quota_internal_ref(resource_quota); grpc_closure_init(&resource_user->allocate_closure, &ru_allocate, @@ -555,12 +641,12 @@ void grpc_resource_user_init(grpc_resource_user *resource_user, grpc_closure_init(&resource_user->destroy_closure, &ru_destroy, resource_user); gpr_mu_init(&resource_user->mu); - resource_user->allocated = 0; + gpr_atm_rel_store(&resource_user->refs, 1); + gpr_atm_rel_store(&resource_user->shutdown, 0); resource_user->free_pool = 0; grpc_closure_list_init(&resource_user->on_allocated); resource_user->allocating = false; resource_user->added_to_free_pool = false; - gpr_atm_no_barrier_store(&resource_user->on_done_destroy_closure, 0); resource_user->reclaimers[0] = NULL; resource_user->reclaimers[1] = NULL; for (int i = 0; i < GRPC_RULIST_COUNT; i++) { @@ -572,56 +658,54 @@ void grpc_resource_user_init(grpc_resource_user *resource_user, gpr_asprintf(&resource_user->name, "anonymous_resource_user_%" PRIxPTR, (intptr_t)resource_user); } + return resource_user; } -void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user, - grpc_closure *on_done) { - gpr_mu_lock(&resource_user->mu); - GPR_ASSERT(gpr_atm_no_barrier_load(&resource_user->on_done_destroy_closure) == - 0); - gpr_atm_no_barrier_store(&resource_user->on_done_destroy_closure, - (gpr_atm)on_done); - if (resource_user->allocated == 0) { +static void ru_ref_by(grpc_resource_user *resource_user, gpr_atm amount) { + GPR_ASSERT(amount > 0); + GPR_ASSERT(gpr_atm_no_barrier_fetch_add(&resource_user->refs, amount) != 0); +} + +static void ru_unref_by(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, gpr_atm amount) { + GPR_ASSERT(amount > 0); + gpr_atm old = gpr_atm_full_fetch_add(&resource_user->refs, -amount); + GPR_ASSERT(old >= amount); + if (old == amount) { grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, &resource_user->destroy_closure, GRPC_ERROR_NONE, false); } - gpr_mu_unlock(&resource_user->mu); } -void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user) { - grpc_resource_quota_internal_unref(exec_ctx, resource_user->resource_quota); - gpr_mu_destroy(&resource_user->mu); - gpr_free(resource_user->name); +void grpc_resource_user_ref(grpc_resource_user *resource_user) { + ru_ref_by(resource_user, 1); +} + +void grpc_resource_user_unref(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user) { + ru_unref_by(exec_ctx, resource_user, 1); +} + +void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user) { + if (gpr_atm_full_fetch_add(&resource_user->shutdown, 1) == 0) { + grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, + grpc_closure_create(ru_shutdown, resource_user), + GRPC_ERROR_NONE, false); + } } void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, size_t size, grpc_closure *optional_on_done) { gpr_mu_lock(&resource_user->mu); - grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load( - &resource_user->on_done_destroy_closure); - if (on_done_destroy != NULL) { - /* already shutdown */ - if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR " after shutdown", - resource_user->resource_quota->name, resource_user->name, size); - } - grpc_exec_ctx_sched( - exec_ctx, optional_on_done, - GRPC_ERROR_CREATE("Buffer pool user is already shutdown"), NULL); - gpr_mu_unlock(&resource_user->mu); - return; - } - resource_user->allocated += (int64_t)size; + ru_ref_by(resource_user, (gpr_atm)size); resource_user->free_pool -= (int64_t)size; if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR "; allocated -> %" PRId64 - ", free_pool -> %" PRId64, + gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR "; free_pool -> %" PRId64, resource_user->resource_quota->name, resource_user->name, size, - resource_user->allocated, resource_user->free_pool); + resource_user->free_pool); } if (resource_user->free_pool < 0) { grpc_closure_list_append(&resource_user->on_allocated, optional_on_done, @@ -641,15 +725,12 @@ void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx, void grpc_resource_user_free(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, size_t size) { gpr_mu_lock(&resource_user->mu); - GPR_ASSERT(resource_user->allocated >= (int64_t)size); bool was_zero_or_negative = resource_user->free_pool <= 0; resource_user->free_pool += (int64_t)size; - resource_user->allocated -= (int64_t)size; if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "RQ %s %s: free %" PRIdPTR "; allocated -> %" PRId64 - ", free_pool -> %" PRId64, + gpr_log(GPR_DEBUG, "RQ %s %s: free %" PRIdPTR "; free_pool -> %" PRId64, resource_user->resource_quota->name, resource_user->name, size, - resource_user->allocated, resource_user->free_pool); + resource_user->free_pool); } bool is_bigger_than_zero = resource_user->free_pool > 0; if (is_bigger_than_zero && was_zero_or_negative && @@ -659,29 +740,23 @@ void grpc_resource_user_free(grpc_exec_ctx *exec_ctx, &resource_user->add_to_free_pool_closure, GRPC_ERROR_NONE, false); } - grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load( - &resource_user->on_done_destroy_closure); - if (on_done_destroy != NULL && resource_user->allocated == 0) { - grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, - &resource_user->destroy_closure, GRPC_ERROR_NONE, - false); - } gpr_mu_unlock(&resource_user->mu); + ru_unref_by(exec_ctx, resource_user, (gpr_atm)size); } void grpc_resource_user_post_reclaimer(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, bool destructive, grpc_closure *closure) { - if (gpr_atm_acq_load(&resource_user->on_done_destroy_closure) == 0) { - GPR_ASSERT(resource_user->reclaimers[destructive] == NULL); - resource_user->reclaimers[destructive] = closure; - grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, - &resource_user->post_reclaimer_closure[destructive], - GRPC_ERROR_NONE, false); - } else { + GPR_ASSERT(resource_user->reclaimers[destructive] == NULL); + if (gpr_atm_acq_load(&resource_user->shutdown) > 0) { grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CANCELLED, NULL); + return; } + resource_user->reclaimers[destructive] = closure; + grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, + &resource_user->post_reclaimer_closure[destructive], + GRPC_ERROR_NONE, false); } void grpc_resource_user_finish_reclamation(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index da68f21a2c..bbe0af1a14 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -84,91 +84,15 @@ void grpc_resource_quota_internal_unref(grpc_exec_ctx *exec_ctx, grpc_resource_quota *grpc_resource_quota_from_channel_args( const grpc_channel_args *channel_args); -/* Resource users are kept in (potentially) several intrusive linked lists - at once. These are the list names. */ -typedef enum { - /* Resource users that are waiting for an allocation */ - GRPC_RULIST_AWAITING_ALLOCATION, - /* Resource users that have free memory available for internal reclamation */ - GRPC_RULIST_NON_EMPTY_FREE_POOL, - /* Resource users that have published a benign reclamation is available */ - GRPC_RULIST_RECLAIMER_BENIGN, - /* Resource users that have published a destructive reclamation is - available */ - GRPC_RULIST_RECLAIMER_DESTRUCTIVE, - /* Number of lists: must be last */ - GRPC_RULIST_COUNT -} grpc_rulist; - typedef struct grpc_resource_user grpc_resource_user; -/* Internal linked list pointers for a resource user */ -typedef struct { - grpc_resource_user *next; - grpc_resource_user *prev; -} grpc_resource_user_link; - -struct grpc_resource_user { - /* The quota this resource user consumes from */ - grpc_resource_quota *resource_quota; - - /* Closure to schedule an allocation under the resource quota combiner lock */ - grpc_closure allocate_closure; - /* Closure to publish a non empty free pool under the resource quota combiner - lock */ - grpc_closure add_to_free_pool_closure; - - gpr_mu mu; - /* Total allocated memory outstanding by this resource user in bytes; - always positive */ - int64_t allocated; - /* The amount of memory (in bytes) this user has cached for its own use: to - avoid quota contention, each resource user can keep some memory in - addition to what it is immediately using (e.g., for caching), and the quota - can pull it back under memory pressure. - This value can become negative if more memory has been requested than - existed in the free pool, at which point the quota is consulted to bring - this value non-negative (asynchronously). */ - int64_t free_pool; - /* A list of closures to call once free_pool becomes non-negative - ie when - all outstanding allocations have been granted. */ - grpc_closure_list on_allocated; - /* True if we are currently trying to allocate from the quota, false if not */ - bool allocating; - /* True if we are currently trying to add ourselves to the non-free quota - list, false otherwise */ - bool added_to_free_pool; - - /* Reclaimers: index 0 is the benign reclaimer, 1 is the destructive reclaimer - */ - grpc_closure *reclaimers[2]; - /* Trampoline closures to finish reclamation and re-enter the quota combiner - lock */ - grpc_closure post_reclaimer_closure[2]; - - /* Closure to execute under the quota combiner to de-register and shutdown the - resource user */ - grpc_closure destroy_closure; - /* User supplied closure to call once the user has finished shutting down AND - all outstanding allocations have been freed. Real type is grpc_closure*, - but it's stored as an atomic to avoid a mutex on some fast paths. */ - gpr_atm on_done_destroy_closure; - - /* Links in the various grpc_rulist lists */ - grpc_resource_user_link links[GRPC_RULIST_COUNT]; - - /* The name of this resource user, for debugging/tracing */ - char *name; -}; - -void grpc_resource_user_init(grpc_resource_user *resource_user, - grpc_resource_quota *resource_quota, - const char *name); +grpc_resource_user *grpc_resource_user_create( + grpc_resource_quota *resource_quota, const char *name); +void grpc_resource_user_ref(grpc_resource_user *resource_user); +void grpc_resource_user_unref(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user); void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user, - grpc_closure *on_done); -void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user); + grpc_resource_user *resource_user); /* Allocate from the resource user (and its quota). If optional_on_done is NULL, then allocate immediately. This may push the diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 880af93ee1..70416c6eef 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -102,7 +102,7 @@ typedef struct { char *peer_string; - grpc_resource_user resource_user; + grpc_resource_user *resource_user; grpc_resource_user_slice_allocator slice_allocator; } grpc_tcp; @@ -110,28 +110,18 @@ static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, grpc_error *error); static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, grpc_error *error); -static void tcp_unref_closure(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, - grpc_error *error); - -static void tcp_maybe_shutdown_resource_user(grpc_exec_ctx *exec_ctx, - grpc_tcp *tcp) { - if (gpr_atm_full_fetch_add(&tcp->shutdown_count, 1) == 0) { - grpc_resource_user_shutdown(exec_ctx, &tcp->resource_user, - grpc_closure_create(tcp_unref_closure, tcp)); - } -} static void tcp_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - tcp_maybe_shutdown_resource_user(exec_ctx, tcp); grpc_fd_shutdown(exec_ctx, tcp->em_fd); + grpc_resource_user_shutdown(exec_ctx, tcp->resource_user); } static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { grpc_fd_orphan(exec_ctx, tcp->em_fd, tcp->release_fd_cb, tcp->release_fd, "tcp_unref_orphan"); gpr_slice_buffer_destroy(&tcp->last_read_buffer); - grpc_resource_user_destroy(exec_ctx, &tcp->resource_user); + grpc_resource_user_unref(exec_ctx, tcp->resource_user); gpr_free(tcp->peer_string); gpr_free(tcp); } @@ -168,15 +158,9 @@ static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } #endif -static void tcp_unref_closure(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - TCP_UNREF(exec_ctx, arg, "resource_user"); -} - static void tcp_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; - tcp_maybe_shutdown_resource_user(exec_ctx, tcp); gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } @@ -515,7 +499,7 @@ static grpc_workqueue *tcp_get_workqueue(grpc_endpoint *ep) { static grpc_resource_user *tcp_get_resource_user(grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - return &tcp->resource_user; + return tcp->resource_user; } static const grpc_endpoint_vtable vtable = {tcp_read, @@ -543,9 +527,8 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, tcp->slice_size = slice_size; tcp->iov_size = 1; tcp->finished_edge = true; - /* paired with unref in grpc_tcp_destroy, and with the shutdown for our - * resource_user */ - gpr_ref_init(&tcp->refcount, 2); + /* paired with unref in grpc_tcp_destroy */ + gpr_ref_init(&tcp->refcount, 1); gpr_atm_no_barrier_store(&tcp->shutdown_count, 0); tcp->em_fd = em_fd; tcp->read_closure.cb = tcp_handle_read; @@ -553,10 +536,9 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, tcp->write_closure.cb = tcp_handle_write; tcp->write_closure.cb_arg = tcp; gpr_slice_buffer_init(&tcp->last_read_buffer); - grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); - grpc_resource_user_slice_allocator_init(&tcp->slice_allocator, - &tcp->resource_user, - tcp_read_allocation_done, tcp); + tcp->resource_user = grpc_resource_user_create(resource_quota, peer_string); + grpc_resource_user_slice_allocator_init( + &tcp->slice_allocator, tcp->resource_user, tcp_read_allocation_done, tcp); /* Tell network status tracker about new endpoint */ grpc_network_status_register_endpoint(&tcp->base); @@ -576,7 +558,6 @@ void grpc_tcp_destroy_and_release_fd(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, GPR_ASSERT(ep->vtable == &vtable); tcp->release_fd = fd; tcp->release_fd_cb = done; - tcp_maybe_shutdown_resource_user(exec_ctx, tcp); gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } diff --git a/test/core/iomgr/resource_quota_test.c b/test/core/iomgr/resource_quota_test.c index 34dee1aee1..22c4e4e989 100644 --- a/test/core/iomgr/resource_quota_test.c +++ b/test/core/iomgr/resource_quota_test.c @@ -81,11 +81,7 @@ grpc_closure *make_unused_reclaimer(grpc_closure *then) { static void destroy_user(grpc_resource_user *usr) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - bool done = false; - grpc_resource_user_shutdown(&exec_ctx, usr, set_bool(&done)); - grpc_exec_ctx_flush(&exec_ctx); - GPR_ASSERT(done); - grpc_resource_user_destroy(&exec_ctx, usr); + grpc_resource_user_unref(&exec_ctx, usr); grpc_exec_ctx_finish(&exec_ctx); } @@ -106,10 +102,9 @@ static void test_resource_user_no_op(void) { gpr_log(GPR_INFO, "** test_resource_user_no_op **"); grpc_resource_quota *q = grpc_resource_quota_create("test_resource_user_no_op"); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_instant_alloc_then_free(void) { @@ -117,20 +112,19 @@ static void test_instant_alloc_then_free(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_instant_alloc_then_free"); grpc_resource_quota_resize(q, 1024 * 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, NULL); grpc_exec_ctx_finish(&exec_ctx); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_instant_alloc_free_pair(void) { @@ -138,16 +132,15 @@ static void test_instant_alloc_free_pair(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_instant_alloc_free_pair"); grpc_resource_quota_resize(q, 1024 * 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL); - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, NULL); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_simple_async_alloc(void) { @@ -155,22 +148,21 @@ static void test_simple_async_alloc(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_simple_async_alloc"); grpc_resource_quota_resize(q, 1024 * 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_async_alloc_blocked_by_size(void) { @@ -178,12 +170,11 @@ static void test_async_alloc_blocked_by_size(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_async_alloc_blocked_by_size"); grpc_resource_quota_resize(q, 1); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); bool done = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!done); } @@ -191,87 +182,83 @@ static void test_async_alloc_blocked_by_size(void) { GPR_ASSERT(done); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_scavenge(void) { gpr_log(GPR_INFO, "** test_scavenge **"); grpc_resource_quota *q = grpc_resource_quota_create("test_scavenge"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr1; - grpc_resource_user usr2; - grpc_resource_user_init(&usr1, q, "usr1"); - grpc_resource_user_init(&usr2, q, "usr2"); + grpc_resource_user *usr1 = grpc_resource_user_create(q, "usr1"); + grpc_resource_user *usr2 = grpc_resource_user_create(q, "usr2"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr1, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr1, 1024); + grpc_resource_user_free(&exec_ctx, usr1, 1024); grpc_exec_ctx_finish(&exec_ctx); } { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr2, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr2, 1024); + grpc_resource_user_free(&exec_ctx, usr2, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr1); - destroy_user(&usr2); + destroy_user(usr1); + destroy_user(usr2); } static void test_scavenge_blocked(void) { gpr_log(GPR_INFO, "** test_scavenge_blocked **"); grpc_resource_quota *q = grpc_resource_quota_create("test_scavenge_blocked"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr1; - grpc_resource_user usr2; - grpc_resource_user_init(&usr1, q, "usr1"); - grpc_resource_user_init(&usr2, q, "usr2"); + grpc_resource_user *usr1 = grpc_resource_user_create(q, "usr1"); + grpc_resource_user *usr2 = grpc_resource_user_create(q, "usr2"); bool done; { done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr1, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr2, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr1, 1024); + grpc_resource_user_free(&exec_ctx, usr1, 1024); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr2, 1024); + grpc_resource_user_free(&exec_ctx, usr2, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr1); - destroy_user(&usr2); + destroy_user(usr1); + destroy_user(usr2); } static void test_blocked_until_scheduled_reclaim(void) { @@ -279,12 +266,11 @@ static void test_blocked_until_scheduled_reclaim(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_blocked_until_scheduled_reclaim"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } @@ -292,25 +278,25 @@ static void test_blocked_until_scheduled_reclaim(void) { { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 1024, set_bool(&reclaim_done))); + &exec_ctx, usr, false, + make_reclaimer(usr, 1024, set_bool(&reclaim_done))); grpc_exec_ctx_finish(&exec_ctx); } { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(reclaim_done); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { @@ -318,14 +304,12 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { grpc_resource_quota *q = grpc_resource_quota_create( "test_blocked_until_scheduled_reclaim_and_scavenge"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr1; - grpc_resource_user usr2; - grpc_resource_user_init(&usr1, q, "usr1"); - grpc_resource_user_init(&usr2, q, "usr2"); + grpc_resource_user *usr1 = grpc_resource_user_create(q, "usr1"); + grpc_resource_user *usr2 = grpc_resource_user_create(q, "usr2"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr1, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } @@ -333,26 +317,26 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr1, false, - make_reclaimer(&usr1, 1024, set_bool(&reclaim_done))); + &exec_ctx, usr1, false, + make_reclaimer(usr1, 1024, set_bool(&reclaim_done))); grpc_exec_ctx_finish(&exec_ctx); } { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr2, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(reclaim_done); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr2, 1024); + grpc_resource_user_free(&exec_ctx, usr2, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr1); - destroy_user(&usr2); + destroy_user(usr1); + destroy_user(usr2); } static void test_blocked_until_scheduled_destructive_reclaim(void) { @@ -360,12 +344,11 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) { grpc_resource_quota *q = grpc_resource_quota_create( "test_blocked_until_scheduled_destructive_reclaim"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } @@ -373,25 +356,25 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) { { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, true, - make_reclaimer(&usr, 1024, set_bool(&reclaim_done))); + &exec_ctx, usr, true, + make_reclaimer(usr, 1024, set_bool(&reclaim_done))); grpc_exec_ctx_finish(&exec_ctx); } { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(reclaim_done); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_unused_reclaim_is_cancelled(void) { @@ -399,23 +382,22 @@ static void test_unused_reclaim_is_cancelled(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_unused_reclaim_is_cancelled"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); bool benign_done = false; bool destructive_done = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, make_unused_reclaimer(set_bool(&benign_done))); + &exec_ctx, usr, false, make_unused_reclaimer(set_bool(&benign_done))); grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, true, + &exec_ctx, usr, true, make_unused_reclaimer(set_bool(&destructive_done))); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!benign_done); GPR_ASSERT(!destructive_done); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); GPR_ASSERT(benign_done); GPR_ASSERT(destructive_done); } @@ -425,24 +407,23 @@ static void test_benign_reclaim_is_preferred(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_benign_reclaim_is_preferred"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); bool benign_done = false; bool destructive_done = false; { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 1024, set_bool(&benign_done))); + &exec_ctx, usr, false, + make_reclaimer(usr, 1024, set_bool(&benign_done))); grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, true, + &exec_ctx, usr, true, make_unused_reclaimer(set_bool(&destructive_done))); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!benign_done); @@ -451,7 +432,7 @@ static void test_benign_reclaim_is_preferred(void) { { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(benign_done); GPR_ASSERT(!destructive_done); @@ -459,11 +440,11 @@ static void test_benign_reclaim_is_preferred(void) { } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); GPR_ASSERT(benign_done); GPR_ASSERT(destructive_done); } @@ -473,25 +454,24 @@ static void test_multiple_reclaims_can_be_triggered(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_multiple_reclaims_can_be_triggered"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); bool benign_done = false; bool destructive_done = false; { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 512, set_bool(&benign_done))); + &exec_ctx, usr, false, + make_reclaimer(usr, 512, set_bool(&benign_done))); grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, true, - make_reclaimer(&usr, 512, set_bool(&destructive_done))); + &exec_ctx, usr, true, + make_reclaimer(usr, 512, set_bool(&destructive_done))); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!benign_done); GPR_ASSERT(!destructive_done); @@ -499,7 +479,7 @@ static void test_multiple_reclaims_can_be_triggered(void) { { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(benign_done); GPR_ASSERT(destructive_done); @@ -507,11 +487,11 @@ static void test_multiple_reclaims_can_be_triggered(void) { } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); GPR_ASSERT(benign_done); GPR_ASSERT(destructive_done); } @@ -522,30 +502,21 @@ static void test_resource_user_stays_allocated_until_memory_released(void) { grpc_resource_quota *q = grpc_resource_quota_create( "test_resource_user_stays_allocated_until_memory_released"); grpc_resource_quota_resize(q, 1024 * 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); - bool done = false; + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, NULL); grpc_exec_ctx_finish(&exec_ctx); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_quota_unref(q); - grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_resource_user_unref(&exec_ctx, usr); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_destroy(&exec_ctx, &usr); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } } @@ -562,14 +533,12 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released( "released"); grpc_resource_quota_resize(q, 1024); for (int i = 0; i < 10; i++) { - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); - bool done = false; + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); bool reclaimer_cancelled = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, + &exec_ctx, usr, false, make_unused_reclaimer(set_bool(&reclaimer_cancelled))); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!reclaimer_cancelled); @@ -577,30 +546,23 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released( { bool allocated = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&allocated)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(allocated); GPR_ASSERT(!reclaimer_cancelled); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_resource_user_unref(&exec_ctx, usr); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!done); GPR_ASSERT(!reclaimer_cancelled); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); GPR_ASSERT(reclaimer_cancelled); } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_destroy(&exec_ctx, &usr); - grpc_exec_ctx_finish(&exec_ctx); - } } grpc_resource_quota_unref(q); } @@ -610,12 +572,11 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_reclaimers_can_be_posted_repeatedly"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { bool allocated = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&allocated)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(allocated); } @@ -624,15 +585,15 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 1024, set_bool(&reclaimer_done))); + &exec_ctx, usr, false, + make_reclaimer(usr, 1024, set_bool(&reclaimer_done))); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!reclaimer_done); } { bool allocated = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&allocated)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(allocated); GPR_ASSERT(reclaimer_done); @@ -640,10 +601,10 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } - destroy_user(&usr); + destroy_user(usr); grpc_resource_quota_unref(q); } @@ -653,13 +614,11 @@ static void test_one_slice(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_one_slice"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); grpc_resource_user_slice_allocator alloc; int num_allocs = 0; - grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb, - &num_allocs); + grpc_resource_user_slice_allocator_init(&alloc, usr, inc_int_cb, &num_allocs); gpr_slice_buffer buffer; gpr_slice_buffer_init(&buffer); @@ -673,7 +632,7 @@ static void test_one_slice(void) { } gpr_slice_buffer_destroy(&buffer); - destroy_user(&usr); + destroy_user(usr); grpc_resource_quota_unref(q); } @@ -684,13 +643,11 @@ static void test_one_slice_deleted_late(void) { grpc_resource_quota_create("test_one_slice_deleted_late"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); grpc_resource_user_slice_allocator alloc; int num_allocs = 0; - grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb, - &num_allocs); + grpc_resource_user_slice_allocator_init(&alloc, usr, inc_int_cb, &num_allocs); gpr_slice_buffer buffer; gpr_slice_buffer_init(&buffer); @@ -703,22 +660,14 @@ static void test_one_slice_deleted_late(void) { GPR_ASSERT(num_allocs == start_allocs + 1); } - bool done = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_resource_user_unref(&exec_ctx, usr); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!done); } grpc_resource_quota_unref(q); gpr_slice_buffer_destroy(&buffer); - GPR_ASSERT(done); - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_destroy(&exec_ctx, &usr); - grpc_exec_ctx_finish(&exec_ctx); - } } int main(int argc, char **argv) { diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index 2b041a4484..2dac877a65 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -41,12 +41,11 @@ typedef struct grpc_mock_endpoint { grpc_endpoint base; gpr_mu mu; - int refs; void (*on_write)(gpr_slice slice); gpr_slice_buffer read_buffer; gpr_slice_buffer *on_read_out; grpc_closure *on_read; - grpc_resource_user resource_user; + grpc_resource_user *resource_user; } grpc_mock_endpoint; static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, @@ -78,24 +77,6 @@ static void me_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, static void me_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_pollset_set *pollset) {} -static void unref(grpc_exec_ctx *exec_ctx, grpc_mock_endpoint *m) { - gpr_mu_lock(&m->mu); - if (0 == --m->refs) { - gpr_mu_unlock(&m->mu); - gpr_slice_buffer_destroy(&m->read_buffer); - grpc_resource_user_destroy(exec_ctx, &m->resource_user); - gpr_free(m); - } else { - gpr_mu_unlock(&m->mu); - } -} - -static void me_finish_shutdown(grpc_exec_ctx *exec_ctx, void *me, - grpc_error *error) { - grpc_mock_endpoint *m = me; - unref(exec_ctx, m); -} - static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; gpr_mu_lock(&m->mu); @@ -104,14 +85,15 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { GRPC_ERROR_CREATE("Endpoint Shutdown"), NULL); m->on_read = NULL; } - grpc_resource_user_shutdown(exec_ctx, &m->resource_user, - grpc_closure_create(me_finish_shutdown, m)); gpr_mu_unlock(&m->mu); + grpc_resource_user_shutdown(exec_ctx, m->resource_user); } static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; - unref(exec_ctx, m); + gpr_slice_buffer_destroy(&m->read_buffer); + grpc_resource_user_unref(exec_ctx, m->resource_user); + gpr_free(m); } static char *me_get_peer(grpc_endpoint *ep) { @@ -120,7 +102,7 @@ static char *me_get_peer(grpc_endpoint *ep) { static grpc_resource_user *me_get_resource_user(grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; - return &m->resource_user; + return m->resource_user; } static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } @@ -141,10 +123,9 @@ grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), grpc_resource_quota *resource_quota) { grpc_mock_endpoint *m = gpr_malloc(sizeof(*m)); m->base.vtable = &vtable; - m->refs = 2; char *name; gpr_asprintf(&name, "mock_endpoint_%" PRIxPTR, (intptr_t)m); - grpc_resource_user_init(&m->resource_user, resource_quota, name); + m->resource_user = grpc_resource_user_create(resource_quota, name); gpr_free(name); gpr_slice_buffer_init(&m->read_buffer); gpr_mu_init(&m->mu); diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index ee6ef7da60..a920a15aa5 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -46,7 +46,7 @@ typedef struct { gpr_slice_buffer read_buffer; gpr_slice_buffer *on_read_out; grpc_closure *on_read; - grpc_resource_user resource_user; + grpc_resource_user *resource_user; } half; struct passthru_endpoint { @@ -123,10 +123,10 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { m->on_read = NULL; } gpr_mu_unlock(&m->parent->mu); + grpc_resource_user_shutdown(exec_ctx, m->resource_user); } -static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep, - grpc_error *error) { +static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { passthru_endpoint *p = ((half *)ep)->parent; gpr_mu_lock(&p->mu); if (0 == --p->halves) { @@ -134,18 +134,14 @@ static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep, gpr_mu_destroy(&p->mu); gpr_slice_buffer_destroy(&p->client.read_buffer); gpr_slice_buffer_destroy(&p->server.read_buffer); + grpc_resource_user_unref(exec_ctx, p->client.resource_user); + grpc_resource_user_unref(exec_ctx, p->server.resource_user); gpr_free(p); } else { gpr_mu_unlock(&p->mu); } } -static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { - half *m = (half *)ep; - grpc_resource_user_shutdown(exec_ctx, &m->resource_user, - grpc_closure_create(me_really_destroy, m)); -} - static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } @@ -154,7 +150,7 @@ static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } static grpc_resource_user *me_get_resource_user(grpc_endpoint *ep) { half *m = (half *)ep; - return &m->resource_user; + return m->resource_user; } static const grpc_endpoint_vtable vtable = { @@ -179,7 +175,7 @@ static void half_init(half *m, passthru_endpoint *parent, char *name; gpr_asprintf(&name, "passthru_endpoint_%s_%" PRIxPTR, half_name, (intptr_t)parent); - grpc_resource_user_init(&m->resource_user, resource_quota, name); + m->resource_user = grpc_resource_user_create(resource_quota, name); gpr_free(name); } -- cgit v1.2.3 From c037fc1808a0c85f747a895e2448b17fbacf11ee Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 14:04:54 -0700 Subject: Fix windows for new RU api --- src/core/lib/iomgr/tcp_windows.c | 50 +++++++++++++--------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 46f0491d10..5fcdf560df 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -109,46 +109,34 @@ typedef struct grpc_tcp { gpr_slice_buffer *write_slices; gpr_slice_buffer *read_slices; - grpc_resource_user resource_user; + grpc_resource_user *resource_user; /* The IO Completion Port runs from another thread. We need some mechanism to protect ourselves when requesting a shutdown. */ gpr_mu mu; int shutting_down; - gpr_atm resource_user_shutdown_count; - char *peer_string; } grpc_tcp; -static void win_unref_closure(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, - grpc_error *error); - -static void win_maybe_shutdown_resource_user(grpc_exec_ctx *exec_ctx, - grpc_tcp *tcp) { - if (gpr_atm_full_fetch_add(&tcp->resource_user_shutdown_count, 1) == 0) { - grpc_resource_user_shutdown(exec_ctx, &tcp->resource_user, - grpc_closure_create(win_unref_closure, tcp)); - } -} - -static void tcp_free(grpc_tcp *tcp) { +static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { grpc_winsocket_destroy(tcp->socket); gpr_mu_destroy(&tcp->mu); gpr_free(tcp->peer_string); + grpc_resource_user_unref(exec_ctx, tcp->resource_user); gpr_free(tcp); } /*#define GRPC_TCP_REFCOUNT_DEBUG*/ #ifdef GRPC_TCP_REFCOUNT_DEBUG -#define TCP_UNREF(tcp, reason) tcp_unref((tcp), (reason), __FILE__, __LINE__) +#define TCP_UNREF(exec_ctx, tcp, reason) tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) #define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__) -static void tcp_unref(grpc_tcp *tcp, const char *reason, const char *file, +static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, const char *reason, const char *file, int line) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, reason, tcp->refcount.count, tcp->refcount.count - 1); if (gpr_unref(&tcp->refcount)) { - tcp_free(tcp); + tcp_free(exec_ctx, tcp); } } @@ -159,22 +147,17 @@ static void tcp_ref(grpc_tcp *tcp, const char *reason, const char *file, gpr_ref(&tcp->refcount); } #else -#define TCP_UNREF(tcp, reason) tcp_unref((tcp)) +#define TCP_UNREF(exec_ctx, tcp, reason) tcp_unref((exec_ctx), (tcp)) #define TCP_REF(tcp, reason) tcp_ref((tcp)) -static void tcp_unref(grpc_tcp *tcp) { +static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { if (gpr_unref(&tcp->refcount)) { - tcp_free(tcp); + tcp_free(exec_ctx, tcp); } } static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } #endif -static void win_unref_closure(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - TCP_UNREF(arg, "resource_user"); -} - /* Asynchronous callback from the IOCP, or the background thread. */ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { grpc_tcp *tcp = tcpp; @@ -203,7 +186,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { } tcp->read_cb = NULL; - TCP_UNREF(tcp, "read"); + TCP_UNREF(exec_ctx, tcp, "read"); grpc_exec_ctx_sched(exec_ctx, cb, error, NULL); } @@ -287,7 +270,7 @@ static void on_write(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { } } - TCP_UNREF(tcp, "write"); + TCP_UNREF(exec_ctx, tcp, "write"); grpc_exec_ctx_sched(exec_ctx, cb, error, NULL); } @@ -355,7 +338,7 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, if (status != 0) { int wsa_error = WSAGetLastError(); if (wsa_error != WSA_IO_PENDING) { - TCP_UNREF(tcp, "write"); + TCP_UNREF(exec_ctx, tcp, "write"); grpc_exec_ctx_sched(exec_ctx, cb, GRPC_WSA_ERROR(wsa_error, "WSASend"), NULL); return; @@ -396,15 +379,14 @@ static void win_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { callback. See the comments in on_read and on_write. */ tcp->shutting_down = 1; grpc_winsocket_shutdown(tcp->socket); - win_maybe_shutdown_resource_user(exec_ctx, tcp); gpr_mu_unlock(&tcp->mu); + grpc_resource_user_shutdown(exec_ctx, tcp->resource_user); } static void win_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; - win_maybe_shutdown_resource_user(exec_ctx, tcp); - TCP_UNREF(tcp, "destroy"); + TCP_UNREF(exec_ctx, tcp, "destroy"); } static char *win_get_peer(grpc_endpoint *ep) { @@ -416,7 +398,7 @@ static grpc_workqueue *win_get_workqueue(grpc_endpoint *ep) { return NULL; } static grpc_resource_user *win_get_resource_user(grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - return &tcp->resource_user; + return tcp->resource_user; } static grpc_endpoint_vtable vtable = {win_read, @@ -441,7 +423,7 @@ grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, grpc_closure_init(&tcp->on_read, on_read, tcp); grpc_closure_init(&tcp->on_write, on_write, tcp); tcp->peer_string = gpr_strdup(peer_string); - grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); + tcp->resource_user = grpc_resource_user_create(resource_quota, peer_string); /* Tell network status tracking code about the new endpoint */ grpc_network_status_register_endpoint(&tcp->base); -- cgit v1.2.3 From fe6350d3b0fa66ec114d45fba9f104f2f228ea16 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 14:05:45 -0700 Subject: clang-format code --- src/core/lib/iomgr/tcp_windows.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 5fcdf560df..e7abf2971f 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -129,10 +129,11 @@ static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { /*#define GRPC_TCP_REFCOUNT_DEBUG*/ #ifdef GRPC_TCP_REFCOUNT_DEBUG -#define TCP_UNREF(exec_ctx, tcp, reason) tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) +#define TCP_UNREF(exec_ctx, tcp, reason) \ + tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) #define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__) -static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, const char *reason, const char *file, - int line) { +static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, + const char *reason, const char *file, int line) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, reason, tcp->refcount.count, tcp->refcount.count - 1); if (gpr_unref(&tcp->refcount)) { -- cgit v1.2.3 From e942434f8d6899147b9bb396f935da2f5ec17e19 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 4 Nov 2016 15:40:20 -0700 Subject: Fix typo --- src/core/lib/iomgr/endpoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index a47b9112c5..363bd39a6d 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -74,7 +74,7 @@ void grpc_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, char *grpc_endpoint_get_peer(grpc_endpoint *ep); -/* Get the file descriptor used by \a ep. Return -1 if \a ep is not using a fd. +/* Get the file descriptor used by \a ep. Return -1 if \a ep is not using an fd. */ int grpc_endpoint_get_fd(grpc_endpoint *ep); -- cgit v1.2.3 From fdfe41fb036e5489b785db5e8ddeec231e6fdc5a Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 4 Nov 2016 16:19:17 -0700 Subject: Fix typo --- src/core/lib/iomgr/socket_utils_common_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index 19e290b95a..88e9ade253 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -209,7 +209,7 @@ grpc_error *grpc_set_socket_low_latency(int fd, int low_latency) { return GRPC_ERROR_NONE; } -/* set a socker using a grpc_socket_mutator */ +/* set a socket using a grpc_socket_mutator */ grpc_error *grpc_set_socket_with_mutator(int fd, grpc_socket_mutator *mutator) { GPR_ASSERT(mutator); if (!grpc_socket_mutator_mutate_fd(mutator, fd)) { -- cgit v1.2.3 From 42909c58fb1337a1020186fa9c4e7dca7f400959 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Sun, 6 Nov 2016 20:06:12 -0800 Subject: Bypass poll thread if wakeup fd is set --- src/core/lib/iomgr/ev_poll_posix.c | 15 +++++++-------- test/core/iomgr/wakeup_fd_cv_test.c | 7 +++---- 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index e1d620cfff..27083ca6d0 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -1343,6 +1343,7 @@ static int cvfd_poll(struct pollfd *fds, nfds_t nfds, int timeout) { int res, idx; gpr_cv *pollcv; cv_node *cvn, *prev; + int skip_poll = 0; nfds_t nsockfds = 0; gpr_thd_id t_id; gpr_thd_options opt; @@ -1358,17 +1359,17 @@ static int cvfd_poll(struct pollfd *fds, nfds_t nfds, int timeout) { cvn->cv = pollcv; cvn->next = g_cvfds.cvfds[idx].cvs; g_cvfds.cvfds[idx].cvs = cvn; - // We should return immediately if there are pending events, - // but we still need to call poll() to check for socket events + // Don't bother polling if a wakeup fd is ready if (g_cvfds.cvfds[idx].is_set) { - timeout = 0; + skip_poll=1; } } else if (fds[i].fd >= 0) { nsockfds++; } } - if (nsockfds > 0) { + res = 0; + if (!skip_poll && nsockfds > 0) { pargs = gpr_malloc(sizeof(struct poll_args)); // Both the main thread and calling thread get a reference gpr_ref_init(&pargs->refcount, 2); @@ -1398,16 +1399,14 @@ static int cvfd_poll(struct pollfd *fds, nfds_t nfds, int timeout) { res = pargs->retval; errno = pargs->err; } else { - res = 0; errno = 0; gpr_atm_no_barrier_store(&pargs->status, CANCELLED); } - } else { + } else if (!skip_poll) { gpr_timespec deadline = gpr_now(GPR_CLOCK_REALTIME); deadline = gpr_time_add(deadline, gpr_time_from_millis(timeout, GPR_TIMESPAN)); gpr_cv_wait(pollcv, &g_cvfds.mu, deadline); - res = 0; } idx = 0; @@ -1431,7 +1430,7 @@ static int cvfd_poll(struct pollfd *fds, nfds_t nfds, int timeout) { fds[i].revents = POLLIN; if (res >= 0) res++; } - } else if (fds[i].fd >= 0 && + } else if (!skip_poll && fds[i].fd >= 0 && gpr_atm_no_barrier_load(&pargs->status) == COMPLETED) { fds[i].revents = pargs->fds[idx].revents; idx++; diff --git a/test/core/iomgr/wakeup_fd_cv_test.c b/test/core/iomgr/wakeup_fd_cv_test.c index 82452d2157..04ae9376dd 100644 --- a/test/core/iomgr/wakeup_fd_cv_test.c +++ b/test/core/iomgr/wakeup_fd_cv_test.c @@ -195,16 +195,15 @@ void test_poll_cv_trigger(void) { GPR_ASSERT(pfds[4].revents == 0); GPR_ASSERT(pfds[5].revents == 0); - // Pollin on wakeup fd + socket fd - trigger_socket_event(); + // Pollin on wakeupfd before poll() pargs.result = -2; gpr_thd_new(&t_id, &background_poll, &pargs, &opt); gpr_thd_join(t_id); - GPR_ASSERT(pargs.result == 2); + GPR_ASSERT(pargs.result == 1); GPR_ASSERT(pfds[0].revents == 0); GPR_ASSERT(pfds[1].revents == POLLIN); - GPR_ASSERT(pfds[2].revents == POLLIN); + GPR_ASSERT(pfds[2].revents == 0); GPR_ASSERT(pfds[3].revents == 0); GPR_ASSERT(pfds[4].revents == 0); GPR_ASSERT(pfds[5].revents == 0); -- cgit v1.2.3 From aa24e9a77d1865d2bfea3227720446cda7496c36 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 7 Nov 2016 11:05:50 -0800 Subject: Fixed unprotected access to lb policy data --- src/core/ext/lb_policy/grpclb/grpclb.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 30e412e358..6249f8b80f 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -756,6 +756,18 @@ static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { glb_policy->pending_picks = NULL; pending_ping *pping = glb_policy->pending_pings; glb_policy->pending_pings = NULL; + if (glb_policy->rr_policy) { + GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "glb_shutdown"); + } + if (glb_policy->started_picking) { + if (glb_policy->lb_call != NULL) { + grpc_call_cancel(glb_policy->lb_call, NULL); + /* lb_on_server_status_received will pick up the cancel and clean up */ + } + } + grpc_connectivity_state_set( + exec_ctx, &glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN, + GRPC_ERROR_CREATE("Channel Shutdown"), "glb_shutdown"); gpr_mu_unlock(&glb_policy->mu); while (pp != NULL) { @@ -772,22 +784,6 @@ static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { GRPC_ERROR_NONE, NULL); pping = next; } - - if (glb_policy->rr_policy) { - GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "glb_shutdown"); - } - - if (glb_policy->started_picking) { - if (glb_policy->lb_call != NULL) { - grpc_call_cancel(glb_policy->lb_call, NULL); - /* lb_on_server_status_received will pick up the cancellation and clean up - */ - } - } - - grpc_connectivity_state_set( - exec_ctx, &glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN, - GRPC_ERROR_CREATE("Channel Shutdown"), "glb_shutdown"); } static void glb_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, @@ -994,7 +990,7 @@ static void lb_call_init(glb_lb_policy *glb_policy) { BACKOFF_MAX_SECONDS * 1000); } -static void lb_call_destroy(glb_lb_policy *glb_policy) { +static void lb_call_destroy_locked(glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->lb_call != NULL); grpc_call_destroy(glb_policy->lb_call); glb_policy->lb_call = NULL; @@ -1199,7 +1195,7 @@ static void lb_on_server_status_received(grpc_exec_ctx *exec_ctx, void *arg, } /* We need to performe cleanups no matter what. */ - lb_call_destroy(glb_policy); + lb_call_destroy_locked(glb_policy); if (!glb_policy->shutting_down) { /* if we aren't shutting down, restart the LB client call after some time */ -- cgit v1.2.3 From c00688da74f3f37c7bb8f9a831940fa58e23f460 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 7 Nov 2016 11:27:35 -0800 Subject: Fix build problem. --- src/core/lib/channel/channel_stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index c6c90d8c16..15a272b2c3 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -259,7 +259,7 @@ void grpc_channel_next_get_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, const grpc_channel_info *channel_info) { grpc_channel_element *next_elem = elem + 1; - return next_elem->filter->get_channel_info(exec_ctx, next_elem, channel_info); + next_elem->filter->get_channel_info(exec_ctx, next_elem, channel_info); } void grpc_channel_next_op(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, -- cgit v1.2.3 From 3d88341c54ce8532066194383083ef61a766aa87 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 7 Nov 2016 13:42:54 -0800 Subject: Populate latency field in final_info. --- Makefile | 2 + src/core/ext/client_channel/client_channel.c | 4 +- src/core/ext/client_channel/subchannel.c | 6 +- src/core/ext/client_channel/subchannel.h | 4 +- src/core/lib/channel/channel_stack.c | 5 +- src/core/lib/channel/channel_stack.h | 3 +- src/core/lib/surface/call.c | 7 +- test/core/channel/channel_stack_test.c | 3 +- test/core/end2end/end2end_nosec_tests.c | 8 + test/core/end2end/end2end_tests.c | 8 + test/core/end2end/gen_build_yaml.py | 1 + test/core/end2end/tests/filter_latency.c | 338 ++++++++++ tools/run_tests/sources_and_headers.json | 2 + tools/run_tests/tests.json | 738 ++++++++++++++++++++- .../end2end_nosec_tests.vcxproj | 2 + .../end2end_nosec_tests.vcxproj.filters | 3 + .../tests/end2end_tests/end2end_tests.vcxproj | 2 + .../end2end_tests/end2end_tests.vcxproj.filters | 3 + 18 files changed, 1118 insertions(+), 21 deletions(-) create mode 100644 test/core/end2end/tests/filter_latency.c (limited to 'src/core') diff --git a/Makefile b/Makefile index da0152be10..ee06f7abe6 100644 --- a/Makefile +++ b/Makefile @@ -6936,6 +6936,7 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/empty_batch.c \ test/core/end2end/tests/filter_call_init_fails.c \ test/core/end2end/tests/filter_causes_close.c \ + test/core/end2end/tests/filter_latency.c \ test/core/end2end/tests/graceful_server_shutdown.c \ test/core/end2end/tests/high_initial_seqno.c \ test/core/end2end/tests/hpack_size.c \ @@ -7019,6 +7020,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/empty_batch.c \ test/core/end2end/tests/filter_call_init_fails.c \ test/core/end2end/tests/filter_causes_close.c \ + test/core/end2end/tests/filter_latency.c \ test/core/end2end/tests/graceful_server_shutdown.c \ test/core/end2end/tests/high_initial_seqno.c \ test/core/end2end/tests/hpack_size.c \ diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index ff773ac334..c2b5117ff9 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -617,7 +617,7 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, grpc_subchannel_call *subchannel_call = NULL; grpc_error *new_error = grpc_connected_subchannel_create_call( exec_ctx, calld->connected_subchannel, calld->pollent, calld->path, - calld->deadline, &subchannel_call); + calld->call_start_time, calld->deadline, &subchannel_call); if (new_error != GRPC_ERROR_NONE) { new_error = grpc_error_add_child(new_error, error); subchannel_call = CANCELLED_CALL; @@ -870,7 +870,7 @@ retry: grpc_subchannel_call *subchannel_call = NULL; grpc_error *error = grpc_connected_subchannel_create_call( exec_ctx, calld->connected_subchannel, calld->pollent, calld->path, - calld->deadline, &subchannel_call); + calld->call_start_time, calld->deadline, &subchannel_call); if (error != GRPC_ERROR_NONE) { subchannel_call = CANCELLED_CALL; fail_locked(exec_ctx, calld, GRPC_ERROR_REF(error)); diff --git a/src/core/ext/client_channel/subchannel.c b/src/core/ext/client_channel/subchannel.c index 789966cb69..fa10f622d8 100644 --- a/src/core/ext/client_channel/subchannel.c +++ b/src/core/ext/client_channel/subchannel.c @@ -702,15 +702,15 @@ grpc_connected_subchannel *grpc_subchannel_get_connected_subchannel( grpc_error *grpc_connected_subchannel_create_call( grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *con, - grpc_polling_entity *pollent, grpc_mdstr *path, gpr_timespec deadline, - grpc_subchannel_call **call) { + grpc_polling_entity *pollent, grpc_mdstr *path, gpr_timespec start_time, + gpr_timespec deadline, grpc_subchannel_call **call) { grpc_channel_stack *chanstk = CHANNEL_STACK_FROM_CONNECTION(con); *call = gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size); grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call); (*call)->connection = con; // Ref is added below. grpc_error *error = grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, *call, - NULL, NULL, path, deadline, callstk); + NULL, NULL, path, start_time, deadline, callstk); if (error != GRPC_ERROR_NONE) { const char *error_string = grpc_error_string(error); gpr_log(GPR_ERROR, "error: %s", error_string); diff --git a/src/core/ext/client_channel/subchannel.h b/src/core/ext/client_channel/subchannel.h index 93bd72d20d..10bae620df 100644 --- a/src/core/ext/client_channel/subchannel.h +++ b/src/core/ext/client_channel/subchannel.h @@ -111,8 +111,8 @@ void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx, /** construct a subchannel call */ grpc_error *grpc_connected_subchannel_create_call( grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *connected_subchannel, - grpc_polling_entity *pollent, grpc_mdstr *path, gpr_timespec deadline, - grpc_subchannel_call **subchannel_call); + grpc_polling_entity *pollent, grpc_mdstr *path, gpr_timespec start_time, + gpr_timespec deadline, grpc_subchannel_call **subchannel_call); /** process a transport level op */ void grpc_connected_subchannel_process_transport_op( diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 2c5367901d..45fc288c56 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -162,7 +162,8 @@ grpc_error *grpc_call_stack_init( grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack, int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg, grpc_call_context_element *context, const void *transport_server_data, - grpc_mdstr *path, gpr_timespec deadline, grpc_call_stack *call_stack) { + grpc_mdstr *path, gpr_timespec start_time, gpr_timespec deadline, + grpc_call_stack *call_stack) { grpc_channel_element *channel_elems = CHANNEL_ELEMS_FROM_STACK(channel_stack); grpc_call_element_args args; size_t count = channel_stack->count; @@ -179,7 +180,7 @@ grpc_error *grpc_call_stack_init( /* init per-filter data */ grpc_error *first_error = GRPC_ERROR_NONE; - args.start_time = gpr_now(GPR_CLOCK_MONOTONIC); + args.start_time = start_time; for (i = 0; i < count; i++) { args.call_stack = call_stack; args.server_transport_data = transport_server_data; diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 27f3be7b29..d890781919 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -227,7 +227,8 @@ grpc_error *grpc_call_stack_init( grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack, int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg, grpc_call_context_element *context, const void *transport_server_data, - grpc_mdstr *path, gpr_timespec deadline, grpc_call_stack *call_stack); + grpc_mdstr *path, gpr_timespec start_time, gpr_timespec deadline, + grpc_call_stack *call_stack); /* Set a pollset or a pollset_set for a call stack: must occur before the first * op is started */ void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 6c25952c0a..f26bd0a32c 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -122,6 +122,7 @@ struct grpc_call { grpc_channel *channel; grpc_call *parent; grpc_call *first_child; + gpr_timespec start_time; /* TODO(ctiller): share with cq if possible? */ gpr_mu mu; @@ -239,6 +240,7 @@ grpc_error *grpc_call_create(const grpc_call_create_args *args, call->channel = args->channel; call->cq = args->cq; call->parent = args->parent_call; + call->start_time = gpr_now(GPR_CLOCK_MONOTONIC); /* Always support no compression */ GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_COMPRESS_NONE); call->is_client = args->server_transport_data == NULL; @@ -314,7 +316,8 @@ grpc_error *grpc_call_create(const grpc_call_create_args *args, grpc_error *error = grpc_call_stack_init(&exec_ctx, channel_stack, 1, destroy_call, call, call->context, args->server_transport_data, path, - send_deadline, CALL_STACK_FROM_CALL(call)); + call->start_time, send_deadline, + CALL_STACK_FROM_CALL(call)); if (error != GRPC_ERROR_NONE) { grpc_status_code status; const char *error_str; @@ -427,6 +430,8 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call, get_final_status(call, set_status_value_directly, &c->final_info.final_status); + c->final_info.stats.latency = + gpr_time_sub(gpr_now(GPR_CLOCK_MONOTONIC), c->start_time); grpc_call_stack_destroy(exec_ctx, CALL_STACK_FROM_CALL(c), &c->final_info, c); GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, "call"); diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index 26fc3dc4a8..f1816ae46f 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -138,7 +138,8 @@ static void test_create_channel_stack(void) { call_stack = gpr_malloc(channel_stack->call_stack_size); grpc_error *error = grpc_call_stack_init( &exec_ctx, channel_stack, 1, free_call, call_stack, NULL, NULL, path, - gpr_inf_future(GPR_CLOCK_MONOTONIC), call_stack); + gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC), + call_stack); GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(call_stack->count == 1); call_elem = grpc_call_stack_element(call_stack, 0); diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c index caaa97c215..6bbc58c6d0 100644 --- a/test/core/end2end/end2end_nosec_tests.c +++ b/test/core/end2end/end2end_nosec_tests.c @@ -73,6 +73,8 @@ extern void filter_call_init_fails(grpc_end2end_test_config config); extern void filter_call_init_fails_pre_init(void); extern void filter_causes_close(grpc_end2end_test_config config); extern void filter_causes_close_pre_init(void); +extern void filter_latency(grpc_end2end_test_config config); +extern void filter_latency_pre_init(void); extern void graceful_server_shutdown(grpc_end2end_test_config config); extern void graceful_server_shutdown_pre_init(void); extern void high_initial_seqno(grpc_end2end_test_config config); @@ -150,6 +152,7 @@ void grpc_end2end_tests_pre_init(void) { empty_batch_pre_init(); filter_call_init_fails_pre_init(); filter_causes_close_pre_init(); + filter_latency_pre_init(); graceful_server_shutdown_pre_init(); high_initial_seqno_pre_init(); hpack_size_pre_init(); @@ -203,6 +206,7 @@ void grpc_end2end_tests(int argc, char **argv, empty_batch(config); filter_call_init_fails(config); filter_causes_close(config); + filter_latency(config); graceful_server_shutdown(config); high_initial_seqno(config); hpack_size(config); @@ -296,6 +300,10 @@ void grpc_end2end_tests(int argc, char **argv, filter_causes_close(config); continue; } + if (0 == strcmp("filter_latency", argv[i])) { + filter_latency(config); + continue; + } if (0 == strcmp("graceful_server_shutdown", argv[i])) { graceful_server_shutdown(config); continue; diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index 6d17e686e6..9d49e14a91 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -75,6 +75,8 @@ extern void filter_call_init_fails(grpc_end2end_test_config config); extern void filter_call_init_fails_pre_init(void); extern void filter_causes_close(grpc_end2end_test_config config); extern void filter_causes_close_pre_init(void); +extern void filter_latency(grpc_end2end_test_config config); +extern void filter_latency_pre_init(void); extern void graceful_server_shutdown(grpc_end2end_test_config config); extern void graceful_server_shutdown_pre_init(void); extern void high_initial_seqno(grpc_end2end_test_config config); @@ -153,6 +155,7 @@ void grpc_end2end_tests_pre_init(void) { empty_batch_pre_init(); filter_call_init_fails_pre_init(); filter_causes_close_pre_init(); + filter_latency_pre_init(); graceful_server_shutdown_pre_init(); high_initial_seqno_pre_init(); hpack_size_pre_init(); @@ -207,6 +210,7 @@ void grpc_end2end_tests(int argc, char **argv, empty_batch(config); filter_call_init_fails(config); filter_causes_close(config); + filter_latency(config); graceful_server_shutdown(config); high_initial_seqno(config); hpack_size(config); @@ -304,6 +308,10 @@ void grpc_end2end_tests(int argc, char **argv, filter_causes_close(config); continue; } + if (0 == strcmp("filter_latency", argv[i])) { + filter_latency(config); + continue; + } if (0 == strcmp("graceful_server_shutdown", argv[i])) { graceful_server_shutdown(config); continue; diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 7f33e07a00..a286bbc181 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -111,6 +111,7 @@ END2END_TESTS = { 'empty_batch': default_test_options, 'filter_causes_close': default_test_options, 'filter_call_init_fails': default_test_options, + 'filter_latency': default_test_options, 'graceful_server_shutdown': default_test_options._replace(cpu_cost=LOWCPU), 'hpack_size': default_test_options._replace(proxyable=False, traceable=False), diff --git a/test/core/end2end/tests/filter_latency.c b/test/core/end2end/tests/filter_latency.c new file mode 100644 index 0000000000..b64635ebb3 --- /dev/null +++ b/test/core/end2end/tests/filter_latency.c @@ -0,0 +1,338 @@ +/* + * + * 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 "test/core/end2end/end2end_tests.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_stack_builder.h" +#include "src/core/lib/surface/channel_init.h" +#include "test/core/end2end/cq_verifier.h" + +enum { TIMEOUT = 200000 }; + +static bool g_enable_filter = false; +static gpr_timespec g_client_latency; +static gpr_timespec g_server_latency; + +static void *tag(intptr_t t) { return (void *)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char *test_name, + grpc_channel_args *client_args, + grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "%s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_time(int n) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); +} + +static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } + +static void drain_cq(grpc_completion_queue *cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture *f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = NULL; +} + +static void shutdown_client(grpc_end2end_test_fixture *f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = NULL; +} + +static void end_test(grpc_end2end_test_fixture *f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); +} + +// Simple request via a server filter that always fails to initialize +// the call. +static void test_request(grpc_end2end_test_config config) { + grpc_call *c; + grpc_call *s; + gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_byte_buffer *request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + gpr_timespec deadline = five_seconds_time(); + grpc_end2end_test_fixture f = + begin_test(config, "filter_latency", NULL, NULL); + cq_verifier *cqv = cq_verifier_create(f.cq); + grpc_op ops[6]; + grpc_op *op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_byte_buffer *request_payload_recv = NULL; + grpc_call_details call_details; + grpc_status_code status; + grpc_call_error error; + char *details = NULL; + size_t details_capacity = 0; + int was_cancelled = 2; + + g_client_latency = gpr_time_0(GPR_TIMESPAN); + g_server_latency = gpr_time_0(GPR_TIMESPAN); + const gpr_timespec start_time = gpr_now(GPR_CLOCK_MONOTONIC); + + c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, + "/foo", "foo.test.google.fr", deadline, NULL); + GPR_ASSERT(c); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->data.send_initial_metadata.metadata = NULL; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = request_payload; + 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_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++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(101), 1); + cq_verify(cqv); + + memset(ops, 0, sizeof(ops)); + 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_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_UNIMPLEMENTED; + op->data.send_status_from_server.status_details = "xyz"; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), 1); + CQ_EXPECT_COMPLETION(cqv, tag(1), 1); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED); + GPR_ASSERT(0 == strcmp(details, "xyz")); + + gpr_free(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + + grpc_call_destroy(c); + grpc_call_destroy(s); + + const gpr_timespec end_time = gpr_now(GPR_CLOCK_MONOTONIC); + const gpr_timespec max_latency = gpr_time_sub(end_time, start_time); + + GPR_ASSERT(gpr_time_cmp(max_latency, g_client_latency) >= 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_0(GPR_TIMESPAN), g_client_latency) < 0); + GPR_ASSERT(gpr_time_cmp(max_latency, g_server_latency) >= 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_0(GPR_TIMESPAN), g_server_latency) < 0); + + cq_verifier_destroy(cqv); + + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(request_payload_recv); + + end_test(&f); + config.tear_down_data(&f); +} + +/******************************************************************************* + * Test filter + */ + +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { + return GRPC_ERROR_NONE; +} + +static void client_destroy_call_elem( + grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_final_info *final_info, void *and_free_memory) { + g_client_latency = final_info->stats.latency; +} + +static void server_destroy_call_elem( + grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_final_info *final_info, void *and_free_memory) { + g_server_latency = final_info->stats.latency; +} + +static void init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) {} + +static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem) {} + +static const grpc_channel_filter test_client_filter = { + grpc_call_next_op, + grpc_channel_next_op, + 0, + init_call_elem, + grpc_call_stack_ignore_set_pollset_or_pollset_set, + client_destroy_call_elem, + 0, + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "filter_latency"}; + +static const grpc_channel_filter test_server_filter = { + grpc_call_next_op, + grpc_channel_next_op, + 0, + init_call_elem, + grpc_call_stack_ignore_set_pollset_or_pollset_set, + server_destroy_call_elem, + 0, + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "filter_latency"}; + +/******************************************************************************* + * Registration + */ + +static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) { + grpc_channel_filter* filter = arg; + if (g_enable_filter) { + // Want to add the filter as close to the end as possible, to make + // sure that all of the filters work well together. However, we + // can't add it at the very end, because the connected channel filter + // must be the last one. So we add it right before the last one. + grpc_channel_stack_builder_iterator *it = + grpc_channel_stack_builder_create_iterator_at_last(builder); + GPR_ASSERT(grpc_channel_stack_builder_move_prev(it)); + const bool retval = grpc_channel_stack_builder_add_filter_before( + it, filter, NULL, NULL); + grpc_channel_stack_builder_iterator_destroy(it); + return retval; + } else { + return true; + } +} + +static void init_plugin(void) { + grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX, + maybe_add_filter, (void*)&test_client_filter); + grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX, + maybe_add_filter, (void*)&test_server_filter); +} + +static void destroy_plugin(void) {} + +void filter_latency(grpc_end2end_test_config config) { + g_enable_filter = true; + test_request(config); + g_enable_filter = false; +} + +void filter_latency_pre_init(void) { + grpc_register_plugin(init_plugin, destroy_plugin); +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 835d7beff1..b2d60248bd 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6234,6 +6234,7 @@ "test/core/end2end/tests/empty_batch.c", "test/core/end2end/tests/filter_call_init_fails.c", "test/core/end2end/tests/filter_causes_close.c", + "test/core/end2end/tests/filter_latency.c", "test/core/end2end/tests/graceful_server_shutdown.c", "test/core/end2end/tests/high_initial_seqno.c", "test/core/end2end/tests/hpack_size.c", @@ -6300,6 +6301,7 @@ "test/core/end2end/tests/empty_batch.c", "test/core/end2end/tests/filter_call_init_fails.c", "test/core/end2end/tests/filter_causes_close.c", + "test/core/end2end/tests/filter_latency.c", "test/core/end2end/tests/graceful_server_shutdown.c", "test/core/end2end/tests/high_initial_seqno.c", "test/core/end2end/tests/hpack_size.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 49c6d38300..4e26d4ab84 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -5301,6 +5301,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -6338,6 +6361,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -7359,6 +7405,28 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -8296,6 +8364,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -9287,6 +9378,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -10258,6 +10372,25 @@ "linux" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, { "args": [ "graceful_server_shutdown" @@ -11179,6 +11312,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -12184,6 +12340,30 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -13250,6 +13430,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -14301,6 +14504,30 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -15333,6 +15560,30 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -16223,14 +16474,14 @@ }, { "args": [ - "graceful_server_shutdown" + "filter_latency" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -16247,14 +16498,14 @@ }, { "args": [ - "high_initial_seqno" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -16271,7 +16522,7 @@ }, { "args": [ - "hpack_size" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -16295,7 +16546,7 @@ }, { "args": [ - "idempotent_request" + "hpack_size" ], "ci_platforms": [ "windows", @@ -16319,7 +16570,7 @@ }, { "args": [ - "invoke_large_request" + "idempotent_request" ], "ci_platforms": [ "windows", @@ -16343,7 +16594,7 @@ }, { "args": [ - "large_metadata" + "invoke_large_request" ], "ci_platforms": [ "windows", @@ -16367,7 +16618,31 @@ }, { "args": [ - "load_reporting_hook" + "large_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "load_reporting_hook" ], "ci_platforms": [ "windows", @@ -17181,6 +17456,30 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -18095,6 +18394,32 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -19141,6 +19466,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -20178,6 +20526,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -21181,6 +21552,30 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -22102,6 +22497,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -23116,6 +23534,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -24130,6 +24571,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -25073,6 +25537,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -26041,6 +26528,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -26993,6 +27503,25 @@ "linux" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, { "args": [ "graceful_server_shutdown" @@ -27891,6 +28420,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -28872,6 +29424,30 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -29915,6 +30491,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -30894,6 +31493,30 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -31758,6 +32381,30 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -32694,6 +33341,30 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -33582,6 +34253,32 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" @@ -34580,6 +35277,29 @@ "posix" ] }, + { + "args": [ + "filter_latency" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "graceful_server_shutdown" diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj index a47c40f0f7..26d876c2da 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj @@ -183,6 +183,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters index 71cf6838fe..36e3b63298 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters @@ -49,6 +49,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj index 68ff5f1ebd..768659f660 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj @@ -185,6 +185,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters index 7a620f61a5..e737c880f4 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters @@ -52,6 +52,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests -- cgit v1.2.3 From 859cce41dcd58ed4e7fb9fff0517c39db05bda4a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 7 Nov 2016 13:44:35 -0800 Subject: clang-format --- src/core/lib/surface/call.c | 9 ++++----- test/core/channel/channel_stack_test.c | 8 ++++---- test/core/end2end/tests/filter_latency.c | 28 ++++++++++++++++------------ 3 files changed, 24 insertions(+), 21 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index f26bd0a32c..ae64076534 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -313,11 +313,10 @@ grpc_error *grpc_call_create(const grpc_call_create_args *args, GRPC_CHANNEL_INTERNAL_REF(args->channel, "call"); /* initial refcount dropped by grpc_call_destroy */ - grpc_error *error = - grpc_call_stack_init(&exec_ctx, channel_stack, 1, destroy_call, call, - call->context, args->server_transport_data, path, - call->start_time, send_deadline, - CALL_STACK_FROM_CALL(call)); + grpc_error *error = grpc_call_stack_init( + &exec_ctx, channel_stack, 1, destroy_call, call, call->context, + args->server_transport_data, path, call->start_time, send_deadline, + CALL_STACK_FROM_CALL(call)); if (error != GRPC_ERROR_NONE) { grpc_status_code status; const char *error_str; diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index f1816ae46f..ca50684ac4 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -136,10 +136,10 @@ static void test_create_channel_stack(void) { GPR_ASSERT(*channel_data == 0); call_stack = gpr_malloc(channel_stack->call_stack_size); - grpc_error *error = grpc_call_stack_init( - &exec_ctx, channel_stack, 1, free_call, call_stack, NULL, NULL, path, - gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC), - call_stack); + grpc_error *error = + grpc_call_stack_init(&exec_ctx, channel_stack, 1, free_call, call_stack, + NULL, NULL, path, gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC), call_stack); GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(call_stack->count == 1); call_elem = grpc_call_stack_element(call_stack, 0); diff --git a/test/core/end2end/tests/filter_latency.c b/test/core/end2end/tests/filter_latency.c index b64635ebb3..c93fd1b00a 100644 --- a/test/core/end2end/tests/filter_latency.c +++ b/test/core/end2end/tests/filter_latency.c @@ -133,7 +133,7 @@ static void test_request(grpc_end2end_test_config config) { g_client_latency = gpr_time_0(GPR_TIMESPAN); g_server_latency = gpr_time_0(GPR_TIMESPAN); - const gpr_timespec start_time = gpr_now(GPR_CLOCK_MONOTONIC); + const gpr_timespec start_time = gpr_now(GPR_CLOCK_MONOTONIC); c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", "foo.test.google.fr", deadline, NULL); @@ -250,15 +250,17 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, return GRPC_ERROR_NONE; } -static void client_destroy_call_elem( - grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - const grpc_call_final_info *final_info, void *and_free_memory) { +static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + const grpc_call_final_info *final_info, + void *and_free_memory) { g_client_latency = final_info->stats.latency; } -static void server_destroy_call_elem( - grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - const grpc_call_final_info *final_info, void *and_free_memory) { +static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + const grpc_call_final_info *final_info, + void *and_free_memory) { g_server_latency = final_info->stats.latency; } @@ -300,7 +302,7 @@ static const grpc_channel_filter test_server_filter = { */ static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) { - grpc_channel_filter* filter = arg; + grpc_channel_filter *filter = arg; if (g_enable_filter) { // Want to add the filter as close to the end as possible, to make // sure that all of the filters work well together. However, we @@ -309,8 +311,8 @@ static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) { grpc_channel_stack_builder_iterator *it = grpc_channel_stack_builder_create_iterator_at_last(builder); GPR_ASSERT(grpc_channel_stack_builder_move_prev(it)); - const bool retval = grpc_channel_stack_builder_add_filter_before( - it, filter, NULL, NULL); + const bool retval = + grpc_channel_stack_builder_add_filter_before(it, filter, NULL, NULL); grpc_channel_stack_builder_iterator_destroy(it); return retval; } else { @@ -320,9 +322,11 @@ static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) { static void init_plugin(void) { grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX, - maybe_add_filter, (void*)&test_client_filter); + maybe_add_filter, + (void *)&test_client_filter); grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX, - maybe_add_filter, (void*)&test_server_filter); + maybe_add_filter, + (void *)&test_server_filter); } static void destroy_plugin(void) {} -- cgit v1.2.3 From a9cf87d9e456621297afccdcfc9072df7630840c Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 7 Nov 2016 17:43:15 -0800 Subject: Fixed wrong connectivity status updates for RR --- src/core/ext/lb_policy/round_robin/round_robin.c | 310 ++++++++++++++--------- 1 file changed, 193 insertions(+), 117 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 0fd3abe099..f83ae1b1e9 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -59,6 +59,7 @@ * the subchannel by the caller. */ +#include #include #include @@ -116,8 +117,13 @@ typedef struct { grpc_closure connectivity_changed_closure; /** this subchannels current position in subchannel->ready_list */ ready_list *ready_list_node; - /** last observed connectivity */ - grpc_connectivity_state connectivity_state; + /** last observed connectivity. Not updated by + * \a grpc_subchannel_notify_on_state_change. Used to determine the previous + * state while processing the new state in \a rr_connectivity_changed */ + grpc_connectivity_state prev_connectivity_state; + /** current connectivity state. Updated by \a + * grpc_subchannel_notify_on_state_change */ + grpc_connectivity_state curr_connectivity_state; /** the subchannel's target user data */ void *user_data; /** vtable to operate over \a user_data */ @@ -127,6 +133,7 @@ typedef struct { struct round_robin_lb_policy { /** base policy: must be first */ grpc_lb_policy base; + gpr_mu mu; /** total number of addresses received at creation time */ size_t num_addresses; @@ -135,8 +142,11 @@ struct round_robin_lb_policy { size_t num_subchannels; subchannel_data **subchannels; - /** mutex protecting remaining members */ - gpr_mu mu; + /** how many subchannels are in TRANSIENT_FAILURE */ + size_t num_transient_failures; + /** how many subchannels are IDLE */ + size_t num_idle; + /** have we started picking? */ int started_picking; /** are we shutting down? */ @@ -258,6 +268,10 @@ static void remove_disconnected_sc_locked(round_robin_lb_policy *p, gpr_free(node); } +static bool is_ready_list_empty(round_robin_lb_policy *p) { + return p->ready_list.prev == NULL; +} + static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { round_robin_lb_policy *p = (round_robin_lb_policy *)pol; ready_list *elem; @@ -268,7 +282,7 @@ static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { for (size_t i = 0; i < p->num_subchannels; i++) { subchannel_data *sd = p->subchannels[i]; - GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin_destroy"); + GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "rr_destroy"); if (sd->user_data != NULL) { GPR_ASSERT(sd->user_data_vtable != NULL); sd->user_data_vtable->destroy(sd->user_data); @@ -381,18 +395,18 @@ static void start_picking(grpc_exec_ctx *exec_ctx, round_robin_lb_policy *p) { size_t i; p->started_picking = 1; - if (grpc_lb_round_robin_trace) { - gpr_log(GPR_DEBUG, "LB_POLICY: p=%p num_subchannels=%" PRIuPTR, (void *)p, - p->num_subchannels); - } - for (i = 0; i < p->num_subchannels; i++) { subchannel_data *sd = p->subchannels[i]; - sd->connectivity_state = GRPC_CHANNEL_IDLE; + /* use some sentinel value outside of the range of grpc_connectivity_state + * to signal an undefined previous state. We won't be referring to this + * value again and it'll be overwritten after the first call to + * rr_connectivity_changed */ + sd->prev_connectivity_state = INT_MAX; + sd->curr_connectivity_state = GRPC_CHANNEL_IDLE; + GRPC_LB_POLICY_WEAK_REF(&p->base, "rr_connectivity"); grpc_subchannel_notify_on_state_change( exec_ctx, sd->subchannel, p->base.interested_parties, - &sd->connectivity_state, &sd->connectivity_changed_closure); - GRPC_LB_POLICY_WEAK_REF(&p->base, "round_robin_connectivity"); + &sd->curr_connectivity_state, &sd->connectivity_changed_closure); } } @@ -453,125 +467,182 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, } } +static void update_state_counters(subchannel_data *sd) { + round_robin_lb_policy *p = sd->policy; + + /* update p->num_transient_failures (resp. p->num_idle): if the previous + * state was TRANSIENT_FAILURE (resp. IDLE), decrement + * p->num_transient_failures (resp. p->num_idle). */ + if (sd->prev_connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) { + GPR_ASSERT(p->num_transient_failures > 0); + --p->num_transient_failures; + } else if (sd->prev_connectivity_state == GRPC_CHANNEL_IDLE) { + GPR_ASSERT(p->num_idle > 0); + --p->num_idle; + } +} + +/* sd is the subchannel_data associted with the updated subchannel. + * shutdown_error will only be used upon policy transition to TRANSIENT_FAILURE + * or SHUTDOWN */ +static grpc_connectivity_state update_lb_connectivity_status( + grpc_exec_ctx *exec_ctx, subchannel_data *sd, grpc_error *error) { + /* In priority order. The first rule to match terminates the search (ie, if we + * are on rule n, all previous rules were unfulfilled). + * + * 1) RULE: ANY subchannel is READY => policy is READY. + * CHECK: At least one subchannel is ready iff p->ready_list is NOT empty. + * + * 2) RULE: ANY subchannel is CONNECTING => policy is CONNECTING. + * CHECK: sd->curr_connectivity_state == CONNECTING. + * + * 3) RULE: ALL subchannels are SHUTDOWN => policy is SHUTDOWN. + * CHECK: p->num_subchannels = 0. + * + * 4) RULE: ALL subchannels are TRANSIENT_FAILURE => policy is + * TRANSIENT_FAILURE. + * CHECK: p->num_transient_failures == p->num_subchannels. + * + * 5) RULE: ALL subchannels are IDLE => policy is IDLE. + * CHECK: p->num_idle == p->num_subchannels. + */ + round_robin_lb_policy *p = sd->policy; + if (!is_ready_list_empty(p)) { /* 1) READY */ + grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_READY, + GRPC_ERROR_NONE, "rr_ready"); + return GRPC_CHANNEL_READY; + } else if (sd->curr_connectivity_state == + GRPC_CHANNEL_CONNECTING) { /* 2) CONNECTING */ + grpc_connectivity_state_set(exec_ctx, &p->state_tracker, + GRPC_CHANNEL_CONNECTING, GRPC_ERROR_NONE, + "rr_connecting"); + return GRPC_CHANNEL_CONNECTING; + } else if (p->num_subchannels == 0) { /* 3) SHUTDOWN */ + grpc_connectivity_state_set(exec_ctx, &p->state_tracker, + GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_REF(error), + "rr_shutdown"); + return GRPC_CHANNEL_SHUTDOWN; + } else if (p->num_transient_failures == + p->num_subchannels) { /* 4) TRANSIENT_FAILURE */ + grpc_connectivity_state_set(exec_ctx, &p->state_tracker, + GRPC_CHANNEL_TRANSIENT_FAILURE, + GRPC_ERROR_REF(error), "rr_transient_failure"); + return GRPC_CHANNEL_TRANSIENT_FAILURE; + } else if (p->num_idle == p->num_subchannels) { /* 5) IDLE */ + grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_IDLE, + GRPC_ERROR_NONE, "rr_idle"); + return GRPC_CHANNEL_IDLE; + } + /* no change */ + return sd->curr_connectivity_state; +} + static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { subchannel_data *sd = arg; round_robin_lb_policy *p = sd->policy; pending_pick *pp; - int unref = 0; - GRPC_ERROR_REF(error); gpr_mu_lock(&p->mu); if (p->shutdown) { - unref = 1; - } else { - switch (sd->connectivity_state) { - case GRPC_CHANNEL_READY: - grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_READY, GRPC_ERROR_REF(error), - "connecting_ready"); - /* add the newly connected subchannel to the list of connected ones. - * Note that it goes to the "end of the line". */ - sd->ready_list_node = add_connected_sc_locked(p, sd); - /* at this point we know there's at least one suitable subchannel. Go - * ahead and pick one and notify the pending suitors in - * p->pending_picks. This preemtively replicates rr_pick()'s actions. */ - ready_list *selected = peek_next_connected_locked(p); - GPR_ASSERT(selected != NULL); - if (p->pending_picks != NULL) { - /* if the selected subchannel is going to be used for the pending - * picks, update the last picked pointer */ - advance_last_picked_locked(p); + gpr_mu_unlock(&p->mu); + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "rr_connectivity"); + GRPC_ERROR_UNREF(error); + return; + } + switch (sd->curr_connectivity_state) { + case GRPC_CHANNEL_READY: + /* add the newly connected subchannel to the list of connected ones. + * Note that it goes to the "end of the line". */ + sd->ready_list_node = add_connected_sc_locked(p, sd); + /* at this point we know there's at least one suitable subchannel. Go + * ahead and pick one and notify the pending suitors in + * p->pending_picks. This preemtively replicates rr_pick()'s actions. */ + ready_list *selected = peek_next_connected_locked(p); + GPR_ASSERT(selected != NULL); + if (p->pending_picks != NULL) { + /* if the selected subchannel is going to be used for the pending + * picks, update the last picked pointer */ + advance_last_picked_locked(p); + } + while ((pp = p->pending_picks)) { + p->pending_picks = pp->next; + *pp->target = GRPC_CONNECTED_SUBCHANNEL_REF( + grpc_subchannel_get_connected_subchannel(selected->subchannel), + "rr_picked"); + if (pp->user_data != NULL) { + *pp->user_data = selected->user_data; } - + if (grpc_lb_round_robin_trace) { + gpr_log(GPR_DEBUG, + "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)", + (void *)selected->subchannel, (void *)selected); + } + grpc_exec_ctx_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, NULL); + gpr_free(pp); + } + /* renew notification: reuses the "rr_connectivity" weak ref */ + grpc_subchannel_notify_on_state_change( + exec_ctx, sd->subchannel, p->base.interested_parties, + &sd->curr_connectivity_state, &sd->connectivity_changed_closure); + update_lb_connectivity_status(exec_ctx, sd, error); + sd->prev_connectivity_state = sd->curr_connectivity_state; + break; + case GRPC_CHANNEL_IDLE: + ++p->num_idle; + /* fallthrough */ + case GRPC_CHANNEL_CONNECTING: + update_state_counters(sd); + /* renew notification: reuses the "rr_connectivity" weak ref */ + grpc_subchannel_notify_on_state_change( + exec_ctx, sd->subchannel, p->base.interested_parties, + &sd->curr_connectivity_state, &sd->connectivity_changed_closure); + update_lb_connectivity_status(exec_ctx, sd, error); + sd->prev_connectivity_state = sd->curr_connectivity_state; + break; + case GRPC_CHANNEL_TRANSIENT_FAILURE: + ++p->num_transient_failures; + /* remove from ready list if still present */ + if (sd->ready_list_node != NULL) { + remove_disconnected_sc_locked(p, sd->ready_list_node); + sd->ready_list_node = NULL; + } + /* renew notification: reuses the "rr_connectivity" weak ref */ + grpc_subchannel_notify_on_state_change( + exec_ctx, sd->subchannel, p->base.interested_parties, + &sd->curr_connectivity_state, &sd->connectivity_changed_closure); + update_lb_connectivity_status(exec_ctx, sd, error); + sd->prev_connectivity_state = sd->curr_connectivity_state; + break; + case GRPC_CHANNEL_SHUTDOWN: + update_state_counters(sd); + if (sd->ready_list_node != NULL) { + remove_disconnected_sc_locked(p, sd->ready_list_node); + sd->ready_list_node = NULL; + } + --p->num_subchannels; + GPR_SWAP(subchannel_data *, p->subchannels[sd->index], + p->subchannels[p->num_subchannels]); + GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "rr_subchannel_shutdown"); + p->subchannels[sd->index]->index = sd->index; + if (update_lb_connectivity_status(exec_ctx, sd, error) == + GRPC_CHANNEL_SHUTDOWN) { + /* the policy is shutting down. Flush all the pending picks... */ while ((pp = p->pending_picks)) { p->pending_picks = pp->next; - - *pp->target = GRPC_CONNECTED_SUBCHANNEL_REF( - grpc_subchannel_get_connected_subchannel(selected->subchannel), - "picked"); - if (pp->user_data != NULL) { - *pp->user_data = selected->user_data; - } - if (grpc_lb_round_robin_trace) { - gpr_log(GPR_DEBUG, - "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)", - (void *)selected->subchannel, (void *)selected); - } + *pp->target = NULL; grpc_exec_ctx_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, NULL); gpr_free(pp); } - grpc_subchannel_notify_on_state_change( - exec_ctx, sd->subchannel, p->base.interested_parties, - &sd->connectivity_state, &sd->connectivity_changed_closure); - break; - case GRPC_CHANNEL_CONNECTING: - case GRPC_CHANNEL_IDLE: - grpc_connectivity_state_set( - exec_ctx, &p->state_tracker, sd->connectivity_state, - GRPC_ERROR_REF(error), "connecting_changed"); - grpc_subchannel_notify_on_state_change( - exec_ctx, sd->subchannel, p->base.interested_parties, - &sd->connectivity_state, &sd->connectivity_changed_closure); - break; - case GRPC_CHANNEL_TRANSIENT_FAILURE: - /* renew state notification */ - grpc_subchannel_notify_on_state_change( - exec_ctx, sd->subchannel, p->base.interested_parties, - &sd->connectivity_state, &sd->connectivity_changed_closure); - - /* remove from ready list if still present */ - if (sd->ready_list_node != NULL) { - remove_disconnected_sc_locked(p, sd->ready_list_node); - sd->ready_list_node = NULL; - } - grpc_connectivity_state_set( - exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, - GRPC_ERROR_REF(error), "connecting_transient_failure"); - break; - case GRPC_CHANNEL_SHUTDOWN: - if (sd->ready_list_node != NULL) { - remove_disconnected_sc_locked(p, sd->ready_list_node); - sd->ready_list_node = NULL; - } - - p->num_subchannels--; - GPR_SWAP(subchannel_data *, p->subchannels[sd->index], - p->subchannels[p->num_subchannels]); - GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin"); - p->subchannels[sd->index]->index = sd->index; - gpr_free(sd); - - unref = 1; - if (p->num_subchannels == 0) { - grpc_connectivity_state_set( - exec_ctx, &p->state_tracker, GRPC_CHANNEL_SHUTDOWN, - GRPC_ERROR_CREATE_REFERENCING("Round Robin Channels Exhausted", - &error, 1), - "no_more_channels"); - while ((pp = p->pending_picks)) { - p->pending_picks = pp->next; - *pp->target = NULL; - grpc_exec_ctx_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, - NULL); - gpr_free(pp); - } - } else { - grpc_connectivity_state_set( - exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, - GRPC_ERROR_REF(error), "subchannel_failed"); - } - } /* switch */ - } /* !unref */ - - gpr_mu_unlock(&p->mu); - - if (unref) { - GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "round_robin_connectivity"); + } + gpr_free(sd); + /* unref the "rr_connectivity" weak ref from start_picking */ + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "rr_connectivity"); + break; } - + gpr_mu_unlock(&p->mu); GRPC_ERROR_UNREF(error); } @@ -607,9 +678,9 @@ static void rr_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, gpr_mu_unlock(&p->mu); target = GRPC_CONNECTED_SUBCHANNEL_REF( grpc_subchannel_get_connected_subchannel(selected->subchannel), - "picked"); + "rr_picked"); grpc_connected_subchannel_ping(exec_ctx, target, closure); - GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, target, "picked"); + GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, target, "rr_picked"); } else { gpr_mu_unlock(&p->mu); grpc_exec_ctx_sched(exec_ctx, closure, @@ -705,6 +776,11 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, grpc_lb_policy_init(&p->base, &round_robin_lb_policy_vtable); grpc_connectivity_state_init(&p->state_tracker, GRPC_CHANNEL_IDLE, "round_robin"); + + if (grpc_lb_round_robin_trace) { + gpr_log(GPR_DEBUG, "Created RR policy at %p with %lu subchannels", + (void *)p, (unsigned long)p->num_subchannels); + } gpr_mu_init(&p->mu); return &p->base; } -- cgit v1.2.3 From 944d39d4f5ed34a87e5aac5ad236c120cfa89e84 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 8 Nov 2016 07:31:21 -0800 Subject: Remove errant header --- src/core/lib/support/env.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/support/env.h b/src/core/lib/support/env.h index 1a24216656..6ada5d9390 100644 --- a/src/core/lib/support/env.h +++ b/src/core/lib/support/env.h @@ -36,8 +36,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif -- cgit v1.2.3 From e6684f415e32b9317f549c64ff05f44e7fe71cfd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 8 Nov 2016 08:17:43 -0800 Subject: Remove legacy poller --- BUILD | 8 - CMakeLists.txt | 3 - Makefile | 4 - binding.gyp | 1 - build.yaml | 2 - config.m4 | 1 - gRPC-Core.podspec | 3 - grpc.gemspec | 2 - package.xml | 2 - src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 2076 -------------------- src/core/lib/iomgr/ev_poll_and_epoll_posix.h | 41 - src/core/lib/iomgr/ev_posix.c | 2 - src/python/grpcio/grpc_core_dependencies.py | 1 - tools/doxygen/Doxyfile.core.internal | 2 - tools/run_tests/run_tests.py | 2 +- tools/run_tests/sources_and_headers.json | 3 - vsprojects/vcxproj/grpc/grpc.vcxproj | 3 - vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 - .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 - .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 - .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 - .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 - 22 files changed, 1 insertion(+), 2179 deletions(-) delete mode 100644 src/core/lib/iomgr/ev_poll_and_epoll_posix.c delete mode 100644 src/core/lib/iomgr/ev_poll_and_epoll_posix.h (limited to 'src/core') diff --git a/BUILD b/BUILD index 8690052bc4..1d1635a1aa 100644 --- a/BUILD +++ b/BUILD @@ -185,7 +185,6 @@ cc_library( "src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -358,7 +357,6 @@ cc_library( "src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -611,7 +609,6 @@ cc_library( "src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -769,7 +766,6 @@ cc_library( "src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -992,7 +988,6 @@ cc_library( "src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -1142,7 +1137,6 @@ cc_library( "src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -2003,7 +1997,6 @@ objc_library( "src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -2235,7 +2228,6 @@ objc_library( "src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index b551ce3411..9dfe71662b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -314,7 +314,6 @@ add_library(grpc src/core/lib/iomgr/endpoint_pair_windows.c src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c - src/core/lib/iomgr/ev_poll_and_epoll_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c @@ -587,7 +586,6 @@ add_library(grpc_cronet src/core/lib/iomgr/endpoint_pair_windows.c src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c - src/core/lib/iomgr/ev_poll_and_epoll_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c @@ -832,7 +830,6 @@ add_library(grpc_unsecure src/core/lib/iomgr/endpoint_pair_windows.c src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c - src/core/lib/iomgr/ev_poll_and_epoll_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c diff --git a/Makefile b/Makefile index 09520d0b68..4e5e8111c7 100644 --- a/Makefile +++ b/Makefile @@ -2636,7 +2636,6 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ - src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -2927,7 +2926,6 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ - src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -3209,7 +3207,6 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ - src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -3420,7 +3417,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ - src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/binding.gyp b/binding.gyp index bb215c4889..fe644d264d 100644 --- a/binding.gyp +++ b/binding.gyp @@ -592,7 +592,6 @@ 'src/core/lib/iomgr/endpoint_pair_windows.c', 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', - 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', diff --git a/build.yaml b/build.yaml index c4aed3d883..6da0e6dbef 100644 --- a/build.yaml +++ b/build.yaml @@ -190,7 +190,6 @@ filegroups: - src/core/lib/iomgr/endpoint_pair.h - src/core/lib/iomgr/error.h - src/core/lib/iomgr/ev_epoll_linux.h - - src/core/lib/iomgr/ev_poll_and_epoll_posix.h - src/core/lib/iomgr/ev_poll_posix.h - src/core/lib/iomgr/ev_posix.h - src/core/lib/iomgr/exec_ctx.h @@ -287,7 +286,6 @@ filegroups: - src/core/lib/iomgr/endpoint_pair_windows.c - src/core/lib/iomgr/error.c - src/core/lib/iomgr/ev_epoll_linux.c - - src/core/lib/iomgr/ev_poll_and_epoll_posix.c - src/core/lib/iomgr/ev_poll_posix.c - src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/exec_ctx.c diff --git a/config.m4 b/config.m4 index 09aaac635d..0f247f5f45 100644 --- a/config.m4 +++ b/config.m4 @@ -108,7 +108,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ - src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 706d7afee0..45dd978adf 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -272,7 +272,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/endpoint_pair.h', 'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/ev_epoll_linux.h', - 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', @@ -449,7 +448,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/endpoint_pair_windows.c', 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', - 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', @@ -670,7 +668,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/endpoint_pair.h', 'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/ev_epoll_linux.h', - 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', diff --git a/grpc.gemspec b/grpc.gemspec index f4919bfb25..4a0fcdfbfd 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -192,7 +192,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/endpoint_pair.h ) s.files += %w( src/core/lib/iomgr/error.h ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.h ) - s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.h ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.h ) s.files += %w( src/core/lib/iomgr/ev_posix.h ) s.files += %w( src/core/lib/iomgr/exec_ctx.h ) @@ -369,7 +368,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c ) s.files += %w( src/core/lib/iomgr/error.c ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.c ) - s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.c ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.c ) s.files += %w( src/core/lib/iomgr/ev_posix.c ) s.files += %w( src/core/lib/iomgr/exec_ctx.c ) diff --git a/package.xml b/package.xml index 169553efb3..c66484bc6b 100644 --- a/package.xml +++ b/package.xml @@ -199,7 +199,6 @@ - @@ -376,7 +375,6 @@ - diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c deleted file mode 100644 index bf51404203..0000000000 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ /dev/null @@ -1,2076 +0,0 @@ -/* - * - * Copyright 2015, 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. - * - */ - -/* This file will be removed shortly: it's here to keep refactoring - * steps simple and auditable. - * It's the combination of the old files: - * - fd_posix.{h,c} - * - pollset_posix.{h,c} - * - pullset_multipoller_with_{poll,epoll}.{h,c} - * The new version will be split into: - * - ev_poll_posix.{h,c} - * - ev_epoll_posix.{h,c} - */ - -#include "src/core/lib/iomgr/port.h" - -#ifdef GRPC_POSIX_SOCKET - -#include "src/core/lib/iomgr/ev_poll_and_epoll_posix.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "src/core/lib/iomgr/iomgr_internal.h" -#include "src/core/lib/iomgr/wakeup_fd_posix.h" -#include "src/core/lib/profiling/timers.h" -#include "src/core/lib/support/block_annotate.h" - -/******************************************************************************* - * FD declarations - */ - -typedef struct grpc_fd_watcher { - struct grpc_fd_watcher *next; - struct grpc_fd_watcher *prev; - grpc_pollset *pollset; - grpc_pollset_worker *worker; - grpc_fd *fd; -} grpc_fd_watcher; - -struct grpc_fd { - int fd; - /* refst format: - bit0: 1=active/0=orphaned - bit1-n: refcount - meaning that mostly we ref by two to avoid altering the orphaned bit, - and just unref by 1 when we're ready to flag the object as orphaned */ - gpr_atm refst; - - gpr_mu mu; - int shutdown; - int closed; - int released; - - /* The watcher list. - - The following watcher related fields are protected by watcher_mu. - - An fd_watcher is an ephemeral object created when an fd wants to - begin polling, and destroyed after the poll. - - It denotes the fd's interest in whether to read poll or write poll - or both or neither on this fd. - - If a watcher is asked to poll for reads or writes, the read_watcher - or write_watcher fields are set respectively. A watcher may be asked - to poll for both, in which case both fields will be set. - - read_watcher and write_watcher may be NULL if no watcher has been - asked to poll for reads or writes. - - If an fd_watcher is not asked to poll for reads or writes, it's added - to a linked list of inactive watchers, rooted at inactive_watcher_root. - If at a later time there becomes need of a poller to poll, one of - the inactive pollers may be kicked out of their poll loops to take - that responsibility. */ - grpc_fd_watcher inactive_watcher_root; - grpc_fd_watcher *read_watcher; - grpc_fd_watcher *write_watcher; - - grpc_closure *read_closure; - grpc_closure *write_closure; - - struct grpc_fd *freelist_next; - - grpc_closure *on_done_closure; - - grpc_iomgr_object iomgr_object; - - /* The pollset that last noticed and notified that the fd is readable */ - grpc_pollset *read_notifier_pollset; -}; - -/* Begin polling on an fd. - Registers that the given pollset is interested in this fd - so that if read - or writability interest changes, the pollset can be kicked to pick up that - new interest. - Return value is: - (fd_needs_read? read_mask : 0) | (fd_needs_write? write_mask : 0) - i.e. a combination of read_mask and write_mask determined by the fd's current - interest in said events. - Polling strategies that do not need to alter their behavior depending on the - fd's current interest (such as epoll) do not need to call this function. - MUST NOT be called with a pollset lock taken */ -static uint32_t fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, - grpc_pollset_worker *worker, uint32_t read_mask, - uint32_t write_mask, grpc_fd_watcher *rec); -/* Complete polling previously started with fd_begin_poll - MUST NOT be called with a pollset lock taken - if got_read or got_write are 1, also does the become_{readable,writable} as - appropriate. */ -static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *rec, - int got_read, int got_write, - grpc_pollset *read_notifier_pollset); - -/* Return 1 if this fd is orphaned, 0 otherwise */ -static bool fd_is_orphaned(grpc_fd *fd); - -/* Reference counting for fds */ -/*#define GRPC_FD_REF_COUNT_DEBUG*/ -#ifdef GRPC_FD_REF_COUNT_DEBUG -static void fd_ref(grpc_fd *fd, const char *reason, const char *file, int line); -static void fd_unref(grpc_fd *fd, const char *reason, const char *file, - int line); -#define GRPC_FD_REF(fd, reason) fd_ref(fd, reason, __FILE__, __LINE__) -#define GRPC_FD_UNREF(fd, reason) fd_unref(fd, reason, __FILE__, __LINE__) -#else -static void fd_ref(grpc_fd *fd); -static void fd_unref(grpc_fd *fd); -#define GRPC_FD_REF(fd, reason) fd_ref(fd) -#define GRPC_FD_UNREF(fd, reason) fd_unref(fd) -#endif - -static void fd_global_init(void); -static void fd_global_shutdown(void); - -#define CLOSURE_NOT_READY ((grpc_closure *)0) -#define CLOSURE_READY ((grpc_closure *)1) - -/******************************************************************************* - * pollset declarations - */ - -typedef struct grpc_pollset_vtable grpc_pollset_vtable; - -typedef struct grpc_cached_wakeup_fd { - grpc_wakeup_fd fd; - struct grpc_cached_wakeup_fd *next; -} grpc_cached_wakeup_fd; - -struct grpc_pollset_worker { - grpc_cached_wakeup_fd *wakeup_fd; - int reevaluate_polling_on_wakeup; - int kicked_specifically; - struct grpc_pollset_worker *next; - struct grpc_pollset_worker *prev; -}; - -struct grpc_pollset { - /* pollsets under posix can mutate representation as fds are added and - removed. - For example, we may choose a poll() based implementation on linux for - few fds, and an epoll() based implementation for many fds */ - const grpc_pollset_vtable *vtable; - gpr_mu mu; - grpc_pollset_worker root_worker; - int in_flight_cbs; - int shutting_down; - int called_shutdown; - int kicked_without_pollers; - grpc_closure *shutdown_done; - grpc_closure_list idle_jobs; - union { - int fd; - void *ptr; - } data; - /* Local cache of eventfds for workers */ - grpc_cached_wakeup_fd *local_wakeup_cache; -}; - -struct grpc_pollset_vtable { - void (*add_fd)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - struct grpc_fd *fd, int and_unlock_pollset); - grpc_error *(*maybe_work_and_unlock)(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - grpc_pollset_worker *worker, - gpr_timespec deadline, gpr_timespec now); - void (*finish_shutdown)(grpc_pollset *pollset); - void (*destroy)(grpc_pollset *pollset); -}; - -/* Add an fd to a pollset */ -static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - struct grpc_fd *fd); - -static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, grpc_fd *fd); - -/* Convert a timespec to milliseconds: - - very small or negative poll times are clamped to zero to do a - non-blocking poll (which becomes spin polling) - - other small values are rounded up to one millisecond - - longer than a millisecond polls are rounded up to the next nearest - millisecond to avoid spinning - - infinite timeouts are converted to -1 */ -static int poll_deadline_to_millis_timeout(gpr_timespec deadline, - gpr_timespec now); - -/* Allow kick to wakeup the currently polling worker */ -#define GRPC_POLLSET_CAN_KICK_SELF 1 -/* Force the wakee to repoll when awoken */ -#define GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP 2 -/* As per pollset_kick, with an extended set of flags (defined above) - -- mostly for fd_posix's use. */ -static grpc_error *pollset_kick_ext(grpc_pollset *p, - grpc_pollset_worker *specific_worker, - uint32_t flags) GRPC_MUST_USE_RESULT; - -/* turn a pollset into a multipoller: platform specific */ -typedef void (*platform_become_multipoller_type)(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - struct grpc_fd **fds, - size_t fd_count); -static platform_become_multipoller_type platform_become_multipoller; - -/* Return 1 if the pollset has active threads in pollset_work (pollset must - * be locked) */ -static int pollset_has_workers(grpc_pollset *pollset); - -static void remove_fd_from_all_epoll_sets(int fd); - -/******************************************************************************* - * pollset_set definitions - */ - -struct grpc_pollset_set { - gpr_mu mu; - - size_t pollset_count; - size_t pollset_capacity; - grpc_pollset **pollsets; - - size_t pollset_set_count; - size_t pollset_set_capacity; - struct grpc_pollset_set **pollset_sets; - - size_t fd_count; - size_t fd_capacity; - grpc_fd **fds; -}; - -/******************************************************************************* - * fd_posix.c - */ - -/* We need to keep a freelist not because of any concerns of malloc performance - * but instead so that implementations with multiple threads in (for example) - * epoll_wait deal with the race between pollset removal and incoming poll - * notifications. - * - * The problem is that the poller ultimately holds a reference to this - * object, so it is very difficult to know when is safe to free it, at least - * without some expensive synchronization. - * - * If we keep the object freelisted, in the worst case losing this race just - * becomes a spurious read notification on a reused fd. - */ -/* TODO(klempner): We could use some form of polling generation count to know - * when these are safe to free. */ -/* TODO(klempner): Consider disabling freelisting if we don't have multiple - * threads in poll on the same fd */ -/* TODO(klempner): Batch these allocations to reduce fragmentation */ -static grpc_fd *fd_freelist = NULL; -static gpr_mu fd_freelist_mu; - -static void freelist_fd(grpc_fd *fd) { - gpr_mu_lock(&fd_freelist_mu); - fd->freelist_next = fd_freelist; - fd_freelist = fd; - grpc_iomgr_unregister_object(&fd->iomgr_object); - gpr_mu_unlock(&fd_freelist_mu); -} - -static grpc_fd *alloc_fd(int fd) { - grpc_fd *r = NULL; - gpr_mu_lock(&fd_freelist_mu); - if (fd_freelist != NULL) { - r = fd_freelist; - fd_freelist = fd_freelist->freelist_next; - } - gpr_mu_unlock(&fd_freelist_mu); - if (r == NULL) { - r = gpr_malloc(sizeof(grpc_fd)); - gpr_mu_init(&r->mu); - } - - gpr_mu_lock(&r->mu); - gpr_atm_rel_store(&r->refst, 1); - r->shutdown = 0; - r->read_closure = CLOSURE_NOT_READY; - r->write_closure = CLOSURE_NOT_READY; - r->fd = fd; - r->inactive_watcher_root.next = r->inactive_watcher_root.prev = - &r->inactive_watcher_root; - r->freelist_next = NULL; - r->read_watcher = r->write_watcher = NULL; - r->on_done_closure = NULL; - r->closed = 0; - r->released = 0; - r->read_notifier_pollset = NULL; - gpr_mu_unlock(&r->mu); - return r; -} - -static void destroy(grpc_fd *fd) { - gpr_mu_destroy(&fd->mu); - gpr_free(fd); -} - -#ifdef GRPC_FD_REF_COUNT_DEBUG -#define REF_BY(fd, n, reason) ref_by(fd, n, reason, __FILE__, __LINE__) -#define UNREF_BY(fd, n, reason) unref_by(fd, n, reason, __FILE__, __LINE__) -static void ref_by(grpc_fd *fd, int n, const char *reason, const char *file, - int line) { - gpr_log(GPR_DEBUG, "FD %d %p ref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, - gpr_atm_no_barrier_load(&fd->refst), - gpr_atm_no_barrier_load(&fd->refst) + n, reason, file, line); -#else -#define REF_BY(fd, n, reason) ref_by(fd, n) -#define UNREF_BY(fd, n, reason) unref_by(fd, n) -static void ref_by(grpc_fd *fd, int n) { -#endif - GPR_ASSERT(gpr_atm_no_barrier_fetch_add(&fd->refst, n) > 0); -} - -#ifdef GRPC_FD_REF_COUNT_DEBUG -static void unref_by(grpc_fd *fd, int n, const char *reason, const char *file, - int line) { - gpr_atm old; - gpr_log(GPR_DEBUG, "FD %d %p unref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, - gpr_atm_no_barrier_load(&fd->refst), - gpr_atm_no_barrier_load(&fd->refst) - n, reason, file, line); -#else -static void unref_by(grpc_fd *fd, int n) { - gpr_atm old; -#endif - old = gpr_atm_full_fetch_add(&fd->refst, -n); - if (old == n) { - freelist_fd(fd); - } else { - GPR_ASSERT(old > n); - } -} - -static void fd_global_init(void) { gpr_mu_init(&fd_freelist_mu); } - -static void fd_global_shutdown(void) { - gpr_mu_lock(&fd_freelist_mu); - gpr_mu_unlock(&fd_freelist_mu); - while (fd_freelist != NULL) { - grpc_fd *fd = fd_freelist; - fd_freelist = fd_freelist->freelist_next; - destroy(fd); - } - gpr_mu_destroy(&fd_freelist_mu); -} - -static grpc_fd *fd_create(int fd, const char *name) { - grpc_fd *r = alloc_fd(fd); - char *name2; - gpr_asprintf(&name2, "%s fd=%d", name, fd); - grpc_iomgr_register_object(&r->iomgr_object, name2); - gpr_free(name2); -#ifdef GRPC_FD_REF_COUNT_DEBUG - gpr_log(GPR_DEBUG, "FD %d %p create %s", fd, r, name); -#endif - return r; -} - -static bool fd_is_orphaned(grpc_fd *fd) { - return (gpr_atm_acq_load(&fd->refst) & 1) == 0; -} - -static grpc_error *pollset_kick_locked(grpc_fd_watcher *watcher) { - gpr_mu_lock(&watcher->pollset->mu); - GPR_ASSERT(watcher->worker); - grpc_error *err = pollset_kick_ext(watcher->pollset, watcher->worker, - GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP); - gpr_mu_unlock(&watcher->pollset->mu); - return err; -} - -static void maybe_wake_one_watcher_locked(grpc_fd *fd) { - if (fd->inactive_watcher_root.next != &fd->inactive_watcher_root) { - pollset_kick_locked(fd->inactive_watcher_root.next); - } else if (fd->read_watcher) { - pollset_kick_locked(fd->read_watcher); - } else if (fd->write_watcher) { - pollset_kick_locked(fd->write_watcher); - } -} - -static void wake_all_watchers_locked(grpc_fd *fd) { - grpc_fd_watcher *watcher; - for (watcher = fd->inactive_watcher_root.next; - watcher != &fd->inactive_watcher_root; watcher = watcher->next) { - pollset_kick_locked(watcher); - } - if (fd->read_watcher) { - pollset_kick_locked(fd->read_watcher); - } - if (fd->write_watcher && fd->write_watcher != fd->read_watcher) { - pollset_kick_locked(fd->write_watcher); - } -} - -static int has_watchers(grpc_fd *fd) { - return fd->read_watcher != NULL || fd->write_watcher != NULL || - fd->inactive_watcher_root.next != &fd->inactive_watcher_root; -} - -static void close_fd_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - fd->closed = 1; - if (!fd->released) { - close(fd->fd); - } else { - remove_fd_from_all_epoll_sets(fd->fd); - } - grpc_exec_ctx_sched(exec_ctx, fd->on_done_closure, GRPC_ERROR_NONE, NULL); -} - -static int fd_wrapped_fd(grpc_fd *fd) { - if (fd->released || fd->closed) { - return -1; - } else { - return fd->fd; - } -} - -static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure *on_done, int *release_fd, - const char *reason) { - fd->on_done_closure = on_done; - fd->released = release_fd != NULL; - if (!fd->released) { - shutdown(fd->fd, SHUT_RDWR); - } else { - *release_fd = fd->fd; - } - gpr_mu_lock(&fd->mu); - REF_BY(fd, 1, reason); /* remove active status, but keep referenced */ - if (!has_watchers(fd)) { - close_fd_locked(exec_ctx, fd); - } else { - wake_all_watchers_locked(fd); - } - gpr_mu_unlock(&fd->mu); - UNREF_BY(fd, 2, reason); /* drop the reference */ -} - -/* increment refcount by two to avoid changing the orphan bit */ -#ifdef GRPC_FD_REF_COUNT_DEBUG -static void fd_ref(grpc_fd *fd, const char *reason, const char *file, - int line) { - ref_by(fd, 2, reason, file, line); -} - -static void fd_unref(grpc_fd *fd, const char *reason, const char *file, - int line) { - unref_by(fd, 2, reason, file, line); -} -#else -static void fd_ref(grpc_fd *fd) { ref_by(fd, 2); } - -static void fd_unref(grpc_fd *fd) { unref_by(fd, 2); } -#endif - -static grpc_error *fd_shutdown_error(bool shutdown) { - if (!shutdown) { - return GRPC_ERROR_NONE; - } else { - return GRPC_ERROR_CREATE("FD shutdown"); - } -} - -static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure **st, grpc_closure *closure) { - if (fd->shutdown) { - grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CREATE("FD shutdown"), - NULL); - } else if (*st == CLOSURE_NOT_READY) { - /* not ready ==> switch to a waiting state by setting the closure */ - *st = closure; - } else if (*st == CLOSURE_READY) { - /* already ready ==> queue the closure to run immediately */ - *st = CLOSURE_NOT_READY; - grpc_exec_ctx_sched(exec_ctx, closure, fd_shutdown_error(fd->shutdown), - NULL); - maybe_wake_one_watcher_locked(fd); - } else { - /* upcallptr was set to a different closure. This is an error! */ - gpr_log(GPR_ERROR, - "User called a notify_on function with a previous callback still " - "pending"); - abort(); - } -} - -/* returns 1 if state becomes not ready */ -static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure **st) { - if (*st == CLOSURE_READY) { - /* duplicate ready ==> ignore */ - return 0; - } else if (*st == CLOSURE_NOT_READY) { - /* not ready, and not waiting ==> flag ready */ - *st = CLOSURE_READY; - return 0; - } else { - /* waiting ==> queue closure */ - grpc_exec_ctx_sched(exec_ctx, *st, fd_shutdown_error(fd->shutdown), NULL); - *st = CLOSURE_NOT_READY; - return 1; - } -} - -static void set_read_notifier_pollset_locked( - grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_pollset *read_notifier_pollset) { - fd->read_notifier_pollset = read_notifier_pollset; -} - -static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - gpr_mu_lock(&fd->mu); - /* only shutdown once */ - if (!fd->shutdown) { - fd->shutdown = 1; - /* signal read/write closed to OS so that future operations fail */ - shutdown(fd->fd, SHUT_RDWR); - set_ready_locked(exec_ctx, fd, &fd->read_closure); - set_ready_locked(exec_ctx, fd, &fd->write_closure); - } - gpr_mu_unlock(&fd->mu); -} - -static bool fd_is_shutdown(grpc_fd *fd) { - gpr_mu_lock(&fd->mu); - bool r = fd->shutdown; - gpr_mu_unlock(&fd->mu); - return r; -} - -static void fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure *closure) { - gpr_mu_lock(&fd->mu); - notify_on_locked(exec_ctx, fd, &fd->read_closure, closure); - gpr_mu_unlock(&fd->mu); -} - -static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure *closure) { - gpr_mu_lock(&fd->mu); - notify_on_locked(exec_ctx, fd, &fd->write_closure, closure); - gpr_mu_unlock(&fd->mu); -} - -/* Return the read-notifier pollset */ -static grpc_pollset *fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, - grpc_fd *fd) { - grpc_pollset *notifier = NULL; - - gpr_mu_lock(&fd->mu); - notifier = fd->read_notifier_pollset; - gpr_mu_unlock(&fd->mu); - - return notifier; -} - -static uint32_t fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, - grpc_pollset_worker *worker, uint32_t read_mask, - uint32_t write_mask, grpc_fd_watcher *watcher) { - uint32_t mask = 0; - grpc_closure *cur; - int requested; - /* keep track of pollers that have requested our events, in case they change - */ - GRPC_FD_REF(fd, "poll"); - - gpr_mu_lock(&fd->mu); - - /* if we are shutdown, then don't add to the watcher set */ - if (fd->shutdown) { - watcher->fd = NULL; - watcher->pollset = NULL; - watcher->worker = NULL; - gpr_mu_unlock(&fd->mu); - GRPC_FD_UNREF(fd, "poll"); - return 0; - } - - /* if there is nobody polling for read, but we need to, then start doing so */ - cur = fd->read_closure; - requested = cur != CLOSURE_READY; - if (read_mask && fd->read_watcher == NULL && requested) { - fd->read_watcher = watcher; - mask |= read_mask; - } - /* if there is nobody polling for write, but we need to, then start doing so - */ - cur = fd->write_closure; - requested = cur != CLOSURE_READY; - if (write_mask && fd->write_watcher == NULL && requested) { - fd->write_watcher = watcher; - mask |= write_mask; - } - /* if not polling, remember this watcher in case we need someone to later */ - if (mask == 0 && worker != NULL) { - watcher->next = &fd->inactive_watcher_root; - watcher->prev = watcher->next->prev; - watcher->next->prev = watcher->prev->next = watcher; - } - watcher->pollset = pollset; - watcher->worker = worker; - watcher->fd = fd; - gpr_mu_unlock(&fd->mu); - - return mask; -} - -static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, - int got_read, int got_write, - grpc_pollset *read_notifier_pollset) { - int was_polling = 0; - int kick = 0; - grpc_fd *fd = watcher->fd; - - if (fd == NULL) { - return; - } - - gpr_mu_lock(&fd->mu); - - if (watcher == fd->read_watcher) { - /* remove read watcher, kick if we still need a read */ - was_polling = 1; - if (!got_read) { - kick = 1; - } - fd->read_watcher = NULL; - } - if (watcher == fd->write_watcher) { - /* remove write watcher, kick if we still need a write */ - was_polling = 1; - if (!got_write) { - kick = 1; - } - fd->write_watcher = NULL; - } - if (!was_polling && watcher->worker != NULL) { - /* remove from inactive list */ - watcher->next->prev = watcher->prev; - watcher->prev->next = watcher->next; - } - if (got_read) { - if (set_ready_locked(exec_ctx, fd, &fd->read_closure)) { - kick = 1; - } - - if (read_notifier_pollset != NULL) { - set_read_notifier_pollset_locked(exec_ctx, fd, read_notifier_pollset); - } - } - if (got_write) { - if (set_ready_locked(exec_ctx, fd, &fd->write_closure)) { - kick = 1; - } - } - if (kick) { - maybe_wake_one_watcher_locked(fd); - } - if (fd_is_orphaned(fd) && !has_watchers(fd) && !fd->closed) { - close_fd_locked(exec_ctx, fd); - } - gpr_mu_unlock(&fd->mu); - - GRPC_FD_UNREF(fd, "poll"); -} - -static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { return NULL; } - -/******************************************************************************* - * pollset_posix.c - */ - -GPR_TLS_DECL(g_current_thread_poller); -GPR_TLS_DECL(g_current_thread_worker); - -/** The alarm system needs to be able to wakeup 'some poller' sometimes - * (specifically when a new alarm needs to be triggered earlier than the next - * alarm 'epoch'). - * This wakeup_fd gives us something to alert on when such a case occurs. */ -grpc_wakeup_fd grpc_global_wakeup_fd; - -static void remove_worker(grpc_pollset *p, grpc_pollset_worker *worker) { - worker->prev->next = worker->next; - worker->next->prev = worker->prev; -} - -static int pollset_has_workers(grpc_pollset *p) { - return p->root_worker.next != &p->root_worker; -} - -static grpc_pollset_worker *pop_front_worker(grpc_pollset *p) { - if (pollset_has_workers(p)) { - grpc_pollset_worker *w = p->root_worker.next; - remove_worker(p, w); - return w; - } else { - return NULL; - } -} - -static void push_back_worker(grpc_pollset *p, grpc_pollset_worker *worker) { - worker->next = &p->root_worker; - worker->prev = worker->next->prev; - worker->prev->next = worker->next->prev = worker; -} - -static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) { - worker->prev = &p->root_worker; - worker->next = worker->prev->next; - worker->prev->next = worker->next->prev = worker; -} - -static void kick_append_error(grpc_error **composite, grpc_error *error) { - if (error == GRPC_ERROR_NONE) return; - if (*composite == GRPC_ERROR_NONE) { - *composite = GRPC_ERROR_CREATE("Kick Failure"); - } - *composite = grpc_error_add_child(*composite, error); -} - -static grpc_error *pollset_kick_ext(grpc_pollset *p, - grpc_pollset_worker *specific_worker, - uint32_t flags) { - GPR_TIMER_BEGIN("pollset_kick_ext", 0); - grpc_error *error = GRPC_ERROR_NONE; - - /* pollset->mu already held */ - if (specific_worker != NULL) { - if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) { - GPR_TIMER_BEGIN("pollset_kick_ext.broadcast", 0); - GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0); - for (specific_worker = p->root_worker.next; - specific_worker != &p->root_worker; - specific_worker = specific_worker->next) { - kick_append_error( - &error, grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd)); - } - p->kicked_without_pollers = true; - GPR_TIMER_END("pollset_kick_ext.broadcast", 0); - } else if (gpr_tls_get(&g_current_thread_worker) != - (intptr_t)specific_worker) { - GPR_TIMER_MARK("different_thread_worker", 0); - if ((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) != 0) { - specific_worker->reevaluate_polling_on_wakeup = true; - } - specific_worker->kicked_specifically = true; - kick_append_error(&error, - grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd)); - } else if ((flags & GRPC_POLLSET_CAN_KICK_SELF) != 0) { - GPR_TIMER_MARK("kick_yoself", 0); - if ((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) != 0) { - specific_worker->reevaluate_polling_on_wakeup = true; - } - specific_worker->kicked_specifically = true; - kick_append_error(&error, - grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd)); - } - } else if (gpr_tls_get(&g_current_thread_poller) != (intptr_t)p) { - GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0); - GPR_TIMER_MARK("kick_anonymous", 0); - specific_worker = pop_front_worker(p); - if (specific_worker != NULL) { - if (gpr_tls_get(&g_current_thread_worker) == (intptr_t)specific_worker) { - GPR_TIMER_MARK("kick_anonymous_not_self", 0); - push_back_worker(p, specific_worker); - specific_worker = pop_front_worker(p); - if ((flags & GRPC_POLLSET_CAN_KICK_SELF) == 0 && - gpr_tls_get(&g_current_thread_worker) == - (intptr_t)specific_worker) { - push_back_worker(p, specific_worker); - specific_worker = NULL; - } - } - if (specific_worker != NULL) { - GPR_TIMER_MARK("finally_kick", 0); - push_back_worker(p, specific_worker); - kick_append_error( - &error, grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd)); - } - } else { - GPR_TIMER_MARK("kicked_no_pollers", 0); - p->kicked_without_pollers = true; - } - } - - GPR_TIMER_END("pollset_kick_ext", 0); - return error; -} - -static grpc_error *pollset_kick(grpc_pollset *p, - grpc_pollset_worker *specific_worker) { - return pollset_kick_ext(p, specific_worker, 0); -} - -/* global state management */ - -static grpc_error *pollset_global_init(void) { - gpr_tls_init(&g_current_thread_poller); - gpr_tls_init(&g_current_thread_worker); - return grpc_wakeup_fd_init(&grpc_global_wakeup_fd); -} - -static void pollset_global_shutdown(void) { - grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); - gpr_tls_destroy(&g_current_thread_poller); - gpr_tls_destroy(&g_current_thread_worker); -} - -static grpc_error *kick_poller(void) { - return grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); -} - -/* main interface */ - -static void become_basic_pollset(grpc_pollset *pollset, grpc_fd *fd_or_null); - -static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { - gpr_mu_init(&pollset->mu); - *mu = &pollset->mu; - pollset->root_worker.next = pollset->root_worker.prev = &pollset->root_worker; - pollset->in_flight_cbs = 0; - pollset->shutting_down = 0; - pollset->called_shutdown = 0; - pollset->kicked_without_pollers = 0; - pollset->idle_jobs.head = pollset->idle_jobs.tail = NULL; - pollset->local_wakeup_cache = NULL; - pollset->kicked_without_pollers = 0; - become_basic_pollset(pollset, NULL); -} - -static void pollset_destroy(grpc_pollset *pollset) { - GPR_ASSERT(pollset->in_flight_cbs == 0); - GPR_ASSERT(!pollset_has_workers(pollset)); - GPR_ASSERT(pollset->idle_jobs.head == pollset->idle_jobs.tail); - pollset->vtable->destroy(pollset); - while (pollset->local_wakeup_cache) { - grpc_cached_wakeup_fd *next = pollset->local_wakeup_cache->next; - grpc_wakeup_fd_destroy(&pollset->local_wakeup_cache->fd); - gpr_free(pollset->local_wakeup_cache); - pollset->local_wakeup_cache = next; - } - gpr_mu_destroy(&pollset->mu); -} - -static void pollset_reset(grpc_pollset *pollset) { - GPR_ASSERT(pollset->shutting_down); - GPR_ASSERT(pollset->in_flight_cbs == 0); - GPR_ASSERT(!pollset_has_workers(pollset)); - GPR_ASSERT(pollset->idle_jobs.head == pollset->idle_jobs.tail); - pollset->vtable->destroy(pollset); - pollset->shutting_down = 0; - pollset->called_shutdown = 0; - pollset->kicked_without_pollers = 0; - become_basic_pollset(pollset, NULL); -} - -static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_fd *fd) { - gpr_mu_lock(&pollset->mu); - pollset->vtable->add_fd(exec_ctx, pollset, fd, 1); -/* the following (enabled only in debug) will reacquire and then release - our lock - meaning that if the unlocking flag passed to add_fd above is - not respected, the code will deadlock (in a way that we have a chance of - debugging) */ -#ifndef NDEBUG - gpr_mu_lock(&pollset->mu); - gpr_mu_unlock(&pollset->mu); -#endif -} - -static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { - GPR_ASSERT(grpc_closure_list_empty(pollset->idle_jobs)); - pollset->vtable->finish_shutdown(pollset); - grpc_exec_ctx_sched(exec_ctx, pollset->shutdown_done, GRPC_ERROR_NONE, NULL); -} - -static void work_combine_error(grpc_error **composite, grpc_error *error) { - if (error == GRPC_ERROR_NONE) return; - if (*composite == GRPC_ERROR_NONE) { - *composite = GRPC_ERROR_CREATE("pollset_work"); - } - *composite = grpc_error_add_child(*composite, error); -} - -static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_pollset_worker **worker_hdl, - gpr_timespec now, gpr_timespec deadline) { - grpc_pollset_worker worker; - *worker_hdl = &worker; - grpc_error *error = GRPC_ERROR_NONE; - - /* pollset->mu already held */ - int added_worker = 0; - int locked = 1; - int queued_work = 0; - int keep_polling = 0; - GPR_TIMER_BEGIN("pollset_work", 0); - /* this must happen before we (potentially) drop pollset->mu */ - worker.next = worker.prev = NULL; - worker.reevaluate_polling_on_wakeup = 0; - if (pollset->local_wakeup_cache != NULL) { - worker.wakeup_fd = pollset->local_wakeup_cache; - pollset->local_wakeup_cache = worker.wakeup_fd->next; - } else { - worker.wakeup_fd = gpr_malloc(sizeof(*worker.wakeup_fd)); - error = grpc_wakeup_fd_init(&worker.wakeup_fd->fd); - if (error != GRPC_ERROR_NONE) { - return error; - } - } - worker.kicked_specifically = 0; - /* If there's work waiting for the pollset to be idle, and the - pollset is idle, then do that work */ - if (!pollset_has_workers(pollset) && - !grpc_closure_list_empty(pollset->idle_jobs)) { - GPR_TIMER_MARK("pollset_work.idle_jobs", 0); - grpc_exec_ctx_enqueue_list(exec_ctx, &pollset->idle_jobs, NULL); - goto done; - } - /* If we're shutting down then we don't execute any extended work */ - if (pollset->shutting_down) { - GPR_TIMER_MARK("pollset_work.shutting_down", 0); - goto done; - } - /* Give do_promote priority so we don't starve it out */ - if (pollset->in_flight_cbs) { - GPR_TIMER_MARK("pollset_work.in_flight_cbs", 0); - gpr_mu_unlock(&pollset->mu); - locked = 0; - goto done; - } - /* Start polling, and keep doing so while we're being asked to - re-evaluate our pollers (this allows poll() based pollers to - ensure they don't miss wakeups) */ - keep_polling = 1; - while (keep_polling) { - keep_polling = 0; - if (!pollset->kicked_without_pollers) { - if (!added_worker) { - push_front_worker(pollset, &worker); - added_worker = 1; - gpr_tls_set(&g_current_thread_worker, (intptr_t)&worker); - } - gpr_tls_set(&g_current_thread_poller, (intptr_t)pollset); - GPR_TIMER_BEGIN("maybe_work_and_unlock", 0); - work_combine_error(&error, - pollset->vtable->maybe_work_and_unlock( - exec_ctx, pollset, &worker, deadline, now)); - GPR_TIMER_END("maybe_work_and_unlock", 0); - locked = 0; - gpr_tls_set(&g_current_thread_poller, 0); - } else { - GPR_TIMER_MARK("pollset_work.kicked_without_pollers", 0); - pollset->kicked_without_pollers = 0; - } - /* Finished execution - start cleaning up. - Note that we may arrive here from outside the enclosing while() loop. - In that case we won't loop though as we haven't added worker to the - worker list, which means nobody could ask us to re-evaluate polling). */ - done: - if (!locked) { - queued_work |= grpc_exec_ctx_flush(exec_ctx); - gpr_mu_lock(&pollset->mu); - locked = 1; - } - /* If we're forced to re-evaluate polling (via pollset_kick with - GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) then we land here and force - a loop */ - if (worker.reevaluate_polling_on_wakeup) { - worker.reevaluate_polling_on_wakeup = 0; - pollset->kicked_without_pollers = 0; - if (queued_work || worker.kicked_specifically) { - /* If there's queued work on the list, then set the deadline to be - immediate so we get back out of the polling loop quickly */ - deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC); - } - keep_polling = 1; - } - } - if (added_worker) { - remove_worker(pollset, &worker); - gpr_tls_set(&g_current_thread_worker, 0); - } - /* release wakeup fd to the local pool */ - worker.wakeup_fd->next = pollset->local_wakeup_cache; - pollset->local_wakeup_cache = worker.wakeup_fd; - /* check shutdown conditions */ - if (pollset->shutting_down) { - if (pollset_has_workers(pollset)) { - pollset_kick(pollset, NULL); - } else if (!pollset->called_shutdown && pollset->in_flight_cbs == 0) { - pollset->called_shutdown = 1; - gpr_mu_unlock(&pollset->mu); - finish_shutdown(exec_ctx, pollset); - grpc_exec_ctx_flush(exec_ctx); - /* Continuing to access pollset here is safe -- it is the caller's - * responsibility to not destroy when it has outstanding calls to - * pollset_work. - * TODO(dklempner): Can we refactor the shutdown logic to avoid this? */ - gpr_mu_lock(&pollset->mu); - } else if (!grpc_closure_list_empty(pollset->idle_jobs)) { - grpc_exec_ctx_enqueue_list(exec_ctx, &pollset->idle_jobs, NULL); - gpr_mu_unlock(&pollset->mu); - grpc_exec_ctx_flush(exec_ctx); - gpr_mu_lock(&pollset->mu); - } - } - *worker_hdl = NULL; - GPR_TIMER_END("pollset_work", 0); - return error; -} - -static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_closure *closure) { - GPR_ASSERT(!pollset->shutting_down); - pollset->shutting_down = 1; - pollset->shutdown_done = closure; - pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); - if (!pollset_has_workers(pollset)) { - grpc_exec_ctx_enqueue_list(exec_ctx, &pollset->idle_jobs, NULL); - } - if (!pollset->called_shutdown && pollset->in_flight_cbs == 0 && - !pollset_has_workers(pollset)) { - pollset->called_shutdown = 1; - finish_shutdown(exec_ctx, pollset); - } -} - -static int poll_deadline_to_millis_timeout(gpr_timespec deadline, - gpr_timespec now) { - gpr_timespec timeout; - static const int64_t max_spin_polling_us = 10; - if (gpr_time_cmp(deadline, gpr_inf_future(deadline.clock_type)) == 0) { - return -1; - } - if (gpr_time_cmp(deadline, gpr_time_add(now, gpr_time_from_micros( - max_spin_polling_us, - GPR_TIMESPAN))) <= 0) { - return 0; - } - timeout = gpr_time_sub(deadline, now); - return gpr_time_to_millis(gpr_time_add( - timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN))); -} - -/* - * basic_pollset - a vtable that provides polling for zero or one file - * descriptor via poll() - */ - -typedef struct grpc_unary_promote_args { - const grpc_pollset_vtable *original_vtable; - grpc_pollset *pollset; - grpc_fd *fd; - grpc_closure promotion_closure; -} grpc_unary_promote_args; - -static void basic_do_promote(grpc_exec_ctx *exec_ctx, void *args, - grpc_error *error) { - grpc_unary_promote_args *up_args = args; - const grpc_pollset_vtable *original_vtable = up_args->original_vtable; - grpc_pollset *pollset = up_args->pollset; - grpc_fd *fd = up_args->fd; - - /* - * This is quite tricky. There are a number of cases to keep in mind here: - * 1. fd may have been orphaned - * 2. The pollset may no longer be a unary poller (and we can't let case #1 - * leak to other pollset types!) - * 3. pollset's fd (which may have changed) may have been orphaned - * 4. The pollset may be shutting down. - */ - - gpr_mu_lock(&pollset->mu); - /* First we need to ensure that nobody is polling concurrently */ - GPR_ASSERT(!pollset_has_workers(pollset)); - - gpr_free(up_args); - /* At this point the pollset may no longer be a unary poller. In that case - * we should just call the right add function and be done. */ - /* TODO(klempner): If we're not careful this could cause infinite recursion. - * That's not a problem for now because empty_pollset has a trivial poller - * and we don't have any mechanism to unbecome multipoller. */ - pollset->in_flight_cbs--; - if (pollset->shutting_down) { - /* We don't care about this pollset anymore. */ - if (pollset->in_flight_cbs == 0 && !pollset->called_shutdown) { - pollset->called_shutdown = 1; - finish_shutdown(exec_ctx, pollset); - } - } else if (fd_is_orphaned(fd)) { - /* Don't try to add it to anything, we'll drop our ref on it below */ - } else if (pollset->vtable != original_vtable) { - pollset->vtable->add_fd(exec_ctx, pollset, fd, 0); - } else if (fd != pollset->data.ptr) { - grpc_fd *fds[2]; - fds[0] = pollset->data.ptr; - fds[1] = fd; - - if (fds[0] && !fd_is_orphaned(fds[0])) { - platform_become_multipoller(exec_ctx, pollset, fds, GPR_ARRAY_SIZE(fds)); - GRPC_FD_UNREF(fds[0], "basicpoll"); - } else { - /* old fd is orphaned and we haven't cleaned it up until now, so remain a - * unary poller */ - /* Note that it is possible that fds[1] is also orphaned at this point. - * That's okay, we'll correct it at the next add or poll. */ - if (fds[0]) GRPC_FD_UNREF(fds[0], "basicpoll"); - pollset->data.ptr = fd; - GRPC_FD_REF(fd, "basicpoll"); - } - } - - gpr_mu_unlock(&pollset->mu); - - /* Matching ref in basic_pollset_add_fd */ - GRPC_FD_UNREF(fd, "basicpoll_add"); -} - -static void basic_pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_fd *fd, int and_unlock_pollset) { - grpc_unary_promote_args *up_args; - GPR_ASSERT(fd); - if (fd == pollset->data.ptr) goto exit; - - if (!pollset_has_workers(pollset)) { - /* Fast path -- no in flight cbs */ - /* TODO(klempner): Comment this out and fix any test failures or establish - * they are due to timing issues */ - grpc_fd *fds[2]; - fds[0] = pollset->data.ptr; - fds[1] = fd; - - if (fds[0] == NULL) { - pollset->data.ptr = fd; - GRPC_FD_REF(fd, "basicpoll"); - } else if (!fd_is_orphaned(fds[0])) { - platform_become_multipoller(exec_ctx, pollset, fds, GPR_ARRAY_SIZE(fds)); - GRPC_FD_UNREF(fds[0], "basicpoll"); - } else { - /* old fd is orphaned and we haven't cleaned it up until now, so remain a - * unary poller */ - GRPC_FD_UNREF(fds[0], "basicpoll"); - pollset->data.ptr = fd; - GRPC_FD_REF(fd, "basicpoll"); - } - goto exit; - } - - /* Now we need to promote. This needs to happen when we're not polling. Since - * this may be called from poll, the wait needs to happen asynchronously. */ - GRPC_FD_REF(fd, "basicpoll_add"); - pollset->in_flight_cbs++; - up_args = gpr_malloc(sizeof(*up_args)); - up_args->fd = fd; - up_args->original_vtable = pollset->vtable; - up_args->pollset = pollset; - up_args->promotion_closure.cb = basic_do_promote; - up_args->promotion_closure.cb_arg = up_args; - - grpc_closure_list_append(&pollset->idle_jobs, &up_args->promotion_closure, - GRPC_ERROR_NONE); - pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); - -exit: - if (and_unlock_pollset) { - gpr_mu_unlock(&pollset->mu); - } -} - -static grpc_error *basic_pollset_maybe_work_and_unlock( - grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, - gpr_timespec deadline, gpr_timespec now) { -#define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) -#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) - - struct pollfd pfd[3]; - grpc_fd *fd; - grpc_fd_watcher fd_watcher; - int timeout; - int r; - nfds_t nfds; - grpc_error *error = GRPC_ERROR_NONE; - - fd = pollset->data.ptr; - if (fd && fd_is_orphaned(fd)) { - GRPC_FD_UNREF(fd, "basicpoll"); - fd = pollset->data.ptr = NULL; - } - timeout = poll_deadline_to_millis_timeout(deadline, now); - pfd[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd); - pfd[0].events = POLLIN; - pfd[0].revents = 0; - pfd[1].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker->wakeup_fd->fd); - pfd[1].events = POLLIN; - pfd[1].revents = 0; - nfds = 2; - if (fd) { - pfd[2].fd = fd->fd; - pfd[2].revents = 0; - GRPC_FD_REF(fd, "basicpoll_begin"); - gpr_mu_unlock(&pollset->mu); - pfd[2].events = - (short)fd_begin_poll(fd, pollset, worker, POLLIN, POLLOUT, &fd_watcher); - if (pfd[2].events != 0) { - nfds++; - } - } else { - gpr_mu_unlock(&pollset->mu); - } - - /* TODO(vpai): Consider first doing a 0 timeout poll here to avoid - even going into the blocking annotation if possible */ - /* poll fd count (argument 2) is shortened by one if we have no events - to poll on - such that it only includes the kicker */ - GPR_TIMER_BEGIN("poll", 0); - GRPC_SCHEDULING_START_BLOCKING_REGION; - r = grpc_poll_function(pfd, nfds, timeout); - GRPC_SCHEDULING_END_BLOCKING_REGION; - GPR_TIMER_END("poll", 0); - - if (r < 0) { - if (errno != EINTR) { - work_combine_error(&error, GRPC_OS_ERROR(errno, "poll")); - } - if (fd) { - fd_end_poll(exec_ctx, &fd_watcher, 0, 0, NULL); - } - } else if (r == 0) { - if (fd) { - fd_end_poll(exec_ctx, &fd_watcher, 0, 0, NULL); - } - } else { - if (pfd[0].revents & POLLIN_CHECK) { - work_combine_error(&error, - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd)); - } - if (pfd[1].revents & POLLIN_CHECK) { - work_combine_error(&error, - grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd)); - } - if (nfds > 2) { - fd_end_poll(exec_ctx, &fd_watcher, pfd[2].revents & POLLIN_CHECK, - pfd[2].revents & POLLOUT_CHECK, pollset); - } else if (fd) { - fd_end_poll(exec_ctx, &fd_watcher, 0, 0, NULL); - } - } - - if (fd) { - GRPC_FD_UNREF(fd, "basicpoll_begin"); - } - - return error; -} - -static void basic_pollset_destroy(grpc_pollset *pollset) { - if (pollset->data.ptr != NULL) { - GRPC_FD_UNREF(pollset->data.ptr, "basicpoll"); - pollset->data.ptr = NULL; - } -} - -static const grpc_pollset_vtable basic_pollset = { - basic_pollset_add_fd, basic_pollset_maybe_work_and_unlock, - basic_pollset_destroy, basic_pollset_destroy}; - -static void become_basic_pollset(grpc_pollset *pollset, grpc_fd *fd_or_null) { - pollset->vtable = &basic_pollset; - pollset->data.ptr = fd_or_null; - if (fd_or_null != NULL) { - GRPC_FD_REF(fd_or_null, "basicpoll"); - } -} - -/******************************************************************************* - * pollset_multipoller_with_poll_posix.c - */ - -#ifndef GRPC_LINUX_MULTIPOLL_WITH_EPOLL - -typedef struct { - /* all polled fds */ - size_t fd_count; - size_t fd_capacity; - grpc_fd **fds; - /* fds that have been removed from the pollset explicitly */ - size_t del_count; - size_t del_capacity; - grpc_fd **dels; -} poll_hdr; - -static void multipoll_with_poll_pollset_add_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - grpc_fd *fd, - int and_unlock_pollset) { - size_t i; - poll_hdr *h = pollset->data.ptr; - /* TODO(ctiller): this is O(num_fds^2); maybe switch to a hash set here */ - for (i = 0; i < h->fd_count; i++) { - if (h->fds[i] == fd) goto exit; - } - if (h->fd_count == h->fd_capacity) { - h->fd_capacity = GPR_MAX(h->fd_capacity + 8, h->fd_count * 3 / 2); - h->fds = gpr_realloc(h->fds, sizeof(grpc_fd *) * h->fd_capacity); - } - h->fds[h->fd_count++] = fd; - GRPC_FD_REF(fd, "multipoller"); -exit: - if (and_unlock_pollset) { - gpr_mu_unlock(&pollset->mu); - } -} - -static grpc_error *multipoll_with_poll_pollset_maybe_work_and_unlock( - grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, - gpr_timespec deadline, gpr_timespec now) { -#define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) -#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) - - int timeout; - int r; - size_t i, j, fd_count; - nfds_t pfd_count; - poll_hdr *h; - /* TODO(ctiller): inline some elements to avoid an allocation */ - grpc_fd_watcher *watchers; - struct pollfd *pfds; - grpc_error *error = GRPC_ERROR_NONE; - - h = pollset->data.ptr; - timeout = poll_deadline_to_millis_timeout(deadline, now); - /* TODO(ctiller): perform just one malloc here if we exceed the inline case */ - pfds = gpr_malloc(sizeof(*pfds) * (h->fd_count + 2)); - watchers = gpr_malloc(sizeof(*watchers) * (h->fd_count + 2)); - fd_count = 0; - pfd_count = 2; - pfds[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd); - pfds[0].events = POLLIN; - pfds[0].revents = 0; - pfds[1].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker->wakeup_fd->fd); - pfds[1].events = POLLIN; - pfds[1].revents = 0; - for (i = 0; i < h->fd_count; i++) { - int remove = fd_is_orphaned(h->fds[i]); - for (j = 0; !remove && j < h->del_count; j++) { - if (h->fds[i] == h->dels[j]) remove = 1; - } - if (remove) { - GRPC_FD_UNREF(h->fds[i], "multipoller"); - } else { - h->fds[fd_count++] = h->fds[i]; - watchers[pfd_count].fd = h->fds[i]; - GRPC_FD_REF(watchers[pfd_count].fd, "multipoller_start"); - pfds[pfd_count].fd = h->fds[i]->fd; - pfds[pfd_count].revents = 0; - pfd_count++; - } - } - for (j = 0; j < h->del_count; j++) { - GRPC_FD_UNREF(h->dels[j], "multipoller_del"); - } - h->del_count = 0; - h->fd_count = fd_count; - gpr_mu_unlock(&pollset->mu); - - for (i = 2; i < pfd_count; i++) { - grpc_fd *fd = watchers[i].fd; - pfds[i].events = (short)fd_begin_poll(fd, pollset, worker, POLLIN, POLLOUT, - &watchers[i]); - GRPC_FD_UNREF(fd, "multipoller_start"); - } - - /* TODO(vpai): Consider first doing a 0 timeout poll here to avoid - even going into the blocking annotation if possible */ - GRPC_SCHEDULING_START_BLOCKING_REGION; - r = grpc_poll_function(pfds, pfd_count, timeout); - GRPC_SCHEDULING_END_BLOCKING_REGION; - - if (r < 0) { - if (errno != EINTR) { - work_combine_error(&error, GRPC_OS_ERROR(errno, "poll")); - } - for (i = 2; i < pfd_count; i++) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); - } - } else if (r == 0) { - for (i = 2; i < pfd_count; i++) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); - } - } else { - if (pfds[0].revents & POLLIN_CHECK) { - work_combine_error(&error, - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd)); - } - if (pfds[1].revents & POLLIN_CHECK) { - work_combine_error(&error, - grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd)); - } - for (i = 2; i < pfd_count; i++) { - if (watchers[i].fd == NULL) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); - continue; - } - fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, - pfds[i].revents & POLLOUT_CHECK, pollset); - } - } - - gpr_free(pfds); - gpr_free(watchers); - - return error; -} - -static void multipoll_with_poll_pollset_finish_shutdown(grpc_pollset *pollset) { - size_t i; - poll_hdr *h = pollset->data.ptr; - for (i = 0; i < h->fd_count; i++) { - GRPC_FD_UNREF(h->fds[i], "multipoller"); - } - for (i = 0; i < h->del_count; i++) { - GRPC_FD_UNREF(h->dels[i], "multipoller_del"); - } - h->fd_count = 0; - h->del_count = 0; -} - -static void multipoll_with_poll_pollset_destroy(grpc_pollset *pollset) { - poll_hdr *h = pollset->data.ptr; - multipoll_with_poll_pollset_finish_shutdown(pollset); - gpr_free(h->fds); - gpr_free(h->dels); - gpr_free(h); -} - -static const grpc_pollset_vtable multipoll_with_poll_pollset = { - multipoll_with_poll_pollset_add_fd, - multipoll_with_poll_pollset_maybe_work_and_unlock, - multipoll_with_poll_pollset_finish_shutdown, - multipoll_with_poll_pollset_destroy}; - -static void poll_become_multipoller(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, grpc_fd **fds, - size_t nfds) { - size_t i; - poll_hdr *h = gpr_malloc(sizeof(poll_hdr)); - pollset->vtable = &multipoll_with_poll_pollset; - pollset->data.ptr = h; - h->fd_count = nfds; - h->fd_capacity = nfds; - h->fds = gpr_malloc(nfds * sizeof(grpc_fd *)); - h->del_count = 0; - h->del_capacity = 0; - h->dels = NULL; - for (i = 0; i < nfds; i++) { - h->fds[i] = fds[i]; - GRPC_FD_REF(fds[i], "multipoller"); - } -} - -#endif /* !GRPC_LINUX_MULTIPOLL_WITH_EPOLL */ - -/******************************************************************************* - * pollset_multipoller_with_epoll_posix.c - */ - -#ifdef GRPC_LINUX_MULTIPOLL_WITH_EPOLL - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "src/core/lib/iomgr/ev_posix.h" -#include "src/core/lib/profiling/timers.h" -#include "src/core/lib/support/block_annotate.h" - -static void set_ready(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, - grpc_pollset *read_notifier_pollset) { - /* only one set_ready can be active at once (but there may be a racing - notify_on) */ - gpr_mu_lock(&fd->mu); - set_ready_locked(exec_ctx, fd, st); - - /* A non-NULL read_notifier_pollset means that the fd is readable. */ - if (read_notifier_pollset != NULL) { - /* Note: Since the fd might be a part of multiple pollsets, this might be - * called multiple times (for each time the fd becomes readable) and it is - * okay to set the fd's read-notifier pollset to anyone of these pollsets */ - set_read_notifier_pollset_locked(exec_ctx, fd, read_notifier_pollset); - } - - gpr_mu_unlock(&fd->mu); -} - -static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_pollset *notifier_pollset) { - set_ready(exec_ctx, fd, &fd->read_closure, notifier_pollset); -} - -static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - set_ready(exec_ctx, fd, &fd->write_closure, NULL); -} - -struct epoll_fd_list { - int *epoll_fds; - size_t count; - size_t capacity; -}; - -static struct epoll_fd_list epoll_fd_global_list; -static gpr_once init_epoll_fd_list_mu = GPR_ONCE_INIT; -static gpr_mu epoll_fd_list_mu; - -static void init_mu(void) { gpr_mu_init(&epoll_fd_list_mu); } - -static void add_epoll_fd_to_global_list(int epoll_fd) { - gpr_once_init(&init_epoll_fd_list_mu, init_mu); - - gpr_mu_lock(&epoll_fd_list_mu); - if (epoll_fd_global_list.count == epoll_fd_global_list.capacity) { - epoll_fd_global_list.capacity = - GPR_MAX((size_t)8, epoll_fd_global_list.capacity * 2); - epoll_fd_global_list.epoll_fds = - gpr_realloc(epoll_fd_global_list.epoll_fds, - epoll_fd_global_list.capacity * sizeof(int)); - } - epoll_fd_global_list.epoll_fds[epoll_fd_global_list.count++] = epoll_fd; - gpr_mu_unlock(&epoll_fd_list_mu); -} - -static void remove_epoll_fd_from_global_list(int epoll_fd) { - gpr_mu_lock(&epoll_fd_list_mu); - GPR_ASSERT(epoll_fd_global_list.count > 0); - for (size_t i = 0; i < epoll_fd_global_list.count; i++) { - if (epoll_fd == epoll_fd_global_list.epoll_fds[i]) { - epoll_fd_global_list.epoll_fds[i] = - epoll_fd_global_list.epoll_fds[--(epoll_fd_global_list.count)]; - break; - } - } - gpr_mu_unlock(&epoll_fd_list_mu); -} - -static void remove_fd_from_all_epoll_sets(int fd) { - int err; - gpr_once_init(&init_epoll_fd_list_mu, init_mu); - gpr_mu_lock(&epoll_fd_list_mu); - if (epoll_fd_global_list.count == 0) { - gpr_mu_unlock(&epoll_fd_list_mu); - return; - } - for (size_t i = 0; i < epoll_fd_global_list.count; i++) { - err = epoll_ctl(epoll_fd_global_list.epoll_fds[i], EPOLL_CTL_DEL, fd, NULL); - if (err < 0 && errno != ENOENT) { - gpr_log(GPR_ERROR, "epoll_ctl del for %d failed: %s", fd, - strerror(errno)); - } - } - gpr_mu_unlock(&epoll_fd_list_mu); -} - -typedef struct { - grpc_pollset *pollset; - grpc_fd *fd; - grpc_closure closure; -} delayed_add; - -typedef struct { int epoll_fd; } epoll_hdr; - -static void finally_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_fd *fd) { - epoll_hdr *h = pollset->data.ptr; - struct epoll_event ev; - int err; - grpc_fd_watcher watcher; - - /* We pretend to be polling whilst adding an fd to keep the fd from being - closed during the add. This may result in a spurious wakeup being assigned - to this pollset whilst adding, but that should be benign. */ - GPR_ASSERT(fd_begin_poll(fd, pollset, NULL, 0, 0, &watcher) == 0); - if (watcher.fd != NULL) { - ev.events = (uint32_t)(EPOLLIN | EPOLLOUT | EPOLLET); - ev.data.ptr = fd; - err = epoll_ctl(h->epoll_fd, EPOLL_CTL_ADD, fd->fd, &ev); - if (err < 0) { - /* FDs may be added to a pollset multiple times, so EEXIST is normal. */ - if (errno != EEXIST) { - gpr_log(GPR_ERROR, "epoll_ctl add for %d failed: %s", fd->fd, - strerror(errno)); - } - } - } - fd_end_poll(exec_ctx, &watcher, 0, 0, NULL); -} - -static void perform_delayed_add(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - delayed_add *da = arg; - - if (!fd_is_orphaned(da->fd)) { - finally_add_fd(exec_ctx, da->pollset, da->fd); - } - - gpr_mu_lock(&da->pollset->mu); - da->pollset->in_flight_cbs--; - if (da->pollset->shutting_down) { - /* We don't care about this pollset anymore. */ - if (da->pollset->in_flight_cbs == 0 && !da->pollset->called_shutdown) { - da->pollset->called_shutdown = 1; - grpc_exec_ctx_sched(exec_ctx, da->pollset->shutdown_done, GRPC_ERROR_NONE, - NULL); - } - } - gpr_mu_unlock(&da->pollset->mu); - - GRPC_FD_UNREF(da->fd, "delayed_add"); - - gpr_free(da); -} - -static void multipoll_with_epoll_pollset_add_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - grpc_fd *fd, - int and_unlock_pollset) { - if (and_unlock_pollset) { - gpr_mu_unlock(&pollset->mu); - finally_add_fd(exec_ctx, pollset, fd); - } else { - delayed_add *da = gpr_malloc(sizeof(*da)); - da->pollset = pollset; - da->fd = fd; - GRPC_FD_REF(fd, "delayed_add"); - grpc_closure_init(&da->closure, perform_delayed_add, da); - pollset->in_flight_cbs++; - grpc_exec_ctx_sched(exec_ctx, &da->closure, GRPC_ERROR_NONE, NULL); - } -} - -/* TODO(klempner): We probably want to turn this down a bit */ -#define GRPC_EPOLL_MAX_EVENTS 1000 - -static grpc_error *multipoll_with_epoll_pollset_maybe_work_and_unlock( - grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, - gpr_timespec deadline, gpr_timespec now) { - struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS]; - int ep_rv; - int poll_rv; - epoll_hdr *h = pollset->data.ptr; - int timeout_ms; - struct pollfd pfds[2]; - grpc_error *error = GRPC_ERROR_NONE; - - /* If you want to ignore epoll's ability to sanely handle parallel pollers, - * for a more apples-to-apples performance comparison with poll, add a - * if (pollset->counter != 0) { return 0; } - * here. - */ - - gpr_mu_unlock(&pollset->mu); - - timeout_ms = poll_deadline_to_millis_timeout(deadline, now); - - pfds[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker->wakeup_fd->fd); - pfds[0].events = POLLIN; - pfds[0].revents = 0; - pfds[1].fd = h->epoll_fd; - pfds[1].events = POLLIN; - pfds[1].revents = 0; - - /* TODO(vpai): Consider first doing a 0 timeout poll here to avoid - even going into the blocking annotation if possible */ - GPR_TIMER_BEGIN("poll", 0); - GRPC_SCHEDULING_START_BLOCKING_REGION; - poll_rv = grpc_poll_function(pfds, 2, timeout_ms); - GRPC_SCHEDULING_END_BLOCKING_REGION; - GPR_TIMER_END("poll", 0); - - if (poll_rv < 0) { - if (errno != EINTR) { - work_combine_error(&error, GRPC_OS_ERROR(errno, "poll")); - } - } else if (poll_rv == 0) { - /* do nothing */ - } else { - if (pfds[0].revents) { - work_combine_error(&error, - grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd)); - } - if (pfds[1].revents) { - do { - /* The following epoll_wait never blocks; it has a timeout of 0 */ - ep_rv = epoll_wait(h->epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, 0); - if (ep_rv < 0) { - if (errno != EINTR) { - work_combine_error(&error, GRPC_OS_ERROR(errno, "epoll_wait")); - } - } else { - int i; - for (i = 0; i < ep_rv; ++i) { - grpc_fd *fd = ep_ev[i].data.ptr; - /* TODO(klempner): We might want to consider making err and pri - * separate events */ - int cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); - int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); - int write_ev = ep_ev[i].events & EPOLLOUT; - if (fd == NULL) { - work_combine_error(&error, grpc_wakeup_fd_consume_wakeup( - &grpc_global_wakeup_fd)); - } else { - if (read_ev || cancel) { - fd_become_readable(exec_ctx, fd, pollset); - } - if (write_ev || cancel) { - fd_become_writable(exec_ctx, fd); - } - } - } - } - } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); - } - } - return error; -} - -static void multipoll_with_epoll_pollset_finish_shutdown( - grpc_pollset *pollset) {} - -static void multipoll_with_epoll_pollset_destroy(grpc_pollset *pollset) { - epoll_hdr *h = pollset->data.ptr; - close(h->epoll_fd); - remove_epoll_fd_from_global_list(h->epoll_fd); - gpr_free(h); -} - -static const grpc_pollset_vtable multipoll_with_epoll_pollset = { - multipoll_with_epoll_pollset_add_fd, - multipoll_with_epoll_pollset_maybe_work_and_unlock, - multipoll_with_epoll_pollset_finish_shutdown, - multipoll_with_epoll_pollset_destroy}; - -static void epoll_become_multipoller(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, grpc_fd **fds, - size_t nfds) { - size_t i; - epoll_hdr *h = gpr_malloc(sizeof(epoll_hdr)); - struct epoll_event ev; - int err; - - pollset->vtable = &multipoll_with_epoll_pollset; - pollset->data.ptr = h; - h->epoll_fd = epoll_create1(EPOLL_CLOEXEC); - if (h->epoll_fd < 0) { - /* TODO(klempner): Fall back to poll here, especially on ENOSYS */ - gpr_log(GPR_ERROR, "epoll_create1 failed: %s", strerror(errno)); - abort(); - } - add_epoll_fd_to_global_list(h->epoll_fd); - - ev.events = (uint32_t)(EPOLLIN | EPOLLET); - ev.data.ptr = NULL; - err = epoll_ctl(h->epoll_fd, EPOLL_CTL_ADD, - GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), &ev); - if (err < 0) { - gpr_log(GPR_ERROR, "epoll_ctl add for %d failed: %s", - GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), - strerror(errno)); - } - - for (i = 0; i < nfds; i++) { - multipoll_with_epoll_pollset_add_fd(exec_ctx, pollset, fds[i], 0); - } -} - -#else /* GRPC_LINUX_MULTIPOLL_WITH_EPOLL */ - -static void remove_fd_from_all_epoll_sets(int fd) {} - -#endif /* GRPC_LINUX_MULTIPOLL_WITH_EPOLL */ - -/******************************************************************************* - * pollset_set_posix.c - */ - -static grpc_pollset_set *pollset_set_create(void) { - grpc_pollset_set *pollset_set = gpr_malloc(sizeof(*pollset_set)); - memset(pollset_set, 0, sizeof(*pollset_set)); - gpr_mu_init(&pollset_set->mu); - return pollset_set; -} - -static void pollset_set_destroy(grpc_pollset_set *pollset_set) { - size_t i; - gpr_mu_destroy(&pollset_set->mu); - for (i = 0; i < pollset_set->fd_count; i++) { - GRPC_FD_UNREF(pollset_set->fds[i], "pollset_set"); - } - gpr_free(pollset_set->pollsets); - gpr_free(pollset_set->pollset_sets); - gpr_free(pollset_set->fds); - gpr_free(pollset_set); -} - -static void pollset_set_add_pollset(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, - grpc_pollset *pollset) { - size_t i, j; - gpr_mu_lock(&pollset_set->mu); - if (pollset_set->pollset_count == pollset_set->pollset_capacity) { - pollset_set->pollset_capacity = - GPR_MAX(8, 2 * pollset_set->pollset_capacity); - pollset_set->pollsets = - gpr_realloc(pollset_set->pollsets, pollset_set->pollset_capacity * - sizeof(*pollset_set->pollsets)); - } - pollset_set->pollsets[pollset_set->pollset_count++] = pollset; - for (i = 0, j = 0; i < pollset_set->fd_count; i++) { - if (fd_is_orphaned(pollset_set->fds[i])) { - GRPC_FD_UNREF(pollset_set->fds[i], "pollset_set"); - } else { - pollset_add_fd(exec_ctx, pollset, pollset_set->fds[i]); - pollset_set->fds[j++] = pollset_set->fds[i]; - } - } - pollset_set->fd_count = j; - gpr_mu_unlock(&pollset_set->mu); -} - -static void pollset_set_del_pollset(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, - grpc_pollset *pollset) { - size_t i; - gpr_mu_lock(&pollset_set->mu); - for (i = 0; i < pollset_set->pollset_count; i++) { - if (pollset_set->pollsets[i] == pollset) { - pollset_set->pollset_count--; - GPR_SWAP(grpc_pollset *, pollset_set->pollsets[i], - pollset_set->pollsets[pollset_set->pollset_count]); - break; - } - } - gpr_mu_unlock(&pollset_set->mu); -} - -static void pollset_set_add_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *bag, - grpc_pollset_set *item) { - size_t i, j; - gpr_mu_lock(&bag->mu); - if (bag->pollset_set_count == bag->pollset_set_capacity) { - bag->pollset_set_capacity = GPR_MAX(8, 2 * bag->pollset_set_capacity); - bag->pollset_sets = - gpr_realloc(bag->pollset_sets, - bag->pollset_set_capacity * sizeof(*bag->pollset_sets)); - } - bag->pollset_sets[bag->pollset_set_count++] = item; - for (i = 0, j = 0; i < bag->fd_count; i++) { - if (fd_is_orphaned(bag->fds[i])) { - GRPC_FD_UNREF(bag->fds[i], "pollset_set"); - } else { - pollset_set_add_fd(exec_ctx, item, bag->fds[i]); - bag->fds[j++] = bag->fds[i]; - } - } - bag->fd_count = j; - gpr_mu_unlock(&bag->mu); -} - -static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *bag, - grpc_pollset_set *item) { - size_t i; - gpr_mu_lock(&bag->mu); - for (i = 0; i < bag->pollset_set_count; i++) { - if (bag->pollset_sets[i] == item) { - bag->pollset_set_count--; - GPR_SWAP(grpc_pollset_set *, bag->pollset_sets[i], - bag->pollset_sets[bag->pollset_set_count]); - break; - } - } - gpr_mu_unlock(&bag->mu); -} - -static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, grpc_fd *fd) { - size_t i; - gpr_mu_lock(&pollset_set->mu); - if (pollset_set->fd_count == pollset_set->fd_capacity) { - pollset_set->fd_capacity = GPR_MAX(8, 2 * pollset_set->fd_capacity); - pollset_set->fds = gpr_realloc( - pollset_set->fds, pollset_set->fd_capacity * sizeof(*pollset_set->fds)); - } - GRPC_FD_REF(fd, "pollset_set"); - pollset_set->fds[pollset_set->fd_count++] = fd; - for (i = 0; i < pollset_set->pollset_count; i++) { - pollset_add_fd(exec_ctx, pollset_set->pollsets[i], fd); - } - for (i = 0; i < pollset_set->pollset_set_count; i++) { - pollset_set_add_fd(exec_ctx, pollset_set->pollset_sets[i], fd); - } - gpr_mu_unlock(&pollset_set->mu); -} - -static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, grpc_fd *fd) { - size_t i; - gpr_mu_lock(&pollset_set->mu); - for (i = 0; i < pollset_set->fd_count; i++) { - if (pollset_set->fds[i] == fd) { - pollset_set->fd_count--; - GPR_SWAP(grpc_fd *, pollset_set->fds[i], - pollset_set->fds[pollset_set->fd_count]); - GRPC_FD_UNREF(fd, "pollset_set"); - break; - } - } - for (i = 0; i < pollset_set->pollset_set_count; i++) { - pollset_set_del_fd(exec_ctx, pollset_set->pollset_sets[i], fd); - } - gpr_mu_unlock(&pollset_set->mu); -} - -/******************************************************************************* - * workqueue stubs - */ - -#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG -static grpc_workqueue *workqueue_ref(grpc_workqueue *workqueue, - const char *file, int line, - const char *reason) { - return workqueue; -} -static void workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, - const char *file, int line, const char *reason) {} -#else -static grpc_workqueue *workqueue_ref(grpc_workqueue *workqueue) { - return workqueue; -} -static void workqueue_unref(grpc_exec_ctx *exec_ctx, - grpc_workqueue *workqueue) {} -#endif - -static void workqueue_enqueue(grpc_exec_ctx *exec_ctx, - grpc_workqueue *workqueue, grpc_closure *closure, - grpc_error *error) { - grpc_exec_ctx_sched(exec_ctx, closure, error, NULL); -} - -/******************************************************************************* - * event engine binding - */ - -static void shutdown_engine(void) { - fd_global_shutdown(); - pollset_global_shutdown(); -} - -static const grpc_event_engine_vtable vtable = { - .pollset_size = sizeof(grpc_pollset), - - .fd_create = fd_create, - .fd_wrapped_fd = fd_wrapped_fd, - .fd_orphan = fd_orphan, - .fd_shutdown = fd_shutdown, - .fd_is_shutdown = fd_is_shutdown, - .fd_notify_on_read = fd_notify_on_read, - .fd_notify_on_write = fd_notify_on_write, - .fd_get_read_notifier_pollset = fd_get_read_notifier_pollset, - .fd_get_workqueue = fd_get_workqueue, - - .pollset_init = pollset_init, - .pollset_shutdown = pollset_shutdown, - .pollset_reset = pollset_reset, - .pollset_destroy = pollset_destroy, - .pollset_work = pollset_work, - .pollset_kick = pollset_kick, - .pollset_add_fd = pollset_add_fd, - - .pollset_set_create = pollset_set_create, - .pollset_set_destroy = pollset_set_destroy, - .pollset_set_add_pollset = pollset_set_add_pollset, - .pollset_set_del_pollset = pollset_set_del_pollset, - .pollset_set_add_pollset_set = pollset_set_add_pollset_set, - .pollset_set_del_pollset_set = pollset_set_del_pollset_set, - .pollset_set_add_fd = pollset_set_add_fd, - .pollset_set_del_fd = pollset_set_del_fd, - - .kick_poller = kick_poller, - - .workqueue_ref = workqueue_ref, - .workqueue_unref = workqueue_unref, - .workqueue_enqueue = workqueue_enqueue, - - .shutdown_engine = shutdown_engine, -}; - -const grpc_event_engine_vtable *grpc_init_poll_and_epoll_posix(void) { -#ifdef GRPC_LINUX_MULTIPOLL_WITH_EPOLL - platform_become_multipoller = epoll_become_multipoller; -#else - platform_become_multipoller = poll_become_multipoller; -#endif - fd_global_init(); - pollset_global_init(); - return &vtable; -} - -#endif diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.h b/src/core/lib/iomgr/ev_poll_and_epoll_posix.h deleted file mode 100644 index 06d6dbf29d..0000000000 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * Copyright 2015, 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. - * - */ - -#ifndef GRPC_CORE_LIB_IOMGR_EV_POLL_AND_EPOLL_POSIX_H -#define GRPC_CORE_LIB_IOMGR_EV_POLL_AND_EPOLL_POSIX_H - -#include "src/core/lib/iomgr/ev_posix.h" - -const grpc_event_engine_vtable *grpc_init_poll_and_epoll_posix(void); - -#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_AND_EPOLL_POSIX_H */ diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index ef36ba89b2..ab139895fd 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -45,7 +45,6 @@ #include #include "src/core/lib/iomgr/ev_epoll_linux.h" -#include "src/core/lib/iomgr/ev_poll_and_epoll_posix.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/support/env.h" @@ -67,7 +66,6 @@ static const event_engine_factory g_factories[] = { {"epoll", grpc_init_epoll_linux}, {"poll", grpc_init_poll_posix}, {"poll-cv", grpc_init_poll_cv_posix}, - {"legacy", grpc_init_poll_and_epoll_posix}, }; static void add(const char *beg, const char *end, char ***ss, size_t *ns) { diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 8f4b3bc9b2..06b226ce4b 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -102,7 +102,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/iomgr/endpoint_pair_windows.c', 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', - 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 793561d78f..a849fd5bdc 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -809,7 +809,6 @@ src/core/lib/iomgr/endpoint.h \ src/core/lib/iomgr/endpoint_pair.h \ src/core/lib/iomgr/error.h \ src/core/lib/iomgr/ev_epoll_linux.h \ -src/core/lib/iomgr/ev_poll_and_epoll_posix.h \ src/core/lib/iomgr/ev_poll_posix.h \ src/core/lib/iomgr/ev_posix.h \ src/core/lib/iomgr/exec_ctx.h \ @@ -986,7 +985,6 @@ src/core/lib/iomgr/endpoint_pair_uv.c \ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ -src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 8f043f9bcc..fe8ad5f6ad 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -69,7 +69,7 @@ _FORCE_ENVIRON_FOR_WRAPPERS = { _POLLING_STRATEGIES = { - 'linux': ['epoll', 'poll', 'poll-cv', 'legacy'] + 'linux': ['epoll', 'poll', 'poll-cv'] } diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 2faeed8d39..deba7a36f9 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6602,7 +6602,6 @@ "src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -6733,8 +6732,6 @@ "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 138246668f..7cd0de0cdf 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -318,7 +318,6 @@ - @@ -522,8 +521,6 @@ - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index c7b9b6664a..d9ac55acd4 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -76,9 +76,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -779,9 +776,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 40ec6cc816..6f1e20633a 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -211,7 +211,6 @@ - @@ -373,8 +372,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 3a973616ec..1e2a9ff8fe 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -133,9 +133,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -575,9 +572,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 5573fc5cde..65d1168d9d 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -308,7 +308,6 @@ - @@ -490,8 +489,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 985abf7610..2dae3f2361 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -79,9 +79,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -692,9 +689,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr -- cgit v1.2.3 From ea6689dbdfcb5ff9b599e0e54afa8c7ea40e3718 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Nov 2016 09:46:41 -0800 Subject: Added INIT state to grpc_connectivity_state --- include/grpc/impl/codegen/connectivity_state.h | 2 ++ src/core/ext/lb_policy/pick_first/pick_first.c | 2 ++ src/core/ext/lb_policy/round_robin/round_robin.c | 5 +++-- src/core/lib/transport/connectivity_state.c | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/include/grpc/impl/codegen/connectivity_state.h b/include/grpc/impl/codegen/connectivity_state.h index 71865d8a56..c6d1a33405 100644 --- a/include/grpc/impl/codegen/connectivity_state.h +++ b/include/grpc/impl/codegen/connectivity_state.h @@ -40,6 +40,8 @@ extern "C" { /** Connectivity state of a channel. */ typedef enum { + /** channel has just been initialized */ + GRPC_CHANNEL_INIT = -1, /** channel is idle */ GRPC_CHANNEL_IDLE, /** channel is connecting */ diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index ac3c6a305a..39f3b3d60f 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -292,6 +292,8 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, } else { loop: switch (p->checking_connectivity) { + case GRPC_CHANNEL_INIT: + GPR_UNREACHABLE_CODE(); case GRPC_CHANNEL_READY: grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_READY, GRPC_ERROR_NONE, diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index f83ae1b1e9..a07aef3815 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -59,7 +59,6 @@ * the subchannel by the caller. */ -#include #include #include @@ -401,7 +400,7 @@ static void start_picking(grpc_exec_ctx *exec_ctx, round_robin_lb_policy *p) { * to signal an undefined previous state. We won't be referring to this * value again and it'll be overwritten after the first call to * rr_connectivity_changed */ - sd->prev_connectivity_state = INT_MAX; + sd->prev_connectivity_state = GRPC_CHANNEL_INIT; sd->curr_connectivity_state = GRPC_CHANNEL_IDLE; GRPC_LB_POLICY_WEAK_REF(&p->base, "rr_connectivity"); grpc_subchannel_notify_on_state_change( @@ -553,6 +552,8 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, return; } switch (sd->curr_connectivity_state) { + case GRPC_CHANNEL_INIT: + GPR_UNREACHABLE_CODE(); case GRPC_CHANNEL_READY: /* add the newly connected subchannel to the list of connected ones. * Note that it goes to the "end of the line". */ diff --git a/src/core/lib/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.c index fdb5307814..89072879d9 100644 --- a/src/core/lib/transport/connectivity_state.c +++ b/src/core/lib/transport/connectivity_state.c @@ -43,6 +43,8 @@ int grpc_connectivity_state_trace = 0; const char *grpc_connectivity_state_name(grpc_connectivity_state state) { switch (state) { + case GRPC_CHANNEL_INIT: + return "INIT"; case GRPC_CHANNEL_IDLE: return "IDLE"; case GRPC_CHANNEL_CONNECTING: @@ -159,6 +161,7 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, grpc_error_free_string(error_string); } switch (state) { + case GRPC_CHANNEL_INIT: case GRPC_CHANNEL_CONNECTING: case GRPC_CHANNEL_IDLE: case GRPC_CHANNEL_READY: -- cgit v1.2.3 From f953295b742547120796c0eb51ae499f5a33b1a9 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Nov 2016 14:14:25 -0800 Subject: Fixed locking for grpclb --- src/core/ext/lb_policy/grpclb/grpclb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 41e177c495..9f37dc9a67 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -605,10 +605,10 @@ static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, * right grpclb status. */ rr_connectivity_data *rr_conn_data = arg; glb_lb_policy *glb_policy = rr_conn_data->glb_policy; + gpr_mu_lock(&glb_policy->mu); if (rr_conn_data->state != GRPC_CHANNEL_SHUTDOWN && !glb_policy->shutting_down) { - gpr_mu_lock(&glb_policy->mu); /* RR not shutting down. Mimic the RR's policy state */ grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, rr_conn_data->state, GRPC_ERROR_REF(error), @@ -617,12 +617,12 @@ static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, &rr_conn_data->state, &rr_conn_data->on_change); - gpr_mu_unlock(&glb_policy->mu); } else { GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, "rr_connectivity_cb"); gpr_free(rr_conn_data); } + gpr_mu_unlock(&glb_policy->mu); } static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, @@ -1081,6 +1081,7 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, grpc_op ops[2]; memset(ops, 0, sizeof(ops)); grpc_op *op = ops; + gpr_mu_lock(&glb_policy->mu); if (glb_policy->lb_response_payload != NULL) { gpr_backoff_reset(&glb_policy->lb_call_backoff_state); /* Received data from the LB server. Look inside @@ -1109,7 +1110,6 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, /* update serverlist */ if (serverlist->num_servers > 0) { - gpr_mu_lock(&glb_policy->mu); if (grpc_grpclb_serverlist_equals(glb_policy->serverlist, serverlist)) { if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, @@ -1125,7 +1125,6 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, rr_handover_locked(exec_ctx, glb_policy, error); } - gpr_mu_unlock(&glb_policy->mu); } else { if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, @@ -1153,11 +1152,13 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, &glb_policy->lb_on_response_received); /* loop */ GPR_ASSERT(GRPC_CALL_OK == call_error); } + gpr_mu_unlock(&glb_policy->mu); } else { /* empty payload: call cancelled. */ /* dispose of the "lb_on_response_received" weak ref taken in * query_for_backends_locked() and reused in every reception loop */ - GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, - "lb_on_response_received_empty_payload"); + gpr_mu_unlock(&glb_policy->mu); + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, + "lb_on_response_received_empty_payload"); } } @@ -1175,7 +1176,6 @@ static void lb_call_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg, query_for_backends_locked(exec_ctx, glb_policy); } gpr_mu_unlock(&glb_policy->mu); - GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, "grpclb_on_retry_timer"); } -- cgit v1.2.3 From 8006949fd372d0e18317060d0d070e9bd5d71401 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Nov 2016 14:17:48 -0800 Subject: Added assert for lb_token before reffing it --- src/core/ext/lb_policy/grpclb/grpclb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 9f37dc9a67..a69b5c8e51 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -186,6 +186,7 @@ static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg, * addresses failed to connect). There won't be any user_data/token * available */ if (wc_arg->target != NULL) { + GPR_ASSERT(wc_arg->lb_token != NULL); initial_metadata_add_lb_token(wc_arg->initial_metadata, wc_arg->lb_token_mdelem_storage, GRPC_MDELEM_REF(wc_arg->lb_token)); -- cgit v1.2.3 From 7810898658353056bb6f6cd4c84bfa00ff7c7290 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 8 Nov 2016 14:28:03 -0800 Subject: Add grpc_socket_mutator_compare --- src/core/lib/iomgr/socket_mutator.c | 19 ++++++++++++++++++- src/core/lib/iomgr/socket_mutator.h | 5 +++++ test/core/iomgr/socket_utils_test.c | 12 ++++++++++-- test/cpp/common/channel_arguments_test.cc | 9 +++++++-- 4 files changed, 40 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/socket_mutator.c b/src/core/lib/iomgr/socket_mutator.c index 3f66cb100d..8b1efb6bab 100644 --- a/src/core/lib/iomgr/socket_mutator.c +++ b/src/core/lib/iomgr/socket_mutator.c @@ -52,6 +52,20 @@ bool grpc_socket_mutator_mutate_fd(grpc_socket_mutator *mutator, int fd) { return mutator->vtable->mutate_fd(fd, mutator); } +int grpc_socket_mutator_compare(grpc_socket_mutator *a, + grpc_socket_mutator *b) { + int c = GPR_ICMP(a, b); + if (c != 0) { + grpc_socket_mutator *sma = a; + grpc_socket_mutator *smb = b; + c = GPR_ICMP(sma->vtable, smb->vtable); + if (c == 0) { + c = sma->vtable->compare(sma, smb); + } + } + return c; +} + void grpc_socket_mutator_unref(grpc_socket_mutator *mutator) { if (gpr_unref(&mutator->refcount)) { mutator->vtable->destory(mutator); @@ -66,7 +80,10 @@ static void socket_mutator_arg_destroy(void *p) { grpc_socket_mutator_unref(p); } -static int socket_mutator_cmp(void *a, void *b) { return GPR_ICMP(a, b); } +static int socket_mutator_cmp(void *a, void *b) { + return grpc_socket_mutator_compare((grpc_socket_mutator *)a, + (grpc_socket_mutator *)b); +} static const grpc_arg_pointer_vtable socket_mutator_arg_vtable = { socket_mutator_arg_copy, socket_mutator_arg_destroy, socket_mutator_cmp}; diff --git a/src/core/lib/iomgr/socket_mutator.h b/src/core/lib/iomgr/socket_mutator.h index 5200f52d3a..2f5b6c248e 100644 --- a/src/core/lib/iomgr/socket_mutator.h +++ b/src/core/lib/iomgr/socket_mutator.h @@ -45,6 +45,8 @@ extern "C" { typedef struct { /** Mutates the socket opitons of \a fd */ bool (*mutate_fd)(int fd, grpc_socket_mutator *mutator); + /** Compare socket mutator \a a and \a b */ + int (*compare)(grpc_socket_mutator *a, grpc_socket_mutator *b); /** Destroys the socket mutator instance */ void (*destory)(grpc_socket_mutator *mutator); } grpc_socket_mutator_vtable; @@ -65,6 +67,9 @@ grpc_arg grpc_socket_mutator_to_arg(grpc_socket_mutator *mutator); /** Perform the file descriptor mutation operation of \a mutator on \a fd */ bool grpc_socket_mutator_mutate_fd(grpc_socket_mutator *mutator, int fd); +/** Compare if \a a and \a b are the same mutator or have same settings */ +int grpc_socket_mutator_compare(grpc_socket_mutator *a, grpc_socket_mutator *b); + grpc_socket_mutator *grpc_socket_mutator_ref(grpc_socket_mutator *mutator); void grpc_socket_mutator_unref(grpc_socket_mutator *mutator); diff --git a/test/core/iomgr/socket_utils_test.c b/test/core/iomgr/socket_utils_test.c index b3363b2be2..7eee2d1d10 100644 --- a/test/core/iomgr/socket_utils_test.c +++ b/test/core/iomgr/socket_utils_test.c @@ -45,6 +45,7 @@ #include #include #include +#include #include "src/core/lib/iomgr/socket_mutator.h" #include "test/core/util/test_config.h" @@ -76,8 +77,15 @@ static void destroy_test_mutator(grpc_socket_mutator *mutator) { gpr_free(m); } -static const grpc_socket_mutator_vtable mutator_vtable = {mutate_fd, - destroy_test_mutator}; +static int compare_test_mutator(grpc_socket_mutator *a, + grpc_socket_mutator *b) { + struct test_socket_mutator *ma = (struct test_socket_mutator *)a; + struct test_socket_mutator *mb = (struct test_socket_mutator *)b; + return GPR_ICMP(ma->option_value, mb->option_value); +} + +static const grpc_socket_mutator_vtable mutator_vtable = { + mutate_fd, compare_test_mutator, destroy_test_mutator}; int main(int argc, char **argv) { int sock; diff --git a/test/cpp/common/channel_arguments_test.cc b/test/cpp/common/channel_arguments_test.cc index e048108f0f..c2cf350b37 100644 --- a/test/cpp/common/channel_arguments_test.cc +++ b/test/cpp/common/channel_arguments_test.cc @@ -34,6 +34,7 @@ #include #include +#include #include #include "src/core/lib/iomgr/socket_mutator.h" @@ -62,13 +63,17 @@ bool test_mutator_mutate_fd(int fd, grpc_socket_mutator* mutator) { return tsm->MutateFd(fd); } +int test_mutator_compare(grpc_socket_mutator* a, grpc_socket_mutator* b) { + return GPR_ICMP(a, b); +} + void test_mutator_destroy(grpc_socket_mutator* mutator) { TestSocketMutator* tsm = (TestSocketMutator*)mutator; delete tsm; } -grpc_socket_mutator_vtable test_mutator_vtable = {test_mutator_mutate_fd, - test_mutator_destroy}; +grpc_socket_mutator_vtable test_mutator_vtable = { + test_mutator_mutate_fd, test_mutator_compare, test_mutator_destroy}; // // TestSocketMutator implementation -- cgit v1.2.3 From d4d2ecef8ea36b3ced81734aa485b79356c42da1 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Nov 2016 14:38:12 -0800 Subject: clang-format --- src/core/ext/lb_policy/grpclb/grpclb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index a69b5c8e51..d68fbb3dfb 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -1155,11 +1155,11 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, } gpr_mu_unlock(&glb_policy->mu); } else { /* empty payload: call cancelled. */ - /* dispose of the "lb_on_response_received" weak ref taken in - * query_for_backends_locked() and reused in every reception loop */ - gpr_mu_unlock(&glb_policy->mu); - GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, - "lb_on_response_received_empty_payload"); + /* dispose of the "lb_on_response_received" weak ref taken in + * query_for_backends_locked() and reused in every reception loop */ + gpr_mu_unlock(&glb_policy->mu); + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, + "lb_on_response_received_empty_payload"); } } -- cgit v1.2.3 From 76b894c5e6a76134631b071e72b56f12ab331f08 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Nov 2016 15:59:30 -0800 Subject: Demote handshake failure logging message from ERROR to INFO --- src/core/lib/security/transport/handshake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 01e7fab773..2eb5544f43 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -125,7 +125,7 @@ static void security_handshake_done(grpc_exec_ctx *exec_ctx, h->auth_context); } else { const char *msg = grpc_error_string(error); - gpr_log(GPR_ERROR, "Security handshake failed: %s", msg); + gpr_log(GPR_INFO, "Security handshake failed: %s", msg); grpc_error_free_string(msg); if (h->secure_endpoint != NULL) { -- cgit v1.2.3 From 502eb90b0977736bfdbbb6b528db93ba3e5d44f5 Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 9 Nov 2016 13:13:13 -0800 Subject: redact json key --- .../lib/security/credentials/jwt/jwt_credentials.c | 51 ++++++++++++++++++---- 1 file changed, 42 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.c b/src/core/lib/security/credentials/jwt/jwt_credentials.c index f87ba0ce8d..01c349cd75 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.c +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.c @@ -144,17 +144,50 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key( return &c->base; } +static char *redact_private_key(const char *json_key) { + const char *json_key_end = json_key + strlen(json_key); + const char *begin_cue = "BEGIN PRIVATE KEY"; + const char *end_cue = "END PRIVATE KEY"; + const char *redacted = " "; + const char *begin_redact = strstr(json_key, begin_cue); + const char *end_redact = strstr(json_key, end_cue); + if (!begin_redact) { + begin_redact = json_key; + } else { + begin_redact += strlen(begin_cue); + } + if (!end_redact) { + end_redact = json_key_end; + } + GPR_ASSERT(end_redact - begin_redact >= 0); + size_t result_length = + strlen(json_key) - (size_t)(end_redact - begin_redact) + strlen(redacted); + char *clean_json = (char *)gpr_malloc(result_length + 1); + clean_json[result_length] = 0; + char *current = clean_json; + memcpy(current, json_key, (size_t)(begin_redact - json_key)); + current += (begin_redact - json_key); + memcpy(current, redacted, strlen(redacted)); + current += strlen(redacted); + memcpy(current, end_redact, (size_t)(json_key_end - end_redact)); + return clean_json; +} + grpc_call_credentials *grpc_service_account_jwt_access_credentials_create( const char *json_key, gpr_timespec token_lifetime, void *reserved) { - GRPC_API_TRACE( - "grpc_service_account_jwt_access_credentials_create(" - "json_key=%s, " - "token_lifetime=" - "gpr_timespec { tv_sec: %" PRId64 - ", tv_nsec: %d, clock_type: %d }, " - "reserved=%p)", - 5, (json_key, token_lifetime.tv_sec, token_lifetime.tv_nsec, - (int)token_lifetime.clock_type, reserved)); + if (grpc_api_trace) { + char *clean_json = redact_private_key(json_key); + gpr_log(GPR_INFO, + "grpc_service_account_jwt_access_credentials_create(" + "json_key=%s, " + "token_lifetime=" + "gpr_timespec { tv_sec: %" PRId64 + ", tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", + clean_json, token_lifetime.tv_sec, token_lifetime.tv_nsec, + (int)token_lifetime.clock_type, reserved); + gpr_free(clean_json); + } GPR_ASSERT(reserved == NULL); return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key_create_from_string(json_key), token_lifetime); -- cgit v1.2.3 From 998fdd0c46a0684a6c7348751cc1632ce21d3e2f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 9 Nov 2016 22:54:05 +0100 Subject: dont hang when empty metadata is passed --- src/core/lib/security/credentials/plugin/plugin_credentials.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.c b/src/core/lib/security/credentials/plugin/plugin_credentials.c index 61c10862da..5d950098a0 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.c +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.c @@ -104,6 +104,8 @@ static void plugin_md_request_metadata_ready(void *request, grpc_slice_unref(md_array[i].value); } gpr_free(md_array); + } else if (num_md == 0) { + r->cb(&exec_ctx, r->user_data, NULL, 0, GRPC_CREDENTIALS_OK, NULL); } } gpr_free(r); -- cgit v1.2.3 From c625c7a023cb688a135be96cef64543f0e08a851 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 9 Nov 2016 14:12:37 -0800 Subject: Allow fetching service config via grpc_channel_get_info(). --- include/grpc/impl/codegen/grpc_types.h | 3 +++ src/core/ext/client_channel/client_channel.c | 16 +++++++++++- test/core/client_channel/lb_policies_test.c | 37 ++++++++++++++++++++++------ 3 files changed, 48 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 1bf78e4e69..9cb89e9841 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -473,6 +473,9 @@ typedef struct { /* If non-NULL, will be set to point to a string indicating the LB * policy name. Caller takes ownership. */ char **lb_policy_name; + /* If non-NULL, will be set to point to a string containing the + * service config used by the channel in JSON form. */ + char **service_config_json; } grpc_channel_info; typedef struct grpc_resource_quota grpc_resource_quota; diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 55cb660311..139912e4ba 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -144,6 +144,8 @@ typedef struct client_channel_channel_data { /** currently active load balancer */ char *lb_policy_name; grpc_lb_policy *lb_policy; + /** service config in JSON form */ + char *service_config_json; /** maps method names to method_parameters structs */ grpc_mdstr_hash_table *method_params_table; /** incoming resolver result - set by resolver.next() */ @@ -250,6 +252,7 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_connectivity_state state = GRPC_CHANNEL_TRANSIENT_FAILURE; bool exit_idle = false; grpc_error *state_error = GRPC_ERROR_CREATE("No load balancing policy"); + char *service_config_json = NULL; if (chand->resolver_result != NULL) { // Find LB policy name. @@ -305,8 +308,9 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_channel_args_find(chand->resolver_result, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); + service_config_json = gpr_strdup(channel_arg->value.string); grpc_service_config *service_config = - grpc_service_config_create(channel_arg->value.string); + grpc_service_config_create(service_config_json); if (service_config != NULL) { method_params_table = grpc_service_config_create_method_config_table( service_config, method_parameters_create_from_json, @@ -334,6 +338,10 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, } old_lb_policy = chand->lb_policy; chand->lb_policy = lb_policy; + if (service_config_json != NULL) { + gpr_free(chand->service_config_json); + chand->service_config_json = service_config_json; + } if (chand->method_params_table != NULL) { grpc_mdstr_hash_table_unref(chand->method_params_table); } @@ -469,6 +477,11 @@ static void cc_get_channel_info(grpc_exec_ctx *exec_ctx, ? NULL : gpr_strdup(chand->lb_policy_name); } + if (info->service_config_json != NULL) { + *info->service_config_json = chand->service_config_json == NULL + ? NULL + : gpr_strdup(chand->service_config_json); + } gpr_mu_unlock(&chand->mu); } @@ -512,6 +525,7 @@ static void cc_destroy_channel_elem(grpc_exec_ctx *exec_ctx, GRPC_LB_POLICY_UNREF(exec_ctx, chand->lb_policy, "channel"); } gpr_free(chand->lb_policy_name); + gpr_free(chand->service_config_json); if (chand->method_params_table != NULL) { grpc_mdstr_hash_table_unref(chand->method_params_table); } diff --git a/test/core/client_channel/lb_policies_test.c b/test/core/client_channel/lb_policies_test.c index 198aafb91f..3aba906094 100644 --- a/test/core/client_channel/lb_policies_test.c +++ b/test/core/client_channel/lb_policies_test.c @@ -43,6 +43,7 @@ #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/lb_policy_registry.h" +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/channel.h" @@ -642,21 +643,43 @@ static void test_pending_calls(size_t concurrent_calls) { } static void test_get_channel_info() { - grpc_channel *channel = grpc_insecure_channel_create( - "test:127.0.0.1:1234?lb_policy=round_robin", NULL, NULL); + grpc_channel *channel = + grpc_insecure_channel_create("ipv4:127.0.0.1:1234", NULL, NULL); // Ensures that resolver returns. grpc_channel_check_connectivity_state(channel, true /* try_to_connect */); - // Use grpc_channel_get_info() to get LB policy name. - char *lb_policy_name = NULL; + // First, request no fields. This is a no-op. grpc_channel_info channel_info; + memset(&channel_info, 0, sizeof(channel_info)); + grpc_channel_get_info(channel, &channel_info); + // Request LB policy name. + char *lb_policy_name = NULL; channel_info.lb_policy_name = &lb_policy_name; grpc_channel_get_info(channel, &channel_info); GPR_ASSERT(lb_policy_name != NULL); - GPR_ASSERT(strcmp(lb_policy_name, "round_robin") == 0); + GPR_ASSERT(strcmp(lb_policy_name, "pick_first") == 0); gpr_free(lb_policy_name); - // Try again without requesting anything. This is a no-op. - channel_info.lb_policy_name = NULL; + // Request service config, which does not exist, so we'll get nothing back. + memset(&channel_info, 0, sizeof(channel_info)); + char *service_config_json = "dummy_string"; + channel_info.service_config_json = &service_config_json; + grpc_channel_get_info(channel, &channel_info); + GPR_ASSERT(service_config_json == NULL); + // Recreate the channel such that it has a service config. + grpc_channel_destroy(channel); + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = GRPC_ARG_SERVICE_CONFIG; + arg.value.string = "{\"lb_policy_name\": \"round_robin\"}"; + grpc_channel_args *args = grpc_channel_args_copy_and_add(NULL, &arg, 1); + channel = grpc_insecure_channel_create("ipv4:127.0.0.1:1234", args, NULL); + grpc_channel_args_destroy(args); + // Ensures that resolver returns. + grpc_channel_check_connectivity_state(channel, true /* try_to_connect */); + // Now request the service config again. grpc_channel_get_info(channel, &channel_info); + GPR_ASSERT(service_config_json != NULL); + GPR_ASSERT(strcmp(service_config_json, arg.value.string) == 0); + gpr_free(service_config_json); // Clean up. grpc_channel_destroy(channel); } -- cgit v1.2.3 From e2672c92b60bf736c8aef331fdd8c7e087dc0b90 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 9 Nov 2016 15:12:22 -0800 Subject: Some slice and resource quota updates to UV and Node code --- src/core/lib/iomgr/tcp_uv.c | 86 ++++++++++++++++++--------------------------- src/node/ext/byte_buffer.cc | 2 +- 2 files changed, 35 insertions(+), 53 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index 8b58c04ff5..e690b18f20 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -38,14 +38,17 @@ #include #include +#include + #include #include -#include #include #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/network_status_tracker.h" +#include "src/core/lib/iomgr/resource_quota.h" #include "src/core/lib/iomgr/tcp_uv.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" int grpc_tcp_trace = 0; @@ -62,15 +65,14 @@ typedef struct { grpc_closure *read_cb; grpc_closure *write_cb; - GRPC_SLICE read_slice; - GRPC_SLICE_buffer *read_slices; - GRPC_SLICE_buffer *write_slices; + grpc_slice read_slice; + grpc_slice_buffer *read_slices; + grpc_slice_buffer *write_slices; uv_buf_t *write_buffers; - grpc_resource_user resource_user; + grpc_resource_user *resource_user; bool shutting_down; - bool resource_user_shutting_down; char *peer_string; grpc_pollset *pollset; @@ -78,23 +80,21 @@ typedef struct { static void uv_close_callback(uv_handle_t *handle) { gpr_free(handle); } -static void tcp_free(grpc_tcp *tcp) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_destroy(&exec_ctx, &tcp->resource_user); +static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { + grpc_resource_user_unref(exec_ctx, tcp->resource_user); gpr_free(tcp); - grpc_exec_ctx_finish(&exec_ctx); } /*#define GRPC_TCP_REFCOUNT_DEBUG*/ #ifdef GRPC_TCP_REFCOUNT_DEBUG -#define TCP_UNREF(tcp, reason) tcp_unref((tcp), (reason), __FILE__, __LINE__) -#define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__) -static void tcp_unref(grpc_tcp *tcp, const char *reason, const char *file, +#define TCP_UNREF(exec_ctx, tcp, reason) tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) +#define TCP_REF(tcp, reason) tcp_ref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) +static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, const char *reason, const char *file, int line) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, reason, tcp->refcount.count, tcp->refcount.count - 1); if (gpr_unref(&tcp->refcount)) { - tcp_free(tcp); + tcp_free(exec_ctx, tcp); } } @@ -105,11 +105,11 @@ static void tcp_ref(grpc_tcp *tcp, const char *reason, const char *file, gpr_ref(&tcp->refcount); } #else -#define TCP_UNREF(tcp, reason) tcp_unref((tcp)) +#define TCP_UNREF(exec_ctx, tcp, reason) tcp_unref((exec_ctx), (tcp)) #define TCP_REF(tcp, reason) tcp_ref((tcp)) -static void tcp_unref(grpc_tcp *tcp) { +static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { if (gpr_unref(&tcp->refcount)) { - tcp_free(tcp); + tcp_free(exec_ctx, tcp); } } @@ -122,7 +122,7 @@ static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size, grpc_tcp *tcp = handle->data; (void)suggested_size; tcp->read_slice = grpc_resource_user_slice_malloc( - &exec_ctx, &tcp->resource_user, GRPC_TCP_DEFAULT_READ_SLICE_SIZE); + &exec_ctx, tcp->resource_user, GRPC_TCP_DEFAULT_READ_SLICE_SIZE); buf->base = (char *)GRPC_SLICE_START_PTR(tcp->read_slice); buf->len = GRPC_SLICE_LENGTH(tcp->read_slice); grpc_exec_ctx_finish(&exec_ctx); @@ -130,7 +130,7 @@ static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size, static void read_callback(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf) { - GRPC_SLICE sub; + grpc_slice sub; grpc_error *error; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_tcp *tcp = stream->data; @@ -139,7 +139,7 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, // Nothing happened. Wait for the next callback return; } - TCP_UNREF(tcp, "read"); + TCP_UNREF(&exec_ctx, tcp, "read"); tcp->read_cb = NULL; // TODO(murgatroid99): figure out what the return value here means uv_read_stop(stream); @@ -147,8 +147,8 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, error = GRPC_ERROR_CREATE("EOF"); } else if (nread > 0) { // Successful read - sub = GRPC_SLICE_sub_no_ref(tcp->read_slice, 0, (size_t)nread); - GRPC_SLICE_buffer_add(tcp->read_slices, sub); + sub = grpc_slice_sub_no_ref(tcp->read_slice, 0, (size_t)nread); + grpc_slice_buffer_add(tcp->read_slices, sub); error = GRPC_ERROR_NONE; if (grpc_tcp_trace) { size_t i; @@ -156,7 +156,7 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, gpr_log(GPR_DEBUG, "read: error=%s", str); grpc_error_free_string(str); for (i = 0; i < tcp->read_slices->count; i++) { - char *dump = gpr_dump_slice(tcp->read_slices->slices[i], + char *dump = grpc_dump_slice(tcp->read_slices->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, dump); @@ -172,14 +172,14 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, } static void uv_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - GRPC_SLICE_buffer *read_slices, grpc_closure *cb) { + grpc_slice_buffer *read_slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; int status; grpc_error *error = GRPC_ERROR_NONE; GPR_ASSERT(tcp->read_cb == NULL); tcp->read_cb = cb; tcp->read_slices = read_slices; - GRPC_SLICE_buffer_reset_and_unref(read_slices); + grpc_slice_buffer_reset_and_unref(read_slices); TCP_REF(tcp, "read"); // TODO(murgatroid99): figure out what the return value here means status = @@ -202,7 +202,7 @@ static void write_callback(uv_write_t *req, int status) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_closure *cb = tcp->write_cb; tcp->write_cb = NULL; - TCP_UNREF(tcp, "write"); + TCP_UNREF(&exec_ctx, tcp, "write"); if (status == 0) { error = GRPC_ERROR_NONE; } else { @@ -213,27 +213,27 @@ static void write_callback(uv_write_t *req, int status) { gpr_log(GPR_DEBUG, "write complete on %p: error=%s", tcp, str); } gpr_free(tcp->write_buffers); - grpc_resource_user_free(&exec_ctx, &tcp->resource_user, + grpc_resource_user_free(&exec_ctx, tcp->resource_user, sizeof(uv_buf_t) * tcp->write_slices->count); grpc_exec_ctx_sched(&exec_ctx, cb, error, NULL); grpc_exec_ctx_finish(&exec_ctx); } static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - GRPC_SLICE_buffer *write_slices, + grpc_slice_buffer *write_slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; uv_buf_t *buffers; unsigned int buffer_count; unsigned int i; - GRPC_SLICE *slice; + grpc_slice *slice; uv_write_t *write_req; if (grpc_tcp_trace) { size_t j; for (j = 0; j < write_slices->count; j++) { - char *data = gpr_dump_slice(write_slices->slices[j], + char *data = grpc_dump_slice(write_slices->slices[j], GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data); gpr_free(data); @@ -259,7 +259,7 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->write_cb = cb; buffer_count = (unsigned int)tcp->write_slices->count; buffers = gpr_malloc(sizeof(uv_buf_t) * buffer_count); - grpc_resource_user_alloc(exec_ctx, &tcp->resource_user, + grpc_resource_user_alloc(exec_ctx, tcp->resource_user, sizeof(uv_buf_t) * buffer_count, NULL); for (i = 0; i < buffer_count; i++) { slice = &tcp->write_slices->slices[i]; @@ -295,22 +295,6 @@ static void uv_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, static void shutdown_callback(uv_shutdown_t *req, int status) {} -static void resource_user_shutdown_done(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - TCP_UNREF(arg, "resource_user"); -} - -static void uv_resource_user_maybe_shutdown(grpc_exec_ctx *exec_ctx, - grpc_tcp *tcp) { - if (!tcp->resource_user_shutting_down) { - tcp->resource_user_shutting_down = true; - TCP_REF(tcp, "resource_user"); - grpc_resource_user_shutdown( - exec_ctx, &tcp->resource_user, - grpc_closure_create(resource_user_shutdown_done, tcp)); - } -} - static void uv_endpoint_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; if (!tcp->shutting_down) { @@ -324,8 +308,7 @@ static void uv_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; uv_close((uv_handle_t *)tcp->handle, uv_close_callback); - uv_resource_user_maybe_shutdown(exec_ctx, tcp); - TCP_UNREF(tcp, "destroy"); + TCP_UNREF(exec_ctx, tcp, "destroy"); } static char *uv_get_peer(grpc_endpoint *ep) { @@ -335,7 +318,7 @@ static char *uv_get_peer(grpc_endpoint *ep) { static grpc_resource_user *uv_get_resource_user(grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - return &tcp->resource_user; + return tcp->resource_user; } static grpc_workqueue *uv_get_workqueue(grpc_endpoint *ep) { return NULL; } @@ -364,8 +347,7 @@ grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, gpr_ref_init(&tcp->refcount, 1); tcp->peer_string = gpr_strdup(peer_string); tcp->shutting_down = false; - tcp->resource_user_shutting_down = false; - grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); + tcp->resource_user = grpc_resource_user_create(resource_quota, peer_string); /* Tell network status tracking code about the new endpoint */ grpc_network_status_register_endpoint(&tcp->base); diff --git a/src/node/ext/byte_buffer.cc b/src/node/ext/byte_buffer.cc index 017d7962c3..fc339fc462 100644 --- a/src/node/ext/byte_buffer.cc +++ b/src/node/ext/byte_buffer.cc @@ -37,7 +37,7 @@ #include #include "grpc/grpc.h" #include "grpc/byte_buffer_reader.h" -#include "grpc/support/slice.h" +#include "grpc/slice.h" #include "byte_buffer.h" -- cgit v1.2.3 From e9448df2fc106df555513217ba267d6381559ffa Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 9 Nov 2016 15:55:17 -0800 Subject: Fixed wrong ordering of operations --- src/core/ext/lb_policy/round_robin/round_robin.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index a07aef3815..acb2f77e45 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -435,7 +435,7 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, /* readily available, report right away */ *target = GRPC_CONNECTED_SUBCHANNEL_REF( grpc_subchannel_get_connected_subchannel(selected->subchannel), - "picked"); + "rr_picked"); if (user_data != NULL) { *user_data = selected->user_data; @@ -584,24 +584,24 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_exec_ctx_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, NULL); gpr_free(pp); } + update_lb_connectivity_status(exec_ctx, sd, error); + sd->prev_connectivity_state = sd->curr_connectivity_state; /* renew notification: reuses the "rr_connectivity" weak ref */ grpc_subchannel_notify_on_state_change( exec_ctx, sd->subchannel, p->base.interested_parties, &sd->curr_connectivity_state, &sd->connectivity_changed_closure); - update_lb_connectivity_status(exec_ctx, sd, error); - sd->prev_connectivity_state = sd->curr_connectivity_state; break; case GRPC_CHANNEL_IDLE: ++p->num_idle; /* fallthrough */ case GRPC_CHANNEL_CONNECTING: update_state_counters(sd); + update_lb_connectivity_status(exec_ctx, sd, error); + sd->prev_connectivity_state = sd->curr_connectivity_state; /* renew notification: reuses the "rr_connectivity" weak ref */ grpc_subchannel_notify_on_state_change( exec_ctx, sd->subchannel, p->base.interested_parties, &sd->curr_connectivity_state, &sd->connectivity_changed_closure); - update_lb_connectivity_status(exec_ctx, sd, error); - sd->prev_connectivity_state = sd->curr_connectivity_state; break; case GRPC_CHANNEL_TRANSIENT_FAILURE: ++p->num_transient_failures; @@ -610,12 +610,12 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, remove_disconnected_sc_locked(p, sd->ready_list_node); sd->ready_list_node = NULL; } + update_lb_connectivity_status(exec_ctx, sd, error); + sd->prev_connectivity_state = sd->curr_connectivity_state; /* renew notification: reuses the "rr_connectivity" weak ref */ grpc_subchannel_notify_on_state_change( exec_ctx, sd->subchannel, p->base.interested_parties, &sd->curr_connectivity_state, &sd->connectivity_changed_closure); - update_lb_connectivity_status(exec_ctx, sd, error); - sd->prev_connectivity_state = sd->curr_connectivity_state; break; case GRPC_CHANNEL_SHUTDOWN: update_state_counters(sd); -- cgit v1.2.3 From 84c8a027d3b9427982bc31be52e587ecd3462b9d Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 10 Nov 2016 09:39:34 -0800 Subject: Change JSON format to use the standard proto3 mapping for each type. --- src/core/ext/client_channel/client_channel.c | 49 +++++++++++++++++---------- src/core/lib/channel/message_size_filter.c | 12 +++---- src/core/lib/support/string.c | 2 +- src/core/lib/support/string.h | 2 +- src/core/lib/transport/service_config.c | 24 ++++++------- test/core/end2end/connection_refused_test.c | 4 +-- test/core/end2end/tests/cancel_after_accept.c | 4 +-- test/core/end2end/tests/max_message_length.c | 8 ++--- 8 files changed, 58 insertions(+), 47 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 139912e4ba..a92a220c74 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -90,7 +90,7 @@ static void *method_parameters_create_from_json(const grpc_json *json) { gpr_timespec timeout = {0, 0, GPR_TIMESPAN}; for (grpc_json *field = json->child; field != NULL; field = field->next) { if (field->key == NULL) continue; - if (strcmp(field->key, "wait_for_ready") == 0) { + if (strcmp(field->key, "waitForReady") == 0) { if (wait_for_ready != WAIT_FOR_READY_UNSET) return NULL; // Duplicate. if (field->type != GRPC_JSON_TRUE && field->type != GRPC_JSON_FALSE) { return NULL; @@ -99,26 +99,39 @@ static void *method_parameters_create_from_json(const grpc_json *json) { : WAIT_FOR_READY_FALSE; } else if (strcmp(field->key, "timeout") == 0) { if (timeout.tv_sec > 0 || timeout.tv_nsec > 0) return NULL; // Duplicate. - if (field->type != GRPC_JSON_OBJECT) return NULL; - if (field->child == NULL) return NULL; - for (grpc_json *subfield = field->child; subfield != NULL; - subfield = subfield->next) { - if (subfield->key == NULL) return NULL; - if (strcmp(subfield->key, "seconds") == 0) { - if (timeout.tv_sec > 0) return NULL; // Duplicate. - if (subfield->type != GRPC_JSON_NUMBER) return NULL; - timeout.tv_sec = gpr_parse_nonnegative_number(subfield->value); - if (timeout.tv_sec == -1) return NULL; - } else if (strcmp(subfield->key, "nanos") == 0) { - if (timeout.tv_nsec > 0) return NULL; // Duplicate. - if (subfield->type != GRPC_JSON_NUMBER) return NULL; - timeout.tv_nsec = gpr_parse_nonnegative_number(subfield->value); - if (timeout.tv_nsec == -1) return NULL; - } else { - // Unknown key. + if (field->type != GRPC_JSON_STRING) return NULL; + size_t len = strlen(field->value); + if (field->value[len - 1] != 's') return NULL; + char* buf = gpr_strdup(field->value); + buf[len - 1] = '\0'; // Remove trailing 's'. + char* decimal_point = strchr(buf, '.'); + if (decimal_point != NULL) { + *decimal_point = '\0'; + timeout.tv_nsec = gpr_parse_nonnegative_int(decimal_point + 1); + if (timeout.tv_nsec == -1) { + gpr_free(buf); return NULL; } + // There should always be exactly 3, 6, or 9 fractional digits. + int multiplier = 1; + switch (strlen(decimal_point + 1)) { + case 9: + break; + case 6: + multiplier *= 1000; + break; + case 3: + multiplier *= 1000000; + break; + default: // Unsupported number of digits. + gpr_free(buf); + return NULL; + } + timeout.tv_nsec *= multiplier; } + timeout.tv_sec = gpr_parse_nonnegative_int(buf); + if (timeout.tv_sec == -1) return NULL; + gpr_free(buf); } } method_parameters *value = gpr_malloc(sizeof(method_parameters)); diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 507ea26c05..28ad587c0e 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -65,15 +65,15 @@ static void* message_size_limits_create_from_json(const grpc_json* json) { int max_response_message_bytes = -1; for (grpc_json* field = json->child; field != NULL; field = field->next) { if (field->key == NULL) continue; - if (strcmp(field->key, "max_request_message_bytes") == 0) { + if (strcmp(field->key, "maxRequestMessageBytes") == 0) { if (max_request_message_bytes >= 0) return NULL; // Duplicate. - if (field->type != GRPC_JSON_NUMBER) return NULL; - max_request_message_bytes = gpr_parse_nonnegative_number(field->value); + if (field->type != GRPC_JSON_STRING) return NULL; + max_request_message_bytes = gpr_parse_nonnegative_int(field->value); if (max_request_message_bytes == -1) return NULL; - } else if (strcmp(field->key, "max_response_message_bytes") == 0) { + } else if (strcmp(field->key, "maxResponseMessageBytes") == 0) { if (max_response_message_bytes >= 0) return NULL; // Duplicate. - if (field->type != GRPC_JSON_NUMBER) return NULL; - max_response_message_bytes = gpr_parse_nonnegative_number(field->value); + if (field->type != GRPC_JSON_STRING) return NULL; + max_response_message_bytes = gpr_parse_nonnegative_int(field->value); if (max_response_message_bytes == -1) return NULL; } } diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c index aa58dd15e3..f10a30f0fd 100644 --- a/src/core/lib/support/string.c +++ b/src/core/lib/support/string.c @@ -191,7 +191,7 @@ int int64_ttoa(int64_t value, char *string) { return i; } -int gpr_parse_nonnegative_number(const char *value) { +int gpr_parse_nonnegative_int(const char *value) { char *end; long result = strtol(value, &end, 0); if (*end != '\0' || result < 0 || result > INT_MAX) return -1; diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index a691ebb2a6..e933e2eb46 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -78,7 +78,7 @@ where long is 32bit is size.*/ int int64_ttoa(int64_t value, char *output); // Parses a non-negative number from a value string. Returns -1 on error. -int gpr_parse_nonnegative_number(const char *value); +int gpr_parse_nonnegative_int(const char *value); /* Reverse a run of bytes */ void gpr_reverse_bytes(char *str, int len); diff --git a/src/core/lib/transport/service_config.c b/src/core/lib/transport/service_config.c index a8494cbe8b..2e2b59e3f7 100644 --- a/src/core/lib/transport/service_config.c +++ b/src/core/lib/transport/service_config.c @@ -46,8 +46,8 @@ // JSON form, which will look like this: // // { -// "lb_policy_name": "string", // optional -// "method_config": [ // array of one or more method_config objects +// "loadBalancingPolicy": "string", // optional +// "methodConfig": [ // array of one or more method_config objects // { // "name": [ // array of one or more name objects // { @@ -55,15 +55,13 @@ // "method": "string", // optional // } // ], -// // remaining fields are optional -// "wait_for_ready": bool, -// "timeout": { -// // one or both of these fields may be specified -// "seconds": number, -// "nanos": number, -// }, -// "max_request_message_bytes": number, -// "max_response_message_bytes": number +// // remaining fields are optional. +// // see https://developers.google.com/protocol-buffers/docs/proto3#json +// // for format details. +// "waitForReady": bool, +// "timeout": "duration_string", +// "maxRequestMessageBytes": "int64_string", +// "maxResponseMessageBytes": "int64_string", // } // ] // } @@ -100,7 +98,7 @@ const char* grpc_service_config_get_lb_policy_name( const char* lb_policy_name = NULL; for (grpc_json* field = json->child; field != NULL; field = field->next) { if (field->key == NULL) return NULL; - if (strcmp(field->key, "lb_policy_name") == 0) { + if (strcmp(field->key, "loadBalancingPolicy") == 0) { if (lb_policy_name != NULL) return NULL; // Duplicate. if (field->type != GRPC_JSON_STRING) return NULL; lb_policy_name = field->value; @@ -194,7 +192,7 @@ grpc_mdstr_hash_table* grpc_service_config_create_method_config_table( grpc_mdstr_hash_table_entry* entries = NULL; for (grpc_json* field = json->child; field != NULL; field = field->next) { if (field->key == NULL) return NULL; - if (strcmp(field->key, "method_config") == 0) { + if (strcmp(field->key, "methodConfig") == 0) { if (entries != NULL) return NULL; // Duplicate. if (field->type != GRPC_JSON_ARRAY) return NULL; // Find number of entries. diff --git a/test/core/end2end/connection_refused_test.c b/test/core/end2end/connection_refused_test.c index c14d72f49e..728d6dca59 100644 --- a/test/core/end2end/connection_refused_test.c +++ b/test/core/end2end/connection_refused_test.c @@ -81,11 +81,11 @@ static void run_test(bool wait_for_ready, bool use_service_config) { arg.key = GRPC_ARG_SERVICE_CONFIG; arg.value.string = "{\n" - " \"method_config\": [ {\n" + " \"methodConfig\": [ {\n" " \"name\": [\n" " { \"service\": \"service\", \"method\": \"method\" }\n" " ],\n" - " \"wait_for_ready\": true\n" + " \"waitForReady\": true\n" " } ]\n" "}"; args = grpc_channel_args_copy_and_add(args, &arg, 1); diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index 28d24aa306..e582c59f2d 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -139,11 +139,11 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, arg.key = GRPC_ARG_SERVICE_CONFIG; arg.value.string = "{\n" - " \"method_config\": [ {\n" + " \"methodConfig\": [ {\n" " \"name\": [\n" " { \"service\": \"service\", \"method\": \"method\" }\n" " ],\n" - " \"timeout\": { \"seconds\": 5 }\n" + " \"timeout\": \"5s\"\n" " } ]\n" "}"; args = grpc_channel_args_copy_and_add(args, &arg, 1); diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index 90dae50b75..c222d9dfae 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -143,11 +143,11 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config, arg.key = GRPC_ARG_SERVICE_CONFIG; arg.value.string = "{\n" - " \"method_config\": [ {\n" + " \"methodConfig\": [ {\n" " \"name\": [\n" " { \"service\": \"service\", \"method\": \"method\" }\n" " ],\n" - " \"max_request_message_bytes\": 5\n" + " \"maxRequestMessageBytes\": \"5\"\n" " } ]\n" "}"; client_args = grpc_channel_args_copy_and_add(NULL, &arg, 1); @@ -317,11 +317,11 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, arg.key = GRPC_ARG_SERVICE_CONFIG; arg.value.string = "{\n" - " \"method_config\": [ {\n" + " \"methodConfig\": [ {\n" " \"name\": [\n" " { \"service\": \"service\", \"method\": \"method\" }\n" " ],\n" - " \"max_response_message_bytes\": 5\n" + " \"maxResponseMessageBytes\": \"5\"\n" " } ]\n" "}"; client_args = grpc_channel_args_copy_and_add(NULL, &arg, 1); -- cgit v1.2.3 From c19049c39d151150d1947256a8d4a477bea16927 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 10 Nov 2016 09:43:06 -0800 Subject: clang-format --- src/core/ext/client_channel/client_channel.c | 4 ++-- src/core/ext/lb_policy/grpclb/grpclb.c | 4 ++-- src/core/lib/iomgr/tcp_uv.c | 14 ++++++++------ 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index a92a220c74..bbc698abda 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -102,9 +102,9 @@ static void *method_parameters_create_from_json(const grpc_json *json) { if (field->type != GRPC_JSON_STRING) return NULL; size_t len = strlen(field->value); if (field->value[len - 1] != 's') return NULL; - char* buf = gpr_strdup(field->value); + char *buf = gpr_strdup(field->value); buf[len - 1] = '\0'; // Remove trailing 's'. - char* decimal_point = strchr(buf, '.'); + char *decimal_point = strchr(buf, '.'); if (decimal_point != NULL) { *decimal_point = '\0'; timeout.tv_nsec = gpr_parse_nonnegative_int(decimal_point + 1); diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index d68fbb3dfb..44ac9a017e 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -1155,8 +1155,8 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, } gpr_mu_unlock(&glb_policy->mu); } else { /* empty payload: call cancelled. */ - /* dispose of the "lb_on_response_received" weak ref taken in - * query_for_backends_locked() and reused in every reception loop */ + /* dispose of the "lb_on_response_received" weak ref taken in + * query_for_backends_locked() and reused in every reception loop */ gpr_mu_unlock(&glb_policy->mu); GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, "lb_on_response_received_empty_payload"); diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index e690b18f20..068af5187c 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -87,10 +87,12 @@ static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { /*#define GRPC_TCP_REFCOUNT_DEBUG*/ #ifdef GRPC_TCP_REFCOUNT_DEBUG -#define TCP_UNREF(exec_ctx, tcp, reason) tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) -#define TCP_REF(tcp, reason) tcp_ref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) -static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, const char *reason, const char *file, - int line) { +#define TCP_UNREF(exec_ctx, tcp, reason) \ + tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) +#define TCP_REF(tcp, reason) \ + tcp_ref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) +static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, + const char *reason, const char *file, int line) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, reason, tcp->refcount.count, tcp->refcount.count - 1); if (gpr_unref(&tcp->refcount)) { @@ -157,7 +159,7 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, grpc_error_free_string(str); for (i = 0; i < tcp->read_slices->count; i++) { char *dump = grpc_dump_slice(tcp->read_slices->slices[i], - GPR_DUMP_HEX | GPR_DUMP_ASCII); + GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, dump); gpr_free(dump); @@ -234,7 +236,7 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, for (j = 0; j < write_slices->count; j++) { char *data = grpc_dump_slice(write_slices->slices[j], - GPR_DUMP_HEX | GPR_DUMP_ASCII); + GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data); gpr_free(data); } -- cgit v1.2.3 From 69f783dffcb94625f503a7af35fd460b83c2fd40 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 10 Nov 2016 10:10:56 -0800 Subject: Allow LB policy name to be matched in a case-insensitive manner. --- src/core/ext/client_channel/lb_policy_registry.c | 8 +++++--- test/core/client_channel/lb_policies_test.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/lb_policy_registry.c b/src/core/ext/client_channel/lb_policy_registry.c index f46a721f9d..90c149d947 100644 --- a/src/core/ext/client_channel/lb_policy_registry.c +++ b/src/core/ext/client_channel/lb_policy_registry.c @@ -35,6 +35,8 @@ #include +#include "src/core/lib/support/string.h" + #define MAX_POLICIES 10 static grpc_lb_policy_factory *g_all_of_the_lb_policies[MAX_POLICIES]; @@ -52,8 +54,8 @@ void grpc_lb_policy_registry_shutdown(void) { void grpc_register_lb_policy(grpc_lb_policy_factory *factory) { int i; for (i = 0; i < g_number_of_lb_policies; i++) { - GPR_ASSERT(0 != strcmp(factory->vtable->name, - g_all_of_the_lb_policies[i]->vtable->name)); + GPR_ASSERT(0 != gpr_stricmp(factory->vtable->name, + g_all_of_the_lb_policies[i]->vtable->name)); } GPR_ASSERT(g_number_of_lb_policies != MAX_POLICIES); grpc_lb_policy_factory_ref(factory); @@ -66,7 +68,7 @@ static grpc_lb_policy_factory *lookup_factory(const char *name) { if (name == NULL) return NULL; for (i = 0; i < g_number_of_lb_policies; i++) { - if (0 == strcmp(name, g_all_of_the_lb_policies[i]->vtable->name)) { + if (0 == gpr_stricmp(name, g_all_of_the_lb_policies[i]->vtable->name)) { return g_all_of_the_lb_policies[i]; } } diff --git a/test/core/client_channel/lb_policies_test.c b/test/core/client_channel/lb_policies_test.c index 3aba906094..b9bd637d35 100644 --- a/test/core/client_channel/lb_policies_test.c +++ b/test/core/client_channel/lb_policies_test.c @@ -554,7 +554,7 @@ static grpc_channel *create_client(const servers_fixture *f) { arg_array[0].value.integer = RETRY_TIMEOUT; arg_array[1].type = GRPC_ARG_STRING; arg_array[1].key = GRPC_ARG_LB_POLICY_NAME; - arg_array[1].value.string = "round_robin"; + arg_array[1].value.string = "ROUND_ROBIN"; args.num_args = 2; args.args = arg_array; @@ -669,7 +669,7 @@ static void test_get_channel_info() { grpc_arg arg; arg.type = GRPC_ARG_STRING; arg.key = GRPC_ARG_SERVICE_CONFIG; - arg.value.string = "{\"lb_policy_name\": \"round_robin\"}"; + arg.value.string = "{\"loadBalancingPolicy\": \"ROUND_ROBIN\"}"; grpc_channel_args *args = grpc_channel_args_copy_and_add(NULL, &arg, 1); channel = grpc_insecure_channel_create("ipv4:127.0.0.1:1234", args, NULL); grpc_channel_args_destroy(args); -- cgit v1.2.3 From 8bac679a1620bc9fdd649bd6fe4e870aa2bff627 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 10 Nov 2016 14:04:18 -0800 Subject: Demote secure handshake failures even further --- src/core/lib/security/transport/handshake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 2eb5544f43..9623797610 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -125,7 +125,7 @@ static void security_handshake_done(grpc_exec_ctx *exec_ctx, h->auth_context); } else { const char *msg = grpc_error_string(error); - gpr_log(GPR_INFO, "Security handshake failed: %s", msg); + gpr_log(GPR_DEBUG, "Security handshake failed: %s", msg); grpc_error_free_string(msg); if (h->secure_endpoint != NULL) { -- cgit v1.2.3 From 3fde39913ceaa03597eb86420fb041d1210ae0e3 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 10 Nov 2016 14:20:17 -0800 Subject: Fixed wrong NULLing in chttp2 transport --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index fb8fbae0ab..efb4a2ebe9 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1037,7 +1037,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, "op.send_initial_metadata"); } } else { - s->send_trailing_metadata = NULL; + s->send_initial_metadata = NULL; grpc_chttp2_complete_closure_step( exec_ctx, t, s, &s->send_initial_metadata_finished, GRPC_ERROR_CREATE( -- cgit v1.2.3 From 35d5dfcb263753917707288de24e7ff7191ac288 Mon Sep 17 00:00:00 2001 From: yang-g Date: Thu, 10 Nov 2016 14:29:17 -0800 Subject: parse json instead --- .../lib/security/credentials/jwt/jwt_credentials.c | 40 +++++++++------------- 1 file changed, 17 insertions(+), 23 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.c b/src/core/lib/security/credentials/jwt/jwt_credentials.c index 01c349cd75..3daf0f4ef7 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.c +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.c @@ -145,31 +145,25 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key( } static char *redact_private_key(const char *json_key) { - const char *json_key_end = json_key + strlen(json_key); - const char *begin_cue = "BEGIN PRIVATE KEY"; - const char *end_cue = "END PRIVATE KEY"; - const char *redacted = " "; - const char *begin_redact = strstr(json_key, begin_cue); - const char *end_redact = strstr(json_key, end_cue); - if (!begin_redact) { - begin_redact = json_key; - } else { - begin_redact += strlen(begin_cue); + char *json_copy = gpr_strdup(json_key); + grpc_json *json = grpc_json_parse_string(json_copy); + if (!json) { + gpr_free(json_copy); + return gpr_strdup(""); } - if (!end_redact) { - end_redact = json_key_end; + const char *redacted = ""; + grpc_json *current = json->child; + while (current) { + if (current->type == GRPC_JSON_STRING && + strcmp(current->key, "private_key") == 0) { + current->value = (char *)redacted; + break; + } + current = current->next; } - GPR_ASSERT(end_redact - begin_redact >= 0); - size_t result_length = - strlen(json_key) - (size_t)(end_redact - begin_redact) + strlen(redacted); - char *clean_json = (char *)gpr_malloc(result_length + 1); - clean_json[result_length] = 0; - char *current = clean_json; - memcpy(current, json_key, (size_t)(begin_redact - json_key)); - current += (begin_redact - json_key); - memcpy(current, redacted, strlen(redacted)); - current += strlen(redacted); - memcpy(current, end_redact, (size_t)(json_key_end - end_redact)); + char *clean_json = grpc_json_dump_to_string(json, 2); + gpr_free(json_copy); + grpc_json_destroy(json); return clean_json; } -- cgit v1.2.3 From 2e01234d1ca35f65c70f06dd164e69c03132f97c Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 10 Nov 2016 18:24:08 -0800 Subject: Fix sanity, uv, and windows builds --- src/core/ext/lb_policy/grpclb/grpclb.c | 4 ++-- src/core/lib/iomgr/tcp_uv.c | 19 ++++++++++++------- src/core/lib/iomgr/tcp_windows.c | 5 ++++- src/core/lib/security/transport/secure_endpoint.c | 9 +++++++-- 4 files changed, 25 insertions(+), 12 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index d68fbb3dfb..44ac9a017e 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -1155,8 +1155,8 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, } gpr_mu_unlock(&glb_policy->mu); } else { /* empty payload: call cancelled. */ - /* dispose of the "lb_on_response_received" weak ref taken in - * query_for_backends_locked() and reused in every reception loop */ + /* dispose of the "lb_on_response_received" weak ref taken in + * query_for_backends_locked() and reused in every reception loop */ gpr_mu_unlock(&glb_policy->mu); GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, "lb_on_response_received_empty_payload"); diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index e690b18f20..6e2ad1dbe9 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -87,10 +87,12 @@ static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { /*#define GRPC_TCP_REFCOUNT_DEBUG*/ #ifdef GRPC_TCP_REFCOUNT_DEBUG -#define TCP_UNREF(exec_ctx, tcp, reason) tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) -#define TCP_REF(tcp, reason) tcp_ref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) -static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, const char *reason, const char *file, - int line) { +#define TCP_UNREF(exec_ctx, tcp, reason) \ + tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) +#define TCP_REF(tcp, reason) \ + tcp_ref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) +static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, + const char *reason, const char *file, int line) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, reason, tcp->refcount.count, tcp->refcount.count - 1); if (gpr_unref(&tcp->refcount)) { @@ -157,7 +159,7 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, grpc_error_free_string(str); for (i = 0; i < tcp->read_slices->count; i++) { char *dump = grpc_dump_slice(tcp->read_slices->slices[i], - GPR_DUMP_HEX | GPR_DUMP_ASCII); + GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, dump); gpr_free(dump); @@ -234,7 +236,7 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, for (j = 0; j < write_slices->count; j++) { char *data = grpc_dump_slice(write_slices->slices[j], - GPR_DUMP_HEX | GPR_DUMP_ASCII); + GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data); gpr_free(data); } @@ -323,10 +325,13 @@ static grpc_resource_user *uv_get_resource_user(grpc_endpoint *ep) { static grpc_workqueue *uv_get_workqueue(grpc_endpoint *ep) { return NULL; } +static int uv_get_fd(grpc_endpoint *ep) { return -1; } + static grpc_endpoint_vtable vtable = { uv_endpoint_read, uv_endpoint_write, uv_get_workqueue, uv_add_to_pollset, uv_add_to_pollset_set, uv_endpoint_shutdown, - uv_destroy, uv_get_resource_user, uv_get_peer}; + uv_destroy, uv_get_resource_user, uv_get_peer, + uv_get_fd}; grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, grpc_resource_quota *resource_quota, diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 1fb7edc2b1..62afbcef51 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -402,6 +402,8 @@ static grpc_resource_user *win_get_resource_user(grpc_endpoint *ep) { return tcp->resource_user; } +static int win_get_fd(grpc_endpoint *ep) { return -1; } + static grpc_endpoint_vtable vtable = {win_read, win_write, win_get_workqueue, @@ -410,7 +412,8 @@ static grpc_endpoint_vtable vtable = {win_read, win_shutdown, win_destroy, win_get_resource_user, - win_get_peer}; + win_get_peer, + win_get_fd}; grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, grpc_resource_quota *resource_quota, diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 2d32fae8a1..1b278410e8 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -31,15 +31,20 @@ * */ -#include "src/core/lib/security/transport/secure_endpoint.h" +/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when + using that endpoint. Because of various transitive includes in uv.h, + including windows.h on Windows, uv.h must be included before other system + headers. Therefore, sockaddr.h must always be included first */ +#include "src/core/lib/iomgr/sockaddr.h" + #include #include #include #include #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/security/transport/secure_endpoint.h" #include "src/core/lib/security/transport/tsi_error.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" -- cgit v1.2.3 From ed2f308554c11859e4f0e77ed2e98f0814e609e4 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 10 Nov 2016 18:41:52 -0800 Subject: NULLs needed at fail_pending_writes() too --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index efb4a2ebe9..127e1cdc13 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1523,13 +1523,17 @@ static void fail_pending_writes(grpc_exec_ctx *exec_ctx, grpc_error *error) { error = removal_error(error, s, "Pending writes failed due to stream closure"); - s->fetching_send_message = NULL; + s->send_initial_metadata = NULL; grpc_chttp2_complete_closure_step( exec_ctx, t, s, &s->send_initial_metadata_finished, GRPC_ERROR_REF(error), "send_initial_metadata_finished"); + + s->send_trailing_metadata = NULL; grpc_chttp2_complete_closure_step( exec_ctx, t, s, &s->send_trailing_metadata_finished, GRPC_ERROR_REF(error), "send_trailing_metadata_finished"); + + s->fetching_send_message = NULL; grpc_chttp2_complete_closure_step( exec_ctx, t, s, &s->fetching_send_message_finished, GRPC_ERROR_REF(error), "fetching_send_message_finished"); -- cgit v1.2.3 From 67ffe3f82de4d860f1d39f9ace55a6731e82a69c Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 11 Nov 2016 10:50:42 -0800 Subject: clang-format --- src/core/lib/iomgr/tcp_client_posix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 169ddcabed..13347735df 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -299,8 +299,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, GPR_ASSERT(grpc_sockaddr_is_v4mapped(addr, &addr4_copy)); addr = &addr4_copy; } - if ((error = prepare_socket(addr, fd, channel_args)) != - GRPC_ERROR_NONE) { + if ((error = prepare_socket(addr, fd, channel_args)) != GRPC_ERROR_NONE) { grpc_exec_ctx_sched(exec_ctx, closure, error, NULL); return; } -- cgit v1.2.3 From 27588bbfb9fb38c2ac7a3eb98fb1de459a014af6 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 11 Nov 2016 15:03:39 -0800 Subject: Change handshake manager to invoke callbacks via an exec_ctx. --- .../ext/client_channel/http_connect_handshaker.c | 58 +++++----- .../chttp2/client/insecure/channel_create.c | 18 ++-- .../chttp2/client/secure/secure_channel_create.c | 14 +-- .../chttp2/server/insecure/server_chttp2.c | 16 +-- .../chttp2/server/secure/server_secure_chttp2.c | 20 ++-- src/core/lib/channel/handshaker.c | 117 ++++++++++----------- src/core/lib/channel/handshaker.h | 65 +++++------- 7 files changed, 144 insertions(+), 164 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 82042897b2..c63fc186c2 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -54,14 +54,11 @@ typedef struct http_connect_handshaker { char* server_name; // State saved while performing the handshake. - grpc_endpoint* endpoint; - grpc_channel_args* args; - grpc_handshaker_done_cb cb; - void* user_data; + grpc_handshaker_args* args; + grpc_closure cb; // Objects for processing the HTTP CONNECT request and response. grpc_slice_buffer write_buffer; - grpc_slice_buffer* read_buffer; // Ownership passes through this object. grpc_closure request_done_closure; grpc_closure response_read_closure; grpc_http_parser http_parser; @@ -87,7 +84,7 @@ static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) { static void on_timeout(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { http_connect_handshaker* handshaker = arg; if (error == GRPC_ERROR_NONE) { // Timer fired, rather than being cancelled. - grpc_endpoint_shutdown(exec_ctx, handshaker->endpoint); + grpc_endpoint_shutdown(exec_ctx, handshaker->args->endpoint); } http_connect_handshaker_unref(handshaker); } @@ -98,12 +95,11 @@ static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, http_connect_handshaker* handshaker = arg; if (error != GRPC_ERROR_NONE) { // If the write failed, invoke the callback immediately with the error. - handshaker->cb(exec_ctx, handshaker->endpoint, handshaker->args, - handshaker->read_buffer, handshaker->user_data, - GRPC_ERROR_REF(error)); + grpc_exec_ctx_sched(exec_ctx, &handshaker->cb, GRPC_ERROR_REF(error), NULL); } else { // Otherwise, read the response. - grpc_endpoint_read(exec_ctx, handshaker->endpoint, handshaker->read_buffer, + grpc_endpoint_read(exec_ctx, handshaker->args->endpoint, + handshaker->args->read_buffer, &handshaker->response_read_closure); } } @@ -117,11 +113,11 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, goto done; } // Add buffer to parser. - for (size_t i = 0; i < handshaker->read_buffer->count; ++i) { - if (GRPC_SLICE_LENGTH(handshaker->read_buffer->slices[i]) > 0) { + for (size_t i = 0; i < handshaker->args->read_buffer->count; ++i) { + if (GRPC_SLICE_LENGTH(handshaker->args->read_buffer->slices[i]) > 0) { size_t body_start_offset = 0; error = grpc_http_parser_parse(&handshaker->http_parser, - handshaker->read_buffer->slices[i], + handshaker->args->read_buffer->slices[i], &body_start_offset); if (error != GRPC_ERROR_NONE) goto done; if (handshaker->http_parser.state == GRPC_HTTP_BODY) { @@ -132,16 +128,16 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_slice_buffer tmp_buffer; grpc_slice_buffer_init(&tmp_buffer); if (body_start_offset < - GRPC_SLICE_LENGTH(handshaker->read_buffer->slices[i])) { + GRPC_SLICE_LENGTH(handshaker->args->read_buffer->slices[i])) { grpc_slice_buffer_add( &tmp_buffer, - grpc_slice_split_tail(&handshaker->read_buffer->slices[i], + grpc_slice_split_tail(&handshaker->args->read_buffer->slices[i], body_start_offset)); } grpc_slice_buffer_addn(&tmp_buffer, - &handshaker->read_buffer->slices[i + 1], - handshaker->read_buffer->count - i - 1); - grpc_slice_buffer_swap(handshaker->read_buffer, &tmp_buffer); + &handshaker->args->read_buffer->slices[i + 1], + handshaker->args->read_buffer->count - i - 1); + grpc_slice_buffer_swap(handshaker->args->read_buffer, &tmp_buffer); grpc_slice_buffer_destroy(&tmp_buffer); break; } @@ -159,8 +155,9 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, // complete (e.g., handling chunked transfer encoding or looking // at the Content-Length: header). if (handshaker->http_parser.state != GRPC_HTTP_BODY) { - grpc_slice_buffer_reset_and_unref(handshaker->read_buffer); - grpc_endpoint_read(exec_ctx, handshaker->endpoint, handshaker->read_buffer, + grpc_slice_buffer_reset_and_unref(handshaker->args->read_buffer); + grpc_endpoint_read(exec_ctx, handshaker->args->endpoint, + handshaker->args->read_buffer, &handshaker->response_read_closure); return; } @@ -175,8 +172,7 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, } done: // Invoke handshake-done callback. - handshaker->cb(exec_ctx, handshaker->endpoint, handshaker->args, - handshaker->read_buffer, handshaker->user_data, error); + grpc_exec_ctx_sched(exec_ctx, &handshaker->cb, error, NULL); } // @@ -194,17 +190,12 @@ static void http_connect_handshaker_shutdown(grpc_exec_ctx* exec_ctx, static void http_connect_handshaker_do_handshake( grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker_in, - grpc_endpoint* endpoint, grpc_channel_args* args, - grpc_slice_buffer* read_buffer, gpr_timespec deadline, - grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, - void* user_data) { + gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, + grpc_iomgr_cb_func cb, grpc_handshaker_args* args) { http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; // Save state in the handshaker object. - handshaker->endpoint = endpoint; handshaker->args = args; - handshaker->cb = cb; - handshaker->user_data = user_data; - handshaker->read_buffer = read_buffer; + grpc_closure_init(&handshaker->cb, cb, args); // Send HTTP CONNECT request. gpr_log(GPR_INFO, "Connecting to server %s via HTTP proxy %s", handshaker->server_name, handshaker->proxy_server); @@ -216,7 +207,7 @@ static void http_connect_handshaker_do_handshake( request.handshaker = &grpc_httpcli_plaintext; grpc_slice request_slice = grpc_httpcli_format_connect_request(&request); grpc_slice_buffer_add(&handshaker->write_buffer, request_slice); - grpc_endpoint_write(exec_ctx, endpoint, &handshaker->write_buffer, + grpc_endpoint_write(exec_ctx, args->endpoint, &handshaker->write_buffer, &handshaker->request_done_closure); // Set timeout timer. The timer gets a reference to the handshaker. gpr_ref(&handshaker->refcount); @@ -225,7 +216,7 @@ static void http_connect_handshaker_do_handshake( on_timeout, handshaker, gpr_now(GPR_CLOCK_MONOTONIC)); } -static const struct grpc_handshaker_vtable http_connect_handshaker_vtable = { +static const grpc_handshaker_vtable http_connect_handshaker_vtable = { http_connect_handshaker_destroy, http_connect_handshaker_shutdown, http_connect_handshaker_do_handshake}; @@ -233,8 +224,7 @@ grpc_handshaker* grpc_http_connect_handshaker_create(const char* proxy_server, const char* server_name) { GPR_ASSERT(proxy_server != NULL); GPR_ASSERT(server_name != NULL); - http_connect_handshaker* handshaker = - gpr_malloc(sizeof(http_connect_handshaker)); + http_connect_handshaker* handshaker = gpr_malloc(sizeof(*handshaker)); memset(handshaker, 0, sizeof(*handshaker)); grpc_handshaker_init(&http_connect_handshaker_vtable, &handshaker->base); handshaker->proxy_server = gpr_strdup(proxy_server); diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 8e03fd82c1..e323895d48 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -92,22 +92,22 @@ static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, connector_unref(exec_ctx, arg); } -static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, - grpc_channel_args *args, - grpc_slice_buffer *read_buffer, void *user_data, +static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - connector *c = user_data; + grpc_handshaker_args *args = arg; + connector *c = args->user_data; if (error != GRPC_ERROR_NONE) { - grpc_channel_args_destroy(args); - gpr_free(read_buffer); + grpc_channel_args_destroy(args->args); + gpr_free(args->read_buffer); } else { c->result->transport = - grpc_create_chttp2_transport(exec_ctx, args, endpoint, 1); + grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 1); GPR_ASSERT(c->result->transport); grpc_chttp2_transport_start_reading(exec_ctx, c->result->transport, - read_buffer); - c->result->channel_args = args; + args->read_buffer); + c->result->channel_args = args->args; } + gpr_free(args); grpc_closure *notify = c->notify; c->notify = NULL; grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 04c88a2d36..aef871fd41 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -129,14 +129,13 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); } -static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, - grpc_channel_args *args, - grpc_slice_buffer *read_buffer, void *user_data, +static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - connector *c = user_data; - c->tmp_args = args; + grpc_handshaker_args *args = arg; + connector *c = args->user_data; + c->tmp_args = args->args; if (error != GRPC_ERROR_NONE) { - gpr_free(read_buffer); + gpr_free(args->read_buffer); grpc_closure *notify = c->notify; c->notify = NULL; grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); @@ -145,9 +144,10 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, // handshake API, and then move the code from on_secure_handshake_done() // into this function. grpc_channel_security_connector_do_handshake( - exec_ctx, c->security_connector, endpoint, read_buffer, + exec_ctx, c->security_connector, args->endpoint, args->read_buffer, c->args.deadline, on_secure_handshake_done, c); } + gpr_free(args); } static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index c18d618f96..b7bf49beb9 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -54,18 +54,17 @@ typedef struct server_connect_state { grpc_handshake_manager *handshake_mgr; } server_connect_state; -static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, - grpc_channel_args *args, - grpc_slice_buffer *read_buffer, void *user_data, +static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - server_connect_state *state = user_data; + grpc_handshaker_args *args = arg; + server_connect_state *state = args->user_data; if (error != GRPC_ERROR_NONE) { const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); GRPC_ERROR_UNREF(error); grpc_handshake_manager_shutdown(exec_ctx, state->handshake_mgr); - gpr_free(read_buffer); + gpr_free(args->read_buffer); } else { // Beware that the call to grpc_create_chttp2_transport() has to happen // before grpc_tcp_server_destroy(). This is fine here, but similar code @@ -73,14 +72,15 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, // grpc_tcp_server_start() (as in server_secure_chttp2.c) needs to add // synchronization to avoid this case. grpc_transport *transport = - grpc_create_chttp2_transport(exec_ctx, args, endpoint, 0); + grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 0); grpc_server_setup_transport(exec_ctx, state->server, transport, state->accepting_pollset, grpc_server_get_channel_args(state->server)); - grpc_chttp2_transport_start_reading(exec_ctx, transport, read_buffer); + grpc_chttp2_transport_start_reading(exec_ctx, transport, args->read_buffer); } // Clean up. - grpc_channel_args_destroy(args); + grpc_channel_args_destroy(args->args); + gpr_free(args); grpc_handshake_manager_destroy(exec_ctx, state->handshake_mgr); gpr_free(state); } diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 942638ad7f..0002a5cb30 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -115,18 +115,19 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *statep, gpr_free(connection_state); } -static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, - grpc_channel_args *args, - grpc_slice_buffer *read_buffer, void *user_data, +static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - server_secure_connect *connection_state = user_data; + grpc_handshaker_args* args = arg; + server_secure_connect *connection_state = args->user_data; if (error != GRPC_ERROR_NONE) { const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); - GRPC_ERROR_UNREF(error); - grpc_channel_args_destroy(args); - gpr_free(read_buffer); +// FIXME: remove? +// GRPC_ERROR_UNREF(error); + grpc_channel_args_destroy(args->args); + gpr_free(args->read_buffer); + gpr_free(args); grpc_handshake_manager_shutdown(exec_ctx, connection_state->handshake_mgr); grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp); @@ -138,11 +139,12 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, // TODO(roth, jboeuf): Convert security connector handshaking to use new // handshake API, and then move the code from on_secure_handshake_done() // into this function. - connection_state->args = args; + connection_state->args = args->args; grpc_server_security_connector_do_handshake( exec_ctx, connection_state->server_state->sc, connection_state->acceptor, - endpoint, read_buffer, connection_state->deadline, + args->endpoint, args->read_buffer, connection_state->deadline, on_secure_handshake_done, connection_state); + gpr_free(args); } static void on_accept(grpc_exec_ctx *exec_ctx, void *statep, grpc_endpoint *tcp, diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index a45a39981c..f09ae5b9fb 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -43,32 +43,29 @@ // grpc_handshaker // -void grpc_handshaker_init(const struct grpc_handshaker_vtable* vtable, +void grpc_handshaker_init(const grpc_handshaker_vtable* vtable, grpc_handshaker* handshaker) { handshaker->vtable = vtable; } -void grpc_handshaker_destroy(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { +static void grpc_handshaker_destroy(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) { handshaker->vtable->destroy(exec_ctx, handshaker); } -void grpc_handshaker_shutdown(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { +static void grpc_handshaker_shutdown(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) { handshaker->vtable->shutdown(exec_ctx, handshaker); } -void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker, - grpc_endpoint* endpoint, - grpc_channel_args* args, - grpc_slice_buffer* read_buffer, - gpr_timespec deadline, - grpc_tcp_server_acceptor* acceptor, - grpc_handshaker_done_cb cb, void* user_data) { - handshaker->vtable->do_handshake(exec_ctx, handshaker, endpoint, args, - read_buffer, deadline, acceptor, cb, - user_data); +static void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker, + gpr_timespec deadline, + grpc_tcp_server_acceptor* acceptor, + grpc_iomgr_cb_func on_handshake_done, + grpc_handshaker_args* args) { + handshaker->vtable->do_handshake(exec_ctx, handshaker, deadline, acceptor, + on_handshake_done, args); } // @@ -84,8 +81,10 @@ struct grpc_handshaker_state { // The acceptor to call the handshakers with. grpc_tcp_server_acceptor* acceptor; // The final callback and user_data to invoke after the last handshaker. - grpc_handshaker_done_cb final_cb; - void* final_user_data; + grpc_iomgr_cb_func on_handshake_done; + void* user_data; + // Next closure to call. + grpc_closure next_cb; }; struct grpc_handshake_manager { @@ -143,61 +142,61 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, // A function used as the handshaker-done callback when chaining // handshakers together. -static void call_next_handshaker(grpc_exec_ctx* exec_ctx, - grpc_endpoint* endpoint, - grpc_channel_args* args, - grpc_slice_buffer* read_buffer, - void* user_data, grpc_error* error) { - grpc_handshake_manager* mgr = user_data; +static void call_next_handshaker(grpc_exec_ctx* exec_ctx, void* arg, + grpc_error* error) { + grpc_handshaker_args* args = arg; + grpc_handshake_manager* mgr = args->user_data; GPR_ASSERT(mgr->state != NULL); - GPR_ASSERT(mgr->state->index < mgr->count); + GPR_ASSERT(mgr->state->index <= mgr->count); // If we got an error, skip all remaining handshakers and invoke the // caller-supplied callback immediately. - if (error != GRPC_ERROR_NONE) { - mgr->state->final_cb(exec_ctx, endpoint, args, read_buffer, - mgr->state->final_user_data, error); + // Otherwise, if this is the last handshaker, then call the final + // callback instead of chaining back to this function again. + if (error != GRPC_ERROR_NONE || mgr->state->index == mgr->count) { + args->user_data = mgr->state->user_data; + grpc_closure_init(&mgr->state->next_cb, mgr->state->on_handshake_done, + args); + grpc_exec_ctx_sched(exec_ctx, &mgr->state->next_cb, GRPC_ERROR_REF(error), + NULL); return; } - grpc_handshaker_done_cb cb = call_next_handshaker; - // If this is the last handshaker, use the caller-supplied callback - // and user_data instead of chaining back to this function again. - if (mgr->state->index == mgr->count - 1) { - cb = mgr->state->final_cb; - user_data = mgr->state->final_user_data; - } - // Invoke handshaker. + // Call the next handshaker. grpc_handshaker_do_handshake( - exec_ctx, mgr->handshakers[mgr->state->index], endpoint, args, - read_buffer, mgr->state->deadline, mgr->state->acceptor, cb, user_data); - ++mgr->state->index; + exec_ctx, mgr->handshakers[mgr->state->index], mgr->state->deadline, + mgr->state->acceptor, call_next_handshaker, args); // If this is the last handshaker, clean up state. if (mgr->state->index == mgr->count) { gpr_free(mgr->state); mgr->state = NULL; + } else { + ++mgr->state->index; } } void grpc_handshake_manager_do_handshake( grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr, - grpc_endpoint* endpoint, const grpc_channel_args* args, + grpc_endpoint* endpoint, const grpc_channel_args* channel_args, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, - grpc_handshaker_done_cb cb, void* user_data) { - grpc_channel_args* args_copy = grpc_channel_args_copy(args); - grpc_slice_buffer* read_buffer = gpr_malloc(sizeof(*read_buffer)); - grpc_slice_buffer_init(read_buffer); - if (mgr->count == 0) { - // No handshakers registered, so we just immediately call the done - // callback with the passed-in endpoint. - cb(exec_ctx, endpoint, args_copy, read_buffer, user_data, GRPC_ERROR_NONE); - } else { - GPR_ASSERT(mgr->state == NULL); - mgr->state = gpr_malloc(sizeof(struct grpc_handshaker_state)); - memset(mgr->state, 0, sizeof(*mgr->state)); - mgr->state->deadline = deadline; - mgr->state->acceptor = acceptor; - mgr->state->final_cb = cb; - mgr->state->final_user_data = user_data; - call_next_handshaker(exec_ctx, endpoint, args_copy, read_buffer, mgr, - GRPC_ERROR_NONE); - } + grpc_iomgr_cb_func on_handshake_done, void* user_data) { + // Construct state. + GPR_ASSERT(mgr->state == NULL); + mgr->state = gpr_malloc(sizeof(struct grpc_handshaker_state)); + memset(mgr->state, 0, sizeof(*mgr->state)); + mgr->state->deadline = deadline; + mgr->state->acceptor = acceptor; + mgr->state->on_handshake_done = on_handshake_done; + mgr->state->user_data = user_data; + // Construct handshaker args. These will be passed through all + // handshakers and eventually be freed by the final callback. + grpc_handshaker_args* args = gpr_malloc(sizeof(*args)); + args->endpoint = endpoint; + args->args = grpc_channel_args_copy(channel_args); + args->read_buffer = gpr_malloc(sizeof(*args->read_buffer)); + grpc_slice_buffer_init(args->read_buffer); + // While chaining between handshakers, we use args->user_data to + // store a pointer to the handshake manager. This will be + // changed to point to the caller-supplied user_data before calling + // the final callback. + args->user_data = mgr; + call_next_handshaker(exec_ctx, args, GRPC_ERROR_NONE); } diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index f8a36c6473..1a5475c88d 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -48,21 +48,26 @@ /// /// In general, handshakers should be used via a handshake manager. +/// +/// grpc_handshaker_state +/// + +/// Arguments passed through handshakers and to the on_handshake_done callback. +/// All data members are owned by the struct. +typedef struct { + grpc_endpoint* endpoint; + grpc_channel_args* args; + void* user_data; + grpc_slice_buffer* read_buffer; +} grpc_handshaker_args; + /// /// grpc_handshaker /// typedef struct grpc_handshaker grpc_handshaker; -/// Callback type invoked when a handshaker is done. -/// Takes ownership of \a args and \a read_buffer. -typedef void (*grpc_handshaker_done_cb)(grpc_exec_ctx* exec_ctx, - grpc_endpoint* endpoint, - grpc_channel_args* args, - grpc_slice_buffer* read_buffer, - void* user_data, grpc_error* error); - -struct grpc_handshaker_vtable { +typedef struct { /// Destroys the handshaker. void (*destroy)(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker); @@ -70,44 +75,28 @@ struct grpc_handshaker_vtable { /// aborted in the middle). void (*shutdown)(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker); - /// Performs handshaking. When finished, calls \a cb with \a user_data. + /// Performs handshaking. /// Takes ownership of \a args. - /// Takes ownership of \a read_buffer, which contains leftover bytes read - /// from the endpoint by the previous handshaker. + /// When finished, calls \a on_handshake_done with \a args, which the + /// callback takes ownership of. /// \a acceptor will be NULL for client-side handshakers. void (*do_handshake)(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, - grpc_endpoint* endpoint, grpc_channel_args* args, - grpc_slice_buffer* read_buffer, gpr_timespec deadline, + gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, - grpc_handshaker_done_cb cb, void* user_data); -}; + grpc_iomgr_cb_func on_handshake_done, + grpc_handshaker_args* args); +} grpc_handshaker_vtable; /// Base struct. To subclass, make this the first member of the /// implementation struct. struct grpc_handshaker { - const struct grpc_handshaker_vtable* vtable; + const grpc_handshaker_vtable* vtable; }; /// Called by concrete implementations to initialize the base struct. -void grpc_handshaker_init(const struct grpc_handshaker_vtable* vtable, +void grpc_handshaker_init(const grpc_handshaker_vtable* vtable, grpc_handshaker* handshaker); -/// Convenient wrappers for invoking methods via the vtable. -/// These probably do not need to be called from anywhere but -/// grpc_handshake_manager. -void grpc_handshaker_destroy(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker); -void grpc_handshaker_shutdown(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker); -void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker, - grpc_endpoint* endpoint, - grpc_channel_args* args, - grpc_slice_buffer* read_buffer, - gpr_timespec deadline, - grpc_tcp_server_acceptor* acceptor, - grpc_handshaker_done_cb cb, void* user_data); - /// /// grpc_handshake_manager /// @@ -137,12 +126,12 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, /// Does NOT take ownership of \a args. Instead, makes a copy before /// invoking the first handshaker. /// \a acceptor will be NULL for client-side handshakers. -/// Invokes \a cb with \a user_data after either a handshaker fails or -/// all handshakers have completed successfully. +/// When done, invokes \a on_handshake_done with an argument of a +/// grpc_handshaker_args object, which the callback takes ownership of. void grpc_handshake_manager_do_handshake( grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr, - grpc_endpoint* endpoint, const grpc_channel_args* args, + grpc_endpoint* endpoint, const grpc_channel_args* channel_args, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, - grpc_handshaker_done_cb cb, void* user_data); + grpc_iomgr_cb_func on_handshake_done, void* user_data); #endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H */ -- cgit v1.2.3 From a74b24633e077b2043d8426d09fc053a849060ca Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 11 Nov 2016 14:07:27 -0800 Subject: Fixed deadlock between glb_shutdown and lb_on_server_status_received --- src/core/ext/lb_policy/grpclb/grpclb.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index d68fbb3dfb..00b27b5dcc 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -761,17 +761,23 @@ static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { if (glb_policy->rr_policy) { GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "glb_shutdown"); } - if (glb_policy->started_picking) { - if (glb_policy->lb_call != NULL) { - grpc_call_cancel(glb_policy->lb_call, NULL); - /* lb_on_server_status_received will pick up the cancel and clean up */ - } - } grpc_connectivity_state_set( exec_ctx, &glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_CREATE("Channel Shutdown"), "glb_shutdown"); + /* We need a copy of the lb_call pointer because we can't cancell the call + * while holding glb_policy->mu: lb_on_server_status_received, invoked due to + * the cancel, needs to acquire that same lock */ + grpc_call *lb_call = glb_policy->lb_call; gpr_mu_unlock(&glb_policy->mu); + /* glb_policy->lb_call and this local lb_call must be consistent at this point + * because glb_policy->lb_call is only assigned in lb_call_init_locked as part + * of query_for_backends_locked, which can only be invoked while + * glb_policy->shutting_down is false. */ + if (lb_call != NULL) { + grpc_call_cancel(lb_call, NULL); + /* lb_on_server_status_received will pick up the cancel and clean up */ + } while (pp != NULL) { pending_pick *next = pp->next; *pp->target = NULL; @@ -955,9 +961,10 @@ static void lb_on_server_status_received(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); -static void lb_call_init(glb_lb_policy *glb_policy) { +static void lb_call_init_locked(glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->server_name != NULL); GPR_ASSERT(glb_policy->server_name[0] != '\0'); + GPR_ASSERT(!glb_policy->shutting_down); /* Note the following LB call progresses every time there's activity in \a * glb_policy->base.interested_parties, which is comprised of the polling @@ -1010,7 +1017,9 @@ static void lb_call_destroy_locked(glb_lb_policy *glb_policy) { static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->lb_channel != NULL); - lb_call_init(glb_policy); + if (glb_policy->shutting_down) return; + + lb_call_init_locked(glb_policy); if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Query for backends (grpclb: %p, lb_call: %p)", -- cgit v1.2.3 From 414af9bec8ea00cb1b678a9a14c05cedb7d717b2 Mon Sep 17 00:00:00 2001 From: yang-g Date: Sat, 12 Nov 2016 01:09:51 -0800 Subject: refresh and access token filtering --- .../credentials/oauth2/oauth2_credentials.c | 33 ++++++++++++++++------ 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c index d980577c46..b3625b22c0 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c @@ -392,15 +392,32 @@ grpc_refresh_token_credentials_create_from_auth_refresh_token( return &c->base.base; } +static char *create_loggable_refresh_token(grpc_auth_refresh_token *token) { + if (strcmp(token->type, GRPC_AUTH_JSON_TYPE_INVALID) == 0) { + return gpr_strdup(""); + } + char *loggable_token = NULL; + gpr_asprintf(&loggable_token, + "{\n type: %s\n client_id: %s\n client_secret: " + "\n refresh_token: \n}", + token->type, token->client_id); + return loggable_token; +} + grpc_call_credentials *grpc_google_refresh_token_credentials_create( const char *json_refresh_token, void *reserved) { - GRPC_API_TRACE( - "grpc_refresh_token_credentials_create(json_refresh_token=%s, " - "reserved=%p)", - 2, (json_refresh_token, reserved)); + grpc_auth_refresh_token token = + grpc_auth_refresh_token_create_from_string(json_refresh_token); + if (grpc_api_trace) { + char *loggable_token = create_loggable_refresh_token(&token); + gpr_log(GPR_INFO, + "grpc_refresh_token_credentials_create(json_refresh_token=%s, " + "reserved=%p)", + loggable_token, reserved); + gpr_free(loggable_token); + } GPR_ASSERT(reserved == NULL); - return grpc_refresh_token_credentials_create_from_auth_refresh_token( - grpc_auth_refresh_token_create_from_string(json_refresh_token)); + return grpc_refresh_token_credentials_create_from_auth_refresh_token(token); } // @@ -430,9 +447,9 @@ grpc_call_credentials *grpc_access_token_credentials_create( gpr_malloc(sizeof(grpc_access_token_credentials)); char *token_md_value; GRPC_API_TRACE( - "grpc_access_token_credentials_create(access_token=%s, " + "grpc_access_token_credentials_create(access_token=, " "reserved=%p)", - 2, (access_token, reserved)); + 1, (reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(grpc_access_token_credentials)); c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2; -- cgit v1.2.3 From 1b1a86028c21dddc42a9debb38fc8314661fe5f5 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Mon, 14 Nov 2016 10:10:47 -0800 Subject: Return status unavailable (over internal) on EPIPE --- src/core/lib/iomgr/tcp_posix.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 880af93ee1..6a13c7be51 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -380,6 +380,11 @@ static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) { tcp->outgoing_slice_idx = unwind_slice_idx; tcp->outgoing_byte_idx = unwind_byte_idx; return false; + } else if (errno == EPIPE) { + *error = grpc_error_set_int(GRPC_OS_ERROR(errno, "sendmsg"), + GRPC_ERROR_INT_GRPC_STATUS, + GRPC_STATUS_UNAVAILABLE); + return true; } else { *error = GRPC_OS_ERROR(errno, "sendmsg"); return true; -- cgit v1.2.3 From 4b5cdb751ebda76b7cd78577f80b58a3bcf0105a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 14 Nov 2016 11:37:36 -0800 Subject: Change handshaker API to take grpc_closure instead of grpc_iomgr_cb_func. --- .../ext/client_channel/http_connect_handshaker.c | 11 +++---- src/core/lib/channel/handshaker.c | 35 +++++++++++----------- src/core/lib/channel/handshaker.h | 9 +++--- 3 files changed, 27 insertions(+), 28 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index c63fc186c2..a07efcc6d5 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -55,7 +55,7 @@ typedef struct http_connect_handshaker { // State saved while performing the handshake. grpc_handshaker_args* args; - grpc_closure cb; + grpc_closure* on_handshake_done; // Objects for processing the HTTP CONNECT request and response. grpc_slice_buffer write_buffer; @@ -95,7 +95,8 @@ static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, http_connect_handshaker* handshaker = arg; if (error != GRPC_ERROR_NONE) { // If the write failed, invoke the callback immediately with the error. - grpc_exec_ctx_sched(exec_ctx, &handshaker->cb, GRPC_ERROR_REF(error), NULL); + grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, + GRPC_ERROR_REF(error), NULL); } else { // Otherwise, read the response. grpc_endpoint_read(exec_ctx, handshaker->args->endpoint, @@ -172,7 +173,7 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, } done: // Invoke handshake-done callback. - grpc_exec_ctx_sched(exec_ctx, &handshaker->cb, error, NULL); + grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, error, NULL); } // @@ -191,11 +192,11 @@ static void http_connect_handshaker_shutdown(grpc_exec_ctx* exec_ctx, static void http_connect_handshaker_do_handshake( grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker_in, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, - grpc_iomgr_cb_func cb, grpc_handshaker_args* args) { + grpc_closure* on_handshake_done, grpc_handshaker_args* args) { http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; // Save state in the handshaker object. handshaker->args = args; - grpc_closure_init(&handshaker->cb, cb, args); + handshaker->on_handshake_done = on_handshake_done; // Send HTTP CONNECT request. gpr_log(GPR_INFO, "Connecting to server %s via HTTP proxy %s", handshaker->server_name, handshaker->proxy_server); diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index f09ae5b9fb..bb2833046f 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -62,7 +62,7 @@ static void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, - grpc_iomgr_cb_func on_handshake_done, + grpc_closure* on_handshake_done, grpc_handshaker_args* args) { handshaker->vtable->do_handshake(exec_ctx, handshaker, deadline, acceptor, on_handshake_done, args); @@ -74,17 +74,16 @@ static void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, // State used while chaining handshakers. struct grpc_handshaker_state { - // The index of the handshaker to invoke next. + // The index of the handshaker to invoke next and the closure to invoke it. size_t index; + grpc_closure call_next_handshaker; // The deadline for all handshakers. gpr_timespec deadline; // The acceptor to call the handshakers with. grpc_tcp_server_acceptor* acceptor; // The final callback and user_data to invoke after the last handshaker. - grpc_iomgr_cb_func on_handshake_done; + grpc_closure on_handshake_done; void* user_data; - // Next closure to call. - grpc_closure next_cb; }; struct grpc_handshake_manager { @@ -154,16 +153,14 @@ static void call_next_handshaker(grpc_exec_ctx* exec_ctx, void* arg, // callback instead of chaining back to this function again. if (error != GRPC_ERROR_NONE || mgr->state->index == mgr->count) { args->user_data = mgr->state->user_data; - grpc_closure_init(&mgr->state->next_cb, mgr->state->on_handshake_done, - args); - grpc_exec_ctx_sched(exec_ctx, &mgr->state->next_cb, GRPC_ERROR_REF(error), - NULL); + grpc_exec_ctx_sched(exec_ctx, &mgr->state->on_handshake_done, + GRPC_ERROR_REF(error), NULL); return; } // Call the next handshaker. grpc_handshaker_do_handshake( exec_ctx, mgr->handshakers[mgr->state->index], mgr->state->deadline, - mgr->state->acceptor, call_next_handshaker, args); + mgr->state->acceptor, &mgr->state->call_next_handshaker, args); // If this is the last handshaker, clean up state. if (mgr->state->index == mgr->count) { gpr_free(mgr->state); @@ -178,14 +175,6 @@ void grpc_handshake_manager_do_handshake( grpc_endpoint* endpoint, const grpc_channel_args* channel_args, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_iomgr_cb_func on_handshake_done, void* user_data) { - // Construct state. - GPR_ASSERT(mgr->state == NULL); - mgr->state = gpr_malloc(sizeof(struct grpc_handshaker_state)); - memset(mgr->state, 0, sizeof(*mgr->state)); - mgr->state->deadline = deadline; - mgr->state->acceptor = acceptor; - mgr->state->on_handshake_done = on_handshake_done; - mgr->state->user_data = user_data; // Construct handshaker args. These will be passed through all // handshakers and eventually be freed by the final callback. grpc_handshaker_args* args = gpr_malloc(sizeof(*args)); @@ -193,10 +182,20 @@ void grpc_handshake_manager_do_handshake( args->args = grpc_channel_args_copy(channel_args); args->read_buffer = gpr_malloc(sizeof(*args->read_buffer)); grpc_slice_buffer_init(args->read_buffer); + // Construct state. + GPR_ASSERT(mgr->state == NULL); + mgr->state = gpr_malloc(sizeof(struct grpc_handshaker_state)); + memset(mgr->state, 0, sizeof(*mgr->state)); + grpc_closure_init(&mgr->state->call_next_handshaker, call_next_handshaker, + args); + mgr->state->deadline = deadline; + mgr->state->acceptor = acceptor; + grpc_closure_init(&mgr->state->on_handshake_done, on_handshake_done, args); // While chaining between handshakers, we use args->user_data to // store a pointer to the handshake manager. This will be // changed to point to the caller-supplied user_data before calling // the final callback. args->user_data = mgr; + mgr->state->user_data = user_data; call_next_handshaker(exec_ctx, args, GRPC_ERROR_NONE); } diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index 1a5475c88d..eb869e05dc 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -75,15 +75,14 @@ typedef struct { /// aborted in the middle). void (*shutdown)(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker); - /// Performs handshaking. - /// Takes ownership of \a args. - /// When finished, calls \a on_handshake_done with \a args, which the - /// callback takes ownership of. + /// Performs handshaking, modifying \a args as needed (e.g., to + /// replace \a endpoint with a wrapped endpoint). + /// When finished, invokes \a on_handshake_done. /// \a acceptor will be NULL for client-side handshakers. void (*do_handshake)(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, - grpc_iomgr_cb_func on_handshake_done, + grpc_closure* on_handshake_done, grpc_handshaker_args* args); } grpc_handshaker_vtable; -- cgit v1.2.3 From b16c1e32fd774ab38dc6cbf671c29f676905f889 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 14 Nov 2016 12:08:13 -0800 Subject: Move deadline handling to handshake manager. --- .../ext/client_channel/http_connect_handshaker.c | 59 +++++---- src/core/lib/channel/handshaker.c | 145 +++++++++++++-------- src/core/lib/channel/handshaker.h | 1 - 3 files changed, 124 insertions(+), 81 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index a07efcc6d5..407b8ce023 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -43,7 +43,6 @@ #include "src/core/ext/client_channel/uri_parser.h" #include "src/core/lib/http/format_request.h" #include "src/core/lib/http/parser.h" -#include "src/core/lib/iomgr/timer.h" #include "src/core/lib/support/env.h" typedef struct http_connect_handshaker { @@ -53,6 +52,9 @@ typedef struct http_connect_handshaker { char* proxy_server; char* server_name; + gpr_refcount refcount; + gpr_mu mu; + // State saved while performing the handshake. grpc_handshaker_args* args; grpc_closure* on_handshake_done; @@ -63,14 +65,12 @@ typedef struct http_connect_handshaker { grpc_closure response_read_closure; grpc_http_parser http_parser; grpc_http_response http_response; - grpc_timer timeout_timer; - - gpr_refcount refcount; } http_connect_handshaker; // Unref and clean up handshaker. static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) { if (gpr_unref(&handshaker->refcount)) { + gpr_mu_destroy(&handshaker->mu); gpr_free(handshaker->proxy_server); gpr_free(handshaker->server_name); grpc_slice_buffer_destroy(&handshaker->write_buffer); @@ -80,28 +80,27 @@ static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) { } } -// Callback invoked when deadline is exceeded. -static void on_timeout(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { - http_connect_handshaker* handshaker = arg; - if (error == GRPC_ERROR_NONE) { // Timer fired, rather than being cancelled. - grpc_endpoint_shutdown(exec_ctx, handshaker->args->endpoint); - } - http_connect_handshaker_unref(handshaker); -} - // Callback invoked when finished writing HTTP CONNECT request. static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { http_connect_handshaker* handshaker = arg; if (error != GRPC_ERROR_NONE) { // If the write failed, invoke the callback immediately with the error. + gpr_mu_lock(&handshaker->mu); grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, GRPC_ERROR_REF(error), NULL); + handshaker->args = NULL; + gpr_mu_unlock(&handshaker->mu); + http_connect_handshaker_unref(handshaker); } else { // Otherwise, read the response. + // The read callback inherits our ref to the handshaker. + gpr_mu_lock(&handshaker->mu); + GPR_ASSERT(handshaker->args != NULL); grpc_endpoint_read(exec_ctx, handshaker->args->endpoint, handshaker->args->read_buffer, &handshaker->response_read_closure); + gpr_mu_unlock(&handshaker->mu); } } @@ -109,6 +108,8 @@ static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { http_connect_handshaker* handshaker = arg; + gpr_mu_lock(&handshaker->mu); + GPR_ASSERT(handshaker->args != NULL); if (error != GRPC_ERROR_NONE) { GRPC_ERROR_REF(error); // Take ref to pass to the handshake-done callback. goto done; @@ -122,8 +123,6 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, &body_start_offset); if (error != GRPC_ERROR_NONE) goto done; if (handshaker->http_parser.state == GRPC_HTTP_BODY) { - // We've gotten back a successul response, so stop the timeout timer. - grpc_timer_cancel(exec_ctx, &handshaker->timeout_timer); // Remove the data we've already read from the read buffer, // leaving only the leftover bytes (if any). grpc_slice_buffer tmp_buffer; @@ -160,6 +159,7 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_endpoint_read(exec_ctx, handshaker->args->endpoint, handshaker->args->read_buffer, &handshaker->response_read_closure); + gpr_mu_unlock(&handshaker->mu); return; } // Make sure we got a 2xx response. @@ -173,7 +173,10 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, } done: // Invoke handshake-done callback. + handshaker->args = NULL; grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, error, NULL); + gpr_mu_unlock(&handshaker->mu); + http_connect_handshaker_unref(handshaker); } // @@ -187,13 +190,22 @@ static void http_connect_handshaker_destroy(grpc_exec_ctx* exec_ctx, } static void http_connect_handshaker_shutdown(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) {} + grpc_handshaker* handshaker_in) { + http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; + gpr_mu_lock(&handshaker->mu); + if (handshaker->args != NULL) { + grpc_endpoint_shutdown(exec_ctx, handshaker->args->endpoint); + handshaker->args = NULL; + } + gpr_mu_unlock(&handshaker->mu); +} static void http_connect_handshaker_do_handshake( grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker_in, - gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, - grpc_closure* on_handshake_done, grpc_handshaker_args* args) { + grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, + grpc_handshaker_args* args) { http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; + gpr_mu_lock(&handshaker->mu); // Save state in the handshaker object. handshaker->args = args; handshaker->on_handshake_done = on_handshake_done; @@ -208,13 +220,11 @@ static void http_connect_handshaker_do_handshake( request.handshaker = &grpc_httpcli_plaintext; grpc_slice request_slice = grpc_httpcli_format_connect_request(&request); grpc_slice_buffer_add(&handshaker->write_buffer, request_slice); + // Take a new ref to be held by the write callback. + gpr_ref(&handshaker->refcount); grpc_endpoint_write(exec_ctx, args->endpoint, &handshaker->write_buffer, &handshaker->request_done_closure); - // Set timeout timer. The timer gets a reference to the handshaker. - gpr_ref(&handshaker->refcount); - grpc_timer_init(exec_ctx, &handshaker->timeout_timer, - gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC), - on_timeout, handshaker, gpr_now(GPR_CLOCK_MONOTONIC)); + gpr_mu_unlock(&handshaker->mu); } static const grpc_handshaker_vtable http_connect_handshaker_vtable = { @@ -228,6 +238,8 @@ grpc_handshaker* grpc_http_connect_handshaker_create(const char* proxy_server, http_connect_handshaker* handshaker = gpr_malloc(sizeof(*handshaker)); memset(handshaker, 0, sizeof(*handshaker)); grpc_handshaker_init(&http_connect_handshaker_vtable, &handshaker->base); + gpr_mu_init(&handshaker->mu); + gpr_ref_init(&handshaker->refcount, 1); handshaker->proxy_server = gpr_strdup(proxy_server); handshaker->server_name = gpr_strdup(server_name); grpc_slice_buffer_init(&handshaker->write_buffer); @@ -237,7 +249,6 @@ grpc_handshaker* grpc_http_connect_handshaker_create(const char* proxy_server, handshaker); grpc_http_parser_init(&handshaker->http_parser, GRPC_HTTP_RESPONSE, &handshaker->http_response); - gpr_ref_init(&handshaker->refcount, 1); return &handshaker->base; } diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index bb2833046f..681baaa7aa 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -38,6 +38,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/handshaker.h" +#include "src/core/lib/iomgr/timer.h" // // grpc_handshaker @@ -60,11 +61,10 @@ static void grpc_handshaker_shutdown(grpc_exec_ctx* exec_ctx, static void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, - gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, grpc_handshaker_args* args) { - handshaker->vtable->do_handshake(exec_ctx, handshaker, deadline, acceptor, + handshaker->vtable->do_handshake(exec_ctx, handshaker, acceptor, on_handshake_done, args); } @@ -72,31 +72,29 @@ static void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, // grpc_handshake_manager // -// State used while chaining handshakers. -struct grpc_handshaker_state { - // The index of the handshaker to invoke next and the closure to invoke it. +struct grpc_handshake_manager { + gpr_mu mu; + gpr_refcount refs; + // An array of handshakers added via grpc_handshake_manager_add(). + size_t count; + grpc_handshaker** handshakers; + // The index of the handshaker to invoke next and closure to invoke it. size_t index; grpc_closure call_next_handshaker; - // The deadline for all handshakers. - gpr_timespec deadline; // The acceptor to call the handshakers with. grpc_tcp_server_acceptor* acceptor; + // Deadline timer across all handshakers. + grpc_timer deadline_timer; // The final callback and user_data to invoke after the last handshaker. grpc_closure on_handshake_done; void* user_data; }; -struct grpc_handshake_manager { - // An array of handshakers added via grpc_handshake_manager_add(). - size_t count; - grpc_handshaker** handshakers; - // State used while chaining handshakers. - struct grpc_handshaker_state* state; -}; - grpc_handshake_manager* grpc_handshake_manager_create() { grpc_handshake_manager* mgr = gpr_malloc(sizeof(grpc_handshake_manager)); memset(mgr, 0, sizeof(*mgr)); + gpr_mu_init(&mgr->mu); + gpr_ref_init(&mgr->refs, 1); return mgr; } @@ -104,6 +102,7 @@ static bool is_power_of_2(size_t n) { return (n & (n - 1)) == 0; } void grpc_handshake_manager_add(grpc_handshake_manager* mgr, grpc_handshaker* handshaker) { + gpr_mu_lock(&mgr->mu); // To avoid allocating memory for each handshaker we add, we double // the number of elements every time we need more. size_t realloc_count = 0; @@ -117,57 +116,86 @@ void grpc_handshake_manager_add(grpc_handshake_manager* mgr, gpr_realloc(mgr->handshakers, realloc_count * sizeof(grpc_handshaker*)); } mgr->handshakers[mgr->count++] = handshaker; + gpr_mu_unlock(&mgr->mu); +} + +static void grpc_handshake_manager_unref(grpc_exec_ctx* exec_ctx, + grpc_handshake_manager* mgr) { + if (gpr_unref(&mgr->refs)) { + for (size_t i = 0; i < mgr->count; ++i) { + grpc_handshaker_destroy(exec_ctx, mgr->handshakers[i]); + } + gpr_free(mgr->handshakers); + gpr_mu_destroy(&mgr->mu); + gpr_free(mgr); + } } void grpc_handshake_manager_destroy(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr) { - for (size_t i = 0; i < mgr->count; ++i) { - grpc_handshaker_destroy(exec_ctx, mgr->handshakers[i]); - } - gpr_free(mgr->handshakers); - gpr_free(mgr); + grpc_handshake_manager_unref(exec_ctx, mgr); } void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr) { + gpr_mu_lock(&mgr->mu); for (size_t i = 0; i < mgr->count; ++i) { grpc_handshaker_shutdown(exec_ctx, mgr->handshakers[i]); } - if (mgr->state != NULL) { - gpr_free(mgr->state); - mgr->state = NULL; - } + gpr_mu_unlock(&mgr->mu); } -// A function used as the handshaker-done callback when chaining -// handshakers together. static void call_next_handshaker(grpc_exec_ctx* exec_ctx, void* arg, - grpc_error* error) { - grpc_handshaker_args* args = arg; - grpc_handshake_manager* mgr = args->user_data; - GPR_ASSERT(mgr->state != NULL); - GPR_ASSERT(mgr->state->index <= mgr->count); + grpc_error* error); + +// Helper function to call either the next handshaker or the +// on_handshake_done callback. +static void call_next_handshaker_locked( + grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr, + grpc_handshaker_args* args, grpc_error* error) { + GPR_ASSERT(mgr->index <= mgr->count); // If we got an error, skip all remaining handshakers and invoke the // caller-supplied callback immediately. - // Otherwise, if this is the last handshaker, then call the final + // Otherwise, if this is the last handshaker, then call the on_handshake_done // callback instead of chaining back to this function again. - if (error != GRPC_ERROR_NONE || mgr->state->index == mgr->count) { - args->user_data = mgr->state->user_data; - grpc_exec_ctx_sched(exec_ctx, &mgr->state->on_handshake_done, + if (error != GRPC_ERROR_NONE || mgr->index == mgr->count) { + // Cancel deadline timer, since we're invoking the on_handshake_done + // callback now. + grpc_timer_cancel(exec_ctx, &mgr->deadline_timer); + args->user_data = mgr->user_data; + grpc_exec_ctx_sched(exec_ctx, &mgr->on_handshake_done, GRPC_ERROR_REF(error), NULL); + // Since we're invoking the final callback, we won't be coming back + // to this function, so we can release our reference to the + // handshake manager. + grpc_handshake_manager_unref(exec_ctx, mgr); return; } // Call the next handshaker. grpc_handshaker_do_handshake( - exec_ctx, mgr->handshakers[mgr->state->index], mgr->state->deadline, - mgr->state->acceptor, &mgr->state->call_next_handshaker, args); - // If this is the last handshaker, clean up state. - if (mgr->state->index == mgr->count) { - gpr_free(mgr->state); - mgr->state = NULL; - } else { - ++mgr->state->index; + exec_ctx, mgr->handshakers[mgr->index], mgr->acceptor, + &mgr->call_next_handshaker, args); + ++mgr->index; +} + +// A function used as the handshaker-done callback when chaining +// handshakers together. +static void call_next_handshaker(grpc_exec_ctx* exec_ctx, void* arg, + grpc_error* error) { + grpc_handshaker_args* args = arg; + grpc_handshake_manager* mgr = args->user_data; + gpr_mu_lock(&mgr->mu); + call_next_handshaker_locked(exec_ctx, mgr, args, error); + gpr_mu_unlock(&mgr->mu); +} + +// Callback invoked when deadline is exceeded. +static void on_timeout(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { + grpc_handshake_manager* mgr = arg; + if (error == GRPC_ERROR_NONE) { // Timer fired, rather than being cancelled. + grpc_handshake_manager_shutdown(exec_ctx, mgr); } + grpc_handshake_manager_unref(exec_ctx, mgr); } void grpc_handshake_manager_do_handshake( @@ -176,26 +204,31 @@ void grpc_handshake_manager_do_handshake( gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_iomgr_cb_func on_handshake_done, void* user_data) { // Construct handshaker args. These will be passed through all - // handshakers and eventually be freed by the final callback. + // handshakers and eventually be freed by the on_handshake_done callback. grpc_handshaker_args* args = gpr_malloc(sizeof(*args)); args->endpoint = endpoint; args->args = grpc_channel_args_copy(channel_args); args->read_buffer = gpr_malloc(sizeof(*args->read_buffer)); grpc_slice_buffer_init(args->read_buffer); - // Construct state. - GPR_ASSERT(mgr->state == NULL); - mgr->state = gpr_malloc(sizeof(struct grpc_handshaker_state)); - memset(mgr->state, 0, sizeof(*mgr->state)); - grpc_closure_init(&mgr->state->call_next_handshaker, call_next_handshaker, - args); - mgr->state->deadline = deadline; - mgr->state->acceptor = acceptor; - grpc_closure_init(&mgr->state->on_handshake_done, on_handshake_done, args); + // Initialize state needed for calling handshakers. + gpr_mu_lock(&mgr->mu); + GPR_ASSERT(mgr->index == 0); + mgr->acceptor = acceptor; + grpc_closure_init(&mgr->call_next_handshaker, call_next_handshaker, args); + grpc_closure_init(&mgr->on_handshake_done, on_handshake_done, args); // While chaining between handshakers, we use args->user_data to // store a pointer to the handshake manager. This will be // changed to point to the caller-supplied user_data before calling - // the final callback. + // the on_handshake_done callback. args->user_data = mgr; - mgr->state->user_data = user_data; - call_next_handshaker(exec_ctx, args, GRPC_ERROR_NONE); + mgr->user_data = user_data; + // Start deadline timer, which owns a ref. + gpr_ref(&mgr->refs); + grpc_timer_init(exec_ctx, &mgr->deadline_timer, + gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC), + on_timeout, mgr, gpr_now(GPR_CLOCK_MONOTONIC)); + // Start first handshaker, which also owns a ref. + gpr_ref(&mgr->refs); + call_next_handshaker_locked(exec_ctx, mgr, args, GRPC_ERROR_NONE); + gpr_mu_unlock(&mgr->mu); } diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index eb869e05dc..2b633dba98 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -80,7 +80,6 @@ typedef struct { /// When finished, invokes \a on_handshake_done. /// \a acceptor will be NULL for client-side handshakers. void (*do_handshake)(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, - gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, grpc_handshaker_args* args); -- cgit v1.2.3 From 4f74d045474d956ad119a1f1cfbc4d1fac246c6d Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 14 Nov 2016 12:21:41 -0800 Subject: Fix error refcounting in on_handshake_done callbacks. --- src/core/ext/transport/chttp2/client/insecure/channel_create.c | 2 +- src/core/ext/transport/chttp2/client/secure/secure_channel_create.c | 2 +- src/core/ext/transport/chttp2/server/insecure/server_chttp2.c | 1 - src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index e323895d48..c4c1e638a9 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -110,7 +110,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, gpr_free(args); grpc_closure *notify = c->notify; c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); + grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); } static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index aef871fd41..5101737e11 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -138,7 +138,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, gpr_free(args->read_buffer); grpc_closure *notify = c->notify; c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); + grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); } else { // TODO(roth, jboeuf): Convert security connector handshaking to use new // handshake API, and then move the code from on_secure_handshake_done() diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index b7bf49beb9..669a3869ab 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -62,7 +62,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); - GRPC_ERROR_UNREF(error); grpc_handshake_manager_shutdown(exec_ctx, state->handshake_mgr); gpr_free(args->read_buffer); } else { diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 0002a5cb30..5d3699391f 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -123,8 +123,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); -// FIXME: remove? -// GRPC_ERROR_UNREF(error); grpc_channel_args_destroy(args->args); gpr_free(args->read_buffer); gpr_free(args); -- cgit v1.2.3 From 83eafde35dcd986791781ccaf9206567ee8198f3 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 14 Nov 2016 12:27:04 -0800 Subject: Fix comments. --- src/core/lib/channel/handshaker.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index eb869e05dc..ca877c8ecf 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -49,9 +49,11 @@ /// In general, handshakers should be used via a handshake manager. /// -/// grpc_handshaker_state +/// grpc_handshaker /// +typedef struct grpc_handshaker grpc_handshaker; + /// Arguments passed through handshakers and to the on_handshake_done callback. /// All data members are owned by the struct. typedef struct { @@ -61,12 +63,6 @@ typedef struct { grpc_slice_buffer* read_buffer; } grpc_handshaker_args; -/// -/// grpc_handshaker -/// - -typedef struct grpc_handshaker grpc_handshaker; - typedef struct { /// Destroys the handshaker. void (*destroy)(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker); -- cgit v1.2.3 From fcf5e10bed5934ce6cfbef0eb64925fe1f11a7fc Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 14 Nov 2016 12:28:20 -0800 Subject: clang-format --- src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c | 2 +- src/core/lib/channel/handshaker.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 5d3699391f..c7980780f3 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -117,7 +117,7 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *statep, static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - grpc_handshaker_args* args = arg; + grpc_handshaker_args *args = arg; server_secure_connect *connection_state = args->user_data; if (error != GRPC_ERROR_NONE) { const char *error_str = grpc_error_string(error); diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index bb2833046f..8aebe155d4 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -158,9 +158,9 @@ static void call_next_handshaker(grpc_exec_ctx* exec_ctx, void* arg, return; } // Call the next handshaker. - grpc_handshaker_do_handshake( - exec_ctx, mgr->handshakers[mgr->state->index], mgr->state->deadline, - mgr->state->acceptor, &mgr->state->call_next_handshaker, args); + grpc_handshaker_do_handshake(exec_ctx, mgr->handshakers[mgr->state->index], + mgr->state->deadline, mgr->state->acceptor, + &mgr->state->call_next_handshaker, args); // If this is the last handshaker, clean up state. if (mgr->state->index == mgr->count) { gpr_free(mgr->state); -- cgit v1.2.3 From 2ea37e905eb6cb8a0443442111f0d137567f11ce Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 14 Nov 2016 12:31:22 -0800 Subject: clang-format --- src/core/lib/channel/handshaker.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 495ec41d9a..89130e9951 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -150,9 +150,10 @@ static void call_next_handshaker(grpc_exec_ctx* exec_ctx, void* arg, // Helper function to call either the next handshaker or the // on_handshake_done callback. -static void call_next_handshaker_locked( - grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr, - grpc_handshaker_args* args, grpc_error* error) { +static void call_next_handshaker_locked(grpc_exec_ctx* exec_ctx, + grpc_handshake_manager* mgr, + grpc_handshaker_args* args, + grpc_error* error) { GPR_ASSERT(mgr->index <= mgr->count); // If we got an error, skip all remaining handshakers and invoke the // caller-supplied callback immediately. -- cgit v1.2.3 From 3ddebf4f66d434a05f3cb279d810304815fd0aec Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 14 Nov 2016 13:18:53 -0800 Subject: PR comment --- src/core/ext/lb_policy/grpclb/grpclb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 00b27b5dcc..5233573e30 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -768,6 +768,7 @@ static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { * while holding glb_policy->mu: lb_on_server_status_received, invoked due to * the cancel, needs to acquire that same lock */ grpc_call *lb_call = glb_policy->lb_call; + glb_policy->lb_call = NULL; gpr_mu_unlock(&glb_policy->mu); /* glb_policy->lb_call and this local lb_call must be consistent at this point -- cgit v1.2.3 From 3d48c99cfb5c3407c31ace9f5fa526f10db4803a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 15 Nov 2016 08:01:21 -0800 Subject: Minor boolification. --- src/core/ext/client_channel/subchannel.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/subchannel.c b/src/core/ext/client_channel/subchannel.c index a5d7c0df45..d08c22278a 100644 --- a/src/core/ext/client_channel/subchannel.c +++ b/src/core/ext/client_channel/subchannel.c @@ -119,9 +119,9 @@ struct grpc_subchannel { gpr_mu mu; /** have we seen a disconnection? */ - int disconnected; + bool disconnected; /** are we connecting */ - int connecting; + bool connecting; /** connectivity state tracking */ grpc_connectivity_state_tracker state_tracker; @@ -132,7 +132,7 @@ struct grpc_subchannel { /** backoff state */ gpr_backoff backoff_state; /** do we have an active alarm? */ - int have_alarm; + bool have_alarm; /** our alarm */ grpc_timer alarm; }; @@ -264,7 +264,7 @@ static void disconnect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { grpc_subchannel_index_unregister(exec_ctx, c->key, c); gpr_mu_lock(&c->mu); GPR_ASSERT(!c->disconnected); - c->disconnected = 1; + c->disconnected = true; grpc_connector_shutdown(exec_ctx, c->connector); con = GET_CONNECTED_SUBCHANNEL(c, no_barrier); if (con != NULL) { @@ -451,7 +451,7 @@ void grpc_subchannel_notify_on_state_change( w->next->prev = w->prev->next = w; if (grpc_connectivity_state_notify_on_state_change( exec_ctx, &c->state_tracker, state, &w->closure)) { - c->connecting = 1; + c->connecting = true; /* released by connection */ GRPC_SUBCHANNEL_WEAK_REF(c, "connecting"); start_connect(exec_ctx, c); @@ -575,12 +575,10 @@ static void publish_transport_locked(grpc_exec_ctx *exec_ctx, Re-evaluate if we really need this. */ gpr_atm_full_barrier(); GPR_ASSERT(gpr_atm_rel_cas(&c->connected_subchannel, 0, (gpr_atm)con)); - c->connecting = 0; + c->connecting = false; /* setup subchannel watching connected subchannel for changes; subchannel - ref - for connecting is donated - to the state watcher */ + ref for connecting is donated to the state watcher */ GRPC_SUBCHANNEL_WEAK_REF(c, "state_watcher"); GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); grpc_connected_subchannel_notify_on_state_change( @@ -595,7 +593,7 @@ static void publish_transport_locked(grpc_exec_ctx *exec_ctx, static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_subchannel *c = arg; gpr_mu_lock(&c->mu); - c->have_alarm = 0; + c->have_alarm = false; if (c->disconnected) { error = GRPC_ERROR_CREATE_REFERENCING("Disconnected", &error, 1); } else { @@ -628,7 +626,7 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, } else { gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); GPR_ASSERT(!c->have_alarm); - c->have_alarm = 1; + c->have_alarm = true; grpc_connectivity_state_set( exec_ctx, &c->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, grpc_error_set_int( -- cgit v1.2.3 From 738e6dbc40ae5ba1075395403b63045fde4aebfe Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 15 Nov 2016 09:29:44 -0800 Subject: Fix use-after-free in time parse caching --- src/core/ext/transport/chttp2/transport/parsing.c | 3 ++- src/core/lib/transport/metadata.c | 7 ++++--- src/core/lib/transport/metadata.h | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index b9c405158f..5efb49751c 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -471,7 +471,8 @@ static void on_initial_header(grpc_exec_ctx *exec_ctx, void *tp, grpc_mdstr_as_c_string(md->value)); *cached_timeout = gpr_inf_future(GPR_TIMESPAN); } - grpc_mdelem_set_user_data(md, free_timeout, cached_timeout); + cached_timeout = + grpc_mdelem_set_user_data(md, free_timeout, cached_timeout); } grpc_chttp2_incoming_metadata_buffer_set_deadline( &s->metadata_buffer[0], diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 977b34ca86..fac19b91d9 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -728,8 +728,8 @@ void *grpc_mdelem_get_user_data(grpc_mdelem *md, void (*destroy_func)(void *)) { return result; } -void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), - void *user_data) { +void *grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), + void *user_data) { internal_metadata *im = (internal_metadata *)md; GPR_ASSERT(!is_mdelem_static(md)); GPR_ASSERT((user_data == NULL) == (destroy_func == NULL)); @@ -740,11 +740,12 @@ void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), if (destroy_func != NULL) { destroy_func(user_data); } - return; + return (void *)gpr_atm_no_barrier_load(&im->user_data); } gpr_atm_no_barrier_store(&im->user_data, (gpr_atm)user_data); gpr_atm_rel_store(&im->destroy_user_data, (gpr_atm)destroy_func); gpr_mu_unlock(&im->mu_user_data); + return user_data; } grpc_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *gs) { diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 8dcfbb98bb..a4955a1ea7 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -120,8 +120,8 @@ size_t grpc_mdelem_get_size_in_hpack_table(grpc_mdelem *elem); is used as a type tag and is checked during user_data fetch. */ void *grpc_mdelem_get_user_data(grpc_mdelem *md, void (*if_destroy_func)(void *)); -void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), - void *user_data); +void *grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), + void *user_data); /* Reference counting */ //#define GRPC_METADATA_REFCOUNT_DEBUG -- cgit v1.2.3 From 850cbaaac4075d56d76a1d67dafd9f90e5284942 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 15 Nov 2016 15:13:35 -0800 Subject: Added more testing for grpclb tokens --- src/core/ext/lb_policy/grpclb/grpclb.c | 28 +++++++++++++-------- test/cpp/grpclb/grpclb_test.cc | 45 +++++++++++++++++++++++----------- 2 files changed, 49 insertions(+), 24 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index d8ef0c8098..be05be9abe 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -186,14 +186,20 @@ static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg, * addresses failed to connect). There won't be any user_data/token * available */ if (wc_arg->target != NULL) { - GPR_ASSERT(wc_arg->lb_token != NULL); - initial_metadata_add_lb_token(wc_arg->initial_metadata, - wc_arg->lb_token_mdelem_storage, - GRPC_MDELEM_REF(wc_arg->lb_token)); + if (wc_arg->lb_token != NULL) { + initial_metadata_add_lb_token(wc_arg->initial_metadata, + wc_arg->lb_token_mdelem_storage, + GRPC_MDELEM_REF(wc_arg->lb_token)); + } else { + gpr_log(GPR_ERROR, + "No LB token for connected subchannel pick %p (from RR " + "instance %p).", + (void *)*wc_arg->target, (void *)wc_arg->rr_policy); + abort(); + } } if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")", - (intptr_t)wc_arg->rr_policy); + gpr_log(GPR_INFO, "Unreffing RR %p", (void *)wc_arg->rr_policy); } GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "wrapped_rr_closure"); } @@ -411,7 +417,7 @@ static void parse_server(const grpc_grpclb_server *server, } /* Returns addresses extracted from \a serverlist. */ -static grpc_lb_addresses *process_serverlist( +static grpc_lb_addresses *process_serverlist_locked( const grpc_grpclb_serverlist *serverlist) { size_t num_valid = 0; /* first pass: count how many are valid in order to allocate the necessary @@ -451,10 +457,12 @@ static grpc_lb_addresses *process_serverlist( user_data = grpc_mdelem_from_metadata_strings(GRPC_MDSTR_LB_TOKEN, lb_token_mdstr); } else { - gpr_log(GPR_ERROR, + char *uri = grpc_sockaddr_to_uri(&addr); + gpr_log(GPR_INFO, "Missing LB token for backend address '%s'. The empty token will " "be used instead", - grpc_sockaddr_to_uri(&addr)); + uri); + gpr_free(uri); user_data = GRPC_MDELEM_LB_TOKEN_EMPTY; } @@ -508,7 +516,7 @@ static grpc_lb_policy *create_rr_locked( grpc_lb_policy_args args; memset(&args, 0, sizeof(args)); args.client_channel_factory = glb_policy->cc_factory; - grpc_lb_addresses *addresses = process_serverlist(serverlist); + grpc_lb_addresses *addresses = process_serverlist_locked(serverlist); // Replace the LB addresses in the channel args that we pass down to // the subchannel. diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 175786332b..217e3375d5 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -108,6 +108,7 @@ typedef struct server_fixture { grpc_completion_queue *cq; char *servers_hostport; int port; + const char *lb_token_prefix; gpr_thd_id tid; int num_calls_serviced; } server_fixture; @@ -123,7 +124,8 @@ static void *tag(intptr_t t) { return (void *)t; } static grpc_slice build_response_payload_slice( const char *host, int *ports, size_t nports, - int64_t expiration_interval_secs, int32_t expiration_interval_nanos) { + int64_t expiration_interval_secs, int32_t expiration_interval_nanos, + const char *token_prefix) { // server_list { // servers { // ip_address: @@ -150,15 +152,19 @@ static grpc_slice build_response_payload_slice( struct in_addr ip4; GPR_ASSERT(inet_pton(AF_INET, host, &ip4) == 1); server->set_ip_address( - grpc::string(reinterpret_cast(&ip4), sizeof(ip4))); + string(reinterpret_cast(&ip4), sizeof(ip4))); server->set_port(ports[i]); - // The following long long int cast is meant to work around the - // disfunctional implementation of std::to_string in gcc 4.4, which doesn't - // have a version for int but does have one for long long int. - string token_data = "token" + std::to_string((long long int)ports[i]); - server->set_load_balance_token(token_data); + // Missing tokens are acceptable. Test that path. + if (strlen(token_prefix) > 0) { + // The following long long int cast is meant to work around the + // disfunctional implementation of std::to_string in gcc 4.4, which + // doesn't have a version for int but does have one for long long int. + string token_data = + token_prefix + std::to_string((long long int)ports[i]); + server->set_load_balance_token(token_data); + } } - const grpc::string &enc_resp = response.SerializeAsString(); + const string &enc_resp = response.SerializeAsString(); return grpc_slice_from_copied_buffer(enc_resp.data(), enc_resp.size()); } @@ -250,14 +256,14 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports, for (int i = 0; i < 2; i++) { if (i == 0) { // First half of the ports. - response_payload_slice = - build_response_payload_slice("127.0.0.1", ports, nports / 2, -1, -1); + response_payload_slice = build_response_payload_slice( + "127.0.0.1", ports, nports / 2, -1, -1, sf->lb_token_prefix); } else { // Second half of the ports. sleep_ms(update_delay_ms); - response_payload_slice = - build_response_payload_slice("127.0.0.1", ports + (nports / 2), - (nports + 1) / 2 /* ceil */, -1, -1); + response_payload_slice = build_response_payload_slice( + "127.0.0.1", ports + (nports / 2), (nports + 1) / 2 /* ceil */, -1, + -1, "" /* this half doesn't get to receive an LB token */); } response_payload = grpc_raw_byte_buffer_create(&response_payload_slice, 1); @@ -343,7 +349,10 @@ static void start_backend_server(server_fixture *sf) { // The following long long int cast is meant to work around the // disfunctional implementation of std::to_string in gcc 4.4, which doesn't // have a version for int but does have one for long long int. - string expected_token = "token" + std::to_string((long long int)sf->port); + const string expected_token = + strlen(sf->lb_token_prefix) == 0 + ? "" + : sf->lb_token_prefix + std::to_string((long long int)sf->port); GPR_ASSERT(contains_metadata(&request_metadata_recv, "lb-token", expected_token.c_str())); @@ -626,6 +635,7 @@ static void fork_lb_server(void *arg) { tf->lb_server_update_delay_ms); } +#define LB_TOKEN_PREFIX "token" static test_fixture setup_test_fixture(int lb_server_update_delay_ms) { test_fixture tf; memset(&tf, 0, sizeof(tf)); @@ -635,11 +645,18 @@ static test_fixture setup_test_fixture(int lb_server_update_delay_ms) { gpr_thd_options_set_joinable(&options); for (int i = 0; i < NUM_BACKENDS; ++i) { + // Only the first half of the servers expect an LB token. + if (i < NUM_BACKENDS / 2) { + tf.lb_backends[i].lb_token_prefix = LB_TOKEN_PREFIX; + } else { + tf.lb_backends[i].lb_token_prefix = ""; + } setup_server("127.0.0.1", &tf.lb_backends[i]); gpr_thd_new(&tf.lb_backends[i].tid, fork_backend_server, &tf.lb_backends[i], &options); } + tf.lb_server.lb_token_prefix = LB_TOKEN_PREFIX; setup_server("127.0.0.1", &tf.lb_server); gpr_thd_new(&tf.lb_server.tid, fork_lb_server, &tf.lb_server, &options); -- cgit v1.2.3 From b0fb2d2b7a96a408ecde0e2c1e77511d7ca88677 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 16 Nov 2016 14:04:05 +0100 Subject: fix windows build --- src/core/ext/lb_policy/pick_first/pick_first.c | 2 +- src/core/ext/lb_policy/round_robin/round_robin.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 39f3b3d60f..c69f773e78 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -293,7 +293,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, loop: switch (p->checking_connectivity) { case GRPC_CHANNEL_INIT: - GPR_UNREACHABLE_CODE(); + GPR_UNREACHABLE_CODE(return ); case GRPC_CHANNEL_READY: grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_READY, GRPC_ERROR_NONE, diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index acb2f77e45..59f84054c4 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -553,7 +553,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, } switch (sd->curr_connectivity_state) { case GRPC_CHANNEL_INIT: - GPR_UNREACHABLE_CODE(); + GPR_UNREACHABLE_CODE(return ); case GRPC_CHANNEL_READY: /* add the newly connected subchannel to the list of connected ones. * Note that it goes to the "end of the line". */ -- cgit v1.2.3 From 963be3727033668049a4de9f9ce1b507239e93f6 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 16 Nov 2016 14:17:06 -0800 Subject: Changed security handshakers to use generic handshaker API. --- .../chttp2/client/secure/secure_channel_create.c | 67 ++---- .../chttp2/server/secure/server_secure_chttp2.c | 141 ++++++------ src/core/lib/http/httpcli_security_connector.c | 78 ++++--- src/core/lib/security/transport/handshake.c | 247 +++++++++++---------- src/core/lib/security/transport/handshake.h | 12 +- .../lib/security/transport/security_connector.c | 149 ++++--------- .../lib/security/transport/security_connector.h | 38 ++-- test/core/security/ssl_server_fuzzer.c | 25 ++- 8 files changed, 348 insertions(+), 409 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 5101737e11..9478d0db7e 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -77,9 +77,6 @@ typedef struct { grpc_closure connected_closure; grpc_handshake_manager *handshake_mgr; - - // TODO(roth): Remove once we eliminate on_secure_handshake_done(). - grpc_channel_args *tmp_args; } connector; static void connector_ref(grpc_connector *con) { @@ -91,62 +88,38 @@ static void connector_unref(grpc_exec_ctx *exec_ctx, grpc_connector *con) { connector *c = (connector *)con; if (gpr_unref(&c->refs)) { /* c->initial_string_buffer does not need to be destroyed */ - grpc_channel_args_destroy(c->tmp_args); grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); gpr_free(c); } } -static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, - grpc_security_status status, - grpc_endpoint *secure_endpoint, - grpc_auth_context *auth_context) { - connector *c = arg; - gpr_mu_lock(&c->mu); - grpc_error *error = GRPC_ERROR_NONE; - if (c->connecting_endpoint == NULL) { - memset(c->result, 0, sizeof(*c->result)); - gpr_mu_unlock(&c->mu); - } else if (status != GRPC_SECURITY_OK) { - error = grpc_error_set_int(GRPC_ERROR_CREATE("Secure handshake failed"), - GRPC_ERROR_INT_SECURITY_STATUS, status); - memset(c->result, 0, sizeof(*c->result)); - c->connecting_endpoint = NULL; - gpr_mu_unlock(&c->mu); - } else { - grpc_arg auth_context_arg; - c->connecting_endpoint = NULL; - gpr_mu_unlock(&c->mu); - c->result->transport = grpc_create_chttp2_transport( - exec_ctx, c->args.channel_args, secure_endpoint, 1); - grpc_chttp2_transport_start_reading(exec_ctx, c->result->transport, NULL); - auth_context_arg = grpc_auth_context_to_arg(auth_context); - c->result->channel_args = - grpc_channel_args_copy_and_add(c->tmp_args, &auth_context_arg, 1); - } - grpc_closure *notify = c->notify; - c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); -} - static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_handshaker_args *args = arg; connector *c = args->user_data; - c->tmp_args = args->args; + gpr_mu_lock(&c->mu); if (error != GRPC_ERROR_NONE) { + c->connecting_endpoint = NULL; + gpr_mu_unlock(&c->mu); + grpc_channel_args_destroy(args->args); gpr_free(args->read_buffer); - grpc_closure *notify = c->notify; - c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); } else { - // TODO(roth, jboeuf): Convert security connector handshaking to use new - // handshake API, and then move the code from on_secure_handshake_done() - // into this function. - grpc_channel_security_connector_do_handshake( - exec_ctx, c->security_connector, args->endpoint, args->read_buffer, - c->args.deadline, on_secure_handshake_done, c); + if (c->connecting_endpoint == NULL) { + memset(c->result, 0, sizeof(*c->result)); + gpr_mu_unlock(&c->mu); + } else { + c->connecting_endpoint = NULL; + gpr_mu_unlock(&c->mu); + c->result->transport = grpc_create_chttp2_transport( + exec_ctx, args->args, args->endpoint, 1); + grpc_chttp2_transport_start_reading(exec_ctx, c->result->transport, + args->read_buffer); + } + c->result->channel_args = args->args; } + grpc_closure *notify = c->notify; + c->notify = NULL; + grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); gpr_free(args); } @@ -262,6 +235,8 @@ static grpc_subchannel *client_channel_factory_create_subchannel( grpc_http_connect_handshaker_create(proxy_name, args->server_name)); gpr_free(proxy_name); } + grpc_channel_security_connector_create_handshakers( + exec_ctx, c->security_connector, c->handshake_mgr); gpr_mu_init(&c->mu); gpr_ref_init(&c->refs, 1); grpc_subchannel *s = grpc_subchannel_create(exec_ctx, &c->base, args); diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index c7980780f3..59aaf7fdd8 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -54,6 +54,11 @@ #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" +typedef struct pending_handshake_manager_node { + grpc_handshake_manager* handshake_mgr; + struct pending_handshake_manager_node *next; +} pending_handshake_manager_node; + typedef struct server_secure_state { grpc_server *server; grpc_tcp_server *tcp; @@ -63,6 +68,7 @@ typedef struct server_secure_state { gpr_mu mu; grpc_closure tcp_server_shutdown_complete; grpc_closure *server_destroy_listener_done; + pending_handshake_manager_node *pending_handshake_mgrs; } server_secure_state; typedef struct server_secure_connect { @@ -70,49 +76,41 @@ typedef struct server_secure_connect { grpc_pollset *accepting_pollset; grpc_tcp_server_acceptor *acceptor; grpc_handshake_manager *handshake_mgr; - // TODO(roth): Remove the following two fields when we eliminate - // grpc_server_security_connector_do_handshake(). - gpr_timespec deadline; - grpc_channel_args *args; } server_secure_connect; -static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *statep, - grpc_security_status status, - grpc_endpoint *secure_endpoint, - grpc_auth_context *auth_context) { - server_secure_connect *connection_state = statep; - if (status == GRPC_SECURITY_OK) { - if (secure_endpoint) { - gpr_mu_lock(&connection_state->server_state->mu); - if (!connection_state->server_state->is_shutdown) { - grpc_transport *transport = grpc_create_chttp2_transport( - exec_ctx, grpc_server_get_channel_args( - connection_state->server_state->server), - secure_endpoint, 0); - grpc_arg args_to_add[2]; - args_to_add[0] = grpc_server_credentials_to_arg( - connection_state->server_state->creds); - args_to_add[1] = grpc_auth_context_to_arg(auth_context); - grpc_channel_args *args_copy = grpc_channel_args_copy_and_add( - connection_state->args, args_to_add, GPR_ARRAY_SIZE(args_to_add)); - grpc_server_setup_transport( - exec_ctx, connection_state->server_state->server, transport, - connection_state->accepting_pollset, args_copy); - grpc_channel_args_destroy(args_copy); - grpc_chttp2_transport_start_reading(exec_ctx, transport, NULL); - } else { - /* We need to consume this here, because the server may already have - * gone away. */ - grpc_endpoint_destroy(exec_ctx, secure_endpoint); - } - gpr_mu_unlock(&connection_state->server_state->mu); +static void pending_handshake_manager_add_locked( + server_secure_state* state, grpc_handshake_manager* handshake_mgr) { + pending_handshake_manager_node* node = gpr_malloc(sizeof(*node)); + node->handshake_mgr = handshake_mgr; + node->next = state->pending_handshake_mgrs; + state->pending_handshake_mgrs = node; +} + +static void pending_handshake_manager_remove_locked( + server_secure_state* state, grpc_handshake_manager* handshake_mgr) { + pending_handshake_manager_node** prev_node = &state->pending_handshake_mgrs; + for (pending_handshake_manager_node* node = state->pending_handshake_mgrs; + node != NULL; node = node->next) { + if (node->handshake_mgr == handshake_mgr) { + *prev_node = node->next; + gpr_free(node); + break; } - } else { - gpr_log(GPR_ERROR, "Secure transport failed with error %d", status); + prev_node = &node->next; } - grpc_channel_args_destroy(connection_state->args); - grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp); - gpr_free(connection_state); +} + +static void pending_handshake_manager_shutdown_locked( + grpc_exec_ctx* exec_ctx, server_secure_state* state) { + pending_handshake_manager_node* prev_node = NULL; + for (pending_handshake_manager_node* node = state->pending_handshake_mgrs; + node != NULL; node = node->next) { + grpc_handshake_manager_shutdown(exec_ctx, node->handshake_mgr); + gpr_free(prev_node); + prev_node = node; + } + gpr_free(prev_node); + state->pending_handshake_mgrs = NULL; } static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, @@ -123,25 +121,39 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); - grpc_channel_args_destroy(args->args); gpr_free(args->read_buffer); - gpr_free(args); - grpc_handshake_manager_shutdown(exec_ctx, connection_state->handshake_mgr); - grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); - grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp); - gpr_free(connection_state); - return; + if (args->endpoint != NULL) { + grpc_endpoint_destroy(exec_ctx, args->endpoint); + } + gpr_mu_lock(&connection_state->server_state->mu); + } else { + gpr_mu_lock(&connection_state->server_state->mu); + if (!connection_state->server_state->is_shutdown) { + grpc_arg channel_arg = grpc_server_credentials_to_arg( + connection_state->server_state->creds); + grpc_channel_args *args_copy = + grpc_channel_args_copy_and_add(args->args, &channel_arg, 1); + grpc_transport *transport = grpc_create_chttp2_transport( + exec_ctx, args_copy, args->endpoint, 0); + grpc_server_setup_transport( + exec_ctx, connection_state->server_state->server, transport, + connection_state->accepting_pollset, args_copy); + grpc_channel_args_destroy(args_copy); + grpc_chttp2_transport_start_reading(exec_ctx, transport, + args->read_buffer); + } else { + /* We need to consume this here, because the server may already have + * gone away. */ + grpc_endpoint_destroy(exec_ctx, args->endpoint); + } } + pending_handshake_manager_remove_locked( + connection_state->server_state, connection_state->handshake_mgr); + gpr_mu_unlock(&connection_state->server_state->mu); grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); - connection_state->handshake_mgr = NULL; - // TODO(roth, jboeuf): Convert security connector handshaking to use new - // handshake API, and then move the code from on_secure_handshake_done() - // into this function. - connection_state->args = args->args; - grpc_server_security_connector_do_handshake( - exec_ctx, connection_state->server_state->sc, connection_state->acceptor, - args->endpoint, args->read_buffer, connection_state->deadline, - on_secure_handshake_done, connection_state); + grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp); + gpr_free(connection_state); + grpc_channel_args_destroy(args->args); gpr_free(args); } @@ -149,29 +161,32 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *statep, grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { server_secure_state *server_state = statep; - server_secure_connect *connection_state = NULL; gpr_mu_lock(&server_state->mu); if (server_state->is_shutdown) { gpr_mu_unlock(&server_state->mu); grpc_endpoint_destroy(exec_ctx, tcp); return; } + grpc_handshake_manager* handshake_mgr = grpc_handshake_manager_create(); + pending_handshake_manager_add_locked(server_state, handshake_mgr); gpr_mu_unlock(&server_state->mu); grpc_tcp_server_ref(server_state->tcp); - connection_state = gpr_malloc(sizeof(*connection_state)); + server_secure_connect *connection_state = + gpr_malloc(sizeof(*connection_state)); connection_state->server_state = server_state; connection_state->accepting_pollset = accepting_pollset; connection_state->acceptor = acceptor; - connection_state->handshake_mgr = grpc_handshake_manager_create(); + connection_state->handshake_mgr = handshake_mgr; + grpc_server_security_connector_create_handshakers( + exec_ctx, server_state->sc, connection_state->handshake_mgr); // TODO(roth): We should really get this timeout value from channel // args instead of hard-coding it. - connection_state->deadline = gpr_time_add( + gpr_timespec deadline = gpr_time_add( gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); grpc_handshake_manager_do_handshake( exec_ctx, connection_state->handshake_mgr, tcp, grpc_server_get_channel_args(connection_state->server_state->server), - connection_state->deadline, acceptor, on_handshake_done, - connection_state); + deadline, acceptor, on_handshake_done, connection_state); } /* Server callback: start listening on our ports */ @@ -193,9 +208,8 @@ static void tcp_server_shutdown_complete(grpc_exec_ctx *exec_ctx, void *statep, gpr_mu_lock(&server_state->mu); grpc_closure *destroy_done = server_state->server_destroy_listener_done; GPR_ASSERT(server_state->is_shutdown); + pending_handshake_manager_shutdown_locked(exec_ctx, server_state); gpr_mu_unlock(&server_state->mu); - /* clean up */ - grpc_server_security_connector_shutdown(exec_ctx, server_state->sc); /* Flush queued work before a synchronous unref. */ grpc_exec_ctx_flush(exec_ctx); @@ -260,7 +274,6 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, gpr_free(msg); goto error; } - sc->channel_args = grpc_server_get_channel_args(server); /* resolve address */ err = grpc_blocking_resolve_address(addr, "https", &resolved); diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index 24d264c32a..dd21513269 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -38,6 +38,8 @@ #include #include #include + +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/transport/handshake.h" #include "src/core/lib/support/string.h" #include "src/core/lib/tsi/ssl_transport_security.h" @@ -45,47 +47,41 @@ typedef struct { grpc_channel_security_connector base; tsi_ssl_handshaker_factory *handshaker_factory; + grpc_handshake_manager *handshake_mgr; char *secure_peer_name; } grpc_httpcli_ssl_channel_security_connector; static void httpcli_ssl_destroy(grpc_security_connector *sc) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; // FIXME grpc_httpcli_ssl_channel_security_connector *c = (grpc_httpcli_ssl_channel_security_connector *)sc; if (c->handshaker_factory != NULL) { tsi_ssl_handshaker_factory_destroy(c->handshaker_factory); } + if (c->handshake_mgr != NULL) { + grpc_handshake_manager_destroy(&exec_ctx, c->handshake_mgr); + } if (c->secure_peer_name != NULL) gpr_free(c->secure_peer_name); gpr_free(sc); + grpc_exec_ctx_finish(&exec_ctx); } -static void httpcli_ssl_do_handshake(grpc_exec_ctx *exec_ctx, - grpc_channel_security_connector *sc, - grpc_endpoint *nonsecure_endpoint, - grpc_slice_buffer *read_buffer, - gpr_timespec deadline, - grpc_security_handshake_done_cb cb, - void *user_data) { +static void httpcli_ssl_create_handshakers( + grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, + grpc_handshake_manager *handshake_mgr) { grpc_httpcli_ssl_channel_security_connector *c = (grpc_httpcli_ssl_channel_security_connector *)sc; - tsi_result result = TSI_OK; - tsi_handshaker *handshaker; - if (c->handshaker_factory == NULL) { - gpr_free(read_buffer); - cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL); - return; - } - result = tsi_ssl_handshaker_factory_create_handshaker( - c->handshaker_factory, c->secure_peer_name, &handshaker); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.", - tsi_result_to_string(result)); - gpr_free(read_buffer); - cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL); - } else { - grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, true, - nonsecure_endpoint, read_buffer, deadline, cb, - user_data); + tsi_handshaker *handshaker = NULL; + if (c->handshaker_factory != NULL) { + tsi_result result = tsi_ssl_handshaker_factory_create_handshaker( + c->handshaker_factory, c->secure_peer_name, &handshaker); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.", + tsi_result_to_string(result)); + } } + grpc_security_create_handshakers(exec_ctx, handshaker, &sc->base, + handshake_mgr); } static void httpcli_ssl_check_peer(grpc_exec_ctx *exec_ctx, @@ -140,7 +136,8 @@ static grpc_security_status httpcli_ssl_channel_security_connector_create( *sc = NULL; return GRPC_SECURITY_ERROR; } - c->base.do_handshake = httpcli_ssl_do_handshake; + c->handshake_mgr = grpc_handshake_manager_create(); + c->base.create_handshakers = httpcli_ssl_create_handshakers; *sc = &c->base; return GRPC_SECURITY_OK; } @@ -152,18 +149,22 @@ typedef struct { void *arg; } on_done_closure; -static void on_secure_transport_setup_done(grpc_exec_ctx *exec_ctx, void *rp, - grpc_security_status status, - grpc_endpoint *secure_endpoint, - grpc_auth_context *auth_context) { - on_done_closure *c = rp; - if (status != GRPC_SECURITY_OK) { - gpr_log(GPR_ERROR, "Secure transport setup failed with error %d.", status); +static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + grpc_handshaker_args *args = arg; + on_done_closure *c = args->user_data; + if (error != GRPC_ERROR_NONE) { + const char* msg = grpc_error_string(error); + gpr_log(GPR_ERROR, "Secure transport setup failed: %s", msg); + grpc_error_free_string(msg); c->func(exec_ctx, c->arg, NULL); } else { - c->func(exec_ctx, c->arg, secure_endpoint); + c->func(exec_ctx, c->arg, args->endpoint); } gpr_free(c); + grpc_channel_args_destroy(args->args); + gpr_free(args->read_buffer); + gpr_free(args); } static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg, @@ -186,8 +187,13 @@ static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(httpcli_ssl_channel_security_connector_create( pem_root_certs, pem_root_certs_size, host, &sc) == GRPC_SECURITY_OK); - grpc_channel_security_connector_do_handshake( - exec_ctx, sc, tcp, NULL, deadline, on_secure_transport_setup_done, c); + grpc_httpcli_ssl_channel_security_connector* httpcli_connector = + (grpc_httpcli_ssl_channel_security_connector*)sc; + grpc_channel_security_connector_create_handshakers( + exec_ctx, sc, httpcli_connector->handshake_mgr); + grpc_handshake_manager_do_handshake( + exec_ctx, httpcli_connector->handshake_mgr, tcp, NULL /* channel_args */, + deadline, NULL /* acceptor */, on_handshake_done, c /* user_data */); GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "httpcli"); } diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 9623797610..f1c0aa7d32 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -39,7 +39,9 @@ #include #include #include -#include "src/core/lib/iomgr/timer.h" + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/handshaker.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/transport/secure_endpoint.h" #include "src/core/lib/security/transport/tsi_error.h" @@ -47,24 +49,22 @@ #define GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE 256 typedef struct { + grpc_handshaker base; + grpc_handshaker_args* args; + grpc_closure* on_handshake_done; grpc_security_connector *connector; tsi_handshaker *handshaker; - bool is_client_side; unsigned char *handshake_buffer; size_t handshake_buffer_size; grpc_endpoint *wrapped_endpoint; grpc_endpoint *secure_endpoint; grpc_slice_buffer left_overs; - grpc_slice_buffer incoming; grpc_slice_buffer outgoing; - grpc_security_handshake_done_cb cb; - void *user_data; grpc_closure on_handshake_data_sent_to_peer; grpc_closure on_handshake_data_received_from_peer; grpc_auth_context *auth_context; - grpc_timer timer; gpr_refcount refs; -} grpc_security_handshake; +} security_handshaker; static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, void *setup, @@ -73,40 +73,12 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *setup, grpc_error *error); -static void security_connector_remove_handshake(grpc_security_handshake *h) { - GPR_ASSERT(!h->is_client_side); - grpc_security_connector_handshake_list *node; - grpc_security_connector_handshake_list *tmp; - grpc_server_security_connector *sc = - (grpc_server_security_connector *)h->connector; - gpr_mu_lock(&sc->mu); - node = sc->handshaking_handshakes; - if (node && node->handshake == h) { - sc->handshaking_handshakes = node->next; - gpr_free(node); - gpr_mu_unlock(&sc->mu); - return; - } - while (node) { - if (node->next->handshake == h) { - tmp = node->next; - node->next = node->next->next; - gpr_free(tmp); - gpr_mu_unlock(&sc->mu); - return; - } - node = node->next; - } - gpr_mu_unlock(&sc->mu); -} - -static void unref_handshake(grpc_security_handshake *h) { +static void unref_handshake(security_handshaker *h) { if (gpr_unref(&h->refs)) { if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker); if (h->handshake_buffer != NULL) gpr_free(h->handshake_buffer); grpc_slice_buffer_destroy(&h->left_overs); grpc_slice_buffer_destroy(&h->outgoing); - grpc_slice_buffer_destroy(&h->incoming); GRPC_AUTH_CONTEXT_UNREF(h->auth_context, "handshake"); GRPC_SECURITY_CONNECTOR_UNREF(h->connector, "handshake"); gpr_free(h); @@ -114,36 +86,38 @@ static void unref_handshake(grpc_security_handshake *h) { } static void security_handshake_done(grpc_exec_ctx *exec_ctx, - grpc_security_handshake *h, + security_handshaker *h, grpc_error *error) { - grpc_timer_cancel(exec_ctx, &h->timer); - if (!h->is_client_side) { - security_connector_remove_handshake(h); - } if (error == GRPC_ERROR_NONE) { - h->cb(exec_ctx, h->user_data, GRPC_SECURITY_OK, h->secure_endpoint, - h->auth_context); + h->args->endpoint = h->secure_endpoint; + grpc_arg auth_context_arg = grpc_auth_context_to_arg(h->auth_context); + grpc_channel_args* tmp_args = h->args->args; + h->args->args = + grpc_channel_args_copy_and_add(tmp_args, &auth_context_arg, 1); + grpc_channel_args_destroy(tmp_args); } else { const char *msg = grpc_error_string(error); gpr_log(GPR_DEBUG, "Security handshake failed: %s", msg); grpc_error_free_string(msg); - if (h->secure_endpoint != NULL) { grpc_endpoint_shutdown(exec_ctx, h->secure_endpoint); grpc_endpoint_destroy(exec_ctx, h->secure_endpoint); } else { grpc_endpoint_destroy(exec_ctx, h->wrapped_endpoint); } - h->cb(exec_ctx, h->user_data, GRPC_SECURITY_ERROR, NULL, NULL); } + // Clear out the read buffer before it gets passed to the transport, + // since any excess bytes were already moved to h->left_overs. + grpc_slice_buffer_reset_and_unref(h->args->read_buffer); + h->args = NULL; + grpc_exec_ctx_sched(exec_ctx, h->on_handshake_done, error, NULL); unref_handshake(h); - GRPC_ERROR_UNREF(error); } static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data, grpc_security_status status, grpc_auth_context *auth_context) { - grpc_security_handshake *h = user_data; + security_handshaker *h = user_data; tsi_frame_protector *protector; tsi_result result; if (status != GRPC_SECURITY_OK) { @@ -172,7 +146,7 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data, return; } -static void check_peer(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h) { +static void check_peer(grpc_exec_ctx *exec_ctx, security_handshaker *h) { tsi_peer peer; tsi_result result = tsi_handshaker_extract_peer(h->handshaker, &peer); @@ -187,7 +161,7 @@ static void check_peer(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h) { } static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, - grpc_security_handshake *h) { + security_handshaker *h) { size_t offset = 0; tsi_result result = TSI_OK; grpc_slice to_send; @@ -215,8 +189,6 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, grpc_slice_from_copied_buffer((const char *)h->handshake_buffer, offset); grpc_slice_buffer_reset_and_unref(&h->outgoing); grpc_slice_buffer_add(&h->outgoing, to_send); - /* TODO(klempner,jboeuf): This should probably use the client setup - deadline */ grpc_endpoint_write(exec_ctx, h->wrapped_endpoint, &h->outgoing, &h->on_handshake_data_sent_to_peer); } @@ -224,7 +196,7 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, void *handshake, grpc_error *error) { - grpc_security_handshake *h = handshake; + security_handshaker *h = handshake; size_t consumed_slice_size = 0; tsi_result result = TSI_OK; size_t i; @@ -238,10 +210,10 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, return; } - for (i = 0; i < h->incoming.count; i++) { - consumed_slice_size = GRPC_SLICE_LENGTH(h->incoming.slices[i]); + for (i = 0; i < h->args->read_buffer->count; i++) { + consumed_slice_size = GRPC_SLICE_LENGTH(h->args->read_buffer->slices[i]); result = tsi_handshaker_process_bytes_from_peer( - h->handshaker, GRPC_SLICE_START_PTR(h->incoming.slices[i]), + h->handshaker, GRPC_SLICE_START_PTR(h->args->read_buffer->slices[i]), &consumed_slice_size); if (!tsi_handshaker_is_in_progress(h->handshaker)) break; } @@ -249,7 +221,7 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, if (tsi_handshaker_is_in_progress(h->handshaker)) { /* We may need more data. */ if (result == TSI_INCOMPLETE_DATA) { - grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, &h->incoming, + grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, h->args->read_buffer, &h->on_handshake_data_received_from_peer); return; } else { @@ -267,32 +239,33 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, /* Handshake is done and successful this point. */ has_left_overs_in_current_slice = - (consumed_slice_size < GRPC_SLICE_LENGTH(h->incoming.slices[i])); + (consumed_slice_size < + GRPC_SLICE_LENGTH(h->args->read_buffer->slices[i])); num_left_overs = - (has_left_overs_in_current_slice ? 1 : 0) + h->incoming.count - i - 1; - if (num_left_overs == 0) { - check_peer(exec_ctx, h); - return; + (has_left_overs_in_current_slice ? 1 : 0) + + h->args->read_buffer->count - i - 1; + if (num_left_overs > 0) { + /* Put the leftovers in our buffer (ownership transfered). */ + if (has_left_overs_in_current_slice) { + grpc_slice_buffer_add( + &h->left_overs, + grpc_slice_split_tail(&h->args->read_buffer->slices[i], + consumed_slice_size)); + /* split_tail above increments refcount. */ + grpc_slice_unref(h->args->read_buffer->slices[i]); + } + grpc_slice_buffer_addn( + &h->left_overs, &h->args->read_buffer->slices[i + 1], + num_left_overs - (size_t)has_left_overs_in_current_slice); } - /* Put the leftovers in our buffer (ownership transfered). */ - if (has_left_overs_in_current_slice) { - grpc_slice_buffer_add( - &h->left_overs, - grpc_slice_split_tail(&h->incoming.slices[i], consumed_slice_size)); - grpc_slice_unref( - h->incoming.slices[i]); /* split_tail above increments refcount. */ - } - grpc_slice_buffer_addn( - &h->left_overs, &h->incoming.slices[i + 1], - num_left_overs - (size_t)has_left_overs_in_current_slice); check_peer(exec_ctx, h); } /* If handshake is NULL, the handshake is done. */ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *handshake, grpc_error *error) { - grpc_security_handshake *h = handshake; + security_handshaker *h = handshake; /* Make sure that write is OK. */ if (error != GRPC_ERROR_NONE) { @@ -305,70 +278,110 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, /* We may be done. */ if (tsi_handshaker_is_in_progress(h->handshaker)) { - /* TODO(klempner,jboeuf): This should probably use the client setup - deadline */ - grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, &h->incoming, + grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, h->args->read_buffer, &h->on_handshake_data_received_from_peer); } else { check_peer(exec_ctx, h); } } -static void on_timeout(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - grpc_security_handshake *h = arg; - if (error == GRPC_ERROR_NONE) { - grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); - } +// +// public handshaker API +// + +static void security_handshaker_destroy(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) { + security_handshaker* h = (security_handshaker*)handshaker; unref_handshake(h); } -void grpc_do_security_handshake( +static void security_handshaker_shutdown(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) { + security_handshaker *h = (security_handshaker*)handshaker; + grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); +} + +static void security_handshaker_do_handshake( + grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, + grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, + grpc_handshaker_args* args) { + security_handshaker* h = (security_handshaker*)handshaker; + h->args = args; + h->on_handshake_done = on_handshake_done; + h->wrapped_endpoint = args->endpoint; // FIXME: remove? + gpr_ref(&h->refs); + send_handshake_bytes_to_peer(exec_ctx, h); +} + +static const grpc_handshaker_vtable security_handshaker_vtable = { + security_handshaker_destroy, security_handshaker_shutdown, + security_handshaker_do_handshake}; + +static grpc_handshaker* security_handshaker_create( grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, - grpc_security_connector *connector, bool is_client_side, - grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, - gpr_timespec deadline, grpc_security_handshake_done_cb cb, - void *user_data) { - grpc_security_connector_handshake_list *handshake_node; - grpc_security_handshake *h = gpr_malloc(sizeof(grpc_security_handshake)); - memset(h, 0, sizeof(grpc_security_handshake)); + grpc_security_connector *connector) { + security_handshaker *h = gpr_malloc(sizeof(security_handshaker)); + memset(h, 0, sizeof(security_handshaker)); + grpc_handshaker_init(&security_handshaker_vtable, &h->base); h->handshaker = handshaker; h->connector = GRPC_SECURITY_CONNECTOR_REF(connector, "handshake"); - h->is_client_side = is_client_side; h->handshake_buffer_size = GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE; h->handshake_buffer = gpr_malloc(h->handshake_buffer_size); - h->wrapped_endpoint = nonsecure_endpoint; - h->user_data = user_data; - h->cb = cb; - gpr_ref_init(&h->refs, 2); /* timer and handshake proper each get a ref */ + gpr_ref_init(&h->refs, 1); grpc_closure_init(&h->on_handshake_data_sent_to_peer, on_handshake_data_sent_to_peer, h); grpc_closure_init(&h->on_handshake_data_received_from_peer, on_handshake_data_received_from_peer, h); grpc_slice_buffer_init(&h->left_overs); grpc_slice_buffer_init(&h->outgoing); - grpc_slice_buffer_init(&h->incoming); - if (read_buffer != NULL) { - grpc_slice_buffer_move_into(read_buffer, &h->incoming); - gpr_free(read_buffer); - } - if (!is_client_side) { - grpc_server_security_connector *server_connector = - (grpc_server_security_connector *)connector; - handshake_node = gpr_malloc(sizeof(grpc_security_connector_handshake_list)); - handshake_node->handshake = h; - gpr_mu_lock(&server_connector->mu); - handshake_node->next = server_connector->handshaking_handshakes; - server_connector->handshaking_handshakes = handshake_node; - gpr_mu_unlock(&server_connector->mu); - } - send_handshake_bytes_to_peer(exec_ctx, h); - grpc_timer_init(exec_ctx, &h->timer, - gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC), - on_timeout, h, gpr_now(GPR_CLOCK_MONOTONIC)); + return &h->base; } -void grpc_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, - void *handshake) { - grpc_security_handshake *h = handshake; - grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); +// +// fail_handshaker +// + +static void fail_handshaker_destroy(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) { + gpr_free(handshaker); +} + +static void fail_handshaker_shutdown(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) {} + +static void fail_handshaker_do_handshake( + grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, + grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, + grpc_handshaker_args* args) { + grpc_exec_ctx_sched( + exec_ctx, on_handshake_done, + GRPC_ERROR_CREATE("Failed to create security handshaker"), NULL); +} + +static const grpc_handshaker_vtable fail_handshaker_vtable = { + fail_handshaker_destroy, fail_handshaker_shutdown, + fail_handshaker_do_handshake}; + +static grpc_handshaker* fail_handshaker_create() { + grpc_handshaker* h = gpr_malloc(sizeof(*h)); + grpc_handshaker_init(&fail_handshaker_vtable, h); + return h; +} + +// +// exported functions +// + +void grpc_security_create_handshakers( + grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, + grpc_security_connector *connector, grpc_handshake_manager *handshake_mgr) { + // If no TSI handshaker was created, add a handshaker that always fails. + // Otherwise, add a real security handshaker. + if (handshaker == NULL) { + grpc_handshake_manager_add(handshake_mgr, fail_handshaker_create()); + } else { + grpc_handshake_manager_add( + handshake_mgr, + security_handshaker_create(exec_ctx, handshaker, connector)); + } } diff --git a/src/core/lib/security/transport/handshake.h b/src/core/lib/security/transport/handshake.h index f894540515..14b60ef37f 100644 --- a/src/core/lib/security/transport/handshake.h +++ b/src/core/lib/security/transport/handshake.h @@ -37,14 +37,10 @@ #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/security/transport/security_connector.h" -/* Calls the callback upon completion. Takes owership of handshaker and - * read_buffer. */ -void grpc_do_security_handshake( +/// Creates any necessary security handshakers and adds them to +/// \a handshake_mgr. +void grpc_security_create_handshakers( grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, - grpc_security_connector *connector, bool is_client_side, - grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, - gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); - -void grpc_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, void *handshake); + grpc_security_connector *connector, grpc_handshake_manager *handshake_mgr); #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_HANDSHAKE_H */ diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 0fbd63a7e1..c058890a55 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -111,45 +111,19 @@ const tsi_peer_property *tsi_peer_get_property_by_name(const tsi_peer *peer, return NULL; } -void grpc_server_security_connector_shutdown( - grpc_exec_ctx *exec_ctx, grpc_server_security_connector *connector) { - grpc_security_connector_handshake_list *tmp; - gpr_mu_lock(&connector->mu); - while (connector->handshaking_handshakes) { - tmp = connector->handshaking_handshakes; - grpc_security_handshake_shutdown( - exec_ctx, connector->handshaking_handshakes->handshake); - connector->handshaking_handshakes = tmp->next; - gpr_free(tmp); +void grpc_channel_security_connector_create_handshakers( + grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *connector, + grpc_handshake_manager *handshake_mgr) { + if (connector != NULL) { + connector->create_handshakers(exec_ctx, connector, handshake_mgr); } - gpr_mu_unlock(&connector->mu); } -void grpc_channel_security_connector_do_handshake( - grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, - grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, - gpr_timespec deadline, grpc_security_handshake_done_cb cb, - void *user_data) { - if (sc == NULL || nonsecure_endpoint == NULL) { - gpr_free(read_buffer); - cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL); - } else { - sc->do_handshake(exec_ctx, sc, nonsecure_endpoint, read_buffer, deadline, - cb, user_data); - } -} - -void grpc_server_security_connector_do_handshake( - grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, - grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - grpc_slice_buffer *read_buffer, gpr_timespec deadline, - grpc_security_handshake_done_cb cb, void *user_data) { - if (sc == NULL || nonsecure_endpoint == NULL) { - gpr_free(read_buffer); - cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL); - } else { - sc->do_handshake(exec_ctx, sc, acceptor, nonsecure_endpoint, read_buffer, - deadline, cb, user_data); +void grpc_server_security_connector_create_handshakers( + grpc_exec_ctx *exec_ctx, grpc_server_security_connector *connector, + grpc_handshake_manager *handshake_mgr) { + if (connector != NULL) { + connector->create_handshakers(exec_ctx, connector, handshake_mgr); } } @@ -263,8 +237,6 @@ static void fake_channel_destroy(grpc_security_connector *sc) { } static void fake_server_destroy(grpc_security_connector *sc) { - grpc_server_security_connector *c = (grpc_server_security_connector *)sc; - gpr_mu_destroy(&c->mu); gpr_free(sc); } @@ -313,26 +285,20 @@ static void fake_channel_check_call_host(grpc_exec_ctx *exec_ctx, cb(exec_ctx, user_data, GRPC_SECURITY_OK); } -static void fake_channel_do_handshake(grpc_exec_ctx *exec_ctx, - grpc_channel_security_connector *sc, - grpc_endpoint *nonsecure_endpoint, - grpc_slice_buffer *read_buffer, - gpr_timespec deadline, - grpc_security_handshake_done_cb cb, - void *user_data) { - grpc_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(1), &sc->base, - true, nonsecure_endpoint, read_buffer, deadline, - cb, user_data); +static void fake_channel_create_handshakers( + grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, + grpc_handshake_manager *handshake_mgr) { + grpc_security_create_handshakers( + exec_ctx, tsi_create_fake_handshaker(true /* is_client */), &sc->base, + handshake_mgr); } -static void fake_server_do_handshake( +static void fake_server_create_handshakers( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, - grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - grpc_slice_buffer *read_buffer, gpr_timespec deadline, - grpc_security_handshake_done_cb cb, void *user_data) { - grpc_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(0), &sc->base, - false, nonsecure_endpoint, read_buffer, deadline, - cb, user_data); + grpc_handshake_manager *handshake_mgr) { + grpc_security_create_handshakers( + exec_ctx, tsi_create_fake_handshaker(false /* is_client */), &sc->base, + handshake_mgr); } static grpc_security_connector_vtable fake_channel_vtable = { @@ -350,7 +316,7 @@ grpc_channel_security_connector *grpc_fake_channel_security_connector_create( c->base.vtable = &fake_channel_vtable; c->request_metadata_creds = grpc_call_credentials_ref(request_metadata_creds); c->check_call_host = fake_channel_check_call_host; - c->do_handshake = fake_channel_do_handshake; + c->create_handshakers = fake_channel_create_handshakers; return c; } @@ -362,8 +328,7 @@ grpc_server_security_connector *grpc_fake_server_security_connector_create( gpr_ref_init(&c->base.refcount, 1); c->base.vtable = &fake_server_vtable; c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME; - c->do_handshake = fake_server_do_handshake; - gpr_mu_init(&c->mu); + c->create_handshakers = fake_server_create_handshakers; return c; } @@ -396,11 +361,9 @@ static void ssl_channel_destroy(grpc_security_connector *sc) { static void ssl_server_destroy(grpc_security_connector *sc) { grpc_ssl_server_security_connector *c = (grpc_ssl_server_security_connector *)sc; - if (c->handshaker_factory != NULL) { tsi_ssl_handshaker_factory_destroy(c->handshaker_factory); } - gpr_mu_destroy(&c->base.mu); gpr_free(sc); } @@ -419,49 +382,34 @@ static grpc_security_status ssl_create_handshaker( return GRPC_SECURITY_OK; } -static void ssl_channel_do_handshake(grpc_exec_ctx *exec_ctx, - grpc_channel_security_connector *sc, - grpc_endpoint *nonsecure_endpoint, - grpc_slice_buffer *read_buffer, - gpr_timespec deadline, - grpc_security_handshake_done_cb cb, - void *user_data) { - grpc_ssl_channel_security_connector *c = - (grpc_ssl_channel_security_connector *)sc; - tsi_handshaker *handshaker; - grpc_security_status status = ssl_create_handshaker( - c->handshaker_factory, true, +static void ssl_channel_create_handshakers( + grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, + grpc_handshake_manager *handshake_mgr) { + grpc_ssl_channel_security_connector* c = + (grpc_ssl_channel_security_connector*)sc; + // Instantiate TSI handshaker. + tsi_handshaker *tsi_hs = NULL; + ssl_create_handshaker( + c->handshaker_factory, true /* is_client */, c->overridden_target_name != NULL ? c->overridden_target_name : c->target_name, - &handshaker); - if (status != GRPC_SECURITY_OK) { - gpr_free(read_buffer); - cb(exec_ctx, user_data, status, NULL, NULL); - } else { - grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, true, - nonsecure_endpoint, read_buffer, deadline, cb, - user_data); - } + &tsi_hs); + // Create handshakers. + grpc_security_create_handshakers(exec_ctx, tsi_hs, &sc->base, handshake_mgr); } -static void ssl_server_do_handshake( +static void ssl_server_create_handshakers( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, - grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - grpc_slice_buffer *read_buffer, gpr_timespec deadline, - grpc_security_handshake_done_cb cb, void *user_data) { - grpc_ssl_server_security_connector *c = - (grpc_ssl_server_security_connector *)sc; - tsi_handshaker *handshaker; - grpc_security_status status = - ssl_create_handshaker(c->handshaker_factory, false, NULL, &handshaker); - if (status != GRPC_SECURITY_OK) { - gpr_free(read_buffer); - cb(exec_ctx, user_data, status, NULL, NULL); - } else { - grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, false, - nonsecure_endpoint, read_buffer, deadline, cb, - user_data); - } + grpc_handshake_manager *handshake_mgr) { + grpc_ssl_server_security_connector* c = + (grpc_ssl_server_security_connector*)sc; + // Instantiate TSI handshaker. + tsi_handshaker *tsi_hs = NULL; + ssl_create_handshaker( + c->handshaker_factory, false /* is_client */, NULL /* peer_name */, + &tsi_hs); + // Create handshakers. + grpc_security_create_handshakers(exec_ctx, tsi_hs, &sc->base, handshake_mgr); } static int ssl_host_matches_name(const tsi_peer *peer, const char *peer_name) { @@ -765,7 +713,7 @@ grpc_security_status grpc_ssl_channel_security_connector_create( c->base.request_metadata_creds = grpc_call_credentials_ref(request_metadata_creds); c->base.check_call_host = ssl_channel_check_call_host; - c->base.do_handshake = ssl_channel_do_handshake; + c->base.create_handshakers = ssl_channel_create_handshakers; gpr_split_host_port(target_name, &c->target_name, &port); gpr_free(port); if (overridden_target_name != NULL) { @@ -840,8 +788,7 @@ grpc_security_status grpc_ssl_server_security_connector_create( *sc = NULL; goto error; } - gpr_mu_init(&c->base.mu); - c->base.do_handshake = ssl_server_do_handshake; + c->base.create_handshakers = ssl_server_create_handshakers; *sc = &c->base; gpr_free((void *)alpn_protocol_strings); gpr_free(alpn_protocol_string_lengths); diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h index dc02692b01..2dffb5c24a 100644 --- a/src/core/lib/security/transport/security_connector.h +++ b/src/core/lib/security/transport/security_connector.h @@ -35,6 +35,8 @@ #define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_CONNECTOR_H #include + +#include "src/core/lib/channel/handshaker.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/tsi/transport_security_interface.h" @@ -141,11 +143,9 @@ struct grpc_channel_security_connector { grpc_channel_security_connector *sc, const char *host, grpc_auth_context *auth_context, grpc_security_call_host_check_cb cb, void *user_data); - void (*do_handshake)(grpc_exec_ctx *exec_ctx, - grpc_channel_security_connector *sc, - grpc_endpoint *nonsecure_endpoint, - grpc_slice_buffer *read_buffer, gpr_timespec deadline, - grpc_security_handshake_done_cb cb, void *user_data); + void (*create_handshakers)( + grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, + grpc_handshake_manager *handshake_mgr); }; /* Checks that the host that will be set for a call is acceptable. */ @@ -154,11 +154,10 @@ void grpc_channel_security_connector_check_call_host( const char *host, grpc_auth_context *auth_context, grpc_security_call_host_check_cb cb, void *user_data); -/* Handshake. */ -void grpc_channel_security_connector_do_handshake( +/* Registers handshakers with \a handshake_mgr. */ +void grpc_channel_security_connector_create_handshakers( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *connector, - grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, - gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); + grpc_handshake_manager *handshake_mgr); /* --- server_security_connector object. --- @@ -169,25 +168,14 @@ typedef struct grpc_server_security_connector grpc_server_security_connector; struct grpc_server_security_connector { grpc_security_connector base; - gpr_mu mu; - grpc_security_connector_handshake_list *handshaking_handshakes; - const grpc_channel_args *channel_args; - void (*do_handshake)(grpc_exec_ctx *exec_ctx, - grpc_server_security_connector *sc, - grpc_tcp_server_acceptor *acceptor, - grpc_endpoint *nonsecure_endpoint, - grpc_slice_buffer *read_buffer, gpr_timespec deadline, - grpc_security_handshake_done_cb cb, void *user_data); + void (*create_handshakers)( + grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, + grpc_handshake_manager *handshake_mgr); }; -void grpc_server_security_connector_do_handshake( +void grpc_server_security_connector_create_handshakers( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, - grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - grpc_slice_buffer *read_buffer, gpr_timespec deadline, - grpc_security_handshake_done_cb cb, void *user_data); - -void grpc_server_security_connector_shutdown( - grpc_exec_ctx *exec_ctx, grpc_server_security_connector *connector); + grpc_handshake_manager *handshake_mgr); /* --- Creation security connectors. --- */ diff --git a/test/core/security/ssl_server_fuzzer.c b/test/core/security/ssl_server_fuzzer.c index 04969765f5..32ef60b3b1 100644 --- a/test/core/security/ssl_server_fuzzer.c +++ b/test/core/security/ssl_server_fuzzer.c @@ -58,17 +58,14 @@ struct handshake_state { bool done_callback_called; }; -static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *statep, - grpc_security_status status, - grpc_endpoint *secure_endpoint, - grpc_auth_context *auth_context) { - struct handshake_state *state = (struct handshake_state *)statep; +static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + grpc_handshaker_args *args = arg; + struct handshake_state *state = args->user_data; GPR_ASSERT(state->done_callback_called == false); state->done_callback_called = true; // The fuzzer should not pass the handshake. - GPR_ASSERT(status != GRPC_SECURITY_OK); - GPR_ASSERT(secure_endpoint == NULL); - GPR_ASSERT(auth_context == NULL); + GPR_ASSERT(error != GRPC_ERROR_NONE); } int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { @@ -108,15 +105,18 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_security_status status = grpc_server_credentials_create_security_connector(creds, &sc); GPR_ASSERT(status == GRPC_SECURITY_OK); - sc->channel_args = NULL; gpr_timespec deadline = gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(1, GPR_TIMESPAN)); struct handshake_state state; state.done_callback_called = false; - grpc_server_security_connector_do_handshake(&exec_ctx, sc, NULL, - mock_endpoint, NULL, deadline, - on_secure_handshake_done, &state); + grpc_handshake_manager *handshake_mgr = grpc_handshake_manager_create(); + grpc_server_security_connector_create_handshakers(&exec_ctx, sc, + handshake_mgr); + grpc_handshake_manager_do_handshake(&exec_ctx, handshake_mgr, mock_endpoint, + NULL /* channel_args */, deadline, + NULL /* acceptor */, on_handshake_done, + &state); grpc_exec_ctx_flush(&exec_ctx); // If the given string happens to be part of the correct client hello, the @@ -129,6 +129,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { GPR_ASSERT(state.done_callback_called); + grpc_handshake_manager_destroy(&exec_ctx, handshake_mgr); GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "test"); grpc_server_credentials_release(creds); grpc_slice_unref(cert_slice); -- cgit v1.2.3 From ac88ca1907669fc542598504ebfdb818ebbf96bc Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Nov 2016 14:21:29 -0800 Subject: Fix logic race in chttp2 write path IF: - we schedule a write in chttp2 in response to some stream op (which will cause a write that's covered by a poller to be scheduled on the combiner lock) - AND then, under that same combiner lock, we process a RST_STREAM - then we'll remove the op that's being processed, consequently removing the polling coverage - and then, IF that is the last poll on said transport, the transport will never write, which CAN cause servers to fail to shutdown --- .../transport/chttp2/transport/chttp2_transport.c | 59 ++++++++++++++++++---- src/core/ext/transport/chttp2/transport/internal.h | 10 ++++ src/core/ext/transport/chttp2/transport/writing.c | 2 + src/core/lib/iomgr/combiner.c | 11 +++- 4 files changed, 71 insertions(+), 11 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 127e1cdc13..570f289302 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -111,9 +111,6 @@ static void incoming_byte_stream_update_flow_control(grpc_exec_ctx *exec_ctx, static void incoming_byte_stream_destroy_locked(grpc_exec_ctx *exec_ctx, void *byte_stream, grpc_error *error_ignored); -static void fail_pending_writes(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_error *error); static void benign_reclaimer(grpc_exec_ctx *exec_ctx, void *t, grpc_error *error); @@ -428,6 +425,7 @@ static void close_transport_locked(grpc_exec_ctx *exec_ctx, /* flush writable stream list to avoid dangling references */ grpc_chttp2_stream *s; while (grpc_chttp2_list_pop_writable_stream(t, &s)) { + grpc_chttp2_leave_writing_lists(exec_ctx, t, s); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:close"); } end_all_the_calls(exec_ctx, t, GRPC_ERROR_REF(error)); @@ -523,6 +521,10 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, void *sp, } } + if (s->fail_pending_writes_on_writes_finished_error != NULL) { + GRPC_ERROR_UNREF(s->fail_pending_writes_on_writes_finished_error); + } + GPR_ASSERT(s->send_initial_metadata_finished == NULL); GPR_ASSERT(s->fetching_send_message == NULL); GPR_ASSERT(s->send_trailing_metadata_finished == NULL); @@ -704,8 +706,6 @@ static void write_action_end_locked(grpc_exec_ctx *exec_ctx, void *tp, } } - grpc_chttp2_end_write(exec_ctx, t, GRPC_ERROR_REF(error)); - switch (t->write_state) { case GRPC_CHTTP2_WRITE_STATE_IDLE: GPR_UNREACHABLE_CODE(break); @@ -734,6 +734,8 @@ static void write_action_end_locked(grpc_exec_ctx *exec_ctx, void *tp, break; } + grpc_chttp2_end_write(exec_ctx, t, GRPC_ERROR_REF(error)); + GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing"); GPR_TIMER_END("terminate_writing_with_lock", 0); } @@ -1388,6 +1390,7 @@ static void remove_stream(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } } if (grpc_chttp2_list_remove_writable_stream(t, s)) { + grpc_chttp2_leave_writing_lists(exec_ctx, t, s); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:remove_stream"); } @@ -1518,9 +1521,41 @@ static grpc_error *removal_error(grpc_error *extra_error, grpc_chttp2_stream *s, return error; } -static void fail_pending_writes(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_error *error) { +void grpc_chttp2_leave_writing_lists(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s) { + if (s->need_fail_pending_writes_on_writes_finished) { + grpc_error *error = s->fail_pending_writes_on_writes_finished_error; + s->fail_pending_writes_on_writes_finished_error = NULL; + s->need_fail_pending_writes_on_writes_finished = false; + grpc_chttp2_fail_pending_writes(exec_ctx, t, s, error); + } +} + +void grpc_chttp2_fail_pending_writes(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, grpc_error *error) { + if (s->need_fail_pending_writes_on_writes_finished || + (t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE && + (s->included[GRPC_CHTTP2_LIST_WRITABLE] || + s->included[GRPC_CHTTP2_LIST_WRITING]))) { + /* If a write is in progress, and it involves this stream, wait for the + * write to complete before cancelling things out. If we don't do this, then + * our combiner lock might think that some operation on its queue might be + * covering a completion even though there is none, in which case we might + * offload to another thread, which isn't guarateed to exist */ + if (error != GRPC_ERROR_NONE) { + if (s->fail_pending_writes_on_writes_finished_error == GRPC_ERROR_NONE) { + s->fail_pending_writes_on_writes_finished_error = GRPC_ERROR_CREATE( + "Post-poned fail writes due to in-progress write"); + } + s->fail_pending_writes_on_writes_finished_error = grpc_error_add_child( + s->fail_pending_writes_on_writes_finished_error, error); + } + s->need_fail_pending_writes_on_writes_finished = true; + return; /* early out */ + } + error = removal_error(error, s, "Pending writes failed due to stream closure"); s->send_initial_metadata = NULL; @@ -1529,6 +1564,12 @@ static void fail_pending_writes(grpc_exec_ctx *exec_ctx, "send_initial_metadata_finished"); s->send_trailing_metadata = NULL; + if (s->send_trailing_metadata_finished) { + const char *why = grpc_error_string(error); + gpr_log(GPR_DEBUG, "cancel send_trailing_metadata: writing=%d %s", + t->write_state, why); + grpc_error_free_string(why); + } grpc_chttp2_complete_closure_step( exec_ctx, t, s, &s->send_trailing_metadata_finished, GRPC_ERROR_REF(error), "send_trailing_metadata_finished"); @@ -1574,7 +1615,7 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx, if (close_writes && !s->write_closed) { s->write_closed_error = GRPC_ERROR_REF(error); s->write_closed = true; - fail_pending_writes(exec_ctx, t, s, GRPC_ERROR_REF(error)); + grpc_chttp2_fail_pending_writes(exec_ctx, t, s, GRPC_ERROR_REF(error)); grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s); } if (s->read_closed && s->write_closed) { diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index b74233d992..6cba1e7fd2 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -409,6 +409,9 @@ struct grpc_chttp2_stream { grpc_error *read_closed_error; /** the error that resulted in this stream being write-closed */ grpc_error *write_closed_error; + /** should any writes be cleared once this stream becomes non-writable */ + bool need_fail_pending_writes_on_writes_finished; + grpc_error *fail_pending_writes_on_writes_finished_error; grpc_published_metadata_method published_metadata[2]; bool final_metadata_requested; @@ -689,4 +692,11 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s); +void grpc_chttp2_leave_writing_lists(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s); +void grpc_chttp2_fail_pending_writes(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, grpc_error *error); + #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H */ diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index 139e7387c4..769b229a0d 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -208,6 +208,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:already_writing"); } } else { + grpc_chttp2_leave_writing_lists(exec_ctx, t, s); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:no_write"); } } @@ -252,6 +253,7 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_mark_stream_closed(exec_ctx, t, s, !t->is_client, 1, GRPC_ERROR_REF(error)); } + grpc_chttp2_leave_writing_lists(exec_ctx, t, s); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:end"); } grpc_slice_buffer_reset_and_unref(&t->outbuf); diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index 60ee14eb23..cfc67020ae 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -90,6 +90,12 @@ static bool is_covered_by_poller(grpc_combiner *lock) { gpr_atm_acq_load(&lock->elements_covered_by_poller) > 0; } +#define IS_COVERED_BY_POLLER_FMT "(final=%d elems=%" PRIdPTR ")->%d" +#define IS_COVERED_BY_POLLER_ARGS(lock) \ + (lock)->final_list_covered_by_poller, \ + gpr_atm_acq_load(&(lock)->elements_covered_by_poller), \ + is_covered_by_poller((lock)) + grpc_combiner *grpc_combiner_create(grpc_workqueue *optional_workqueue) { grpc_combiner *lock = gpr_malloc(sizeof(*lock)); lock->next_combiner_on_this_exec_ctx = NULL; @@ -197,9 +203,10 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { GRPC_COMBINER_TRACE( gpr_log(GPR_DEBUG, "C:%p grpc_combiner_continue_exec_ctx workqueue=%p " - "is_covered_by_poller=%d exec_ctx_ready_to_finish=%d " + "is_covered_by_poller=" IS_COVERED_BY_POLLER_FMT + " exec_ctx_ready_to_finish=%d " "time_to_execute_final_list=%d", - lock, lock->optional_workqueue, is_covered_by_poller(lock), + lock, lock->optional_workqueue, IS_COVERED_BY_POLLER_ARGS(lock), grpc_exec_ctx_ready_to_finish(exec_ctx), lock->time_to_execute_final_list)); -- cgit v1.2.3 From bed24048cc83caee5717790fb8a5d30a83d0aea7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Nov 2016 14:48:30 -0800 Subject: Remove spam --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 570f289302..7b7a741fbb 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1564,12 +1564,6 @@ void grpc_chttp2_fail_pending_writes(grpc_exec_ctx *exec_ctx, "send_initial_metadata_finished"); s->send_trailing_metadata = NULL; - if (s->send_trailing_metadata_finished) { - const char *why = grpc_error_string(error); - gpr_log(GPR_DEBUG, "cancel send_trailing_metadata: writing=%d %s", - t->write_state, why); - grpc_error_free_string(why); - } grpc_chttp2_complete_closure_step( exec_ctx, t, s, &s->send_trailing_metadata_finished, GRPC_ERROR_REF(error), "send_trailing_metadata_finished"); -- cgit v1.2.3 From 077da7fa318df97db196621740629e5b910bb325 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Nov 2016 14:55:44 -0800 Subject: Fix merge error --- src/core/lib/channel/http_server_filter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 80f3fc3cc3..b42ff06039 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -37,7 +37,7 @@ #include #include #include "src/core/lib/profiling/timers.h" -#include "src/core/lib/support/percent_encoding.h" +#include "src/core/lib/slice/percent_encoding.h" #include "src/core/lib/transport/static_metadata.h" #define EXPECTED_CONTENT_TYPE "application/grpc" @@ -90,10 +90,10 @@ typedef struct { static grpc_mdelem *server_filter_outgoing_metadata(void *user_data, grpc_mdelem *md) { if (md->key == GRPC_MDSTR_GRPC_MESSAGE) { - gpr_slice pct_encoded_msg = gpr_percent_encode_slice( - md->value->slice, gpr_compatible_percent_encoding_unreserved_bytes); - if (gpr_slice_is_equivalent(pct_encoded_msg, md->value->slice)) { - gpr_slice_unref(pct_encoded_msg); + grpc_slice pct_encoded_msg = grpc_percent_encode_slice( + md->value->slice, grpc_compatible_percent_encoding_unreserved_bytes); + if (grpc_slice_is_equivalent(pct_encoded_msg, md->value->slice)) { + grpc_slice_unref(pct_encoded_msg); return md; } else { return grpc_mdelem_from_metadata_strings( -- cgit v1.2.3 From f9b56b93f76f50c85b1897f2732d1a5bbf6727b1 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 16 Nov 2016 14:58:05 -0800 Subject: Change grpc_handshaker_args to be owned by the handshake manager. Also clean up hand-off semantics of endpoints. --- .../chttp2/client/insecure/channel_create.c | 2 +- .../chttp2/client/secure/secure_channel_create.c | 2 +- .../transport/chttp2/server/insecure/server_chttp2.c | 3 +-- .../chttp2/server/secure/server_secure_chttp2.c | 8 +++----- src/core/lib/channel/handshaker.c | 20 +++++++++++--------- src/core/lib/channel/handshaker.h | 19 ++++++++++++++++--- 6 files changed, 33 insertions(+), 21 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index c4c1e638a9..e0bce57fc2 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -97,6 +97,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_handshaker_args *args = arg; connector *c = args->user_data; if (error != GRPC_ERROR_NONE) { + grpc_endpoint_destroy(exec_ctx, args->endpoint); grpc_channel_args_destroy(args->args); gpr_free(args->read_buffer); } else { @@ -107,7 +108,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, args->read_buffer); c->result->channel_args = args->args; } - gpr_free(args); grpc_closure *notify = c->notify; c->notify = NULL; grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 5101737e11..4182aa730f 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -135,6 +135,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, connector *c = args->user_data; c->tmp_args = args->args; if (error != GRPC_ERROR_NONE) { + grpc_endpoint_destroy(exec_ctx, args->endpoint); gpr_free(args->read_buffer); grpc_closure *notify = c->notify; c->notify = NULL; @@ -147,7 +148,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, exec_ctx, c->security_connector, args->endpoint, args->read_buffer, c->args.deadline, on_secure_handshake_done, c); } - gpr_free(args); } static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index 669a3869ab..5a9d4f8928 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -62,7 +62,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); - grpc_handshake_manager_shutdown(exec_ctx, state->handshake_mgr); + grpc_endpoint_destroy(exec_ctx, args->endpoint); gpr_free(args->read_buffer); } else { // Beware that the call to grpc_create_chttp2_transport() has to happen @@ -79,7 +79,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, } // Clean up. grpc_channel_args_destroy(args->args); - gpr_free(args); grpc_handshake_manager_destroy(exec_ctx, state->handshake_mgr); gpr_free(state); } diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index c7980780f3..1d1973be8b 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -123,17 +123,14 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); + grpc_endpoint_destroy(exec_ctx, args->endpoint); grpc_channel_args_destroy(args->args); gpr_free(args->read_buffer); - gpr_free(args); - grpc_handshake_manager_shutdown(exec_ctx, connection_state->handshake_mgr); grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp); gpr_free(connection_state); return; } - grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); - connection_state->handshake_mgr = NULL; // TODO(roth, jboeuf): Convert security connector handshaking to use new // handshake API, and then move the code from on_secure_handshake_done() // into this function. @@ -142,7 +139,8 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, exec_ctx, connection_state->server_state->sc, connection_state->acceptor, args->endpoint, args->read_buffer, connection_state->deadline, on_secure_handshake_done, connection_state); - gpr_free(args); + grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); + connection_state->handshake_mgr = NULL; } static void on_accept(grpc_exec_ctx *exec_ctx, void *statep, grpc_endpoint *tcp, diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 89130e9951..905db118be 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -88,6 +88,8 @@ struct grpc_handshake_manager { // The final callback and user_data to invoke after the last handshaker. grpc_closure on_handshake_done; void* user_data; + // Handshaker args. + grpc_handshaker_args args; }; grpc_handshake_manager* grpc_handshake_manager_create() { @@ -205,22 +207,22 @@ void grpc_handshake_manager_do_handshake( grpc_iomgr_cb_func on_handshake_done, void* user_data) { // Construct handshaker args. These will be passed through all // handshakers and eventually be freed by the on_handshake_done callback. - grpc_handshaker_args* args = gpr_malloc(sizeof(*args)); - args->endpoint = endpoint; - args->args = grpc_channel_args_copy(channel_args); - args->read_buffer = gpr_malloc(sizeof(*args->read_buffer)); - grpc_slice_buffer_init(args->read_buffer); + mgr->args.endpoint = endpoint; + mgr->args.args = grpc_channel_args_copy(channel_args); + mgr->args.read_buffer = gpr_malloc(sizeof(*mgr->args.read_buffer)); + grpc_slice_buffer_init(mgr->args.read_buffer); // Initialize state needed for calling handshakers. gpr_mu_lock(&mgr->mu); GPR_ASSERT(mgr->index == 0); mgr->acceptor = acceptor; - grpc_closure_init(&mgr->call_next_handshaker, call_next_handshaker, args); - grpc_closure_init(&mgr->on_handshake_done, on_handshake_done, args); + grpc_closure_init(&mgr->call_next_handshaker, call_next_handshaker, + &mgr->args); + grpc_closure_init(&mgr->on_handshake_done, on_handshake_done, &mgr->args); // While chaining between handshakers, we use args->user_data to // store a pointer to the handshake manager. This will be // changed to point to the caller-supplied user_data before calling // the on_handshake_done callback. - args->user_data = mgr; + mgr->args.user_data = mgr; mgr->user_data = user_data; // Start deadline timer, which owns a ref. gpr_ref(&mgr->refs); @@ -229,6 +231,6 @@ void grpc_handshake_manager_do_handshake( on_timeout, mgr, gpr_now(GPR_CLOCK_MONOTONIC)); // Start first handshaker, which also owns a ref. gpr_ref(&mgr->refs); - call_next_handshaker_locked(exec_ctx, mgr, args, GRPC_ERROR_NONE); + call_next_handshaker_locked(exec_ctx, mgr, &mgr->args, GRPC_ERROR_NONE); gpr_mu_unlock(&mgr->mu); } diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index 8cad81c444..f0614c354b 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -55,7 +55,14 @@ typedef struct grpc_handshaker grpc_handshaker; /// Arguments passed through handshakers and to the on_handshake_done callback. -/// All data members are owned by the struct. +/// +/// For handshakers, all members are input/output parameters; for +/// example, a handshaker may read from \a endpoint and then later +/// replace it with a wrapped endpoint. Similarly, a handshaker may +/// modify \a args. +/// +/// For the on_handshake_done callback, all members are input arguments, +/// which the callback takes ownership of. typedef struct { grpc_endpoint* endpoint; grpc_channel_args* args; @@ -117,11 +124,17 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr); /// Invokes handshakers in the order they were added. +/// Takes ownership of \a endpoint, and then passes that ownership to +/// the \a on_handshake_done callback. /// Does NOT take ownership of \a args. Instead, makes a copy before /// invoking the first handshaker. /// \a acceptor will be NULL for client-side handshakers. -/// When done, invokes \a on_handshake_done with an argument of a -/// grpc_handshaker_args object, which the callback takes ownership of. +/// +/// When done, invokes \a on_handshake_done with a grpc_handshaker_args +/// object as its argument. If the callback is invoked with error != +/// GRPC_ERROR_NONE, then handshaking failed and the resulting endpoint +/// will have already been shut down (although the caller will still be +/// responsible for destroying it). void grpc_handshake_manager_do_handshake( grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr, grpc_endpoint* endpoint, const grpc_channel_args* channel_args, -- cgit v1.2.3 From 4a0e584d50ce735b9583f657feeed2bd24d694d5 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 16 Nov 2016 23:57:16 -0800 Subject: Undo wrong NULLing in grpclb --- src/core/ext/lb_policy/grpclb/grpclb.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index d8ef0c8098..b7f4698400 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -768,7 +768,6 @@ static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { * while holding glb_policy->mu: lb_on_server_status_received, invoked due to * the cancel, needs to acquire that same lock */ grpc_call *lb_call = glb_policy->lb_call; - glb_policy->lb_call = NULL; gpr_mu_unlock(&glb_policy->mu); /* glb_policy->lb_call and this local lb_call must be consistent at this point -- cgit v1.2.3 From 30a1beb0065300311a989c62ad7c21f9ab40358a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 17 Nov 2016 08:14:29 -0800 Subject: Fix edge cases in HTTP CONNECT handshaker. --- src/core/ext/client_channel/http_connect_handshaker.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 407b8ce023..971bbe8944 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -56,6 +56,8 @@ typedef struct http_connect_handshaker { gpr_mu mu; // State saved while performing the handshake. + // args will be NULL when either there is no handshake in progress or + // when the handshaker is shutting down. grpc_handshaker_args* args; grpc_closure* on_handshake_done; @@ -84,7 +86,7 @@ static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) { static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { http_connect_handshaker* handshaker = arg; - if (error != GRPC_ERROR_NONE) { + if (error != GRPC_ERROR_NONE || handshaker->args == NULL) { // If the write failed, invoke the callback immediately with the error. gpr_mu_lock(&handshaker->mu); grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, @@ -96,7 +98,6 @@ static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, // Otherwise, read the response. // The read callback inherits our ref to the handshaker. gpr_mu_lock(&handshaker->mu); - GPR_ASSERT(handshaker->args != NULL); grpc_endpoint_read(exec_ctx, handshaker->args->endpoint, handshaker->args->read_buffer, &handshaker->response_read_closure); @@ -109,8 +110,7 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { http_connect_handshaker* handshaker = arg; gpr_mu_lock(&handshaker->mu); - GPR_ASSERT(handshaker->args != NULL); - if (error != GRPC_ERROR_NONE) { + if (error != GRPC_ERROR_NONE || handshaker->args == NULL) { GRPC_ERROR_REF(error); // Take ref to pass to the handshake-done callback. goto done; } -- cgit v1.2.3 From 3975768bdbbbf2d8911d1d098f235bfb8448f30e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 17 Nov 2016 10:21:43 -0800 Subject: Fix bugs from merge. --- src/core/ext/transport/chttp2/client/secure/secure_channel_create.c | 1 - src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c | 1 - src/core/lib/security/transport/handshake.c | 5 +++-- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 4bf04170eb..ff6da0a545 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -121,7 +121,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_closure *notify = c->notify; c->notify = NULL; grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); - gpr_free(args); } static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 3cf5417397..add9c3c676 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -152,7 +152,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp); gpr_free(connection_state); grpc_channel_args_destroy(args->args); - gpr_free(args); } static void on_accept(grpc_exec_ctx *exec_ctx, void *statep, grpc_endpoint *tcp, diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index f1c0aa7d32..ec40951cbe 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -101,9 +101,10 @@ static void security_handshake_done(grpc_exec_ctx *exec_ctx, grpc_error_free_string(msg); if (h->secure_endpoint != NULL) { grpc_endpoint_shutdown(exec_ctx, h->secure_endpoint); - grpc_endpoint_destroy(exec_ctx, h->secure_endpoint); +// FIXME: clarify who should destroy... +// grpc_endpoint_destroy(exec_ctx, h->secure_endpoint); } else { - grpc_endpoint_destroy(exec_ctx, h->wrapped_endpoint); +// grpc_endpoint_destroy(exec_ctx, h->wrapped_endpoint); } } // Clear out the read buffer before it gets passed to the transport, -- cgit v1.2.3 From 183a59fa23bb18c7efe458949a1dbde25994433d Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 17 Nov 2016 11:10:00 -0800 Subject: Clean up connector code. --- .../chttp2/client/insecure/channel_create.c | 97 ++++++++++++--- .../chttp2/client/secure/secure_channel_create.c | 130 +++++++++++++-------- src/core/lib/security/transport/handshake.c | 11 +- 3 files changed, 168 insertions(+), 70 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index e0bce57fc2..f63c77c8d6 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -58,15 +58,19 @@ typedef struct { grpc_connector base; + + gpr_mu mu; gpr_refcount refs; + bool shutdown; + grpc_closure *notify; grpc_connect_in_args args; grpc_connect_out_args *result; grpc_closure initial_string_sent; grpc_slice_buffer initial_string_buffer; - grpc_endpoint *tcp; + grpc_endpoint *tcp; // Non-NULL until handshaking starts. grpc_closure connected; @@ -83,20 +87,39 @@ static void connector_unref(grpc_exec_ctx *exec_ctx, grpc_connector *con) { if (gpr_unref(&c->refs)) { /* c->initial_string_buffer does not need to be destroyed */ grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); + // If handshaking is not yet in progress, destroy the endpoint. + // Otherwise, the handshaker will do this for us. + if (c->tcp != NULL) grpc_endpoint_destroy(exec_ctx, c->tcp); gpr_free(c); } } -static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - connector_unref(exec_ctx, arg); +static void connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *con) { + connector *c = (connector *)con; + gpr_mu_lock(&c->mu); + c->shutdown = true; + grpc_handshake_manager_shutdown(exec_ctx, c->handshake_mgr); + // If handshaking is not yet in progress, shutdown the endpoint. + // Otherwise, the handshaker will do this for us. + if (c->tcp != NULL) grpc_endpoint_shutdown(exec_ctx, c->tcp); + gpr_mu_unlock(&c->mu); } static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_handshaker_args *args = arg; connector *c = args->user_data; - if (error != GRPC_ERROR_NONE) { + gpr_mu_lock(&c->mu); + if (error != GRPC_ERROR_NONE || c->shutdown) { + if (error == GRPC_ERROR_NONE) { + error = GRPC_ERROR_CREATE("connector shutdown"); + // We were shut down after handshaking completed successfully, so + // shutdown the endpoint here. + grpc_endpoint_shutdown(exec_ctx, args->endpoint); + } else { + error = GRPC_ERROR_REF(error); + } + memset(c->result, 0, sizeof(*c->result)); grpc_endpoint_destroy(exec_ctx, args->endpoint); grpc_channel_args_destroy(args->args); gpr_free(args->read_buffer); @@ -110,52 +133,89 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, } grpc_closure *notify = c->notify; c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); + grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); + gpr_mu_unlock(&c->mu); + connector_unref(exec_ctx, (grpc_connector*)c); +} + +static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + connector *c = arg; + gpr_mu_lock(&c->mu); + if (error != GRPC_ERROR_NONE || c->shutdown) { + if (error == GRPC_ERROR_NONE) { + error = GRPC_ERROR_CREATE("connector shutdown"); + } else { + error = GRPC_ERROR_REF(error); + } + memset(c->result, 0, sizeof(*c->result)); + grpc_closure *notify = c->notify; + c->notify = NULL; + grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); + gpr_mu_unlock(&c->mu); + connector_unref(exec_ctx, arg); + } else { + grpc_handshake_manager_do_handshake( + exec_ctx, c->handshake_mgr, c->tcp, c->args.channel_args, + c->args.deadline, NULL /* acceptor */, on_handshake_done, c); + c->tcp = NULL; // Endpoint handed off to handshake manager. + gpr_mu_unlock(&c->mu); + } } static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { connector *c = arg; - grpc_endpoint *tcp = c->tcp; - if (tcp != NULL) { + gpr_mu_lock(&c->mu); + if (error != GRPC_ERROR_NONE || c->shutdown) { + if (error == GRPC_ERROR_NONE) { + error = GRPC_ERROR_CREATE("connector shutdown"); + } else { + error = GRPC_ERROR_REF(error); + } + memset(c->result, 0, sizeof(*c->result)); + grpc_closure *notify = c->notify; + c->notify = NULL; + grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); + gpr_mu_unlock(&c->mu); + connector_unref(exec_ctx, arg); + } else { + GPR_ASSERT(c->tcp != NULL); if (!GRPC_SLICE_IS_EMPTY(c->args.initial_connect_string)) { grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, c); grpc_slice_buffer_init(&c->initial_string_buffer); grpc_slice_buffer_add(&c->initial_string_buffer, c->args.initial_connect_string); - connector_ref(arg); - grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, + grpc_endpoint_write(exec_ctx, c->tcp, &c->initial_string_buffer, &c->initial_string_sent); } else { grpc_handshake_manager_do_handshake( - exec_ctx, c->handshake_mgr, tcp, c->args.channel_args, + exec_ctx, c->handshake_mgr, c->tcp, c->args.channel_args, c->args.deadline, NULL /* acceptor */, on_handshake_done, c); + c->tcp = NULL; // Endpoint handed off to handshake manager. } - } else { - memset(c->result, 0, sizeof(*c->result)); - grpc_closure *notify = c->notify; - c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); + gpr_mu_unlock(&c->mu); } } -static void connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *con) {} - static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, const grpc_connect_in_args *args, grpc_connect_out_args *result, grpc_closure *notify) { connector *c = (connector *)con; + gpr_mu_lock(&c->mu); GPR_ASSERT(c->notify == NULL); GPR_ASSERT(notify->cb); c->notify = notify; c->args = *args; c->result = result; c->tcp = NULL; + connector_ref(con); // Ref taken for callback. grpc_closure_init(&c->connected, connected, c); grpc_tcp_client_connect(exec_ctx, &c->connected, &c->tcp, args->interested_parties, args->channel_args, args->addr, args->deadline); + gpr_mu_unlock(&c->mu); } static const grpc_connector_vtable connector_vtable = { @@ -177,6 +237,7 @@ static grpc_subchannel *client_channel_factory_create_subchannel( connector *c = gpr_malloc(sizeof(*c)); memset(c, 0, sizeof(*c)); c->base.vtable = &connector_vtable; + gpr_mu_init(&c->mu); gpr_ref_init(&c->refs, 1); c->handshake_mgr = grpc_handshake_manager_create(); char *proxy_name = grpc_get_http_proxy_server(); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index ff6da0a545..d8b5a199f7 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -60,8 +60,12 @@ typedef struct { grpc_connector base; + + gpr_mu mu; gpr_refcount refs; + bool shutdown; + grpc_channel_security_connector *security_connector; grpc_closure *notify; @@ -70,9 +74,7 @@ typedef struct { grpc_closure initial_string_sent; grpc_slice_buffer initial_string_buffer; - gpr_mu mu; - grpc_endpoint *connecting_endpoint; - grpc_endpoint *newly_connecting_endpoint; + grpc_endpoint *endpoint; // Non-NULL until handshaking starts. grpc_closure connected_closure; @@ -88,87 +90,116 @@ static void connector_unref(grpc_exec_ctx *exec_ctx, grpc_connector *con) { connector *c = (connector *)con; if (gpr_unref(&c->refs)) { /* c->initial_string_buffer does not need to be destroyed */ + gpr_mu_destroy(&c->mu); grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); + // If handshaking is not yet in progress, destroy the endpoint. + // Otherwise, the handshaker will do this for us. + if (c->endpoint != NULL) grpc_endpoint_destroy(exec_ctx, c->endpoint); gpr_free(c); } } +static void connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *con) { + connector *c = (connector *)con; + gpr_mu_lock(&c->mu); + c->shutdown = true; + grpc_handshake_manager_shutdown(exec_ctx, c->handshake_mgr); + // If handshaking is not yet in progress, shutdown the endpoint. + // Otherwise, the handshaker will do this for us. + if (c->endpoint != NULL) grpc_endpoint_shutdown(exec_ctx, c->endpoint); + gpr_mu_unlock(&c->mu); +} + static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_handshaker_args *args = arg; connector *c = args->user_data; gpr_mu_lock(&c->mu); - if (error != GRPC_ERROR_NONE) { - c->connecting_endpoint = NULL; - gpr_mu_unlock(&c->mu); + if (error != GRPC_ERROR_NONE || c->shutdown) { + if (error == GRPC_ERROR_NONE) { + error = GRPC_ERROR_CREATE("connector shutdown"); + // We were shut down after handshaking completed successfully, so + // shutdown the endpoint here. + grpc_endpoint_shutdown(exec_ctx, args->endpoint); + } else { + error = GRPC_ERROR_REF(error); + } + memset(c->result, 0, sizeof(*c->result)); grpc_endpoint_destroy(exec_ctx, args->endpoint); grpc_channel_args_destroy(args->args); gpr_free(args->read_buffer); } else { - if (c->connecting_endpoint == NULL) { - memset(c->result, 0, sizeof(*c->result)); - gpr_mu_unlock(&c->mu); - } else { - c->connecting_endpoint = NULL; - gpr_mu_unlock(&c->mu); - c->result->transport = grpc_create_chttp2_transport( - exec_ctx, args->args, args->endpoint, 1); - grpc_chttp2_transport_start_reading(exec_ctx, c->result->transport, - args->read_buffer); - } + c->result->transport = + grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 1); + GPR_ASSERT(c->result->transport); + grpc_chttp2_transport_start_reading(exec_ctx, c->result->transport, + args->read_buffer); c->result->channel_args = args->args; } grpc_closure *notify = c->notify; c->notify = NULL; grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); + gpr_mu_unlock(&c->mu); + connector_unref(exec_ctx, (grpc_connector*)c); } static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { connector *c = arg; - grpc_handshake_manager_do_handshake( - exec_ctx, c->handshake_mgr, c->connecting_endpoint, c->args.channel_args, - c->args.deadline, NULL /* acceptor */, on_handshake_done, c); + gpr_mu_lock(&c->mu); + if (error != GRPC_ERROR_NONE || c->shutdown) { + if (error == GRPC_ERROR_NONE) { + error = GRPC_ERROR_CREATE("connector shutdown"); + } else { + error = GRPC_ERROR_REF(error); + } + memset(c->result, 0, sizeof(*c->result)); + grpc_closure *notify = c->notify; + c->notify = NULL; + grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); + gpr_mu_unlock(&c->mu); + connector_unref(exec_ctx, arg); + } else { + grpc_handshake_manager_do_handshake( + exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args, + c->args.deadline, NULL /* acceptor */, on_handshake_done, c); + c->endpoint = NULL; // Endpoint handed off to handshake manager. + gpr_mu_unlock(&c->mu); + } } static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { connector *c = arg; - grpc_endpoint *tcp = c->newly_connecting_endpoint; - if (tcp != NULL) { - gpr_mu_lock(&c->mu); - GPR_ASSERT(c->connecting_endpoint == NULL); - c->connecting_endpoint = tcp; + gpr_mu_lock(&c->mu); + if (error != GRPC_ERROR_NONE || c->shutdown) { + if (error == GRPC_ERROR_NONE) { + error = GRPC_ERROR_CREATE("connector shutdown"); + } else { + error = GRPC_ERROR_REF(error); + } + memset(c->result, 0, sizeof(*c->result)); + grpc_closure *notify = c->notify; + c->notify = NULL; + grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); gpr_mu_unlock(&c->mu); + connector_unref(exec_ctx, arg); + } else { + GPR_ASSERT(c->endpoint != NULL); if (!GRPC_SLICE_IS_EMPTY(c->args.initial_connect_string)) { grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, c); grpc_slice_buffer_init(&c->initial_string_buffer); grpc_slice_buffer_add(&c->initial_string_buffer, c->args.initial_connect_string); - grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, + grpc_endpoint_write(exec_ctx, c->endpoint, &c->initial_string_buffer, &c->initial_string_sent); } else { grpc_handshake_manager_do_handshake( - exec_ctx, c->handshake_mgr, tcp, c->args.channel_args, + exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args, c->args.deadline, NULL /* acceptor */, on_handshake_done, c); + c->endpoint = NULL; // Endpoint handed off to handshake manager. } - } else { - memset(c->result, 0, sizeof(*c->result)); - grpc_closure *notify = c->notify; - c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); - } -} - -static void connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *con) { - connector *c = (connector *)con; - grpc_endpoint *ep; - gpr_mu_lock(&c->mu); - ep = c->connecting_endpoint; - c->connecting_endpoint = NULL; - gpr_mu_unlock(&c->mu); - if (ep) { - grpc_endpoint_shutdown(exec_ctx, ep); + gpr_mu_unlock(&c->mu); } } @@ -177,17 +208,18 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, grpc_connect_out_args *result, grpc_closure *notify) { connector *c = (connector *)con; + gpr_mu_lock(&c->mu); GPR_ASSERT(c->notify == NULL); c->notify = notify; c->args = *args; c->result = result; - gpr_mu_lock(&c->mu); - GPR_ASSERT(c->connecting_endpoint == NULL); - gpr_mu_unlock(&c->mu); + GPR_ASSERT(c->endpoint == NULL); + connector_ref(con); // Ref taken for callback. grpc_closure_init(&c->connected_closure, connected, c); grpc_tcp_client_connect( - exec_ctx, &c->connected_closure, &c->newly_connecting_endpoint, - args->interested_parties, args->channel_args, args->addr, args->deadline); + exec_ctx, &c->connected_closure, &c->endpoint, args->interested_parties, + args->channel_args, args->addr, args->deadline); + gpr_mu_unlock(&c->mu); } static const grpc_connector_vtable connector_vtable = { diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index ec40951cbe..27dd0251d9 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -50,12 +50,16 @@ typedef struct { grpc_handshaker base; + // args will be NULL when either there is no handshake in progress or + // when the handshaker is shutting down. grpc_handshaker_args* args; grpc_closure* on_handshake_done; grpc_security_connector *connector; tsi_handshaker *handshaker; +// FIXME: add locking unsigned char *handshake_buffer; size_t handshake_buffer_size; +// FIXME: use args->endpoint instead grpc_endpoint *wrapped_endpoint; grpc_endpoint *secure_endpoint; grpc_slice_buffer left_overs; @@ -103,7 +107,7 @@ static void security_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint_shutdown(exec_ctx, h->secure_endpoint); // FIXME: clarify who should destroy... // grpc_endpoint_destroy(exec_ctx, h->secure_endpoint); - } else { +// } else { // grpc_endpoint_destroy(exec_ctx, h->wrapped_endpoint); } } @@ -144,7 +148,6 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data, h->left_overs.count = 0; h->left_overs.length = 0; security_handshake_done(exec_ctx, h, GRPC_ERROR_NONE); - return; } static void check_peer(grpc_exec_ctx *exec_ctx, security_handshaker *h) { @@ -299,7 +302,9 @@ static void security_handshaker_destroy(grpc_exec_ctx* exec_ctx, static void security_handshaker_shutdown(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker) { security_handshaker *h = (security_handshaker*)handshaker; - grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); + if (h->args != NULL) { + grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); + } } static void security_handshaker_do_handshake( -- cgit v1.2.3 From 3d7e49290457f08009d237a9a2cd56c5c2bb0456 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 17 Nov 2016 11:18:09 -0800 Subject: Add missing mutex clean-up. --- src/core/ext/transport/chttp2/client/insecure/channel_create.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index f63c77c8d6..ec2f7717d6 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -86,6 +86,7 @@ static void connector_unref(grpc_exec_ctx *exec_ctx, grpc_connector *con) { connector *c = (connector *)con; if (gpr_unref(&c->refs)) { /* c->initial_string_buffer does not need to be destroyed */ + gpr_mu_destroy(&c->mu); grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); // If handshaking is not yet in progress, destroy the endpoint. // Otherwise, the handshaker will do this for us. -- cgit v1.2.3 From f77a8ff47174943960d6d318ea3d9a8d6407953f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 17 Nov 2016 11:39:46 -0800 Subject: Code cleanup. --- .../chttp2/client/insecure/channel_create.c | 34 ++++++++------------ .../chttp2/client/secure/secure_channel_create.c | 36 +++++++++------------- 2 files changed, 28 insertions(+), 42 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index ec2f7717d6..33a1c49ede 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -45,9 +45,7 @@ #include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/channel/compress_filter.h" #include "src/core/lib/channel/handshaker.h" -#include "src/core/lib/channel/http_client_filter.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" @@ -70,7 +68,7 @@ typedef struct { grpc_closure initial_string_sent; grpc_slice_buffer initial_string_buffer; - grpc_endpoint *tcp; // Non-NULL until handshaking starts. + grpc_endpoint *endpoint; // Non-NULL until handshaking starts. grpc_closure connected; @@ -90,7 +88,7 @@ static void connector_unref(grpc_exec_ctx *exec_ctx, grpc_connector *con) { grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); // If handshaking is not yet in progress, destroy the endpoint. // Otherwise, the handshaker will do this for us. - if (c->tcp != NULL) grpc_endpoint_destroy(exec_ctx, c->tcp); + if (c->endpoint != NULL) grpc_endpoint_destroy(exec_ctx, c->endpoint); gpr_free(c); } } @@ -102,7 +100,7 @@ static void connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *con) { grpc_handshake_manager_shutdown(exec_ctx, c->handshake_mgr); // If handshaking is not yet in progress, shutdown the endpoint. // Otherwise, the handshaker will do this for us. - if (c->tcp != NULL) grpc_endpoint_shutdown(exec_ctx, c->tcp); + if (c->endpoint != NULL) grpc_endpoint_shutdown(exec_ctx, c->endpoint); gpr_mu_unlock(&c->mu); } @@ -157,9 +155,9 @@ static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, connector_unref(exec_ctx, arg); } else { grpc_handshake_manager_do_handshake( - exec_ctx, c->handshake_mgr, c->tcp, c->args.channel_args, + exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args, c->args.deadline, NULL /* acceptor */, on_handshake_done, c); - c->tcp = NULL; // Endpoint handed off to handshake manager. + c->endpoint = NULL; // Endpoint handed off to handshake manager. gpr_mu_unlock(&c->mu); } } @@ -180,20 +178,20 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_mu_unlock(&c->mu); connector_unref(exec_ctx, arg); } else { - GPR_ASSERT(c->tcp != NULL); + GPR_ASSERT(c->endpoint != NULL); if (!GRPC_SLICE_IS_EMPTY(c->args.initial_connect_string)) { grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, c); grpc_slice_buffer_init(&c->initial_string_buffer); grpc_slice_buffer_add(&c->initial_string_buffer, c->args.initial_connect_string); - grpc_endpoint_write(exec_ctx, c->tcp, &c->initial_string_buffer, + grpc_endpoint_write(exec_ctx, c->endpoint, &c->initial_string_buffer, &c->initial_string_sent); } else { grpc_handshake_manager_do_handshake( - exec_ctx, c->handshake_mgr, c->tcp, c->args.channel_args, + exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args, c->args.deadline, NULL /* acceptor */, on_handshake_done, c); - c->tcp = NULL; // Endpoint handed off to handshake manager. + c->endpoint = NULL; // Endpoint handed off to handshake manager. } gpr_mu_unlock(&c->mu); } @@ -206,14 +204,13 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, connector *c = (connector *)con; gpr_mu_lock(&c->mu); GPR_ASSERT(c->notify == NULL); - GPR_ASSERT(notify->cb); c->notify = notify; c->args = *args; c->result = result; - c->tcp = NULL; + GPR_ASSERT(c->endpoint == NULL); connector_ref(con); // Ref taken for callback. grpc_closure_init(&c->connected, connected, c); - grpc_tcp_client_connect(exec_ctx, &c->connected, &c->tcp, + grpc_tcp_client_connect(exec_ctx, &c->connected, &c->endpoint, args->interested_parties, args->channel_args, args->addr, args->deadline); gpr_mu_unlock(&c->mu); @@ -260,16 +257,14 @@ static grpc_channel *client_channel_factory_create_channel( grpc_channel *channel = grpc_channel_create(exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); grpc_resolver *resolver = grpc_resolver_create(target, args); - if (!resolver) { + if (resolver == NULL) { GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, "client_channel_factory_create_channel"); return NULL; } - grpc_client_channel_finish_initialization( exec_ctx, grpc_channel_get_channel_stack(channel), resolver, cc_factory); GRPC_RESOLVER_UNREF(exec_ctx, resolver, "create_channel"); - return channel; } @@ -292,16 +287,13 @@ grpc_channel *grpc_insecure_channel_create(const char *target, GRPC_API_TRACE( "grpc_insecure_channel_create(target=%p, args=%p, reserved=%p)", 3, (target, args, reserved)); - GPR_ASSERT(!reserved); - + GPR_ASSERT(reserved == NULL); grpc_client_channel_factory *factory = (grpc_client_channel_factory *)&client_channel_factory; grpc_channel *channel = client_channel_factory_create_channel( &exec_ctx, factory, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, args); - grpc_client_channel_factory_unref(&exec_ctx, factory); grpc_exec_ctx_finish(&exec_ctx); - return channel != NULL ? channel : grpc_lame_client_channel_create( target, GRPC_STATUS_INTERNAL, "Failed to create client channel"); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index d8b5a199f7..df88eb6015 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -47,12 +47,10 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/handshaker.h" #include "src/core/lib/iomgr/tcp_client.h" -#include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/security/transport/auth_filters.h" +#include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" -#include "src/core/lib/tsi/transport_security_interface.h" // // connector @@ -66,8 +64,6 @@ typedef struct { bool shutdown; - grpc_channel_security_connector *security_connector; - grpc_closure *notify; grpc_connect_in_args args; grpc_connect_out_args *result; @@ -76,7 +72,7 @@ typedef struct { grpc_endpoint *endpoint; // Non-NULL until handshaking starts. - grpc_closure connected_closure; + grpc_closure connected; grpc_handshake_manager *handshake_mgr; } connector; @@ -138,7 +134,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, } grpc_closure *notify = c->notify; c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); + grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); gpr_mu_unlock(&c->mu); connector_unref(exec_ctx, (grpc_connector*)c); } @@ -215,10 +211,10 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, c->result = result; GPR_ASSERT(c->endpoint == NULL); connector_ref(con); // Ref taken for callback. - grpc_closure_init(&c->connected_closure, connected, c); - grpc_tcp_client_connect( - exec_ctx, &c->connected_closure, &c->endpoint, args->interested_parties, - args->channel_args, args->addr, args->deadline); + grpc_closure_init(&c->connected, connected, c); + grpc_tcp_client_connect(exec_ctx, &c->connected, &c->endpoint, + args->interested_parties, args->channel_args, + args->addr, args->deadline); gpr_mu_unlock(&c->mu); } @@ -258,7 +254,8 @@ static grpc_subchannel *client_channel_factory_create_subchannel( connector *c = gpr_malloc(sizeof(*c)); memset(c, 0, sizeof(*c)); c->base.vtable = &connector_vtable; - c->security_connector = f->security_connector; + gpr_mu_init(&c->mu); + gpr_ref_init(&c->refs, 1); c->handshake_mgr = grpc_handshake_manager_create(); char *proxy_name = grpc_get_http_proxy_server(); if (proxy_name != NULL) { @@ -268,9 +265,7 @@ static grpc_subchannel *client_channel_factory_create_subchannel( gpr_free(proxy_name); } grpc_channel_security_connector_create_handshakers( - exec_ctx, c->security_connector, c->handshake_mgr); - gpr_mu_init(&c->mu); - gpr_ref_init(&c->refs, 1); + exec_ctx, f->security_connector, c->handshake_mgr); grpc_subchannel *s = grpc_subchannel_create(exec_ctx, &c->base, args); grpc_connector_unref(exec_ctx, &c->base); return s; @@ -284,15 +279,14 @@ static grpc_channel *client_channel_factory_create_channel( grpc_channel *channel = grpc_channel_create(exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); grpc_resolver *resolver = grpc_resolver_create(target, args); - if (resolver != NULL) { - grpc_client_channel_finish_initialization( - exec_ctx, grpc_channel_get_channel_stack(channel), resolver, &f->base); - GRPC_RESOLVER_UNREF(exec_ctx, resolver, "create"); - } else { + if (resolver == NULL) { GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, "client_channel_factory_create_channel"); - channel = NULL; + return NULL; } + grpc_client_channel_finish_initialization( + exec_ctx, grpc_channel_get_channel_stack(channel), resolver, &f->base); + GRPC_RESOLVER_UNREF(exec_ctx, resolver, "create_channel"); return channel; } -- cgit v1.2.3 From 8686cab11c5c19747f36b24444b39581c232be75 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 17 Nov 2016 13:12:17 -0800 Subject: Use the same connector code for both secure and insecure clients. --- BUILD | 16 + CMakeLists.txt | 9 + Makefile | 33 +- binding.gyp | 3 + build.yaml | 10 + config.m4 | 2 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + .../ext/transport/chttp2/client/chttp2_connector.c | 239 ++ .../ext/transport/chttp2/client/chttp2_connector.h | 44 + .../chttp2/client/insecure/channel_create.c | 201 +- .../chttp2/client/secure/secure_channel_create.c | 203 +- .../chttp2/server/insecure/server_chttp2.c | 8 +- .../chttp2/server/secure/server_secure_chttp2.c | 8 +- src/python/grpcio/grpc_core_dependencies.py | 1 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 34 +- vsprojects/buildtests_c.sln | 3395 +------------------- vsprojects/grpc.sln | 501 --- vsprojects/grpc_csharp_ext.sln | 50 +- vsprojects/vcxproj/boringssl/boringssl.vcxproj | 863 ----- .../vcxproj/boringssl/boringssl.vcxproj.filters | 1376 -------- .../boringssl_test_util.vcxproj | 166 - .../boringssl_test_util.vcxproj.filters | 30 - .../gen_hpack_tables/gen_hpack_tables.vcxproj | 170 - .../gen_hpack_tables.vcxproj.filters | 21 - .../gen_legal_metadata_characters.vcxproj | 162 - .../gen_legal_metadata_characters.vcxproj.filters | 21 - .../gen_percent_encoding_tables.vcxproj | 162 - .../gen_percent_encoding_tables.vcxproj.filters | 21 - .../google_benchmark/google_benchmark.vcxproj | 208 -- .../google_benchmark.vcxproj.filters | 125 - vsprojects/vcxproj/gpr/gpr.vcxproj.filters | 322 -- .../gpr_test_util/gpr_test_util.vcxproj.filters | 26 - vsprojects/vcxproj/grpc++/grpc++.vcxproj | 450 --- vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 469 --- .../grpc++_proto_reflection_desc_db.vcxproj | 181 -- ...grpc++_proto_reflection_desc_db.vcxproj.filters | 61 - .../grpc++_reflection/grpc++_reflection.vcxproj | 183 -- .../grpc++_reflection.vcxproj.filters | 58 - vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj | 170 - .../grpc++_test/grpc++_test.vcxproj.filters | 35 - .../grpc++_test_config/grpc++_test_config.vcxproj | 165 - .../grpc++_test_config.vcxproj.filters | 26 - .../grpc++_test_util/grpc++_test_util.vcxproj | 265 -- .../grpc++_test_util.vcxproj.filters | 265 -- .../grpc++_unsecure/grpc++_unsecure.vcxproj | 439 --- .../grpc++_unsecure.vcxproj.filters | 442 --- vsprojects/vcxproj/grpc/grpc.vcxproj | 27 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 1447 --------- vsprojects/vcxproj/grpc/packages.config | 10 - .../vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj | 197 -- .../grpc_cli_libs/grpc_cli_libs.vcxproj.filters | 88 - .../grpc_cpp_plugin/grpc_cpp_plugin.vcxproj | 168 - .../grpc_cpp_plugin.vcxproj.filters | 18 - .../grpc_create_jwt/grpc_create_jwt.vcxproj | 170 - .../grpc_create_jwt.vcxproj.filters | 21 - .../grpc_csharp_ext/grpc_csharp_ext.vcxproj | 193 -- .../grpc_csharp_ext.vcxproj.filters | 21 - .../grpc_csharp_plugin/grpc_csharp_plugin.vcxproj | 168 - .../grpc_csharp_plugin.vcxproj.filters | 18 - vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj | 200 -- .../vcxproj/grpc_dll/grpc_dll.vcxproj.filters | 10 - .../grpc_node_plugin/grpc_node_plugin.vcxproj | 168 - .../grpc_node_plugin.vcxproj.filters | 18 - .../grpc_objective_c_plugin.vcxproj | 168 - .../grpc_objective_c_plugin.vcxproj.filters | 18 - .../grpc_php_plugin/grpc_php_plugin.vcxproj | 168 - .../grpc_php_plugin.vcxproj.filters | 18 - .../grpc_plugin_support.vcxproj | 197 -- .../grpc_plugin_support.vcxproj.filters | 106 - .../grpc_print_google_default_creds_token.vcxproj | 170 - ...rint_google_default_creds_token.vcxproj.filters | 21 - .../grpc_python_plugin/grpc_python_plugin.vcxproj | 168 - .../grpc_python_plugin.vcxproj.filters | 18 - .../grpc_ruby_plugin/grpc_ruby_plugin.vcxproj | 168 - .../grpc_ruby_plugin.vcxproj.filters | 18 - .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 577 ---- .../grpc_test_util/grpc_test_util.vcxproj.filters | 895 ------ .../grpc_test_util_unsecure.vcxproj | 219 -- .../grpc_test_util_unsecure.vcxproj.filters | 113 - .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 830 ----- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 1240 ------- .../grpc_verify_jwt/grpc_verify_jwt.vcxproj | 170 - .../grpc_verify_jwt.vcxproj.filters | 21 - .../interop_client_helper.vcxproj | 190 -- .../interop_client_helper.vcxproj.filters | 41 - .../interop_client_main.vcxproj | 217 -- .../interop_client_main.vcxproj.filters | 50 - .../interop_server_helper.vcxproj | 179 -- .../interop_server_helper.vcxproj.filters | 26 - .../interop_server_lib/interop_server_lib.vcxproj | 212 -- .../interop_server_lib.vcxproj.filters | 42 - .../interop_server_main.vcxproj | 167 - .../interop_server_main.vcxproj.filters | 21 - vsprojects/vcxproj/qps/qps.vcxproj | 247 -- vsprojects/vcxproj/qps/qps.vcxproj.filters | 119 - .../reconnect_server/reconnect_server.vcxproj | 182 -- .../reconnect_server.vcxproj.filters | 26 - .../test/alarm_cpp_test/alarm_cpp_test.vcxproj | 207 -- .../alarm_cpp_test/alarm_cpp_test.vcxproj.filters | 21 - .../vcxproj/test/alarm_test/alarm_test.vcxproj | 199 -- .../test/alarm_test/alarm_test.vcxproj.filters | 21 - .../test/algorithm_test/algorithm_test.vcxproj | 199 -- .../algorithm_test/algorithm_test.vcxproj.filters | 21 - .../vcxproj/test/alloc_test/alloc_test.vcxproj | 193 -- .../test/alloc_test/alloc_test.vcxproj.filters | 21 - .../vcxproj/test/alpn_test/alpn_test.vcxproj | 199 -- .../test/alpn_test/alpn_test.vcxproj.filters | 24 - .../async_end2end_test/async_end2end_test.vcxproj | 207 -- .../async_end2end_test.vcxproj.filters | 21 - .../auth_property_iterator_test.vcxproj | 207 -- .../auth_property_iterator_test.vcxproj.filters | 21 - .../bad_client_test/bad_client_test.vcxproj | 179 -- .../bad_client_test.vcxproj.filters | 26 - .../bad_server_response_test.vcxproj | 202 -- .../bad_server_response_test.vcxproj.filters | 21 - .../badreq_bad_client_test.vcxproj | 202 -- .../badreq_bad_client_test.vcxproj.filters | 24 - .../test/bin_decoder_test/bin_decoder_test.vcxproj | 193 -- .../bin_decoder_test.vcxproj.filters | 24 - .../test/bin_encoder_test/bin_encoder_test.vcxproj | 193 -- .../bin_encoder_test.vcxproj.filters | 24 - .../boringssl_aead_test.vcxproj | 198 -- .../boringssl_aead_test.vcxproj.filters | 7 - .../boringssl_aead_test_lib.vcxproj | 170 - .../boringssl_aead_test_lib.vcxproj.filters | 24 - .../boringssl_aes_test/boringssl_aes_test.vcxproj | 198 -- .../boringssl_aes_test.vcxproj.filters | 7 - .../boringssl_aes_test_lib.vcxproj | 170 - .../boringssl_aes_test_lib.vcxproj.filters | 24 - .../boringssl_asn1_test.vcxproj | 198 -- .../boringssl_asn1_test.vcxproj.filters | 7 - .../boringssl_asn1_test_lib.vcxproj | 170 - .../boringssl_asn1_test_lib.vcxproj.filters | 24 - .../boringssl_base64_test.vcxproj | 198 -- .../boringssl_base64_test.vcxproj.filters | 7 - .../boringssl_base64_test_lib.vcxproj | 170 - .../boringssl_base64_test_lib.vcxproj.filters | 24 - .../boringssl_bio_test/boringssl_bio_test.vcxproj | 198 -- .../boringssl_bio_test.vcxproj.filters | 7 - .../boringssl_bio_test_lib.vcxproj | 170 - .../boringssl_bio_test_lib.vcxproj.filters | 24 - .../boringssl_bn_test/boringssl_bn_test.vcxproj | 198 -- .../boringssl_bn_test.vcxproj.filters | 7 - .../boringssl_bn_test_lib.vcxproj | 170 - .../boringssl_bn_test_lib.vcxproj.filters | 24 - .../boringssl_bytestring_test.vcxproj | 198 -- .../boringssl_bytestring_test.vcxproj.filters | 7 - .../boringssl_bytestring_test_lib.vcxproj | 170 - .../boringssl_bytestring_test_lib.vcxproj.filters | 24 - .../boringssl_cipher_test.vcxproj | 198 -- .../boringssl_cipher_test.vcxproj.filters | 7 - .../boringssl_cipher_test_lib.vcxproj | 170 - .../boringssl_cipher_test_lib.vcxproj.filters | 24 - .../boringssl_cmac_test.vcxproj | 198 -- .../boringssl_cmac_test.vcxproj.filters | 7 - .../boringssl_cmac_test_lib.vcxproj | 170 - .../boringssl_cmac_test_lib.vcxproj.filters | 24 - .../boringssl_constant_time_test.vcxproj | 198 -- .../boringssl_constant_time_test.vcxproj.filters | 7 - .../boringssl_constant_time_test_lib.vcxproj | 170 - ...oringssl_constant_time_test_lib.vcxproj.filters | 21 - .../boringssl_dh_test/boringssl_dh_test.vcxproj | 198 -- .../boringssl_dh_test.vcxproj.filters | 7 - .../boringssl_dh_test_lib.vcxproj | 170 - .../boringssl_dh_test_lib.vcxproj.filters | 24 - .../boringssl_digest_test.vcxproj | 198 -- .../boringssl_digest_test.vcxproj.filters | 7 - .../boringssl_digest_test_lib.vcxproj | 170 - .../boringssl_digest_test_lib.vcxproj.filters | 24 - .../boringssl_dsa_test/boringssl_dsa_test.vcxproj | 198 -- .../boringssl_dsa_test.vcxproj.filters | 7 - .../boringssl_dsa_test_lib.vcxproj | 170 - .../boringssl_dsa_test_lib.vcxproj.filters | 24 - .../boringssl_ec_test/boringssl_ec_test.vcxproj | 198 -- .../boringssl_ec_test.vcxproj.filters | 7 - .../boringssl_ec_test_lib.vcxproj | 170 - .../boringssl_ec_test_lib.vcxproj.filters | 24 - .../boringssl_ecdsa_test.vcxproj | 198 -- .../boringssl_ecdsa_test.vcxproj.filters | 7 - .../boringssl_ecdsa_test_lib.vcxproj | 170 - .../boringssl_ecdsa_test_lib.vcxproj.filters | 24 - .../boringssl_ed25519_test.vcxproj | 198 -- .../boringssl_ed25519_test.vcxproj.filters | 7 - .../boringssl_ed25519_test_lib.vcxproj | 170 - .../boringssl_ed25519_test_lib.vcxproj.filters | 24 - .../boringssl_err_test/boringssl_err_test.vcxproj | 198 -- .../boringssl_err_test.vcxproj.filters | 7 - .../boringssl_err_test_lib.vcxproj | 170 - .../boringssl_err_test_lib.vcxproj.filters | 24 - .../boringssl_evp_extra_test.vcxproj | 198 -- .../boringssl_evp_extra_test.vcxproj.filters | 7 - .../boringssl_evp_extra_test_lib.vcxproj | 170 - .../boringssl_evp_extra_test_lib.vcxproj.filters | 24 - .../boringssl_evp_test/boringssl_evp_test.vcxproj | 198 -- .../boringssl_evp_test.vcxproj.filters | 7 - .../boringssl_evp_test_lib.vcxproj | 170 - .../boringssl_evp_test_lib.vcxproj.filters | 24 - .../boringssl_example_mul.vcxproj | 198 -- .../boringssl_example_mul.vcxproj.filters | 7 - .../boringssl_example_mul_lib.vcxproj | 170 - .../boringssl_example_mul_lib.vcxproj.filters | 24 - .../boringssl_gcm_test/boringssl_gcm_test.vcxproj | 198 -- .../boringssl_gcm_test.vcxproj.filters | 7 - .../boringssl_gcm_test_lib.vcxproj | 170 - .../boringssl_gcm_test_lib.vcxproj.filters | 24 - .../boringssl_hkdf_test.vcxproj | 198 -- .../boringssl_hkdf_test.vcxproj.filters | 7 - .../boringssl_hkdf_test_lib.vcxproj | 170 - .../boringssl_hkdf_test_lib.vcxproj.filters | 24 - .../boringssl_hmac_test.vcxproj | 198 -- .../boringssl_hmac_test.vcxproj.filters | 7 - .../boringssl_hmac_test_lib.vcxproj | 170 - .../boringssl_hmac_test_lib.vcxproj.filters | 24 - .../boringssl_lhash_test.vcxproj | 198 -- .../boringssl_lhash_test.vcxproj.filters | 7 - .../boringssl_lhash_test_lib.vcxproj | 170 - .../boringssl_lhash_test_lib.vcxproj.filters | 24 - .../boringssl_pbkdf_test.vcxproj | 198 -- .../boringssl_pbkdf_test.vcxproj.filters | 7 - .../boringssl_pbkdf_test_lib.vcxproj | 170 - .../boringssl_pbkdf_test_lib.vcxproj.filters | 24 - .../boringssl_pkcs12_test.vcxproj | 198 -- .../boringssl_pkcs12_test.vcxproj.filters | 7 - .../boringssl_pkcs12_test_lib.vcxproj | 170 - .../boringssl_pkcs12_test_lib.vcxproj.filters | 24 - .../boringssl_pkcs7_test.vcxproj | 198 -- .../boringssl_pkcs7_test.vcxproj.filters | 7 - .../boringssl_pkcs7_test_lib.vcxproj | 170 - .../boringssl_pkcs7_test_lib.vcxproj.filters | 24 - .../boringssl_pkcs8_test.vcxproj | 198 -- .../boringssl_pkcs8_test.vcxproj.filters | 7 - .../boringssl_pkcs8_test_lib.vcxproj | 170 - .../boringssl_pkcs8_test_lib.vcxproj.filters | 24 - .../boringssl_poly1305_test.vcxproj | 198 -- .../boringssl_poly1305_test.vcxproj.filters | 7 - .../boringssl_poly1305_test_lib.vcxproj | 170 - .../boringssl_poly1305_test_lib.vcxproj.filters | 24 - .../boringssl_pqueue_test.vcxproj | 198 -- .../boringssl_pqueue_test.vcxproj.filters | 7 - .../boringssl_pqueue_test_lib.vcxproj | 170 - .../boringssl_pqueue_test_lib.vcxproj.filters | 24 - .../boringssl_refcount_test.vcxproj | 198 -- .../boringssl_refcount_test.vcxproj.filters | 7 - .../boringssl_refcount_test_lib.vcxproj | 170 - .../boringssl_refcount_test_lib.vcxproj.filters | 21 - .../boringssl_rsa_test/boringssl_rsa_test.vcxproj | 198 -- .../boringssl_rsa_test.vcxproj.filters | 7 - .../boringssl_rsa_test_lib.vcxproj | 170 - .../boringssl_rsa_test_lib.vcxproj.filters | 24 - .../boringssl_ssl_test/boringssl_ssl_test.vcxproj | 198 -- .../boringssl_ssl_test.vcxproj.filters | 7 - .../boringssl_ssl_test_lib.vcxproj | 170 - .../boringssl_ssl_test_lib.vcxproj.filters | 21 - .../boringssl_tab_test/boringssl_tab_test.vcxproj | 198 -- .../boringssl_tab_test.vcxproj.filters | 7 - .../boringssl_tab_test_lib.vcxproj | 170 - .../boringssl_tab_test_lib.vcxproj.filters | 24 - .../boringssl_thread_test.vcxproj | 198 -- .../boringssl_thread_test.vcxproj.filters | 7 - .../boringssl_thread_test_lib.vcxproj | 170 - .../boringssl_thread_test_lib.vcxproj.filters | 21 - .../boringssl_v3name_test.vcxproj | 198 -- .../boringssl_v3name_test.vcxproj.filters | 7 - .../boringssl_v3name_test_lib.vcxproj | 170 - .../boringssl_v3name_test_lib.vcxproj.filters | 24 - .../boringssl_x25519_test.vcxproj | 198 -- .../boringssl_x25519_test.vcxproj.filters | 7 - .../boringssl_x25519_test_lib.vcxproj | 170 - .../boringssl_x25519_test_lib.vcxproj.filters | 24 - .../boringssl_x509_test.vcxproj | 198 -- .../boringssl_x509_test.vcxproj.filters | 7 - .../boringssl_x509_test_lib.vcxproj | 170 - .../boringssl_x509_test_lib.vcxproj.filters | 24 - .../census_context_test.vcxproj | 199 -- .../census_context_test.vcxproj.filters | 21 - .../census_resource_test.vcxproj | 199 -- .../census_resource_test.vcxproj.filters | 21 - .../census_trace_context_test.vcxproj | 199 -- .../census_trace_context_test.vcxproj.filters | 21 - .../channel_arguments_test.vcxproj | 198 -- .../channel_arguments_test.vcxproj.filters | 21 - .../channel_create_test.vcxproj | 199 -- .../channel_create_test.vcxproj.filters | 21 - .../channel_filter_test.vcxproj | 198 -- .../channel_filter_test.vcxproj.filters | 21 - .../chttp2_hpack_encoder_test.vcxproj | 199 -- .../chttp2_hpack_encoder_test.vcxproj.filters | 24 - .../chttp2_status_conversion_test.vcxproj | 199 -- .../chttp2_status_conversion_test.vcxproj.filters | 24 - .../chttp2_stream_map_test.vcxproj | 199 -- .../chttp2_stream_map_test.vcxproj.filters | 24 - .../chttp2_varint_test/chttp2_varint_test.vcxproj | 199 -- .../chttp2_varint_test.vcxproj.filters | 24 - .../test/cli_call_test/cli_call_test.vcxproj | 210 -- .../cli_call_test/cli_call_test.vcxproj.filters | 21 - .../client_crash_test_server.vcxproj | 207 -- .../client_crash_test_server.vcxproj.filters | 21 - .../codegen_test_full/codegen_test_full.vcxproj | 285 -- .../codegen_test_full.vcxproj.filters | 209 -- .../codegen_test_minimal.vcxproj | 276 -- .../codegen_test_minimal.vcxproj.filters | 218 -- .../test/combiner_test/combiner_test.vcxproj | 199 -- .../combiner_test/combiner_test.vcxproj.filters | 21 - .../test/compression_test/compression_test.vcxproj | 199 -- .../compression_test.vcxproj.filters | 21 - .../concurrent_connectivity_test.vcxproj | 199 -- .../concurrent_connectivity_test.vcxproj.filters | 21 - .../connection_prefix_bad_client_test.vcxproj | 202 -- ...nnection_prefix_bad_client_test.vcxproj.filters | 24 - .../connection_refused_test.vcxproj | 199 -- .../connection_refused_test.vcxproj.filters | 21 - .../test/credentials_test/credentials_test.vcxproj | 198 -- .../credentials_test.vcxproj.filters | 21 - .../cxx_byte_buffer_test.vcxproj | 204 -- .../cxx_byte_buffer_test.vcxproj.filters | 21 - .../test/cxx_slice_test/cxx_slice_test.vcxproj | 204 -- .../cxx_slice_test/cxx_slice_test.vcxproj.filters | 21 - .../cxx_string_ref_test.vcxproj | 192 -- .../cxx_string_ref_test.vcxproj.filters | 21 - .../test/cxx_time_test/cxx_time_test.vcxproj | 204 -- .../cxx_time_test/cxx_time_test.vcxproj.filters | 21 - .../dns_resolver_connectivity_test.vcxproj | 199 -- .../dns_resolver_connectivity_test.vcxproj.filters | 24 - .../dns_resolver_test/dns_resolver_test.vcxproj | 199 -- .../dns_resolver_test.vcxproj.filters | 24 - .../h2_census_nosec_test.vcxproj | 191 -- .../h2_census_nosec_test.vcxproj.filters | 24 - .../fixtures/h2_census_test/h2_census_test.vcxproj | 202 -- .../h2_census_test/h2_census_test.vcxproj.filters | 24 - .../h2_compress_nosec_test.vcxproj | 191 -- .../h2_compress_nosec_test.vcxproj.filters | 24 - .../h2_compress_test/h2_compress_test.vcxproj | 202 -- .../h2_compress_test.vcxproj.filters | 24 - .../h2_fakesec_test/h2_fakesec_test.vcxproj | 202 -- .../h2_fakesec_test.vcxproj.filters | 24 - .../h2_full+trace_nosec_test.vcxproj | 191 -- .../h2_full+trace_nosec_test.vcxproj.filters | 24 - .../h2_full+trace_test/h2_full+trace_test.vcxproj | 202 -- .../h2_full+trace_test.vcxproj.filters | 24 - .../h2_full_nosec_test/h2_full_nosec_test.vcxproj | 191 -- .../h2_full_nosec_test.vcxproj.filters | 24 - .../fixtures/h2_full_test/h2_full_test.vcxproj | 202 -- .../h2_full_test/h2_full_test.vcxproj.filters | 24 - .../h2_http_proxy_nosec_test.vcxproj | 191 -- .../h2_http_proxy_nosec_test.vcxproj.filters | 24 - .../h2_http_proxy_test/h2_http_proxy_test.vcxproj | 202 -- .../h2_http_proxy_test.vcxproj.filters | 24 - .../h2_load_reporting_nosec_test.vcxproj | 191 -- .../h2_load_reporting_nosec_test.vcxproj.filters | 24 - .../h2_load_reporting_test.vcxproj | 202 -- .../h2_load_reporting_test.vcxproj.filters | 24 - .../fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj | 202 -- .../h2_oauth2_test/h2_oauth2_test.vcxproj.filters | 24 - .../h2_proxy_nosec_test.vcxproj | 191 -- .../h2_proxy_nosec_test.vcxproj.filters | 24 - .../fixtures/h2_proxy_test/h2_proxy_test.vcxproj | 202 -- .../h2_proxy_test/h2_proxy_test.vcxproj.filters | 24 - .../h2_sockpair+trace_nosec_test.vcxproj | 191 -- .../h2_sockpair+trace_nosec_test.vcxproj.filters | 24 - .../h2_sockpair+trace_test.vcxproj | 202 -- .../h2_sockpair+trace_test.vcxproj.filters | 24 - .../h2_sockpair_1byte_nosec_test.vcxproj | 191 -- .../h2_sockpair_1byte_nosec_test.vcxproj.filters | 24 - .../h2_sockpair_1byte_test.vcxproj | 202 -- .../h2_sockpair_1byte_test.vcxproj.filters | 24 - .../h2_sockpair_nosec_test.vcxproj | 191 -- .../h2_sockpair_nosec_test.vcxproj.filters | 24 - .../h2_sockpair_test/h2_sockpair_test.vcxproj | 202 -- .../h2_sockpair_test.vcxproj.filters | 24 - .../h2_ssl_cert_test/h2_ssl_cert_test.vcxproj | 202 -- .../h2_ssl_cert_test.vcxproj.filters | 24 - .../h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj | 202 -- .../h2_ssl_proxy_test.vcxproj.filters | 24 - .../fixtures/h2_ssl_test/h2_ssl_test.vcxproj | 202 -- .../h2_ssl_test/h2_ssl_test.vcxproj.filters | 24 - .../end2end_nosec_tests.vcxproj | 274 -- .../end2end_nosec_tests.vcxproj.filters | 173 - .../tests/end2end_tests/end2end_tests.vcxproj | 276 -- .../end2end_tests/end2end_tests.vcxproj.filters | 176 - .../vcxproj/test/end2end_test/end2end_test.vcxproj | 207 -- .../test/end2end_test/end2end_test.vcxproj.filters | 21 - .../endpoint_pair_test/endpoint_pair_test.vcxproj | 199 -- .../endpoint_pair_test.vcxproj.filters | 21 - .../filter_end2end_test.vcxproj | 207 -- .../filter_end2end_test.vcxproj.filters | 21 - .../vcxproj/test/fling_client/fling_client.vcxproj | 199 -- .../test/fling_client/fling_client.vcxproj.filters | 21 - .../vcxproj/test/fling_server/fling_server.vcxproj | 199 -- .../test/fling_server/fling_server.vcxproj.filters | 21 - .../generic_end2end_test.vcxproj | 207 -- .../generic_end2end_test.vcxproj.filters | 21 - .../test/golden_file_test/golden_file_test.vcxproj | 206 -- .../golden_file_test.vcxproj.filters | 36 - .../vcxproj/test/gpr_avl_test/gpr_avl_test.vcxproj | 193 -- .../test/gpr_avl_test/gpr_avl_test.vcxproj.filters | 21 - .../test/gpr_backoff_test/gpr_backoff_test.vcxproj | 193 -- .../gpr_backoff_test.vcxproj.filters | 21 - .../test/gpr_cmdline_test/gpr_cmdline_test.vcxproj | 193 -- .../gpr_cmdline_test.vcxproj.filters | 21 - .../vcxproj/test/gpr_cpu_test/gpr_cpu_test.vcxproj | 193 -- .../test/gpr_cpu_test/gpr_cpu_test.vcxproj.filters | 21 - .../vcxproj/test/gpr_env_test/gpr_env_test.vcxproj | 193 -- .../test/gpr_env_test/gpr_env_test.vcxproj.filters | 21 - .../gpr_histogram_test/gpr_histogram_test.vcxproj | 193 -- .../gpr_histogram_test.vcxproj.filters | 21 - .../gpr_host_port_test/gpr_host_port_test.vcxproj | 193 -- .../gpr_host_port_test.vcxproj.filters | 21 - .../vcxproj/test/gpr_log_test/gpr_log_test.vcxproj | 193 -- .../test/gpr_log_test/gpr_log_test.vcxproj.filters | 21 - .../test/gpr_mpscq_test/gpr_mpscq_test.vcxproj | 193 -- .../gpr_mpscq_test/gpr_mpscq_test.vcxproj.filters | 21 - .../gpr_stack_lockfree_test.vcxproj | 193 -- .../gpr_stack_lockfree_test.vcxproj.filters | 21 - .../test/gpr_string_test/gpr_string_test.vcxproj | 193 -- .../gpr_string_test.vcxproj.filters | 21 - .../test/gpr_sync_test/gpr_sync_test.vcxproj | 193 -- .../gpr_sync_test/gpr_sync_test.vcxproj.filters | 21 - .../vcxproj/test/gpr_thd_test/gpr_thd_test.vcxproj | 193 -- .../test/gpr_thd_test/gpr_thd_test.vcxproj.filters | 21 - .../test/gpr_time_test/gpr_time_test.vcxproj | 193 -- .../gpr_time_test/gpr_time_test.vcxproj.filters | 21 - .../vcxproj/test/gpr_tls_test/gpr_tls_test.vcxproj | 193 -- .../test/gpr_tls_test/gpr_tls_test.vcxproj.filters | 21 - .../test/gpr_useful_test/gpr_useful_test.vcxproj | 193 -- .../gpr_useful_test.vcxproj.filters | 21 - .../grpc_auth_context_test.vcxproj | 199 -- .../grpc_auth_context_test.vcxproj.filters | 21 - .../test/grpc_b64_test/grpc_b64_test.vcxproj | 199 -- .../grpc_b64_test/grpc_b64_test.vcxproj.filters | 21 - .../grpc_byte_buffer_reader_test.vcxproj | 199 -- .../grpc_byte_buffer_reader_test.vcxproj.filters | 21 - .../grpc_channel_args_test.vcxproj | 199 -- .../grpc_channel_args_test.vcxproj.filters | 21 - .../grpc_channel_stack_test.vcxproj | 199 -- .../grpc_channel_stack_test.vcxproj.filters | 21 - vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj | 207 -- .../vcxproj/test/grpc_cli/grpc_cli.vcxproj.filters | 21 - .../grpc_completion_queue_test.vcxproj | 199 -- .../grpc_completion_queue_test.vcxproj.filters | 21 - .../grpc_credentials_test.vcxproj | 199 -- .../grpc_credentials_test.vcxproj.filters | 21 - .../grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj | 199 -- .../grpc_fetch_oauth2.vcxproj.filters | 21 - .../grpc_invalid_channel_args_test.vcxproj | 199 -- .../grpc_invalid_channel_args_test.vcxproj.filters | 21 - .../grpc_jwt_verifier_test.vcxproj | 199 -- .../grpc_jwt_verifier_test.vcxproj.filters | 21 - .../grpc_security_connector_test.vcxproj | 199 -- .../grpc_security_connector_test.vcxproj.filters | 21 - .../test/grpc_tool_test/grpc_tool_test.vcxproj | 281 -- .../grpc_tool_test/grpc_tool_test.vcxproj.filters | 206 -- .../test/grpclb_api_test/grpclb_api_test.vcxproj | 209 -- .../grpclb_api_test.vcxproj.filters | 39 - .../vcxproj/test/grpclb_test/grpclb_test.vcxproj | 215 -- .../test/grpclb_test/grpclb_test.vcxproj.filters | 39 - .../head_of_line_blocking_bad_client_test.vcxproj | 202 -- ...f_line_blocking_bad_client_test.vcxproj.filters | 24 - .../headers_bad_client_test.vcxproj | 202 -- .../headers_bad_client_test.vcxproj.filters | 24 - .../hpack_parser_test/hpack_parser_test.vcxproj | 199 -- .../hpack_parser_test.vcxproj.filters | 24 - .../test/hpack_table_test/hpack_table_test.vcxproj | 199 -- .../hpack_table_test.vcxproj.filters | 24 - .../test/http_parser_test/http_parser_test.vcxproj | 199 -- .../http_parser_test.vcxproj.filters | 21 - .../httpcli_format_request_test.vcxproj | 199 -- .../httpcli_format_request_test.vcxproj.filters | 21 - .../hybrid_end2end_test.vcxproj | 207 -- .../hybrid_end2end_test.vcxproj.filters | 21 - .../vcxproj/test/init_test/init_test.vcxproj | 199 -- .../test/init_test/init_test.vcxproj.filters | 21 - .../initial_settings_frame_bad_client_test.vcxproj | 202 -- ..._settings_frame_bad_client_test.vcxproj.filters | 24 - .../internal_api_canary_iomgr_test.vcxproj | 199 -- .../internal_api_canary_iomgr_test.vcxproj.filters | 21 - .../internal_api_canary_support_test.vcxproj | 199 -- ...nternal_api_canary_support_test.vcxproj.filters | 21 - .../internal_api_canary_transport_test.vcxproj | 199 -- ...ernal_api_canary_transport_test.vcxproj.filters | 21 - .../invalid_call_argument_test.vcxproj | 199 -- .../invalid_call_argument_test.vcxproj.filters | 21 - .../vcxproj/test/json_rewrite/json_rewrite.vcxproj | 193 -- .../test/json_rewrite/json_rewrite.vcxproj.filters | 21 - .../json_rewrite_test/json_rewrite_test.vcxproj | 199 -- .../json_rewrite_test.vcxproj.filters | 21 - .../json_run_localhost/json_run_localhost.vcxproj | 210 -- .../json_run_localhost.vcxproj.filters | 21 - .../json_stream_error_test.vcxproj | 199 -- .../json_stream_error_test.vcxproj.filters | 21 - .../vcxproj/test/json_test/json_test.vcxproj | 199 -- .../test/json_test/json_test.vcxproj.filters | 21 - .../test/lame_client_test/lame_client_test.vcxproj | 199 -- .../lame_client_test.vcxproj.filters | 21 - .../large_metadata_bad_client_test.vcxproj | 202 -- .../large_metadata_bad_client_test.vcxproj.filters | 24 - .../test/lb_policies_test/lb_policies_test.vcxproj | 199 -- .../lb_policies_test.vcxproj.filters | 21 - .../test/load_file_test/load_file_test.vcxproj | 199 -- .../load_file_test/load_file_test.vcxproj.filters | 21 - .../message_compress_test.vcxproj | 199 -- .../message_compress_test.vcxproj.filters | 21 - .../test/metrics_client/metrics_client.vcxproj | 212 -- .../metrics_client/metrics_client.vcxproj.filters | 44 - .../vcxproj/test/mlog_test/mlog_test.vcxproj | 199 -- .../test/mlog_test/mlog_test.vcxproj.filters | 21 - .../vcxproj/test/mock_test/mock_test.vcxproj | 207 -- .../test/mock_test/mock_test.vcxproj.filters | 21 - .../multiple_server_queues_test.vcxproj | 199 -- .../multiple_server_queues_test.vcxproj.filters | 21 - .../test/murmur_hash_test/murmur_hash_test.vcxproj | 193 -- .../murmur_hash_test.vcxproj.filters | 21 - .../test/no_server_test/no_server_test.vcxproj | 199 -- .../no_server_test/no_server_test.vcxproj.filters | 21 - .../test/noop-benchmark/noop-benchmark.vcxproj | 192 -- .../noop-benchmark/noop-benchmark.vcxproj.filters | 21 - .../percent_encoding_test.vcxproj | 199 -- .../percent_encoding_test.vcxproj.filters | 21 - .../proto_server_reflection_test.vcxproj | 213 -- .../proto_server_reflection_test.vcxproj.filters | 21 - .../public_headers_must_be_c89.vcxproj | 193 -- .../public_headers_must_be_c89.vcxproj.filters | 21 - .../test/qps_json_driver/qps_json_driver.vcxproj | 213 -- .../qps_json_driver.vcxproj.filters | 21 - .../vcxproj/test/qps_worker/qps_worker.vcxproj | 217 -- .../test/qps_worker/qps_worker.vcxproj.filters | 29 - .../reconnect_interop_client.vcxproj | 234 -- .../reconnect_interop_client.vcxproj.filters | 42 - .../reconnect_interop_server.vcxproj | 240 -- .../reconnect_interop_server.vcxproj.filters | 42 - .../resolve_address_test.vcxproj | 199 -- .../resolve_address_test.vcxproj.filters | 21 - .../resource_quota_test.vcxproj | 199 -- .../resource_quota_test.vcxproj.filters | 21 - .../round_robin_end2end_test.vcxproj | 207 -- .../round_robin_end2end_test.vcxproj.filters | 21 - .../secure_auth_context_test.vcxproj | 207 -- .../secure_auth_context_test.vcxproj.filters | 21 - .../secure_channel_create_test.vcxproj | 199 -- .../secure_channel_create_test.vcxproj.filters | 21 - .../secure_endpoint_test.vcxproj | 199 -- .../secure_endpoint_test.vcxproj.filters | 21 - .../sequential_connectivity_test.vcxproj | 199 -- .../sequential_connectivity_test.vcxproj.filters | 21 - .../server_builder_plugin_test.vcxproj | 207 -- .../server_builder_plugin_test.vcxproj.filters | 21 - .../server_chttp2_test/server_chttp2_test.vcxproj | 199 -- .../server_chttp2_test.vcxproj.filters | 21 - .../server_context_test_spouse_test.vcxproj | 207 -- ...server_context_test_spouse_test.vcxproj.filters | 21 - .../server_crash_test_client.vcxproj | 207 -- .../server_crash_test_client.vcxproj.filters | 21 - ...erver_registered_method_bad_client_test.vcxproj | 202 -- ...gistered_method_bad_client_test.vcxproj.filters | 24 - .../vcxproj/test/server_test/server_test.vcxproj | 199 -- .../test/server_test/server_test.vcxproj.filters | 21 - .../set_initial_connect_string_test.vcxproj | 202 -- ...set_initial_connect_string_test.vcxproj.filters | 21 - .../test/shutdown_test/shutdown_test.vcxproj | 207 -- .../shutdown_test/shutdown_test.vcxproj.filters | 21 - .../simple_request_bad_client_test.vcxproj | 202 -- .../simple_request_bad_client_test.vcxproj.filters | 24 - .../slice_buffer_test/slice_buffer_test.vcxproj | 199 -- .../slice_buffer_test.vcxproj.filters | 21 - .../slice_string_helpers_test.vcxproj | 199 -- .../slice_string_helpers_test.vcxproj.filters | 21 - .../vcxproj/test/slice_test/slice_test.vcxproj | 199 -- .../test/slice_test/slice_test.vcxproj.filters | 21 - .../sockaddr_resolver_test.vcxproj | 199 -- .../sockaddr_resolver_test.vcxproj.filters | 24 - .../sockaddr_utils_test.vcxproj | 199 -- .../sockaddr_utils_test.vcxproj.filters | 21 - .../vcxproj/test/status_test/status_test.vcxproj | 204 -- .../test/status_test/status_test.vcxproj.filters | 21 - .../vcxproj/test/stress_test/stress_test.vcxproj | 256 -- .../test/stress_test/stress_test.vcxproj.filters | 74 - .../thread_manager_test.vcxproj | 201 -- .../thread_manager_test.vcxproj.filters | 21 - .../thread_stress_test/thread_stress_test.vcxproj | 207 -- .../thread_stress_test.vcxproj.filters | 21 - .../time_averaged_stats_test.vcxproj | 199 -- .../time_averaged_stats_test.vcxproj.filters | 21 - .../timeout_encoding_test.vcxproj | 199 -- .../timeout_encoding_test.vcxproj.filters | 21 - .../test/timer_heap_test/timer_heap_test.vcxproj | 199 -- .../timer_heap_test.vcxproj.filters | 21 - .../test/timer_list_test/timer_list_test.vcxproj | 199 -- .../timer_list_test.vcxproj.filters | 21 - .../transport_connectivity_state_test.vcxproj | 199 -- ...ansport_connectivity_state_test.vcxproj.filters | 21 - .../transport_metadata_test.vcxproj | 199 -- .../transport_metadata_test.vcxproj.filters | 21 - .../transport_pid_controller_test.vcxproj | 199 -- .../transport_pid_controller_test.vcxproj.filters | 21 - .../unknown_frame_bad_client_test.vcxproj | 202 -- .../unknown_frame_bad_client_test.vcxproj.filters | 24 - .../test/uri_parser_test/uri_parser_test.vcxproj | 199 -- .../uri_parser_test.vcxproj.filters | 21 - .../window_overflow_bad_client_test.vcxproj | 202 -- ...window_overflow_bad_client_test.vcxproj.filters | 24 - .../test_tcp_server/test_tcp_server.vcxproj | 179 -- .../test_tcp_server.vcxproj.filters | 26 - vsprojects/vcxproj/z/z.vcxproj | 203 -- vsprojects/vcxproj/z/z.vcxproj.filters | 95 - 606 files changed, 408 insertions(+), 77191 deletions(-) create mode 100644 src/core/ext/transport/chttp2/client/chttp2_connector.c create mode 100644 src/core/ext/transport/chttp2/client/chttp2_connector.h delete mode 100644 vsprojects/vcxproj/boringssl/boringssl.vcxproj delete mode 100644 vsprojects/vcxproj/boringssl/boringssl.vcxproj.filters delete mode 100644 vsprojects/vcxproj/boringssl_test_util/boringssl_test_util.vcxproj delete mode 100644 vsprojects/vcxproj/boringssl_test_util/boringssl_test_util.vcxproj.filters delete mode 100644 vsprojects/vcxproj/gen_hpack_tables/gen_hpack_tables.vcxproj delete mode 100644 vsprojects/vcxproj/gen_hpack_tables/gen_hpack_tables.vcxproj.filters delete mode 100644 vsprojects/vcxproj/gen_legal_metadata_characters/gen_legal_metadata_characters.vcxproj delete mode 100644 vsprojects/vcxproj/gen_legal_metadata_characters/gen_legal_metadata_characters.vcxproj.filters delete mode 100644 vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj delete mode 100644 vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj.filters delete mode 100644 vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj delete mode 100644 vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters delete mode 100644 vsprojects/vcxproj/gpr/gpr.vcxproj.filters delete mode 100644 vsprojects/vcxproj/gpr_test_util/gpr_test_util.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc++/grpc++.vcxproj delete mode 100644 vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj delete mode 100644 vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj delete mode 100644 vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj delete mode 100644 vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj delete mode 100644 vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj delete mode 100644 vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj delete mode 100644 vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc/grpc.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc/packages.config delete mode 100644 vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_csharp_ext/grpc_csharp_ext.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_csharp_ext/grpc_csharp_ext.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_node_plugin/grpc_node_plugin.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_node_plugin/grpc_node_plugin.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_php_plugin/grpc_php_plugin.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_php_plugin/grpc_php_plugin.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_python_plugin/grpc_python_plugin.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_python_plugin/grpc_python_plugin.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters delete mode 100644 vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj delete mode 100644 vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj.filters delete mode 100644 vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj delete mode 100644 vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj.filters delete mode 100644 vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj delete mode 100644 vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj.filters delete mode 100644 vsprojects/vcxproj/interop_server_helper/interop_server_helper.vcxproj delete mode 100644 vsprojects/vcxproj/interop_server_helper/interop_server_helper.vcxproj.filters delete mode 100644 vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj delete mode 100644 vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj delete mode 100644 vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters delete mode 100644 vsprojects/vcxproj/qps/qps.vcxproj delete mode 100644 vsprojects/vcxproj/qps/qps.vcxproj.filters delete mode 100644 vsprojects/vcxproj/reconnect_server/reconnect_server.vcxproj delete mode 100644 vsprojects/vcxproj/reconnect_server/reconnect_server.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/alarm_test/alarm_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/alarm_test/alarm_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/algorithm_test/algorithm_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/algorithm_test/algorithm_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/alloc_test/alloc_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/alloc_test/alloc_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/alpn_test/alpn_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/alpn_test/alpn_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/async_end2end_test/async_end2end_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/async_end2end_test/async_end2end_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/auth_property_iterator_test/auth_property_iterator_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/auth_property_iterator_test/auth_property_iterator_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/bad_client/bad_client_test/bad_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/bad_client/bad_client_test/bad_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/bin_decoder_test/bin_decoder_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/bin_decoder_test/bin_decoder_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/bin_encoder_test/bin_encoder_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/bin_encoder_test/bin_encoder_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_aead_test/boringssl_aead_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_aead_test/boringssl_aead_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_aead_test_lib/boringssl_aead_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_aead_test_lib/boringssl_aead_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_aes_test/boringssl_aes_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_aes_test/boringssl_aes_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_aes_test_lib/boringssl_aes_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_aes_test_lib/boringssl_aes_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_base64_test/boringssl_base64_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_base64_test/boringssl_base64_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_base64_test_lib/boringssl_base64_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_base64_test_lib/boringssl_base64_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bio_test/boringssl_bio_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bio_test/boringssl_bio_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bio_test_lib/boringssl_bio_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bio_test_lib/boringssl_bio_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bn_test/boringssl_bn_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bn_test/boringssl_bn_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bn_test_lib/boringssl_bn_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bn_test_lib/boringssl_bn_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test/boringssl_bytestring_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test/boringssl_bytestring_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test_lib/boringssl_bytestring_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test_lib/boringssl_bytestring_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_cipher_test/boringssl_cipher_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_cipher_test/boringssl_cipher_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_cipher_test_lib/boringssl_cipher_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_cipher_test_lib/boringssl_cipher_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_cmac_test/boringssl_cmac_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_cmac_test/boringssl_cmac_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_cmac_test_lib/boringssl_cmac_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_cmac_test_lib/boringssl_cmac_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test/boringssl_constant_time_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test/boringssl_constant_time_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test_lib/boringssl_constant_time_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test_lib/boringssl_constant_time_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_dh_test/boringssl_dh_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_dh_test/boringssl_dh_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_dh_test_lib/boringssl_dh_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_dh_test_lib/boringssl_dh_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_digest_test/boringssl_digest_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_digest_test/boringssl_digest_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_digest_test_lib/boringssl_digest_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_digest_test_lib/boringssl_digest_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_dsa_test/boringssl_dsa_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_dsa_test/boringssl_dsa_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_dsa_test_lib/boringssl_dsa_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_dsa_test_lib/boringssl_dsa_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ec_test/boringssl_ec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ec_test/boringssl_ec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ec_test_lib/boringssl_ec_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ec_test_lib/boringssl_ec_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test/boringssl_ecdsa_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test/boringssl_ecdsa_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test_lib/boringssl_ecdsa_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test_lib/boringssl_ecdsa_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test/boringssl_ed25519_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test/boringssl_ed25519_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test_lib/boringssl_ed25519_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test_lib/boringssl_ed25519_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_err_test/boringssl_err_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_err_test/boringssl_err_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_err_test_lib/boringssl_err_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_err_test_lib/boringssl_err_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test/boringssl_evp_extra_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test/boringssl_evp_extra_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test_lib/boringssl_evp_extra_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test_lib/boringssl_evp_extra_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_evp_test/boringssl_evp_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_evp_test/boringssl_evp_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_evp_test_lib/boringssl_evp_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_evp_test_lib/boringssl_evp_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_example_mul/boringssl_example_mul.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_example_mul/boringssl_example_mul.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_example_mul_lib/boringssl_example_mul_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_example_mul_lib/boringssl_example_mul_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_gcm_test/boringssl_gcm_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_gcm_test/boringssl_gcm_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_gcm_test_lib/boringssl_gcm_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_gcm_test_lib/boringssl_gcm_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test/boringssl_hkdf_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test/boringssl_hkdf_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test_lib/boringssl_hkdf_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test_lib/boringssl_hkdf_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_hmac_test/boringssl_hmac_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_hmac_test/boringssl_hmac_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_hmac_test_lib/boringssl_hmac_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_hmac_test_lib/boringssl_hmac_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_lhash_test/boringssl_lhash_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_lhash_test/boringssl_lhash_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_lhash_test_lib/boringssl_lhash_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_lhash_test_lib/boringssl_lhash_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test/boringssl_pbkdf_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test/boringssl_pbkdf_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test_lib/boringssl_pbkdf_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test_lib/boringssl_pbkdf_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test/boringssl_pkcs12_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test/boringssl_pkcs12_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test_lib/boringssl_pkcs12_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test_lib/boringssl_pkcs12_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test/boringssl_pkcs7_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test/boringssl_pkcs7_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test_lib/boringssl_pkcs7_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test_lib/boringssl_pkcs7_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test/boringssl_pkcs8_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test/boringssl_pkcs8_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test_lib/boringssl_pkcs8_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test_lib/boringssl_pkcs8_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test/boringssl_poly1305_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test/boringssl_poly1305_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test_lib/boringssl_poly1305_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test_lib/boringssl_poly1305_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test/boringssl_pqueue_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test/boringssl_pqueue_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test_lib/boringssl_pqueue_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test_lib/boringssl_pqueue_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_refcount_test/boringssl_refcount_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_refcount_test/boringssl_refcount_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_refcount_test_lib/boringssl_refcount_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_refcount_test_lib/boringssl_refcount_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_rsa_test/boringssl_rsa_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_rsa_test/boringssl_rsa_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_rsa_test_lib/boringssl_rsa_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_rsa_test_lib/boringssl_rsa_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ssl_test/boringssl_ssl_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ssl_test/boringssl_ssl_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ssl_test_lib/boringssl_ssl_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_ssl_test_lib/boringssl_ssl_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_tab_test/boringssl_tab_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_tab_test/boringssl_tab_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_tab_test_lib/boringssl_tab_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_tab_test_lib/boringssl_tab_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_thread_test/boringssl_thread_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_thread_test/boringssl_thread_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_thread_test_lib/boringssl_thread_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_thread_test_lib/boringssl_thread_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_v3name_test/boringssl_v3name_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_v3name_test/boringssl_v3name_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_v3name_test_lib/boringssl_v3name_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_v3name_test_lib/boringssl_v3name_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x25519_test/boringssl_x25519_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x25519_test/boringssl_x25519_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x25519_test_lib/boringssl_x25519_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x25519_test_lib/boringssl_x25519_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj delete mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/census_context_test/census_context_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/census_context_test/census_context_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/census_trace_context_test/census_trace_context_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/census_trace_context_test/census_trace_context_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/channel_arguments_test/channel_arguments_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/channel_arguments_test/channel_arguments_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/channel_create_test/channel_create_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/channel_create_test/channel_create_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/channel_filter_test/channel_filter_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/channel_filter_test/channel_filter_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/chttp2_hpack_encoder_test/chttp2_hpack_encoder_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/chttp2_hpack_encoder_test/chttp2_hpack_encoder_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/chttp2_status_conversion_test/chttp2_status_conversion_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/chttp2_status_conversion_test/chttp2_status_conversion_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/chttp2_stream_map_test/chttp2_stream_map_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/chttp2_stream_map_test/chttp2_stream_map_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/chttp2_varint_test/chttp2_varint_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/chttp2_varint_test/chttp2_varint_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/cli_call_test/cli_call_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/cli_call_test/cli_call_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/client_crash_test_server/client_crash_test_server.vcxproj delete mode 100644 vsprojects/vcxproj/test/client_crash_test_server/client_crash_test_server.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj delete mode 100644 vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj delete mode 100644 vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/combiner_test/combiner_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/combiner_test/combiner_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/compression_test/compression_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/compression_test/compression_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/concurrent_connectivity_test/concurrent_connectivity_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/concurrent_connectivity_test/concurrent_connectivity_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/connection_prefix_bad_client_test/connection_prefix_bad_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/connection_prefix_bad_client_test/connection_prefix_bad_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/connection_refused_test/connection_refused_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/connection_refused_test/connection_refused_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/credentials_test/credentials_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/credentials_test/credentials_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/cxx_byte_buffer_test/cxx_byte_buffer_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/cxx_byte_buffer_test/cxx_byte_buffer_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/cxx_slice_test/cxx_slice_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/cxx_slice_test/cxx_slice_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/cxx_string_ref_test/cxx_string_ref_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/cxx_string_ref_test/cxx_string_ref_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/cxx_time_test/cxx_time_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/cxx_time_test/cxx_time_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_nosec_test/h2_http_proxy_nosec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_nosec_test/h2_http_proxy_nosec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_test/h2_http_proxy_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_test/h2_http_proxy_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end_test/end2end_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end_test/end2end_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/endpoint_pair_test/endpoint_pair_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/endpoint_pair_test/endpoint_pair_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/filter_end2end_test/filter_end2end_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/filter_end2end_test/filter_end2end_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/fling_client/fling_client.vcxproj delete mode 100644 vsprojects/vcxproj/test/fling_client/fling_client.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/fling_server/fling_server.vcxproj delete mode 100644 vsprojects/vcxproj/test/fling_server/fling_server.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/generic_end2end_test/generic_end2end_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/generic_end2end_test/generic_end2end_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/golden_file_test/golden_file_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/golden_file_test/golden_file_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_avl_test/gpr_avl_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_avl_test/gpr_avl_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_cmdline_test/gpr_cmdline_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_cmdline_test/gpr_cmdline_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_cpu_test/gpr_cpu_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_cpu_test/gpr_cpu_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_env_test/gpr_env_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_env_test/gpr_env_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_histogram_test/gpr_histogram_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_histogram_test/gpr_histogram_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_host_port_test/gpr_host_port_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_host_port_test/gpr_host_port_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_log_test/gpr_log_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_log_test/gpr_log_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_mpscq_test/gpr_mpscq_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_mpscq_test/gpr_mpscq_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_stack_lockfree_test/gpr_stack_lockfree_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_stack_lockfree_test/gpr_stack_lockfree_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_string_test/gpr_string_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_string_test/gpr_string_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_sync_test/gpr_sync_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_sync_test/gpr_sync_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_thd_test/gpr_thd_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_thd_test/gpr_thd_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_time_test/gpr_time_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_time_test/gpr_time_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_tls_test/gpr_tls_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_tls_test/gpr_tls_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/gpr_useful_test/gpr_useful_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/gpr_useful_test/gpr_useful_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_auth_context_test/grpc_auth_context_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_auth_context_test/grpc_auth_context_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_b64_test/grpc_b64_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_b64_test/grpc_b64_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_byte_buffer_reader_test/grpc_byte_buffer_reader_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_byte_buffer_reader_test/grpc_byte_buffer_reader_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_channel_args_test/grpc_channel_args_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_channel_args_test/grpc_channel_args_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_channel_stack_test/grpc_channel_stack_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_channel_stack_test/grpc_channel_stack_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_completion_queue_test/grpc_completion_queue_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_completion_queue_test/grpc_completion_queue_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_credentials_test/grpc_credentials_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_credentials_test/grpc_credentials_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_invalid_channel_args_test/grpc_invalid_channel_args_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_invalid_channel_args_test/grpc_invalid_channel_args_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_jwt_verifier_test/grpc_jwt_verifier_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_jwt_verifier_test/grpc_jwt_verifier_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_security_connector_test/grpc_security_connector_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_security_connector_test/grpc_security_connector_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/head_of_line_blocking_bad_client_test/head_of_line_blocking_bad_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/head_of_line_blocking_bad_client_test/head_of_line_blocking_bad_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/headers_bad_client_test/headers_bad_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/headers_bad_client_test/headers_bad_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/hpack_parser_test/hpack_parser_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/hpack_parser_test/hpack_parser_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/hpack_table_test/hpack_table_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/hpack_table_test/hpack_table_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/hybrid_end2end_test/hybrid_end2end_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/hybrid_end2end_test/hybrid_end2end_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/init_test/init_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/init_test/init_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/initial_settings_frame_bad_client_test/initial_settings_frame_bad_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/initial_settings_frame_bad_client_test/initial_settings_frame_bad_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/invalid_call_argument_test/invalid_call_argument_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/invalid_call_argument_test/invalid_call_argument_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/json_rewrite/json_rewrite.vcxproj delete mode 100644 vsprojects/vcxproj/test/json_rewrite/json_rewrite.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/json_rewrite_test/json_rewrite_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/json_rewrite_test/json_rewrite_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/json_run_localhost/json_run_localhost.vcxproj delete mode 100644 vsprojects/vcxproj/test/json_run_localhost/json_run_localhost.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/json_stream_error_test/json_stream_error_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/json_stream_error_test/json_stream_error_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/json_test/json_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/json_test/json_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/lame_client_test/lame_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/lame_client_test/lame_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/load_file_test/load_file_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/load_file_test/load_file_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/message_compress_test/message_compress_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/message_compress_test/message_compress_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj delete mode 100644 vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/mlog_test/mlog_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/mlog_test/mlog_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/mock_test/mock_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/mock_test/mock_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/multiple_server_queues_test/multiple_server_queues_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/multiple_server_queues_test/multiple_server_queues_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/murmur_hash_test/murmur_hash_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/murmur_hash_test/murmur_hash_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/no_server_test/no_server_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/no_server_test/no_server_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj delete mode 100644 vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/percent_encoding_test/percent_encoding_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/percent_encoding_test/percent_encoding_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/public_headers_must_be_c89/public_headers_must_be_c89.vcxproj delete mode 100644 vsprojects/vcxproj/test/public_headers_must_be_c89/public_headers_must_be_c89.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj delete mode 100644 vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/qps_worker/qps_worker.vcxproj delete mode 100644 vsprojects/vcxproj/test/qps_worker/qps_worker.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj delete mode 100644 vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj delete mode 100644 vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/resolve_address_test/resolve_address_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/resolve_address_test/resolve_address_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/secure_auth_context_test/secure_auth_context_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/secure_auth_context_test/secure_auth_context_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/secure_channel_create_test/secure_channel_create_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/secure_channel_create_test/secure_channel_create_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/secure_endpoint_test/secure_endpoint_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/secure_endpoint_test/secure_endpoint_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/server_chttp2_test/server_chttp2_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/server_chttp2_test/server_chttp2_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/server_crash_test_client/server_crash_test_client.vcxproj delete mode 100644 vsprojects/vcxproj/test/server_crash_test_client/server_crash_test_client.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/server_registered_method_bad_client_test/server_registered_method_bad_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/server_registered_method_bad_client_test/server_registered_method_bad_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/server_test/server_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/server_test/server_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/shutdown_test/shutdown_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/shutdown_test/shutdown_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/simple_request_bad_client_test/simple_request_bad_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/simple_request_bad_client_test/simple_request_bad_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/slice_buffer_test/slice_buffer_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/slice_buffer_test/slice_buffer_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/slice_string_helpers_test/slice_string_helpers_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/slice_string_helpers_test/slice_string_helpers_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/slice_test/slice_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/slice_test/slice_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/sockaddr_utils_test/sockaddr_utils_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/sockaddr_utils_test/sockaddr_utils_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/status_test/status_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/status_test/status_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/stress_test/stress_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/stress_test/stress_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/time_averaged_stats_test/time_averaged_stats_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/time_averaged_stats_test/time_averaged_stats_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/timer_heap_test/timer_heap_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/timer_heap_test/timer_heap_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/timer_list_test/timer_list_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/timer_list_test/timer_list_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/transport_connectivity_state_test/transport_connectivity_state_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/transport_connectivity_state_test/transport_connectivity_state_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/transport_metadata_test/transport_metadata_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/transport_metadata_test/transport_metadata_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/unknown_frame_bad_client_test/unknown_frame_bad_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/unknown_frame_bad_client_test/unknown_frame_bad_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/window_overflow_bad_client_test/window_overflow_bad_client_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/window_overflow_bad_client_test/window_overflow_bad_client_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test_tcp_server/test_tcp_server.vcxproj delete mode 100644 vsprojects/vcxproj/test_tcp_server/test_tcp_server.vcxproj.filters delete mode 100644 vsprojects/vcxproj/z/z.vcxproj delete mode 100644 vsprojects/vcxproj/z/z.vcxproj.filters (limited to 'src/core') diff --git a/BUILD b/BUILD index 9f682b8f86..340e2f718d 100644 --- a/BUILD +++ b/BUILD @@ -313,6 +313,7 @@ cc_library( "src/core/ext/client_channel/subchannel.h", "src/core/ext/client_channel/subchannel_index.h", "src/core/ext/client_channel/uri_parser.h", + "src/core/ext/transport/chttp2/client/chttp2_connector.h", "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", @@ -511,6 +512,7 @@ cc_library( "src/core/ext/client_channel/subchannel.c", "src/core/ext/client_channel/subchannel_index.c", "src/core/ext/client_channel/uri_parser.c", + "src/core/ext/transport/chttp2/client/chttp2_connector.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", @@ -578,6 +580,8 @@ cc_library( "//external:libssl", "//external:zlib", ":gpr", + ":grpc_transport_chttp2", + ":grpc_base", "//external:nanopb", ], copts = [ @@ -748,6 +752,7 @@ cc_library( "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/transport/chttp2/client/chttp2_connector.h", "src/core/lib/surface/init.c", "src/core/lib/channel/channel_args.c", "src/core/lib/channel/channel_stack.c", @@ -932,6 +937,7 @@ cc_library( "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/chttp2_connector.c", "src/core/plugin_registry/grpc_cronet_plugin_registry.c", ], hdrs = [ @@ -971,6 +977,8 @@ cc_library( deps = [ "//external:libssl", ":gpr", + ":grpc_transport_chttp2", + ":grpc_base", ], ) @@ -1112,6 +1120,7 @@ cc_library( "src/core/ext/client_channel/subchannel.h", "src/core/ext/client_channel/subchannel_index.h", "src/core/ext/client_channel/uri_parser.h", + "src/core/ext/transport/chttp2/client/chttp2_connector.h", "src/core/ext/load_reporting/load_reporting.h", "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/lb_policy/grpclb/grpclb.h", @@ -1286,6 +1295,7 @@ cc_library( "src/core/ext/client_channel/subchannel.c", "src/core/ext/client_channel/subchannel_index.c", "src/core/ext/client_channel/uri_parser.c", + "src/core/ext/transport/chttp2/client/chttp2_connector.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/load_reporting/load_reporting.c", @@ -1346,6 +1356,8 @@ cc_library( ], deps = [ ":gpr", + ":grpc_transport_chttp2", + ":grpc_base", "//external:nanopb", ], copts = [ @@ -2172,6 +2184,7 @@ objc_library( "src/core/ext/client_channel/subchannel.c", "src/core/ext/client_channel/subchannel_index.c", "src/core/ext/client_channel/uri_parser.c", + "src/core/ext/transport/chttp2/client/chttp2_connector.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", @@ -2387,6 +2400,7 @@ objc_library( "src/core/ext/client_channel/subchannel.h", "src/core/ext/client_channel/subchannel_index.h", "src/core/ext/client_channel/uri_parser.h", + "src/core/ext/transport/chttp2/client/chttp2_connector.h", "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", @@ -2410,6 +2424,8 @@ objc_library( ], deps = [ ":gpr_objc", + ":grpc_transport_chttp2_objc", + ":grpc_base_objc", "//external:libssl_objc", "//external:nanopb", ], diff --git a/CMakeLists.txt b/CMakeLists.txt index ba46adaa2b..99f8195d10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -466,6 +466,7 @@ add_library(grpc src/core/ext/client_channel/subchannel.c src/core/ext/client_channel/subchannel_index.c src/core/ext/client_channel/uri_parser.c + src/core/ext/transport/chttp2/client/chttp2_connector.c src/core/ext/transport/chttp2/server/insecure/server_chttp2.c src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -513,6 +514,8 @@ target_link_libraries(grpc ${_gRPC_SSL_LIBRARIES} ${_gRPC_ZLIB_LIBRARIES} gpr + grpc_transport_chttp2 + grpc_base ) foreach(_hdr @@ -747,6 +750,7 @@ add_library(grpc_cronet 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/chttp2_connector.c src/core/plugin_registry/grpc_cronet_plugin_registry.c ) @@ -763,6 +767,8 @@ target_link_libraries(grpc_cronet ${_gRPC_BASELIB_LIBRARIES} ${_gRPC_SSL_LIBRARIES} gpr + grpc_transport_chttp2 + grpc_base ) foreach(_hdr @@ -971,6 +977,7 @@ add_library(grpc_unsecure src/core/ext/client_channel/subchannel.c src/core/ext/client_channel/subchannel_index.c src/core/ext/client_channel/uri_parser.c + src/core/ext/transport/chttp2/client/chttp2_connector.c src/core/ext/resolver/dns/native/dns_resolver.c src/core/ext/resolver/sockaddr/sockaddr_resolver.c src/core/ext/load_reporting/load_reporting.c @@ -1012,6 +1019,8 @@ target_include_directories(grpc_unsecure target_link_libraries(grpc_unsecure ${_gRPC_BASELIB_LIBRARIES} gpr + grpc_transport_chttp2 + grpc_base ) foreach(_hdr diff --git a/Makefile b/Makefile index 243faa2e87..70e96443cf 100644 --- a/Makefile +++ b/Makefile @@ -2800,6 +2800,7 @@ LIBGRPC_SRC = \ src/core/ext/client_channel/subchannel.c \ src/core/ext/client_channel/subchannel_index.c \ src/core/ext/client_channel/uri_parser.c \ + src/core/ext/transport/chttp2/client/chttp2_connector.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ @@ -2888,18 +2889,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so endif @@ -3099,6 +3100,7 @@ LIBGRPC_CRONET_SRC = \ 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/chttp2_connector.c \ src/core/plugin_registry/grpc_cronet_plugin_registry.c \ PUBLIC_HEADERS_C += \ @@ -3157,18 +3159,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_cronet.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_cronet.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so endif @@ -3577,6 +3579,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/client_channel/subchannel.c \ src/core/ext/client_channel/subchannel_index.c \ src/core/ext/client_channel/uri_parser.c \ + src/core/ext/transport/chttp2/client/chttp2_connector.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/load_reporting/load_reporting.c \ @@ -3649,18 +3652,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a +$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(ZLIB_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a +$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_transport_chttp2.a $(LIBDIR)/$(CONFIG)/libgrpc_base.a $(ZLIB_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so endif diff --git a/binding.gyp b/binding.gyp index a68a728edd..1341f33975 100644 --- a/binding.gyp +++ b/binding.gyp @@ -562,6 +562,8 @@ 'type': 'static_library', 'dependencies': [ 'gpr', + 'grpc_transport_chttp2', + 'grpc_base', ], 'sources': [ 'src/core/lib/surface/init.c', @@ -746,6 +748,7 @@ 'src/core/ext/client_channel/subchannel.c', 'src/core/ext/client_channel/subchannel_index.c', 'src/core/ext/client_channel/uri_parser.c', + 'src/core/ext/transport/chttp2/client/chttp2_connector.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', diff --git a/build.yaml b/build.yaml index 91de8e8e73..52c2cae2cb 100644 --- a/build.yaml +++ b/build.yaml @@ -621,6 +621,14 @@ filegroups: - src/core/ext/transport/chttp2/alpn/alpn.c deps: - gpr +- name: grpc_transport_chttp2_client_connector + headers: + - src/core/ext/transport/chttp2/client/chttp2_connector.h + src: + - src/core/ext/transport/chttp2/client/chttp2_connector.c + deps: + - grpc_transport_chttp2 + - grpc_base - name: grpc_transport_chttp2_client_insecure src: - src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -629,6 +637,7 @@ filegroups: - grpc_transport_chttp2 - grpc_base - grpc_client_channel + - grpc_transport_chttp2_client_connector - name: grpc_transport_chttp2_client_secure src: - src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -637,6 +646,7 @@ filegroups: - grpc_base - grpc_client_channel - grpc_secure + - grpc_transport_chttp2_client_connector - name: grpc_transport_chttp2_server_insecure src: - src/core/ext/transport/chttp2/server/insecure/server_chttp2.c diff --git a/config.m4 b/config.m4 index 46e0109981..ff5ae29167 100644 --- a/config.m4 +++ b/config.m4 @@ -262,6 +262,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/client_channel/subchannel.c \ src/core/ext/client_channel/subchannel_index.c \ src/core/ext/client_channel/uri_parser.c \ + src/core/ext/transport/chttp2/client/chttp2_connector.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ @@ -609,6 +610,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/dns/native) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/sockaddr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/alpn) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client/insecure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client/secure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/insecure) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index bff342cc66..d645307536 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -402,6 +402,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_channel/subchannel.h', 'src/core/ext/client_channel/subchannel_index.h', 'src/core/ext/client_channel/uri_parser.h', + 'src/core/ext/transport/chttp2/client/chttp2_connector.h', 'src/core/ext/lb_policy/grpclb/grpclb.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', @@ -604,6 +605,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_channel/subchannel.c', 'src/core/ext/client_channel/subchannel_index.c', 'src/core/ext/client_channel/uri_parser.c', + 'src/core/ext/transport/chttp2/client/chttp2_connector.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', @@ -805,6 +807,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_channel/subchannel.h', 'src/core/ext/client_channel/subchannel_index.h', 'src/core/ext/client_channel/uri_parser.h', + 'src/core/ext/transport/chttp2/client/chttp2_connector.h', 'src/core/ext/lb_policy/grpclb/grpclb.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', diff --git a/grpc.gemspec b/grpc.gemspec index 7070871178..3c5c6fae05 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -322,6 +322,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_channel/subchannel.h ) s.files += %w( src/core/ext/client_channel/subchannel_index.h ) s.files += %w( src/core/ext/client_channel/uri_parser.h ) + s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.h ) s.files += %w( src/core/ext/lb_policy/grpclb/grpclb.h ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h ) @@ -524,6 +525,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_channel/subchannel.c ) s.files += %w( src/core/ext/client_channel/subchannel_index.c ) s.files += %w( src/core/ext/client_channel/uri_parser.c ) + s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.c ) s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c ) s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) diff --git a/package.xml b/package.xml index fdb449370c..e0dbe9488d 100644 --- a/package.xml +++ b/package.xml @@ -329,6 +329,7 @@ + @@ -531,6 +532,7 @@ + diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.c b/src/core/ext/transport/chttp2/client/chttp2_connector.c new file mode 100644 index 0000000000..43649376a1 --- /dev/null +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.c @@ -0,0 +1,239 @@ +/* + * + * Copyright 2015, 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 + +#include + +#include +#include + +#include "src/core/ext/client_channel/http_connect_handshaker.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/ext/client_channel/connector.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/handshaker.h" +#include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/lib/security/transport/security_connector.h" + +typedef struct { + grpc_connector base; + + gpr_mu mu; + gpr_refcount refs; + + bool shutdown; + + grpc_closure *notify; + grpc_connect_in_args args; + grpc_connect_out_args *result; + grpc_closure initial_string_sent; + grpc_slice_buffer initial_string_buffer; + + grpc_endpoint *endpoint; // Non-NULL until handshaking starts. + + grpc_closure connected; + + grpc_handshake_manager *handshake_mgr; +} chttp2_connector; + +static void chttp2_connector_ref(grpc_connector *con) { + chttp2_connector *c = (chttp2_connector *)con; + gpr_ref(&c->refs); +} + +static void chttp2_connector_unref(grpc_exec_ctx *exec_ctx, + grpc_connector *con) { + chttp2_connector *c = (chttp2_connector *)con; + if (gpr_unref(&c->refs)) { + /* c->initial_string_buffer does not need to be destroyed */ + gpr_mu_destroy(&c->mu); + grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); + // If handshaking is not yet in progress, destroy the endpoint. + // Otherwise, the handshaker will do this for us. + if (c->endpoint != NULL) grpc_endpoint_destroy(exec_ctx, c->endpoint); + gpr_free(c); + } +} + +static void chttp2_connector_shutdown(grpc_exec_ctx *exec_ctx, + grpc_connector *con) { + chttp2_connector *c = (chttp2_connector *)con; + gpr_mu_lock(&c->mu); + c->shutdown = true; + grpc_handshake_manager_shutdown(exec_ctx, c->handshake_mgr); + // If handshaking is not yet in progress, shutdown the endpoint. + // Otherwise, the handshaker will do this for us. + if (c->endpoint != NULL) grpc_endpoint_shutdown(exec_ctx, c->endpoint); + gpr_mu_unlock(&c->mu); +} + +static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + grpc_handshaker_args *args = arg; + chttp2_connector *c = args->user_data; + gpr_mu_lock(&c->mu); + if (error != GRPC_ERROR_NONE || c->shutdown) { + if (error == GRPC_ERROR_NONE) { + error = GRPC_ERROR_CREATE("connector shutdown"); + // We were shut down after handshaking completed successfully, so + // shutdown the endpoint here. + grpc_endpoint_shutdown(exec_ctx, args->endpoint); + } else { + error = GRPC_ERROR_REF(error); + } + memset(c->result, 0, sizeof(*c->result)); + grpc_endpoint_destroy(exec_ctx, args->endpoint); + grpc_channel_args_destroy(args->args); + gpr_free(args->read_buffer); + } else { + c->result->transport = + grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 1); + GPR_ASSERT(c->result->transport); + grpc_chttp2_transport_start_reading(exec_ctx, c->result->transport, + args->read_buffer); + c->result->channel_args = args->args; + } + grpc_closure *notify = c->notify; + c->notify = NULL; + grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); + gpr_mu_unlock(&c->mu); + chttp2_connector_unref(exec_ctx, (grpc_connector*)c); +} + +static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + chttp2_connector *c = arg; + gpr_mu_lock(&c->mu); + if (error != GRPC_ERROR_NONE || c->shutdown) { + if (error == GRPC_ERROR_NONE) { + error = GRPC_ERROR_CREATE("connector shutdown"); + } else { + error = GRPC_ERROR_REF(error); + } + memset(c->result, 0, sizeof(*c->result)); + grpc_closure *notify = c->notify; + c->notify = NULL; + grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); + gpr_mu_unlock(&c->mu); + chttp2_connector_unref(exec_ctx, arg); + } else { + grpc_handshake_manager_do_handshake( + exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args, + c->args.deadline, NULL /* acceptor */, on_handshake_done, c); + c->endpoint = NULL; // Endpoint handed off to handshake manager. + gpr_mu_unlock(&c->mu); + } +} + +static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + chttp2_connector *c = arg; + gpr_mu_lock(&c->mu); + if (error != GRPC_ERROR_NONE || c->shutdown) { + if (error == GRPC_ERROR_NONE) { + error = GRPC_ERROR_CREATE("connector shutdown"); + } else { + error = GRPC_ERROR_REF(error); + } + memset(c->result, 0, sizeof(*c->result)); + grpc_closure *notify = c->notify; + c->notify = NULL; + grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); + gpr_mu_unlock(&c->mu); + chttp2_connector_unref(exec_ctx, arg); + } else { + GPR_ASSERT(c->endpoint != NULL); + if (!GRPC_SLICE_IS_EMPTY(c->args.initial_connect_string)) { + grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, + c); + grpc_slice_buffer_init(&c->initial_string_buffer); + grpc_slice_buffer_add(&c->initial_string_buffer, + c->args.initial_connect_string); + grpc_endpoint_write(exec_ctx, c->endpoint, &c->initial_string_buffer, + &c->initial_string_sent); + } else { + grpc_handshake_manager_do_handshake( + exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args, + c->args.deadline, NULL /* acceptor */, on_handshake_done, c); + c->endpoint = NULL; // Endpoint handed off to handshake manager. + } + gpr_mu_unlock(&c->mu); + } +} + +static void chttp2_connector_connect(grpc_exec_ctx *exec_ctx, + grpc_connector *con, + const grpc_connect_in_args *args, + grpc_connect_out_args *result, + grpc_closure *notify) { + chttp2_connector *c = (chttp2_connector *)con; + gpr_mu_lock(&c->mu); + GPR_ASSERT(c->notify == NULL); + c->notify = notify; + c->args = *args; + c->result = result; + GPR_ASSERT(c->endpoint == NULL); + chttp2_connector_ref(con); // Ref taken for callback. + grpc_closure_init(&c->connected, connected, c); + grpc_tcp_client_connect(exec_ctx, &c->connected, &c->endpoint, + args->interested_parties, args->channel_args, + args->addr, args->deadline); + gpr_mu_unlock(&c->mu); +} + +static const grpc_connector_vtable chttp2_connector_vtable = { + chttp2_connector_ref, chttp2_connector_unref, chttp2_connector_shutdown, + chttp2_connector_connect}; + +grpc_connector *grpc_chttp2_connector_create( + grpc_exec_ctx *exec_ctx, const char* server_name, + grpc_channel_security_connector* security_connector) { + chttp2_connector *c = gpr_malloc(sizeof(*c)); + memset(c, 0, sizeof(*c)); + c->base.vtable = &chttp2_connector_vtable; + gpr_mu_init(&c->mu); + gpr_ref_init(&c->refs, 1); + c->handshake_mgr = grpc_handshake_manager_create(); + char *proxy_name = grpc_get_http_proxy_server(); + if (proxy_name != NULL) { + grpc_handshake_manager_add( + c->handshake_mgr, + grpc_http_connect_handshaker_create(proxy_name, server_name)); + gpr_free(proxy_name); + } + if (security_connector != NULL) { + grpc_channel_security_connector_create_handshakers( + exec_ctx, security_connector, c->handshake_mgr); + } + return &c->base; +} diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.h b/src/core/ext/transport/chttp2/client/chttp2_connector.h new file mode 100644 index 0000000000..5a85d8fa7c --- /dev/null +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.h @@ -0,0 +1,44 @@ +/* + * + * Copyright 2015, 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. + * + */ + +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H + +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/security/transport/security_connector.h" + +grpc_connector *grpc_chttp2_connector_create( + grpc_exec_ctx *exec_ctx, const char* server_name, + grpc_channel_security_connector* security_connector); + +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H */ diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 33a1c49ede..5bb0f83f69 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -33,196 +33,16 @@ #include -#include #include -#include -#include #include #include "src/core/ext/client_channel/client_channel.h" -#include "src/core/ext/client_channel/http_connect_handshaker.h" #include "src/core/ext/client_channel/resolver_registry.h" -#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" -#include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/channel/handshaker.h" -#include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/ext/transport/chttp2/client/chttp2_connector.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" -// -// connector -// - -typedef struct { - grpc_connector base; - - gpr_mu mu; - gpr_refcount refs; - - bool shutdown; - - grpc_closure *notify; - grpc_connect_in_args args; - grpc_connect_out_args *result; - grpc_closure initial_string_sent; - grpc_slice_buffer initial_string_buffer; - - grpc_endpoint *endpoint; // Non-NULL until handshaking starts. - - grpc_closure connected; - - grpc_handshake_manager *handshake_mgr; -} connector; - -static void connector_ref(grpc_connector *con) { - connector *c = (connector *)con; - gpr_ref(&c->refs); -} - -static void connector_unref(grpc_exec_ctx *exec_ctx, grpc_connector *con) { - connector *c = (connector *)con; - if (gpr_unref(&c->refs)) { - /* c->initial_string_buffer does not need to be destroyed */ - gpr_mu_destroy(&c->mu); - grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); - // If handshaking is not yet in progress, destroy the endpoint. - // Otherwise, the handshaker will do this for us. - if (c->endpoint != NULL) grpc_endpoint_destroy(exec_ctx, c->endpoint); - gpr_free(c); - } -} - -static void connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *con) { - connector *c = (connector *)con; - gpr_mu_lock(&c->mu); - c->shutdown = true; - grpc_handshake_manager_shutdown(exec_ctx, c->handshake_mgr); - // If handshaking is not yet in progress, shutdown the endpoint. - // Otherwise, the handshaker will do this for us. - if (c->endpoint != NULL) grpc_endpoint_shutdown(exec_ctx, c->endpoint); - gpr_mu_unlock(&c->mu); -} - -static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - grpc_handshaker_args *args = arg; - connector *c = args->user_data; - gpr_mu_lock(&c->mu); - if (error != GRPC_ERROR_NONE || c->shutdown) { - if (error == GRPC_ERROR_NONE) { - error = GRPC_ERROR_CREATE("connector shutdown"); - // We were shut down after handshaking completed successfully, so - // shutdown the endpoint here. - grpc_endpoint_shutdown(exec_ctx, args->endpoint); - } else { - error = GRPC_ERROR_REF(error); - } - memset(c->result, 0, sizeof(*c->result)); - grpc_endpoint_destroy(exec_ctx, args->endpoint); - grpc_channel_args_destroy(args->args); - gpr_free(args->read_buffer); - } else { - c->result->transport = - grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 1); - GPR_ASSERT(c->result->transport); - grpc_chttp2_transport_start_reading(exec_ctx, c->result->transport, - args->read_buffer); - c->result->channel_args = args->args; - } - grpc_closure *notify = c->notify; - c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); - gpr_mu_unlock(&c->mu); - connector_unref(exec_ctx, (grpc_connector*)c); -} - -static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - connector *c = arg; - gpr_mu_lock(&c->mu); - if (error != GRPC_ERROR_NONE || c->shutdown) { - if (error == GRPC_ERROR_NONE) { - error = GRPC_ERROR_CREATE("connector shutdown"); - } else { - error = GRPC_ERROR_REF(error); - } - memset(c->result, 0, sizeof(*c->result)); - grpc_closure *notify = c->notify; - c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); - gpr_mu_unlock(&c->mu); - connector_unref(exec_ctx, arg); - } else { - grpc_handshake_manager_do_handshake( - exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args, - c->args.deadline, NULL /* acceptor */, on_handshake_done, c); - c->endpoint = NULL; // Endpoint handed off to handshake manager. - gpr_mu_unlock(&c->mu); - } -} - -static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - connector *c = arg; - gpr_mu_lock(&c->mu); - if (error != GRPC_ERROR_NONE || c->shutdown) { - if (error == GRPC_ERROR_NONE) { - error = GRPC_ERROR_CREATE("connector shutdown"); - } else { - error = GRPC_ERROR_REF(error); - } - memset(c->result, 0, sizeof(*c->result)); - grpc_closure *notify = c->notify; - c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); - gpr_mu_unlock(&c->mu); - connector_unref(exec_ctx, arg); - } else { - GPR_ASSERT(c->endpoint != NULL); - if (!GRPC_SLICE_IS_EMPTY(c->args.initial_connect_string)) { - grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, - c); - grpc_slice_buffer_init(&c->initial_string_buffer); - grpc_slice_buffer_add(&c->initial_string_buffer, - c->args.initial_connect_string); - grpc_endpoint_write(exec_ctx, c->endpoint, &c->initial_string_buffer, - &c->initial_string_sent); - } else { - grpc_handshake_manager_do_handshake( - exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args, - c->args.deadline, NULL /* acceptor */, on_handshake_done, c); - c->endpoint = NULL; // Endpoint handed off to handshake manager. - } - gpr_mu_unlock(&c->mu); - } -} - -static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, - const grpc_connect_in_args *args, - grpc_connect_out_args *result, - grpc_closure *notify) { - connector *c = (connector *)con; - gpr_mu_lock(&c->mu); - GPR_ASSERT(c->notify == NULL); - c->notify = notify; - c->args = *args; - c->result = result; - GPR_ASSERT(c->endpoint == NULL); - connector_ref(con); // Ref taken for callback. - grpc_closure_init(&c->connected, connected, c); - grpc_tcp_client_connect(exec_ctx, &c->connected, &c->endpoint, - args->interested_parties, args->channel_args, - args->addr, args->deadline); - gpr_mu_unlock(&c->mu); -} - -static const grpc_connector_vtable connector_vtable = { - connector_ref, connector_unref, connector_shutdown, connector_connect}; - -// -// client_channel_factory -// - static void client_channel_factory_ref( grpc_client_channel_factory *cc_factory) {} @@ -232,21 +52,10 @@ static void client_channel_factory_unref( static grpc_subchannel *client_channel_factory_create_subchannel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const grpc_subchannel_args *args) { - connector *c = gpr_malloc(sizeof(*c)); - memset(c, 0, sizeof(*c)); - c->base.vtable = &connector_vtable; - gpr_mu_init(&c->mu); - gpr_ref_init(&c->refs, 1); - c->handshake_mgr = grpc_handshake_manager_create(); - char *proxy_name = grpc_get_http_proxy_server(); - if (proxy_name != NULL) { - grpc_handshake_manager_add( - c->handshake_mgr, - grpc_http_connect_handshaker_create(proxy_name, args->server_name)); - gpr_free(proxy_name); - } - grpc_subchannel *s = grpc_subchannel_create(exec_ctx, &c->base, args); - grpc_connector_unref(exec_ctx, &c->base); + grpc_connector *connector = grpc_chttp2_connector_create( + exec_ctx, args->server_name, NULL /* security_connector */); + grpc_subchannel *s = grpc_subchannel_create(exec_ctx, connector, args); + grpc_connector_unref(exec_ctx, connector); return s; } diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index df88eb6015..a5cc1633ae 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -33,198 +33,19 @@ #include -#include #include -#include -#include #include #include "src/core/ext/client_channel/client_channel.h" -#include "src/core/ext/client_channel/http_connect_handshaker.h" #include "src/core/ext/client_channel/resolver_registry.h" -#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/client/chttp2_connector.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/channel/handshaker.h" -#include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" -// -// connector -// - -typedef struct { - grpc_connector base; - - gpr_mu mu; - gpr_refcount refs; - - bool shutdown; - - grpc_closure *notify; - grpc_connect_in_args args; - grpc_connect_out_args *result; - grpc_closure initial_string_sent; - grpc_slice_buffer initial_string_buffer; - - grpc_endpoint *endpoint; // Non-NULL until handshaking starts. - - grpc_closure connected; - - grpc_handshake_manager *handshake_mgr; -} connector; - -static void connector_ref(grpc_connector *con) { - connector *c = (connector *)con; - gpr_ref(&c->refs); -} - -static void connector_unref(grpc_exec_ctx *exec_ctx, grpc_connector *con) { - connector *c = (connector *)con; - if (gpr_unref(&c->refs)) { - /* c->initial_string_buffer does not need to be destroyed */ - gpr_mu_destroy(&c->mu); - grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); - // If handshaking is not yet in progress, destroy the endpoint. - // Otherwise, the handshaker will do this for us. - if (c->endpoint != NULL) grpc_endpoint_destroy(exec_ctx, c->endpoint); - gpr_free(c); - } -} - -static void connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *con) { - connector *c = (connector *)con; - gpr_mu_lock(&c->mu); - c->shutdown = true; - grpc_handshake_manager_shutdown(exec_ctx, c->handshake_mgr); - // If handshaking is not yet in progress, shutdown the endpoint. - // Otherwise, the handshaker will do this for us. - if (c->endpoint != NULL) grpc_endpoint_shutdown(exec_ctx, c->endpoint); - gpr_mu_unlock(&c->mu); -} - -static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - grpc_handshaker_args *args = arg; - connector *c = args->user_data; - gpr_mu_lock(&c->mu); - if (error != GRPC_ERROR_NONE || c->shutdown) { - if (error == GRPC_ERROR_NONE) { - error = GRPC_ERROR_CREATE("connector shutdown"); - // We were shut down after handshaking completed successfully, so - // shutdown the endpoint here. - grpc_endpoint_shutdown(exec_ctx, args->endpoint); - } else { - error = GRPC_ERROR_REF(error); - } - memset(c->result, 0, sizeof(*c->result)); - grpc_endpoint_destroy(exec_ctx, args->endpoint); - grpc_channel_args_destroy(args->args); - gpr_free(args->read_buffer); - } else { - c->result->transport = - grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 1); - GPR_ASSERT(c->result->transport); - grpc_chttp2_transport_start_reading(exec_ctx, c->result->transport, - args->read_buffer); - c->result->channel_args = args->args; - } - grpc_closure *notify = c->notify; - c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); - gpr_mu_unlock(&c->mu); - connector_unref(exec_ctx, (grpc_connector*)c); -} - -static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - connector *c = arg; - gpr_mu_lock(&c->mu); - if (error != GRPC_ERROR_NONE || c->shutdown) { - if (error == GRPC_ERROR_NONE) { - error = GRPC_ERROR_CREATE("connector shutdown"); - } else { - error = GRPC_ERROR_REF(error); - } - memset(c->result, 0, sizeof(*c->result)); - grpc_closure *notify = c->notify; - c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); - gpr_mu_unlock(&c->mu); - connector_unref(exec_ctx, arg); - } else { - grpc_handshake_manager_do_handshake( - exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args, - c->args.deadline, NULL /* acceptor */, on_handshake_done, c); - c->endpoint = NULL; // Endpoint handed off to handshake manager. - gpr_mu_unlock(&c->mu); - } -} - -static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - connector *c = arg; - gpr_mu_lock(&c->mu); - if (error != GRPC_ERROR_NONE || c->shutdown) { - if (error == GRPC_ERROR_NONE) { - error = GRPC_ERROR_CREATE("connector shutdown"); - } else { - error = GRPC_ERROR_REF(error); - } - memset(c->result, 0, sizeof(*c->result)); - grpc_closure *notify = c->notify; - c->notify = NULL; - grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); - gpr_mu_unlock(&c->mu); - connector_unref(exec_ctx, arg); - } else { - GPR_ASSERT(c->endpoint != NULL); - if (!GRPC_SLICE_IS_EMPTY(c->args.initial_connect_string)) { - grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, - c); - grpc_slice_buffer_init(&c->initial_string_buffer); - grpc_slice_buffer_add(&c->initial_string_buffer, - c->args.initial_connect_string); - grpc_endpoint_write(exec_ctx, c->endpoint, &c->initial_string_buffer, - &c->initial_string_sent); - } else { - grpc_handshake_manager_do_handshake( - exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args, - c->args.deadline, NULL /* acceptor */, on_handshake_done, c); - c->endpoint = NULL; // Endpoint handed off to handshake manager. - } - gpr_mu_unlock(&c->mu); - } -} - -static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, - const grpc_connect_in_args *args, - grpc_connect_out_args *result, - grpc_closure *notify) { - connector *c = (connector *)con; - gpr_mu_lock(&c->mu); - GPR_ASSERT(c->notify == NULL); - c->notify = notify; - c->args = *args; - c->result = result; - GPR_ASSERT(c->endpoint == NULL); - connector_ref(con); // Ref taken for callback. - grpc_closure_init(&c->connected, connected, c); - grpc_tcp_client_connect(exec_ctx, &c->connected, &c->endpoint, - args->interested_parties, args->channel_args, - args->addr, args->deadline); - gpr_mu_unlock(&c->mu); -} - -static const grpc_connector_vtable connector_vtable = { - connector_ref, connector_unref, connector_shutdown, connector_connect}; - -// -// client_channel_factory -// - typedef struct { grpc_client_channel_factory base; gpr_refcount refs; @@ -251,23 +72,11 @@ static grpc_subchannel *client_channel_factory_create_subchannel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const grpc_subchannel_args *args) { client_channel_factory *f = (client_channel_factory *)cc_factory; - connector *c = gpr_malloc(sizeof(*c)); - memset(c, 0, sizeof(*c)); - c->base.vtable = &connector_vtable; - gpr_mu_init(&c->mu); - gpr_ref_init(&c->refs, 1); - c->handshake_mgr = grpc_handshake_manager_create(); - char *proxy_name = grpc_get_http_proxy_server(); - if (proxy_name != NULL) { - grpc_handshake_manager_add( - c->handshake_mgr, - grpc_http_connect_handshaker_create(proxy_name, args->server_name)); - gpr_free(proxy_name); - } - grpc_channel_security_connector_create_handshakers( - exec_ctx, f->security_connector, c->handshake_mgr); - grpc_subchannel *s = grpc_subchannel_create(exec_ctx, &c->base, args); - grpc_connector_unref(exec_ctx, &c->base); + grpc_connector *connector = + grpc_chttp2_connector_create(exec_ctx, args->server_name, + f->security_connector); + grpc_subchannel *s = grpc_subchannel_create(exec_ctx, connector, args); + grpc_connector_unref(exec_ctx, connector); return s; } diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index 5a9d4f8928..127cc19f0b 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -47,17 +47,17 @@ #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" -typedef struct server_connect_state { +typedef struct server_connection_state { grpc_server *server; grpc_pollset *accepting_pollset; grpc_tcp_server_acceptor *acceptor; grpc_handshake_manager *handshake_mgr; -} server_connect_state; +} server_connection_state; static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_handshaker_args *args = arg; - server_connect_state *state = args->user_data; + server_connection_state *state = args->user_data; if (error != GRPC_ERROR_NONE) { const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); @@ -86,7 +86,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, static void on_accept(grpc_exec_ctx *exec_ctx, void *server, grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { - server_connect_state *state = gpr_malloc(sizeof(server_connect_state)); + server_connection_state *state = gpr_malloc(sizeof(server_connection_state)); state->server = server; state->accepting_pollset = accepting_pollset; state->acceptor = acceptor; diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index add9c3c676..7c028f9f36 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -71,12 +71,12 @@ typedef struct server_secure_state { pending_handshake_manager_node *pending_handshake_mgrs; } server_secure_state; -typedef struct server_secure_connect { +typedef struct server_secure_connection_state { server_secure_state *server_state; grpc_pollset *accepting_pollset; grpc_tcp_server_acceptor *acceptor; grpc_handshake_manager *handshake_mgr; -} server_secure_connect; +} server_secure_connection_state; static void pending_handshake_manager_add_locked( server_secure_state* state, grpc_handshake_manager* handshake_mgr) { @@ -116,7 +116,7 @@ static void pending_handshake_manager_shutdown_locked( static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_handshaker_args *args = arg; - server_secure_connect *connection_state = args->user_data; + server_secure_connection_state *connection_state = args->user_data; if (error != GRPC_ERROR_NONE) { const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); @@ -168,7 +168,7 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *statep, grpc_endpoint *tcp, pending_handshake_manager_add_locked(server_state, handshake_mgr); gpr_mu_unlock(&server_state->mu); grpc_tcp_server_ref(server_state->tcp); - server_secure_connect *connection_state = + server_secure_connection_state *connection_state = gpr_malloc(sizeof(*connection_state)); connection_state->server_state = server_state; connection_state->accepting_pollset = accepting_pollset; diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 5affff10f5..8fbf31f184 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -256,6 +256,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/client_channel/subchannel.c', 'src/core/ext/client_channel/subchannel_index.c', 'src/core/ext/client_channel/uri_parser.c', + 'src/core/ext/transport/chttp2/client/chttp2_connector.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 2dd50b073c..2ae9704f20 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -945,6 +945,7 @@ src/core/ext/client_channel/resolver_registry.h \ src/core/ext/client_channel/subchannel.h \ src/core/ext/client_channel/subchannel_index.h \ src/core/ext/client_channel/uri_parser.h \ +src/core/ext/transport/chttp2/client/chttp2_connector.h \ src/core/ext/lb_policy/grpclb/grpclb.h \ src/core/ext/lb_policy/grpclb/load_balancer_api.h \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h \ @@ -1147,6 +1148,7 @@ src/core/ext/client_channel/resolver_registry.c \ src/core/ext/client_channel/subchannel.c \ src/core/ext/client_channel/subchannel_index.c \ src/core/ext/client_channel/uri_parser.c \ +src/core/ext/transport/chttp2/client/chttp2_connector.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e1eded6cd7..86d2bca688 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4925,6 +4925,7 @@ "census", "gpr", "grpc_base", + "grpc_base", "grpc_lb_policy_grpclb", "grpc_lb_policy_pick_first", "grpc_lb_policy_round_robin", @@ -4932,6 +4933,7 @@ "grpc_resolver_dns_native", "grpc_resolver_sockaddr", "grpc_secure", + "grpc_transport_chttp2", "grpc_transport_chttp2_client_insecure", "grpc_transport_chttp2_client_secure", "grpc_transport_chttp2_server_insecure", @@ -4951,6 +4953,8 @@ "deps": [ "gpr", "grpc_base", + "grpc_base", + "grpc_transport_chttp2", "grpc_transport_chttp2_client_secure", "grpc_transport_cronet_client_secure" ], @@ -5025,12 +5029,14 @@ "census", "gpr", "grpc_base", + "grpc_base", "grpc_lb_policy_grpclb", "grpc_lb_policy_pick_first", "grpc_lb_policy_round_robin", "grpc_load_reporting", "grpc_resolver_dns_native", "grpc_resolver_sockaddr", + "grpc_transport_chttp2", "grpc_transport_chttp2_client_insecure", "grpc_transport_chttp2_server_insecure" ], @@ -7405,12 +7411,33 @@ "third_party": false, "type": "filegroup" }, + { + "deps": [ + "grpc_base", + "grpc_transport_chttp2" + ], + "headers": [ + "src/core/ext/transport/chttp2/client/chttp2_connector.h" + ], + "is_filegroup": true, + "language": "c", + "name": "grpc_transport_chttp2_client_connector", + "src": [ + "src/core/ext/transport/chttp2/client/chttp2_connector.c", + "src/core/ext/transport/chttp2/client/chttp2_connector.h" + ], + "third_party": false, + "type": "filegroup" + }, { "deps": [ "gpr", "grpc_base", + "grpc_base", "grpc_client_channel", - "grpc_transport_chttp2" + "grpc_transport_chttp2", + "grpc_transport_chttp2", + "grpc_transport_chttp2_client_connector" ], "headers": [], "is_filegroup": true, @@ -7427,9 +7454,12 @@ "deps": [ "gpr", "grpc_base", + "grpc_base", "grpc_client_channel", "grpc_secure", - "grpc_transport_chttp2" + "grpc_transport_chttp2", + "grpc_transport_chttp2", + "grpc_transport_chttp2_client_connector" ], "headers": [], "is_filegroup": true, diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index d08a47aa86..96f36572d2 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -501,3397 +501,4 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_auth_context_test", "vcxproj\test\grpc_auth_context_test\grpc_auth_context_test.vcxproj", "{C65A4336-92D6-D6A0-EB86-E3AA425222D0}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_b64_test", "vcxproj\test\grpc_b64_test\grpc_b64_test.vcxproj", "{A19FD81D-DF19-B8A4-4A8A-6967217FEC85}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_byte_buffer_reader_test", "vcxproj\test\grpc_byte_buffer_reader_test\grpc_byte_buffer_reader_test.vcxproj", "{82124768-C986-6C10-8BCC-B255B7C84722}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_channel_args_test", "vcxproj\test\grpc_channel_args_test\grpc_channel_args_test.vcxproj", "{58FB566F-DCD5-3ECE-233E-C1FD13CA2185}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_channel_stack_test", "vcxproj\test\grpc_channel_stack_test\grpc_channel_stack_test.vcxproj", "{E3CEAFE1-8CE9-61F6-A720-E26662246B1F}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_completion_queue_test", "vcxproj\test\grpc_completion_queue_test\grpc_completion_queue_test.vcxproj", "{16CDF507-EB91-D76C-F0A7-A914ABFD8C17}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_create_jwt", "vcxproj\.\grpc_create_jwt\grpc_create_jwt.vcxproj", "{77971F8D-F583-3E77-0E3C-6C1FB6B1749C}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_credentials_test", "vcxproj\test\grpc_credentials_test\grpc_credentials_test.vcxproj", "{8305CC95-25CD-E15F-EA1A-11626FCF5AF9}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_fetch_oauth2", "vcxproj\test\grpc_fetch_oauth2\grpc_fetch_oauth2.vcxproj", "{43722E98-54EC-5058-3DAC-327F45964971}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_invalid_channel_args_test", "vcxproj\test\grpc_invalid_channel_args_test\grpc_invalid_channel_args_test.vcxproj", "{B50FD4F7-5628-9BEC-81B9-EB79A0A45577}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_jwt_verifier_test", "vcxproj\test\grpc_jwt_verifier_test\grpc_jwt_verifier_test.vcxproj", "{60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_print_google_default_creds_token", "vcxproj\.\grpc_print_google_default_creds_token\grpc_print_google_default_creds_token.vcxproj", "{C002965C-8457-CCE5-B1BA-E748FF9A11B6}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_security_connector_test", "vcxproj\test\grpc_security_connector_test\grpc_security_connector_test.vcxproj", "{74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "vcxproj\.\grpc_test_util\grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util_unsecure", "vcxproj\.\grpc_test_util_unsecure\grpc_test_util_unsecure.vcxproj", "{0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\grpc_unsecure\grpc_unsecure.vcxproj", "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_verify_jwt", "vcxproj\.\grpc_verify_jwt\grpc_verify_jwt.vcxproj", "{02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_census_nosec_test", "vcxproj\test/end2end/fixtures\h2_census_nosec_test\h2_census_nosec_test.vcxproj", "{A8039D43-910E-4248-2A22-74366E8C4DCD}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_census_test", "vcxproj\test/end2end/fixtures\h2_census_test\h2_census_test.vcxproj", "{9E4180B0-81ED-7305-333F-653CE9AB819B}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_nosec_test", "vcxproj\test/end2end/fixtures\h2_compress_nosec_test\h2_compress_nosec_test.vcxproj", "{42826C1F-DCF0-918E-D247-0376DC1EFD50}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_test", "vcxproj\test/end2end/fixtures\h2_compress_test\h2_compress_test.vcxproj", "{C7E516E9-B80F-4BC1-A617-095FC6E14BC9}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fakesec_test", "vcxproj\test/end2end/fixtures\h2_fakesec_test\h2_fakesec_test.vcxproj", "{0E980562-3AA0-91B1-C590-85C9A899BE44}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full+trace_nosec_test", "vcxproj\test/end2end/fixtures\h2_full+trace_nosec_test\h2_full+trace_nosec_test.vcxproj", "{DFD51943-4906-8051-7D66-6A7D50E0D87E}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full+trace_test", "vcxproj\test/end2end/fixtures\h2_full+trace_test\h2_full+trace_test.vcxproj", "{16C713C6-062E-F71F-A44C-52DC35494B27}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_nosec_test", "vcxproj\test/end2end/fixtures\h2_full_nosec_test\h2_full_nosec_test.vcxproj", "{345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_test", "vcxproj\test/end2end/fixtures\h2_full_test\h2_full_test.vcxproj", "{EEBEFA75-C625-C823-FE96-9AD64887B57D}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_http_proxy_nosec_test", "vcxproj\test/end2end/fixtures\h2_http_proxy_nosec_test\h2_http_proxy_nosec_test.vcxproj", "{58EA8DAE-6E50-45A3-0CCC-5165D824380E}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_http_proxy_test", "vcxproj\test/end2end/fixtures\h2_http_proxy_test\h2_http_proxy_test.vcxproj", "{C9076E5F-7297-67C2-F786-3CC4F26D8F8A}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_load_reporting_nosec_test", "vcxproj\test/end2end/fixtures\h2_load_reporting_nosec_test\h2_load_reporting_nosec_test.vcxproj", "{4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_load_reporting_test", "vcxproj\test/end2end/fixtures\h2_load_reporting_test\h2_load_reporting_test.vcxproj", "{F0A06723-2E3E-FE97-34B7-A2BA26D98B83}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_oauth2_test", "vcxproj\test/end2end/fixtures\h2_oauth2_test\h2_oauth2_test.vcxproj", "{0F761FF3-342A-C429-711F-F76181BAA52D}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_nosec_test", "vcxproj\test/end2end/fixtures\h2_proxy_nosec_test\h2_proxy_nosec_test.vcxproj", "{6EC72045-98CB-8A8D-9788-BC94209E23C8}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_test", "vcxproj\test/end2end/fixtures\h2_proxy_test\h2_proxy_test.vcxproj", "{5753B14F-0C69-2E56-6264-5541B2DCDF67}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_nosec_test", "vcxproj\test/end2end/fixtures\h2_sockpair+trace_nosec_test\h2_sockpair+trace_nosec_test.vcxproj", "{962380E0-1C06-8917-8F7F-1A02E0E93BE7}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_test", "vcxproj\test/end2end/fixtures\h2_sockpair+trace_test\h2_sockpair+trace_test.vcxproj", "{82878169-5A89-FD1E-31A6-E9F07BB92418}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_nosec_test", "vcxproj\test/end2end/fixtures\h2_sockpair_1byte_nosec_test\h2_sockpair_1byte_nosec_test.vcxproj", "{485E6713-487D-F274-BDE7-5D29300C93FE}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_test", "vcxproj\test/end2end/fixtures\h2_sockpair_1byte_test\h2_sockpair_1byte_test.vcxproj", "{03A65361-E139-5344-1868-8E8FC269C6E6}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_nosec_test", "vcxproj\test/end2end/fixtures\h2_sockpair_nosec_test\h2_sockpair_nosec_test.vcxproj", "{B3F26242-A43D-4F77-A84C-0F478741A061}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_test", "vcxproj\test/end2end/fixtures\h2_sockpair_test\h2_sockpair_test.vcxproj", "{67458AF8-A122-7740-F195-C2E74A106FAB}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_cert_test", "vcxproj\test/end2end/fixtures\h2_ssl_cert_test\h2_ssl_cert_test.vcxproj", "{B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_proxy_test", "vcxproj\test/end2end/fixtures\h2_ssl_proxy_test\h2_ssl_proxy_test.vcxproj", "{A9092608-E45E-AC96-6533-A6E7DD98211D}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_test", "vcxproj\test/end2end/fixtures\h2_ssl_test\h2_ssl_test.vcxproj", "{EA78D290-4098-FF04-C647-013F6B81E4E7}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "head_of_line_blocking_bad_client_test", "vcxproj\test\head_of_line_blocking_bad_client_test\head_of_line_blocking_bad_client_test.vcxproj", "{23DF0572-DBF1-08DA-8EAD-8508354C90A4}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {BA67B418-B699-E41A-9CC4-0279C49481A5} = {BA67B418-B699-E41A-9CC4-0279C49481A5} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "headers_bad_client_test", "vcxproj\test\headers_bad_client_test\headers_bad_client_test.vcxproj", "{7819A11E-607E-F0C0-FC47-C704CF7D818C}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {BA67B418-B699-E41A-9CC4-0279C49481A5} = {BA67B418-B699-E41A-9CC4-0279C49481A5} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hpack_parser_test", "vcxproj\test\hpack_parser_test\hpack_parser_test.vcxproj", "{4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hpack_table_test", "vcxproj\test\hpack_table_test\hpack_table_test.vcxproj", "{FF2CEE6D-850F-E22C-53A0-8C5912B14B20}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "http_parser_test", "vcxproj\test\http_parser_test\http_parser_test.vcxproj", "{49D7E690-BDA1-5236-1ABF-3D81C1559DF7}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "httpcli_format_request_test", "vcxproj\test\httpcli_format_request_test\httpcli_format_request_test.vcxproj", "{A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "init_test", "vcxproj\test\init_test\init_test.vcxproj", "{117CA7AD-C42B-9217-6C95-42A801777BC5}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "initial_settings_frame_bad_client_test", "vcxproj\test\initial_settings_frame_bad_client_test\initial_settings_frame_bad_client_test.vcxproj", "{6756895E-05BF-8CC7-58F2-868DF0C0300C}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {BA67B418-B699-E41A-9CC4-0279C49481A5} = {BA67B418-B699-E41A-9CC4-0279C49481A5} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "internal_api_canary_iomgr_test", "vcxproj\test\internal_api_canary_iomgr_test\internal_api_canary_iomgr_test.vcxproj", "{28AE726B-1BFB-202B-48D2-41AF9D09B9EA}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "internal_api_canary_support_test", "vcxproj\test\internal_api_canary_support_test\internal_api_canary_support_test.vcxproj", "{D53575C6-713C-E6E3-FD74-E65F20916498}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "internal_api_canary_transport_test", "vcxproj\test\internal_api_canary_transport_test\internal_api_canary_transport_test.vcxproj", "{ED24E700-964E-B426-6A6A-1944E2EF7BCB}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "invalid_call_argument_test", "vcxproj\test\invalid_call_argument_test\invalid_call_argument_test.vcxproj", "{C32CA8A3-58E6-8EB9-B72F-C295547D36A6}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "json_rewrite", "vcxproj\test\json_rewrite\json_rewrite.vcxproj", "{57B36FF6-25B1-2475-D07A-2E9097E2C792}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "json_rewrite_test", "vcxproj\test\json_rewrite_test\json_rewrite_test.vcxproj", "{DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "json_stream_error_test", "vcxproj\test\json_stream_error_test\json_stream_error_test.vcxproj", "{8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "json_test", "vcxproj\test\json_test\json_test.vcxproj", "{05230AC7-4529-E6CF-0506-A063B5FF6642}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lame_client_test", "vcxproj\test\lame_client_test\lame_client_test.vcxproj", "{6E60B394-E17D-658A-6648-A2E6E183226F}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "large_metadata_bad_client_test", "vcxproj\test\large_metadata_bad_client_test\large_metadata_bad_client_test.vcxproj", "{B706A9EC-7982-0DBC-495D-07B165F6CF56}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {BA67B418-B699-E41A-9CC4-0279C49481A5} = {BA67B418-B699-E41A-9CC4-0279C49481A5} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lb_policies_test", "vcxproj\test\lb_policies_test\lb_policies_test.vcxproj", "{62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "load_file_test", "vcxproj\test\load_file_test\load_file_test.vcxproj", "{DC76C089-0D55-DF19-7CCA-49DAE5D29E49}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "message_compress_test", "vcxproj\test\message_compress_test\message_compress_test.vcxproj", "{07170557-CCB0-D23C-8018-C2909D115DF9}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mlog_test", "vcxproj\test\mlog_test\mlog_test.vcxproj", "{9345E329-80F3-DED4-FDC3-BF63FCEA2C03}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multiple_server_queues_test", "vcxproj\test\multiple_server_queues_test\multiple_server_queues_test.vcxproj", "{88AF688E-E43C-5E20-6966-CF559F597D82}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "murmur_hash_test", "vcxproj\test\murmur_hash_test\murmur_hash_test.vcxproj", "{0B136077-8522-3C25-7704-1C386C9FDCD5}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "no_server_test", "vcxproj\test\no_server_test\no_server_test.vcxproj", "{A66AC548-E2B9-74CD-293C-43526EE51DCE}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "percent_encoding_test", "vcxproj\test\percent_encoding_test\percent_encoding_test.vcxproj", "{CCFC6A58-623D-9013-BFEB-C809809E2429}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "resolve_address_test", "vcxproj\test\resolve_address_test\resolve_address_test.vcxproj", "{8279AF6C-9584-67F3-1547-B204864FCCA7}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "resource_quota_test", "vcxproj\test\resource_quota_test\resource_quota_test.vcxproj", "{6084F546-5D66-5CB5-63CF-DC960F14B545}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "secure_channel_create_test", "vcxproj\test\secure_channel_create_test\secure_channel_create_test.vcxproj", "{62B25398-7173-928E-689E-53860B0ACFC4}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "secure_endpoint_test", "vcxproj\test\secure_endpoint_test\secure_endpoint_test.vcxproj", "{A7747106-A6BC-62D4-2A21-04A4F0CC2683}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sequential_connectivity_test", "vcxproj\test\sequential_connectivity_test\sequential_connectivity_test.vcxproj", "{F164F666-C866-D607-E1DF-E7BF3CF98255}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server_chttp2_test", "vcxproj\test\server_chttp2_test\server_chttp2_test.vcxproj", "{BF9F909B-8266-6AAC-A81B-05F8210AA8CA}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server_registered_method_bad_client_test", "vcxproj\test\server_registered_method_bad_client_test\server_registered_method_bad_client_test.vcxproj", "{B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {BA67B418-B699-E41A-9CC4-0279C49481A5} = {BA67B418-B699-E41A-9CC4-0279C49481A5} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server_test", "vcxproj\test\server_test\server_test.vcxproj", "{E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "set_initial_connect_string_test", "vcxproj\test\set_initial_connect_string_test\set_initial_connect_string_test.vcxproj", "{4A48E5A5-2E69-ED6D-063C-C297180A54D0}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {E3110C46-A148-FF65-08FD-3324829BE7FE} = {E3110C46-A148-FF65-08FD-3324829BE7FE} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple_request_bad_client_test", "vcxproj\test\simple_request_bad_client_test\simple_request_bad_client_test.vcxproj", "{63422647-93FA-46BB-4827-95473D9D503C}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {BA67B418-B699-E41A-9CC4-0279C49481A5} = {BA67B418-B699-E41A-9CC4-0279C49481A5} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slice_buffer_test", "vcxproj\test\slice_buffer_test\slice_buffer_test.vcxproj", "{F0FA4A41-5695-580A-DCDA-EC719CB041B0}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slice_string_helpers_test", "vcxproj\test\slice_string_helpers_test\slice_string_helpers_test.vcxproj", "{419167BB-C3F5-DDEA-403A-394D1902DE65}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slice_test", "vcxproj\test\slice_test\slice_test.vcxproj", "{D6DC2CF8-F263-49B1-DE13-D44D94BCF337}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sockaddr_resolver_test", "vcxproj\test\sockaddr_resolver_test\sockaddr_resolver_test.vcxproj", "{9889A80C-F1D7-99C9-FE7E-657724BEDC62}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sockaddr_utils_test", "vcxproj\test\sockaddr_utils_test\sockaddr_utils_test.vcxproj", "{529771F0-10B0-9B1A-1E7E-8A8E01870348}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_tcp_server", "vcxproj\.\test_tcp_server\test_tcp_server.vcxproj", "{E3110C46-A148-FF65-08FD-3324829BE7FE}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "time_averaged_stats_test", "vcxproj\test\time_averaged_stats_test\time_averaged_stats_test.vcxproj", "{D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timeout_encoding_test", "vcxproj\test\timeout_encoding_test\timeout_encoding_test.vcxproj", "{EA073C36-A527-F749-AD4A-243A38B9BFF5}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timer_heap_test", "vcxproj\test\timer_heap_test\timer_heap_test.vcxproj", "{A2110C60-E75A-F76E-205E-1836F86C4D53}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timer_list_test", "vcxproj\test\timer_list_test\timer_list_test.vcxproj", "{C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "transport_connectivity_state_test", "vcxproj\test\transport_connectivity_state_test\transport_connectivity_state_test.vcxproj", "{659121F6-1639-AC6B-053E-9D17A8B94D56}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "transport_metadata_test", "vcxproj\test\transport_metadata_test\transport_metadata_test.vcxproj", "{89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "transport_pid_controller_test", "vcxproj\test\transport_pid_controller_test\transport_pid_controller_test.vcxproj", "{B8790A2E-1106-2510-9D95-32C1D68E72EE}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unknown_frame_bad_client_test", "vcxproj\test\unknown_frame_bad_client_test\unknown_frame_bad_client_test.vcxproj", "{9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {BA67B418-B699-E41A-9CC4-0279C49481A5} = {BA67B418-B699-E41A-9CC4-0279C49481A5} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uri_parser_test", "vcxproj\test\uri_parser_test\uri_parser_test.vcxproj", "{E35C24A0-8725-E773-FE78-CC0C67071EF7}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "window_overflow_bad_client_test", "vcxproj\test\window_overflow_bad_client_test\window_overflow_bad_client_test.vcxproj", "{658D7F7F-9628-6545-743C-D949301DC5DC}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {BA67B418-B699-E41A-9CC4-0279C49481A5} = {BA67B418-B699-E41A-9CC4-0279C49481A5} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Debug-DLL|Win32 = Debug-DLL|Win32 - Debug-DLL|x64 = Debug-DLL|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - Release-DLL|Win32 = Release-DLL|Win32 - Release-DLL|x64 = Release-DLL|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug|x64.ActiveCfg = Debug|x64 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Release|Win32.ActiveCfg = Release|Win32 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Release|x64.ActiveCfg = Release|x64 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug|Win32.Build.0 = Debug|Win32 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug|x64.Build.0 = Debug|x64 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Release|Win32.Build.0 = Release|Win32 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Release|x64.Build.0 = Release|x64 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug-DLL|x64.Build.0 = Debug|x64 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Release-DLL|Win32.Build.0 = Release|Win32 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Release-DLL|x64.ActiveCfg = Release|x64 - {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Release-DLL|x64.Build.0 = Release|x64 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Debug|Win32.ActiveCfg = Debug|Win32 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Debug|x64.ActiveCfg = Debug|x64 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Release|Win32.ActiveCfg = Release|Win32 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Release|x64.ActiveCfg = Release|x64 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Debug|Win32.Build.0 = Debug|Win32 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Debug|x64.Build.0 = Debug|x64 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Release|Win32.Build.0 = Release|Win32 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Release|x64.Build.0 = Release|x64 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Debug-DLL|x64.Build.0 = Debug|x64 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Release-DLL|Win32.Build.0 = Release|Win32 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Release-DLL|x64.ActiveCfg = Release|x64 - {216FDCB2-9D93-0D86-F0F1-12E16312A191}.Release-DLL|x64.Build.0 = Release|x64 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Debug|Win32.ActiveCfg = Debug|Win32 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Debug|x64.ActiveCfg = Debug|x64 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Release|Win32.ActiveCfg = Release|Win32 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Release|x64.ActiveCfg = Release|x64 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Debug|Win32.Build.0 = Debug|Win32 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Debug|x64.Build.0 = Debug|x64 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Release|Win32.Build.0 = Release|Win32 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Release|x64.Build.0 = Release|x64 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Debug-DLL|x64.Build.0 = Debug|x64 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Release-DLL|Win32.Build.0 = Release|Win32 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Release-DLL|x64.ActiveCfg = Release|x64 - {DD37D527-9DFF-1F53-B97F-50CF80AE0650}.Release-DLL|x64.Build.0 = Release|x64 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Debug|Win32.ActiveCfg = Debug|Win32 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Debug|x64.ActiveCfg = Debug|x64 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Release|Win32.ActiveCfg = Release|Win32 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Release|x64.ActiveCfg = Release|x64 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Debug|Win32.Build.0 = Debug|Win32 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Debug|x64.Build.0 = Debug|x64 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Release|Win32.Build.0 = Release|Win32 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Release|x64.Build.0 = Release|x64 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Debug-DLL|x64.Build.0 = Debug|x64 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Release-DLL|Win32.Build.0 = Release|Win32 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Release-DLL|x64.ActiveCfg = Release|x64 - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3}.Release-DLL|x64.Build.0 = Release|x64 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Debug|Win32.ActiveCfg = Debug|Win32 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Debug|x64.ActiveCfg = Debug|x64 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Release|Win32.ActiveCfg = Release|Win32 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Release|x64.ActiveCfg = Release|x64 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Debug|Win32.Build.0 = Debug|Win32 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Debug|x64.Build.0 = Debug|x64 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Release|Win32.Build.0 = Release|Win32 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Release|x64.Build.0 = Release|x64 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Debug-DLL|x64.Build.0 = Debug|x64 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Release-DLL|Win32.Build.0 = Release|Win32 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Release-DLL|x64.ActiveCfg = Release|x64 - {BA67B418-B699-E41A-9CC4-0279C49481A5}.Release-DLL|x64.Build.0 = Release|x64 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug|Win32.ActiveCfg = Debug|Win32 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug|x64.ActiveCfg = Debug|x64 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release|Win32.ActiveCfg = Release|Win32 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release|x64.ActiveCfg = Release|x64 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug|Win32.Build.0 = Debug|Win32 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug|x64.Build.0 = Debug|x64 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release|Win32.Build.0 = Release|Win32 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release|x64.Build.0 = Release|x64 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug-DLL|x64.Build.0 = Debug|x64 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release-DLL|Win32.Build.0 = Release|Win32 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release-DLL|x64.ActiveCfg = Release|x64 - {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release-DLL|x64.Build.0 = Release|x64 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Debug|Win32.ActiveCfg = Debug|Win32 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Debug|x64.ActiveCfg = Debug|x64 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Release|Win32.ActiveCfg = Release|Win32 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Release|x64.ActiveCfg = Release|x64 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Debug|Win32.Build.0 = Debug|Win32 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Debug|x64.Build.0 = Debug|x64 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Release|Win32.Build.0 = Release|Win32 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Release|x64.Build.0 = Release|x64 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Debug-DLL|x64.Build.0 = Debug|x64 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Release-DLL|Win32.Build.0 = Release|Win32 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Release-DLL|x64.ActiveCfg = Release|x64 - {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Release-DLL|x64.Build.0 = Release|x64 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Debug|Win32.ActiveCfg = Debug|Win32 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Debug|x64.ActiveCfg = Debug|x64 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Release|Win32.ActiveCfg = Release|Win32 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Release|x64.ActiveCfg = Release|x64 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Debug|Win32.Build.0 = Debug|Win32 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Debug|x64.Build.0 = Debug|x64 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Release|Win32.Build.0 = Release|Win32 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Release|x64.Build.0 = Release|x64 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Debug-DLL|x64.Build.0 = Debug|x64 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Release-DLL|Win32.Build.0 = Release|Win32 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Release-DLL|x64.ActiveCfg = Release|x64 - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B}.Release-DLL|x64.Build.0 = Release|x64 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Debug|Win32.ActiveCfg = Debug|Win32 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Debug|x64.ActiveCfg = Debug|x64 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release|Win32.ActiveCfg = Release|Win32 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release|x64.ActiveCfg = Release|x64 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Debug|Win32.Build.0 = Debug|Win32 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Debug|x64.Build.0 = Debug|x64 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release|Win32.Build.0 = Release|Win32 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release|x64.Build.0 = Release|x64 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Debug-DLL|x64.Build.0 = Debug|x64 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|Win32.Build.0 = Release|Win32 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|x64.ActiveCfg = Release|x64 - {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|x64.Build.0 = Release|x64 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug|Win32.ActiveCfg = Debug|Win32 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug|x64.ActiveCfg = Debug|x64 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release|Win32.ActiveCfg = Release|Win32 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release|x64.ActiveCfg = Release|x64 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug|Win32.Build.0 = Debug|Win32 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug|x64.Build.0 = Debug|x64 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release|Win32.Build.0 = Release|Win32 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release|x64.Build.0 = Release|x64 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug-DLL|x64.Build.0 = Debug|x64 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release-DLL|Win32.Build.0 = Release|Win32 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release-DLL|x64.ActiveCfg = Release|x64 - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release-DLL|x64.Build.0 = Release|x64 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|Win32.ActiveCfg = Debug|Win32 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|x64.ActiveCfg = Debug|x64 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|Win32.ActiveCfg = Release|Win32 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|x64.ActiveCfg = Release|x64 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|Win32.Build.0 = Debug|Win32 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|x64.Build.0 = Debug|x64 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|Win32.Build.0 = Release|Win32 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|x64.Build.0 = Release|x64 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|x64.Build.0 = Debug|x64 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|Win32.Build.0 = Release|Win32 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|x64.ActiveCfg = Release|x64 - {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|x64.Build.0 = Release|x64 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Debug|Win32.ActiveCfg = Debug|Win32 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Debug|x64.ActiveCfg = Debug|x64 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Release|Win32.ActiveCfg = Release|Win32 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Release|x64.ActiveCfg = Release|x64 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Debug|Win32.Build.0 = Debug|Win32 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Debug|x64.Build.0 = Debug|x64 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Release|Win32.Build.0 = Release|Win32 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Release|x64.Build.0 = Release|x64 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Debug-DLL|x64.Build.0 = Debug|x64 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Release-DLL|Win32.Build.0 = Release|Win32 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Release-DLL|x64.ActiveCfg = Release|x64 - {14511310-FAE4-C287-31DC-D6F456D10AF3}.Release-DLL|x64.Build.0 = Release|x64 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug|Win32.ActiveCfg = Debug|Win32 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug|x64.ActiveCfg = Debug|x64 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Release|Win32.ActiveCfg = Release|Win32 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Release|x64.ActiveCfg = Release|x64 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug|Win32.Build.0 = Debug|Win32 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug|x64.Build.0 = Debug|x64 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Release|Win32.Build.0 = Release|Win32 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Release|x64.Build.0 = Release|x64 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug-DLL|x64.Build.0 = Debug|x64 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Release-DLL|Win32.Build.0 = Release|Win32 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Release-DLL|x64.ActiveCfg = Release|x64 - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Release-DLL|x64.Build.0 = Release|x64 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Debug|Win32.ActiveCfg = Debug|Win32 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Debug|x64.ActiveCfg = Debug|x64 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Release|Win32.ActiveCfg = Release|Win32 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Release|x64.ActiveCfg = Release|x64 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Debug|Win32.Build.0 = Debug|Win32 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Debug|x64.Build.0 = Debug|x64 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Release|Win32.Build.0 = Release|Win32 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Release|x64.Build.0 = Release|x64 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Debug-DLL|x64.Build.0 = Debug|x64 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Release-DLL|Win32.Build.0 = Release|Win32 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Release-DLL|x64.ActiveCfg = Release|x64 - {19F92966-3B0E-4FF8-CD7C-435D353E079E}.Release-DLL|x64.Build.0 = Release|x64 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Debug|Win32.ActiveCfg = Debug|Win32 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Debug|x64.ActiveCfg = Debug|x64 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Release|Win32.ActiveCfg = Release|Win32 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Release|x64.ActiveCfg = Release|x64 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Debug|Win32.Build.0 = Debug|Win32 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Debug|x64.Build.0 = Debug|x64 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Release|Win32.Build.0 = Release|Win32 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Release|x64.Build.0 = Release|x64 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Debug-DLL|x64.Build.0 = Debug|x64 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Release-DLL|Win32.Build.0 = Release|Win32 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Release-DLL|x64.ActiveCfg = Release|x64 - {ABAD3D2C-078C-7850-B413-3352A07C6176}.Release-DLL|x64.Build.0 = Release|x64 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Debug|Win32.ActiveCfg = Debug|Win32 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Debug|x64.ActiveCfg = Debug|x64 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Release|Win32.ActiveCfg = Release|Win32 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Release|x64.ActiveCfg = Release|x64 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Debug|Win32.Build.0 = Debug|Win32 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Debug|x64.Build.0 = Debug|x64 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Release|Win32.Build.0 = Release|Win32 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Release|x64.Build.0 = Release|x64 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Debug-DLL|x64.Build.0 = Debug|x64 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Release-DLL|Win32.Build.0 = Release|Win32 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Release-DLL|x64.ActiveCfg = Release|x64 - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4}.Release-DLL|x64.Build.0 = Release|x64 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Debug|x64.ActiveCfg = Debug|x64 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Release|Win32.ActiveCfg = Release|Win32 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Release|x64.ActiveCfg = Release|x64 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Debug|Win32.Build.0 = Debug|Win32 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Debug|x64.Build.0 = Debug|x64 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Release|Win32.Build.0 = Release|Win32 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Release|x64.Build.0 = Release|x64 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Debug-DLL|x64.Build.0 = Debug|x64 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Release-DLL|Win32.Build.0 = Release|Win32 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Release-DLL|x64.ActiveCfg = Release|x64 - {6B29F634-1277-74B8-47F6-78756190BA7B}.Release-DLL|x64.Build.0 = Release|x64 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Debug|Win32.ActiveCfg = Debug|Win32 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Debug|x64.ActiveCfg = Debug|x64 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Release|Win32.ActiveCfg = Release|Win32 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Release|x64.ActiveCfg = Release|x64 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Debug|Win32.Build.0 = Debug|Win32 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Debug|x64.Build.0 = Debug|x64 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Release|Win32.Build.0 = Release|Win32 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Release|x64.Build.0 = Release|x64 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Debug-DLL|x64.Build.0 = Debug|x64 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Release-DLL|Win32.Build.0 = Release|Win32 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Release-DLL|x64.ActiveCfg = Release|x64 - {C237D1E4-8825-80BA-1FC3-5E147E53E96E}.Release-DLL|x64.Build.0 = Release|x64 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Debug|x64.ActiveCfg = Debug|x64 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Release|Win32.ActiveCfg = Release|Win32 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Release|x64.ActiveCfg = Release|x64 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Debug|Win32.Build.0 = Debug|Win32 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Debug|x64.Build.0 = Debug|x64 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Release|Win32.Build.0 = Release|Win32 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Release|x64.Build.0 = Release|x64 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Debug-DLL|x64.Build.0 = Debug|x64 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Release-DLL|Win32.Build.0 = Release|Win32 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Release-DLL|x64.ActiveCfg = Release|x64 - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0}.Release-DLL|x64.Build.0 = Release|x64 - {391B366C-D916-45AA-3FE5-67363A46193B}.Debug|Win32.ActiveCfg = Debug|Win32 - {391B366C-D916-45AA-3FE5-67363A46193B}.Debug|x64.ActiveCfg = Debug|x64 - {391B366C-D916-45AA-3FE5-67363A46193B}.Release|Win32.ActiveCfg = Release|Win32 - {391B366C-D916-45AA-3FE5-67363A46193B}.Release|x64.ActiveCfg = Release|x64 - {391B366C-D916-45AA-3FE5-67363A46193B}.Debug|Win32.Build.0 = Debug|Win32 - {391B366C-D916-45AA-3FE5-67363A46193B}.Debug|x64.Build.0 = Debug|x64 - {391B366C-D916-45AA-3FE5-67363A46193B}.Release|Win32.Build.0 = Release|Win32 - {391B366C-D916-45AA-3FE5-67363A46193B}.Release|x64.Build.0 = Release|x64 - {391B366C-D916-45AA-3FE5-67363A46193B}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {391B366C-D916-45AA-3FE5-67363A46193B}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {391B366C-D916-45AA-3FE5-67363A46193B}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {391B366C-D916-45AA-3FE5-67363A46193B}.Debug-DLL|x64.Build.0 = Debug|x64 - {391B366C-D916-45AA-3FE5-67363A46193B}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {391B366C-D916-45AA-3FE5-67363A46193B}.Release-DLL|Win32.Build.0 = Release|Win32 - {391B366C-D916-45AA-3FE5-67363A46193B}.Release-DLL|x64.ActiveCfg = Release|x64 - {391B366C-D916-45AA-3FE5-67363A46193B}.Release-DLL|x64.Build.0 = Release|x64 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Debug|Win32.ActiveCfg = Debug|Win32 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Debug|x64.ActiveCfg = Debug|x64 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release|Win32.ActiveCfg = Release|Win32 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release|x64.ActiveCfg = Release|x64 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Debug|Win32.Build.0 = Debug|Win32 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Debug|x64.Build.0 = Debug|x64 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release|Win32.Build.0 = Release|Win32 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release|x64.Build.0 = Release|x64 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Debug-DLL|x64.Build.0 = Debug|x64 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release-DLL|Win32.Build.0 = Release|Win32 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release-DLL|x64.ActiveCfg = Release|x64 - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release-DLL|x64.Build.0 = Release|x64 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug|Win32.ActiveCfg = Debug|Win32 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug|x64.ActiveCfg = Debug|x64 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release|Win32.ActiveCfg = Release|Win32 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release|x64.ActiveCfg = Release|x64 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug|Win32.Build.0 = Debug|Win32 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug|x64.Build.0 = Debug|x64 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release|Win32.Build.0 = Release|Win32 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release|x64.Build.0 = Release|x64 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug-DLL|x64.Build.0 = Debug|x64 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release-DLL|Win32.Build.0 = Release|Win32 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release-DLL|x64.ActiveCfg = Release|x64 - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release-DLL|x64.Build.0 = Release|x64 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug|x64.ActiveCfg = Debug|x64 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Release|Win32.ActiveCfg = Release|Win32 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Release|x64.ActiveCfg = Release|x64 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug|Win32.Build.0 = Debug|Win32 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug|x64.Build.0 = Debug|x64 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Release|Win32.Build.0 = Release|Win32 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Release|x64.Build.0 = Release|x64 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug-DLL|x64.Build.0 = Debug|x64 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Release-DLL|Win32.Build.0 = Release|Win32 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Release-DLL|x64.ActiveCfg = Release|x64 - {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Release-DLL|x64.Build.0 = Release|x64 - {D06E10DC-272A-5203-7066-2698A247DF26}.Debug|Win32.ActiveCfg = Debug|Win32 - {D06E10DC-272A-5203-7066-2698A247DF26}.Debug|x64.ActiveCfg = Debug|x64 - {D06E10DC-272A-5203-7066-2698A247DF26}.Release|Win32.ActiveCfg = Release|Win32 - {D06E10DC-272A-5203-7066-2698A247DF26}.Release|x64.ActiveCfg = Release|x64 - {D06E10DC-272A-5203-7066-2698A247DF26}.Debug|Win32.Build.0 = Debug|Win32 - {D06E10DC-272A-5203-7066-2698A247DF26}.Debug|x64.Build.0 = Debug|x64 - {D06E10DC-272A-5203-7066-2698A247DF26}.Release|Win32.Build.0 = Release|Win32 - {D06E10DC-272A-5203-7066-2698A247DF26}.Release|x64.Build.0 = Release|x64 - {D06E10DC-272A-5203-7066-2698A247DF26}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {D06E10DC-272A-5203-7066-2698A247DF26}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {D06E10DC-272A-5203-7066-2698A247DF26}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {D06E10DC-272A-5203-7066-2698A247DF26}.Debug-DLL|x64.Build.0 = Debug|x64 - {D06E10DC-272A-5203-7066-2698A247DF26}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {D06E10DC-272A-5203-7066-2698A247DF26}.Release-DLL|Win32.Build.0 = Release|Win32 - {D06E10DC-272A-5203-7066-2698A247DF26}.Release-DLL|x64.ActiveCfg = Release|x64 - {D06E10DC-272A-5203-7066-2698A247DF26}.Release-DLL|x64.Build.0 = Release|x64 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Debug|Win32.ActiveCfg = Debug|Win32 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Debug|x64.ActiveCfg = Debug|x64 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release|Win32.ActiveCfg = Release|Win32 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release|x64.ActiveCfg = Release|x64 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Debug|Win32.Build.0 = Debug|Win32 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Debug|x64.Build.0 = Debug|x64 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release|Win32.Build.0 = Release|Win32 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release|x64.Build.0 = Release|x64 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Debug-DLL|x64.Build.0 = Debug|x64 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release-DLL|Win32.Build.0 = Release|Win32 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release-DLL|x64.ActiveCfg = Release|x64 - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release-DLL|x64.Build.0 = Release|x64 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Debug|Win32.ActiveCfg = Debug|Win32 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Debug|x64.ActiveCfg = Debug|x64 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Release|Win32.ActiveCfg = Release|Win32 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Release|x64.ActiveCfg = Release|x64 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Debug|Win32.Build.0 = Debug|Win32 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Debug|x64.Build.0 = Debug|x64 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Release|Win32.Build.0 = Release|Win32 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Release|x64.Build.0 = Release|x64 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Debug-DLL|x64.Build.0 = Debug|x64 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Release-DLL|Win32.Build.0 = Release|Win32 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Release-DLL|x64.ActiveCfg = Release|x64 - {1F1F9084-2A93-B80E-364F-5754894AFAB4}.Release-DLL|x64.Build.0 = Release|x64 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Debug|Win32.ActiveCfg = Debug|Win32 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Debug|x64.ActiveCfg = Debug|x64 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Release|Win32.ActiveCfg = Release|Win32 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Release|x64.ActiveCfg = Release|x64 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Debug|Win32.Build.0 = Debug|Win32 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Debug|x64.Build.0 = Debug|x64 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Release|Win32.Build.0 = Release|Win32 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Release|x64.Build.0 = Release|x64 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Debug-DLL|x64.Build.0 = Debug|x64 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Release-DLL|Win32.Build.0 = Release|Win32 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Release-DLL|x64.ActiveCfg = Release|x64 - {37166D50-3AAA-1156-19F6-5901DFA55172}.Release-DLL|x64.Build.0 = Release|x64 - {0647D598-9611-F659-EA36-DF995C9F736B}.Debug|Win32.ActiveCfg = Debug|Win32 - {0647D598-9611-F659-EA36-DF995C9F736B}.Debug|x64.ActiveCfg = Debug|x64 - {0647D598-9611-F659-EA36-DF995C9F736B}.Release|Win32.ActiveCfg = Release|Win32 - {0647D598-9611-F659-EA36-DF995C9F736B}.Release|x64.ActiveCfg = Release|x64 - {0647D598-9611-F659-EA36-DF995C9F736B}.Debug|Win32.Build.0 = Debug|Win32 - {0647D598-9611-F659-EA36-DF995C9F736B}.Debug|x64.Build.0 = Debug|x64 - {0647D598-9611-F659-EA36-DF995C9F736B}.Release|Win32.Build.0 = Release|Win32 - {0647D598-9611-F659-EA36-DF995C9F736B}.Release|x64.Build.0 = Release|x64 - {0647D598-9611-F659-EA36-DF995C9F736B}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {0647D598-9611-F659-EA36-DF995C9F736B}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {0647D598-9611-F659-EA36-DF995C9F736B}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {0647D598-9611-F659-EA36-DF995C9F736B}.Debug-DLL|x64.Build.0 = Debug|x64 - {0647D598-9611-F659-EA36-DF995C9F736B}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {0647D598-9611-F659-EA36-DF995C9F736B}.Release-DLL|Win32.Build.0 = Release|Win32 - {0647D598-9611-F659-EA36-DF995C9F736B}.Release-DLL|x64.ActiveCfg = Release|x64 - {0647D598-9611-F659-EA36-DF995C9F736B}.Release-DLL|x64.Build.0 = Release|x64 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Debug|Win32.ActiveCfg = Debug|Win32 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Debug|x64.ActiveCfg = Debug|x64 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Release|Win32.ActiveCfg = Release|Win32 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Release|x64.ActiveCfg = Release|x64 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Debug|Win32.Build.0 = Debug|Win32 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Debug|x64.Build.0 = Debug|x64 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Release|Win32.Build.0 = Release|Win32 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Release|x64.Build.0 = Release|x64 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Debug-DLL|x64.Build.0 = Debug|x64 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Release-DLL|Win32.Build.0 = Release|Win32 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Release-DLL|x64.ActiveCfg = Release|x64 - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9}.Release-DLL|x64.Build.0 = Release|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug|Win32.ActiveCfg = Debug|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug|x64.ActiveCfg = Debug|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release|Win32.ActiveCfg = Release|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release|x64.ActiveCfg = Release|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug|Win32.Build.0 = Debug|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug|x64.Build.0 = Debug|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release|Win32.Build.0 = Release|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release|x64.Build.0 = Release|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug-DLL|x64.Build.0 = Debug|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release-DLL|Win32.Build.0 = Release|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release-DLL|x64.ActiveCfg = Release|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release-DLL|x64.Build.0 = Release|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug|Win32.ActiveCfg = Debug|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug|x64.ActiveCfg = Debug|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release|Win32.ActiveCfg = Release|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release|x64.ActiveCfg = Release|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug|Win32.Build.0 = Debug|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug|x64.Build.0 = Debug|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release|Win32.Build.0 = Release|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release|x64.Build.0 = Release|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug-DLL|x64.Build.0 = Debug|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|Win32.Build.0 = Release|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|x64.ActiveCfg = Release|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|x64.Build.0 = Release|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|Win32.ActiveCfg = Debug|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|x64.ActiveCfg = Debug|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|Win32.ActiveCfg = Release|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|x64.ActiveCfg = Release|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|Win32.Build.0 = Debug|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|x64.Build.0 = Debug|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|Win32.Build.0 = Release|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|x64.Build.0 = Release|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|x64.Build.0 = Debug|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|Win32.Build.0 = Release|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|x64.ActiveCfg = Release|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|x64.Build.0 = Release|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.ActiveCfg = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|x64.ActiveCfg = Debug|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.ActiveCfg = Release|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|x64.ActiveCfg = Release|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.Build.0 = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|x64.Build.0 = Debug|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.Build.0 = Release|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|x64.Build.0 = Release|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug-DLL|x64.Build.0 = Debug|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release-DLL|Win32.Build.0 = Release|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release-DLL|x64.ActiveCfg = Release|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release-DLL|x64.Build.0 = Release|x64 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Debug|Win32.ActiveCfg = Debug|Win32 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Debug|x64.ActiveCfg = Debug|x64 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Release|Win32.ActiveCfg = Release|Win32 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Release|x64.ActiveCfg = Release|x64 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Debug|Win32.Build.0 = Debug|Win32 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Debug|x64.Build.0 = Debug|x64 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Release|Win32.Build.0 = Release|Win32 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Release|x64.Build.0 = Release|x64 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Debug-DLL|x64.Build.0 = Debug|x64 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Release-DLL|Win32.Build.0 = Release|Win32 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Release-DLL|x64.ActiveCfg = Release|x64 - {144D8CFF-2737-A18A-DCFD-01603533D63F}.Release-DLL|x64.Build.0 = Release|x64 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug|Win32.ActiveCfg = Debug|Win32 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug|x64.ActiveCfg = Debug|x64 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release|Win32.ActiveCfg = Release|Win32 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release|x64.ActiveCfg = Release|x64 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug|Win32.Build.0 = Debug|Win32 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug|x64.Build.0 = Debug|x64 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release|Win32.Build.0 = Release|Win32 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release|x64.Build.0 = Release|x64 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug-DLL|x64.Build.0 = Debug|x64 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release-DLL|Win32.Build.0 = Release|Win32 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release-DLL|x64.ActiveCfg = Release|x64 - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release-DLL|x64.Build.0 = Release|x64 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Debug|Win32.ActiveCfg = Debug|Win32 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Debug|x64.ActiveCfg = Debug|x64 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Release|Win32.ActiveCfg = Release|Win32 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Release|x64.ActiveCfg = Release|x64 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Debug|Win32.Build.0 = Debug|Win32 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Debug|x64.Build.0 = Debug|x64 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Release|Win32.Build.0 = Release|Win32 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Release|x64.Build.0 = Release|x64 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Debug-DLL|x64.Build.0 = Debug|x64 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Release-DLL|Win32.Build.0 = Release|Win32 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Release-DLL|x64.ActiveCfg = Release|x64 - {10668A5D-65CD-F530-22D0-747B395B4C26}.Release-DLL|x64.Build.0 = Release|x64 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Debug|Win32.ActiveCfg = Debug|Win32 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Debug|x64.ActiveCfg = Debug|x64 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Release|Win32.ActiveCfg = Release|Win32 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Release|x64.ActiveCfg = Release|x64 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Debug|Win32.Build.0 = Debug|Win32 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Debug|x64.Build.0 = Debug|x64 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Release|Win32.Build.0 = Release|Win32 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Release|x64.Build.0 = Release|x64 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Debug-DLL|x64.Build.0 = Debug|x64 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Release-DLL|Win32.Build.0 = Release|Win32 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Release-DLL|x64.ActiveCfg = Release|x64 - {0CB6DF66-4346-CCD0-C94B-318321C46501}.Release-DLL|x64.Build.0 = Release|x64 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Debug|Win32.ActiveCfg = Debug|Win32 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Debug|x64.ActiveCfg = Debug|x64 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Release|Win32.ActiveCfg = Release|Win32 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Release|x64.ActiveCfg = Release|x64 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Debug|Win32.Build.0 = Debug|Win32 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Debug|x64.Build.0 = Debug|x64 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Release|Win32.Build.0 = Release|Win32 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Release|x64.Build.0 = Release|x64 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Debug-DLL|x64.Build.0 = Debug|x64 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Release-DLL|Win32.Build.0 = Release|Win32 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Release-DLL|x64.ActiveCfg = Release|x64 - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8}.Release-DLL|x64.Build.0 = Release|x64 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Debug|Win32.ActiveCfg = Debug|Win32 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Debug|x64.ActiveCfg = Debug|x64 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Release|Win32.ActiveCfg = Release|Win32 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Release|x64.ActiveCfg = Release|x64 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Debug|Win32.Build.0 = Debug|Win32 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Debug|x64.Build.0 = Debug|x64 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Release|Win32.Build.0 = Release|Win32 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Release|x64.Build.0 = Release|x64 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Debug-DLL|x64.Build.0 = Debug|x64 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Release-DLL|Win32.Build.0 = Release|Win32 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Release-DLL|x64.ActiveCfg = Release|x64 - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11}.Release-DLL|x64.Build.0 = Release|x64 - {64728265-92F9-103E-6720-8935385458DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {64728265-92F9-103E-6720-8935385458DF}.Debug|x64.ActiveCfg = Debug|x64 - {64728265-92F9-103E-6720-8935385458DF}.Release|Win32.ActiveCfg = Release|Win32 - {64728265-92F9-103E-6720-8935385458DF}.Release|x64.ActiveCfg = Release|x64 - {64728265-92F9-103E-6720-8935385458DF}.Debug|Win32.Build.0 = Debug|Win32 - {64728265-92F9-103E-6720-8935385458DF}.Debug|x64.Build.0 = Debug|x64 - {64728265-92F9-103E-6720-8935385458DF}.Release|Win32.Build.0 = Release|Win32 - {64728265-92F9-103E-6720-8935385458DF}.Release|x64.Build.0 = Release|x64 - {64728265-92F9-103E-6720-8935385458DF}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {64728265-92F9-103E-6720-8935385458DF}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {64728265-92F9-103E-6720-8935385458DF}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {64728265-92F9-103E-6720-8935385458DF}.Debug-DLL|x64.Build.0 = Debug|x64 - {64728265-92F9-103E-6720-8935385458DF}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {64728265-92F9-103E-6720-8935385458DF}.Release-DLL|Win32.Build.0 = Release|Win32 - {64728265-92F9-103E-6720-8935385458DF}.Release-DLL|x64.ActiveCfg = Release|x64 - {64728265-92F9-103E-6720-8935385458DF}.Release-DLL|x64.Build.0 = Release|x64 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Debug|Win32.ActiveCfg = Debug|Win32 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Debug|x64.ActiveCfg = Debug|x64 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Release|Win32.ActiveCfg = Release|Win32 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Release|x64.ActiveCfg = Release|x64 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Debug|Win32.Build.0 = Debug|Win32 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Debug|x64.Build.0 = Debug|x64 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Release|Win32.Build.0 = Release|Win32 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Release|x64.Build.0 = Release|x64 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Debug-DLL|x64.Build.0 = Debug|x64 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Release-DLL|Win32.Build.0 = Release|Win32 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Release-DLL|x64.ActiveCfg = Release|x64 - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Release-DLL|x64.Build.0 = Release|x64 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Debug|x64.ActiveCfg = Debug|x64 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Release|Win32.ActiveCfg = Release|Win32 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Release|x64.ActiveCfg = Release|x64 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Debug|Win32.Build.0 = Debug|Win32 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Debug|x64.Build.0 = Debug|x64 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Release|Win32.Build.0 = Release|Win32 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Release|x64.Build.0 = Release|x64 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Debug-DLL|x64.Build.0 = Debug|x64 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Release-DLL|Win32.Build.0 = Release|Win32 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Release-DLL|x64.ActiveCfg = Release|x64 - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6}.Release-DLL|x64.Build.0 = Release|x64 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Debug|x64.ActiveCfg = Debug|x64 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Release|Win32.ActiveCfg = Release|Win32 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Release|x64.ActiveCfg = Release|x64 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Debug|Win32.Build.0 = Debug|Win32 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Debug|x64.Build.0 = Debug|x64 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Release|Win32.Build.0 = Release|Win32 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Release|x64.Build.0 = Release|x64 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Debug-DLL|x64.Build.0 = Debug|x64 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Release-DLL|Win32.Build.0 = Release|Win32 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Release-DLL|x64.ActiveCfg = Release|x64 - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}.Release-DLL|x64.Build.0 = Release|x64 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Debug|Win32.ActiveCfg = Debug|Win32 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Debug|x64.ActiveCfg = Debug|x64 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Release|Win32.ActiveCfg = Release|Win32 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Release|x64.ActiveCfg = Release|x64 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Debug|Win32.Build.0 = Debug|Win32 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Debug|x64.Build.0 = Debug|x64 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Release|Win32.Build.0 = Release|Win32 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Release|x64.Build.0 = Release|x64 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Debug-DLL|x64.Build.0 = Debug|x64 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Release-DLL|Win32.Build.0 = Release|Win32 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Release-DLL|x64.ActiveCfg = Release|x64 - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2}.Release-DLL|x64.Build.0 = Release|x64 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Debug|Win32.ActiveCfg = Debug|Win32 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Debug|x64.ActiveCfg = Debug|x64 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Release|Win32.ActiveCfg = Release|Win32 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Release|x64.ActiveCfg = Release|x64 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Debug|Win32.Build.0 = Debug|Win32 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Debug|x64.Build.0 = Debug|x64 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Release|Win32.Build.0 = Release|Win32 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Release|x64.Build.0 = Release|x64 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Debug-DLL|x64.Build.0 = Debug|x64 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Release-DLL|Win32.Build.0 = Release|Win32 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Release-DLL|x64.ActiveCfg = Release|x64 - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A}.Release-DLL|x64.Build.0 = Release|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug|Win32.ActiveCfg = Debug|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug|x64.ActiveCfg = Debug|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release|Win32.ActiveCfg = Release|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release|x64.ActiveCfg = Release|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug|Win32.Build.0 = Debug|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug|x64.Build.0 = Debug|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release|Win32.Build.0 = Release|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release|x64.Build.0 = Release|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug-DLL|x64.Build.0 = Debug|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release-DLL|Win32.Build.0 = Release|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release-DLL|x64.ActiveCfg = Release|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release-DLL|x64.Build.0 = Release|x64 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Debug|Win32.ActiveCfg = Debug|Win32 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Debug|x64.ActiveCfg = Debug|x64 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Release|Win32.ActiveCfg = Release|Win32 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Release|x64.ActiveCfg = Release|x64 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Debug|Win32.Build.0 = Debug|Win32 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Debug|x64.Build.0 = Debug|x64 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Release|Win32.Build.0 = Release|Win32 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Release|x64.Build.0 = Release|x64 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Debug-DLL|x64.Build.0 = Debug|x64 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Release-DLL|Win32.Build.0 = Release|Win32 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Release-DLL|x64.ActiveCfg = Release|x64 - {459B2FAC-5FC8-1F47-8053-66D46EA39A49}.Release-DLL|x64.Build.0 = Release|x64 - {9779680E-3218-1528-E922-605871A20C3F}.Debug|Win32.ActiveCfg = Debug|Win32 - {9779680E-3218-1528-E922-605871A20C3F}.Debug|x64.ActiveCfg = Debug|x64 - {9779680E-3218-1528-E922-605871A20C3F}.Release|Win32.ActiveCfg = Release|Win32 - {9779680E-3218-1528-E922-605871A20C3F}.Release|x64.ActiveCfg = Release|x64 - {9779680E-3218-1528-E922-605871A20C3F}.Debug|Win32.Build.0 = Debug|Win32 - {9779680E-3218-1528-E922-605871A20C3F}.Debug|x64.Build.0 = Debug|x64 - {9779680E-3218-1528-E922-605871A20C3F}.Release|Win32.Build.0 = Release|Win32 - {9779680E-3218-1528-E922-605871A20C3F}.Release|x64.Build.0 = Release|x64 - {9779680E-3218-1528-E922-605871A20C3F}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {9779680E-3218-1528-E922-605871A20C3F}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {9779680E-3218-1528-E922-605871A20C3F}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {9779680E-3218-1528-E922-605871A20C3F}.Debug-DLL|x64.Build.0 = Debug|x64 - {9779680E-3218-1528-E922-605871A20C3F}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {9779680E-3218-1528-E922-605871A20C3F}.Release-DLL|Win32.Build.0 = Release|Win32 - {9779680E-3218-1528-E922-605871A20C3F}.Release-DLL|x64.ActiveCfg = Release|x64 - {9779680E-3218-1528-E922-605871A20C3F}.Release-DLL|x64.Build.0 = Release|x64 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Debug|x64.ActiveCfg = Debug|x64 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Release|Win32.ActiveCfg = Release|Win32 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Release|x64.ActiveCfg = Release|x64 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Debug|Win32.Build.0 = Debug|Win32 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Debug|x64.Build.0 = Debug|x64 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Release|Win32.Build.0 = Release|Win32 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Release|x64.Build.0 = Release|x64 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Debug-DLL|x64.Build.0 = Debug|x64 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Release-DLL|Win32.Build.0 = Release|Win32 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Release-DLL|x64.ActiveCfg = Release|x64 - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE}.Release-DLL|x64.Build.0 = Release|x64 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Debug|Win32.ActiveCfg = Debug|Win32 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Debug|x64.ActiveCfg = Debug|x64 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Release|Win32.ActiveCfg = Release|Win32 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Release|x64.ActiveCfg = Release|x64 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Debug|Win32.Build.0 = Debug|Win32 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Debug|x64.Build.0 = Debug|x64 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Release|Win32.Build.0 = Release|Win32 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Release|x64.Build.0 = Release|x64 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Debug-DLL|x64.Build.0 = Debug|x64 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Release-DLL|Win32.Build.0 = Release|Win32 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Release-DLL|x64.ActiveCfg = Release|x64 - {40B790A8-BB01-9F12-5309-C0BEA97C75BC}.Release-DLL|x64.Build.0 = Release|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.ActiveCfg = Debug|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|x64.ActiveCfg = Debug|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.ActiveCfg = Release|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|x64.ActiveCfg = Release|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.Build.0 = Debug|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|x64.Build.0 = Debug|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.Build.0 = Release|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|x64.Build.0 = Release|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug-DLL|Win32.ActiveCfg = Debug-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug-DLL|Win32.Build.0 = Debug-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug-DLL|x64.ActiveCfg = Debug-DLL|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug-DLL|x64.Build.0 = Debug-DLL|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|Win32.ActiveCfg = Release-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.Build.0 = Release-DLL|x64 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Debug|x64.ActiveCfg = Debug|x64 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Release|Win32.ActiveCfg = Release|Win32 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Release|x64.ActiveCfg = Release|x64 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Debug|Win32.Build.0 = Debug|Win32 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Debug|x64.Build.0 = Debug|x64 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Release|Win32.Build.0 = Release|Win32 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Release|x64.Build.0 = Release|x64 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Debug-DLL|x64.Build.0 = Debug|x64 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Release-DLL|Win32.Build.0 = Release|Win32 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Release-DLL|x64.ActiveCfg = Release|x64 - {C65A4336-92D6-D6A0-EB86-E3AA425222D0}.Release-DLL|x64.Build.0 = Release|x64 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Debug|Win32.ActiveCfg = Debug|Win32 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Debug|x64.ActiveCfg = Debug|x64 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Release|Win32.ActiveCfg = Release|Win32 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Release|x64.ActiveCfg = Release|x64 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Debug|Win32.Build.0 = Debug|Win32 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Debug|x64.Build.0 = Debug|x64 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Release|Win32.Build.0 = Release|Win32 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Release|x64.Build.0 = Release|x64 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Debug-DLL|x64.Build.0 = Debug|x64 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Release-DLL|Win32.Build.0 = Release|Win32 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Release-DLL|x64.ActiveCfg = Release|x64 - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85}.Release-DLL|x64.Build.0 = Release|x64 - {82124768-C986-6C10-8BCC-B255B7C84722}.Debug|Win32.ActiveCfg = Debug|Win32 - {82124768-C986-6C10-8BCC-B255B7C84722}.Debug|x64.ActiveCfg = Debug|x64 - {82124768-C986-6C10-8BCC-B255B7C84722}.Release|Win32.ActiveCfg = Release|Win32 - {82124768-C986-6C10-8BCC-B255B7C84722}.Release|x64.ActiveCfg = Release|x64 - {82124768-C986-6C10-8BCC-B255B7C84722}.Debug|Win32.Build.0 = Debug|Win32 - {82124768-C986-6C10-8BCC-B255B7C84722}.Debug|x64.Build.0 = Debug|x64 - {82124768-C986-6C10-8BCC-B255B7C84722}.Release|Win32.Build.0 = Release|Win32 - {82124768-C986-6C10-8BCC-B255B7C84722}.Release|x64.Build.0 = Release|x64 - {82124768-C986-6C10-8BCC-B255B7C84722}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {82124768-C986-6C10-8BCC-B255B7C84722}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {82124768-C986-6C10-8BCC-B255B7C84722}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {82124768-C986-6C10-8BCC-B255B7C84722}.Debug-DLL|x64.Build.0 = Debug|x64 - {82124768-C986-6C10-8BCC-B255B7C84722}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {82124768-C986-6C10-8BCC-B255B7C84722}.Release-DLL|Win32.Build.0 = Release|Win32 - {82124768-C986-6C10-8BCC-B255B7C84722}.Release-DLL|x64.ActiveCfg = Release|x64 - {82124768-C986-6C10-8BCC-B255B7C84722}.Release-DLL|x64.Build.0 = Release|x64 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Debug|Win32.ActiveCfg = Debug|Win32 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Debug|x64.ActiveCfg = Debug|x64 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Release|Win32.ActiveCfg = Release|Win32 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Release|x64.ActiveCfg = Release|x64 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Debug|Win32.Build.0 = Debug|Win32 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Debug|x64.Build.0 = Debug|x64 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Release|Win32.Build.0 = Release|Win32 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Release|x64.Build.0 = Release|x64 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Debug-DLL|x64.Build.0 = Debug|x64 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Release-DLL|Win32.Build.0 = Release|Win32 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Release-DLL|x64.ActiveCfg = Release|x64 - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185}.Release-DLL|x64.Build.0 = Release|x64 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Debug|Win32.ActiveCfg = Debug|Win32 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Debug|x64.ActiveCfg = Debug|x64 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Release|Win32.ActiveCfg = Release|Win32 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Release|x64.ActiveCfg = Release|x64 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Debug|Win32.Build.0 = Debug|Win32 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Debug|x64.Build.0 = Debug|x64 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Release|Win32.Build.0 = Release|Win32 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Release|x64.Build.0 = Release|x64 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Debug-DLL|x64.Build.0 = Debug|x64 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Release-DLL|Win32.Build.0 = Release|Win32 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Release-DLL|x64.ActiveCfg = Release|x64 - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F}.Release-DLL|x64.Build.0 = Release|x64 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Debug|Win32.ActiveCfg = Debug|Win32 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Debug|x64.ActiveCfg = Debug|x64 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Release|Win32.ActiveCfg = Release|Win32 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Release|x64.ActiveCfg = Release|x64 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Debug|Win32.Build.0 = Debug|Win32 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Debug|x64.Build.0 = Debug|x64 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Release|Win32.Build.0 = Release|Win32 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Release|x64.Build.0 = Release|x64 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Debug-DLL|x64.Build.0 = Debug|x64 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Release-DLL|Win32.Build.0 = Release|Win32 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Release-DLL|x64.ActiveCfg = Release|x64 - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17}.Release-DLL|x64.Build.0 = Release|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug|Win32.ActiveCfg = Debug|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug|x64.ActiveCfg = Debug|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release|Win32.ActiveCfg = Release|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release|x64.ActiveCfg = Release|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug|Win32.Build.0 = Debug|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug|x64.Build.0 = Debug|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release|Win32.Build.0 = Release|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release|x64.Build.0 = Release|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug-DLL|x64.Build.0 = Debug|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release-DLL|Win32.Build.0 = Release|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release-DLL|x64.ActiveCfg = Release|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release-DLL|x64.Build.0 = Release|x64 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Debug|Win32.ActiveCfg = Debug|Win32 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Debug|x64.ActiveCfg = Debug|x64 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Release|Win32.ActiveCfg = Release|Win32 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Release|x64.ActiveCfg = Release|x64 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Debug|Win32.Build.0 = Debug|Win32 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Debug|x64.Build.0 = Debug|x64 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Release|Win32.Build.0 = Release|Win32 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Release|x64.Build.0 = Release|x64 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Debug-DLL|x64.Build.0 = Debug|x64 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Release-DLL|Win32.Build.0 = Release|Win32 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Release-DLL|x64.ActiveCfg = Release|x64 - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9}.Release-DLL|x64.Build.0 = Release|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug|Win32.ActiveCfg = Debug|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug|x64.ActiveCfg = Debug|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Release|Win32.ActiveCfg = Release|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Release|x64.ActiveCfg = Release|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug|Win32.Build.0 = Debug|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug|x64.Build.0 = Debug|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Release|Win32.Build.0 = Release|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Release|x64.Build.0 = Release|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug-DLL|x64.Build.0 = Debug|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Release-DLL|Win32.Build.0 = Release|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Release-DLL|x64.ActiveCfg = Release|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Release-DLL|x64.Build.0 = Release|x64 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Debug|x64.ActiveCfg = Debug|x64 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Release|Win32.ActiveCfg = Release|Win32 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Release|x64.ActiveCfg = Release|x64 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Debug|Win32.Build.0 = Debug|Win32 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Debug|x64.Build.0 = Debug|x64 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Release|Win32.Build.0 = Release|Win32 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Release|x64.Build.0 = Release|x64 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Debug-DLL|x64.Build.0 = Debug|x64 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Release-DLL|Win32.Build.0 = Release|Win32 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Release-DLL|x64.ActiveCfg = Release|x64 - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577}.Release-DLL|x64.Build.0 = Release|x64 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Debug|Win32.ActiveCfg = Debug|Win32 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Debug|x64.ActiveCfg = Debug|x64 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Release|Win32.ActiveCfg = Release|Win32 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Release|x64.ActiveCfg = Release|x64 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Debug|Win32.Build.0 = Debug|Win32 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Debug|x64.Build.0 = Debug|x64 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Release|Win32.Build.0 = Release|Win32 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Release|x64.Build.0 = Release|x64 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Debug-DLL|x64.Build.0 = Debug|x64 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Release-DLL|Win32.Build.0 = Release|Win32 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Release-DLL|x64.ActiveCfg = Release|x64 - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751}.Release-DLL|x64.Build.0 = Release|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug|Win32.ActiveCfg = Debug|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug|x64.ActiveCfg = Debug|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release|Win32.ActiveCfg = Release|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release|x64.ActiveCfg = Release|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug|Win32.Build.0 = Debug|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug|x64.Build.0 = Debug|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release|Win32.Build.0 = Release|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release|x64.Build.0 = Release|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug-DLL|x64.Build.0 = Debug|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release-DLL|Win32.Build.0 = Release|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release-DLL|x64.ActiveCfg = Release|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release-DLL|x64.Build.0 = Release|x64 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Debug|Win32.ActiveCfg = Debug|Win32 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Debug|x64.ActiveCfg = Debug|x64 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Release|Win32.ActiveCfg = Release|Win32 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Release|x64.ActiveCfg = Release|x64 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Debug|Win32.Build.0 = Debug|Win32 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Debug|x64.Build.0 = Debug|x64 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Release|Win32.Build.0 = Release|Win32 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Release|x64.Build.0 = Release|x64 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Debug-DLL|x64.Build.0 = Debug|x64 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Release-DLL|Win32.Build.0 = Release|Win32 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Release-DLL|x64.ActiveCfg = Release|x64 - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68}.Release-DLL|x64.Build.0 = Release|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.ActiveCfg = Debug|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|x64.ActiveCfg = Debug|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.ActiveCfg = Release|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|x64.ActiveCfg = Release|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.Build.0 = Debug|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|x64.Build.0 = Debug|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.Build.0 = Release|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|x64.Build.0 = Release|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug-DLL|x64.Build.0 = Debug|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release-DLL|Win32.Build.0 = Release|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release-DLL|x64.ActiveCfg = Release|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release-DLL|x64.Build.0 = Release|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug|Win32.ActiveCfg = Debug|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug|x64.ActiveCfg = Debug|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release|Win32.ActiveCfg = Release|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release|x64.ActiveCfg = Release|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug|Win32.Build.0 = Debug|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug|x64.Build.0 = Debug|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release|Win32.Build.0 = Release|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release|x64.Build.0 = Release|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug-DLL|x64.Build.0 = Debug|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release-DLL|Win32.Build.0 = Release|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release-DLL|x64.ActiveCfg = Release|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release-DLL|x64.Build.0 = Release|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|Win32.ActiveCfg = Debug|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|x64.ActiveCfg = Debug|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|Win32.ActiveCfg = Release|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|x64.ActiveCfg = Release|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|Win32.Build.0 = Debug|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|x64.Build.0 = Debug|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|Win32.Build.0 = Release|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|x64.Build.0 = Release|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug-DLL|Win32.ActiveCfg = Debug-DLL|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug-DLL|Win32.Build.0 = Debug-DLL|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug-DLL|x64.ActiveCfg = Debug-DLL|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug-DLL|x64.Build.0 = Debug-DLL|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release-DLL|Win32.ActiveCfg = Release-DLL|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release-DLL|x64.Build.0 = Release-DLL|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug|Win32.ActiveCfg = Debug|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug|x64.ActiveCfg = Debug|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release|Win32.ActiveCfg = Release|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release|x64.ActiveCfg = Release|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug|Win32.Build.0 = Debug|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug|x64.Build.0 = Debug|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release|Win32.Build.0 = Release|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release|x64.Build.0 = Release|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug-DLL|x64.Build.0 = Debug|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|Win32.Build.0 = Release|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.ActiveCfg = Release|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.Build.0 = Release|x64 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug|Win32.ActiveCfg = Debug|Win32 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug|x64.ActiveCfg = Debug|x64 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Release|Win32.ActiveCfg = Release|Win32 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Release|x64.ActiveCfg = Release|x64 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug|Win32.Build.0 = Debug|Win32 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug|x64.Build.0 = Debug|x64 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Release|Win32.Build.0 = Release|Win32 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Release|x64.Build.0 = Release|x64 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug-DLL|x64.Build.0 = Debug|x64 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Release-DLL|Win32.Build.0 = Release|Win32 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Release-DLL|x64.ActiveCfg = Release|x64 - {A8039D43-910E-4248-2A22-74366E8C4DCD}.Release-DLL|x64.Build.0 = Release|x64 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Debug|Win32.ActiveCfg = Debug|Win32 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Debug|x64.ActiveCfg = Debug|x64 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Release|Win32.ActiveCfg = Release|Win32 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Release|x64.ActiveCfg = Release|x64 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Debug|Win32.Build.0 = Debug|Win32 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Debug|x64.Build.0 = Debug|x64 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Release|Win32.Build.0 = Release|Win32 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Release|x64.Build.0 = Release|x64 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Debug-DLL|x64.Build.0 = Debug|x64 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Release-DLL|Win32.Build.0 = Release|Win32 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Release-DLL|x64.ActiveCfg = Release|x64 - {9E4180B0-81ED-7305-333F-653CE9AB819B}.Release-DLL|x64.Build.0 = Release|x64 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Debug|Win32.ActiveCfg = Debug|Win32 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Debug|x64.ActiveCfg = Debug|x64 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Release|Win32.ActiveCfg = Release|Win32 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Release|x64.ActiveCfg = Release|x64 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Debug|Win32.Build.0 = Debug|Win32 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Debug|x64.Build.0 = Debug|x64 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Release|Win32.Build.0 = Release|Win32 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Release|x64.Build.0 = Release|x64 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Debug-DLL|x64.Build.0 = Debug|x64 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Release-DLL|Win32.Build.0 = Release|Win32 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Release-DLL|x64.ActiveCfg = Release|x64 - {42826C1F-DCF0-918E-D247-0376DC1EFD50}.Release-DLL|x64.Build.0 = Release|x64 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Debug|Win32.ActiveCfg = Debug|Win32 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Debug|x64.ActiveCfg = Debug|x64 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release|Win32.ActiveCfg = Release|Win32 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release|x64.ActiveCfg = Release|x64 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Debug|Win32.Build.0 = Debug|Win32 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Debug|x64.Build.0 = Debug|x64 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release|Win32.Build.0 = Release|Win32 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release|x64.Build.0 = Release|x64 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Debug-DLL|x64.Build.0 = Debug|x64 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release-DLL|Win32.Build.0 = Release|Win32 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release-DLL|x64.ActiveCfg = Release|x64 - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release-DLL|x64.Build.0 = Release|x64 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug|x64.ActiveCfg = Debug|x64 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Release|Win32.ActiveCfg = Release|Win32 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Release|x64.ActiveCfg = Release|x64 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug|Win32.Build.0 = Debug|Win32 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug|x64.Build.0 = Debug|x64 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Release|Win32.Build.0 = Release|Win32 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Release|x64.Build.0 = Release|x64 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug-DLL|x64.Build.0 = Debug|x64 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Release-DLL|Win32.Build.0 = Release|Win32 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Release-DLL|x64.ActiveCfg = Release|x64 - {0E980562-3AA0-91B1-C590-85C9A899BE44}.Release-DLL|x64.Build.0 = Release|x64 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug|Win32.ActiveCfg = Debug|Win32 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug|x64.ActiveCfg = Debug|x64 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release|Win32.ActiveCfg = Release|Win32 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release|x64.ActiveCfg = Release|x64 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug|Win32.Build.0 = Debug|Win32 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug|x64.Build.0 = Debug|x64 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release|Win32.Build.0 = Release|Win32 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release|x64.Build.0 = Release|x64 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug-DLL|x64.Build.0 = Debug|x64 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release-DLL|Win32.Build.0 = Release|Win32 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release-DLL|x64.ActiveCfg = Release|x64 - {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release-DLL|x64.Build.0 = Release|x64 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug|Win32.ActiveCfg = Debug|Win32 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug|x64.ActiveCfg = Debug|x64 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Release|Win32.ActiveCfg = Release|Win32 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Release|x64.ActiveCfg = Release|x64 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug|Win32.Build.0 = Debug|Win32 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug|x64.Build.0 = Debug|x64 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Release|Win32.Build.0 = Release|Win32 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Release|x64.Build.0 = Release|x64 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug-DLL|x64.Build.0 = Debug|x64 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Release-DLL|Win32.Build.0 = Release|Win32 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Release-DLL|x64.ActiveCfg = Release|x64 - {16C713C6-062E-F71F-A44C-52DC35494B27}.Release-DLL|x64.Build.0 = Release|x64 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Debug|Win32.ActiveCfg = Debug|Win32 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Debug|x64.ActiveCfg = Debug|x64 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Release|Win32.ActiveCfg = Release|Win32 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Release|x64.ActiveCfg = Release|x64 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Debug|Win32.Build.0 = Debug|Win32 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Debug|x64.Build.0 = Debug|x64 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Release|Win32.Build.0 = Release|Win32 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Release|x64.Build.0 = Release|x64 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Debug-DLL|x64.Build.0 = Debug|x64 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Release-DLL|Win32.Build.0 = Release|Win32 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Release-DLL|x64.ActiveCfg = Release|x64 - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Release-DLL|x64.Build.0 = Release|x64 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Debug|Win32.ActiveCfg = Debug|Win32 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Debug|x64.ActiveCfg = Debug|x64 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release|Win32.ActiveCfg = Release|Win32 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release|x64.ActiveCfg = Release|x64 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Debug|Win32.Build.0 = Debug|Win32 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Debug|x64.Build.0 = Debug|x64 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release|Win32.Build.0 = Release|Win32 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release|x64.Build.0 = Release|x64 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Debug-DLL|x64.Build.0 = Debug|x64 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release-DLL|Win32.Build.0 = Release|Win32 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release-DLL|x64.ActiveCfg = Release|x64 - {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release-DLL|x64.Build.0 = Release|x64 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Debug|Win32.ActiveCfg = Debug|Win32 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Debug|x64.ActiveCfg = Debug|x64 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Release|Win32.ActiveCfg = Release|Win32 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Release|x64.ActiveCfg = Release|x64 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Debug|Win32.Build.0 = Debug|Win32 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Debug|x64.Build.0 = Debug|x64 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Release|Win32.Build.0 = Release|Win32 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Release|x64.Build.0 = Release|x64 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Debug-DLL|x64.Build.0 = Debug|x64 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Release-DLL|Win32.Build.0 = Release|Win32 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Release-DLL|x64.ActiveCfg = Release|x64 - {58EA8DAE-6E50-45A3-0CCC-5165D824380E}.Release-DLL|x64.Build.0 = Release|x64 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Debug|x64.ActiveCfg = Debug|x64 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Release|Win32.ActiveCfg = Release|Win32 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Release|x64.ActiveCfg = Release|x64 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Debug|Win32.Build.0 = Debug|Win32 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Debug|x64.Build.0 = Debug|x64 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Release|Win32.Build.0 = Release|Win32 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Release|x64.Build.0 = Release|x64 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Debug-DLL|x64.Build.0 = Debug|x64 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Release-DLL|Win32.Build.0 = Release|Win32 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Release-DLL|x64.ActiveCfg = Release|x64 - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A}.Release-DLL|x64.Build.0 = Release|x64 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug|Win32.ActiveCfg = Debug|Win32 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug|x64.ActiveCfg = Debug|x64 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release|Win32.ActiveCfg = Release|Win32 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release|x64.ActiveCfg = Release|x64 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug|Win32.Build.0 = Debug|Win32 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug|x64.Build.0 = Debug|x64 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release|Win32.Build.0 = Release|Win32 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release|x64.Build.0 = Release|x64 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Debug-DLL|x64.Build.0 = Debug|x64 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release-DLL|Win32.Build.0 = Release|Win32 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release-DLL|x64.ActiveCfg = Release|x64 - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF}.Release-DLL|x64.Build.0 = Release|x64 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug|Win32.ActiveCfg = Debug|Win32 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug|x64.ActiveCfg = Debug|x64 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release|Win32.ActiveCfg = Release|Win32 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release|x64.ActiveCfg = Release|x64 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug|Win32.Build.0 = Debug|Win32 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug|x64.Build.0 = Debug|x64 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release|Win32.Build.0 = Release|Win32 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release|x64.Build.0 = Release|x64 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Debug-DLL|x64.Build.0 = Debug|x64 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release-DLL|Win32.Build.0 = Release|Win32 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release-DLL|x64.ActiveCfg = Release|x64 - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83}.Release-DLL|x64.Build.0 = Release|x64 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug|x64.ActiveCfg = Debug|x64 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Release|Win32.ActiveCfg = Release|Win32 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Release|x64.ActiveCfg = Release|x64 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug|Win32.Build.0 = Debug|Win32 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug|x64.Build.0 = Debug|x64 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Release|Win32.Build.0 = Release|Win32 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Release|x64.Build.0 = Release|x64 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug-DLL|x64.Build.0 = Debug|x64 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Release-DLL|Win32.Build.0 = Release|Win32 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Release-DLL|x64.ActiveCfg = Release|x64 - {0F761FF3-342A-C429-711F-F76181BAA52D}.Release-DLL|x64.Build.0 = Release|x64 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug|Win32.ActiveCfg = Debug|Win32 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug|x64.ActiveCfg = Debug|x64 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Release|Win32.ActiveCfg = Release|Win32 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Release|x64.ActiveCfg = Release|x64 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug|Win32.Build.0 = Debug|Win32 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug|x64.Build.0 = Debug|x64 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Release|Win32.Build.0 = Release|Win32 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Release|x64.Build.0 = Release|x64 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug-DLL|x64.Build.0 = Debug|x64 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Release-DLL|Win32.Build.0 = Release|Win32 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Release-DLL|x64.ActiveCfg = Release|x64 - {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Release-DLL|x64.Build.0 = Release|x64 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Debug|Win32.ActiveCfg = Debug|Win32 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Debug|x64.ActiveCfg = Debug|x64 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Release|Win32.ActiveCfg = Release|Win32 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Release|x64.ActiveCfg = Release|x64 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Debug|Win32.Build.0 = Debug|Win32 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Debug|x64.Build.0 = Debug|x64 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Release|Win32.Build.0 = Release|Win32 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Release|x64.Build.0 = Release|x64 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Debug-DLL|x64.Build.0 = Debug|x64 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Release-DLL|Win32.Build.0 = Release|Win32 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Release-DLL|x64.ActiveCfg = Release|x64 - {5753B14F-0C69-2E56-6264-5541B2DCDF67}.Release-DLL|x64.Build.0 = Release|x64 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Debug|Win32.ActiveCfg = Debug|Win32 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Debug|x64.ActiveCfg = Debug|x64 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Release|Win32.ActiveCfg = Release|Win32 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Release|x64.ActiveCfg = Release|x64 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Debug|Win32.Build.0 = Debug|Win32 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Debug|x64.Build.0 = Debug|x64 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Release|Win32.Build.0 = Release|Win32 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Release|x64.Build.0 = Release|x64 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Debug-DLL|x64.Build.0 = Debug|x64 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Release-DLL|Win32.Build.0 = Release|Win32 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Release-DLL|x64.ActiveCfg = Release|x64 - {962380E0-1C06-8917-8F7F-1A02E0E93BE7}.Release-DLL|x64.Build.0 = Release|x64 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Debug|Win32.ActiveCfg = Debug|Win32 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Debug|x64.ActiveCfg = Debug|x64 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Release|Win32.ActiveCfg = Release|Win32 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Release|x64.ActiveCfg = Release|x64 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Debug|Win32.Build.0 = Debug|Win32 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Debug|x64.Build.0 = Debug|x64 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Release|Win32.Build.0 = Release|Win32 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Release|x64.Build.0 = Release|x64 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Debug-DLL|x64.Build.0 = Debug|x64 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Release-DLL|Win32.Build.0 = Release|Win32 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Release-DLL|x64.ActiveCfg = Release|x64 - {82878169-5A89-FD1E-31A6-E9F07BB92418}.Release-DLL|x64.Build.0 = Release|x64 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Debug|x64.ActiveCfg = Debug|x64 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Release|Win32.ActiveCfg = Release|Win32 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Release|x64.ActiveCfg = Release|x64 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Debug|Win32.Build.0 = Debug|Win32 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Debug|x64.Build.0 = Debug|x64 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Release|Win32.Build.0 = Release|Win32 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Release|x64.Build.0 = Release|x64 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Debug-DLL|x64.Build.0 = Debug|x64 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Release-DLL|Win32.Build.0 = Release|Win32 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Release-DLL|x64.ActiveCfg = Release|x64 - {485E6713-487D-F274-BDE7-5D29300C93FE}.Release-DLL|x64.Build.0 = Release|x64 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Debug|Win32.ActiveCfg = Debug|Win32 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Debug|x64.ActiveCfg = Debug|x64 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Release|Win32.ActiveCfg = Release|Win32 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Release|x64.ActiveCfg = Release|x64 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Debug|Win32.Build.0 = Debug|Win32 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Debug|x64.Build.0 = Debug|x64 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Release|Win32.Build.0 = Release|Win32 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Release|x64.Build.0 = Release|x64 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Debug-DLL|x64.Build.0 = Debug|x64 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Release-DLL|Win32.Build.0 = Release|Win32 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Release-DLL|x64.ActiveCfg = Release|x64 - {03A65361-E139-5344-1868-8E8FC269C6E6}.Release-DLL|x64.Build.0 = Release|x64 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Debug|x64.ActiveCfg = Debug|x64 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Release|Win32.ActiveCfg = Release|Win32 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Release|x64.ActiveCfg = Release|x64 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Debug|Win32.Build.0 = Debug|Win32 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Debug|x64.Build.0 = Debug|x64 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Release|Win32.Build.0 = Release|Win32 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Release|x64.Build.0 = Release|x64 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Debug-DLL|x64.Build.0 = Debug|x64 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Release-DLL|Win32.Build.0 = Release|Win32 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Release-DLL|x64.ActiveCfg = Release|x64 - {B3F26242-A43D-4F77-A84C-0F478741A061}.Release-DLL|x64.Build.0 = Release|x64 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Debug|Win32.ActiveCfg = Debug|Win32 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Debug|x64.ActiveCfg = Debug|x64 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Release|Win32.ActiveCfg = Release|Win32 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Release|x64.ActiveCfg = Release|x64 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Debug|Win32.Build.0 = Debug|Win32 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Debug|x64.Build.0 = Debug|x64 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Release|Win32.Build.0 = Release|Win32 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Release|x64.Build.0 = Release|x64 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Debug-DLL|x64.Build.0 = Debug|x64 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Release-DLL|Win32.Build.0 = Release|Win32 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Release-DLL|x64.ActiveCfg = Release|x64 - {67458AF8-A122-7740-F195-C2E74A106FAB}.Release-DLL|x64.Build.0 = Release|x64 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug|x64.ActiveCfg = Debug|x64 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release|Win32.ActiveCfg = Release|Win32 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release|x64.ActiveCfg = Release|x64 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug|Win32.Build.0 = Debug|Win32 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug|x64.Build.0 = Debug|x64 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release|Win32.Build.0 = Release|Win32 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release|x64.Build.0 = Release|x64 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug-DLL|x64.Build.0 = Debug|x64 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release-DLL|Win32.Build.0 = Release|Win32 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release-DLL|x64.ActiveCfg = Release|x64 - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release-DLL|x64.Build.0 = Release|x64 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Debug|Win32.ActiveCfg = Debug|Win32 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Debug|x64.ActiveCfg = Debug|x64 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release|Win32.ActiveCfg = Release|Win32 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release|x64.ActiveCfg = Release|x64 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Debug|Win32.Build.0 = Debug|Win32 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Debug|x64.Build.0 = Debug|x64 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release|Win32.Build.0 = Release|Win32 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release|x64.Build.0 = Release|x64 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Debug-DLL|x64.Build.0 = Debug|x64 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release-DLL|Win32.Build.0 = Release|Win32 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release-DLL|x64.ActiveCfg = Release|x64 - {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release-DLL|x64.Build.0 = Release|x64 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Debug|Win32.ActiveCfg = Debug|Win32 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Debug|x64.ActiveCfg = Debug|x64 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release|Win32.ActiveCfg = Release|Win32 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release|x64.ActiveCfg = Release|x64 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Debug|Win32.Build.0 = Debug|Win32 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Debug|x64.Build.0 = Debug|x64 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release|Win32.Build.0 = Release|Win32 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release|x64.Build.0 = Release|x64 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Debug-DLL|x64.Build.0 = Debug|x64 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|Win32.Build.0 = Release|Win32 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|x64.ActiveCfg = Release|x64 - {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|x64.Build.0 = Release|x64 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug|Win32.ActiveCfg = Debug|Win32 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug|x64.ActiveCfg = Debug|x64 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Release|Win32.ActiveCfg = Release|Win32 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Release|x64.ActiveCfg = Release|x64 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug|Win32.Build.0 = Debug|Win32 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug|x64.Build.0 = Debug|x64 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Release|Win32.Build.0 = Release|Win32 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Release|x64.Build.0 = Release|x64 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Debug-DLL|x64.Build.0 = Debug|x64 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Release-DLL|Win32.Build.0 = Release|Win32 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Release-DLL|x64.ActiveCfg = Release|x64 - {23DF0572-DBF1-08DA-8EAD-8508354C90A4}.Release-DLL|x64.Build.0 = Release|x64 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Debug|Win32.ActiveCfg = Debug|Win32 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Debug|x64.ActiveCfg = Debug|x64 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Release|Win32.ActiveCfg = Release|Win32 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Release|x64.ActiveCfg = Release|x64 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Debug|Win32.Build.0 = Debug|Win32 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Debug|x64.Build.0 = Debug|x64 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Release|Win32.Build.0 = Release|Win32 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Release|x64.Build.0 = Release|x64 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Debug-DLL|x64.Build.0 = Debug|x64 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Release-DLL|Win32.Build.0 = Release|Win32 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Release-DLL|x64.ActiveCfg = Release|x64 - {7819A11E-607E-F0C0-FC47-C704CF7D818C}.Release-DLL|x64.Build.0 = Release|x64 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Debug|Win32.ActiveCfg = Debug|Win32 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Debug|x64.ActiveCfg = Debug|x64 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Release|Win32.ActiveCfg = Release|Win32 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Release|x64.ActiveCfg = Release|x64 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Debug|Win32.Build.0 = Debug|Win32 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Debug|x64.Build.0 = Debug|x64 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Release|Win32.Build.0 = Release|Win32 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Release|x64.Build.0 = Release|x64 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Debug-DLL|x64.Build.0 = Debug|x64 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Release-DLL|Win32.Build.0 = Release|Win32 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Release-DLL|x64.ActiveCfg = Release|x64 - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA}.Release-DLL|x64.Build.0 = Release|x64 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Debug|Win32.ActiveCfg = Debug|Win32 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Debug|x64.ActiveCfg = Debug|x64 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Release|Win32.ActiveCfg = Release|Win32 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Release|x64.ActiveCfg = Release|x64 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Debug|Win32.Build.0 = Debug|Win32 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Debug|x64.Build.0 = Debug|x64 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Release|Win32.Build.0 = Release|Win32 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Release|x64.Build.0 = Release|x64 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Debug-DLL|x64.Build.0 = Debug|x64 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Release-DLL|Win32.Build.0 = Release|Win32 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Release-DLL|x64.ActiveCfg = Release|x64 - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Release-DLL|x64.Build.0 = Release|x64 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug|Win32.ActiveCfg = Debug|Win32 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug|x64.ActiveCfg = Debug|x64 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release|Win32.ActiveCfg = Release|Win32 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release|x64.ActiveCfg = Release|x64 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug|Win32.Build.0 = Debug|Win32 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug|x64.Build.0 = Debug|x64 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release|Win32.Build.0 = Release|Win32 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release|x64.Build.0 = Release|x64 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug-DLL|x64.Build.0 = Debug|x64 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release-DLL|Win32.Build.0 = Release|Win32 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release-DLL|x64.ActiveCfg = Release|x64 - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release-DLL|x64.Build.0 = Release|x64 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Debug|Win32.ActiveCfg = Debug|Win32 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Debug|x64.ActiveCfg = Debug|x64 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release|Win32.ActiveCfg = Release|Win32 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release|x64.ActiveCfg = Release|x64 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Debug|Win32.Build.0 = Debug|Win32 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Debug|x64.Build.0 = Debug|x64 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release|Win32.Build.0 = Release|Win32 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release|x64.Build.0 = Release|x64 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Debug-DLL|x64.Build.0 = Debug|x64 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release-DLL|Win32.Build.0 = Release|Win32 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release-DLL|x64.ActiveCfg = Release|x64 - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release-DLL|x64.Build.0 = Release|x64 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Debug|Win32.ActiveCfg = Debug|Win32 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Debug|x64.ActiveCfg = Debug|x64 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release|Win32.ActiveCfg = Release|Win32 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release|x64.ActiveCfg = Release|x64 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Debug|Win32.Build.0 = Debug|Win32 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Debug|x64.Build.0 = Debug|x64 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release|Win32.Build.0 = Release|Win32 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release|x64.Build.0 = Release|x64 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Debug-DLL|x64.Build.0 = Debug|x64 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release-DLL|Win32.Build.0 = Release|Win32 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release-DLL|x64.ActiveCfg = Release|x64 - {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release-DLL|x64.Build.0 = Release|x64 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Debug|Win32.ActiveCfg = Debug|Win32 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Debug|x64.ActiveCfg = Debug|x64 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release|Win32.ActiveCfg = Release|Win32 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release|x64.ActiveCfg = Release|x64 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Debug|Win32.Build.0 = Debug|Win32 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Debug|x64.Build.0 = Debug|x64 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release|Win32.Build.0 = Release|Win32 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release|x64.Build.0 = Release|x64 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Debug-DLL|x64.Build.0 = Debug|x64 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release-DLL|Win32.Build.0 = Release|Win32 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release-DLL|x64.ActiveCfg = Release|x64 - {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release-DLL|x64.Build.0 = Release|x64 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug|Win32.ActiveCfg = Debug|Win32 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug|x64.ActiveCfg = Debug|x64 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release|Win32.ActiveCfg = Release|Win32 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release|x64.ActiveCfg = Release|x64 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug|Win32.Build.0 = Debug|Win32 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug|x64.Build.0 = Debug|x64 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release|Win32.Build.0 = Release|Win32 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release|x64.Build.0 = Release|x64 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug-DLL|x64.Build.0 = Debug|x64 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release-DLL|Win32.Build.0 = Release|Win32 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release-DLL|x64.ActiveCfg = Release|x64 - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release-DLL|x64.Build.0 = Release|x64 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug|Win32.ActiveCfg = Debug|Win32 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug|x64.ActiveCfg = Debug|x64 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Release|Win32.ActiveCfg = Release|Win32 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Release|x64.ActiveCfg = Release|x64 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug|Win32.Build.0 = Debug|Win32 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug|x64.Build.0 = Debug|x64 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Release|Win32.Build.0 = Release|Win32 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Release|x64.Build.0 = Release|x64 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug-DLL|x64.Build.0 = Debug|x64 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Release-DLL|Win32.Build.0 = Release|Win32 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Release-DLL|x64.ActiveCfg = Release|x64 - {D53575C6-713C-E6E3-FD74-E65F20916498}.Release-DLL|x64.Build.0 = Release|x64 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug|Win32.ActiveCfg = Debug|Win32 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug|x64.ActiveCfg = Debug|x64 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release|Win32.ActiveCfg = Release|Win32 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release|x64.ActiveCfg = Release|x64 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug|Win32.Build.0 = Debug|Win32 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug|x64.Build.0 = Debug|x64 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release|Win32.Build.0 = Release|Win32 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release|x64.Build.0 = Release|x64 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug-DLL|x64.Build.0 = Debug|x64 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release-DLL|Win32.Build.0 = Release|Win32 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release-DLL|x64.ActiveCfg = Release|x64 - {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release-DLL|x64.Build.0 = Release|x64 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Debug|Win32.ActiveCfg = Debug|Win32 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Debug|x64.ActiveCfg = Debug|x64 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Release|Win32.ActiveCfg = Release|Win32 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Release|x64.ActiveCfg = Release|x64 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Debug|Win32.Build.0 = Debug|Win32 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Debug|x64.Build.0 = Debug|x64 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Release|Win32.Build.0 = Release|Win32 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Release|x64.Build.0 = Release|x64 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Debug-DLL|x64.Build.0 = Debug|x64 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Release-DLL|Win32.Build.0 = Release|Win32 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Release-DLL|x64.ActiveCfg = Release|x64 - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Release-DLL|x64.Build.0 = Release|x64 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Debug|Win32.ActiveCfg = Debug|Win32 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Debug|x64.ActiveCfg = Debug|x64 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Release|Win32.ActiveCfg = Release|Win32 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Release|x64.ActiveCfg = Release|x64 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Debug|Win32.Build.0 = Debug|Win32 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Debug|x64.Build.0 = Debug|x64 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Release|Win32.Build.0 = Release|Win32 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Release|x64.Build.0 = Release|x64 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Debug-DLL|x64.Build.0 = Debug|x64 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Release-DLL|Win32.Build.0 = Release|Win32 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Release-DLL|x64.ActiveCfg = Release|x64 - {57B36FF6-25B1-2475-D07A-2E9097E2C792}.Release-DLL|x64.Build.0 = Release|x64 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Debug|Win32.ActiveCfg = Debug|Win32 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Debug|x64.ActiveCfg = Debug|x64 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Release|Win32.ActiveCfg = Release|Win32 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Release|x64.ActiveCfg = Release|x64 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Debug|Win32.Build.0 = Debug|Win32 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Debug|x64.Build.0 = Debug|x64 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Release|Win32.Build.0 = Release|Win32 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Release|x64.Build.0 = Release|x64 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Debug-DLL|x64.Build.0 = Debug|x64 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Release-DLL|Win32.Build.0 = Release|Win32 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Release-DLL|x64.ActiveCfg = Release|x64 - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2}.Release-DLL|x64.Build.0 = Release|x64 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Debug|Win32.ActiveCfg = Debug|Win32 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Debug|x64.ActiveCfg = Debug|x64 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Release|Win32.ActiveCfg = Release|Win32 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Release|x64.ActiveCfg = Release|x64 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Debug|Win32.Build.0 = Debug|Win32 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Debug|x64.Build.0 = Debug|x64 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Release|Win32.Build.0 = Release|Win32 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Release|x64.Build.0 = Release|x64 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Debug-DLL|x64.Build.0 = Debug|x64 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Release-DLL|Win32.Build.0 = Release|Win32 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Release-DLL|x64.ActiveCfg = Release|x64 - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B}.Release-DLL|x64.Build.0 = Release|x64 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Debug|Win32.ActiveCfg = Debug|Win32 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Debug|x64.ActiveCfg = Debug|x64 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Release|Win32.ActiveCfg = Release|Win32 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Release|x64.ActiveCfg = Release|x64 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Debug|Win32.Build.0 = Debug|Win32 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Debug|x64.Build.0 = Debug|x64 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Release|Win32.Build.0 = Release|Win32 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Release|x64.Build.0 = Release|x64 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Debug-DLL|x64.Build.0 = Debug|x64 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Release-DLL|Win32.Build.0 = Release|Win32 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Release-DLL|x64.ActiveCfg = Release|x64 - {05230AC7-4529-E6CF-0506-A063B5FF6642}.Release-DLL|x64.Build.0 = Release|x64 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Debug|Win32.ActiveCfg = Debug|Win32 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Debug|x64.ActiveCfg = Debug|x64 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Release|Win32.ActiveCfg = Release|Win32 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Release|x64.ActiveCfg = Release|x64 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Debug|Win32.Build.0 = Debug|Win32 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Debug|x64.Build.0 = Debug|x64 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Release|Win32.Build.0 = Release|Win32 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Release|x64.Build.0 = Release|x64 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Debug-DLL|x64.Build.0 = Debug|x64 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Release-DLL|Win32.Build.0 = Release|Win32 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Release-DLL|x64.ActiveCfg = Release|x64 - {6E60B394-E17D-658A-6648-A2E6E183226F}.Release-DLL|x64.Build.0 = Release|x64 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|Win32.ActiveCfg = Debug|Win32 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|x64.ActiveCfg = Debug|x64 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|Win32.ActiveCfg = Release|Win32 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|x64.ActiveCfg = Release|x64 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|Win32.Build.0 = Debug|Win32 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|x64.Build.0 = Debug|x64 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|Win32.Build.0 = Release|Win32 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|x64.Build.0 = Release|x64 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|x64.Build.0 = Debug|x64 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|Win32.Build.0 = Release|Win32 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|x64.ActiveCfg = Release|x64 - {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|x64.Build.0 = Release|x64 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Debug|Win32.ActiveCfg = Debug|Win32 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Debug|x64.ActiveCfg = Debug|x64 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release|Win32.ActiveCfg = Release|Win32 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release|x64.ActiveCfg = Release|x64 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Debug|Win32.Build.0 = Debug|Win32 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Debug|x64.Build.0 = Debug|x64 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release|Win32.Build.0 = Release|Win32 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release|x64.Build.0 = Release|x64 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Debug-DLL|x64.Build.0 = Debug|x64 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release-DLL|Win32.Build.0 = Release|Win32 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release-DLL|x64.ActiveCfg = Release|x64 - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release-DLL|x64.Build.0 = Release|x64 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Debug|Win32.ActiveCfg = Debug|Win32 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Debug|x64.ActiveCfg = Debug|x64 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Release|Win32.ActiveCfg = Release|Win32 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Release|x64.ActiveCfg = Release|x64 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Debug|Win32.Build.0 = Debug|Win32 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Debug|x64.Build.0 = Debug|x64 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Release|Win32.Build.0 = Release|Win32 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Release|x64.Build.0 = Release|x64 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Debug-DLL|x64.Build.0 = Debug|x64 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Release-DLL|Win32.Build.0 = Release|Win32 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Release-DLL|x64.ActiveCfg = Release|x64 - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49}.Release-DLL|x64.Build.0 = Release|x64 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug|Win32.ActiveCfg = Debug|Win32 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug|x64.ActiveCfg = Debug|x64 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Release|Win32.ActiveCfg = Release|Win32 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Release|x64.ActiveCfg = Release|x64 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug|Win32.Build.0 = Debug|Win32 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug|x64.Build.0 = Debug|x64 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Release|Win32.Build.0 = Release|Win32 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Release|x64.Build.0 = Release|x64 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug-DLL|x64.Build.0 = Debug|x64 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Release-DLL|Win32.Build.0 = Release|Win32 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Release-DLL|x64.ActiveCfg = Release|x64 - {07170557-CCB0-D23C-8018-C2909D115DF9}.Release-DLL|x64.Build.0 = Release|x64 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Debug|Win32.ActiveCfg = Debug|Win32 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Debug|x64.ActiveCfg = Debug|x64 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Release|Win32.ActiveCfg = Release|Win32 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Release|x64.ActiveCfg = Release|x64 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Debug|Win32.Build.0 = Debug|Win32 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Debug|x64.Build.0 = Debug|x64 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Release|Win32.Build.0 = Release|Win32 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Release|x64.Build.0 = Release|x64 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Debug-DLL|x64.Build.0 = Debug|x64 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Release-DLL|Win32.Build.0 = Release|Win32 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Release-DLL|x64.ActiveCfg = Release|x64 - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03}.Release-DLL|x64.Build.0 = Release|x64 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Debug|Win32.ActiveCfg = Debug|Win32 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Debug|x64.ActiveCfg = Debug|x64 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Release|Win32.ActiveCfg = Release|Win32 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Release|x64.ActiveCfg = Release|x64 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Debug|Win32.Build.0 = Debug|Win32 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Debug|x64.Build.0 = Debug|x64 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Release|Win32.Build.0 = Release|Win32 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Release|x64.Build.0 = Release|x64 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Debug-DLL|x64.Build.0 = Debug|x64 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Release-DLL|Win32.Build.0 = Release|Win32 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Release-DLL|x64.ActiveCfg = Release|x64 - {88AF688E-E43C-5E20-6966-CF559F597D82}.Release-DLL|x64.Build.0 = Release|x64 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Debug|Win32.ActiveCfg = Debug|Win32 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Debug|x64.ActiveCfg = Debug|x64 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Release|Win32.ActiveCfg = Release|Win32 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Release|x64.ActiveCfg = Release|x64 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Debug|Win32.Build.0 = Debug|Win32 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Debug|x64.Build.0 = Debug|x64 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Release|Win32.Build.0 = Release|Win32 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Release|x64.Build.0 = Release|x64 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Debug-DLL|x64.Build.0 = Debug|x64 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Release-DLL|Win32.Build.0 = Release|Win32 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Release-DLL|x64.ActiveCfg = Release|x64 - {0B136077-8522-3C25-7704-1C386C9FDCD5}.Release-DLL|x64.Build.0 = Release|x64 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Debug|Win32.ActiveCfg = Debug|Win32 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Debug|x64.ActiveCfg = Debug|x64 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Release|Win32.ActiveCfg = Release|Win32 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Release|x64.ActiveCfg = Release|x64 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Debug|Win32.Build.0 = Debug|Win32 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Debug|x64.Build.0 = Debug|x64 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Release|Win32.Build.0 = Release|Win32 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Release|x64.Build.0 = Release|x64 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Debug-DLL|x64.Build.0 = Debug|x64 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Release-DLL|Win32.Build.0 = Release|Win32 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Release-DLL|x64.ActiveCfg = Release|x64 - {A66AC548-E2B9-74CD-293C-43526EE51DCE}.Release-DLL|x64.Build.0 = Release|x64 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Debug|Win32.ActiveCfg = Debug|Win32 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Debug|x64.ActiveCfg = Debug|x64 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Release|Win32.ActiveCfg = Release|Win32 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Release|x64.ActiveCfg = Release|x64 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Debug|Win32.Build.0 = Debug|Win32 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Debug|x64.Build.0 = Debug|x64 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Release|Win32.Build.0 = Release|Win32 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Release|x64.Build.0 = Release|x64 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Debug-DLL|x64.Build.0 = Debug|x64 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Release-DLL|Win32.Build.0 = Release|Win32 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Release-DLL|x64.ActiveCfg = Release|x64 - {CCFC6A58-623D-9013-BFEB-C809809E2429}.Release-DLL|x64.Build.0 = Release|x64 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Debug|Win32.ActiveCfg = Debug|Win32 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Debug|x64.ActiveCfg = Debug|x64 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Release|Win32.ActiveCfg = Release|Win32 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Release|x64.ActiveCfg = Release|x64 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Debug|Win32.Build.0 = Debug|Win32 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Debug|x64.Build.0 = Debug|x64 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Release|Win32.Build.0 = Release|Win32 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Release|x64.Build.0 = Release|x64 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Debug-DLL|x64.Build.0 = Debug|x64 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Release-DLL|Win32.Build.0 = Release|Win32 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Release-DLL|x64.ActiveCfg = Release|x64 - {8279AF6C-9584-67F3-1547-B204864FCCA7}.Release-DLL|x64.Build.0 = Release|x64 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug|Win32.ActiveCfg = Debug|Win32 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug|x64.ActiveCfg = Debug|x64 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release|Win32.ActiveCfg = Release|Win32 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release|x64.ActiveCfg = Release|x64 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug|Win32.Build.0 = Debug|Win32 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug|x64.Build.0 = Debug|x64 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release|Win32.Build.0 = Release|Win32 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release|x64.Build.0 = Release|x64 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug-DLL|x64.Build.0 = Debug|x64 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release-DLL|Win32.Build.0 = Release|Win32 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release-DLL|x64.ActiveCfg = Release|x64 - {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release-DLL|x64.Build.0 = Release|x64 - {62B25398-7173-928E-689E-53860B0ACFC4}.Debug|Win32.ActiveCfg = Debug|Win32 - {62B25398-7173-928E-689E-53860B0ACFC4}.Debug|x64.ActiveCfg = Debug|x64 - {62B25398-7173-928E-689E-53860B0ACFC4}.Release|Win32.ActiveCfg = Release|Win32 - {62B25398-7173-928E-689E-53860B0ACFC4}.Release|x64.ActiveCfg = Release|x64 - {62B25398-7173-928E-689E-53860B0ACFC4}.Debug|Win32.Build.0 = Debug|Win32 - {62B25398-7173-928E-689E-53860B0ACFC4}.Debug|x64.Build.0 = Debug|x64 - {62B25398-7173-928E-689E-53860B0ACFC4}.Release|Win32.Build.0 = Release|Win32 - {62B25398-7173-928E-689E-53860B0ACFC4}.Release|x64.Build.0 = Release|x64 - {62B25398-7173-928E-689E-53860B0ACFC4}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {62B25398-7173-928E-689E-53860B0ACFC4}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {62B25398-7173-928E-689E-53860B0ACFC4}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {62B25398-7173-928E-689E-53860B0ACFC4}.Debug-DLL|x64.Build.0 = Debug|x64 - {62B25398-7173-928E-689E-53860B0ACFC4}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {62B25398-7173-928E-689E-53860B0ACFC4}.Release-DLL|Win32.Build.0 = Release|Win32 - {62B25398-7173-928E-689E-53860B0ACFC4}.Release-DLL|x64.ActiveCfg = Release|x64 - {62B25398-7173-928E-689E-53860B0ACFC4}.Release-DLL|x64.Build.0 = Release|x64 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Debug|Win32.ActiveCfg = Debug|Win32 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Debug|x64.ActiveCfg = Debug|x64 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Release|Win32.ActiveCfg = Release|Win32 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Release|x64.ActiveCfg = Release|x64 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Debug|Win32.Build.0 = Debug|Win32 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Debug|x64.Build.0 = Debug|x64 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Release|Win32.Build.0 = Release|Win32 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Release|x64.Build.0 = Release|x64 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Debug-DLL|x64.Build.0 = Debug|x64 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Release-DLL|Win32.Build.0 = Release|Win32 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Release-DLL|x64.ActiveCfg = Release|x64 - {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Release-DLL|x64.Build.0 = Release|x64 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug|Win32.ActiveCfg = Debug|Win32 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug|x64.ActiveCfg = Debug|x64 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release|Win32.ActiveCfg = Release|Win32 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release|x64.ActiveCfg = Release|x64 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug|Win32.Build.0 = Debug|Win32 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug|x64.Build.0 = Debug|x64 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release|Win32.Build.0 = Release|Win32 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release|x64.Build.0 = Release|x64 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug-DLL|x64.Build.0 = Debug|x64 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release-DLL|Win32.Build.0 = Release|Win32 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release-DLL|x64.ActiveCfg = Release|x64 - {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release-DLL|x64.Build.0 = Release|x64 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Debug|Win32.ActiveCfg = Debug|Win32 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Debug|x64.ActiveCfg = Debug|x64 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Release|Win32.ActiveCfg = Release|Win32 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Release|x64.ActiveCfg = Release|x64 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Debug|Win32.Build.0 = Debug|Win32 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Debug|x64.Build.0 = Debug|x64 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Release|Win32.Build.0 = Release|Win32 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Release|x64.Build.0 = Release|x64 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Debug-DLL|x64.Build.0 = Debug|x64 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Release-DLL|Win32.Build.0 = Release|Win32 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Release-DLL|x64.ActiveCfg = Release|x64 - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Release-DLL|x64.Build.0 = Release|x64 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug|Win32.ActiveCfg = Debug|Win32 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug|x64.ActiveCfg = Debug|x64 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Release|Win32.ActiveCfg = Release|Win32 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Release|x64.ActiveCfg = Release|x64 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug|Win32.Build.0 = Debug|Win32 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug|x64.Build.0 = Debug|x64 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Release|Win32.Build.0 = Release|Win32 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Release|x64.Build.0 = Release|x64 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug-DLL|x64.Build.0 = Debug|x64 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Release-DLL|Win32.Build.0 = Release|Win32 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Release-DLL|x64.ActiveCfg = Release|x64 - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Release-DLL|x64.Build.0 = Release|x64 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Debug|Win32.ActiveCfg = Debug|Win32 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Debug|x64.ActiveCfg = Debug|x64 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Release|Win32.ActiveCfg = Release|Win32 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Release|x64.ActiveCfg = Release|x64 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Debug|Win32.Build.0 = Debug|Win32 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Debug|x64.Build.0 = Debug|x64 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Release|Win32.Build.0 = Release|Win32 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Release|x64.Build.0 = Release|x64 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Debug-DLL|x64.Build.0 = Debug|x64 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Release-DLL|Win32.Build.0 = Release|Win32 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Release-DLL|x64.ActiveCfg = Release|x64 - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B}.Release-DLL|x64.Build.0 = Release|x64 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Debug|Win32.ActiveCfg = Debug|Win32 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Debug|x64.ActiveCfg = Debug|x64 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Release|Win32.ActiveCfg = Release|Win32 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Release|x64.ActiveCfg = Release|x64 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Debug|Win32.Build.0 = Debug|Win32 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Debug|x64.Build.0 = Debug|x64 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Release|Win32.Build.0 = Release|Win32 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Release|x64.Build.0 = Release|x64 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Debug-DLL|x64.Build.0 = Debug|x64 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Release-DLL|Win32.Build.0 = Release|Win32 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Release-DLL|x64.ActiveCfg = Release|x64 - {4A48E5A5-2E69-ED6D-063C-C297180A54D0}.Release-DLL|x64.Build.0 = Release|x64 - {63422647-93FA-46BB-4827-95473D9D503C}.Debug|Win32.ActiveCfg = Debug|Win32 - {63422647-93FA-46BB-4827-95473D9D503C}.Debug|x64.ActiveCfg = Debug|x64 - {63422647-93FA-46BB-4827-95473D9D503C}.Release|Win32.ActiveCfg = Release|Win32 - {63422647-93FA-46BB-4827-95473D9D503C}.Release|x64.ActiveCfg = Release|x64 - {63422647-93FA-46BB-4827-95473D9D503C}.Debug|Win32.Build.0 = Debug|Win32 - {63422647-93FA-46BB-4827-95473D9D503C}.Debug|x64.Build.0 = Debug|x64 - {63422647-93FA-46BB-4827-95473D9D503C}.Release|Win32.Build.0 = Release|Win32 - {63422647-93FA-46BB-4827-95473D9D503C}.Release|x64.Build.0 = Release|x64 - {63422647-93FA-46BB-4827-95473D9D503C}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {63422647-93FA-46BB-4827-95473D9D503C}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {63422647-93FA-46BB-4827-95473D9D503C}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {63422647-93FA-46BB-4827-95473D9D503C}.Debug-DLL|x64.Build.0 = Debug|x64 - {63422647-93FA-46BB-4827-95473D9D503C}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {63422647-93FA-46BB-4827-95473D9D503C}.Release-DLL|Win32.Build.0 = Release|Win32 - {63422647-93FA-46BB-4827-95473D9D503C}.Release-DLL|x64.ActiveCfg = Release|x64 - {63422647-93FA-46BB-4827-95473D9D503C}.Release-DLL|x64.Build.0 = Release|x64 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Debug|Win32.ActiveCfg = Debug|Win32 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Debug|x64.ActiveCfg = Debug|x64 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Release|Win32.ActiveCfg = Release|Win32 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Release|x64.ActiveCfg = Release|x64 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Debug|Win32.Build.0 = Debug|Win32 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Debug|x64.Build.0 = Debug|x64 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Release|Win32.Build.0 = Release|Win32 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Release|x64.Build.0 = Release|x64 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Debug-DLL|x64.Build.0 = Debug|x64 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Release-DLL|Win32.Build.0 = Release|Win32 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Release-DLL|x64.ActiveCfg = Release|x64 - {F0FA4A41-5695-580A-DCDA-EC719CB041B0}.Release-DLL|x64.Build.0 = Release|x64 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Debug|Win32.ActiveCfg = Debug|Win32 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Debug|x64.ActiveCfg = Debug|x64 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Release|Win32.ActiveCfg = Release|Win32 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Release|x64.ActiveCfg = Release|x64 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Debug|Win32.Build.0 = Debug|Win32 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Debug|x64.Build.0 = Debug|x64 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Release|Win32.Build.0 = Release|Win32 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Release|x64.Build.0 = Release|x64 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Debug-DLL|x64.Build.0 = Debug|x64 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Release-DLL|Win32.Build.0 = Release|Win32 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Release-DLL|x64.ActiveCfg = Release|x64 - {419167BB-C3F5-DDEA-403A-394D1902DE65}.Release-DLL|x64.Build.0 = Release|x64 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Debug|Win32.ActiveCfg = Debug|Win32 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Debug|x64.ActiveCfg = Debug|x64 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Release|Win32.ActiveCfg = Release|Win32 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Release|x64.ActiveCfg = Release|x64 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Debug|Win32.Build.0 = Debug|Win32 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Debug|x64.Build.0 = Debug|x64 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Release|Win32.Build.0 = Release|Win32 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Release|x64.Build.0 = Release|x64 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Debug-DLL|x64.Build.0 = Debug|x64 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Release-DLL|Win32.Build.0 = Release|Win32 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Release-DLL|x64.ActiveCfg = Release|x64 - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337}.Release-DLL|x64.Build.0 = Release|x64 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Debug|Win32.ActiveCfg = Debug|Win32 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Debug|x64.ActiveCfg = Debug|x64 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Release|Win32.ActiveCfg = Release|Win32 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Release|x64.ActiveCfg = Release|x64 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Debug|Win32.Build.0 = Debug|Win32 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Debug|x64.Build.0 = Debug|x64 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Release|Win32.Build.0 = Release|Win32 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Release|x64.Build.0 = Release|x64 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Debug-DLL|x64.Build.0 = Debug|x64 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Release-DLL|Win32.Build.0 = Release|Win32 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Release-DLL|x64.ActiveCfg = Release|x64 - {9889A80C-F1D7-99C9-FE7E-657724BEDC62}.Release-DLL|x64.Build.0 = Release|x64 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Debug|Win32.ActiveCfg = Debug|Win32 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Debug|x64.ActiveCfg = Debug|x64 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Release|Win32.ActiveCfg = Release|Win32 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Release|x64.ActiveCfg = Release|x64 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Debug|Win32.Build.0 = Debug|Win32 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Debug|x64.Build.0 = Debug|x64 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Release|Win32.Build.0 = Release|Win32 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Release|x64.Build.0 = Release|x64 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Debug-DLL|x64.Build.0 = Debug|x64 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Release-DLL|Win32.Build.0 = Release|Win32 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Release-DLL|x64.ActiveCfg = Release|x64 - {529771F0-10B0-9B1A-1E7E-8A8E01870348}.Release-DLL|x64.Build.0 = Release|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug|x64.ActiveCfg = Debug|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release|Win32.ActiveCfg = Release|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release|x64.ActiveCfg = Release|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug|Win32.Build.0 = Debug|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug|x64.Build.0 = Debug|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release|Win32.Build.0 = Release|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release|x64.Build.0 = Release|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug-DLL|x64.Build.0 = Debug|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|Win32.Build.0 = Release|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|x64.ActiveCfg = Release|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|x64.Build.0 = Release|x64 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Debug|Win32.ActiveCfg = Debug|Win32 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Debug|x64.ActiveCfg = Debug|x64 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Release|Win32.ActiveCfg = Release|Win32 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Release|x64.ActiveCfg = Release|x64 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Debug|Win32.Build.0 = Debug|Win32 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Debug|x64.Build.0 = Debug|x64 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Release|Win32.Build.0 = Release|Win32 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Release|x64.Build.0 = Release|x64 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Debug-DLL|x64.Build.0 = Debug|x64 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Release-DLL|Win32.Build.0 = Release|Win32 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Release-DLL|x64.ActiveCfg = Release|x64 - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3}.Release-DLL|x64.Build.0 = Release|x64 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Debug|Win32.ActiveCfg = Debug|Win32 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Debug|x64.ActiveCfg = Debug|x64 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Release|Win32.ActiveCfg = Release|Win32 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Release|x64.ActiveCfg = Release|x64 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Debug|Win32.Build.0 = Debug|Win32 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Debug|x64.Build.0 = Debug|x64 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Release|Win32.Build.0 = Release|Win32 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Release|x64.Build.0 = Release|x64 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Debug-DLL|x64.Build.0 = Debug|x64 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Release-DLL|Win32.Build.0 = Release|Win32 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Release-DLL|x64.ActiveCfg = Release|x64 - {EA073C36-A527-F749-AD4A-243A38B9BFF5}.Release-DLL|x64.Build.0 = Release|x64 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Debug|Win32.ActiveCfg = Debug|Win32 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Debug|x64.ActiveCfg = Debug|x64 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Release|Win32.ActiveCfg = Release|Win32 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Release|x64.ActiveCfg = Release|x64 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Debug|Win32.Build.0 = Debug|Win32 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Debug|x64.Build.0 = Debug|x64 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Release|Win32.Build.0 = Release|Win32 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Release|x64.Build.0 = Release|x64 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Debug-DLL|x64.Build.0 = Debug|x64 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Release-DLL|Win32.Build.0 = Release|Win32 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Release-DLL|x64.ActiveCfg = Release|x64 - {A2110C60-E75A-F76E-205E-1836F86C4D53}.Release-DLL|x64.Build.0 = Release|x64 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Debug|Win32.ActiveCfg = Debug|Win32 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Debug|x64.ActiveCfg = Debug|x64 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Release|Win32.ActiveCfg = Release|Win32 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Release|x64.ActiveCfg = Release|x64 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Debug|Win32.Build.0 = Debug|Win32 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Debug|x64.Build.0 = Debug|x64 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Release|Win32.Build.0 = Release|Win32 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Release|x64.Build.0 = Release|x64 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Debug-DLL|x64.Build.0 = Debug|x64 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Release-DLL|Win32.Build.0 = Release|Win32 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Release-DLL|x64.ActiveCfg = Release|x64 - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB}.Release-DLL|x64.Build.0 = Release|x64 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Debug|Win32.ActiveCfg = Debug|Win32 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Debug|x64.ActiveCfg = Debug|x64 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Release|Win32.ActiveCfg = Release|Win32 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Release|x64.ActiveCfg = Release|x64 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Debug|Win32.Build.0 = Debug|Win32 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Debug|x64.Build.0 = Debug|x64 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Release|Win32.Build.0 = Release|Win32 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Release|x64.Build.0 = Release|x64 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Debug-DLL|x64.Build.0 = Debug|x64 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Release-DLL|Win32.Build.0 = Release|Win32 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Release-DLL|x64.ActiveCfg = Release|x64 - {659121F6-1639-AC6B-053E-9D17A8B94D56}.Release-DLL|x64.Build.0 = Release|x64 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Debug|Win32.ActiveCfg = Debug|Win32 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Debug|x64.ActiveCfg = Debug|x64 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release|Win32.ActiveCfg = Release|Win32 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release|x64.ActiveCfg = Release|x64 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Debug|Win32.Build.0 = Debug|Win32 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Debug|x64.Build.0 = Debug|x64 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release|Win32.Build.0 = Release|Win32 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release|x64.Build.0 = Release|x64 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Debug-DLL|x64.Build.0 = Debug|x64 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|Win32.Build.0 = Release|Win32 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|x64.ActiveCfg = Release|x64 - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|x64.Build.0 = Release|x64 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|Win32.ActiveCfg = Debug|Win32 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|x64.ActiveCfg = Debug|x64 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|Win32.ActiveCfg = Release|Win32 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|x64.ActiveCfg = Release|x64 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|Win32.Build.0 = Debug|Win32 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|x64.Build.0 = Debug|x64 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|Win32.Build.0 = Release|Win32 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|x64.Build.0 = Release|x64 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|x64.Build.0 = Debug|x64 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|Win32.Build.0 = Release|Win32 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|x64.ActiveCfg = Release|x64 - {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|x64.Build.0 = Release|x64 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug|Win32.ActiveCfg = Debug|Win32 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug|x64.ActiveCfg = Debug|x64 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Release|Win32.ActiveCfg = Release|Win32 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Release|x64.ActiveCfg = Release|x64 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug|Win32.Build.0 = Debug|Win32 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug|x64.Build.0 = Debug|x64 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Release|Win32.Build.0 = Release|Win32 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Release|x64.Build.0 = Release|x64 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug-DLL|x64.Build.0 = Debug|x64 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Release-DLL|Win32.Build.0 = Release|Win32 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Release-DLL|x64.ActiveCfg = Release|x64 - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Release-DLL|x64.Build.0 = Release|x64 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Debug|Win32.ActiveCfg = Debug|Win32 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Debug|x64.ActiveCfg = Debug|x64 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Release|Win32.ActiveCfg = Release|Win32 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Release|x64.ActiveCfg = Release|x64 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Debug|Win32.Build.0 = Debug|Win32 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Debug|x64.Build.0 = Debug|x64 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Release|Win32.Build.0 = Release|Win32 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Release|x64.Build.0 = Release|x64 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Debug-DLL|x64.Build.0 = Debug|x64 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Release-DLL|Win32.Build.0 = Release|Win32 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Release-DLL|x64.ActiveCfg = Release|x64 - {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Release-DLL|x64.Build.0 = Release|x64 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Debug|Win32.ActiveCfg = Debug|Win32 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Debug|x64.ActiveCfg = Debug|x64 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Release|Win32.ActiveCfg = Release|Win32 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Release|x64.ActiveCfg = Release|x64 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Debug|Win32.Build.0 = Debug|Win32 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Debug|x64.Build.0 = Debug|x64 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Release|Win32.Build.0 = Release|Win32 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Release|x64.Build.0 = Release|x64 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Debug-DLL|x64.Build.0 = Debug|x64 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Release-DLL|Win32.Build.0 = Release|Win32 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Release-DLL|x64.ActiveCfg = Release|x64 - {658D7F7F-9628-6545-743C-D949301DC5DC}.Release-DLL|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal - + \ No newline at end of file diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 63be171c6e..691b8909ea 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -3,504 +3,3 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.21005.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boringssl", "vcxproj\.\boringssl\boringssl.vcxproj", "{9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_hpack_tables", "vcxproj\.\gen_hpack_tables\gen_hpack_tables.vcxproj", "{FCDEA4C7-7F26-05DB-D08F-A08F499026E6}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_legal_metadata_characters", "vcxproj\.\gen_legal_metadata_characters\gen_legal_metadata_characters.vcxproj", "{A635DE99-B131-CA00-2D3B-8691D60B76C2}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_percent_encoding_tables", "vcxproj\.\gen_percent_encoding_tables\gen_percent_encoding_tables.vcxproj", "{95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr", "vcxproj\.\gpr\gpr.vcxproj", "{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_test_util", "vcxproj\.\gpr_test_util\gpr_test_util.vcxproj", "{EAB0A629-17A9-44DB-B5FF-E91A721FE037}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc.vcxproj", "{29D16885-7228-4C31-81ED-5F9187C7F2A9}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\grpc++.vcxproj", "{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_reflection", "vcxproj\.\grpc++_reflection\grpc++_reflection.vcxproj", "{5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} = {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\.\grpc++_unsecure\grpc++_unsecure.vcxproj", "{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_create_jwt", "vcxproj\.\grpc_create_jwt\grpc_create_jwt.vcxproj", "{77971F8D-F583-3E77-0E3C-6C1FB6B1749C}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_dll", "vcxproj\.\grpc_dll\grpc_dll.vcxproj", "{A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_print_google_default_creds_token", "vcxproj\.\grpc_print_google_default_creds_token\grpc_print_google_default_creds_token.vcxproj", "{C002965C-8457-CCE5-B1BA-E748FF9A11B6}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "vcxproj\.\grpc_test_util\grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util_unsecure", "vcxproj\.\grpc_test_util_unsecure\grpc_test_util_unsecure.vcxproj", "{0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\grpc_unsecure\grpc_unsecure.vcxproj", "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_verify_jwt", "vcxproj\.\grpc_verify_jwt\grpc_verify_jwt.vcxproj", "{02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reconnect_server", "vcxproj\.\reconnect_server\reconnect_server.vcxproj", "{929C90AE-483F-AC80-EF93-226199F9E428}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {E3110C46-A148-FF65-08FD-3324829BE7FE} = {E3110C46-A148-FF65-08FD-3324829BE7FE} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_tcp_server", "vcxproj\.\test_tcp_server\test_tcp_server.vcxproj", "{E3110C46-A148-FF65-08FD-3324829BE7FE}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z", "vcxproj\.\z\z.vcxproj", "{FBADE9E3-6A3F-36D3-D676-C1B808451DD7}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Debug-DLL|Win32 = Debug-DLL|Win32 - Debug-DLL|x64 = Debug-DLL|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - Release-DLL|Win32 = Release-DLL|Win32 - Release-DLL|x64 = Release-DLL|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug|x64.ActiveCfg = Debug|x64 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Release|Win32.ActiveCfg = Release|Win32 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Release|x64.ActiveCfg = Release|x64 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug|Win32.Build.0 = Debug|Win32 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug|x64.Build.0 = Debug|x64 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Release|Win32.Build.0 = Release|Win32 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Release|x64.Build.0 = Release|x64 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug-DLL|x64.Build.0 = Debug|x64 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Release-DLL|Win32.Build.0 = Release|Win32 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Release-DLL|x64.ActiveCfg = Release|x64 - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Release-DLL|x64.Build.0 = Release|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug|Win32.ActiveCfg = Debug|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug|x64.ActiveCfg = Debug|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release|Win32.ActiveCfg = Release|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release|x64.ActiveCfg = Release|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug|Win32.Build.0 = Debug|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug|x64.Build.0 = Debug|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release|Win32.Build.0 = Release|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release|x64.Build.0 = Release|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Debug-DLL|x64.Build.0 = Debug|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release-DLL|Win32.Build.0 = Release|Win32 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release-DLL|x64.ActiveCfg = Release|x64 - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6}.Release-DLL|x64.Build.0 = Release|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug|Win32.ActiveCfg = Debug|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug|x64.ActiveCfg = Debug|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release|Win32.ActiveCfg = Release|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release|x64.ActiveCfg = Release|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug|Win32.Build.0 = Debug|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug|x64.Build.0 = Debug|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release|Win32.Build.0 = Release|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release|x64.Build.0 = Release|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Debug-DLL|x64.Build.0 = Debug|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|Win32.Build.0 = Release|Win32 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|x64.ActiveCfg = Release|x64 - {A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|x64.Build.0 = Release|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|Win32.ActiveCfg = Debug|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|x64.ActiveCfg = Debug|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|Win32.ActiveCfg = Release|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|x64.ActiveCfg = Release|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|Win32.Build.0 = Debug|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|x64.Build.0 = Debug|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|Win32.Build.0 = Release|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|x64.Build.0 = Release|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|x64.Build.0 = Debug|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|Win32.Build.0 = Release|Win32 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|x64.ActiveCfg = Release|x64 - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|x64.Build.0 = Release|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.ActiveCfg = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|x64.ActiveCfg = Debug|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.ActiveCfg = Release|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|x64.ActiveCfg = Release|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.Build.0 = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|x64.Build.0 = Debug|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.Build.0 = Release|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|x64.Build.0 = Release|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug-DLL|x64.Build.0 = Debug|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release-DLL|Win32.Build.0 = Release|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release-DLL|x64.ActiveCfg = Release|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release-DLL|x64.Build.0 = Release|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug|Win32.ActiveCfg = Debug|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug|x64.ActiveCfg = Debug|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release|Win32.ActiveCfg = Release|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release|x64.ActiveCfg = Release|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug|Win32.Build.0 = Debug|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug|x64.Build.0 = Debug|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release|Win32.Build.0 = Release|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release|x64.Build.0 = Release|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug-DLL|x64.Build.0 = Debug|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release-DLL|Win32.Build.0 = Release|Win32 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release-DLL|x64.ActiveCfg = Release|x64 - {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release-DLL|x64.Build.0 = Release|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.ActiveCfg = Debug|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|x64.ActiveCfg = Debug|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.ActiveCfg = Release|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|x64.ActiveCfg = Release|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.Build.0 = Debug|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|x64.Build.0 = Debug|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.Build.0 = Release|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|x64.Build.0 = Release|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug-DLL|Win32.ActiveCfg = Debug-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug-DLL|Win32.Build.0 = Debug-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug-DLL|x64.ActiveCfg = Debug-DLL|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug-DLL|x64.Build.0 = Debug-DLL|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|Win32.ActiveCfg = Release-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.Build.0 = Release-DLL|x64 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug|Win32.ActiveCfg = Debug|Win32 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug|x64.ActiveCfg = Debug|x64 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release|Win32.ActiveCfg = Release|Win32 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release|x64.ActiveCfg = Release|x64 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug|Win32.Build.0 = Debug|Win32 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug|x64.Build.0 = Debug|x64 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release|Win32.Build.0 = Release|Win32 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release|x64.Build.0 = Release|x64 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug-DLL|Win32.ActiveCfg = Debug-DLL|Win32 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug-DLL|Win32.Build.0 = Debug-DLL|Win32 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug-DLL|x64.ActiveCfg = Debug-DLL|x64 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug-DLL|x64.Build.0 = Debug-DLL|x64 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|Win32.ActiveCfg = Release-DLL|Win32 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|x64.Build.0 = Release-DLL|x64 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug|x64.ActiveCfg = Debug|x64 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release|Win32.ActiveCfg = Release|Win32 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release|x64.ActiveCfg = Release|x64 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug|Win32.Build.0 = Debug|Win32 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug|x64.Build.0 = Debug|x64 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release|Win32.Build.0 = Release|Win32 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release|x64.Build.0 = Release|x64 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug-DLL|x64.Build.0 = Debug|x64 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release-DLL|Win32.Build.0 = Release|Win32 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release-DLL|x64.ActiveCfg = Release|x64 - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release-DLL|x64.Build.0 = Release|x64 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|Win32.ActiveCfg = Debug|Win32 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|x64.ActiveCfg = Debug|x64 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release|Win32.ActiveCfg = Release|Win32 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release|x64.ActiveCfg = Release|x64 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|Win32.Build.0 = Debug|Win32 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|x64.Build.0 = Debug|x64 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release|Win32.Build.0 = Release|Win32 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release|x64.Build.0 = Release|x64 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug-DLL|Win32.ActiveCfg = Debug-DLL|Win32 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug-DLL|Win32.Build.0 = Debug-DLL|Win32 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug-DLL|x64.ActiveCfg = Debug-DLL|x64 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug-DLL|x64.Build.0 = Debug-DLL|x64 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release-DLL|Win32.ActiveCfg = Release-DLL|Win32 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release-DLL|x64.Build.0 = Release-DLL|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug|Win32.ActiveCfg = Debug|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug|x64.ActiveCfg = Debug|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release|Win32.ActiveCfg = Release|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release|x64.ActiveCfg = Release|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug|Win32.Build.0 = Debug|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug|x64.Build.0 = Debug|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release|Win32.Build.0 = Release|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release|x64.Build.0 = Release|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Debug-DLL|x64.Build.0 = Debug|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release-DLL|Win32.Build.0 = Release|Win32 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release-DLL|x64.ActiveCfg = Release|x64 - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C}.Release-DLL|x64.Build.0 = Release|x64 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug|Win32.ActiveCfg = Debug|Win32 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug|x64.ActiveCfg = Debug|x64 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release|Win32.ActiveCfg = Release|Win32 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release|x64.ActiveCfg = Release|x64 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug|Win32.Build.0 = Debug|Win32 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug|x64.Build.0 = Debug|x64 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release|Win32.Build.0 = Release|Win32 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release|x64.Build.0 = Release|x64 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|x64.Build.0 = Debug|x64 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|Win32.Build.0 = Release|Win32 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|x64.ActiveCfg = Release|x64 - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|x64.Build.0 = Release|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug|Win32.ActiveCfg = Debug|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug|x64.ActiveCfg = Debug|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release|Win32.ActiveCfg = Release|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release|x64.ActiveCfg = Release|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug|Win32.Build.0 = Debug|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug|x64.Build.0 = Debug|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release|Win32.Build.0 = Release|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release|x64.Build.0 = Release|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug-DLL|x64.Build.0 = Debug|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release-DLL|Win32.Build.0 = Release|Win32 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release-DLL|x64.ActiveCfg = Release|x64 - {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release-DLL|x64.Build.0 = Release|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.ActiveCfg = Debug|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|x64.ActiveCfg = Debug|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.ActiveCfg = Release|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|x64.ActiveCfg = Release|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.Build.0 = Debug|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|x64.Build.0 = Debug|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.Build.0 = Release|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|x64.Build.0 = Release|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug-DLL|x64.Build.0 = Debug|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release-DLL|Win32.Build.0 = Release|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release-DLL|x64.ActiveCfg = Release|x64 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release-DLL|x64.Build.0 = Release|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug|Win32.ActiveCfg = Debug|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug|x64.ActiveCfg = Debug|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release|Win32.ActiveCfg = Release|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release|x64.ActiveCfg = Release|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug|Win32.Build.0 = Debug|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug|x64.Build.0 = Debug|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release|Win32.Build.0 = Release|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release|x64.Build.0 = Release|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Debug-DLL|x64.Build.0 = Debug|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release-DLL|Win32.Build.0 = Release|Win32 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release-DLL|x64.ActiveCfg = Release|x64 - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}.Release-DLL|x64.Build.0 = Release|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|Win32.ActiveCfg = Debug|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|x64.ActiveCfg = Debug|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|Win32.ActiveCfg = Release|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|x64.ActiveCfg = Release|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|Win32.Build.0 = Debug|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|x64.Build.0 = Debug|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|Win32.Build.0 = Release|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|x64.Build.0 = Release|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug-DLL|Win32.ActiveCfg = Debug-DLL|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug-DLL|Win32.Build.0 = Debug-DLL|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug-DLL|x64.ActiveCfg = Debug-DLL|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug-DLL|x64.Build.0 = Debug-DLL|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release-DLL|Win32.ActiveCfg = Release-DLL|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release-DLL|x64.Build.0 = Release-DLL|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug|Win32.ActiveCfg = Debug|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug|x64.ActiveCfg = Debug|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release|Win32.ActiveCfg = Release|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release|x64.ActiveCfg = Release|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug|Win32.Build.0 = Debug|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug|x64.Build.0 = Debug|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release|Win32.Build.0 = Release|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release|x64.Build.0 = Release|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Debug-DLL|x64.Build.0 = Debug|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|Win32.Build.0 = Release|Win32 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.ActiveCfg = Release|x64 - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.Build.0 = Release|x64 - {929C90AE-483F-AC80-EF93-226199F9E428}.Debug|Win32.ActiveCfg = Debug|Win32 - {929C90AE-483F-AC80-EF93-226199F9E428}.Debug|x64.ActiveCfg = Debug|x64 - {929C90AE-483F-AC80-EF93-226199F9E428}.Release|Win32.ActiveCfg = Release|Win32 - {929C90AE-483F-AC80-EF93-226199F9E428}.Release|x64.ActiveCfg = Release|x64 - {929C90AE-483F-AC80-EF93-226199F9E428}.Debug|Win32.Build.0 = Debug|Win32 - {929C90AE-483F-AC80-EF93-226199F9E428}.Debug|x64.Build.0 = Debug|x64 - {929C90AE-483F-AC80-EF93-226199F9E428}.Release|Win32.Build.0 = Release|Win32 - {929C90AE-483F-AC80-EF93-226199F9E428}.Release|x64.Build.0 = Release|x64 - {929C90AE-483F-AC80-EF93-226199F9E428}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {929C90AE-483F-AC80-EF93-226199F9E428}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {929C90AE-483F-AC80-EF93-226199F9E428}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {929C90AE-483F-AC80-EF93-226199F9E428}.Debug-DLL|x64.Build.0 = Debug|x64 - {929C90AE-483F-AC80-EF93-226199F9E428}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {929C90AE-483F-AC80-EF93-226199F9E428}.Release-DLL|Win32.Build.0 = Release|Win32 - {929C90AE-483F-AC80-EF93-226199F9E428}.Release-DLL|x64.ActiveCfg = Release|x64 - {929C90AE-483F-AC80-EF93-226199F9E428}.Release-DLL|x64.Build.0 = Release|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug|x64.ActiveCfg = Debug|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release|Win32.ActiveCfg = Release|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release|x64.ActiveCfg = Release|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug|Win32.Build.0 = Debug|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug|x64.Build.0 = Debug|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release|Win32.Build.0 = Release|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release|x64.Build.0 = Release|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Debug-DLL|x64.Build.0 = Debug|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|Win32.Build.0 = Release|Win32 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|x64.ActiveCfg = Release|x64 - {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|x64.Build.0 = Release|x64 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Debug|Win32.ActiveCfg = Debug|Win32 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Debug|x64.ActiveCfg = Debug|x64 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Release|Win32.ActiveCfg = Release|Win32 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Release|x64.ActiveCfg = Release|x64 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Debug|Win32.Build.0 = Debug|Win32 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Debug|x64.Build.0 = Debug|x64 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Release|Win32.Build.0 = Release|Win32 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Release|x64.Build.0 = Release|x64 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Debug-DLL|x64.Build.0 = Debug|x64 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Release-DLL|Win32.Build.0 = Release|Win32 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Release-DLL|x64.ActiveCfg = Release|x64 - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7}.Release-DLL|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal - diff --git a/vsprojects/grpc_csharp_ext.sln b/vsprojects/grpc_csharp_ext.sln index ad8ae8a8be..499c08920f 100644 --- a/vsprojects/grpc_csharp_ext.sln +++ b/vsprojects/grpc_csharp_ext.sln @@ -14,52 +14,4 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_csharp_ext", "vcxproj\.\grpc_csharp_ext\grpc_csharp_ext.vcxproj", "{D64C6D63-4458-4A88-AB38-35678384A7E4}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.ActiveCfg = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.Build.0 = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|x64.ActiveCfg = Debug|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|x64.Build.0 = Debug|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.ActiveCfg = Release|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.Build.0 = Release|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|x64.ActiveCfg = Release|x64 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|x64.Build.0 = Release|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.ActiveCfg = Debug-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.Build.0 = Debug-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|x64.ActiveCfg = Debug-DLL|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|x64.Build.0 = Debug-DLL|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.ActiveCfg = Release-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.Build.0 = Release-DLL|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|x64.ActiveCfg = Release-DLL|x64 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|x64.Build.0 = Release-DLL|x64 - {D64C6D63-4458-4A88-AB38-35678384A7E4}.Debug|Win32.ActiveCfg = Debug|Win32 - {D64C6D63-4458-4A88-AB38-35678384A7E4}.Debug|Win32.Build.0 = Debug|Win32 - {D64C6D63-4458-4A88-AB38-35678384A7E4}.Debug|x64.ActiveCfg = Debug|x64 - {D64C6D63-4458-4A88-AB38-35678384A7E4}.Debug|x64.Build.0 = Debug|x64 - {D64C6D63-4458-4A88-AB38-35678384A7E4}.Release|Win32.ActiveCfg = Release|Win32 - {D64C6D63-4458-4A88-AB38-35678384A7E4}.Release|Win32.Build.0 = Release|Win32 - {D64C6D63-4458-4A88-AB38-35678384A7E4}.Release|x64.ActiveCfg = Release|x64 - {D64C6D63-4458-4A88-AB38-35678384A7E4}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal - + \ No newline at end of file diff --git a/vsprojects/vcxproj/boringssl/boringssl.vcxproj b/vsprojects/vcxproj/boringssl/boringssl.vcxproj deleted file mode 100644 index 59db775d79..0000000000 --- a/vsprojects/vcxproj/boringssl/boringssl.vcxproj +++ /dev/null @@ -1,863 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl - - - boringssl - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/boringssl/boringssl.vcxproj.filters b/vsprojects/vcxproj/boringssl/boringssl.vcxproj.filters deleted file mode 100644 index bd996bdc44..0000000000 --- a/vsprojects/vcxproj/boringssl/boringssl.vcxproj.filters +++ /dev/null @@ -1,1376 +0,0 @@ - - - - - src\boringssl - - - third_party\boringssl\crypto\aes - - - third_party\boringssl\crypto\aes - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\base64 - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn\asm - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\buf - - - third_party\boringssl\crypto\bytestring - - - third_party\boringssl\crypto\bytestring - - - third_party\boringssl\crypto\bytestring - - - third_party\boringssl\crypto\bytestring - - - third_party\boringssl\crypto\chacha - - - third_party\boringssl\crypto\chacha - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\cmac - - - third_party\boringssl\crypto\conf - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto\curve25519 - - - third_party\boringssl\crypto\curve25519 - - - third_party\boringssl\crypto\des - - - third_party\boringssl\crypto\dh - - - third_party\boringssl\crypto\dh - - - third_party\boringssl\crypto\dh - - - third_party\boringssl\crypto\dh - - - third_party\boringssl\crypto\digest - - - third_party\boringssl\crypto\digest - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto\dsa - - - third_party\boringssl\crypto\dsa - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ecdh - - - third_party\boringssl\crypto\ecdsa - - - third_party\boringssl\crypto\ecdsa - - - third_party\boringssl\crypto\engine - - - third_party\boringssl\crypto\err - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto\hkdf - - - third_party\boringssl\crypto\hmac - - - third_party\boringssl\crypto\lhash - - - third_party\boringssl\crypto\md4 - - - third_party\boringssl\crypto\md5 - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto\modes - - - third_party\boringssl\crypto\modes - - - third_party\boringssl\crypto\modes - - - third_party\boringssl\crypto\modes - - - third_party\boringssl\crypto\modes - - - third_party\boringssl\crypto\obj - - - third_party\boringssl\crypto\obj - - - third_party\boringssl\crypto\pem - - - third_party\boringssl\crypto\pem - - - third_party\boringssl\crypto\pem - - - third_party\boringssl\crypto\pem - - - third_party\boringssl\crypto\pem - - - third_party\boringssl\crypto\pem - - - third_party\boringssl\crypto\pem - - - third_party\boringssl\crypto\pem - - - third_party\boringssl\crypto\pkcs8 - - - third_party\boringssl\crypto\pkcs8 - - - third_party\boringssl\crypto\pkcs8 - - - third_party\boringssl\crypto\pkcs8 - - - third_party\boringssl\crypto\poly1305 - - - third_party\boringssl\crypto\poly1305 - - - third_party\boringssl\crypto\poly1305 - - - third_party\boringssl\crypto\rand - - - third_party\boringssl\crypto\rand - - - third_party\boringssl\crypto\rand - - - third_party\boringssl\crypto\rc4 - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto\rsa - - - third_party\boringssl\crypto\rsa - - - third_party\boringssl\crypto\rsa - - - third_party\boringssl\crypto\rsa - - - third_party\boringssl\crypto\rsa - - - third_party\boringssl\crypto\sha - - - third_party\boringssl\crypto\sha - - - third_party\boringssl\crypto\sha - - - third_party\boringssl\crypto\stack - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl\pqueue - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl - - - - - third_party\boringssl\crypto\aes - - - third_party\boringssl\crypto\asn1 - - - third_party\boringssl\crypto\bio - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bn - - - third_party\boringssl\crypto\bytestring - - - third_party\boringssl\crypto\cipher - - - third_party\boringssl\crypto\conf - - - third_party\boringssl\crypto\conf - - - third_party\boringssl\crypto\curve25519 - - - third_party\boringssl\crypto\des - - - third_party\boringssl\crypto\dh - - - third_party\boringssl\crypto\digest - - - third_party\boringssl\crypto\digest - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\ec - - - third_party\boringssl\crypto\evp - - - third_party\boringssl\crypto - - - third_party\boringssl\crypto\modes - - - third_party\boringssl\crypto\obj - - - third_party\boringssl\crypto\obj - - - third_party\boringssl\crypto\pkcs8 - - - third_party\boringssl\crypto\rand - - - third_party\boringssl\crypto\rsa - - - third_party\boringssl\crypto\test - - - third_party\boringssl\crypto\test - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\crypto\x509v3 - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\include\openssl - - - third_party\boringssl\ssl - - - third_party\boringssl\ssl\test - - - third_party\boringssl\ssl\test - - - third_party\boringssl\ssl\test - - - third_party\boringssl\ssl\test - - - - - - {aa780dd8-5fd7-dce7-b8ae-169e95ae232d} - - - {a04c8246-b570-0259-e1b7-c950b538842f} - - - {a0892413-f267-8f2c-8964-72c3691160b8} - - - {43387f7b-7af3-5ce7-de73-53d704306bff} - - - {f569096c-766c-dda3-5e08-2bf7a4bf8950} - - - {fcbb5bdb-47a7-9279-da86-aa2f5d6d1319} - - - {26d971d8-8162-46e6-2d07-1425b96a11fc} - - - {ef385261-f83f-73c8-08ab-2a37f1a1c9c5} - - - {4c8074ff-a8a4-1f35-37e9-b5ed76030bdc} - - - {db53f28e-6587-9402-f5b1-323438023f76} - - - {e6252df8-45b8-3fce-3b3d-5cd9e3f2671e} - - - {aa797b00-e5ac-0d1b-95a9-ff12067d6005} - - - {e5ce5350-017c-38a6-69b7-b30dfb91d7cf} - - - {50b869c4-f112-e641-aae5-e6e96b56f29b} - - - {d10ae1df-081d-96c7-9c46-0c49c8972447} - - - {5fa8555b-1f5c-46bc-2e7e-668809c914f6} - - - {80b9c36e-1865-1df9-b633-e16a88c0ce82} - - - {a5fcaabb-4c41-358f-7b58-1e55538fc779} - - - {af6010aa-a0df-c4c9-4f95-1c11b33178a8} - - - {c508f09c-54b5-78a0-db03-0d8a778403a9} - - - {891f16b0-3a73-0835-ead0-73b5df0e683d} - - - {09223d7f-5b4f-549b-ad06-0cdede02be65} - - - {3bc1fc03-4c2c-80f8-cec0-7f8846afdaf7} - - - {2524a86e-8b41-0638-2c22-bc09787b87ab} - - - {aabf98b0-e43f-f569-241e-71a976b6bb80} - - - {8028a634-3140-7eae-0ae5-79e60cebddef} - - - {d4bc24cb-9e9d-3d9d-ba65-7bb266ed8f66} - - - {fe191efd-ccbf-6f8d-86a6-f9f4bf1e43a2} - - - {2804ad6e-5f5e-2f6b-8b90-9c7cc280e4af} - - - {9a9c05e3-ef2b-81f6-c94f-a02ba53a9d23} - - - {2c9e33ab-e263-2fb4-ace1-76d523dadc09} - - - {06c254b7-f1ff-e395-1e94-80fbfd33d742} - - - {e67b6362-8097-b6d0-1e60-8b2ee009855f} - - - {63ca8fcd-7644-61d6-4357-5a0bcfdc395b} - - - {59349deb-4276-df4c-f4cd-e2cf707c3b4c} - - - {7b26d429-7ac1-1136-e272-1a3acd099bad} - - - {a554663b-8fa0-4c1a-6724-f42395bd9473} - - - {9fd1fe61-f5b5-11e0-48ad-a90302eacab0} - - - {965f2392-a795-b06a-7b17-d123d8e84f8d} - - - {1e2e642b-7c58-c6d5-b9ca-0854212f8246} - - - {03edc176-a276-51e7-2654-17a52abacf0a} - - - {b862ba08-ab00-2ddb-8c81-40d95dd48752} - - - {7b1c1e89-c813-5ccd-fa2a-dd1b187f8da9} - - - {eec8fd39-7429-3d4d-be78-028791b4b927} - - - {74c9e47d-193b-84c0-95d9-4b33703b7890} - - - {6d2ffa32-6c7e-d736-59ed-fefe0f31dbcc} - - - {cfb72682-b8d8-bd39-652c-cc7b6c1ff2b5} - - - {e8f3e1de-b884-d3e0-9db7-602bd275cafa} - - - {e6e8c0c0-1755-4978-209e-5429ee3a2f5f} - - - {89eb7fc9-98ec-dee5-ea8c-f7d23760aa94} - - - {8dda7bd5-b246-84a4-20c9-c92101caeb48} - - - - diff --git a/vsprojects/vcxproj/boringssl_test_util/boringssl_test_util.vcxproj b/vsprojects/vcxproj/boringssl_test_util/boringssl_test_util.vcxproj deleted file mode 100644 index 86177a0fdd..0000000000 --- a/vsprojects/vcxproj/boringssl_test_util/boringssl_test_util.vcxproj +++ /dev/null @@ -1,166 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_test_util - - - boringssl_test_util - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/boringssl_test_util/boringssl_test_util.vcxproj.filters b/vsprojects/vcxproj/boringssl_test_util/boringssl_test_util.vcxproj.filters deleted file mode 100644 index 9a73344a51..0000000000 --- a/vsprojects/vcxproj/boringssl_test_util/boringssl_test_util.vcxproj.filters +++ /dev/null @@ -1,30 +0,0 @@ - - - - - third_party\boringssl\crypto\test - - - third_party\boringssl\crypto\test - - - third_party\boringssl\crypto\test - - - - - - {051e6327-cdb8-1137-1175-c402b0f01c2c} - - - {5eb132f5-83f9-1528-e503-f07750f7d9af} - - - {ae2f5257-9ea9-8f0f-7e70-0ca4f1e9d83a} - - - {a7911910-503b-8f04-67d8-656dfb02381e} - - - - diff --git a/vsprojects/vcxproj/gen_hpack_tables/gen_hpack_tables.vcxproj b/vsprojects/vcxproj/gen_hpack_tables/gen_hpack_tables.vcxproj deleted file mode 100644 index 9f86659ea4..0000000000 --- a/vsprojects/vcxproj/gen_hpack_tables/gen_hpack_tables.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {FCDEA4C7-7F26-05DB-D08F-A08F499026E6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - gen_hpack_tables - - - gen_hpack_tables - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/gen_hpack_tables/gen_hpack_tables.vcxproj.filters b/vsprojects/vcxproj/gen_hpack_tables/gen_hpack_tables.vcxproj.filters deleted file mode 100644 index 3438ba5fd7..0000000000 --- a/vsprojects/vcxproj/gen_hpack_tables/gen_hpack_tables.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - tools\codegen\core - - - - - - {fe6fdf50-1106-394e-8522-ffe4b4a3fc84} - - - {c3d56c0c-8ec9-bcb1-7f82-52cc0d398b2f} - - - {329d48e3-f94b-8034-9308-4e7d08b1ad02} - - - - diff --git a/vsprojects/vcxproj/gen_legal_metadata_characters/gen_legal_metadata_characters.vcxproj b/vsprojects/vcxproj/gen_legal_metadata_characters/gen_legal_metadata_characters.vcxproj deleted file mode 100644 index 84a515523e..0000000000 --- a/vsprojects/vcxproj/gen_legal_metadata_characters/gen_legal_metadata_characters.vcxproj +++ /dev/null @@ -1,162 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A635DE99-B131-CA00-2D3B-8691D60B76C2} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - gen_legal_metadata_characters - - - gen_legal_metadata_characters - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/gen_legal_metadata_characters/gen_legal_metadata_characters.vcxproj.filters b/vsprojects/vcxproj/gen_legal_metadata_characters/gen_legal_metadata_characters.vcxproj.filters deleted file mode 100644 index 6fbb366367..0000000000 --- a/vsprojects/vcxproj/gen_legal_metadata_characters/gen_legal_metadata_characters.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - tools\codegen\core - - - - - - {88e0c0ec-f8b6-de4a-0cd4-149f9c8eca26} - - - {f365bb34-6301-3472-b143-6a9328e5b027} - - - {5b33134b-1045-8bea-e4ec-a25131e56e46} - - - - diff --git a/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj b/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj deleted file mode 100644 index 446b4129d2..0000000000 --- a/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj +++ /dev/null @@ -1,162 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - gen_percent_encoding_tables - - - gen_percent_encoding_tables - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj.filters b/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj.filters deleted file mode 100644 index a787887c88..0000000000 --- a/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - tools\codegen\core - - - - - - {e587d5b5-125f-1c73-e004-3c5659aa666b} - - - {0e90891e-2dd7-433f-2e97-b8495275cc10} - - - {194d6b8d-bf65-b581-90a4-13447dbfa951} - - - - diff --git a/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj b/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj deleted file mode 100644 index 52774e0802..0000000000 --- a/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj +++ /dev/null @@ -1,208 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {AAD4AEF3-DF1E-7A6D-EC35-233BD1031BF4} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - google_benchmark - - - google_benchmark - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters b/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters deleted file mode 100644 index 9db6ed4657..0000000000 --- a/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters +++ /dev/null @@ -1,125 +0,0 @@ - - - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - - - third_party\google_benchmark\include\benchmark - - - third_party\google_benchmark\include\benchmark - - - third_party\google_benchmark\include\benchmark - - - third_party\google_benchmark\include\benchmark - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - - - - {7458b63d-7ba4-103d-2bed-3e3ad30d8237} - - - {54a154e8-669b-a7c1-9b6e-bd1aab2f86e3} - - - {f54c3cb1-ec20-a651-6956-78379b51e1a5} - - - {0483a457-8050-4565-bc15-09695bf7b822} - - - {c39ff2d1-691e-4614-4d75-4bc20db05e09} - - - - diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters deleted file mode 100644 index a50a9f4200..0000000000 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters +++ /dev/null @@ -1,322 +0,0 @@ - - - - - src\core\lib\profiling - - - src\core\lib\profiling - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - - - src\core\lib\profiling - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - src\core\lib\support - - - - - - {9ea89137-2bf7-b6d9-b7af-7cb4d1b74928} - - - {e6957ec1-85ba-6515-03c0-e12878045b1f} - - - {4c72091a-872d-10da-2694-ce5a7b069a1f} - - - {e52e0384-d0d3-1475-0d4e-11719aac8f2a} - - - {31c42000-3ed7-95e1-d076-df814b72cdee} - - - {60eb2826-e58b-cb10-a98d-fe04727398a2} - - - {c5e1baa7-de77-beb1-9675-942261648f79} - - - {52037bcb-5719-a548-224d-834fbe569045} - - - {ba38d79d-d5de-a89e-9ca2-c5235a03ca7f} - - - {a4812158-7fba-959e-4e09-50167fe38df8} - - - - diff --git a/vsprojects/vcxproj/gpr_test_util/gpr_test_util.vcxproj.filters b/vsprojects/vcxproj/gpr_test_util/gpr_test_util.vcxproj.filters deleted file mode 100644 index c77c908747..0000000000 --- a/vsprojects/vcxproj/gpr_test_util/gpr_test_util.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - test\core\util - - - - - test\core\util - - - - - - {6d7715e1-42c7-d42f-0545-f06bfb524be4} - - - {3bcb4b0b-5eba-67b1-71bb-2541c003e51d} - - - {d150aa83-89ac-8ebf-2189-ed2feca0655c} - - - - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj deleted file mode 100644 index f281db72b6..0000000000 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ /dev/null @@ -1,450 +0,0 @@ - - - - - Debug-DLL - Win32 - - - Debug-DLL - x64 - - - Release-DLL - Win32 - - - Release-DLL - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc++ - - - grpc++ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters deleted file mode 100644 index f359e4ef31..0000000000 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ /dev/null @@ -1,469 +0,0 @@ - - - - - src\cpp\client - - - src\cpp\client - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\server - - - src\cpp\server - - - src\cpp\client - - - src\cpp\client - - - src\cpp\client - - - src\cpp\client - - - src\cpp\client - - - src\cpp\client - - - src\cpp\client - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\thread_manager - - - src\cpp\util - - - src\cpp\util - - - src\cpp\util - - - src\cpp\util - - - src\cpp\util - - - src\cpp\codegen - - - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++\generic - - - include\grpc++\generic - - - include\grpc++ - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl\codegen - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++ - - - include\grpc++\security - - - include\grpc++\security - - - include\grpc++\security - - - include\grpc++\security - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - - - include\grpc++\impl\codegen - - - src\cpp\client - - - src\cpp\common - - - src\cpp\server - - - src\cpp\client - - - src\cpp\common - - - src\cpp\server - - - src\cpp\server - - - src\cpp\thread_manager - - - - - - {82445414-24cd-8198-1fe1-4267c3f3df00} - - - {16946104-53ac-ac76-68b9-f9ec77ea6fae} - - - {784a0281-f547-aeb0-9f55-b26b7de9c769} - - - {51dae921-3aa2-1976-2ee4-c5615de1af54} - - - {0da8cd95-314f-da1b-5ce7-7791a5be1f1a} - - - {a3e7f28b-a7c7-7364-d402-edb1bfa414a4} - - - {20cbcf00-994a-300a-5184-bda96c6f45e4} - - - {a80eb32b-1be9-1187-5f40-30d92accecc8} - - - {a5c10dae-f715-2a30-1066-d22f8bc94cb2} - - - {48c3b0ae-c00f-fa20-6965-b73da65d71cb} - - - {dc8bfccd-341f-26f0-8ee4-47dde62a6dd1} - - - {328ff211-2886-406e-56f9-18ba1686f363} - - - {2420a905-e4f1-a5aa-a364-6a112878a39e} - - - {7febf32a-d7a6-76fa-9e17-f189f591c062} - - - {3c3e27f4-d3d9-3c42-5204-08b5e839f2de} - - - {2336e396-7e0b-8bf9-3b09-adc6ad1f0e5b} - - - {321b0980-74ad-e8ca-f23b-deffa5d6bb8f} - - - {23f9df56-8604-52a0-e6a2-f01b8e68d0e7} - - - {f842537a-2bf1-1ec3-b495-7d62c64a1c06} - - - - diff --git a/vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj b/vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj deleted file mode 100644 index 453b483fde..0000000000 --- a/vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj +++ /dev/null @@ -1,181 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {7B95AF96-915A-7132-AE45-9FA37769FACE} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc++_proto_reflection_desc_db - - - grpc++_proto_reflection_desc_db - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj.filters b/vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj.filters deleted file mode 100644 index 7e98918491..0000000000 --- a/vsprojects/vcxproj/grpc++_proto_reflection_desc_db/grpc++_proto_reflection_desc_db.vcxproj.filters +++ /dev/null @@ -1,61 +0,0 @@ - - - - - test\cpp\util - - - src\proto\grpc\reflection\v1alpha - - - - - include\grpc++\impl\codegen - - - - - test\cpp\util - - - - - - {9b233966-149a-36c4-89fb-11d63d8e00bb} - - - {1abcca00-34c5-513a-f372-4ef9b190910a} - - - {0059fdd3-0e35-5500-b8a5-b2e573d7537c} - - - {3f1b0e9e-802e-0535-bc3a-9685c2cf68d1} - - - {b479720c-6a7e-d0ca-bad6-db7cc12c9b0c} - - - {d9aa2326-a033-5a44-a24b-25cdb4a58297} - - - {cdabe038-cb18-dc0f-8afa-0787627ebd55} - - - {3947956e-b4fb-30ce-fc28-da34aec087e7} - - - {79b4cc2b-5f94-0c9f-4754-1197647dd040} - - - {96bd243c-be93-569d-6a83-4a67ab8c1fa3} - - - {1041430f-3c5a-c462-ccc6-adc845814dbe} - - - {c84ddb0b-56a0-0d29-a5c0-6cb1a7a49119} - - - - diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj deleted file mode 100644 index da4c685776..0000000000 --- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj +++ /dev/null @@ -1,183 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc++_reflection - - - grpc++_reflection - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters deleted file mode 100644 index b292e06fd7..0000000000 --- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters +++ /dev/null @@ -1,58 +0,0 @@ - - - - - src\cpp\ext - - - src\cpp\ext - - - src\proto\grpc\reflection\v1alpha - - - - - include\grpc++\ext - - - - - src\cpp\ext - - - - - - {e9441021-f78a-ec84-7efd-1883975feddb} - - - {c66e66b4-a64e-79bf-40e8-1a1bac124a3d} - - - {8d96203b-d3ce-2164-74a6-06e0ff2b09af} - - - {5ec5476e-3d72-e3f9-4f05-3f7c31c13651} - - - {a642ac8e-cec2-35d3-9a8a-78313d03b440} - - - {d0204618-0f6a-dbc6-cf41-ffc04e76075a} - - - {728e13e3-db36-9633-3cb9-a74c0f11470d} - - - {b49296ac-bc15-94ec-012b-5f8fe2ce2c1f} - - - {d980f473-6242-4a95-556a-7d4c6d6a2a00} - - - {8c7d8658-ade7-6086-0e04-7e00380ddccf} - - - - diff --git a/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj b/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj deleted file mode 100644 index cd3e406f9d..0000000000 --- a/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {3D3EAEA9-76C4-0CFE-4718-5A1F6B7F72C8} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc++_test - - - grpc++_test - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj.filters b/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj.filters deleted file mode 100644 index e1d8fe1ef3..0000000000 --- a/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj.filters +++ /dev/null @@ -1,35 +0,0 @@ - - - - - src\cpp\test - - - - - include\grpc++\test - - - - - - {418e2be9-9a04-af8a-8878-956543c507a1} - - - {bcaf3a2d-e884-bfbd-477b-09634054bcc5} - - - {3a14b66f-1d31-2d06-e9a1-c6d1199ab04d} - - - {bc08c75b-ee7e-85a0-fb0f-7586bbd33c6f} - - - {9797a57d-93ac-ff9c-5ac6-fd335777d782} - - - {58d4b4e0-5617-abf4-48a6-f1264d127b27} - - - - diff --git a/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj b/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj deleted file mode 100644 index cf07e21da4..0000000000 --- a/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj +++ /dev/null @@ -1,165 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc++_test_config - - - grpc++_test_config - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj.filters deleted file mode 100644 index 73e36148f2..0000000000 --- a/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - test\cpp\util - - - - - test\cpp\util - - - - - - {f78df609-2454-b2fb-c3dc-5e1a8d8dba8c} - - - {c74e7eda-23dd-175c-8716-b4eb87c574cd} - - - {3bc8fc39-08f9-9f61-fb55-6afc69970620} - - - - diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj deleted file mode 100644 index d2305b2e25..0000000000 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj +++ /dev/null @@ -1,265 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc++_test_util - - - grpc++_test_util - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters deleted file mode 100644 index d1aaba7092..0000000000 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters +++ /dev/null @@ -1,265 +0,0 @@ - - - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing\duplicate - - - test\cpp\end2end - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - src\cpp\codegen - - - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - - - test\cpp\end2end - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - - - - {af3e8efd-71b5-c047-7b1f-9896ff6b9dae} - - - {b8f8ac53-4ea7-9602-a5c8-592da3569a7e} - - - {e6ee8dea-0866-8e41-c115-c3a237f85295} - - - {67705040-57a2-dd65-b4e9-291d6512b10a} - - - {c977e49d-7e35-9e45-54c2-3ec17f4a2027} - - - {28c9540f-2a90-17a6-a18c-c8452c2efd93} - - - {cb0bbb9c-2cd0-46eb-225d-8614a13f30a5} - - - {48b3f0ad-af42-c9fd-74ce-d47ad7ffa748} - - - {21f220cf-c756-4172-000b-e8a1f0888097} - - - {4409f847-2173-ea03-724b-c9181ec50f07} - - - {ba3b353d-1c24-1466-d62d-7da515f5e6f6} - - - {58b0e1e0-f329-64ce-86e5-8f125c02b96e} - - - {f3daac52-2bfd-362e-9a76-04cd7a90aa34} - - - {3df5f11f-e018-1126-8c22-291540035aa8} - - - {4063b792-4f0a-a558-d4b1-0543a2b9fdeb} - - - {b1aaa210-fe1d-859a-67b3-95a2b286ec99} - - - {793efaa7-370f-c34a-d347-31fc4e0630e2} - - - {1e6760f2-4cf7-1ecb-88a5-5faeec3c2150} - - - {bbe1e5b7-f4f9-8e32-ce7c-8c21afcf39d8} - - - - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj deleted file mode 100644 index 1511a2cfe4..0000000000 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ /dev/null @@ -1,439 +0,0 @@ - - - - - Debug-DLL - Win32 - - - Debug-DLL - x64 - - - Release-DLL - Win32 - - - Release-DLL - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc++_unsecure - - - grpc++_unsecure - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters deleted file mode 100644 index bed77b25a4..0000000000 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ /dev/null @@ -1,442 +0,0 @@ - - - - - src\cpp\client - - - src\cpp\common - - - src\cpp\server - - - src\cpp\client - - - src\cpp\client - - - src\cpp\client - - - src\cpp\client - - - src\cpp\client - - - src\cpp\client - - - src\cpp\client - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\server - - - src\cpp\thread_manager - - - src\cpp\util - - - src\cpp\util - - - src\cpp\util - - - src\cpp\util - - - src\cpp\util - - - src\cpp\codegen - - - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++\generic - - - include\grpc++\generic - - - include\grpc++ - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl\codegen - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++\impl - - - include\grpc++ - - - include\grpc++\security - - - include\grpc++\security - - - include\grpc++\security - - - include\grpc++\security - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++ - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - - - src\cpp\client - - - src\cpp\common - - - src\cpp\server - - - src\cpp\server - - - src\cpp\thread_manager - - - - - - {5c4eb19f-d511-e8fd-e1d6-c377cdc7d3b1} - - - {f3dd91a8-058b-becf-9e41-eb42c7bc6e55} - - - {eceb50c0-bb49-3812-b6bd-b0af6df81da7} - - - {83717d3c-57d9-2bfa-ed9c-2b08f86da12b} - - - {dadc0002-f2ac-451b-a9b8-33b8de10b5fc} - - - {ccc364e2-3f28-8bfc-c26e-800dd6f9a9af} - - - {87cae06e-f40c-8fb6-73d6-26c7482ed9da} - - - {64bf60ff-9192-bb59-dcc8-8a0021e1d016} - - - {0ebf8008-80b9-d6da-e1dc-854bf1ec2195} - - - {c1049250-64f6-f900-d2e5-1718e148f1f0} - - - {adf6b8e3-4a4b-cb35-bb3d-568af97b58d1} - - - {cce6a85d-1111-3834-6825-31e170d93cff} - - - {1e5fd68c-bd87-e803-42b0-75a7fa19b91d} - - - {ff72923a-6499-8d2a-e0fb-6d574b85d77e} - - - {18e9c249-37f0-7f2c-f026-502d48ed8c92} - - - {ed8e4daa-825f-fbe5-2a45-846ad9165d3d} - - - {8a54a279-d14b-4237-0df3-1ffe1ef5a7af} - - - {e5b55f25-d99f-b8e5-9981-7da7fa7ba628} - - - {fb5d9a64-20ca-5119-ed38-04a3cf94923d} - - - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 2aa00df8bd..fbc5f8fd46 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -454,6 +454,7 @@ + @@ -840,6 +841,8 @@ + + @@ -907,26 +910,4 @@ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - + - - - - src\core\lib\surface - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\debug - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\ext\transport\chttp2\server\secure - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\alpn - - - src\core\lib\http - - - src\core\lib\security\context - - - src\core\lib\security\credentials\composite - - - src\core\lib\security\credentials - - - src\core\lib\security\credentials - - - src\core\lib\security\credentials\fake - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\iam - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\oauth2 - - - src\core\lib\security\credentials\plugin - - - src\core\lib\security\credentials\ssl - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\util - - - src\core\lib\security\util - - - src\core\lib\surface - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\ext\transport\chttp2\client\secure - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\transport\chttp2\server\insecure - - - src\core\ext\transport\chttp2\server\insecure - - - src\core\ext\transport\chttp2\client\insecure - - - src\core\ext\transport\chttp2\client\insecure - - - src\core\ext\lb_policy\grpclb - - - src\core\ext\lb_policy\grpclb - - - src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1 - - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - - - src\core\ext\lb_policy\pick_first - - - src\core\ext\lb_policy\round_robin - - - src\core\ext\resolver\dns\native - - - src\core\ext\resolver\sockaddr - - - src\core\ext\load_reporting - - - src\core\ext\load_reporting - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census\gen - - - src\core\ext\census\gen - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\plugin_registry - - - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc - - - include\grpc - - - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\debug - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\alpn - - - src\core\lib\security\context - - - src\core\lib\security\credentials\composite - - - src\core\lib\security\credentials - - - src\core\lib\security\credentials\fake - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\iam - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\oauth2 - - - src\core\lib\security\credentials\plugin - - - src\core\lib\security\credentials\ssl - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\util - - - src\core\lib\security\util - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\lb_policy\grpclb - - - src\core\ext\lb_policy\grpclb - - - src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1 - - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - - - src\core\ext\load_reporting - - - src\core\ext\load_reporting - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census\gen - - - src\core\ext\census\gen - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - - - - {968de0a1-346d-b75a-6f19-6a55119b8235} - - - {880c644d-b84f-cfca-98bd-e145f36232ab} - - - {38832702-fee1-b2bc-75d3-923e748dcde9} - - - {def748f5-ed2a-a9bb-40d9-c31d00f0e13b} - - - {d538af37-07b2-062b-fa2a-d9f882cb2737} - - - {ea745680-21ea-9c5e-679b-64dc40562d08} - - - {3f32a58f-394f-5f13-06aa-6cc52cc2daaf} - - - {9bf70bd2-f553-11b2-c237-abd148971eea} - - - {4a14dd37-5868-c656-7333-fa80574cbb07} - - - {36eee53a-cd19-738a-c387-20c44a2bfd07} - - - {030f00ff-6c54-76c8-12df-37e3008335d1} - - - {fe41339e-53fb-39b3-7457-7a0fbb238dbe} - - - {a7c27f6b-6d15-01cf-76d9-c30dddea0990} - - - {bc714e6d-8aba-91df-7db9-7f189f05a6ff} - - - {adf7e553-94ef-14fd-e845-03104f00a06f} - - - {bc357e2d-8ddd-a688-88a3-255228fc0818} - - - {b63ded00-b24f-708e-333f-ce199e421875} - - - {2472d352-cf94-f317-646e-72b769cea846} - - - {b6c863cd-a135-32e8-df03-02365f526f0d} - - - {6bfa6808-9dcb-8990-deed-5cf58a149dda} - - - {e8fe6413-ab8c-48d5-2c7b-aa79e3db4ab2} - - - {94e34be0-29d2-1731-3c1e-617ec4986acb} - - - {98c1ccc2-2c91-a3d2-6040-a2e15993d51a} - - - {e3abfd0a-064e-0f2f-c8e8-7c5a7e98142a} - - - {ac42667b-bbba-3571-20bc-7a4240ef26ca} - - - {ef2aa344-783f-7fbd-c83a-47e2d38db14d} - - - {dbffebe0-eebb-577d-1860-ef6837f4cf50} - - - {4e699b02-fae4-dabd-afd2-2e41b05bef0e} - - - {e98ed28e-8dc5-3bb4-22a2-8893831a0ab8} - - - {1d36fe16-b004-6bee-c661-328234bbb469} - - - {e8539863-6029-cca4-44a9-5481cacf8144} - - - {0afa539f-8c83-d4b9-cdea-550091f09638} - - - {6f34254e-e69f-c9b4-156d-5024bade5408} - - - {5b2ded3f-84a5-f6b4-2060-286c7d1dc945} - - - {1931b044-90f3-cd68-b5f8-23be77ca8efc} - - - {dadf7fe9-3f15-d431-e4f6-f987b090536c} - - - {19122742-9b92-5b67-9fb9-e552ac62ca5d} - - - {dab8f03a-73de-8cfa-88fb-6e04402efb54} - - - {5468ba38-b8a3-85b1-216f-48a2364e18df} - - - {cb2b0073-f2a7-5c63-d182-8874b24bdf36} - - - {c4661d64-349f-01c1-1ba8-0602f9047595} - - - {187b52e3-bc78-6c62-3e68-4eb19a257661} - - - {c8af33b1-f786-001d-3e92-140872dc9829} - - - {197ed135-5f84-9f6a-6751-38dc5e9dd38c} - - - {6d391299-53d7-ee6a-55aa-d4c46cd86e82} - - - {412c7418-e90a-de77-5705-7890ba960911} - - - {718f826c-994b-7dd4-3042-0e999c5c22ba} - - - {ab21bcdf-de99-5838-699a-19ecb0c4aa14} - - - {f47a7a32-3166-b899-3622-f062f372feea} - - - {46120bcc-03e3-1aaa-fc61-9cef786bd70c} - - - {9d7802bc-d459-1a9b-3c97-868cddcca1d1} - - - {b22e611f-8272-9914-24a5-8107ebf51eeb} - - - {fcd7b397-aadd-556a-8aae-0cb7c893fbe0} - - - {aed4de18-0b8a-0fed-6f5b-41ea3442310d} - - - {a21971fb-304f-da08-b1b2-7bd8df8ac373} - - - {e9d0d3fc-c100-f3e6-89b8-649f241155bf} - - - {95ad2811-c8d0-7a42-2a73-baf03fcbf699} - - - {02bec99b-ff39-88d7-9dea-e0ff9f4a2701} - - - {aaab30a4-2a15-732e-c141-3fbc0f0f5a7a} - - - {93d6596d-330c-1d27-6f84-3c840e57869e} - - - - diff --git a/vsprojects/vcxproj/grpc/packages.config b/vsprojects/vcxproj/grpc/packages.config deleted file mode 100644 index 13203e29fa..0000000000 --- a/vsprojects/vcxproj/grpc/packages.config +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj deleted file mode 100644 index c97c7dcb3d..0000000000 --- a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj +++ /dev/null @@ -1,197 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {86E35862-43E8-F59E-F906-AFE0348AD3D2} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc_cli_libs - - - grpc_cli_libs - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {7B95AF96-915A-7132-AE45-9FA37769FACE} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters deleted file mode 100644 index 84a401a7bd..0000000000 --- a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters +++ /dev/null @@ -1,88 +0,0 @@ - - - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - src\proto\grpc\reflection\v1alpha - - - - - include\grpc++\impl\codegen - - - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - test\cpp\util - - - - - - {09004fab-571d-4499-ea07-ab14a367b0e6} - - - {17074550-63b5-b955-9a30-33f983c6933a} - - - {9d5cca3a-e3da-b197-ba07-8ef7649de092} - - - {12d6b95a-4072-e05e-8de7-79b0c2f7329f} - - - {5cc1b6f3-ef01-62ac-9b0e-1fd776f42182} - - - {86bd3e99-8380-85fd-f297-1ac2f018ed51} - - - {10c2568e-5695-1c21-6c51-172889d406f8} - - - {5213881a-59f9-2d2e-43aa-1433dc6f70af} - - - {8a66b2e3-477b-66e2-fba8-6987c6381367} - - - {16a32a9f-93aa-5812-5a5e-be659aaa76aa} - - - {a6049b9f-9c4c-f814-ac67-dbd2b628b2d0} - - - {30f91d14-0a6a-c8e8-ff23-6a83142d42fd} - - - - diff --git a/vsprojects/vcxproj/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj b/vsprojects/vcxproj/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj deleted file mode 100644 index a521414c87..0000000000 --- a/vsprojects/vcxproj/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {7E51A25F-AC59-488F-906C-C60FAAE706AA} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - grpc_cpp_plugin - - - grpc_cpp_plugin - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {B6E81D84-2ACB-41B8-8781-493A944C7817} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj.filters b/vsprojects/vcxproj/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj.filters deleted file mode 100644 index 421c3083b3..0000000000 --- a/vsprojects/vcxproj/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj.filters +++ /dev/null @@ -1,18 +0,0 @@ - - - - - src\compiler - - - - - - {c620a9d0-7631-34ba-6712-774533631d63} - - - {2d2427da-b1a4-572b-239a-73695aa080ae} - - - - diff --git a/vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj b/vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj deleted file mode 100644 index 4e8c088e2d..0000000000 --- a/vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {77971F8D-F583-3E77-0E3C-6C1FB6B1749C} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc_create_jwt - - - grpc_create_jwt - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj.filters b/vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj.filters deleted file mode 100644 index 857d44e815..0000000000 --- a/vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\security - - - - - - {43712951-4a0c-baed-a8d7-f28cc758a4aa} - - - {f961567d-8068-75b9-5e88-cb59fa97dac0} - - - {b63ba4e4-e3e1-40f9-0e81-a50a1c544a36} - - - - diff --git a/vsprojects/vcxproj/grpc_csharp_ext/grpc_csharp_ext.vcxproj b/vsprojects/vcxproj/grpc_csharp_ext/grpc_csharp_ext.vcxproj deleted file mode 100644 index 680008cf7d..0000000000 --- a/vsprojects/vcxproj/grpc_csharp_ext/grpc_csharp_ext.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D64C6D63-4458-4A88-AB38-35678384A7E4} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - DynamicLibrary - true - Unicode - - - DynamicLibrary - false - true - Unicode - - - - - - - - - - - - - - grpc_csharp_ext - static - Debug - static - Debug - - - grpc_csharp_ext - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/grpc_csharp_ext/grpc_csharp_ext.vcxproj.filters b/vsprojects/vcxproj/grpc_csharp_ext/grpc_csharp_ext.vcxproj.filters deleted file mode 100644 index 51ce169e24..0000000000 --- a/vsprojects/vcxproj/grpc_csharp_ext/grpc_csharp_ext.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - src\csharp\ext - - - - - - {87096974-697b-4e86-43a7-683a72909332} - - - {d8a7bd0e-70af-37b9-a963-3a47b6d39917} - - - {1c07f119-a376-d839-778e-888157b82c9e} - - - - diff --git a/vsprojects/vcxproj/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj b/vsprojects/vcxproj/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj deleted file mode 100644 index 538e3b0100..0000000000 --- a/vsprojects/vcxproj/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {3C813052-A49A-4662-B90A-1ADBEC7EE453} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - grpc_csharp_plugin - - - grpc_csharp_plugin - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {B6E81D84-2ACB-41B8-8781-493A944C7817} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj.filters b/vsprojects/vcxproj/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj.filters deleted file mode 100644 index a1af77ce3a..0000000000 --- a/vsprojects/vcxproj/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj.filters +++ /dev/null @@ -1,18 +0,0 @@ - - - - - src\compiler - - - - - - {4e6e6a05-415d-c3ba-abec-bba094134e98} - - - {83905892-f40c-567f-84b0-1dbbf060dd61} - - - - diff --git a/vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj b/vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj deleted file mode 100644 index cafc951867..0000000000 --- a/vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - DynamicLibrary - true - Unicode - - - DynamicLibrary - false - true - Unicode - - - - - - - - - - - - - - grpc_dll - static - Debug - static - Debug - - - grpc_dll - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - $(SolutionDir)\..\grpc.def - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - $(SolutionDir)\..\grpc.def - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - $(SolutionDir)\..\grpc.def - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - $(SolutionDir)\..\grpc.def - true - true - - - - - - - - - - - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj.filters b/vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj.filters deleted file mode 100644 index 8493ace0a2..0000000000 --- a/vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj.filters +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/vsprojects/vcxproj/grpc_node_plugin/grpc_node_plugin.vcxproj b/vsprojects/vcxproj/grpc_node_plugin/grpc_node_plugin.vcxproj deleted file mode 100644 index faf93fd136..0000000000 --- a/vsprojects/vcxproj/grpc_node_plugin/grpc_node_plugin.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {57ABD9A2-CE8E-CCA7-5171-35C4534F3595} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - grpc_node_plugin - - - grpc_node_plugin - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {B6E81D84-2ACB-41B8-8781-493A944C7817} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_node_plugin/grpc_node_plugin.vcxproj.filters b/vsprojects/vcxproj/grpc_node_plugin/grpc_node_plugin.vcxproj.filters deleted file mode 100644 index 28b197f6f3..0000000000 --- a/vsprojects/vcxproj/grpc_node_plugin/grpc_node_plugin.vcxproj.filters +++ /dev/null @@ -1,18 +0,0 @@ - - - - - src\compiler - - - - - - {089d5d6b-d438-dc98-b30f-bd608e3bbb78} - - - {1cc34440-c001-7578-c4d3-78f5d98fb602} - - - - diff --git a/vsprojects/vcxproj/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj b/vsprojects/vcxproj/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj deleted file mode 100644 index 557fd54242..0000000000 --- a/vsprojects/vcxproj/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {19564640-CEE6-4921-ABA5-676ED79A36F6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - grpc_objective_c_plugin - - - grpc_objective_c_plugin - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {B6E81D84-2ACB-41B8-8781-493A944C7817} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj.filters b/vsprojects/vcxproj/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj.filters deleted file mode 100644 index 3a572015f0..0000000000 --- a/vsprojects/vcxproj/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj.filters +++ /dev/null @@ -1,18 +0,0 @@ - - - - - src\compiler - - - - - - {f550bd5f-fe2a-43e3-61ad-758f91a46b52} - - - {d6122ed8-ce4a-ea3c-831c-54e81d65a3bc} - - - - diff --git a/vsprojects/vcxproj/grpc_php_plugin/grpc_php_plugin.vcxproj b/vsprojects/vcxproj/grpc_php_plugin/grpc_php_plugin.vcxproj deleted file mode 100644 index 1648ba9010..0000000000 --- a/vsprojects/vcxproj/grpc_php_plugin/grpc_php_plugin.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2C5F74B5-2F1E-A7A7-45EA-250AF73A1CEC} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - grpc_php_plugin - - - grpc_php_plugin - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {B6E81D84-2ACB-41B8-8781-493A944C7817} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_php_plugin/grpc_php_plugin.vcxproj.filters b/vsprojects/vcxproj/grpc_php_plugin/grpc_php_plugin.vcxproj.filters deleted file mode 100644 index e131753f8d..0000000000 --- a/vsprojects/vcxproj/grpc_php_plugin/grpc_php_plugin.vcxproj.filters +++ /dev/null @@ -1,18 +0,0 @@ - - - - - src\compiler - - - - - - {d7fb4039-77f4-10f2-59fe-bb98fb56950a} - - - {5560fb58-2ae8-75cc-fbca-e630a50c15bf} - - - - diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj deleted file mode 100644 index 05165d6fb8..0000000000 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj +++ /dev/null @@ -1,197 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B6E81D84-2ACB-41B8-8781-493A944C7817} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - - grpc_plugin_support - - - grpc_plugin_support - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters deleted file mode 100644 index c8b893221d..0000000000 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters +++ /dev/null @@ -1,106 +0,0 @@ - - - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - - - include\grpc++\impl\codegen - - - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - src\compiler - - - - - - {93ed419d-4540-7fa4-814d-3392745b77ff} - - - {893c09ee-e315-e763-9d9d-37522ba2f51c} - - - {3e8c71a4-8a06-a577-2799-2224a1ad1f1b} - - - {ec2a6e26-915b-ba1b-4f59-f361dc01105c} - - - {94c9769a-a6cd-49fd-2b30-e52d2d02ed91} - - - {0e6b1e6c-7299-59ce-d757-619bcddd5441} - - - - diff --git a/vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj b/vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj deleted file mode 100644 index ed0b98c612..0000000000 --- a/vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C002965C-8457-CCE5-B1BA-E748FF9A11B6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc_print_google_default_creds_token - - - grpc_print_google_default_creds_token - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj.filters b/vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj.filters deleted file mode 100644 index 3c71c75a03..0000000000 --- a/vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\security - - - - - - {5a149bd4-51f2-6ea6-4ea8-2d933273f17e} - - - {f3b3d83b-df7b-8d34-ce52-4d0352ce861a} - - - {101930bc-c8a6-c980-fbbb-8b48d3029a3e} - - - - diff --git a/vsprojects/vcxproj/grpc_python_plugin/grpc_python_plugin.vcxproj b/vsprojects/vcxproj/grpc_python_plugin/grpc_python_plugin.vcxproj deleted file mode 100644 index a76cebf4e5..0000000000 --- a/vsprojects/vcxproj/grpc_python_plugin/grpc_python_plugin.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {DF52D501-A6CF-4E6F-BA38-6EBE2E8DAFB2} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - grpc_python_plugin - - - grpc_python_plugin - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {B6E81D84-2ACB-41B8-8781-493A944C7817} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_python_plugin/grpc_python_plugin.vcxproj.filters b/vsprojects/vcxproj/grpc_python_plugin/grpc_python_plugin.vcxproj.filters deleted file mode 100644 index e9d60aceed..0000000000 --- a/vsprojects/vcxproj/grpc_python_plugin/grpc_python_plugin.vcxproj.filters +++ /dev/null @@ -1,18 +0,0 @@ - - - - - src\compiler - - - - - - {493af5ff-4d2b-df8c-1cf2-28c895efe1a3} - - - {2517f73e-aa8f-108a-2a6d-b68ab23f7838} - - - - diff --git a/vsprojects/vcxproj/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj b/vsprojects/vcxproj/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj deleted file mode 100644 index 5adacb02c0..0000000000 --- a/vsprojects/vcxproj/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {069E9D05-B78B-4751-9252-D21EBAE7DE8E} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - grpc_ruby_plugin - - - grpc_ruby_plugin - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {B6E81D84-2ACB-41B8-8781-493A944C7817} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj.filters b/vsprojects/vcxproj/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj.filters deleted file mode 100644 index 5eca183507..0000000000 --- a/vsprojects/vcxproj/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj.filters +++ /dev/null @@ -1,18 +0,0 @@ - - - - - src\compiler - - - - - - {22d1d570-a13c-2038-f50a-342e02640d48} - - - {789b3751-7b9d-eb74-cd7b-035456cf6ad6} - - - - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj deleted file mode 100644 index 71953a98f7..0000000000 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ /dev/null @@ -1,577 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc_test_util - - - grpc_test_util - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters deleted file mode 100644 index 139973edbc..0000000000 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ /dev/null @@ -1,895 +0,0 @@ - - - - - test\core\end2end\data - - - test\core\end2end\data - - - test\core\end2end\data - - - test\core\end2end\data - - - test\core\security - - - test\core\end2end - - - test\core\end2end - - - test\core\end2end\fixtures - - - test\core\end2end\fixtures - - - test\core\iomgr - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\debug - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - - - test\core\end2end\data - - - test\core\security - - - test\core\end2end - - - test\core\end2end - - - test\core\end2end\fixtures - - - test\core\end2end\fixtures - - - test\core\iomgr - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\debug - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - - - - {50129440-aff7-7df7-682c-b9671be19a6f} - - - {d448b078-95a6-6fca-fe4a-8b44dd71f359} - - - {314a6801-6fe3-9211-33d8-ecf3332c1151} - - - {8e97f1e1-f4d1-a56e-0837-7901778fb3b9} - - - {7d107d7c-1da3-9525-3ba1-3a411b552ea8} - - - {f7bfac91-5eb2-dea7-4601-6c63edbbf997} - - - {f4e8c61e-1ca6-0fdd-7b5e-b7f9a30c9a21} - - - {1cd1503c-bec0-5ade-c75f-aa25c80975ec} - - - {09632582-2cc3-5618-d673-65d3884f8ce5} - - - {2c1a72e9-886e-8082-9d2f-0fc9cb3ab996} - - - {4862ecce-fa07-eb5e-5c05-bfa753c8bfe5} - - - {fc7f488e-08b4-8366-3720-1f7ffaa0b0b3} - - - {89bc8f83-e29a-ddab-8f6b-22df11cdc867} - - - {4d172bbc-20c4-6e7d-872a-2d287b589aa0} - - - {7f2b7dca-395f-94dd-c9ad-9a286bd9751e} - - - {5249e884-ea07-6782-531d-ec622c54b9af} - - - {a2783de3-4fcf-718d-a859-c2108350ff33} - - - {f95a0dc5-2e57-c168-6128-fe07e1bd58a9} - - - {7004f7a6-a821-a581-1df5-94c7d22c6850} - - - {c0da5050-98b1-e4af-71a7-6317af6338e0} - - - {1daa14ff-cf54-5a38-9104-46ed9882784b} - - - {d3dce584-6111-9ff2-affe-5933a9291c17} - - - {b0938b31-f9d5-21d7-de41-08107caafd80} - - - {6e9f8de1-258c-578f-aa3d-7da9320a3171} - - - - diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj deleted file mode 100644 index 7f3e101e75..0000000000 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj +++ /dev/null @@ -1,219 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc_test_util_unsecure - - - grpc_test_util_unsecure - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters deleted file mode 100644 index 8be9f5b796..0000000000 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters +++ /dev/null @@ -1,113 +0,0 @@ - - - - - test\core\end2end - - - test\core\end2end - - - test\core\end2end\fixtures - - - test\core\end2end\fixtures - - - test\core\iomgr - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - - - test\core\end2end - - - test\core\end2end - - - test\core\end2end\fixtures - - - test\core\end2end\fixtures - - - test\core\iomgr - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - test\core\util - - - - - - {037c7645-1698-cf2d-4163-525240323101} - - - {85f90d4a-70b4-1b30-8cef-4eadb2a3a04b} - - - {6387fc42-48d5-0134-a9d4-4477151722bf} - - - {204e56b4-4315-b3bd-4a71-7e1c3ebef3ce} - - - {53745d42-f5b1-2381-6b64-146f1234e513} - - - {31b30beb-baf0-3979-2a54-560a16814cf9} - - - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj deleted file mode 100644 index e2e79333df..0000000000 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ /dev/null @@ -1,830 +0,0 @@ - - - - - Debug-DLL - Win32 - - - Debug-DLL - x64 - - - Release-DLL - Win32 - - - Release-DLL - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc_unsecure - - - grpc_unsecure - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters deleted file mode 100644 index 5ba2a07222..0000000000 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ /dev/null @@ -1,1240 +0,0 @@ - - - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\debug - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\ext\transport\chttp2\server\insecure - - - src\core\ext\transport\chttp2\server\insecure - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\alpn - - - src\core\ext\transport\chttp2\client\insecure - - - src\core\ext\transport\chttp2\client\insecure - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\resolver\dns\native - - - src\core\ext\resolver\sockaddr - - - src\core\ext\load_reporting - - - src\core\ext\load_reporting - - - src\core\ext\lb_policy\grpclb - - - src\core\ext\lb_policy\grpclb - - - src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1 - - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - - - src\core\ext\lb_policy\pick_first - - - src\core\ext\lb_policy\round_robin - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census\gen - - - src\core\ext\census\gen - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\plugin_registry - - - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc - - - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\debug - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\alpn - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\client_channel - - - src\core\ext\load_reporting - - - src\core\ext\load_reporting - - - src\core\ext\lb_policy\grpclb - - - src\core\ext\lb_policy\grpclb - - - src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1 - - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census\gen - - - src\core\ext\census\gen - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - src\core\ext\census - - - - - - {10076c7e-7c8e-8005-0c81-64454af2cbc8} - - - {77b9717b-b8d8-dd5f-14bb-a3e96809a70a} - - - {10cfa248-c60f-376f-e7ae-2a7d7d8e81f5} - - - {03cc6735-c734-7017-4000-a435f29d55c3} - - - {aaf326a1-c884-46ea-875a-cbbd9983e539} - - - {88491077-386b-2039-d14c-0c40136b5f7a} - - - {82f86e8c-00a4-f566-d235-670fc629798d} - - - {3f21cd12-b8b9-18f8-8780-e21bbe2285d0} - - - {dfe53168-57b0-3ac4-d8ba-07fd958cc8f5} - - - {2edd1aad-34cf-0c66-e03e-b1b2dd81d9a8} - - - {a23781d2-27e4-7cb0-12cd-59782ecb21ce} - - - {25a465c8-d1e8-6248-c005-bb2062206472} - - - {40fc2615-d244-0d36-4486-ba6f0fa468bb} - - - {1d129f24-a399-12ef-68de-023aff7dde52} - - - {21858d9d-30b5-8847-5882-6b47df0fa293} - - - {e9256e96-ea3d-c1fd-6426-9d53d9f08f66} - - - {e27f9ecf-97bb-1a2e-3135-a41f732dcf55} - - - {e5fc1091-5d60-404f-775b-686ef4b3266f} - - - {2d6e3879-24c7-06e2-b415-40ab18a3b918} - - - {88c78e27-267a-95df-07c5-50e5fbc2f40c} - - - {2e0a9b4f-6394-7c0e-6e5a-0f8b3ee29b41} - - - {3d5398c8-928b-9096-8eb7-f8c40ee68c4d} - - - {71686ed0-fbf9-02a4-d65a-a73f7dc4e2be} - - - {967c89fe-c97c-27e2-aac0-9ba5854cb5fa} - - - {702829f0-099e-2ab7-6b44-ed7cff3ec083} - - - {7d4830f7-20db-07d3-c3a9-ecfe63ae1992} - - - {0d589e16-e470-4968-318c-796af5a33637} - - - {34dfdc9b-ab97-47f0-c1e1-b2e7381c3de6} - - - {81fb55f4-9216-441b-8389-a7120bbcd45e} - - - {3f53dcb6-71d7-28ff-1794-26a08e4601fe} - - - {45b20f28-376c-9dea-1800-8a0193411946} - - - {8bd5b461-bff8-6aa8-b5a6-85da2834eb8a} - - - {fb964f3d-a59c-a7ba-fee5-6072dbb94a7b} - - - {b88002e9-185e-4e64-49f5-2d8989ce87f6} - - - {7f23789d-f18a-2a2d-60fe-a87dc656f539} - - - {748c8078-2027-8641-f485-1d4c66466e79} - - - {bb1a1cf2-6824-08f0-a9bd-3fafcaf13042} - - - {681cdaeb-c47f-8853-d985-bf13c2873947} - - - {74c81ab7-e329-a362-3890-4c41b90f0511} - - - {506dc3b3-d884-2b59-0dfa-57ed6affa2d3} - - - {6c3394d1-27e9-003e-19ed-8116d210f7cc} - - - {babf0a90-e934-f599-5475-e6937d9580fe} - - - {025c051e-8eba-125b-67f9-173f95176eb2} - - - {6511f77d-f28c-80e0-0889-8975e688e344} - - - - diff --git a/vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj b/vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj deleted file mode 100644 index e75143bee6..0000000000 --- a/vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - grpc_verify_jwt - - - grpc_verify_jwt - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj.filters b/vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj.filters deleted file mode 100644 index d4f70aa6be..0000000000 --- a/vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\security - - - - - - {04d82748-e346-2afa-f180-186a87795097} - - - {1fcfe715-ac99-a1ae-6c21-05caa84faf53} - - - {b1b6e2b2-ec6d-09d8-5c3b-d6ba1652da52} - - - - diff --git a/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj b/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj deleted file mode 100644 index 7a8a4b362f..0000000000 --- a/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj +++ /dev/null @@ -1,190 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {AE8AE98D-8EB9-D931-AA79-F6AB16234A49} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - interop_client_helper - - - interop_client_helper - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj.filters b/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj.filters deleted file mode 100644 index 466ef8ba9a..0000000000 --- a/vsprojects/vcxproj/interop_client_helper/interop_client_helper.vcxproj.filters +++ /dev/null @@ -1,41 +0,0 @@ - - - - - src\proto\grpc\testing - - - test\cpp\interop - - - - - test\cpp\interop - - - - - - {f00fc868-0efd-6675-4891-42af1833c479} - - - {3c09bd5f-4d22-1faf-1a58-32118a5473e6} - - - {0c11c3d3-d0b6-7803-39c4-8521b045464e} - - - {0e888b7f-bacf-f718-56cf-e2db104e2263} - - - {2164d474-4a93-f014-982c-30ff23cb7ba5} - - - {704b5dcd-7bcc-aaa8-d91a-78a1ec1b8fcc} - - - {d07b9253-17d2-d5cf-0cbb-86223b2591b9} - - - - diff --git a/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj b/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj deleted file mode 100644 index b85c713194..0000000000 --- a/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj +++ /dev/null @@ -1,217 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F77557CD-450D-F7C2-F8A5-71836C5394CA} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - interop_client_main - - - interop_client_main - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {AE8AE98D-8EB9-D931-AA79-F6AB16234A49} - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj.filters b/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj.filters deleted file mode 100644 index 4925cf4955..0000000000 --- a/vsprojects/vcxproj/interop_client_main/interop_client_main.vcxproj.filters +++ /dev/null @@ -1,50 +0,0 @@ - - - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - test\cpp\interop - - - test\cpp\interop - - - - - test\cpp\interop - - - - - - {14f6df92-cbdd-4e46-2357-47b6ad60530a} - - - {5c42148f-df9d-b35f-748d-30c00eb3be96} - - - {049f0174-42f7-6e52-a411-146353ad7e89} - - - {02f16533-e225-b418-f5b0-d118ad8534ad} - - - {bd02b37c-f3ec-86c0-0511-d2e1feeae251} - - - {08d911cf-9536-b45d-c54f-342a9b18e986} - - - {7b56f732-09fc-3a65-4d2e-bcdd9ce4309d} - - - - diff --git a/vsprojects/vcxproj/interop_server_helper/interop_server_helper.vcxproj b/vsprojects/vcxproj/interop_server_helper/interop_server_helper.vcxproj deleted file mode 100644 index 4c99988a34..0000000000 --- a/vsprojects/vcxproj/interop_server_helper/interop_server_helper.vcxproj +++ /dev/null @@ -1,179 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F55BEA2C-B61D-AAFE-CA15-223B8AC0DE5A} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - interop_server_helper - - - interop_server_helper - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/interop_server_helper/interop_server_helper.vcxproj.filters b/vsprojects/vcxproj/interop_server_helper/interop_server_helper.vcxproj.filters deleted file mode 100644 index 0704c71a76..0000000000 --- a/vsprojects/vcxproj/interop_server_helper/interop_server_helper.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - test\cpp\interop - - - - - test\cpp\interop - - - - - - {f3a504d5-42bb-e7c5-abc0-d270c867ca8b} - - - {fd3c88e4-793c-3d31-448d-633a9163a110} - - - {7f2906b2-3b46-9dd8-2df8-c8fb8218d75b} - - - - diff --git a/vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj b/vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj deleted file mode 100644 index 204d3f770b..0000000000 --- a/vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj +++ /dev/null @@ -1,212 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {458DCA09-83B9-5E68-D7E9-118864ECBD94} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - interop_server_lib - - - interop_server_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {F55BEA2C-B61D-AAFE-CA15-223B8AC0DE5A} - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj.filters b/vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj.filters deleted file mode 100644 index 63fc0f7f51..0000000000 --- a/vsprojects/vcxproj/interop_server_lib/interop_server_lib.vcxproj.filters +++ /dev/null @@ -1,42 +0,0 @@ - - - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - test\cpp\interop - - - - - - {356c90d7-2dcd-5f6a-d3ca-6461f2597581} - - - {70740334-0cbf-ab29-0e1c-f0ffa390d77f} - - - {d581eb6c-94b6-eb79-6b76-d122c13cff3c} - - - {27f43e87-cfd9-68cc-179a-fc44046797c4} - - - {3402c01e-a9f6-2dd8-6963-03a5774d37f2} - - - {656eed4b-782e-224c-6101-8a61c2daa94e} - - - {61c0dab5-5c69-82b0-2961-4104445f2e06} - - - - diff --git a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj deleted file mode 100644 index 9fd4d11be9..0000000000 --- a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj +++ /dev/null @@ -1,167 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {309042CA-FC23-AA3C-8289-535F4106E47A} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - interop_server_main - - - interop_server_main - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - {458DCA09-83B9-5E68-D7E9-118864ECBD94} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters deleted file mode 100644 index d8d049299b..0000000000 --- a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\interop - - - - - - {02523054-816a-75a0-b24b-f527e99c7142} - - - {46efbca3-ee7d-161b-544f-6f90de97d043} - - - {ca4121b0-3c58-ad24-318c-1d1684152ce1} - - - - diff --git a/vsprojects/vcxproj/qps/qps.vcxproj b/vsprojects/vcxproj/qps/qps.vcxproj deleted file mode 100644 index 004cf7c9f0..0000000000 --- a/vsprojects/vcxproj/qps/qps.vcxproj +++ /dev/null @@ -1,247 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8423B0C5-2428-CA10-82EF-7B5C1F3D8011} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - qps - - - qps - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/qps/qps.vcxproj.filters b/vsprojects/vcxproj/qps/qps.vcxproj.filters deleted file mode 100644 index d3a440ba73..0000000000 --- a/vsprojects/vcxproj/qps/qps.vcxproj.filters +++ /dev/null @@ -1,119 +0,0 @@ - - - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\util - - - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\qps - - - test\cpp\util - - - - - - {0a68b7ce-1b1a-8927-e173-5e8d7ebecf8a} - - - {7e654fb3-2440-c5ad-9cc1-c6c425cd91bd} - - - {d95c9d8c-ad29-576f-c974-aafa292a361e} - - - {0878a4bc-7ae5-7cad-e2e1-3a91cc0e7b59} - - - {2d898a55-573b-f256-2336-bddd04eb7c70} - - - {10aaf291-3f7c-55fe-d0c5-0d09e3f6dd5a} - - - {b57fa0e4-f88d-fe46-8885-956fc582de3d} - - - {9042d134-6d5a-a907-799e-01768a475055} - - - - diff --git a/vsprojects/vcxproj/reconnect_server/reconnect_server.vcxproj b/vsprojects/vcxproj/reconnect_server/reconnect_server.vcxproj deleted file mode 100644 index 9e4d44d4c7..0000000000 --- a/vsprojects/vcxproj/reconnect_server/reconnect_server.vcxproj +++ /dev/null @@ -1,182 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {929C90AE-483F-AC80-EF93-226199F9E428} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - reconnect_server - - - reconnect_server - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - {E3110C46-A148-FF65-08FD-3324829BE7FE} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/reconnect_server/reconnect_server.vcxproj.filters b/vsprojects/vcxproj/reconnect_server/reconnect_server.vcxproj.filters deleted file mode 100644 index d6062f1df1..0000000000 --- a/vsprojects/vcxproj/reconnect_server/reconnect_server.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - test\core\util - - - - - test\core\util - - - - - - {2c1de77d-7861-fdd2-e555-ccc3ba4a2055} - - - {6eb2ecf2-4fe8-a85e-cc37-34a5d5144442} - - - {108031c9-fe76-7fee-49a6-700e25c6250a} - - - - diff --git a/vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj b/vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj deleted file mode 100644 index 10541cb6f2..0000000000 --- a/vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6E5ADE15-9B8E-A040-0508-9F14F836B51B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - alarm_cpp_test - static - Debug - static - Debug - - - alarm_cpp_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj.filters b/vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj.filters deleted file mode 100644 index fedcdb28f2..0000000000 --- a/vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\common - - - - - - {ee2d2282-632f-e0ff-cd3e-cec1507e6831} - - - {672815bb-fd6d-b5a2-b2b8-ee145fecd451} - - - {6e1a5a97-6bd9-847e-afea-0ca2ac4cc6b7} - - - - diff --git a/vsprojects/vcxproj/test/alarm_test/alarm_test.vcxproj b/vsprojects/vcxproj/test/alarm_test/alarm_test.vcxproj deleted file mode 100644 index 5f07a23ecb..0000000000 --- a/vsprojects/vcxproj/test/alarm_test/alarm_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {AFD362D7-0E2A-E700-1F27-9D90F76166DF} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - alarm_test - static - Debug - static - Debug - - - alarm_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/alarm_test/alarm_test.vcxproj.filters b/vsprojects/vcxproj/test/alarm_test/alarm_test.vcxproj.filters deleted file mode 100644 index c8ac4171c0..0000000000 --- a/vsprojects/vcxproj/test/alarm_test/alarm_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {ce8dc749-635b-4486-70d6-6bdf52297d09} - - - {c214d1e9-ebce-1040-28fa-e286dbb702d9} - - - {b260bb85-bedf-a6bf-c32e-3cd4b9d22bc8} - - - - diff --git a/vsprojects/vcxproj/test/algorithm_test/algorithm_test.vcxproj b/vsprojects/vcxproj/test/algorithm_test/algorithm_test.vcxproj deleted file mode 100644 index faffd2b30d..0000000000 --- a/vsprojects/vcxproj/test/algorithm_test/algorithm_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {216FDCB2-9D93-0D86-F0F1-12E16312A191} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - algorithm_test - static - Debug - static - Debug - - - algorithm_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/algorithm_test/algorithm_test.vcxproj.filters b/vsprojects/vcxproj/test/algorithm_test/algorithm_test.vcxproj.filters deleted file mode 100644 index 83010abafa..0000000000 --- a/vsprojects/vcxproj/test/algorithm_test/algorithm_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\compression - - - - - - {578848dc-8093-ced0-747d-7506e3daa00a} - - - {2428bb9e-2466-0c4c-0bfe-0be54b35d2b7} - - - {27e6f7a4-cb96-47a1-9328-614b672c3124} - - - - diff --git a/vsprojects/vcxproj/test/alloc_test/alloc_test.vcxproj b/vsprojects/vcxproj/test/alloc_test/alloc_test.vcxproj deleted file mode 100644 index 0f8380a773..0000000000 --- a/vsprojects/vcxproj/test/alloc_test/alloc_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {DD37D527-9DFF-1F53-B97F-50CF80AE0650} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - alloc_test - static - Debug - static - Debug - - - alloc_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/alloc_test/alloc_test.vcxproj.filters b/vsprojects/vcxproj/test/alloc_test/alloc_test.vcxproj.filters deleted file mode 100644 index c039082ded..0000000000 --- a/vsprojects/vcxproj/test/alloc_test/alloc_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {8db8ec05-f062-e4a6-60a0-efa7208d4f9b} - - - {5d06003c-e2cd-4d48-87b3-dcb700cbb4e4} - - - {11853b15-8afe-b102-ee0d-6742942e3f6e} - - - - diff --git a/vsprojects/vcxproj/test/alpn_test/alpn_test.vcxproj b/vsprojects/vcxproj/test/alpn_test/alpn_test.vcxproj deleted file mode 100644 index 11890a4a44..0000000000 --- a/vsprojects/vcxproj/test/alpn_test/alpn_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {5BAAE7EA-A972-DD80-F190-29B9E3110BB3} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - alpn_test - static - Debug - static - Debug - - - alpn_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/alpn_test/alpn_test.vcxproj.filters b/vsprojects/vcxproj/test/alpn_test/alpn_test.vcxproj.filters deleted file mode 100644 index 75a139ac17..0000000000 --- a/vsprojects/vcxproj/test/alpn_test/alpn_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\transport\chttp2 - - - - - - {2a2c65dd-bb79-6c47-a055-243c1fa5eaac} - - - {2f1d9694-f870-ad24-f901-8660fff64977} - - - {0eea33a6-d228-38f8-0621-d2ce0530e2cd} - - - {47200740-ac19-05af-76a8-cbff23af9a58} - - - - diff --git a/vsprojects/vcxproj/test/async_end2end_test/async_end2end_test.vcxproj b/vsprojects/vcxproj/test/async_end2end_test/async_end2end_test.vcxproj deleted file mode 100644 index 45c1c29cd6..0000000000 --- a/vsprojects/vcxproj/test/async_end2end_test/async_end2end_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {50D61F43-CD3D-82B7-E143-122DEF062C8D} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - async_end2end_test - static - Debug - static - Debug - - - async_end2end_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/async_end2end_test/async_end2end_test.vcxproj.filters b/vsprojects/vcxproj/test/async_end2end_test/async_end2end_test.vcxproj.filters deleted file mode 100644 index 432b985d8f..0000000000 --- a/vsprojects/vcxproj/test/async_end2end_test/async_end2end_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {b4a57c90-ce40-1965-fab6-52486c715698} - - - {d55439fc-48d6-328b-ebb7-2a35fded87b7} - - - {1efca9ae-9cce-2dd5-fb61-ed170ba805da} - - - - diff --git a/vsprojects/vcxproj/test/auth_property_iterator_test/auth_property_iterator_test.vcxproj b/vsprojects/vcxproj/test/auth_property_iterator_test/auth_property_iterator_test.vcxproj deleted file mode 100644 index bea9ad3425..0000000000 --- a/vsprojects/vcxproj/test/auth_property_iterator_test/auth_property_iterator_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9A848640-2E5D-3F0E-3C37-60EBD962F937} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - auth_property_iterator_test - static - Debug - static - Debug - - - auth_property_iterator_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/auth_property_iterator_test/auth_property_iterator_test.vcxproj.filters b/vsprojects/vcxproj/test/auth_property_iterator_test/auth_property_iterator_test.vcxproj.filters deleted file mode 100644 index b8cd8f263a..0000000000 --- a/vsprojects/vcxproj/test/auth_property_iterator_test/auth_property_iterator_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\common - - - - - - {661b8f10-3886-7677-dd91-30751dcf643f} - - - {75b62764-651e-c6d1-c811-8df36e871f88} - - - {6656847f-8333-9835-8a26-64e4e3d3ef1c} - - - - diff --git a/vsprojects/vcxproj/test/bad_client/bad_client_test/bad_client_test.vcxproj b/vsprojects/vcxproj/test/bad_client/bad_client_test/bad_client_test.vcxproj deleted file mode 100644 index 07b73698b7..0000000000 --- a/vsprojects/vcxproj/test/bad_client/bad_client_test/bad_client_test.vcxproj +++ /dev/null @@ -1,179 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {BA67B418-B699-E41A-9CC4-0279C49481A5} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - bad_client_test - - - bad_client_test - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/bad_client/bad_client_test/bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/bad_client/bad_client_test/bad_client_test.vcxproj.filters deleted file mode 100644 index 24c2efcec5..0000000000 --- a/vsprojects/vcxproj/test/bad_client/bad_client_test/bad_client_test.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - test\core\bad_client - - - - - test\core\bad_client - - - - - - {a32bd132-5133-e045-040a-b9d80172e041} - - - {06835b8e-ba0f-1b9d-f0bb-c57d723b2c1a} - - - {ec29d41a-4e11-8a09-5c89-a6c3e6191c9b} - - - - diff --git a/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj b/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj deleted file mode 100644 index 4676f3f6b6..0000000000 --- a/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2B73DA77-EF66-362C-24AD-317E3B8B28C1} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - bad_server_response_test - static - Debug - static - Debug - - - bad_server_response_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {E3110C46-A148-FF65-08FD-3324829BE7FE} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj.filters b/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj.filters deleted file mode 100644 index 13b11ec947..0000000000 --- a/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\end2end - - - - - - {d29396a6-e5cf-3f1f-a33d-d1e9f2fa1b38} - - - {332f26c8-dd3f-091d-9e10-5b704377e991} - - - {158709cc-74ed-274f-fe50-b8e64cc9830e} - - - - diff --git a/vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj b/vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj deleted file mode 100644 index 9f8d80e0ba..0000000000 --- a/vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8A811C28-E04E-A444-E4C1-7588DF5B90AE} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - badreq_bad_client_test - static - Debug - static - Debug - - - badreq_bad_client_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {BA67B418-B699-E41A-9CC4-0279C49481A5} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj.filters deleted file mode 100644 index aacd1190fe..0000000000 --- a/vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\bad_client\tests - - - - - - {677fb53e-e5cd-5ec5-a036-ac08770cf93c} - - - {f46c8db2-58ee-1c5a-7922-40805cc12827} - - - {6580deef-ed38-ffc5-63c7-2362cd082b46} - - - {9a11fdc5-1340-2198-93bd-55ed3187c2aa} - - - - diff --git a/vsprojects/vcxproj/test/bin_decoder_test/bin_decoder_test.vcxproj b/vsprojects/vcxproj/test/bin_decoder_test/bin_decoder_test.vcxproj deleted file mode 100644 index b0c878f5dd..0000000000 --- a/vsprojects/vcxproj/test/bin_decoder_test/bin_decoder_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6BFAC6BA-3B9D-E8F5-BE35-91E8EFB9E25B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - bin_decoder_test - static - Debug - static - Debug - - - bin_decoder_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/bin_decoder_test/bin_decoder_test.vcxproj.filters b/vsprojects/vcxproj/test/bin_decoder_test/bin_decoder_test.vcxproj.filters deleted file mode 100644 index f6044656fa..0000000000 --- a/vsprojects/vcxproj/test/bin_decoder_test/bin_decoder_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\transport\chttp2 - - - - - - {6865d212-f7ee-5eb1-aa2e-c8ce3dd9f834} - - - {79be26a4-2e58-2868-d847-e692e13ed37a} - - - {2b861a75-ca04-d422-f519-5b6d3c81e6e4} - - - {9725ed79-ddf1-6ffe-21e1-14fef9d481a6} - - - - diff --git a/vsprojects/vcxproj/test/bin_encoder_test/bin_encoder_test.vcxproj b/vsprojects/vcxproj/test/bin_encoder_test/bin_encoder_test.vcxproj deleted file mode 100644 index 7666604403..0000000000 --- a/vsprojects/vcxproj/test/bin_encoder_test/bin_encoder_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D5C70922-D68E-0E9D-9988-995E0F9A79AE} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - bin_encoder_test - static - Debug - static - Debug - - - bin_encoder_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/bin_encoder_test/bin_encoder_test.vcxproj.filters b/vsprojects/vcxproj/test/bin_encoder_test/bin_encoder_test.vcxproj.filters deleted file mode 100644 index d464de13ba..0000000000 --- a/vsprojects/vcxproj/test/bin_encoder_test/bin_encoder_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\transport\chttp2 - - - - - - {82cc2846-6e5b-af5b-26da-b40c808fe28e} - - - {3b6bce17-f60f-ea46-623b-ce4fbf988965} - - - {af2c8ac6-31df-7fce-381f-18c2a492f2f1} - - - {7b5f597c-13ea-73e6-2a5b-9984c446fa72} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_aead_test/boringssl_aead_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_aead_test/boringssl_aead_test.vcxproj deleted file mode 100644 index 870222239c..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_aead_test/boringssl_aead_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9183D17E-F68C-5AB9-8037-243382E460D8} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_aead_test - static - Debug - static - Debug - - - boringssl_aead_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {0D268984-73C0-8426-1C0E-D8D503AD2E30} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_aead_test/boringssl_aead_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_aead_test/boringssl_aead_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_aead_test/boringssl_aead_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_aead_test_lib/boringssl_aead_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_aead_test_lib/boringssl_aead_test_lib.vcxproj deleted file mode 100644 index 494840a19b..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_aead_test_lib/boringssl_aead_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0D268984-73C0-8426-1C0E-D8D503AD2E30} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_aead_test_lib - - - boringssl_aead_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_aead_test_lib/boringssl_aead_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_aead_test_lib/boringssl_aead_test_lib.vcxproj.filters deleted file mode 100644 index 0be4fa9df2..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_aead_test_lib/boringssl_aead_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\cipher - - - - - - {d8fe291e-e5ba-e9e5-34ca-7a9f7e61156f} - - - {dcfcbaaa-0834-0ad3-c01a-595966739d83} - - - {e8e6e1c2-141f-d7ed-abad-df12bd9df96a} - - - {c955b598-c3c4-6649-7dff-b409f634b2b8} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_aes_test/boringssl_aes_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_aes_test/boringssl_aes_test.vcxproj deleted file mode 100644 index 20fc686854..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_aes_test/boringssl_aes_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D8320C91-A51B-DA4E-81CA-609F777BEE09} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_aes_test - static - Debug - static - Debug - - - boringssl_aes_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {87F14B6C-4BE7-214B-EAAF-4F37054C7377} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_aes_test/boringssl_aes_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_aes_test/boringssl_aes_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_aes_test/boringssl_aes_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_aes_test_lib/boringssl_aes_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_aes_test_lib/boringssl_aes_test_lib.vcxproj deleted file mode 100644 index 3b1de7cf07..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_aes_test_lib/boringssl_aes_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {87F14B6C-4BE7-214B-EAAF-4F37054C7377} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_aes_test_lib - - - boringssl_aes_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_aes_test_lib/boringssl_aes_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_aes_test_lib/boringssl_aes_test_lib.vcxproj.filters deleted file mode 100644 index f20fdf0a26..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_aes_test_lib/boringssl_aes_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\aes - - - - - - {f7a8726b-fb16-6753-47be-89a42b297291} - - - {0e49c798-ec5e-6240-bac2-6cc90e42ce2d} - - - {38523c66-b3d4-e9e8-bc81-5ced9852414e} - - - {da1a0309-56e8-44cd-3d64-4eb99afe5aa3} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj deleted file mode 100644 index 9d5aa67e06..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A18A6879-13EB-F421-E270-03C6DBD6A6B7} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_asn1_test - static - Debug - static - Debug - - - boringssl_asn1_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {37B78CF5-2090-3DC6-FF98-17381709846A} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj deleted file mode 100644 index 177bfcbb3b..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {37B78CF5-2090-3DC6-FF98-17381709846A} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_asn1_test_lib - - - boringssl_asn1_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj.filters deleted file mode 100644 index d508701e3c..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\asn1 - - - - - - {4115523a-a0e5-e13f-f46b-76308dedf6f3} - - - {c1481ada-4ab1-0cb6-8828-83f09d5421e4} - - - {199f1153-e7a0-fcef-73f5-eb766cb38fc3} - - - {c5964062-112a-0884-d3ae-d8aec947c2f3} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_base64_test/boringssl_base64_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_base64_test/boringssl_base64_test.vcxproj deleted file mode 100644 index b986ec1766..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_base64_test/boringssl_base64_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8C1038A7-03E8-C0EC-7B13-BE7771196E90} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_base64_test - static - Debug - static - Debug - - - boringssl_base64_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {B5A76FBD-293D-7A8B-D6EA-EF0ABF331329} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_base64_test/boringssl_base64_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_base64_test/boringssl_base64_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_base64_test/boringssl_base64_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_base64_test_lib/boringssl_base64_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_base64_test_lib/boringssl_base64_test_lib.vcxproj deleted file mode 100644 index 70c99d85a6..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_base64_test_lib/boringssl_base64_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B5A76FBD-293D-7A8B-D6EA-EF0ABF331329} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_base64_test_lib - - - boringssl_base64_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_base64_test_lib/boringssl_base64_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_base64_test_lib/boringssl_base64_test_lib.vcxproj.filters deleted file mode 100644 index 7e5ed15817..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_base64_test_lib/boringssl_base64_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\base64 - - - - - - {a3c47793-7590-9fa7-f1dc-5c1d42f29214} - - - {e7dfd997-29f6-664e-ffbb-1197900fa31e} - - - {774e0d9d-b4d4-813f-bb50-3b252e27386e} - - - {925cd4c1-9f9b-e6bd-969a-4ddb62a33ae4} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bio_test/boringssl_bio_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_bio_test/boringssl_bio_test.vcxproj deleted file mode 100644 index 3119acc057..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bio_test/boringssl_bio_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A7E31C76-D2CB-4A0C-DA86-602271AA3A2C} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_bio_test - static - Debug - static - Debug - - - boringssl_bio_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {64030BE9-8255-0745-83AC-2517F18134B5} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bio_test/boringssl_bio_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_bio_test/boringssl_bio_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bio_test/boringssl_bio_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bio_test_lib/boringssl_bio_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_bio_test_lib/boringssl_bio_test_lib.vcxproj deleted file mode 100644 index 4db293e9b8..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bio_test_lib/boringssl_bio_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {64030BE9-8255-0745-83AC-2517F18134B5} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_bio_test_lib - - - boringssl_bio_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bio_test_lib/boringssl_bio_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_bio_test_lib/boringssl_bio_test_lib.vcxproj.filters deleted file mode 100644 index 7cad21ebc7..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bio_test_lib/boringssl_bio_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\bio - - - - - - {620b04a2-c2af-b6a8-867d-9f1681f8bec6} - - - {8795edcd-07bd-5168-8b5a-6a2c0b46313a} - - - {c0d5ec8a-b2ed-6716-26ac-e0bc647609a1} - - - {167cdef9-0306-515d-fe0d-61788fb48871} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bn_test/boringssl_bn_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_bn_test/boringssl_bn_test.vcxproj deleted file mode 100644 index 26e2ccd8f8..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bn_test/boringssl_bn_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {167025C2-B19E-0320-0976-4C36D9228CE2} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_bn_test - static - Debug - static - Debug - - - boringssl_bn_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {8BC23DBC-C460-DFEB-67AC-28397018B9A9} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bn_test/boringssl_bn_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_bn_test/boringssl_bn_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bn_test/boringssl_bn_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bn_test_lib/boringssl_bn_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_bn_test_lib/boringssl_bn_test_lib.vcxproj deleted file mode 100644 index 2dc5a0bacf..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bn_test_lib/boringssl_bn_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8BC23DBC-C460-DFEB-67AC-28397018B9A9} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_bn_test_lib - - - boringssl_bn_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bn_test_lib/boringssl_bn_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_bn_test_lib/boringssl_bn_test_lib.vcxproj.filters deleted file mode 100644 index 28d0d36196..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bn_test_lib/boringssl_bn_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\bn - - - - - - {0426453b-fd45-6483-f53b-1be6331822e1} - - - {f1196cb3-ee0b-4e61-3ec0-a467a66482af} - - - {af9302b5-97a6-c313-9b9f-5cffd677168f} - - - {cefb4123-8d1d-508a-5efa-dfb489ecff90} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test/boringssl_bytestring_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test/boringssl_bytestring_test.vcxproj deleted file mode 100644 index d9b387d370..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test/boringssl_bytestring_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {68E85FDA-6441-D25B-63E3-870C1C6E88DD} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_bytestring_test - static - Debug - static - Debug - - - boringssl_bytestring_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {A8D01E8B-537F-96F5-E5C2-43E29027A94E} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test/boringssl_bytestring_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test/boringssl_bytestring_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test/boringssl_bytestring_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test_lib/boringssl_bytestring_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test_lib/boringssl_bytestring_test_lib.vcxproj deleted file mode 100644 index 88481846e2..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test_lib/boringssl_bytestring_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A8D01E8B-537F-96F5-E5C2-43E29027A94E} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_bytestring_test_lib - - - boringssl_bytestring_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test_lib/boringssl_bytestring_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test_lib/boringssl_bytestring_test_lib.vcxproj.filters deleted file mode 100644 index c4c1d67385..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_bytestring_test_lib/boringssl_bytestring_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\bytestring - - - - - - {ef2b0997-a26a-eb72-1e31-49d6e01f9b05} - - - {99d2f507-c4e1-c4a0-a239-1ece36df174c} - - - {4dfb0e14-0ed8-cbf2-6869-48d53ad1887a} - - - {6d548580-2779-09c0-d7f1-61a41fb48fe7} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test/boringssl_cipher_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test/boringssl_cipher_test.vcxproj deleted file mode 100644 index a761856ead..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test/boringssl_cipher_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D506DB59-7DEB-FB11-41E1-8E9FDAC5AD5F} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_cipher_test - static - Debug - static - Debug - - - boringssl_cipher_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {CA209EA5-CD7F-4387-EE99-B869A38ED9E4} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test/boringssl_cipher_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test/boringssl_cipher_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test/boringssl_cipher_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test_lib/boringssl_cipher_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test_lib/boringssl_cipher_test_lib.vcxproj deleted file mode 100644 index ef18515aea..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test_lib/boringssl_cipher_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {CA209EA5-CD7F-4387-EE99-B869A38ED9E4} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_cipher_test_lib - - - boringssl_cipher_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test_lib/boringssl_cipher_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test_lib/boringssl_cipher_test_lib.vcxproj.filters deleted file mode 100644 index 48bc673779..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_cipher_test_lib/boringssl_cipher_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\cipher - - - - - - {6bf2ffc4-c816-abf7-3722-c8364858a0aa} - - - {83921d93-ab5b-1f69-71a3-d4ca295afebf} - - - {1259d1b5-9eda-90a6-6e2a-a389380c6a69} - - - {73936c91-50be-0f12-1373-5865ba9b975f} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test/boringssl_cmac_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test/boringssl_cmac_test.vcxproj deleted file mode 100644 index 5643c60f8c..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test/boringssl_cmac_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {7A47E535-C0A2-B466-9B97-55FCAA3BE78C} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_cmac_test - static - Debug - static - Debug - - - boringssl_cmac_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {8D8EA5C5-FFE3-3B5E-79F5-FB2A8E20D6B6} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test/boringssl_cmac_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test/boringssl_cmac_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test/boringssl_cmac_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test_lib/boringssl_cmac_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test_lib/boringssl_cmac_test_lib.vcxproj deleted file mode 100644 index 06740ca73a..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test_lib/boringssl_cmac_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8D8EA5C5-FFE3-3B5E-79F5-FB2A8E20D6B6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_cmac_test_lib - - - boringssl_cmac_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test_lib/boringssl_cmac_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test_lib/boringssl_cmac_test_lib.vcxproj.filters deleted file mode 100644 index 6f9505535b..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_cmac_test_lib/boringssl_cmac_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\cmac - - - - - - {cc91fe12-ea0a-b218-61c6-90aaa2e3751b} - - - {b66015a1-5670-4295-592e-5ea2dcaacdf3} - - - {eb12650d-202c-15e1-a00f-f2cac75bd50f} - - - {ecaf3674-c5c5-cf27-1c8c-f579fe987a6f} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test/boringssl_constant_time_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test/boringssl_constant_time_test.vcxproj deleted file mode 100644 index c0a57972e7..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test/boringssl_constant_time_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {5127BFAA-6574-EE27-464B-4DAB3CF41508} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_constant_time_test - static - Debug - static - Debug - - - boringssl_constant_time_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {552A59BB-4B04-D769-E797-D87749823DC6} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test/boringssl_constant_time_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test/boringssl_constant_time_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test/boringssl_constant_time_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test_lib/boringssl_constant_time_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test_lib/boringssl_constant_time_test_lib.vcxproj deleted file mode 100644 index cc31162733..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test_lib/boringssl_constant_time_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {552A59BB-4B04-D769-E797-D87749823DC6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_constant_time_test_lib - - - boringssl_constant_time_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test_lib/boringssl_constant_time_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test_lib/boringssl_constant_time_test_lib.vcxproj.filters deleted file mode 100644 index 2a3689b010..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_constant_time_test_lib/boringssl_constant_time_test_lib.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - third_party\boringssl\crypto - - - - - - {2717371d-147c-69f2-dacd-f9593f8c8dce} - - - {04267eeb-02cf-1e33-9539-e2d4ee0ae9e1} - - - {e818c5f1-1756-745d-6184-bb823f599b15} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_dh_test/boringssl_dh_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_dh_test/boringssl_dh_test.vcxproj deleted file mode 100644 index f8bc4f23c0..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_dh_test/boringssl_dh_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {26AFD763-4456-9AAF-2458-4C616281C668} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_dh_test - static - Debug - static - Debug - - - boringssl_dh_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {56A4B15E-3DB1-118D-1ED2-4527CA24FE81} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_dh_test/boringssl_dh_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_dh_test/boringssl_dh_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_dh_test/boringssl_dh_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_dh_test_lib/boringssl_dh_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_dh_test_lib/boringssl_dh_test_lib.vcxproj deleted file mode 100644 index aec7e2f64d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_dh_test_lib/boringssl_dh_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {56A4B15E-3DB1-118D-1ED2-4527CA24FE81} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_dh_test_lib - - - boringssl_dh_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_dh_test_lib/boringssl_dh_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_dh_test_lib/boringssl_dh_test_lib.vcxproj.filters deleted file mode 100644 index 6d5de842c7..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_dh_test_lib/boringssl_dh_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\dh - - - - - - {65ed99ff-7fef-84bd-69ac-699784eaa2d5} - - - {20a54707-e604-4830-8245-e0332914fc02} - - - {059fef06-fd8b-f6dd-d545-1355d0d6f0fe} - - - {909105d9-54df-9980-9131-c9273ab8a135} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_digest_test/boringssl_digest_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_digest_test/boringssl_digest_test.vcxproj deleted file mode 100644 index 869a70fbdf..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_digest_test/boringssl_digest_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F9829999-194C-D74C-341C-9D9C7A4709AC} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_digest_test - static - Debug - static - Debug - - - boringssl_digest_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {5A143603-6238-7883-1CFD-FF84DC1F3742} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_digest_test/boringssl_digest_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_digest_test/boringssl_digest_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_digest_test/boringssl_digest_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_digest_test_lib/boringssl_digest_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_digest_test_lib/boringssl_digest_test_lib.vcxproj deleted file mode 100644 index 30f6573473..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_digest_test_lib/boringssl_digest_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {5A143603-6238-7883-1CFD-FF84DC1F3742} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_digest_test_lib - - - boringssl_digest_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_digest_test_lib/boringssl_digest_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_digest_test_lib/boringssl_digest_test_lib.vcxproj.filters deleted file mode 100644 index 92ff510f5d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_digest_test_lib/boringssl_digest_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\digest - - - - - - {10558260-2071-db6b-3e53-af23707c3bfe} - - - {055a1182-f900-b2a7-6591-c6863fe5a751} - - - {66667684-b8d7-e18a-c532-dd5ceb523466} - - - {6f956a45-e1f4-13b2-baa4-e440a6fb21b2} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test/boringssl_dsa_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test/boringssl_dsa_test.vcxproj deleted file mode 100644 index 52505e6cc7..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test/boringssl_dsa_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D99910AE-2E0C-437C-D2AD-B69724AC5724} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_dsa_test - static - Debug - static - Debug - - - boringssl_dsa_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {4D7D265F-7184-79BB-CDCA-93ADFE0555CA} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test/boringssl_dsa_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test/boringssl_dsa_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test/boringssl_dsa_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test_lib/boringssl_dsa_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test_lib/boringssl_dsa_test_lib.vcxproj deleted file mode 100644 index 0d35de10a7..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test_lib/boringssl_dsa_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {4D7D265F-7184-79BB-CDCA-93ADFE0555CA} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_dsa_test_lib - - - boringssl_dsa_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test_lib/boringssl_dsa_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test_lib/boringssl_dsa_test_lib.vcxproj.filters deleted file mode 100644 index d4bcb3d412..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_dsa_test_lib/boringssl_dsa_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\dsa - - - - - - {e872ec56-f98e-8bf1-cf9f-f63207551aab} - - - {8d566f1f-48e0-4f2e-497d-1b2d3b3a94af} - - - {e161d8ba-c211-0c32-47d2-524b635a0de1} - - - {83748c5a-3e97-be8e-9881-c1f2ba816eb8} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ec_test/boringssl_ec_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_ec_test/boringssl_ec_test.vcxproj deleted file mode 100644 index dfa7d23aaf..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ec_test/boringssl_ec_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6B7C8FF0-E60D-551F-61D8-4F865ED8F48E} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_ec_test - static - Debug - static - Debug - - - boringssl_ec_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {0B3020E4-6C92-E46A-CDD2-29CDAB97020B} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ec_test/boringssl_ec_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_ec_test/boringssl_ec_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ec_test/boringssl_ec_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ec_test_lib/boringssl_ec_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_ec_test_lib/boringssl_ec_test_lib.vcxproj deleted file mode 100644 index 644048ba52..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ec_test_lib/boringssl_ec_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0B3020E4-6C92-E46A-CDD2-29CDAB97020B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_ec_test_lib - - - boringssl_ec_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ec_test_lib/boringssl_ec_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_ec_test_lib/boringssl_ec_test_lib.vcxproj.filters deleted file mode 100644 index c6b6a253a3..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ec_test_lib/boringssl_ec_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\ec - - - - - - {0c909793-7738-837f-28b9-e775ca31f1e0} - - - {845f42f3-1622-7f5a-d949-f6921e429143} - - - {971129bb-6f10-5a13-6770-3334e05d027e} - - - {0673821d-35d0-95dd-6e39-870eb33127fc} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test/boringssl_ecdsa_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test/boringssl_ecdsa_test.vcxproj deleted file mode 100644 index 0f85a20f7a..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test/boringssl_ecdsa_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {FB861B8A-2AC2-1ADE-55FB-CC53C973D498} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_ecdsa_test - static - Debug - static - Debug - - - boringssl_ecdsa_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {50BCE8B2-FBBB-C13E-6515-5D03A256B591} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test/boringssl_ecdsa_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test/boringssl_ecdsa_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test/boringssl_ecdsa_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test_lib/boringssl_ecdsa_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test_lib/boringssl_ecdsa_test_lib.vcxproj deleted file mode 100644 index 7bc5df262b..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test_lib/boringssl_ecdsa_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {50BCE8B2-FBBB-C13E-6515-5D03A256B591} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_ecdsa_test_lib - - - boringssl_ecdsa_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test_lib/boringssl_ecdsa_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test_lib/boringssl_ecdsa_test_lib.vcxproj.filters deleted file mode 100644 index 91938ac646..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ecdsa_test_lib/boringssl_ecdsa_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\ecdsa - - - - - - {7b4aaccb-23a8-584e-815d-0336e173f446} - - - {20a689c1-2b2d-4c52-67ae-e54a3e68e47c} - - - {8b549e41-8b20-a7b9-448f-85cf77d6a052} - - - {8c5a4631-28a4-cab2-959f-4af6b9282a54} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test/boringssl_ed25519_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test/boringssl_ed25519_test.vcxproj deleted file mode 100644 index 85fd0640fe..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test/boringssl_ed25519_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {56E61978-762E-65C5-2940-C88F3F5C5C2E} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_ed25519_test - static - Debug - static - Debug - - - boringssl_ed25519_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {33A5ACF5-5B02-B6BC-666E-DFC6C942A818} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test/boringssl_ed25519_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test/boringssl_ed25519_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test/boringssl_ed25519_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test_lib/boringssl_ed25519_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test_lib/boringssl_ed25519_test_lib.vcxproj deleted file mode 100644 index 6f5256b53a..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test_lib/boringssl_ed25519_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {33A5ACF5-5B02-B6BC-666E-DFC6C942A818} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_ed25519_test_lib - - - boringssl_ed25519_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test_lib/boringssl_ed25519_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test_lib/boringssl_ed25519_test_lib.vcxproj.filters deleted file mode 100644 index a67b42442a..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ed25519_test_lib/boringssl_ed25519_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\curve25519 - - - - - - {86b588b7-bc01-3e65-58b9-e219df2495e6} - - - {43fa5d85-e526-ad5d-02ea-697b678e8b27} - - - {d0f4493b-11c9-aa4c-00eb-5dc20024fc13} - - - {12bbc9ad-a2ec-0ee6-c22d-7572e8b5888b} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_err_test/boringssl_err_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_err_test/boringssl_err_test.vcxproj deleted file mode 100644 index 085b8ce0e8..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_err_test/boringssl_err_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E8595872-8ABC-0177-B646-0783F8C4ADEF} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_err_test - static - Debug - static - Debug - - - boringssl_err_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {11E8A736-EEA4-84A8-BCC8-08269674DCBF} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_err_test/boringssl_err_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_err_test/boringssl_err_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_err_test/boringssl_err_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_err_test_lib/boringssl_err_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_err_test_lib/boringssl_err_test_lib.vcxproj deleted file mode 100644 index 87def13857..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_err_test_lib/boringssl_err_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {11E8A736-EEA4-84A8-BCC8-08269674DCBF} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_err_test_lib - - - boringssl_err_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_err_test_lib/boringssl_err_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_err_test_lib/boringssl_err_test_lib.vcxproj.filters deleted file mode 100644 index 2a9696d54b..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_err_test_lib/boringssl_err_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\err - - - - - - {1c12770a-24ce-cd11-bb90-f3b2e9216e03} - - - {f790f27a-bb2c-6ed0-ef88-abeb2a27a513} - - - {be436245-b188-a1ee-4e2b-d27f6cee0d88} - - - {027082a4-6859-7319-0e4a-c7b47e736762} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test/boringssl_evp_extra_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test/boringssl_evp_extra_test.vcxproj deleted file mode 100644 index 25e5a761ed..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test/boringssl_evp_extra_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2FB5E248-8724-22B0-1077-33AABC84815B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_evp_extra_test - static - Debug - static - Debug - - - boringssl_evp_extra_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {2245E3FE-D4C0-22C0-32D0-7D579D357943} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test/boringssl_evp_extra_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test/boringssl_evp_extra_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test/boringssl_evp_extra_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test_lib/boringssl_evp_extra_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test_lib/boringssl_evp_extra_test_lib.vcxproj deleted file mode 100644 index b0140925c1..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test_lib/boringssl_evp_extra_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2245E3FE-D4C0-22C0-32D0-7D579D357943} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_evp_extra_test_lib - - - boringssl_evp_extra_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test_lib/boringssl_evp_extra_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test_lib/boringssl_evp_extra_test_lib.vcxproj.filters deleted file mode 100644 index a29f814aee..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_evp_extra_test_lib/boringssl_evp_extra_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\evp - - - - - - {04b927a4-9724-644d-07b7-e57e6072c1b1} - - - {4521278d-25d7-f17a-9e8f-9232037d0ffc} - - - {26761edb-9d4f-3c81-6c5c-5b36e4fd784f} - - - {a1a098c4-06ad-396d-3ce9-6bb4998f855a} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_evp_test/boringssl_evp_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_evp_test/boringssl_evp_test.vcxproj deleted file mode 100644 index 76312fa811..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_evp_test/boringssl_evp_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9908921A-5CBF-6834-9866-2085E61B3836} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_evp_test - static - Debug - static - Debug - - - boringssl_evp_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {87C164B2-7346-C612-4C6B-4927B29EFF9F} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_evp_test/boringssl_evp_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_evp_test/boringssl_evp_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_evp_test/boringssl_evp_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_evp_test_lib/boringssl_evp_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_evp_test_lib/boringssl_evp_test_lib.vcxproj deleted file mode 100644 index 70657fe13d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_evp_test_lib/boringssl_evp_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {87C164B2-7346-C612-4C6B-4927B29EFF9F} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_evp_test_lib - - - boringssl_evp_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_evp_test_lib/boringssl_evp_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_evp_test_lib/boringssl_evp_test_lib.vcxproj.filters deleted file mode 100644 index 7444085b8d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_evp_test_lib/boringssl_evp_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\evp - - - - - - {933c4314-54c5-e0a9-7b6e-191a1f29b3f7} - - - {429801df-3249-80e8-2013-4212d4b5d999} - - - {ea6d47e7-6d2c-1847-9472-170753b10141} - - - {2a8fb08b-0afd-c956-2c52-e79f2fe4e814} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_example_mul/boringssl_example_mul.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_example_mul/boringssl_example_mul.vcxproj deleted file mode 100644 index e607808cab..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_example_mul/boringssl_example_mul.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8D069941-ABC4-1DE1-4F06-5727D315C818} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_example_mul - static - Debug - static - Debug - - - boringssl_example_mul - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {63C3BC49-B085-1779-2415-BE451A109727} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_example_mul/boringssl_example_mul.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_example_mul/boringssl_example_mul.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_example_mul/boringssl_example_mul.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_example_mul_lib/boringssl_example_mul_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_example_mul_lib/boringssl_example_mul_lib.vcxproj deleted file mode 100644 index 72e7b1fd00..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_example_mul_lib/boringssl_example_mul_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {63C3BC49-B085-1779-2415-BE451A109727} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_example_mul_lib - - - boringssl_example_mul_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_example_mul_lib/boringssl_example_mul_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_example_mul_lib/boringssl_example_mul_lib.vcxproj.filters deleted file mode 100644 index 7af0282dc4..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_example_mul_lib/boringssl_example_mul_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\ec - - - - - - {fc8158f9-5cf6-aab0-c162-7e68f7b57b6a} - - - {a0e70edc-4e96-589e-6aa8-4ad51db6a7d8} - - - {73510850-fff9-2472-285f-81e4e5724ce4} - - - {43f4d18f-60ea-bfe6-a7ab-085379966ae9} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test/boringssl_gcm_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test/boringssl_gcm_test.vcxproj deleted file mode 100644 index 4bf014ce49..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test/boringssl_gcm_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F2B93707-A7AE-9061-4834-60CF4BB0DB19} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_gcm_test - static - Debug - static - Debug - - - boringssl_gcm_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {B1A55365-89BE-F8C0-61B7-C1C54D38C459} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test/boringssl_gcm_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test/boringssl_gcm_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test/boringssl_gcm_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test_lib/boringssl_gcm_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test_lib/boringssl_gcm_test_lib.vcxproj deleted file mode 100644 index 7b5ffa1ca1..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test_lib/boringssl_gcm_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B1A55365-89BE-F8C0-61B7-C1C54D38C459} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_gcm_test_lib - - - boringssl_gcm_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test_lib/boringssl_gcm_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test_lib/boringssl_gcm_test_lib.vcxproj.filters deleted file mode 100644 index 7260136bd8..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_gcm_test_lib/boringssl_gcm_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\modes - - - - - - {4d2a47bb-74e3-82b4-bd61-c68cfde5747c} - - - {4755635e-5b04-b37c-9eaf-f60bb75ad41f} - - - {3635913e-d3df-8976-eecd-6d5c4deee814} - - - {eef787de-3d8b-a356-55fa-9f4c6c6b0e36} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test/boringssl_hkdf_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test/boringssl_hkdf_test.vcxproj deleted file mode 100644 index d6294b83cb..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test/boringssl_hkdf_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {16FDDA84-B277-FAC1-BB11-004DD41E2AF0} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_hkdf_test - static - Debug - static - Debug - - - boringssl_hkdf_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {50883E9E-1E1D-195D-0287-9BE93F96A559} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test/boringssl_hkdf_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test/boringssl_hkdf_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test/boringssl_hkdf_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test_lib/boringssl_hkdf_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test_lib/boringssl_hkdf_test_lib.vcxproj deleted file mode 100644 index 0160850330..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test_lib/boringssl_hkdf_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {50883E9E-1E1D-195D-0287-9BE93F96A559} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_hkdf_test_lib - - - boringssl_hkdf_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test_lib/boringssl_hkdf_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test_lib/boringssl_hkdf_test_lib.vcxproj.filters deleted file mode 100644 index f3c142afff..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_hkdf_test_lib/boringssl_hkdf_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\hkdf - - - - - - {3ea66df2-1bd7-a65d-0aea-8311904d616a} - - - {8881db75-0db6-1a1a-d917-aed225227cb9} - - - {d99524e4-9e9c-ce95-621b-d588a890d5d8} - - - {5cfd8c8d-bb59-cad4-f1fe-d51adcc23e03} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test/boringssl_hmac_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test/boringssl_hmac_test.vcxproj deleted file mode 100644 index e2f6afb9cf..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test/boringssl_hmac_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {38B34B1E-C74C-1922-FD32-75511CF07916} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_hmac_test - static - Debug - static - Debug - - - boringssl_hmac_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {0403F961-BE8A-47A2-C454-A67035958DEF} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test/boringssl_hmac_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test/boringssl_hmac_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test/boringssl_hmac_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test_lib/boringssl_hmac_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test_lib/boringssl_hmac_test_lib.vcxproj deleted file mode 100644 index 3a7e768261..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test_lib/boringssl_hmac_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0403F961-BE8A-47A2-C454-A67035958DEF} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_hmac_test_lib - - - boringssl_hmac_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test_lib/boringssl_hmac_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test_lib/boringssl_hmac_test_lib.vcxproj.filters deleted file mode 100644 index a2343ecbaf..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_hmac_test_lib/boringssl_hmac_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\hmac - - - - - - {82c67b78-128a-a132-6fb7-d9bbd0dc5c71} - - - {bddcec96-cd29-16f9-3b6c-5c3ade86d72c} - - - {4d73fd40-54a9-7645-9c51-612e1d459d46} - - - {b337a92a-de4b-9639-c158-6228a1c82092} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test/boringssl_lhash_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test/boringssl_lhash_test.vcxproj deleted file mode 100644 index 2a4f81fb7e..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test/boringssl_lhash_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E726854F-88F9-D476-DD00-B2CB72F00B28} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_lhash_test - static - Debug - static - Debug - - - boringssl_lhash_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {868F35A0-A6EC-9346-2513-F7FB8EAAADB7} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test/boringssl_lhash_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test/boringssl_lhash_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test/boringssl_lhash_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test_lib/boringssl_lhash_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test_lib/boringssl_lhash_test_lib.vcxproj deleted file mode 100644 index b12007d90d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test_lib/boringssl_lhash_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {868F35A0-A6EC-9346-2513-F7FB8EAAADB7} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_lhash_test_lib - - - boringssl_lhash_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test_lib/boringssl_lhash_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test_lib/boringssl_lhash_test_lib.vcxproj.filters deleted file mode 100644 index d8606eade9..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_lhash_test_lib/boringssl_lhash_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\lhash - - - - - - {7a5ebb5e-457a-31fb-061a-0afc4aec36f6} - - - {ce31592a-1259-32b2-98ca-b23a78af66e7} - - - {3b2c8cc7-92c4-95fe-1130-bd711587d1c8} - - - {c23fa5df-7fc2-ef95-1b9f-4b90f5335b42} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test/boringssl_pbkdf_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test/boringssl_pbkdf_test.vcxproj deleted file mode 100644 index 6eedd2d21b..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test/boringssl_pbkdf_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {29556ADB-8120-8257-79D2-71073CA6E8F2} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_pbkdf_test - static - Debug - static - Debug - - - boringssl_pbkdf_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {8D7D558A-D5D2-9F57-7F61-1A1A4CEA35CB} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test/boringssl_pbkdf_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test/boringssl_pbkdf_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test/boringssl_pbkdf_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test_lib/boringssl_pbkdf_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test_lib/boringssl_pbkdf_test_lib.vcxproj deleted file mode 100644 index 090beb8afc..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test_lib/boringssl_pbkdf_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8D7D558A-D5D2-9F57-7F61-1A1A4CEA35CB} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_pbkdf_test_lib - - - boringssl_pbkdf_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test_lib/boringssl_pbkdf_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test_lib/boringssl_pbkdf_test_lib.vcxproj.filters deleted file mode 100644 index f0fe90d112..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pbkdf_test_lib/boringssl_pbkdf_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\evp - - - - - - {70128d2f-4cde-2647-a28c-3b02a7f32085} - - - {49ff23e3-9ef0-c1d6-cc39-9ca1f23ba6f9} - - - {7fa90322-3d1d-08d9-d1cc-3bb6e9493496} - - - {9a380228-7d8b-54cd-aaf8-b5606ac90db2} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test/boringssl_pkcs12_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test/boringssl_pkcs12_test.vcxproj deleted file mode 100644 index d31e89ed4b..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test/boringssl_pkcs12_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {24469A3C-6C2E-D87B-CA0C-41E31B3896D1} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_pkcs12_test - static - Debug - static - Debug - - - boringssl_pkcs12_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {979C433D-39B1-B23E-0A96-C3DEA99EF027} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test/boringssl_pkcs12_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test/boringssl_pkcs12_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test/boringssl_pkcs12_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test_lib/boringssl_pkcs12_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test_lib/boringssl_pkcs12_test_lib.vcxproj deleted file mode 100644 index 5f316cddda..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test_lib/boringssl_pkcs12_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {979C433D-39B1-B23E-0A96-C3DEA99EF027} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_pkcs12_test_lib - - - boringssl_pkcs12_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test_lib/boringssl_pkcs12_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test_lib/boringssl_pkcs12_test_lib.vcxproj.filters deleted file mode 100644 index f1aa24590c..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs12_test_lib/boringssl_pkcs12_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\pkcs8 - - - - - - {e49d323f-c0fb-a7f8-6660-3b39b5c72ae5} - - - {100ab179-ed6d-6374-7e83-bd3417a8933d} - - - {4fb3e903-0378-e562-fe12-ad5a56555187} - - - {f5a73903-59ca-f276-c6f6-080f4b8e87f9} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test/boringssl_pkcs7_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test/boringssl_pkcs7_test.vcxproj deleted file mode 100644 index 19b2e1efea..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test/boringssl_pkcs7_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9206B534-4B9F-58AC-5939-2D0CB26FF871} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_pkcs7_test - static - Debug - static - Debug - - - boringssl_pkcs7_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {8B0AC911-84B4-878F-3300-C24689FDA2C0} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test/boringssl_pkcs7_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test/boringssl_pkcs7_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test/boringssl_pkcs7_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test_lib/boringssl_pkcs7_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test_lib/boringssl_pkcs7_test_lib.vcxproj deleted file mode 100644 index 7037aaba21..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test_lib/boringssl_pkcs7_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8B0AC911-84B4-878F-3300-C24689FDA2C0} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_pkcs7_test_lib - - - boringssl_pkcs7_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test_lib/boringssl_pkcs7_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test_lib/boringssl_pkcs7_test_lib.vcxproj.filters deleted file mode 100644 index 83e179d59b..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs7_test_lib/boringssl_pkcs7_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\x509 - - - - - - {e1d85135-7d93-6a00-029f-3cbd555ab362} - - - {b1dfede4-7b4f-d7e3-a318-71d3475c53b9} - - - {3bdb9eac-3803-c782-67d3-6123f25995c3} - - - {3ef63256-b6b8-a91a-8f75-0683c9ded5c1} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test/boringssl_pkcs8_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test/boringssl_pkcs8_test.vcxproj deleted file mode 100644 index fe8f78b50f..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test/boringssl_pkcs8_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {53A41C59-641B-64D7-9253-11E983E44FE4} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_pkcs8_test - static - Debug - static - Debug - - - boringssl_pkcs8_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {5A1A3DF7-1983-7078-2040-BCF29F51638D} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test/boringssl_pkcs8_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test/boringssl_pkcs8_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test/boringssl_pkcs8_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test_lib/boringssl_pkcs8_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test_lib/boringssl_pkcs8_test_lib.vcxproj deleted file mode 100644 index 8e2d6c9d34..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test_lib/boringssl_pkcs8_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {5A1A3DF7-1983-7078-2040-BCF29F51638D} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_pkcs8_test_lib - - - boringssl_pkcs8_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test_lib/boringssl_pkcs8_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test_lib/boringssl_pkcs8_test_lib.vcxproj.filters deleted file mode 100644 index 41327e62d4..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pkcs8_test_lib/boringssl_pkcs8_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\pkcs8 - - - - - - {f3dd3395-2123-65f7-65de-727a2b7e075b} - - - {cb30ed34-f434-625c-393e-fbfeb8d256a3} - - - {224bc499-3309-584a-7250-85e6c3f4d049} - - - {5c20dbaa-c68e-2aed-439c-7fada64c0b1f} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test/boringssl_poly1305_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test/boringssl_poly1305_test.vcxproj deleted file mode 100644 index 9424e20151..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test/boringssl_poly1305_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {BDC48714-90F7-6966-1979-45A14E0DF94A} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_poly1305_test - static - Debug - static - Debug - - - boringssl_poly1305_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {58BED892-19DD-2063-C727-BC00A4F2ACD2} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test/boringssl_poly1305_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test/boringssl_poly1305_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test/boringssl_poly1305_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test_lib/boringssl_poly1305_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test_lib/boringssl_poly1305_test_lib.vcxproj deleted file mode 100644 index 852a1610dc..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test_lib/boringssl_poly1305_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {58BED892-19DD-2063-C727-BC00A4F2ACD2} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_poly1305_test_lib - - - boringssl_poly1305_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test_lib/boringssl_poly1305_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test_lib/boringssl_poly1305_test_lib.vcxproj.filters deleted file mode 100644 index ce111e43b8..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_poly1305_test_lib/boringssl_poly1305_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\poly1305 - - - - - - {cf9b9875-85fa-ee2a-11bd-1d0da01e28f8} - - - {0dc3da54-60b8-06dc-14bb-8943d377c364} - - - {df4ac648-8554-f973-ace5-841bab0202c7} - - - {32164db2-dcf7-2cbe-310c-921ac88ab3fe} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test/boringssl_pqueue_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test/boringssl_pqueue_test.vcxproj deleted file mode 100644 index 7c0189b627..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test/boringssl_pqueue_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {CCAA2ACD-B171-6011-0646-93010DCF8BC5} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_pqueue_test - static - Debug - static - Debug - - - boringssl_pqueue_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {D03600F9-540A-2691-69F6-3A1DC2874D24} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test/boringssl_pqueue_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test/boringssl_pqueue_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test/boringssl_pqueue_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test_lib/boringssl_pqueue_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test_lib/boringssl_pqueue_test_lib.vcxproj deleted file mode 100644 index 12198c1149..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test_lib/boringssl_pqueue_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D03600F9-540A-2691-69F6-3A1DC2874D24} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_pqueue_test_lib - - - boringssl_pqueue_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test_lib/boringssl_pqueue_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test_lib/boringssl_pqueue_test_lib.vcxproj.filters deleted file mode 100644 index 50a19355fc..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_pqueue_test_lib/boringssl_pqueue_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\ssl\pqueue - - - - - - {5abc2e4b-4b3e-76f3-af5b-32b49bed5734} - - - {ba7fa262-1d79-278b-6d33-494ef09bc0b0} - - - {bbe38f66-e869-8d99-4ef8-a477041fda28} - - - {c6deeb40-d424-ed7a-bcf9-8b33d62d603d} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test/boringssl_refcount_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test/boringssl_refcount_test.vcxproj deleted file mode 100644 index c357b64cbd..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test/boringssl_refcount_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {22CC501E-C6E5-3FFF-3EAF-B7B6D76FCD43} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_refcount_test - static - Debug - static - Debug - - - boringssl_refcount_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {1CA8E69A-09F6-4FC4-043E-BB7E259F8FC6} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test/boringssl_refcount_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test/boringssl_refcount_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test/boringssl_refcount_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test_lib/boringssl_refcount_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test_lib/boringssl_refcount_test_lib.vcxproj deleted file mode 100644 index ab0bb50492..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test_lib/boringssl_refcount_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {1CA8E69A-09F6-4FC4-043E-BB7E259F8FC6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_refcount_test_lib - - - boringssl_refcount_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test_lib/boringssl_refcount_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test_lib/boringssl_refcount_test_lib.vcxproj.filters deleted file mode 100644 index 58d3068efe..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_refcount_test_lib/boringssl_refcount_test_lib.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - third_party\boringssl\crypto - - - - - - {c7214a02-816b-85e1-d8b9-3b686c52a43a} - - - {07e15140-4465-ac3d-ec1e-5a0f4c69b114} - - - {7f7132bd-a082-c334-dfb0-941a5f2e3cb6} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test/boringssl_rsa_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test/boringssl_rsa_test.vcxproj deleted file mode 100644 index 4916f3ff18..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test/boringssl_rsa_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2354090D-8BFD-2905-D2B4-89A211F2932A} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_rsa_test - static - Debug - static - Debug - - - boringssl_rsa_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {96D48EA8-C1E0-ECA1-7504-1F7CB7761937} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test/boringssl_rsa_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test/boringssl_rsa_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test/boringssl_rsa_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test_lib/boringssl_rsa_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test_lib/boringssl_rsa_test_lib.vcxproj deleted file mode 100644 index 420f70a5ce..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test_lib/boringssl_rsa_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {96D48EA8-C1E0-ECA1-7504-1F7CB7761937} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_rsa_test_lib - - - boringssl_rsa_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test_lib/boringssl_rsa_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test_lib/boringssl_rsa_test_lib.vcxproj.filters deleted file mode 100644 index e3450798a9..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_rsa_test_lib/boringssl_rsa_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\rsa - - - - - - {68d305bc-5eb5-b25f-a31b-a1612d05ed35} - - - {b02ccca6-4460-f6a2-3e46-86c2f7bfc21d} - - - {6de000ba-ac5d-11d3-3932-f463ff3ed11e} - - - {25fda1e5-deda-f910-1f28-54b498b5e648} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test/boringssl_ssl_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test/boringssl_ssl_test.vcxproj deleted file mode 100644 index eab2cabfd2..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test/boringssl_ssl_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2D1CD121-38BD-1C90-FDEC-01DB235D4881} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_ssl_test - static - Debug - static - Debug - - - boringssl_ssl_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {E5224E90-A17D-5EC6-DDDE-36204B2F2601} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test/boringssl_ssl_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test/boringssl_ssl_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test/boringssl_ssl_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test_lib/boringssl_ssl_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test_lib/boringssl_ssl_test_lib.vcxproj deleted file mode 100644 index 58122a219d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test_lib/boringssl_ssl_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E5224E90-A17D-5EC6-DDDE-36204B2F2601} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_ssl_test_lib - - - boringssl_ssl_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test_lib/boringssl_ssl_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test_lib/boringssl_ssl_test_lib.vcxproj.filters deleted file mode 100644 index aed49a863e..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_ssl_test_lib/boringssl_ssl_test_lib.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - third_party\boringssl\ssl - - - - - - {63e7e5c0-fc47-80d3-1eba-465814020d80} - - - {7052a2bd-7144-f593-6ce0-41c21596a6e1} - - - {969234a8-1735-8a0f-d4b5-a59b08a3e246} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_tab_test/boringssl_tab_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_tab_test/boringssl_tab_test.vcxproj deleted file mode 100644 index fc7a9c2b01..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_tab_test/boringssl_tab_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8A97C691-4A5A-6290-CEFD-B8D08CB1D6D1} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_tab_test - static - Debug - static - Debug - - - boringssl_tab_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {3126C822-4167-373B-1729-7C34FA535479} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_tab_test/boringssl_tab_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_tab_test/boringssl_tab_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_tab_test/boringssl_tab_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_tab_test_lib/boringssl_tab_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_tab_test_lib/boringssl_tab_test_lib.vcxproj deleted file mode 100644 index 379796139f..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_tab_test_lib/boringssl_tab_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {3126C822-4167-373B-1729-7C34FA535479} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_tab_test_lib - - - boringssl_tab_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_tab_test_lib/boringssl_tab_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_tab_test_lib/boringssl_tab_test_lib.vcxproj.filters deleted file mode 100644 index f122357e77..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_tab_test_lib/boringssl_tab_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\x509v3 - - - - - - {881334ff-b35f-b9d5-9a35-2df16eef5a58} - - - {1405a432-77d0-f35a-4252-a9d7a830002b} - - - {d1e08a1c-df12-11bc-77bf-37ddaac4a850} - - - {ae96e76d-74e0-eb59-eda9-08b1707a501b} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_thread_test/boringssl_thread_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_thread_test/boringssl_thread_test.vcxproj deleted file mode 100644 index 1730c70005..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_thread_test/boringssl_thread_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {04A19084-D2E9-013C-5D14-1CC2EA8766FF} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_thread_test - static - Debug - static - Debug - - - boringssl_thread_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {3FB65077-6EF2-787C-9B93-4AB8F9824893} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_thread_test/boringssl_thread_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_thread_test/boringssl_thread_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_thread_test/boringssl_thread_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_thread_test_lib/boringssl_thread_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_thread_test_lib/boringssl_thread_test_lib.vcxproj deleted file mode 100644 index 9ab8c25666..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_thread_test_lib/boringssl_thread_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {3FB65077-6EF2-787C-9B93-4AB8F9824893} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_thread_test_lib - - - boringssl_thread_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_thread_test_lib/boringssl_thread_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_thread_test_lib/boringssl_thread_test_lib.vcxproj.filters deleted file mode 100644 index 82f0543ea8..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_thread_test_lib/boringssl_thread_test_lib.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - third_party\boringssl\crypto - - - - - - {83af82d3-5132-700e-d1fd-07a3bcc7f4d1} - - - {40d0c1cf-b52c-611b-fd17-644f9dc8d94d} - - - {93f1e66b-5ff6-e20e-cb4b-a653eaa3ce8a} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test/boringssl_v3name_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test/boringssl_v3name_test.vcxproj deleted file mode 100644 index 517c5c429e..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test/boringssl_v3name_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E767CAAA-D4FC-F06C-47A7-1BCCA2822C0A} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_v3name_test - static - Debug - static - Debug - - - boringssl_v3name_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {A5F2219C-F204-53C3-C186-039968E28779} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test/boringssl_v3name_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test/boringssl_v3name_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test/boringssl_v3name_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test_lib/boringssl_v3name_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test_lib/boringssl_v3name_test_lib.vcxproj deleted file mode 100644 index 43bdab2948..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test_lib/boringssl_v3name_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A5F2219C-F204-53C3-C186-039968E28779} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_v3name_test_lib - - - boringssl_v3name_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test_lib/boringssl_v3name_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test_lib/boringssl_v3name_test_lib.vcxproj.filters deleted file mode 100644 index 4ec987cc75..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_v3name_test_lib/boringssl_v3name_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\x509v3 - - - - - - {fc383293-dec7-83a6-41d0-6f0fa2a2b248} - - - {f4c0ba81-9c3f-5860-c9f6-db0a6f920bd5} - - - {1e1414ed-f5e9-7574-0230-8fdf51447b17} - - - {49ed6524-7436-be11-342a-4f2676431d59} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test/boringssl_x25519_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test/boringssl_x25519_test.vcxproj deleted file mode 100644 index 9dfd8a830a..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test/boringssl_x25519_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {46501F07-C483-2762-5EB9-25D040FEB611} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_x25519_test - static - Debug - static - Debug - - - boringssl_x25519_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {7D18A12A-ECAF-4057-A32E-323CFA05709B} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test/boringssl_x25519_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test/boringssl_x25519_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test/boringssl_x25519_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test_lib/boringssl_x25519_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test_lib/boringssl_x25519_test_lib.vcxproj deleted file mode 100644 index 574207a697..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test_lib/boringssl_x25519_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {7D18A12A-ECAF-4057-A32E-323CFA05709B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_x25519_test_lib - - - boringssl_x25519_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test_lib/boringssl_x25519_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test_lib/boringssl_x25519_test_lib.vcxproj.filters deleted file mode 100644 index 41368c40f6..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_x25519_test_lib/boringssl_x25519_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\curve25519 - - - - - - {552cb3e8-1952-8a3d-3b78-436b0c17be29} - - - {5529cccc-5648-920a-7fb4-c56418c0f76e} - - - {69073313-6b56-268a-4291-3723da29f9a6} - - - {bd171750-db9b-78f3-438e-4e824b9fdbac} - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj deleted file mode 100644 index 2bf7f71531..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0E1472A5-A857-7680-45C6-7C4DD2F6BE48} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - boringssl_x509_test - static - Debug - static - Debug - - - boringssl_x509_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Console - true - false - true - true - - - - - - - - - - {62DBB3BA-05D6-D2CF-7EC5-253F2AC25892} - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj.filters deleted file mode 100644 index 00e4276f1d..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj.filters +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj deleted file mode 100644 index f8b0e7a701..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {62DBB3BA-05D6-D2CF-7EC5-253F2AC25892} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - boringssl_x509_test_lib - - - boringssl_x509_test_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - false - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - false - None - false - - - Windows - true - false - true - true - - - - - - - - - - {427037B1-B51B-D6F1-5025-AD12B200266A} - - - {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj.filters deleted file mode 100644 index 216a56fae3..0000000000 --- a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - third_party\boringssl\crypto\x509 - - - - - - {0a04403f-6935-8e9c-c271-cfcb728d6dd3} - - - {8ffac2f8-0d1d-00df-018c-56100e9842f7} - - - {2d1857b4-2355-6af6-b6c8-b33f3ec27013} - - - {615f50f9-1415-e8e4-49ec-987a5772c7ee} - - - - diff --git a/vsprojects/vcxproj/test/census_context_test/census_context_test.vcxproj b/vsprojects/vcxproj/test/census_context_test/census_context_test.vcxproj deleted file mode 100644 index b4741e5d26..0000000000 --- a/vsprojects/vcxproj/test/census_context_test/census_context_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - census_context_test - static - Debug - static - Debug - - - census_context_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/census_context_test/census_context_test.vcxproj.filters b/vsprojects/vcxproj/test/census_context_test/census_context_test.vcxproj.filters deleted file mode 100644 index 53a7a66e2e..0000000000 --- a/vsprojects/vcxproj/test/census_context_test/census_context_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\census - - - - - - {bc15bb31-7dbe-17f2-fb1c-4bc140ce1707} - - - {806f9b58-6a48-ae09-3cc6-bb36e3126f27} - - - {85e37a47-e797-dcd1-b1e0-df553a454d8f} - - - - diff --git a/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj b/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj deleted file mode 100644 index c4fbd54e22..0000000000 --- a/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {18CF99B5-3C61-EC3D-9509-3C95334C3B88} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - census_resource_test - static - Debug - static - Debug - - - census_resource_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj.filters b/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj.filters deleted file mode 100644 index 93faac55d0..0000000000 --- a/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\census - - - - - - {313aad4e-d33b-88c5-7d94-e04a4cb0c912} - - - {ff2d74ef-228a-1739-7fa7-7dccbec5b0c5} - - - {4f529bd9-396f-027c-bc49-f9a6bbc97c72} - - - - diff --git a/vsprojects/vcxproj/test/census_trace_context_test/census_trace_context_test.vcxproj b/vsprojects/vcxproj/test/census_trace_context_test/census_trace_context_test.vcxproj deleted file mode 100644 index f0c76e7f04..0000000000 --- a/vsprojects/vcxproj/test/census_trace_context_test/census_trace_context_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {14511310-FAE4-C287-31DC-D6F456D10AF3} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - census_trace_context_test - static - Debug - static - Debug - - - census_trace_context_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/census_trace_context_test/census_trace_context_test.vcxproj.filters b/vsprojects/vcxproj/test/census_trace_context_test/census_trace_context_test.vcxproj.filters deleted file mode 100644 index 1aafe06ff0..0000000000 --- a/vsprojects/vcxproj/test/census_trace_context_test/census_trace_context_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\census - - - - - - {ceb3b75d-b5bc-0966-6724-06fb51237d08} - - - {8d294ce5-d65c-2fef-28ab-43b4d23722c3} - - - {3981af30-20c0-647e-755f-fa184674d50a} - - - - diff --git a/vsprojects/vcxproj/test/channel_arguments_test/channel_arguments_test.vcxproj b/vsprojects/vcxproj/test/channel_arguments_test/channel_arguments_test.vcxproj deleted file mode 100644 index d20bb38763..0000000000 --- a/vsprojects/vcxproj/test/channel_arguments_test/channel_arguments_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {74A0C552-D7DA-B657-507D-EDB0CDF5AD85} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - channel_arguments_test - static - Debug - static - Debug - - - channel_arguments_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/channel_arguments_test/channel_arguments_test.vcxproj.filters b/vsprojects/vcxproj/test/channel_arguments_test/channel_arguments_test.vcxproj.filters deleted file mode 100644 index 8a76a13e5e..0000000000 --- a/vsprojects/vcxproj/test/channel_arguments_test/channel_arguments_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\common - - - - - - {74eee7ed-dbd7-190f-f073-edf641a325f0} - - - {16fb3cfd-129c-a846-b9a5-dbec55fd83a8} - - - {641fdf8b-9e1d-4d66-c744-217b0b527616} - - - - diff --git a/vsprojects/vcxproj/test/channel_create_test/channel_create_test.vcxproj b/vsprojects/vcxproj/test/channel_create_test/channel_create_test.vcxproj deleted file mode 100644 index 8a5fc550c9..0000000000 --- a/vsprojects/vcxproj/test/channel_create_test/channel_create_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {AFC88484-3A2E-32BC-25B2-23DF741D4F3D} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - channel_create_test - static - Debug - static - Debug - - - channel_create_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/channel_create_test/channel_create_test.vcxproj.filters b/vsprojects/vcxproj/test/channel_create_test/channel_create_test.vcxproj.filters deleted file mode 100644 index ba7c4a7c6a..0000000000 --- a/vsprojects/vcxproj/test/channel_create_test/channel_create_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {095f981c-a1b9-a14f-882c-e53bb98e69ba} - - - {1753467a-9583-1992-769f-8d618b9fae73} - - - {95e79082-5d98-1c28-2da4-2c68a8b24656} - - - - diff --git a/vsprojects/vcxproj/test/channel_filter_test/channel_filter_test.vcxproj b/vsprojects/vcxproj/test/channel_filter_test/channel_filter_test.vcxproj deleted file mode 100644 index aaf5116a6f..0000000000 --- a/vsprojects/vcxproj/test/channel_filter_test/channel_filter_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E17CE414-2DB3-B793-F76F-8163D4D29E98} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - channel_filter_test - static - Debug - static - Debug - - - channel_filter_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/channel_filter_test/channel_filter_test.vcxproj.filters b/vsprojects/vcxproj/test/channel_filter_test/channel_filter_test.vcxproj.filters deleted file mode 100644 index cce8a1a101..0000000000 --- a/vsprojects/vcxproj/test/channel_filter_test/channel_filter_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\common - - - - - - {569c3886-7d07-b585-7924-7e0a6f9e8b10} - - - {06a6d27f-0612-06ff-8a14-8511be89b534} - - - {8fe4d870-077e-6775-b7ba-b6469cb5188e} - - - - diff --git a/vsprojects/vcxproj/test/chttp2_hpack_encoder_test/chttp2_hpack_encoder_test.vcxproj b/vsprojects/vcxproj/test/chttp2_hpack_encoder_test/chttp2_hpack_encoder_test.vcxproj deleted file mode 100644 index 0c6f74721a..0000000000 --- a/vsprojects/vcxproj/test/chttp2_hpack_encoder_test/chttp2_hpack_encoder_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {19F92966-3B0E-4FF8-CD7C-435D353E079E} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - chttp2_hpack_encoder_test - static - Debug - static - Debug - - - chttp2_hpack_encoder_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/chttp2_hpack_encoder_test/chttp2_hpack_encoder_test.vcxproj.filters b/vsprojects/vcxproj/test/chttp2_hpack_encoder_test/chttp2_hpack_encoder_test.vcxproj.filters deleted file mode 100644 index 7c1cbe0c76..0000000000 --- a/vsprojects/vcxproj/test/chttp2_hpack_encoder_test/chttp2_hpack_encoder_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\transport\chttp2 - - - - - - {9f3df7e9-611c-d646-6cf2-1e65b7b54a47} - - - {1ce97eb1-bf5d-a8cf-3f95-9c52a21bbf44} - - - {7cff31aa-23df-9b0b-0296-586c4174cf87} - - - {857eb49b-3f20-db68-a434-106b1e6c1a41} - - - - diff --git a/vsprojects/vcxproj/test/chttp2_status_conversion_test/chttp2_status_conversion_test.vcxproj b/vsprojects/vcxproj/test/chttp2_status_conversion_test/chttp2_status_conversion_test.vcxproj deleted file mode 100644 index f5b8838cdf..0000000000 --- a/vsprojects/vcxproj/test/chttp2_status_conversion_test/chttp2_status_conversion_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {ABAD3D2C-078C-7850-B413-3352A07C6176} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - chttp2_status_conversion_test - static - Debug - static - Debug - - - chttp2_status_conversion_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/chttp2_status_conversion_test/chttp2_status_conversion_test.vcxproj.filters b/vsprojects/vcxproj/test/chttp2_status_conversion_test/chttp2_status_conversion_test.vcxproj.filters deleted file mode 100644 index d94af50254..0000000000 --- a/vsprojects/vcxproj/test/chttp2_status_conversion_test/chttp2_status_conversion_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\transport\chttp2 - - - - - - {29690dfb-a808-84b3-d82e-deadb5d04103} - - - {d17e51ca-73ac-6f31-d02c-631ac849c194} - - - {3f03cd74-998e-23ed-a372-a1b706d35bf4} - - - {b65a9b0c-fa3d-1919-b70f-9d2d5cc28077} - - - - diff --git a/vsprojects/vcxproj/test/chttp2_stream_map_test/chttp2_stream_map_test.vcxproj b/vsprojects/vcxproj/test/chttp2_stream_map_test/chttp2_stream_map_test.vcxproj deleted file mode 100644 index 157e90cf6c..0000000000 --- a/vsprojects/vcxproj/test/chttp2_stream_map_test/chttp2_stream_map_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {12F9C5F8-1BDA-305F-5A0B-B0F9CC7AA7A4} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - chttp2_stream_map_test - static - Debug - static - Debug - - - chttp2_stream_map_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/chttp2_stream_map_test/chttp2_stream_map_test.vcxproj.filters b/vsprojects/vcxproj/test/chttp2_stream_map_test/chttp2_stream_map_test.vcxproj.filters deleted file mode 100644 index 5bb023e2d2..0000000000 --- a/vsprojects/vcxproj/test/chttp2_stream_map_test/chttp2_stream_map_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\transport\chttp2 - - - - - - {e3f0964a-a92d-d499-40d9-1300f99d516d} - - - {ea0f77c0-2f72-1acc-2750-5299dc60b905} - - - {6b3238da-d6f4-7dd7-5eaf-44d078e88664} - - - {fc2a2afd-d5a1-c50e-baa7-b30cf50b8c87} - - - - diff --git a/vsprojects/vcxproj/test/chttp2_varint_test/chttp2_varint_test.vcxproj b/vsprojects/vcxproj/test/chttp2_varint_test/chttp2_varint_test.vcxproj deleted file mode 100644 index a4ee7dca2d..0000000000 --- a/vsprojects/vcxproj/test/chttp2_varint_test/chttp2_varint_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6B29F634-1277-74B8-47F6-78756190BA7B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - chttp2_varint_test - static - Debug - static - Debug - - - chttp2_varint_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/chttp2_varint_test/chttp2_varint_test.vcxproj.filters b/vsprojects/vcxproj/test/chttp2_varint_test/chttp2_varint_test.vcxproj.filters deleted file mode 100644 index bf284a8cfa..0000000000 --- a/vsprojects/vcxproj/test/chttp2_varint_test/chttp2_varint_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\transport\chttp2 - - - - - - {61f754dd-899e-a7aa-b676-6fcd106556b4} - - - {c5822510-1cab-5c9c-7ead-4f391e6dc2bb} - - - {8eb39844-fcb6-6a53-4bf8-9f62d908d217} - - - {5366b6c8-e031-c856-4f70-df98ac4caaf1} - - - - diff --git a/vsprojects/vcxproj/test/cli_call_test/cli_call_test.vcxproj b/vsprojects/vcxproj/test/cli_call_test/cli_call_test.vcxproj deleted file mode 100644 index 40fe5598b6..0000000000 --- a/vsprojects/vcxproj/test/cli_call_test/cli_call_test.vcxproj +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {AAC3E997-99CA-6A05-6D31-DC93CCE599E4} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - cli_call_test - static - Debug - static - Debug - - - cli_call_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {86E35862-43E8-F59E-F906-AFE0348AD3D2} - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/cli_call_test/cli_call_test.vcxproj.filters b/vsprojects/vcxproj/test/cli_call_test/cli_call_test.vcxproj.filters deleted file mode 100644 index 345c3acfdb..0000000000 --- a/vsprojects/vcxproj/test/cli_call_test/cli_call_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\util - - - - - - {53597b69-ee32-1e8e-0d60-d738568652ee} - - - {fa3eb567-fc0e-b0b3-1185-04ef9947cb26} - - - {279efd3d-7b88-f4ed-009d-3ce6e718c64a} - - - - diff --git a/vsprojects/vcxproj/test/client_crash_test_server/client_crash_test_server.vcxproj b/vsprojects/vcxproj/test/client_crash_test_server/client_crash_test_server.vcxproj deleted file mode 100644 index bc9efb502e..0000000000 --- a/vsprojects/vcxproj/test/client_crash_test_server/client_crash_test_server.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C54AFBCC-A527-646B-B09A-62435225CAD5} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - client_crash_test_server - static - Debug - static - Debug - - - client_crash_test_server - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/client_crash_test_server/client_crash_test_server.vcxproj.filters b/vsprojects/vcxproj/test/client_crash_test_server/client_crash_test_server.vcxproj.filters deleted file mode 100644 index 757d6b0e3e..0000000000 --- a/vsprojects/vcxproj/test/client_crash_test_server/client_crash_test_server.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {79d740b5-88ab-005f-f075-858096ab96ab} - - - {e5dfeb83-387a-43ed-1d6e-8a300c6b6f8f} - - - {8bdf98f9-deb7-c22d-d78a-655270450f7e} - - - - diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj deleted file mode 100644 index a2b2a1dfa0..0000000000 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C06E8406-E0B2-E532-526C-171569E0F2B6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - codegen_test_full - static - Debug - static - Debug - - - codegen_test_full - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters deleted file mode 100644 index 94b6c2530e..0000000000 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters +++ /dev/null @@ -1,209 +0,0 @@ - - - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - test\cpp\codegen - - - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - - - - {906b08b6-1c67-d4e6-dfe6-16aa91be8eb4} - - - {46618609-460b-ebe5-0b02-65a6afcea03b} - - - {25436c6c-6d67-aba9-8d95-d7dd50e3a188} - - - {b0b279c5-88b4-b733-4d75-a003212c7e13} - - - {6b9a368a-8dba-441b-a31d-def53c3eb6cf} - - - {12f7e55c-a6c1-b083-9017-135542012295} - - - {d4c65b16-f94b-557d-8cd2-b9c8c6659673} - - - {f2ddfc7f-8c95-bbfe-c40d-5737f28d8311} - - - {909027fc-be54-d7d9-3e0b-b034a6f7ff8f} - - - {84c6b0c4-1143-abcf-cc7b-3ee6ef87f16a} - - - {4da12131-db02-7cd7-361f-6f1c93af1d51} - - - {a8c9aa14-6237-2ecd-82b4-32f5f3347b35} - - - {5807e8ad-90b9-2dc6-447f-1c5e7b8fba47} - - - {0eaa7a87-86be-68a6-a8cf-a9039a9d61d6} - - - {6cac9a6e-b8c8-bef0-2895-9f732ff8c7ee} - - - - diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj deleted file mode 100644 index 1a3c157983..0000000000 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {87FCA32C-6ECF-5D95-7081-55F309EC6393} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - codegen_test_minimal - static - Debug - static - Debug - - - codegen_test_minimal - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters deleted file mode 100644 index 1f4b60ca4d..0000000000 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters +++ /dev/null @@ -1,218 +0,0 @@ - - - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - test\cpp\codegen - - - src\cpp\codegen - - - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - - - - {d7e3a4ab-12fd-702a-0f38-f390a3a498ee} - - - {af7d5949-f89a-c3d7-b61c-4f6eb53add9d} - - - {871b80f5-04bd-85d1-7c3c-dad152f2d17b} - - - {cb2776d8-357e-4807-8804-b07a35caf468} - - - {034ecb5b-5ea9-82eb-c7de-3318074530d2} - - - {1eefd7f9-c93b-eb01-9ec6-e654a34a562e} - - - {2ba3ef0f-e274-7ddd-20df-902d8d75f690} - - - {e161f3e2-2652-ca2f-adfd-0c58107a026f} - - - {0d44e24d-bdd6-798d-096d-2201e0a9fd53} - - - {13a5f072-c1d8-5794-d743-7f8cc295c8ef} - - - {afa9b626-4df3-6192-b0b0-82986d31e915} - - - {85c80929-0814-efc5-9457-f80a00b4bcae} - - - {c7a2927d-c3a6-bf01-327d-d4d3e49682ba} - - - {9c363e7c-a9fc-0915-250a-5ba46bd8caf7} - - - {ea047246-affd-99d8-e39b-268b3ebba747} - - - {e09ae1ab-897c-30d8-bdd8-86cdbb7e3b57} - - - {9ee5c585-b102-0eb7-69e4-9f084beeac31} - - - - diff --git a/vsprojects/vcxproj/test/combiner_test/combiner_test.vcxproj b/vsprojects/vcxproj/test/combiner_test/combiner_test.vcxproj deleted file mode 100644 index f889d21e2d..0000000000 --- a/vsprojects/vcxproj/test/combiner_test/combiner_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C237D1E4-8825-80BA-1FC3-5E147E53E96E} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - combiner_test - static - Debug - static - Debug - - - combiner_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/combiner_test/combiner_test.vcxproj.filters b/vsprojects/vcxproj/test/combiner_test/combiner_test.vcxproj.filters deleted file mode 100644 index e8ebb09898..0000000000 --- a/vsprojects/vcxproj/test/combiner_test/combiner_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {82bca2af-d499-b405-fd05-4d345372496c} - - - {c32d8e20-b719-532d-ba23-bd9d523fac15} - - - {b4fa8ca1-e6c7-dec5-6d62-8a62396825c6} - - - - diff --git a/vsprojects/vcxproj/test/compression_test/compression_test.vcxproj b/vsprojects/vcxproj/test/compression_test/compression_test.vcxproj deleted file mode 100644 index 5bfbe2dcb7..0000000000 --- a/vsprojects/vcxproj/test/compression_test/compression_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {5AFE7D17-A4A7-D68E-4491-CBC852F9D2A0} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - compression_test - static - Debug - static - Debug - - - compression_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/compression_test/compression_test.vcxproj.filters b/vsprojects/vcxproj/test/compression_test/compression_test.vcxproj.filters deleted file mode 100644 index 4b37e2725f..0000000000 --- a/vsprojects/vcxproj/test/compression_test/compression_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\compression - - - - - - {f846f63f-a845-cfde-aeca-6a5eef1dc024} - - - {fe09c560-886a-5b1e-11ab-4cac76b28755} - - - {079bafab-46fb-9667-6a93-b9a17c302646} - - - - diff --git a/vsprojects/vcxproj/test/concurrent_connectivity_test/concurrent_connectivity_test.vcxproj b/vsprojects/vcxproj/test/concurrent_connectivity_test/concurrent_connectivity_test.vcxproj deleted file mode 100644 index 6d69eae302..0000000000 --- a/vsprojects/vcxproj/test/concurrent_connectivity_test/concurrent_connectivity_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {391B366C-D916-45AA-3FE5-67363A46193B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - concurrent_connectivity_test - static - Debug - static - Debug - - - concurrent_connectivity_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/concurrent_connectivity_test/concurrent_connectivity_test.vcxproj.filters b/vsprojects/vcxproj/test/concurrent_connectivity_test/concurrent_connectivity_test.vcxproj.filters deleted file mode 100644 index a6492c775a..0000000000 --- a/vsprojects/vcxproj/test/concurrent_connectivity_test/concurrent_connectivity_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {1320b717-a107-004b-c517-074e6a7baf97} - - - {f205219c-cee2-c0e8-a922-5486f2d31026} - - - {6804b6ae-88f4-acf9-b3fc-6b12f8e28d4d} - - - - diff --git a/vsprojects/vcxproj/test/connection_prefix_bad_client_test/connection_prefix_bad_client_test.vcxproj b/vsprojects/vcxproj/test/connection_prefix_bad_client_test/connection_prefix_bad_client_test.vcxproj deleted file mode 100644 index c09ef73913..0000000000 --- a/vsprojects/vcxproj/test/connection_prefix_bad_client_test/connection_prefix_bad_client_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - connection_prefix_bad_client_test - static - Debug - static - Debug - - - connection_prefix_bad_client_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {BA67B418-B699-E41A-9CC4-0279C49481A5} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/connection_prefix_bad_client_test/connection_prefix_bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/connection_prefix_bad_client_test/connection_prefix_bad_client_test.vcxproj.filters deleted file mode 100644 index 2364147710..0000000000 --- a/vsprojects/vcxproj/test/connection_prefix_bad_client_test/connection_prefix_bad_client_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\bad_client\tests - - - - - - {4fe7815e-17f8-e128-2a80-c2d506ff01cf} - - - {c8a7a677-3402-3435-7448-13e8c7b644f5} - - - {319b8bcf-6dfb-f2c8-ca65-0f05799148bf} - - - {2b2b470c-98b9-8862-947b-75fe5ee5fcc8} - - - - diff --git a/vsprojects/vcxproj/test/connection_refused_test/connection_refused_test.vcxproj b/vsprojects/vcxproj/test/connection_refused_test/connection_refused_test.vcxproj deleted file mode 100644 index 2f13d09bdf..0000000000 --- a/vsprojects/vcxproj/test/connection_refused_test/connection_refused_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {961DFABF-18F2-7D46-4D69-B82A5E9A78B2} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - connection_refused_test - static - Debug - static - Debug - - - connection_refused_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/connection_refused_test/connection_refused_test.vcxproj.filters b/vsprojects/vcxproj/test/connection_refused_test/connection_refused_test.vcxproj.filters deleted file mode 100644 index 241a2e381c..0000000000 --- a/vsprojects/vcxproj/test/connection_refused_test/connection_refused_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\end2end - - - - - - {4b0c4345-e702-8911-ab5a-c8fb187ff62a} - - - {bf069703-6525-081f-b965-b73017288d02} - - - {4700e535-ec1c-027a-7d48-afa5ba66e3d3} - - - - diff --git a/vsprojects/vcxproj/test/credentials_test/credentials_test.vcxproj b/vsprojects/vcxproj/test/credentials_test/credentials_test.vcxproj deleted file mode 100644 index 43be5fbfe4..0000000000 --- a/vsprojects/vcxproj/test/credentials_test/credentials_test.vcxproj +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {BEEDF966-A073-F817-B946-C5E43AB4F3F0} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - credentials_test - static - Debug - static - Debug - - - credentials_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/credentials_test/credentials_test.vcxproj.filters b/vsprojects/vcxproj/test/credentials_test/credentials_test.vcxproj.filters deleted file mode 100644 index f3802bfc90..0000000000 --- a/vsprojects/vcxproj/test/credentials_test/credentials_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\client - - - - - - {5ad209c1-e4c8-1ed6-6778-64ccd41d1bf8} - - - {dfdce3b2-4686-1b33-a274-df02d259ffe0} - - - {7bda96ad-c26c-e2dc-0367-004f5dcc6422} - - - - diff --git a/vsprojects/vcxproj/test/cxx_byte_buffer_test/cxx_byte_buffer_test.vcxproj b/vsprojects/vcxproj/test/cxx_byte_buffer_test/cxx_byte_buffer_test.vcxproj deleted file mode 100644 index 8b63392d0c..0000000000 --- a/vsprojects/vcxproj/test/cxx_byte_buffer_test/cxx_byte_buffer_test.vcxproj +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B5880256-D188-CE37-819B-E473987AABB9} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - cxx_byte_buffer_test - static - Debug - static - Debug - - - cxx_byte_buffer_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/cxx_byte_buffer_test/cxx_byte_buffer_test.vcxproj.filters b/vsprojects/vcxproj/test/cxx_byte_buffer_test/cxx_byte_buffer_test.vcxproj.filters deleted file mode 100644 index ef1c68a041..0000000000 --- a/vsprojects/vcxproj/test/cxx_byte_buffer_test/cxx_byte_buffer_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\util - - - - - - {d5b20dea-54a9-0098-3d0b-8c5d060c4760} - - - {e016a9a7-9bf3-f9a6-7c1b-3d053f874413} - - - {a44064df-2436-177e-41a1-77fd0d81cfde} - - - - diff --git a/vsprojects/vcxproj/test/cxx_slice_test/cxx_slice_test.vcxproj b/vsprojects/vcxproj/test/cxx_slice_test/cxx_slice_test.vcxproj deleted file mode 100644 index f7bc268b34..0000000000 --- a/vsprojects/vcxproj/test/cxx_slice_test/cxx_slice_test.vcxproj +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6E3FED7F-1FE5-9B86-C5B3-F8B3A416F144} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - cxx_slice_test - static - Debug - static - Debug - - - cxx_slice_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/cxx_slice_test/cxx_slice_test.vcxproj.filters b/vsprojects/vcxproj/test/cxx_slice_test/cxx_slice_test.vcxproj.filters deleted file mode 100644 index 235adc80ed..0000000000 --- a/vsprojects/vcxproj/test/cxx_slice_test/cxx_slice_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\util - - - - - - {42ceaf76-b1be-6061-bef4-997aa108e1b4} - - - {54019220-6ff7-63c1-e8bd-3c8365ce4a82} - - - {babb50df-7a81-5de7-a861-d85e6827701e} - - - - diff --git a/vsprojects/vcxproj/test/cxx_string_ref_test/cxx_string_ref_test.vcxproj b/vsprojects/vcxproj/test/cxx_string_ref_test/cxx_string_ref_test.vcxproj deleted file mode 100644 index 8d9989557f..0000000000 --- a/vsprojects/vcxproj/test/cxx_string_ref_test/cxx_string_ref_test.vcxproj +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C9CA9196-63A4-AAFB-412F-7112AB1ECA9C} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - cxx_string_ref_test - static - Debug - static - Debug - - - cxx_string_ref_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/cxx_string_ref_test/cxx_string_ref_test.vcxproj.filters b/vsprojects/vcxproj/test/cxx_string_ref_test/cxx_string_ref_test.vcxproj.filters deleted file mode 100644 index f22e235807..0000000000 --- a/vsprojects/vcxproj/test/cxx_string_ref_test/cxx_string_ref_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\util - - - - - - {d1b5f39c-07e7-2119-2d00-c9998e758711} - - - {c69e4f8d-4ef8-4f57-8143-2fcc66d17a41} - - - {490c9ad7-34e7-2705-3d4a-4bf84612a4a6} - - - - diff --git a/vsprojects/vcxproj/test/cxx_time_test/cxx_time_test.vcxproj b/vsprojects/vcxproj/test/cxx_time_test/cxx_time_test.vcxproj deleted file mode 100644 index bcbaf898c2..0000000000 --- a/vsprojects/vcxproj/test/cxx_time_test/cxx_time_test.vcxproj +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8EB3DB1B-B73B-5659-DA1B-18CB1E3DE9CB} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - cxx_time_test - static - Debug - static - Debug - - - cxx_time_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/cxx_time_test/cxx_time_test.vcxproj.filters b/vsprojects/vcxproj/test/cxx_time_test/cxx_time_test.vcxproj.filters deleted file mode 100644 index 5b585fad8f..0000000000 --- a/vsprojects/vcxproj/test/cxx_time_test/cxx_time_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\util - - - - - - {3d05c77c-81dd-305d-7e04-2efeca96920d} - - - {af0580d3-7925-3e92-56a1-ea129cc71f5c} - - - {467e880d-93b6-6d78-3f45-95567f2a7f56} - - - - diff --git a/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj b/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj deleted file mode 100644 index e8958bbe32..0000000000 --- a/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F7B6FE68-E847-D7CA-4062-E737E542BCC3} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - dns_resolver_connectivity_test - static - Debug - static - Debug - - - dns_resolver_connectivity_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj.filters b/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj.filters deleted file mode 100644 index eb80b8eed5..0000000000 --- a/vsprojects/vcxproj/test/dns_resolver_connectivity_test/dns_resolver_connectivity_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\client_channel\resolvers - - - - - - {7743e287-3311-1206-2766-32381628ff07} - - - {cc06b800-cd26-f7a8-7ecf-ec789e78881b} - - - {0998596f-2aa1-8205-173b-0bd27b7617d1} - - - {8925594d-dbe2-fee6-1553-d3258d9361da} - - - - diff --git a/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj b/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj deleted file mode 100644 index 83375104ab..0000000000 --- a/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D06E10DC-272A-5203-7066-2698A247DF26} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - dns_resolver_test - static - Debug - static - Debug - - - dns_resolver_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj.filters b/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj.filters deleted file mode 100644 index 540da557e6..0000000000 --- a/vsprojects/vcxproj/test/dns_resolver_test/dns_resolver_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\client_channel\resolvers - - - - - - {85d5036d-64f0-4cc2-f3c4-f2a0fbe271f3} - - - {edc57049-e918-50c2-5ba9-04771a506c89} - - - {227838e2-4ac8-f960-68b6-e82cc6e0cefa} - - - {5d51c3a6-a50e-4d84-53b3-44ee7c39f36c} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj deleted file mode 100644 index b43c39ee66..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A8039D43-910E-4248-2A22-74366E8C4DCD} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - h2_census_nosec_test - static - Debug - - - h2_census_nosec_test - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj.filters deleted file mode 100644 index 746bf32659..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {3bacd48d-9bc5-66f1-c2f4-4ee4c5f0018f} - - - {6447bf16-391d-ff8c-c9d5-fa7408f76d7a} - - - {90c937fd-45ea-2ca5-0b4f-fb44970588a4} - - - {6bdd656d-a29e-af60-d399-aff74df6b9c8} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj deleted file mode 100644 index 2f63ad02a8..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9E4180B0-81ED-7305-333F-653CE9AB819B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_census_test - static - Debug - static - Debug - - - h2_census_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj.filters deleted file mode 100644 index e739c1ea80..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {7a4ab907-810c-89ed-96d8-109799ed4b45} - - - {ce476d83-35d2-ea5e-14a0-5eae48c2d5c8} - - - {efa3974b-f8ab-0dd0-2187-2d2e797dbbea} - - - {88b02595-ad4b-0733-12d9-ccf459af2ed3} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj deleted file mode 100644 index 7da53a3849..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {42826C1F-DCF0-918E-D247-0376DC1EFD50} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - h2_compress_nosec_test - static - Debug - - - h2_compress_nosec_test - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj.filters deleted file mode 100644 index 8ffbdcc902..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {a4f36e74-1e6b-a93a-9d3f-f52fc441f779} - - - {8170ffe4-6ef8-f5d5-61e4-2e7e5f29cba4} - - - {3ce62213-f56e-e158-8f94-c7eb2a081146} - - - {113db7ac-9924-924e-e832-5a27353a18dc} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj deleted file mode 100644 index c9efe0b671..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C7E516E9-B80F-4BC1-A617-095FC6E14BC9} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_compress_test - static - Debug - static - Debug - - - h2_compress_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj.filters deleted file mode 100644 index 36a85f90b0..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {e1d99c06-a2fa-b66e-6b48-12363211da0d} - - - {e7f36559-095d-8990-f99e-1dc1a8e9c0a1} - - - {6ffc3faf-b115-0272-5cdc-3503237af525} - - - {41d26be6-f7c2-3ecd-c210-8988d6e011c3} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj deleted file mode 100644 index d84176e189..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0E980562-3AA0-91B1-C590-85C9A899BE44} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_fakesec_test - static - Debug - static - Debug - - - h2_fakesec_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj.filters deleted file mode 100644 index 9d9b2fa5c5..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {aad5c771-b5c9-5778-deb8-0e1d1d7401e6} - - - {30801d1b-149a-af4e-669d-1136547174e7} - - - {50eec50a-8572-757e-391d-bae52e8cdb84} - - - {8176d179-274b-88f0-bd10-36c3b4254386} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj deleted file mode 100644 index bbd7d38fb9..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {DFD51943-4906-8051-7D66-6A7D50E0D87E} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - h2_full+trace_nosec_test - static - Debug - - - h2_full+trace_nosec_test - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj.filters deleted file mode 100644 index c9164af19a..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {2828a8fc-bcc1-7b1c-4953-0c8eaf9fe643} - - - {d8e78fb2-4316-018b-704a-0944fd0c6fd9} - - - {1981c949-24c5-413c-ab03-24eff55e803a} - - - {bfc11ba4-7401-55f0-8513-598aa93e7e1a} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj deleted file mode 100644 index 6ca9dfa46d..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {16C713C6-062E-F71F-A44C-52DC35494B27} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_full+trace_test - static - Debug - static - Debug - - - h2_full+trace_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj.filters deleted file mode 100644 index 87e8e7228b..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {00848213-d356-89b0-1d05-8131961dc959} - - - {863a91b6-f5f9-5326-129a-10003d7af98f} - - - {2733ff09-adc7-fd49-696f-5f72df2f44e2} - - - {62aa4eaf-c183-f2af-9ef9-a88ee802702c} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj deleted file mode 100644 index c55e07e1b3..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - h2_full_nosec_test - static - Debug - - - h2_full_nosec_test - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj.filters deleted file mode 100644 index a2ba309cbf..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {a8cfbafe-b5ca-877d-1381-d49d35c7480e} - - - {db6faea2-27f4-0712-5476-59619028b253} - - - {1ec8c1dd-a50b-1bc2-8541-065978ae36cc} - - - {9cb87542-024e-55a8-63e2-d11dde608fbf} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj deleted file mode 100644 index 4ac31f1d34..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {EEBEFA75-C625-C823-FE96-9AD64887B57D} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_full_test - static - Debug - static - Debug - - - h2_full_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj.filters deleted file mode 100644 index 123a3646ff..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {85f3d37c-2738-d392-8ebf-b9fcbde38b58} - - - {b79788fc-350c-6271-d91a-83e7d093fe4e} - - - {2761c2a2-c337-caeb-d9f8-a22935df9e8c} - - - {4fb46b8b-6720-9caa-ea3e-9c8cd1c5436c} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_nosec_test/h2_http_proxy_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_nosec_test/h2_http_proxy_nosec_test.vcxproj deleted file mode 100644 index d63a16c608..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_nosec_test/h2_http_proxy_nosec_test.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {58EA8DAE-6E50-45A3-0CCC-5165D824380E} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - h2_http_proxy_nosec_test - static - Debug - - - h2_http_proxy_nosec_test - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_nosec_test/h2_http_proxy_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_nosec_test/h2_http_proxy_nosec_test.vcxproj.filters deleted file mode 100644 index c5e39d1681..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_nosec_test/h2_http_proxy_nosec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {318aaada-bfb3-a91b-9ec7-50f91d2553fe} - - - {6ac28876-f5a4-067a-c4f3-a40fea67e0d8} - - - {116ee744-756f-b125-d1fa-367f891887c7} - - - {48a717b7-dce8-8e65-4a42-cc4396074f3a} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_test/h2_http_proxy_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_test/h2_http_proxy_test.vcxproj deleted file mode 100644 index 50d5982025..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_test/h2_http_proxy_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C9076E5F-7297-67C2-F786-3CC4F26D8F8A} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_http_proxy_test - static - Debug - static - Debug - - - h2_http_proxy_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_test/h2_http_proxy_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_test/h2_http_proxy_test.vcxproj.filters deleted file mode 100644 index e3441183b1..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_http_proxy_test/h2_http_proxy_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {b725acb1-7722-0738-5c04-6b70cf1f75a4} - - - {4a10c467-2c7d-9051-e9bf-a24684cfa755} - - - {4837a689-69d2-7fd8-99e6-d7a44dd77a6d} - - - {e7d5a1d8-129c-4b79-0afe-3f453bcd9c49} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj deleted file mode 100644 index 7eacfbda76..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {4B9EBBAE-D838-EC09-0B10-2D4520FBC0FF} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - h2_load_reporting_nosec_test - static - Debug - - - h2_load_reporting_nosec_test - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj.filters deleted file mode 100644 index 72df23ebc1..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {abff9aef-586e-65d2-beb8-e6392ecf7440} - - - {fd31cbf1-8cff-2e6a-618d-a01855997839} - - - {c6cc113f-ddb4-733b-5c10-8f98aa2d7d22} - - - {2cd15a3b-a7e6-b847-b6c4-7c6cc03eacc2} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj deleted file mode 100644 index d5d1a15a82..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F0A06723-2E3E-FE97-34B7-A2BA26D98B83} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_load_reporting_test - static - Debug - static - Debug - - - h2_load_reporting_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj.filters deleted file mode 100644 index 95b049c852..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_test/h2_load_reporting_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {467ceaa9-3a51-d5df-0556-1ef8e91f5d7d} - - - {1ec29254-9064-0338-78ca-94d8cfdbd95c} - - - {58fc84e1-7dc9-a517-359e-7d7e1c417432} - - - {92ef09e0-592b-0ca5-4d79-5929ae159ed5} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj deleted file mode 100644 index 67cc3c8141..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0F761FF3-342A-C429-711F-F76181BAA52D} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_oauth2_test - static - Debug - static - Debug - - - h2_oauth2_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj.filters deleted file mode 100644 index cf84cb4035..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {7da63aa7-c886-0283-d52f-20a68dca7ba3} - - - {e921c2a7-602b-ef23-c8ca-f63105b080ad} - - - {3a17e467-2750-b3ca-3f17-e8324c1180c0} - - - {36e0b3ff-1a47-01f8-a70c-2e757dd29295} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj deleted file mode 100644 index d4bca1a315..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6EC72045-98CB-8A8D-9788-BC94209E23C8} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - h2_proxy_nosec_test - static - Debug - - - h2_proxy_nosec_test - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj.filters deleted file mode 100644 index 241299e4d3..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {2156ed65-ec81-81ba-7e0d-b02f00e684a8} - - - {e01e7c44-eb13-7fac-fb79-11a6458bd0bb} - - - {9390883d-ad68-eb46-2690-ce5efce06868} - - - {a45cf872-f66c-1413-323f-8381685dc784} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj deleted file mode 100644 index f159dfbd4d..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {5753B14F-0C69-2E56-6264-5541B2DCDF67} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_proxy_test - static - Debug - static - Debug - - - h2_proxy_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj.filters deleted file mode 100644 index 3b9a6f9ad1..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {8192c8d2-a6bd-7646-1534-f9741ae17e73} - - - {1350a9bc-c388-836b-9274-ed77839572f6} - - - {84acf47f-efdb-1c54-2355-cf4248897990} - - - {42ce710b-3b43-a638-9736-e85155e52880} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj deleted file mode 100644 index 7159d07575..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {962380E0-1C06-8917-8F7F-1A02E0E93BE7} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - h2_sockpair+trace_nosec_test - static - Debug - - - h2_sockpair+trace_nosec_test - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj.filters deleted file mode 100644 index f17a26b8cb..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {6d58c14e-3f26-3100-9c99-d3c5505be59b} - - - {ffbd6f1b-f09d-f472-86bb-8fe08de1ed99} - - - {4a8803f6-4eac-9461-4ba4-36bab3c9163d} - - - {e4bf944c-df69-8146-d1a9-2f9a5223b453} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj deleted file mode 100644 index 134913df46..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {82878169-5A89-FD1E-31A6-E9F07BB92418} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_sockpair+trace_test - static - Debug - static - Debug - - - h2_sockpair+trace_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj.filters deleted file mode 100644 index e2459f98dc..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {76db4c7d-1380-dbd7-af69-a5066c212c17} - - - {aa0b004b-815e-00f7-4707-f56ffdb7915f} - - - {b2e8b92b-e1c9-5b19-82db-852008f68200} - - - {70742a7b-7430-047f-04d8-45604847c8ab} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj deleted file mode 100644 index 6d2162e172..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {485E6713-487D-F274-BDE7-5D29300C93FE} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - h2_sockpair_1byte_nosec_test - static - Debug - - - h2_sockpair_1byte_nosec_test - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj.filters deleted file mode 100644 index 44eabba52d..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {cdf621b0-2a91-c807-98a0-4793abc69eb0} - - - {e38e342a-dc51-ea87-e158-85fc18aac155} - - - {88363ba5-e50a-56bc-8835-5a28b97ae853} - - - {dbb42ae0-79d8-c1cd-4d2d-377cd4acb165} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj deleted file mode 100644 index 67c548629d..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {03A65361-E139-5344-1868-8E8FC269C6E6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_sockpair_1byte_test - static - Debug - static - Debug - - - h2_sockpair_1byte_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj.filters deleted file mode 100644 index e5d0b7af7f..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {7891f629-6021-0353-3080-a164f1541a60} - - - {909720b4-6980-83ac-c78e-4cd7ca4bd1b0} - - - {2a71014a-0dc5-f7f6-d3d8-d0bf2a715d1a} - - - {5a2c9f6a-419d-f0cb-3613-19dc49c3d59a} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj deleted file mode 100644 index d33b8500d3..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B3F26242-A43D-4F77-A84C-0F478741A061} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - h2_sockpair_nosec_test - static - Debug - - - h2_sockpair_nosec_test - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj.filters deleted file mode 100644 index 91b6ed540d..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {f20f0d83-536e-bb20-7f34-452d331c4c38} - - - {85b8511d-6fef-ba7c-331d-03b6a4f32ebb} - - - {08278b26-00dd-aabe-cffd-4fd130a07558} - - - {3a9f1bed-e220-377c-0ed6-e5b71b8a4d62} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj deleted file mode 100644 index 515ea021ea..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {67458AF8-A122-7740-F195-C2E74A106FAB} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_sockpair_test - static - Debug - static - Debug - - - h2_sockpair_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj.filters deleted file mode 100644 index 2a562cb2ed..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {29eaba5c-5e76-09e8-545a-c1352a2b73c7} - - - {30306ec6-8a4a-1c0d-c949-c3fe506ea880} - - - {9abd04c0-e23e-947f-c4c6-63dea1b79a3e} - - - {e044d621-6ea6-6082-e349-da1e556b027b} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj deleted file mode 100644 index d64c317810..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_ssl_cert_test - static - Debug - static - Debug - - - h2_ssl_cert_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj.filters deleted file mode 100644 index 532b0ae2b3..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {2ad9c3be-3600-2475-3705-8927bd57651b} - - - {5d5ee434-b892-585d-97ca-ae595eecbd0b} - - - {903c738d-3c85-534d-d26e-01138f2e96c6} - - - {f5bca83d-8278-22b4-7999-c50cea11b90b} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj deleted file mode 100644 index c3463b9d61..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A9092608-E45E-AC96-6533-A6E7DD98211D} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_ssl_proxy_test - static - Debug - static - Debug - - - h2_ssl_proxy_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj.filters deleted file mode 100644 index c10de8ecec..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {c6726dd2-6234-ad1f-739d-fa39c26f0595} - - - {2014cd8b-9461-0ae8-e1d7-f0baf809648c} - - - {d7a5e79c-da5c-d9ff-76f5-090582ed84bb} - - - {83bbc9a3-02f1-9f59-0ba9-4dc5c0f281e3} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj deleted file mode 100644 index 217e4153c9..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {EA78D290-4098-FF04-C647-013F6B81E4E7} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_ssl_test - static - Debug - static - Debug - - - h2_ssl_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj.filters deleted file mode 100644 index 6dd29f2f62..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {2eefe8d8-1080-78c1-cd47-0657fac46b9d} - - - {bda7bd01-d02f-5216-d84f-6b9406ccc790} - - - {a87bf48a-1bc2-edd1-69f7-18b39abfdda5} - - - {3d6e2676-dbd6-6738-da45-ba037bc593dd} - - - - diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj deleted file mode 100644 index 4fb8f8f4a1..0000000000 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj +++ /dev/null @@ -1,274 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - end2end_nosec_tests - - - end2end_nosec_tests - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters deleted file mode 100644 index ff82a4dd43..0000000000 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters +++ /dev/null @@ -1,173 +0,0 @@ - - - - - test\core\end2end - - - test\core\end2end - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - - - test\core\end2end\tests - - - test\core\end2end - - - - - - {95f38e16-d400-0c90-0b5f-7670d392e71f} - - - {d58c2741-0940-80bc-ac98-9fe98ce69c36} - - - {f4baa425-3c27-3025-ecbc-a83c877ac226} - - - {a828bc7b-f20c-0caa-e8ef-ca62e0bed371} - - - - diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj deleted file mode 100644 index 0b7d7c2e75..0000000000 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ /dev/null @@ -1,276 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - end2end_tests - - - end2end_tests - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters deleted file mode 100644 index e641930e64..0000000000 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters +++ /dev/null @@ -1,176 +0,0 @@ - - - - - test\core\end2end - - - test\core\end2end - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - test\core\end2end\tests - - - - - test\core\end2end\tests - - - test\core\end2end - - - - - - {a8b0b6cf-6810-ce42-aabe-361c2a8fad86} - - - {8f9b8c49-9e5d-f954-5bae-c5cfc1e4494d} - - - {4b2ad304-b30c-df58-bbcd-352f6bee54bd} - - - {594b8114-e3bd-e69b-3213-cc80cb3e8662} - - - - diff --git a/vsprojects/vcxproj/test/end2end_test/end2end_test.vcxproj b/vsprojects/vcxproj/test/end2end_test/end2end_test.vcxproj deleted file mode 100644 index c04742ffee..0000000000 --- a/vsprojects/vcxproj/test/end2end_test/end2end_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2F5FDFDB-7C54-22D6-8D17-4BEEEA30B5F4} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - end2end_test - static - Debug - static - Debug - - - end2end_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/end2end_test/end2end_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end_test/end2end_test.vcxproj.filters deleted file mode 100644 index bbe694b4bb..0000000000 --- a/vsprojects/vcxproj/test/end2end_test/end2end_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {1636658c-b2c0-27b7-7a49-294e345ad886} - - - {230e953f-742e-c60f-890a-aaf9dc161375} - - - {47834067-7d32-74b9-1853-97304c9502b3} - - - - diff --git a/vsprojects/vcxproj/test/endpoint_pair_test/endpoint_pair_test.vcxproj b/vsprojects/vcxproj/test/endpoint_pair_test/endpoint_pair_test.vcxproj deleted file mode 100644 index 3c94feb54f..0000000000 --- a/vsprojects/vcxproj/test/endpoint_pair_test/endpoint_pair_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {37166D50-3AAA-1156-19F6-5901DFA55172} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - endpoint_pair_test - static - Debug - static - Debug - - - endpoint_pair_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/endpoint_pair_test/endpoint_pair_test.vcxproj.filters b/vsprojects/vcxproj/test/endpoint_pair_test/endpoint_pair_test.vcxproj.filters deleted file mode 100644 index 0d068f01c2..0000000000 --- a/vsprojects/vcxproj/test/endpoint_pair_test/endpoint_pair_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {3e335698-54ba-74cc-f124-78c4b2d3c6c1} - - - {63050d7a-20c8-37eb-9072-0639a0ddd315} - - - {c718cb0f-3e72-48b0-2d89-79c305302446} - - - - diff --git a/vsprojects/vcxproj/test/filter_end2end_test/filter_end2end_test.vcxproj b/vsprojects/vcxproj/test/filter_end2end_test/filter_end2end_test.vcxproj deleted file mode 100644 index 99c000e4fa..0000000000 --- a/vsprojects/vcxproj/test/filter_end2end_test/filter_end2end_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {1D42975A-18A5-09D0-30B1-2AE6A97FB9DE} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - filter_end2end_test - static - Debug - static - Debug - - - filter_end2end_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/filter_end2end_test/filter_end2end_test.vcxproj.filters b/vsprojects/vcxproj/test/filter_end2end_test/filter_end2end_test.vcxproj.filters deleted file mode 100644 index c68442365c..0000000000 --- a/vsprojects/vcxproj/test/filter_end2end_test/filter_end2end_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {f7581160-220d-1118-f29e-6b37e45671c9} - - - {63784d35-03cc-1a7e-0c95-a9451bc1daf4} - - - {d2a01682-970e-d23d-1eb8-ef020e3a1ca3} - - - - diff --git a/vsprojects/vcxproj/test/fling_client/fling_client.vcxproj b/vsprojects/vcxproj/test/fling_client/fling_client.vcxproj deleted file mode 100644 index 31cac37f66..0000000000 --- a/vsprojects/vcxproj/test/fling_client/fling_client.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0647D598-9611-F659-EA36-DF995C9F736B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - fling_client - static - Debug - static - Debug - - - fling_client - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/fling_client/fling_client.vcxproj.filters b/vsprojects/vcxproj/test/fling_client/fling_client.vcxproj.filters deleted file mode 100644 index 5ada623169..0000000000 --- a/vsprojects/vcxproj/test/fling_client/fling_client.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\fling - - - - - - {c6a5647d-0d60-3a48-8aee-7a120823ab99} - - - {badf4fe9-6c6c-4187-9604-2c7038e5bc93} - - - {5fe6e1c1-c8aa-9b4d-dacf-68e968a17d4a} - - - - diff --git a/vsprojects/vcxproj/test/fling_server/fling_server.vcxproj b/vsprojects/vcxproj/test/fling_server/fling_server.vcxproj deleted file mode 100644 index 99dd3f1ec3..0000000000 --- a/vsprojects/vcxproj/test/fling_server/fling_server.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {5D0E4E74-275C-61D1-0D82-46CD2AA0C0B9} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - fling_server - static - Debug - static - Debug - - - fling_server - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/fling_server/fling_server.vcxproj.filters b/vsprojects/vcxproj/test/fling_server/fling_server.vcxproj.filters deleted file mode 100644 index 59fe61d9ef..0000000000 --- a/vsprojects/vcxproj/test/fling_server/fling_server.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\fling - - - - - - {fed6e0c1-9cd2-e734-9962-b88e9dc7906f} - - - {fc77b94d-3cdb-ca57-6613-efbf762cedcd} - - - {2c937422-bf1f-f3bf-08ac-0a38135c6ab0} - - - - diff --git a/vsprojects/vcxproj/test/generic_end2end_test/generic_end2end_test.vcxproj b/vsprojects/vcxproj/test/generic_end2end_test/generic_end2end_test.vcxproj deleted file mode 100644 index 44b0870958..0000000000 --- a/vsprojects/vcxproj/test/generic_end2end_test/generic_end2end_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {25A711D8-5C17-BD17-B41E-34A5A361C5C8} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - generic_end2end_test - static - Debug - static - Debug - - - generic_end2end_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/generic_end2end_test/generic_end2end_test.vcxproj.filters b/vsprojects/vcxproj/test/generic_end2end_test/generic_end2end_test.vcxproj.filters deleted file mode 100644 index 6cc35080a8..0000000000 --- a/vsprojects/vcxproj/test/generic_end2end_test/generic_end2end_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {40cf9ea2-d0e5-b0e0-b39a-9257768ada00} - - - {47b36a14-0be6-0aa8-cca4-3ede7cbda098} - - - {379aab61-2647-e761-9f06-0f91e16a6635} - - - - diff --git a/vsprojects/vcxproj/test/golden_file_test/golden_file_test.vcxproj b/vsprojects/vcxproj/test/golden_file_test/golden_file_test.vcxproj deleted file mode 100644 index e9802773d8..0000000000 --- a/vsprojects/vcxproj/test/golden_file_test/golden_file_test.vcxproj +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0ECDE365-D634-4E15-099F-40A38E151C65} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - golden_file_test - static - Debug - static - Debug - - - golden_file_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/golden_file_test/golden_file_test.vcxproj.filters b/vsprojects/vcxproj/test/golden_file_test/golden_file_test.vcxproj.filters deleted file mode 100644 index c329e4da5c..0000000000 --- a/vsprojects/vcxproj/test/golden_file_test/golden_file_test.vcxproj.filters +++ /dev/null @@ -1,36 +0,0 @@ - - - - - src\proto\grpc\testing - - - test\cpp\codegen - - - - - - {cd916cf8-bce0-7051-b6d4-e1cd0bf3894c} - - - {a2d414fe-b561-a38e-58a9-40d8bc68a107} - - - {edbc155a-ceb8-62b4-2b73-37228e5fa736} - - - {761a3503-8934-4ee6-8bf1-77ba1385baa7} - - - {4f08cfc5-a59d-7cb4-9ef5-a603b2025936} - - - {af281cac-e23b-109b-8e63-c7cff85c81f4} - - - {e105f656-566f-3d70-fbe5-e03fee8e612d} - - - - diff --git a/vsprojects/vcxproj/test/gpr_avl_test/gpr_avl_test.vcxproj b/vsprojects/vcxproj/test/gpr_avl_test/gpr_avl_test.vcxproj deleted file mode 100644 index e6b0be2600..0000000000 --- a/vsprojects/vcxproj/test/gpr_avl_test/gpr_avl_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {144D8CFF-2737-A18A-DCFD-01603533D63F} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_avl_test - static - Debug - static - Debug - - - gpr_avl_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_avl_test/gpr_avl_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_avl_test/gpr_avl_test.vcxproj.filters deleted file mode 100644 index 974f72de95..0000000000 --- a/vsprojects/vcxproj/test/gpr_avl_test/gpr_avl_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {36d067be-341d-9b6e-8ebc-bc48318fa916} - - - {4f3292f9-bb3f-e90c-324d-120ff96d394a} - - - {d02b711f-14e2-086b-d3a5-48e2d82145ee} - - - - diff --git a/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj b/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj deleted file mode 100644 index 6aa292ef4f..0000000000 --- a/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {889F570D-E046-BD52-9E4C-B4CD13DFE2DB} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_backoff_test - static - Debug - static - Debug - - - gpr_backoff_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj.filters deleted file mode 100644 index eb3c1bbd8c..0000000000 --- a/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {4b7f1d25-d344-0bcb-63d8-2ba959874ea8} - - - {2bd2fba5-8799-2c78-469f-ec3ba6b01da8} - - - {2ef0cfa7-fe3d-2b82-7d0e-f9e293e8f98c} - - - - diff --git a/vsprojects/vcxproj/test/gpr_cmdline_test/gpr_cmdline_test.vcxproj b/vsprojects/vcxproj/test/gpr_cmdline_test/gpr_cmdline_test.vcxproj deleted file mode 100644 index 9df03abed0..0000000000 --- a/vsprojects/vcxproj/test/gpr_cmdline_test/gpr_cmdline_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {10668A5D-65CD-F530-22D0-747B395B4C26} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_cmdline_test - static - Debug - static - Debug - - - gpr_cmdline_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_cmdline_test/gpr_cmdline_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_cmdline_test/gpr_cmdline_test.vcxproj.filters deleted file mode 100644 index e79575045c..0000000000 --- a/vsprojects/vcxproj/test/gpr_cmdline_test/gpr_cmdline_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {a6bdb776-b6ff-c634-9daf-076f66f7b2f6} - - - {77a656e9-f020-6333-b05b-f9b7f54a5778} - - - {ee67476a-5330-86ce-abe2-387e97fac5b9} - - - - diff --git a/vsprojects/vcxproj/test/gpr_cpu_test/gpr_cpu_test.vcxproj b/vsprojects/vcxproj/test/gpr_cpu_test/gpr_cpu_test.vcxproj deleted file mode 100644 index 9ba6745e8c..0000000000 --- a/vsprojects/vcxproj/test/gpr_cpu_test/gpr_cpu_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0CB6DF66-4346-CCD0-C94B-318321C46501} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_cpu_test - static - Debug - static - Debug - - - gpr_cpu_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_cpu_test/gpr_cpu_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_cpu_test/gpr_cpu_test.vcxproj.filters deleted file mode 100644 index 41dbc50900..0000000000 --- a/vsprojects/vcxproj/test/gpr_cpu_test/gpr_cpu_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {ab948329-4fd2-2ba2-6bd8-bb7784394b5c} - - - {677c9f53-b523-7c52-6f04-19e934aae73b} - - - {fa0e1962-4915-ff78-276b-b85c3296d217} - - - - diff --git a/vsprojects/vcxproj/test/gpr_env_test/gpr_env_test.vcxproj b/vsprojects/vcxproj/test/gpr_env_test/gpr_env_test.vcxproj deleted file mode 100644 index 19c6139858..0000000000 --- a/vsprojects/vcxproj/test/gpr_env_test/gpr_env_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {07149650-E8AF-B3D8-9D5B-BC34DC909DB8} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_env_test - static - Debug - static - Debug - - - gpr_env_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_env_test/gpr_env_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_env_test/gpr_env_test.vcxproj.filters deleted file mode 100644 index e5d56056e2..0000000000 --- a/vsprojects/vcxproj/test/gpr_env_test/gpr_env_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {7c282be9-72e1-5cb7-dc83-52751adc3b24} - - - {5f2f310f-c734-c634-35ce-facf4f45976b} - - - {3a453055-1639-4ee0-40b6-06d30e190711} - - - - diff --git a/vsprojects/vcxproj/test/gpr_histogram_test/gpr_histogram_test.vcxproj b/vsprojects/vcxproj/test/gpr_histogram_test/gpr_histogram_test.vcxproj deleted file mode 100644 index fa65c1532f..0000000000 --- a/vsprojects/vcxproj/test/gpr_histogram_test/gpr_histogram_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {EEBDE4C3-0130-5BD1-E85F-527B3E68FE11} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_histogram_test - static - Debug - static - Debug - - - gpr_histogram_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_histogram_test/gpr_histogram_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_histogram_test/gpr_histogram_test.vcxproj.filters deleted file mode 100644 index 33590c1eee..0000000000 --- a/vsprojects/vcxproj/test/gpr_histogram_test/gpr_histogram_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {dcd31336-b257-b524-b88a-0be80c6e84cb} - - - {77631723-c473-faef-272a-8aa4be4cbbb0} - - - {6214c935-effb-c8ce-b3e8-25ae70712b35} - - - - diff --git a/vsprojects/vcxproj/test/gpr_host_port_test/gpr_host_port_test.vcxproj b/vsprojects/vcxproj/test/gpr_host_port_test/gpr_host_port_test.vcxproj deleted file mode 100644 index 6d4194b2a5..0000000000 --- a/vsprojects/vcxproj/test/gpr_host_port_test/gpr_host_port_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {64728265-92F9-103E-6720-8935385458DF} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_host_port_test - static - Debug - static - Debug - - - gpr_host_port_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_host_port_test/gpr_host_port_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_host_port_test/gpr_host_port_test.vcxproj.filters deleted file mode 100644 index f06b6bfef5..0000000000 --- a/vsprojects/vcxproj/test/gpr_host_port_test/gpr_host_port_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {73a39b34-6aab-8ce6-e0b7-370f0dd2d9cd} - - - {4488d0a9-bf6d-2287-8ab0-63176021f3df} - - - {296fb871-92bb-e415-7102-e45921e558ae} - - - - diff --git a/vsprojects/vcxproj/test/gpr_log_test/gpr_log_test.vcxproj b/vsprojects/vcxproj/test/gpr_log_test/gpr_log_test.vcxproj deleted file mode 100644 index 651a3d3326..0000000000 --- a/vsprojects/vcxproj/test/gpr_log_test/gpr_log_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {38797EE3-62CC-3CBF-18D5-009ED6DD0BEC} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_log_test - static - Debug - static - Debug - - - gpr_log_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_log_test/gpr_log_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_log_test/gpr_log_test.vcxproj.filters deleted file mode 100644 index c4a79f4e87..0000000000 --- a/vsprojects/vcxproj/test/gpr_log_test/gpr_log_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {f928bdfc-37ee-2f45-3383-78b562fe3ba1} - - - {5a9cbed6-7653-4a0e-c2a9-1c018098877b} - - - {23581249-42ca-8d5c-fac9-8cbf47b7288c} - - - - diff --git a/vsprojects/vcxproj/test/gpr_mpscq_test/gpr_mpscq_test.vcxproj b/vsprojects/vcxproj/test/gpr_mpscq_test/gpr_mpscq_test.vcxproj deleted file mode 100644 index 01342868b0..0000000000 --- a/vsprojects/vcxproj/test/gpr_mpscq_test/gpr_mpscq_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B3D7760B-8BEA-2EF6-F1D4-9F9020E166D6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_mpscq_test - static - Debug - static - Debug - - - gpr_mpscq_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_mpscq_test/gpr_mpscq_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_mpscq_test/gpr_mpscq_test.vcxproj.filters deleted file mode 100644 index 9cceb9f3e2..0000000000 --- a/vsprojects/vcxproj/test/gpr_mpscq_test/gpr_mpscq_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {e82fb80c-10ba-2959-55d6-8653715f1e4f} - - - {32120233-25e6-f3e4-f828-c6408d47ec04} - - - {aa3a22bc-229a-c00a-dd4a-924c818c6a49} - - - - diff --git a/vsprojects/vcxproj/test/gpr_stack_lockfree_test/gpr_stack_lockfree_test.vcxproj b/vsprojects/vcxproj/test/gpr_stack_lockfree_test/gpr_stack_lockfree_test.vcxproj deleted file mode 100644 index 218cff8ba9..0000000000 --- a/vsprojects/vcxproj/test/gpr_stack_lockfree_test/gpr_stack_lockfree_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {AD06B5CD-8D5C-A365-C46B-3CF32237A4F7} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_stack_lockfree_test - static - Debug - static - Debug - - - gpr_stack_lockfree_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_stack_lockfree_test/gpr_stack_lockfree_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_stack_lockfree_test/gpr_stack_lockfree_test.vcxproj.filters deleted file mode 100644 index b222ab4128..0000000000 --- a/vsprojects/vcxproj/test/gpr_stack_lockfree_test/gpr_stack_lockfree_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {de41d2bf-c9ce-7f55-6da3-8d3798fd8fe2} - - - {4867ad9b-2b88-de6a-a1df-7a733d389df9} - - - {fca98aa0-f0c0-9254-ab22-a2792b4b94f0} - - - - diff --git a/vsprojects/vcxproj/test/gpr_string_test/gpr_string_test.vcxproj b/vsprojects/vcxproj/test/gpr_string_test/gpr_string_test.vcxproj deleted file mode 100644 index 56adb59c42..0000000000 --- a/vsprojects/vcxproj/test/gpr_string_test/gpr_string_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B453457D-8FBC-9C9F-A55E-C06FCE13B1F2} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_string_test - static - Debug - static - Debug - - - gpr_string_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_string_test/gpr_string_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_string_test/gpr_string_test.vcxproj.filters deleted file mode 100644 index b059989196..0000000000 --- a/vsprojects/vcxproj/test/gpr_string_test/gpr_string_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {a94d4d8a-5796-c0c4-e3a4-e8e3ff771eeb} - - - {96a2c0e8-4b11-dcf6-28da-014b5c9e970e} - - - {44ead16b-76d1-2925-8c33-a7a16231eee8} - - - - diff --git a/vsprojects/vcxproj/test/gpr_sync_test/gpr_sync_test.vcxproj b/vsprojects/vcxproj/test/gpr_sync_test/gpr_sync_test.vcxproj deleted file mode 100644 index 0b48230c17..0000000000 --- a/vsprojects/vcxproj/test/gpr_sync_test/gpr_sync_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {98B2F932-5D6D-9FF0-516F-43FD7E0E4F1A} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_sync_test - static - Debug - static - Debug - - - gpr_sync_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_sync_test/gpr_sync_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_sync_test/gpr_sync_test.vcxproj.filters deleted file mode 100644 index d28d0cbbf2..0000000000 --- a/vsprojects/vcxproj/test/gpr_sync_test/gpr_sync_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {c03559e2-7eaa-1c66-b9b1-48925b426d68} - - - {ce30b047-25b4-53c9-ab68-1248cc509a3b} - - - {27ee2962-193c-3ef6-6fc7-057da8e526fb} - - - - diff --git a/vsprojects/vcxproj/test/gpr_thd_test/gpr_thd_test.vcxproj b/vsprojects/vcxproj/test/gpr_thd_test/gpr_thd_test.vcxproj deleted file mode 100644 index 54483c0a74..0000000000 --- a/vsprojects/vcxproj/test/gpr_thd_test/gpr_thd_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {459B2FAC-5FC8-1F47-8053-66D46EA39A49} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_thd_test - static - Debug - static - Debug - - - gpr_thd_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_thd_test/gpr_thd_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_thd_test/gpr_thd_test.vcxproj.filters deleted file mode 100644 index b9712ed32e..0000000000 --- a/vsprojects/vcxproj/test/gpr_thd_test/gpr_thd_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {fab7798b-99b0-1921-4ee5-676aad06b8ec} - - - {e27475c2-44ed-a5d7-2620-37d8ff00b915} - - - {765a469b-a4a2-8999-cc29-4622eba7655c} - - - - diff --git a/vsprojects/vcxproj/test/gpr_time_test/gpr_time_test.vcxproj b/vsprojects/vcxproj/test/gpr_time_test/gpr_time_test.vcxproj deleted file mode 100644 index f9529bba82..0000000000 --- a/vsprojects/vcxproj/test/gpr_time_test/gpr_time_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9779680E-3218-1528-E922-605871A20C3F} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_time_test - static - Debug - static - Debug - - - gpr_time_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_time_test/gpr_time_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_time_test/gpr_time_test.vcxproj.filters deleted file mode 100644 index 544d36b4e1..0000000000 --- a/vsprojects/vcxproj/test/gpr_time_test/gpr_time_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {abf8aa00-63d9-c8c1-ae22-4c2f74c8362d} - - - {802f9aee-af92-2b7d-22f4-81ce05910407} - - - {fc9ae823-390e-7a7e-ad1d-079c7687d8c3} - - - - diff --git a/vsprojects/vcxproj/test/gpr_tls_test/gpr_tls_test.vcxproj b/vsprojects/vcxproj/test/gpr_tls_test/gpr_tls_test.vcxproj deleted file mode 100644 index 4399132a09..0000000000 --- a/vsprojects/vcxproj/test/gpr_tls_test/gpr_tls_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F5B6D7FF-A762-CBC3-8CDC-83890EAEB2FE} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_tls_test - static - Debug - static - Debug - - - gpr_tls_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_tls_test/gpr_tls_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_tls_test/gpr_tls_test.vcxproj.filters deleted file mode 100644 index 6fe7f2f491..0000000000 --- a/vsprojects/vcxproj/test/gpr_tls_test/gpr_tls_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {517e4631-4f89-3755-6310-5ca3127c981c} - - - {4c3a337b-33fc-a2e8-f3cd-7756320026cf} - - - {4f3ec63f-ada4-c8fc-81a0-820987f92307} - - - - diff --git a/vsprojects/vcxproj/test/gpr_useful_test/gpr_useful_test.vcxproj b/vsprojects/vcxproj/test/gpr_useful_test/gpr_useful_test.vcxproj deleted file mode 100644 index 40866b92a4..0000000000 --- a/vsprojects/vcxproj/test/gpr_useful_test/gpr_useful_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {40B790A8-BB01-9F12-5309-C0BEA97C75BC} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - gpr_useful_test - static - Debug - static - Debug - - - gpr_useful_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/gpr_useful_test/gpr_useful_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_useful_test/gpr_useful_test.vcxproj.filters deleted file mode 100644 index 281c9981cb..0000000000 --- a/vsprojects/vcxproj/test/gpr_useful_test/gpr_useful_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {96c841d2-1630-8480-1be7-9652d536b316} - - - {b0c5f4d6-c60c-4ad6-0b68-5e62b596f6a3} - - - {881cc47d-ea4a-52c6-3a78-29e31be3b9ed} - - - - diff --git a/vsprojects/vcxproj/test/grpc_auth_context_test/grpc_auth_context_test.vcxproj b/vsprojects/vcxproj/test/grpc_auth_context_test/grpc_auth_context_test.vcxproj deleted file mode 100644 index db710601b8..0000000000 --- a/vsprojects/vcxproj/test/grpc_auth_context_test/grpc_auth_context_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C65A4336-92D6-D6A0-EB86-E3AA425222D0} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - grpc_auth_context_test - static - Debug - static - Debug - - - grpc_auth_context_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_auth_context_test/grpc_auth_context_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_auth_context_test/grpc_auth_context_test.vcxproj.filters deleted file mode 100644 index b85fa972ac..0000000000 --- a/vsprojects/vcxproj/test/grpc_auth_context_test/grpc_auth_context_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\security - - - - - - {9991c34e-099b-c489-52a3-0ce9801cf093} - - - {0f675c84-f06f-d4f6-a1df-2814fdc07762} - - - {676a3c19-029f-d25f-2dd4-50a9ffa5596d} - - - - diff --git a/vsprojects/vcxproj/test/grpc_b64_test/grpc_b64_test.vcxproj b/vsprojects/vcxproj/test/grpc_b64_test/grpc_b64_test.vcxproj deleted file mode 100644 index 7e6b4df961..0000000000 --- a/vsprojects/vcxproj/test/grpc_b64_test/grpc_b64_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A19FD81D-DF19-B8A4-4A8A-6967217FEC85} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - grpc_b64_test - static - Debug - static - Debug - - - grpc_b64_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_b64_test/grpc_b64_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_b64_test/grpc_b64_test.vcxproj.filters deleted file mode 100644 index 4335011fe3..0000000000 --- a/vsprojects/vcxproj/test/grpc_b64_test/grpc_b64_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\security - - - - - - {61d5c8e1-ac27-5bd0-d581-aeb585f0157e} - - - {409b4a57-584c-1dc5-db72-1e8d4c462e9d} - - - {0cb2c3ef-ed46-78ae-140c-29f21dc6fdb1} - - - - diff --git a/vsprojects/vcxproj/test/grpc_byte_buffer_reader_test/grpc_byte_buffer_reader_test.vcxproj b/vsprojects/vcxproj/test/grpc_byte_buffer_reader_test/grpc_byte_buffer_reader_test.vcxproj deleted file mode 100644 index 9b74cf1fc9..0000000000 --- a/vsprojects/vcxproj/test/grpc_byte_buffer_reader_test/grpc_byte_buffer_reader_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {82124768-C986-6C10-8BCC-B255B7C84722} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - grpc_byte_buffer_reader_test - static - Debug - static - Debug - - - grpc_byte_buffer_reader_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_byte_buffer_reader_test/grpc_byte_buffer_reader_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_byte_buffer_reader_test/grpc_byte_buffer_reader_test.vcxproj.filters deleted file mode 100644 index 794603e326..0000000000 --- a/vsprojects/vcxproj/test/grpc_byte_buffer_reader_test/grpc_byte_buffer_reader_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {faeaeeba-f702-659a-7cce-5ae166f21579} - - - {4dd47670-70f7-1f76-ebbc-90a02dc2b744} - - - {58b2a0a7-9c5e-19c0-3f8a-da3b9f44a87f} - - - - diff --git a/vsprojects/vcxproj/test/grpc_channel_args_test/grpc_channel_args_test.vcxproj b/vsprojects/vcxproj/test/grpc_channel_args_test/grpc_channel_args_test.vcxproj deleted file mode 100644 index 0203b29cf9..0000000000 --- a/vsprojects/vcxproj/test/grpc_channel_args_test/grpc_channel_args_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {58FB566F-DCD5-3ECE-233E-C1FD13CA2185} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - grpc_channel_args_test - static - Debug - static - Debug - - - grpc_channel_args_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_channel_args_test/grpc_channel_args_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_channel_args_test/grpc_channel_args_test.vcxproj.filters deleted file mode 100644 index 281acce533..0000000000 --- a/vsprojects/vcxproj/test/grpc_channel_args_test/grpc_channel_args_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\channel - - - - - - {09a063e3-757e-d884-4b0b-2f0c114251e8} - - - {94ad653a-10f6-15d1-bc1a-2f2e700716d8} - - - {8861940e-bb7d-8d1f-d155-17bb00b3aea7} - - - - diff --git a/vsprojects/vcxproj/test/grpc_channel_stack_test/grpc_channel_stack_test.vcxproj b/vsprojects/vcxproj/test/grpc_channel_stack_test/grpc_channel_stack_test.vcxproj deleted file mode 100644 index 905f9996e2..0000000000 --- a/vsprojects/vcxproj/test/grpc_channel_stack_test/grpc_channel_stack_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E3CEAFE1-8CE9-61F6-A720-E26662246B1F} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - grpc_channel_stack_test - static - Debug - static - Debug - - - grpc_channel_stack_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_channel_stack_test/grpc_channel_stack_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_channel_stack_test/grpc_channel_stack_test.vcxproj.filters deleted file mode 100644 index 5c45047cce..0000000000 --- a/vsprojects/vcxproj/test/grpc_channel_stack_test/grpc_channel_stack_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\channel - - - - - - {95046036-367f-833a-067d-ffe87cae51bd} - - - {daaf2a9e-06ae-cdaa-1c1a-fe6af0d1e0ca} - - - {b6b9d001-7f43-32ee-5b88-5e90fda5545b} - - - - diff --git a/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj b/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj deleted file mode 100644 index fbb1bc8ab2..0000000000 --- a/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {122E903D-29D4-915A-E37E-F434D049E56C} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - grpc_cli - static - Debug - static - Debug - - - grpc_cli - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {86E35862-43E8-F59E-F906-AFE0348AD3D2} - - - {7B95AF96-915A-7132-AE45-9FA37769FACE} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj.filters b/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj.filters deleted file mode 100644 index 0f66f2f746..0000000000 --- a/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\util - - - - - - {0702b47f-1f2d-841d-3a96-552cc6ca1d58} - - - {72c914cd-a2d9-d45f-d408-f56aeb791343} - - - {14e6a45e-5296-22c7-67fc-54dc20a5beea} - - - - diff --git a/vsprojects/vcxproj/test/grpc_completion_queue_test/grpc_completion_queue_test.vcxproj b/vsprojects/vcxproj/test/grpc_completion_queue_test/grpc_completion_queue_test.vcxproj deleted file mode 100644 index 5830638c54..0000000000 --- a/vsprojects/vcxproj/test/grpc_completion_queue_test/grpc_completion_queue_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {16CDF507-EB91-D76C-F0A7-A914ABFD8C17} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - grpc_completion_queue_test - static - Debug - static - Debug - - - grpc_completion_queue_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_completion_queue_test/grpc_completion_queue_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_completion_queue_test/grpc_completion_queue_test.vcxproj.filters deleted file mode 100644 index bad17c82d8..0000000000 --- a/vsprojects/vcxproj/test/grpc_completion_queue_test/grpc_completion_queue_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {6af5431f-5c86-132e-4c48-41706d1f472d} - - - {2ab1a096-982b-6d66-6464-7adafe88f4ad} - - - {a710109a-3e58-d971-9c03-5243614dcd9e} - - - - diff --git a/vsprojects/vcxproj/test/grpc_credentials_test/grpc_credentials_test.vcxproj b/vsprojects/vcxproj/test/grpc_credentials_test/grpc_credentials_test.vcxproj deleted file mode 100644 index cbd602e216..0000000000 --- a/vsprojects/vcxproj/test/grpc_credentials_test/grpc_credentials_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8305CC95-25CD-E15F-EA1A-11626FCF5AF9} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - grpc_credentials_test - static - Debug - static - Debug - - - grpc_credentials_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_credentials_test/grpc_credentials_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_credentials_test/grpc_credentials_test.vcxproj.filters deleted file mode 100644 index e7a426b5af..0000000000 --- a/vsprojects/vcxproj/test/grpc_credentials_test/grpc_credentials_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\security - - - - - - {feae366f-635c-cab8-cfb6-3500c0b249a3} - - - {ef56e036-1539-2fc1-6295-afa839a0dc22} - - - {073b3e31-5a12-68ee-764b-5daa31755a9f} - - - - diff --git a/vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj b/vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj deleted file mode 100644 index 52bb269766..0000000000 --- a/vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {43722E98-54EC-5058-3DAC-327F45964971} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - grpc_fetch_oauth2 - static - Debug - static - Debug - - - grpc_fetch_oauth2 - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj.filters b/vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj.filters deleted file mode 100644 index c73c36fea1..0000000000 --- a/vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\security - - - - - - {7a6d661a-6429-3bc7-8592-6da59e30f55f} - - - {ffbd3c4f-f5f0-4c8e-f1b9-8fa4f644a708} - - - {664ec573-181e-edf8-d423-55c36978bbd8} - - - - diff --git a/vsprojects/vcxproj/test/grpc_invalid_channel_args_test/grpc_invalid_channel_args_test.vcxproj b/vsprojects/vcxproj/test/grpc_invalid_channel_args_test/grpc_invalid_channel_args_test.vcxproj deleted file mode 100644 index 9f85ec8fe4..0000000000 --- a/vsprojects/vcxproj/test/grpc_invalid_channel_args_test/grpc_invalid_channel_args_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B50FD4F7-5628-9BEC-81B9-EB79A0A45577} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - grpc_invalid_channel_args_test - static - Debug - static - Debug - - - grpc_invalid_channel_args_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_invalid_channel_args_test/grpc_invalid_channel_args_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_invalid_channel_args_test/grpc_invalid_channel_args_test.vcxproj.filters deleted file mode 100644 index 56564a8df5..0000000000 --- a/vsprojects/vcxproj/test/grpc_invalid_channel_args_test/grpc_invalid_channel_args_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {51fb94fa-29d8-847b-78db-6a04cb580f2e} - - - {cf504c8e-6611-99d7-4b60-f536025e3b74} - - - {207782ea-140b-3e62-a085-769fd976d352} - - - - diff --git a/vsprojects/vcxproj/test/grpc_jwt_verifier_test/grpc_jwt_verifier_test.vcxproj b/vsprojects/vcxproj/test/grpc_jwt_verifier_test/grpc_jwt_verifier_test.vcxproj deleted file mode 100644 index 0928586687..0000000000 --- a/vsprojects/vcxproj/test/grpc_jwt_verifier_test/grpc_jwt_verifier_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {60B5E7EE-7D9E-1F27-BD9F-2F5D44BC6751} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - grpc_jwt_verifier_test - static - Debug - static - Debug - - - grpc_jwt_verifier_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_jwt_verifier_test/grpc_jwt_verifier_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_jwt_verifier_test/grpc_jwt_verifier_test.vcxproj.filters deleted file mode 100644 index fa1682974e..0000000000 --- a/vsprojects/vcxproj/test/grpc_jwt_verifier_test/grpc_jwt_verifier_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\security - - - - - - {d0c333de-8373-5199-b48e-2f12a751bb02} - - - {bc5be72c-dd99-8911-e33c-cdd6074c3035} - - - {33ecc950-7f0d-758b-4bbd-28b96e5e547d} - - - - diff --git a/vsprojects/vcxproj/test/grpc_security_connector_test/grpc_security_connector_test.vcxproj b/vsprojects/vcxproj/test/grpc_security_connector_test/grpc_security_connector_test.vcxproj deleted file mode 100644 index a5849d1abc..0000000000 --- a/vsprojects/vcxproj/test/grpc_security_connector_test/grpc_security_connector_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {74DCFC52-3C79-66BC-3DB0-B6A90D81BB68} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - grpc_security_connector_test - static - Debug - static - Debug - - - grpc_security_connector_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_security_connector_test/grpc_security_connector_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_security_connector_test/grpc_security_connector_test.vcxproj.filters deleted file mode 100644 index b4daa1e544..0000000000 --- a/vsprojects/vcxproj/test/grpc_security_connector_test/grpc_security_connector_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\security - - - - - - {62dcf596-b5f1-043f-c645-8bed2bf94b01} - - - {f9ce8fb8-9b9b-7873-1ebc-1f5fa9753a92} - - - {953200eb-f0f9-49fc-7fe7-7cf941e921b2} - - - - diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj deleted file mode 100644 index 1e3cc3ca04..0000000000 --- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F00D82D4-E988-6D2F-F0B9-9E82BCC2A2B2} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - grpc_tool_test - static - Debug - static - Debug - - - grpc_tool_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {86E35862-43E8-F59E-F906-AFE0348AD3D2} - - - {7B95AF96-915A-7132-AE45-9FA37769FACE} - - - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB} - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters deleted file mode 100644 index 1c308c5881..0000000000 --- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters +++ /dev/null @@ -1,206 +0,0 @@ - - - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - test\cpp\util - - - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc++\impl\codegen - - - - - - {89fed779-17c5-23da-c8a2-9e868ff34480} - - - {96e4a1a8-0b91-1a6d-ae4d-ddf33abb93c0} - - - {1d9dcc6f-7c1b-cdc3-4c35-73d5968dfd92} - - - {5eca7690-973a-c8ed-84d6-5325f8de43ac} - - - {5789073e-5b84-0ec9-af06-47866647874d} - - - {d3f3293f-204f-7771-fcdf-de673f6b06b6} - - - {7e90f37b-f9cc-0725-b2c1-12aa7d4809ba} - - - {7e4b71ef-8125-6446-bfc1-9bc90beed59c} - - - {169774bd-5c6c-6827-66a4-326b4aef44d6} - - - {1b609b37-ef2a-e5eb-e1ba-ad9e79c77438} - - - {cd1e35d8-8a61-62fe-6ce1-c8936872d1ef} - - - {f7ee4df5-1f47-1e7f-c91e-350382c1b729} - - - {f2166b83-6b0b-d53b-b58b-627bd9efcad2} - - - {bbe36cbc-7fbe-2817-0bd0-d03726f323e6} - - - {e106cd7b-cfa0-0645-f1a9-2acedc23afe7} - - - - diff --git a/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj b/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj deleted file mode 100644 index 91b11a1f0f..0000000000 --- a/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {990AF023-17D7-8DBF-EB6E-14C7C016C77E} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - grpclb_api_test - static - Debug - static - Debug - - - grpclb_api_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj.filters b/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj.filters deleted file mode 100644 index 50f0a3eac2..0000000000 --- a/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj.filters +++ /dev/null @@ -1,39 +0,0 @@ - - - - - src\proto\grpc\lb\v1 - - - test\cpp\grpclb - - - - - - {a31d21fb-c6ab-75ce-43dc-7d6f506765e6} - - - {10d49c90-8503-9b10-6678-eed983bc25d9} - - - {8b6be783-e071-44cc-2096-f1c476012556} - - - {2981699e-c196-c599-bc17-c177770f89ee} - - - {6cce8ddf-d9a9-1d71-0810-d1e6f8685d76} - - - {64736e1d-eb77-664f-34ab-6cf41263d3d8} - - - {c86e9cb1-bed4-3697-40f2-9ecff6297fa5} - - - {6b5ba83a-6cf2-5a7b-0ab8-62de31882705} - - - - diff --git a/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj deleted file mode 100644 index 91b9a6eacc..0000000000 --- a/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - grpclb_test - static - Debug - static - Debug - - - grpclb_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - - - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters deleted file mode 100644 index 5493df2e7b..0000000000 --- a/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters +++ /dev/null @@ -1,39 +0,0 @@ - - - - - src\proto\grpc\lb\v1 - - - test\cpp\grpclb - - - - - - {082bbcbc-bbd8-db7d-afe9-fa0fec76863d} - - - {7c61995a-80c2-ef3d-0a4b-baf2221c12f8} - - - {fc2920d4-902c-fdf0-d4b8-6b22e1361105} - - - {4778352a-559f-b008-e3d2-4ae9181260df} - - - {36a4326b-4f2a-4720-b730-e40fe078fd40} - - - {e0ba55a2-37d9-5029-6f4e-64f097307340} - - - {ad67d6ba-d08b-7879-2929-20f0f01c9918} - - - {4498fa30-2dab-584c-5711-a1055cec30f6} - - - - diff --git a/vsprojects/vcxproj/test/head_of_line_blocking_bad_client_test/head_of_line_blocking_bad_client_test.vcxproj b/vsprojects/vcxproj/test/head_of_line_blocking_bad_client_test/head_of_line_blocking_bad_client_test.vcxproj deleted file mode 100644 index fb10f95574..0000000000 --- a/vsprojects/vcxproj/test/head_of_line_blocking_bad_client_test/head_of_line_blocking_bad_client_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {23DF0572-DBF1-08DA-8EAD-8508354C90A4} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - head_of_line_blocking_bad_client_test - static - Debug - static - Debug - - - head_of_line_blocking_bad_client_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {BA67B418-B699-E41A-9CC4-0279C49481A5} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/head_of_line_blocking_bad_client_test/head_of_line_blocking_bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/head_of_line_blocking_bad_client_test/head_of_line_blocking_bad_client_test.vcxproj.filters deleted file mode 100644 index c3609f0de4..0000000000 --- a/vsprojects/vcxproj/test/head_of_line_blocking_bad_client_test/head_of_line_blocking_bad_client_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\bad_client\tests - - - - - - {c7d7f2b5-9afd-5668-b11f-ceb3a3503569} - - - {3175d310-96bd-0c78-72e3-b5985873fa82} - - - {d7e592e2-acda-4572-59b7-20845fb05bd5} - - - {1fa3207b-dc88-d316-7c13-9ac70ddc850e} - - - - diff --git a/vsprojects/vcxproj/test/headers_bad_client_test/headers_bad_client_test.vcxproj b/vsprojects/vcxproj/test/headers_bad_client_test/headers_bad_client_test.vcxproj deleted file mode 100644 index cc73799a49..0000000000 --- a/vsprojects/vcxproj/test/headers_bad_client_test/headers_bad_client_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {7819A11E-607E-F0C0-FC47-C704CF7D818C} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - headers_bad_client_test - static - Debug - static - Debug - - - headers_bad_client_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {BA67B418-B699-E41A-9CC4-0279C49481A5} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/headers_bad_client_test/headers_bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/headers_bad_client_test/headers_bad_client_test.vcxproj.filters deleted file mode 100644 index ca33bc0352..0000000000 --- a/vsprojects/vcxproj/test/headers_bad_client_test/headers_bad_client_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\bad_client\tests - - - - - - {bdc6ff03-9ac0-5d30-d9ed-40818f6564e6} - - - {d3e7fdf7-05cb-3f0a-21fb-693d2778fc8c} - - - {127cb39a-52f9-f426-43ce-05c25664b685} - - - {57a2c0dc-4757-15ea-5ae5-500deffa46fd} - - - - diff --git a/vsprojects/vcxproj/test/hpack_parser_test/hpack_parser_test.vcxproj b/vsprojects/vcxproj/test/hpack_parser_test/hpack_parser_test.vcxproj deleted file mode 100644 index 380d465baa..0000000000 --- a/vsprojects/vcxproj/test/hpack_parser_test/hpack_parser_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {4CAEC7C3-5354-D474-FB3D-ABED6AD2E1DA} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - hpack_parser_test - static - Debug - static - Debug - - - hpack_parser_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/hpack_parser_test/hpack_parser_test.vcxproj.filters b/vsprojects/vcxproj/test/hpack_parser_test/hpack_parser_test.vcxproj.filters deleted file mode 100644 index 7e5d464465..0000000000 --- a/vsprojects/vcxproj/test/hpack_parser_test/hpack_parser_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\transport\chttp2 - - - - - - {90cedac0-92ed-c0a9-0b69-864412659dad} - - - {95449508-1539-8450-0bd8-72c446e4a98c} - - - {71e60448-0dd6-7a9e-4000-e91d46181eaa} - - - {83631117-085d-9e83-6d43-38fb94e16c2b} - - - - diff --git a/vsprojects/vcxproj/test/hpack_table_test/hpack_table_test.vcxproj b/vsprojects/vcxproj/test/hpack_table_test/hpack_table_test.vcxproj deleted file mode 100644 index f92e33c75e..0000000000 --- a/vsprojects/vcxproj/test/hpack_table_test/hpack_table_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {FF2CEE6D-850F-E22C-53A0-8C5912B14B20} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - hpack_table_test - static - Debug - static - Debug - - - hpack_table_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/hpack_table_test/hpack_table_test.vcxproj.filters b/vsprojects/vcxproj/test/hpack_table_test/hpack_table_test.vcxproj.filters deleted file mode 100644 index 91fbc8f8e4..0000000000 --- a/vsprojects/vcxproj/test/hpack_table_test/hpack_table_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\transport\chttp2 - - - - - - {7b601d0f-154e-a841-25df-416cae559e6b} - - - {dee1fb23-0ab6-9aab-ec8a-1108bc98f7ea} - - - {808b26ce-a477-d2e0-d979-3c62b128abd8} - - - {299b9ee2-0548-b293-30c4-2e5a021d362d} - - - - diff --git a/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj b/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj deleted file mode 100644 index bd5cf1212c..0000000000 --- a/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {49D7E690-BDA1-5236-1ABF-3D81C1559DF7} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - http_parser_test - static - Debug - static - Debug - - - http_parser_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj.filters b/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj.filters deleted file mode 100644 index 4353c3b61f..0000000000 --- a/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\http - - - - - - {1d07f09d-a0ec-d684-3589-bff02afbe830} - - - {eedab59d-9f19-9172-cf0e-83a839217afc} - - - {1fcac48f-3718-00ea-6c0c-aafa1a4de528} - - - - diff --git a/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj b/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj deleted file mode 100644 index 5515349b9b..0000000000 --- a/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - httpcli_format_request_test - static - Debug - static - Debug - - - httpcli_format_request_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj.filters b/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj.filters deleted file mode 100644 index 6f941f4361..0000000000 --- a/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\http - - - - - - {650cb665-1351-e3e5-e319-dd700356a83e} - - - {f033cf49-b830-5698-3989-6ec75817333b} - - - {51615bc9-b61d-8d7d-9abb-5409276c04ec} - - - - diff --git a/vsprojects/vcxproj/test/hybrid_end2end_test/hybrid_end2end_test.vcxproj b/vsprojects/vcxproj/test/hybrid_end2end_test/hybrid_end2end_test.vcxproj deleted file mode 100644 index 7bdc6c6674..0000000000 --- a/vsprojects/vcxproj/test/hybrid_end2end_test/hybrid_end2end_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2DBA9954-A78A-6F68-5669-0370C6D6080C} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - hybrid_end2end_test - static - Debug - static - Debug - - - hybrid_end2end_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/hybrid_end2end_test/hybrid_end2end_test.vcxproj.filters b/vsprojects/vcxproj/test/hybrid_end2end_test/hybrid_end2end_test.vcxproj.filters deleted file mode 100644 index ebb9753af1..0000000000 --- a/vsprojects/vcxproj/test/hybrid_end2end_test/hybrid_end2end_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {034a7201-59db-54c2-0af5-fd686ce948b6} - - - {2bb7ef60-02e9-bb7c-6a37-4d8e2d8870ec} - - - {d1b13ade-4b26-87da-a8a8-4c9766121e60} - - - - diff --git a/vsprojects/vcxproj/test/init_test/init_test.vcxproj b/vsprojects/vcxproj/test/init_test/init_test.vcxproj deleted file mode 100644 index e4f0de7de8..0000000000 --- a/vsprojects/vcxproj/test/init_test/init_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {117CA7AD-C42B-9217-6C95-42A801777BC5} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - init_test - static - Debug - static - Debug - - - init_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/init_test/init_test.vcxproj.filters b/vsprojects/vcxproj/test/init_test/init_test.vcxproj.filters deleted file mode 100644 index 5f65e028f6..0000000000 --- a/vsprojects/vcxproj/test/init_test/init_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {a29deb69-37b5-31c0-c4a2-da409b5fe7ac} - - - {cecabaca-db86-b86c-3ad7-ad6fc6958f15} - - - {93a3608f-710d-f929-fa89-6f762d06cb4c} - - - - diff --git a/vsprojects/vcxproj/test/initial_settings_frame_bad_client_test/initial_settings_frame_bad_client_test.vcxproj b/vsprojects/vcxproj/test/initial_settings_frame_bad_client_test/initial_settings_frame_bad_client_test.vcxproj deleted file mode 100644 index 084132e049..0000000000 --- a/vsprojects/vcxproj/test/initial_settings_frame_bad_client_test/initial_settings_frame_bad_client_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6756895E-05BF-8CC7-58F2-868DF0C0300C} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - initial_settings_frame_bad_client_test - static - Debug - static - Debug - - - initial_settings_frame_bad_client_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {BA67B418-B699-E41A-9CC4-0279C49481A5} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/initial_settings_frame_bad_client_test/initial_settings_frame_bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/initial_settings_frame_bad_client_test/initial_settings_frame_bad_client_test.vcxproj.filters deleted file mode 100644 index b956f0d4e8..0000000000 --- a/vsprojects/vcxproj/test/initial_settings_frame_bad_client_test/initial_settings_frame_bad_client_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\bad_client\tests - - - - - - {f8cdf4d1-4502-6d3d-4f1a-b5fc495eda17} - - - {4230b039-8a0a-8e2f-5854-1c1e777590c4} - - - {108f0745-766e-41c9-e35c-743c28d6c792} - - - {5391a36c-de6f-281b-84c2-099b9028f428} - - - - diff --git a/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj b/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj deleted file mode 100644 index 11d89a01c1..0000000000 --- a/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {28AE726B-1BFB-202B-48D2-41AF9D09B9EA} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - internal_api_canary_iomgr_test - static - Debug - static - Debug - - - internal_api_canary_iomgr_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj.filters b/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj.filters deleted file mode 100644 index f1ee82d1f4..0000000000 --- a/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\internal_api_canaries - - - - - - {881986d1-d1fe-b377-cf26-b3377af95009} - - - {4f9a544e-5680-18ee-30d7-38179bf82cee} - - - {6ab29f78-ec9d-d63a-8e8f-0d7552b3edd4} - - - - diff --git a/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj b/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj deleted file mode 100644 index 59092dc2b3..0000000000 --- a/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D53575C6-713C-E6E3-FD74-E65F20916498} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - internal_api_canary_support_test - static - Debug - static - Debug - - - internal_api_canary_support_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj.filters b/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj.filters deleted file mode 100644 index f7f4e3200e..0000000000 --- a/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\internal_api_canaries - - - - - - {a6c31cba-af9d-78ea-8980-8b77c9fc4485} - - - {d84283b8-4529-6c09-18bf-20a69f14f7ab} - - - {ea379f93-9285-7180-0d69-24a56da2b201} - - - - diff --git a/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj b/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj deleted file mode 100644 index 110f7e3b04..0000000000 --- a/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {ED24E700-964E-B426-6A6A-1944E2EF7BCB} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - internal_api_canary_transport_test - static - Debug - static - Debug - - - internal_api_canary_transport_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj.filters b/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj.filters deleted file mode 100644 index 1e0b4c5557..0000000000 --- a/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\internal_api_canaries - - - - - - {38e59e26-aad9-60fd-a1a7-c8fd9b606e2f} - - - {79aad60f-59b8-09e2-2cad-5b5e083ac008} - - - {e4f0214e-e3ec-b5b8-c00b-2932b5ec2422} - - - - diff --git a/vsprojects/vcxproj/test/invalid_call_argument_test/invalid_call_argument_test.vcxproj b/vsprojects/vcxproj/test/invalid_call_argument_test/invalid_call_argument_test.vcxproj deleted file mode 100644 index 84472eff12..0000000000 --- a/vsprojects/vcxproj/test/invalid_call_argument_test/invalid_call_argument_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C32CA8A3-58E6-8EB9-B72F-C295547D36A6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - invalid_call_argument_test - static - Debug - static - Debug - - - invalid_call_argument_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/invalid_call_argument_test/invalid_call_argument_test.vcxproj.filters b/vsprojects/vcxproj/test/invalid_call_argument_test/invalid_call_argument_test.vcxproj.filters deleted file mode 100644 index 38c12533e2..0000000000 --- a/vsprojects/vcxproj/test/invalid_call_argument_test/invalid_call_argument_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\end2end - - - - - - {d5718e1e-f9c3-5b35-6b92-0309cc63bcf3} - - - {f192acd9-1a23-2b42-3be6-6dd97ffc4778} - - - {b3e4e7e4-425a-9fc6-6771-7ac8cc4d78eb} - - - - diff --git a/vsprojects/vcxproj/test/json_rewrite/json_rewrite.vcxproj b/vsprojects/vcxproj/test/json_rewrite/json_rewrite.vcxproj deleted file mode 100644 index 52cb29b023..0000000000 --- a/vsprojects/vcxproj/test/json_rewrite/json_rewrite.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {57B36FF6-25B1-2475-D07A-2E9097E2C792} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - json_rewrite - static - Debug - static - Debug - - - json_rewrite - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/json_rewrite/json_rewrite.vcxproj.filters b/vsprojects/vcxproj/test/json_rewrite/json_rewrite.vcxproj.filters deleted file mode 100644 index 5ed2dcd62e..0000000000 --- a/vsprojects/vcxproj/test/json_rewrite/json_rewrite.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\json - - - - - - {05d5dccb-7800-e2dd-4176-2284ab476a02} - - - {fa3dc3c3-0c01-e773-0a02-9122cac18dd2} - - - {51911fb2-a226-f6b1-e858-448e2656cd87} - - - - diff --git a/vsprojects/vcxproj/test/json_rewrite_test/json_rewrite_test.vcxproj b/vsprojects/vcxproj/test/json_rewrite_test/json_rewrite_test.vcxproj deleted file mode 100644 index 5a8c3d86c2..0000000000 --- a/vsprojects/vcxproj/test/json_rewrite_test/json_rewrite_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {DD4C2B4E-9C47-6AA4-8E16-7B69AF8FA1D2} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - json_rewrite_test - static - Debug - static - Debug - - - json_rewrite_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/json_rewrite_test/json_rewrite_test.vcxproj.filters b/vsprojects/vcxproj/test/json_rewrite_test/json_rewrite_test.vcxproj.filters deleted file mode 100644 index 7650c021f3..0000000000 --- a/vsprojects/vcxproj/test/json_rewrite_test/json_rewrite_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\json - - - - - - {09577e2a-3cfa-9c26-2e65-0655c9b4d057} - - - {c06009c2-6694-47e5-0841-b423236e1829} - - - {607f4cb4-9d27-6ab0-5765-7da9dabb2d39} - - - - diff --git a/vsprojects/vcxproj/test/json_run_localhost/json_run_localhost.vcxproj b/vsprojects/vcxproj/test/json_run_localhost/json_run_localhost.vcxproj deleted file mode 100644 index 34507b656e..0000000000 --- a/vsprojects/vcxproj/test/json_run_localhost/json_run_localhost.vcxproj +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {91678827-DAEF-2E2F-9CD1-1F5E5DD54842} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - json_run_localhost - static - Debug - static - Debug - - - json_run_localhost - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/json_run_localhost/json_run_localhost.vcxproj.filters b/vsprojects/vcxproj/test/json_run_localhost/json_run_localhost.vcxproj.filters deleted file mode 100644 index 84c5d1e377..0000000000 --- a/vsprojects/vcxproj/test/json_run_localhost/json_run_localhost.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\qps - - - - - - {6a0e8372-94ed-67cd-edda-56ba97debf76} - - - {2a065f28-e35d-1a75-6e12-fd86e7b99443} - - - {6eec400a-a3a2-2904-8b49-92aeb69c4448} - - - - diff --git a/vsprojects/vcxproj/test/json_stream_error_test/json_stream_error_test.vcxproj b/vsprojects/vcxproj/test/json_stream_error_test/json_stream_error_test.vcxproj deleted file mode 100644 index accb6293bc..0000000000 --- a/vsprojects/vcxproj/test/json_stream_error_test/json_stream_error_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8EABFC7E-4CE6-CDE1-CE31-298D809B8A9B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - json_stream_error_test - static - Debug - static - Debug - - - json_stream_error_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/json_stream_error_test/json_stream_error_test.vcxproj.filters b/vsprojects/vcxproj/test/json_stream_error_test/json_stream_error_test.vcxproj.filters deleted file mode 100644 index 40fb50b1d8..0000000000 --- a/vsprojects/vcxproj/test/json_stream_error_test/json_stream_error_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\json - - - - - - {fd91a9af-e842-2b41-84be-97fc19f73292} - - - {56d5be7e-42c2-34ee-ca67-9ab497e51c0e} - - - {ba28edc3-5711-9a3c-72ee-9adeebd0ce9d} - - - - diff --git a/vsprojects/vcxproj/test/json_test/json_test.vcxproj b/vsprojects/vcxproj/test/json_test/json_test.vcxproj deleted file mode 100644 index 04ac883e13..0000000000 --- a/vsprojects/vcxproj/test/json_test/json_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {05230AC7-4529-E6CF-0506-A063B5FF6642} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - json_test - static - Debug - static - Debug - - - json_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/json_test/json_test.vcxproj.filters b/vsprojects/vcxproj/test/json_test/json_test.vcxproj.filters deleted file mode 100644 index 056520bf31..0000000000 --- a/vsprojects/vcxproj/test/json_test/json_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\json - - - - - - {38bd69da-e5d3-a0d8-641d-8923a0398da9} - - - {ad7bd1bd-ec40-f392-07b9-0927d7349e69} - - - {46b0b357-d5c0-40a5-f33e-0365e022748f} - - - - diff --git a/vsprojects/vcxproj/test/lame_client_test/lame_client_test.vcxproj b/vsprojects/vcxproj/test/lame_client_test/lame_client_test.vcxproj deleted file mode 100644 index 0bda78baf6..0000000000 --- a/vsprojects/vcxproj/test/lame_client_test/lame_client_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6E60B394-E17D-658A-6648-A2E6E183226F} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - lame_client_test - static - Debug - static - Debug - - - lame_client_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/lame_client_test/lame_client_test.vcxproj.filters b/vsprojects/vcxproj/test/lame_client_test/lame_client_test.vcxproj.filters deleted file mode 100644 index 303339aa9a..0000000000 --- a/vsprojects/vcxproj/test/lame_client_test/lame_client_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {e7bb5cbc-25b0-e358-fafa-2c7048d18947} - - - {ce6d3d5a-27ab-76d2-eb61-1d085fa36f29} - - - {2d8a5a27-5421-ba0d-520e-1e168d10fb4e} - - - - diff --git a/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj b/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj deleted file mode 100644 index 0a14694b75..0000000000 --- a/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B706A9EC-7982-0DBC-495D-07B165F6CF56} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - large_metadata_bad_client_test - static - Debug - static - Debug - - - large_metadata_bad_client_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {BA67B418-B699-E41A-9CC4-0279C49481A5} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj.filters deleted file mode 100644 index 5eb9a5e7cb..0000000000 --- a/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\bad_client\tests - - - - - - {6c1eb0cb-9d82-f961-7220-1f6edc913666} - - - {79d5006f-93a1-aa0e-2568-37aa63eef567} - - - {dbde5995-24a0-2332-4bee-0540ed3aa848} - - - {5cf4a13f-ae24-fd98-eb59-b5301f30367c} - - - - diff --git a/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj b/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj deleted file mode 100644 index b4da0194db..0000000000 --- a/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - lb_policies_test - static - Debug - static - Debug - - - lb_policies_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj.filters b/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj.filters deleted file mode 100644 index 362cfab89d..0000000000 --- a/vsprojects/vcxproj/test/lb_policies_test/lb_policies_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\client_channel - - - - - - {58736598-65ad-bf09-4484-a4de1bb9b51f} - - - {6e194f4b-ceb1-0e6b-e77a-8149b0411d99} - - - {c4b19e85-1a5c-066b-9503-b58971695a58} - - - - diff --git a/vsprojects/vcxproj/test/load_file_test/load_file_test.vcxproj b/vsprojects/vcxproj/test/load_file_test/load_file_test.vcxproj deleted file mode 100644 index 52fbcccb04..0000000000 --- a/vsprojects/vcxproj/test/load_file_test/load_file_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {DC76C089-0D55-DF19-7CCA-49DAE5D29E49} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - load_file_test - static - Debug - static - Debug - - - load_file_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/load_file_test/load_file_test.vcxproj.filters b/vsprojects/vcxproj/test/load_file_test/load_file_test.vcxproj.filters deleted file mode 100644 index 2c7934b5a1..0000000000 --- a/vsprojects/vcxproj/test/load_file_test/load_file_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {2d5b633c-62d3-3391-6d61-6521bf33e82d} - - - {30d9062f-1ea2-7ee4-249c-0e4220cb5153} - - - {a23b62a8-d5fc-3114-9aa2-8065e49214e8} - - - - diff --git a/vsprojects/vcxproj/test/message_compress_test/message_compress_test.vcxproj b/vsprojects/vcxproj/test/message_compress_test/message_compress_test.vcxproj deleted file mode 100644 index de55bf38eb..0000000000 --- a/vsprojects/vcxproj/test/message_compress_test/message_compress_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {07170557-CCB0-D23C-8018-C2909D115DF9} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - message_compress_test - static - Debug - static - Debug - - - message_compress_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/message_compress_test/message_compress_test.vcxproj.filters b/vsprojects/vcxproj/test/message_compress_test/message_compress_test.vcxproj.filters deleted file mode 100644 index bd9c90340a..0000000000 --- a/vsprojects/vcxproj/test/message_compress_test/message_compress_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\compression - - - - - - {80514ec2-1521-1e52-80eb-aa537fa0c30f} - - - {619fbd0a-16e2-c875-c4cd-1e7e1dd3266e} - - - {a7b5cbf3-2666-c973-69c4-9a2e037cd83a} - - - - diff --git a/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj b/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj deleted file mode 100644 index 42cc95590b..0000000000 --- a/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {FE8631BA-DF40-EC70-6078-C2DAF316E329} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - metrics_client - static - Debug - static - Debug - - - metrics_client - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj.filters b/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj.filters deleted file mode 100644 index 7329489cd3..0000000000 --- a/vsprojects/vcxproj/test/metrics_client/metrics_client.vcxproj.filters +++ /dev/null @@ -1,44 +0,0 @@ - - - - - src\proto\grpc\testing - - - test\cpp\interop - - - - - test\cpp\util - - - - - - {2f2185a6-32fc-013a-9860-d623721af645} - - - {bf59f117-18fd-cc4b-b073-1a6c11dcbbbd} - - - {a2d30ba0-0eec-29c7-9257-d55e8456eca3} - - - {47a85da2-170b-d623-a6c9-d3b4eaab5302} - - - {2c00b6b1-865c-55b2-0d9d-8d7b42ad7d03} - - - {a62a5921-b3d4-6069-e9cc-73f34609c99b} - - - {fbd5c6ac-f3a9-1b16-6310-c205aadc9075} - - - {16f4e45d-a509-3e4d-4a19-9383576bec54} - - - - diff --git a/vsprojects/vcxproj/test/mlog_test/mlog_test.vcxproj b/vsprojects/vcxproj/test/mlog_test/mlog_test.vcxproj deleted file mode 100644 index 44b9a971f8..0000000000 --- a/vsprojects/vcxproj/test/mlog_test/mlog_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9345E329-80F3-DED4-FDC3-BF63FCEA2C03} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - mlog_test - static - Debug - static - Debug - - - mlog_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/mlog_test/mlog_test.vcxproj.filters b/vsprojects/vcxproj/test/mlog_test/mlog_test.vcxproj.filters deleted file mode 100644 index 982deddf97..0000000000 --- a/vsprojects/vcxproj/test/mlog_test/mlog_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\census - - - - - - {cf4f3b02-7a43-f5b5-708a-938b179be26e} - - - {74b31c41-bf60-9274-a718-f33cd7c659b4} - - - {2117a367-a751-9526-028f-07b5e88f7037} - - - - diff --git a/vsprojects/vcxproj/test/mock_test/mock_test.vcxproj b/vsprojects/vcxproj/test/mock_test/mock_test.vcxproj deleted file mode 100644 index 8c840fd5be..0000000000 --- a/vsprojects/vcxproj/test/mock_test/mock_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2E716EE7-4A8D-8E92-7E3F-3DC55406F21C} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - mock_test - static - Debug - static - Debug - - - mock_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/mock_test/mock_test.vcxproj.filters b/vsprojects/vcxproj/test/mock_test/mock_test.vcxproj.filters deleted file mode 100644 index 1b3b773b08..0000000000 --- a/vsprojects/vcxproj/test/mock_test/mock_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {69c257a2-3e4c-a86e-ce0d-1a97b237d294} - - - {d38b6703-03f0-9415-c6e9-a43d4c2567fb} - - - {46a0a7d2-41b5-153f-3bf7-8ae7da096f45} - - - - diff --git a/vsprojects/vcxproj/test/multiple_server_queues_test/multiple_server_queues_test.vcxproj b/vsprojects/vcxproj/test/multiple_server_queues_test/multiple_server_queues_test.vcxproj deleted file mode 100644 index a37726ba83..0000000000 --- a/vsprojects/vcxproj/test/multiple_server_queues_test/multiple_server_queues_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {88AF688E-E43C-5E20-6966-CF559F597D82} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - multiple_server_queues_test - static - Debug - static - Debug - - - multiple_server_queues_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/multiple_server_queues_test/multiple_server_queues_test.vcxproj.filters b/vsprojects/vcxproj/test/multiple_server_queues_test/multiple_server_queues_test.vcxproj.filters deleted file mode 100644 index c39d385b13..0000000000 --- a/vsprojects/vcxproj/test/multiple_server_queues_test/multiple_server_queues_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\end2end - - - - - - {30655558-5c27-1d63-199e-218ac46c1f08} - - - {a5848e43-99b7-5e20-d40d-253cbc2e8884} - - - {4a294a4a-1251-6ffd-ef9c-01f7722fcc68} - - - - diff --git a/vsprojects/vcxproj/test/murmur_hash_test/murmur_hash_test.vcxproj b/vsprojects/vcxproj/test/murmur_hash_test/murmur_hash_test.vcxproj deleted file mode 100644 index d12ab69caf..0000000000 --- a/vsprojects/vcxproj/test/murmur_hash_test/murmur_hash_test.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0B136077-8522-3C25-7704-1C386C9FDCD5} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - murmur_hash_test - static - Debug - static - Debug - - - murmur_hash_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/murmur_hash_test/murmur_hash_test.vcxproj.filters b/vsprojects/vcxproj/test/murmur_hash_test/murmur_hash_test.vcxproj.filters deleted file mode 100644 index 705a47860c..0000000000 --- a/vsprojects/vcxproj/test/murmur_hash_test/murmur_hash_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\support - - - - - - {68e131c7-298c-132e-a8f3-7426d89ea80f} - - - {a9b658d0-5a82-4d26-a53d-7569b13eb104} - - - {ede1f28e-048a-3c13-66e9-94d58387311f} - - - - diff --git a/vsprojects/vcxproj/test/no_server_test/no_server_test.vcxproj b/vsprojects/vcxproj/test/no_server_test/no_server_test.vcxproj deleted file mode 100644 index 11518db4e7..0000000000 --- a/vsprojects/vcxproj/test/no_server_test/no_server_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A66AC548-E2B9-74CD-293C-43526EE51DCE} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - no_server_test - static - Debug - static - Debug - - - no_server_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/no_server_test/no_server_test.vcxproj.filters b/vsprojects/vcxproj/test/no_server_test/no_server_test.vcxproj.filters deleted file mode 100644 index f5686df696..0000000000 --- a/vsprojects/vcxproj/test/no_server_test/no_server_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\end2end - - - - - - {ae863d60-2a18-0a8a-c3b4-3798f985fa3c} - - - {8c3a98b8-4b97-4da8-7520-456c3886a966} - - - {abcc83d9-0f40-3f13-3e9f-48dce7eddbc7} - - - - diff --git a/vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj b/vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj deleted file mode 100644 index 99f33b2165..0000000000 --- a/vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {1A392E88-0696-AC23-F114-DA66E25F76AB} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - noop-benchmark - static - Debug - static - Debug - - - noop-benchmark - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {AAD4AEF3-DF1E-7A6D-EC35-233BD1031BF4} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj.filters b/vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj.filters deleted file mode 100644 index 6c7cdc2f01..0000000000 --- a/vsprojects/vcxproj/test/noop-benchmark/noop-benchmark.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\microbenchmarks - - - - - - {d56f990b-c6e5-d80a-9e07-4bcbfbb7d97e} - - - {15ba47e8-9d93-ffaf-d4e2-49262cfb4996} - - - {d31456e0-6846-00f7-082a-30479a8b8a4f} - - - - diff --git a/vsprojects/vcxproj/test/percent_encoding_test/percent_encoding_test.vcxproj b/vsprojects/vcxproj/test/percent_encoding_test/percent_encoding_test.vcxproj deleted file mode 100644 index b858849325..0000000000 --- a/vsprojects/vcxproj/test/percent_encoding_test/percent_encoding_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {CCFC6A58-623D-9013-BFEB-C809809E2429} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - percent_encoding_test - static - Debug - static - Debug - - - percent_encoding_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/percent_encoding_test/percent_encoding_test.vcxproj.filters b/vsprojects/vcxproj/test/percent_encoding_test/percent_encoding_test.vcxproj.filters deleted file mode 100644 index c782da7b16..0000000000 --- a/vsprojects/vcxproj/test/percent_encoding_test/percent_encoding_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\slice - - - - - - {cae06dad-e2f9-b0e5-9c5d-5458ef09f6f8} - - - {e20d1fc3-2955-f28e-ce2f-e5a96cb7b348} - - - {429586ce-a996-f897-05f9-990e7c664eb1} - - - - diff --git a/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj b/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj deleted file mode 100644 index d3cd3f1e04..0000000000 --- a/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {1881E6A1-EAD4-A68C-9727-FF1956B66185} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - proto_server_reflection_test - static - Debug - static - Debug - - - proto_server_reflection_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {7B95AF96-915A-7132-AE45-9FA37769FACE} - - - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB} - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters b/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters deleted file mode 100644 index ae0b05aa73..0000000000 --- a/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {354831a1-52fb-6364-b568-c8c49bfb8d29} - - - {b4d957ef-f9fd-2a14-078c-b72f80096f70} - - - {130f224c-89a5-54ea-7045-b54b4188c52b} - - - - diff --git a/vsprojects/vcxproj/test/public_headers_must_be_c89/public_headers_must_be_c89.vcxproj b/vsprojects/vcxproj/test/public_headers_must_be_c89/public_headers_must_be_c89.vcxproj deleted file mode 100644 index 155bffbe61..0000000000 --- a/vsprojects/vcxproj/test/public_headers_must_be_c89/public_headers_must_be_c89.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {DB97C070-794F-95C7-7504-E444504A2ECE} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - public_headers_must_be_c89 - static - Debug - static - Debug - - - public_headers_must_be_c89 - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/public_headers_must_be_c89/public_headers_must_be_c89.vcxproj.filters b/vsprojects/vcxproj/test/public_headers_must_be_c89/public_headers_must_be_c89.vcxproj.filters deleted file mode 100644 index cd9a01927a..0000000000 --- a/vsprojects/vcxproj/test/public_headers_must_be_c89/public_headers_must_be_c89.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {87bb3378-6dc2-7e41-947f-dbeba834e3f0} - - - {a1fc85a8-33ea-5dc6-1b6c-4dc6356d779c} - - - {0ba52425-ab5b-445b-fd01-f11aa5d9e28c} - - - - diff --git a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj b/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj deleted file mode 100644 index d1dea3ec4a..0000000000 --- a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {79B45023-E5EB-4DF4-BBED-525CC0ACD832} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - qps_json_driver - static - Debug - static - Debug - - - qps_json_driver - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {8423B0C5-2428-CA10-82EF-7B5C1F3D8011} - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters b/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters deleted file mode 100644 index 62b9be85cc..0000000000 --- a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\qps - - - - - - {51cad99a-2bf1-0e37-a1be-0c9ad02355d3} - - - {f8692949-7450-0a31-11fc-a17ea63b6357} - - - {73b4c157-7352-ba56-4790-66e27fa90451} - - - - diff --git a/vsprojects/vcxproj/test/qps_worker/qps_worker.vcxproj b/vsprojects/vcxproj/test/qps_worker/qps_worker.vcxproj deleted file mode 100644 index 0ed96fcf8f..0000000000 --- a/vsprojects/vcxproj/test/qps_worker/qps_worker.vcxproj +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {89ACCD5A-8411-634E-BF28-7115F46A807D} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - qps_worker - static - Debug - static - Debug - - - qps_worker - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - {8423B0C5-2428-CA10-82EF-7B5C1F3D8011} - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/qps_worker/qps_worker.vcxproj.filters b/vsprojects/vcxproj/test/qps_worker/qps_worker.vcxproj.filters deleted file mode 100644 index a1f2390827..0000000000 --- a/vsprojects/vcxproj/test/qps_worker/qps_worker.vcxproj.filters +++ /dev/null @@ -1,29 +0,0 @@ - - - - - test\cpp\qps - - - - - test\cpp\qps - - - test\cpp\qps - - - - - - {bc4b8555-fcc7-4f70-96d9-581f535382e1} - - - {79b85b26-c29a-b8a0-06a4-d4e44f2350aa} - - - {1c2b326f-ab54-97da-d40e-b0e99dd76de6} - - - - diff --git a/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj b/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj deleted file mode 100644 index ad73f65504..0000000000 --- a/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2424D42A-8378-91FB-6ACF-6D37CEB40150} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - reconnect_interop_client - static - Debug - static - Debug - - - reconnect_interop_client - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj.filters b/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj.filters deleted file mode 100644 index 807e1622a9..0000000000 --- a/vsprojects/vcxproj/test/reconnect_interop_client/reconnect_interop_client.vcxproj.filters +++ /dev/null @@ -1,42 +0,0 @@ - - - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - test\cpp\interop - - - - - - {64f2b493-09f7-d7cb-f9e8-3c9340ed52b8} - - - {8adcf7eb-7c61-b465-3f50-24b72334ca70} - - - {8fc32b7e-6688-0959-39ef-ee82ef4629a3} - - - {db662faa-152b-3329-6672-553f842cc34e} - - - {9d06cc54-0814-e593-dea7-231f4cdd7839} - - - {fc2aa415-0f40-b757-6cf5-928c6b8facf8} - - - {d2772815-610b-8123-ce83-d383ae42c5f5} - - - - diff --git a/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj b/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj deleted file mode 100644 index 86902aa75a..0000000000 --- a/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {997D5119-836F-8337-A164-94B0F9926520} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - reconnect_interop_server - static - Debug - static - Debug - - - reconnect_interop_server - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {929C90AE-483F-AC80-EF93-226199F9E428} - - - {E3110C46-A148-FF65-08FD-3324829BE7FE} - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj.filters b/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj.filters deleted file mode 100644 index 0d09fd94e4..0000000000 --- a/vsprojects/vcxproj/test/reconnect_interop_server/reconnect_interop_server.vcxproj.filters +++ /dev/null @@ -1,42 +0,0 @@ - - - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - test\cpp\interop - - - - - - {1fcb325d-f87d-6a3a-7966-dd085866559b} - - - {a0dd749f-006f-e766-3363-ddc21ddc7137} - - - {04d54dc7-4657-c6c1-48f3-17de7d737f13} - - - {12b2970d-42e0-b3ea-96e3-7ba58adcbc30} - - - {3b344672-cac7-682c-aa96-4c737cdbd4c9} - - - {ac1d2bea-3ff0-3d89-98b2-295c5554cf14} - - - {058c3798-9fdd-84e5-9ce8-71184a49e468} - - - - diff --git a/vsprojects/vcxproj/test/resolve_address_test/resolve_address_test.vcxproj b/vsprojects/vcxproj/test/resolve_address_test/resolve_address_test.vcxproj deleted file mode 100644 index 03e8caecd8..0000000000 --- a/vsprojects/vcxproj/test/resolve_address_test/resolve_address_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {8279AF6C-9584-67F3-1547-B204864FCCA7} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - resolve_address_test - static - Debug - static - Debug - - - resolve_address_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/resolve_address_test/resolve_address_test.vcxproj.filters b/vsprojects/vcxproj/test/resolve_address_test/resolve_address_test.vcxproj.filters deleted file mode 100644 index cfb0dcd716..0000000000 --- a/vsprojects/vcxproj/test/resolve_address_test/resolve_address_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {272b76bf-e9d9-c3d6-5a32-ca58586f294e} - - - {539f2f76-ab43-b174-e52a-22f84cc422e2} - - - {36fc3eef-2bab-6cee-9726-797e7c9c2d76} - - - - diff --git a/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj b/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj deleted file mode 100644 index 389340e9a0..0000000000 --- a/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6084F546-5D66-5CB5-63CF-DC960F14B545} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - resource_quota_test - static - Debug - static - Debug - - - resource_quota_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj.filters b/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj.filters deleted file mode 100644 index d76c8aed5d..0000000000 --- a/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {06783e32-dbf0-7e7c-7b50-12b278f9cc12} - - - {c4f432b6-577b-e3ed-fec9-a915af5ebbd5} - - - {fcc82d68-ffb2-0843-83aa-175006c43aeb} - - - - diff --git a/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj b/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj deleted file mode 100644 index 55e16f188d..0000000000 --- a/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {54B15DF6-42BA-5347-C9B8-2D7F1F2921C6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - round_robin_end2end_test - static - Debug - static - Debug - - - round_robin_end2end_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj.filters b/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj.filters deleted file mode 100644 index 95a149953f..0000000000 --- a/vsprojects/vcxproj/test/round_robin_end2end_test/round_robin_end2end_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {e151f47d-6563-5ef9-fae6-70708f9f8ee6} - - - {07958594-fd93-28f7-9388-c67c952701b8} - - - {7596a0dd-caa4-b365-a59f-f7ffef38b10d} - - - - diff --git a/vsprojects/vcxproj/test/secure_auth_context_test/secure_auth_context_test.vcxproj b/vsprojects/vcxproj/test/secure_auth_context_test/secure_auth_context_test.vcxproj deleted file mode 100644 index c6d5764d4f..0000000000 --- a/vsprojects/vcxproj/test/secure_auth_context_test/secure_auth_context_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D852AD54-B8E9-D177-318B-DA872B5573A9} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - secure_auth_context_test - static - Debug - static - Debug - - - secure_auth_context_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/secure_auth_context_test/secure_auth_context_test.vcxproj.filters b/vsprojects/vcxproj/test/secure_auth_context_test/secure_auth_context_test.vcxproj.filters deleted file mode 100644 index 19ef5fe6b7..0000000000 --- a/vsprojects/vcxproj/test/secure_auth_context_test/secure_auth_context_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\common - - - - - - {d217cfff-a998-6970-2496-4ff0294d09ea} - - - {9d2748f3-7c85-e258-041d-707f5b283b09} - - - {fdaae7af-264b-ca44-2059-6da6c465e593} - - - - diff --git a/vsprojects/vcxproj/test/secure_channel_create_test/secure_channel_create_test.vcxproj b/vsprojects/vcxproj/test/secure_channel_create_test/secure_channel_create_test.vcxproj deleted file mode 100644 index 726116de6d..0000000000 --- a/vsprojects/vcxproj/test/secure_channel_create_test/secure_channel_create_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {62B25398-7173-928E-689E-53860B0ACFC4} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - secure_channel_create_test - static - Debug - static - Debug - - - secure_channel_create_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/secure_channel_create_test/secure_channel_create_test.vcxproj.filters b/vsprojects/vcxproj/test/secure_channel_create_test/secure_channel_create_test.vcxproj.filters deleted file mode 100644 index 81bfd6d618..0000000000 --- a/vsprojects/vcxproj/test/secure_channel_create_test/secure_channel_create_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {d8e20b8b-50bc-458b-48c2-661874410760} - - - {96fd1a22-522a-1535-4d66-9005d106375f} - - - {4acd30f5-eb6e-f414-9f72-bb4af1ae128c} - - - - diff --git a/vsprojects/vcxproj/test/secure_endpoint_test/secure_endpoint_test.vcxproj b/vsprojects/vcxproj/test/secure_endpoint_test/secure_endpoint_test.vcxproj deleted file mode 100644 index e131463b42..0000000000 --- a/vsprojects/vcxproj/test/secure_endpoint_test/secure_endpoint_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A7747106-A6BC-62D4-2A21-04A4F0CC2683} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - secure_endpoint_test - static - Debug - static - Debug - - - secure_endpoint_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/secure_endpoint_test/secure_endpoint_test.vcxproj.filters b/vsprojects/vcxproj/test/secure_endpoint_test/secure_endpoint_test.vcxproj.filters deleted file mode 100644 index e97e29ebab..0000000000 --- a/vsprojects/vcxproj/test/secure_endpoint_test/secure_endpoint_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\security - - - - - - {a0966201-2b41-9b59-df53-b891c1188ffa} - - - {c4dc251a-db5d-243a-f8be-a31c547b99aa} - - - {8e55c7a1-bad0-bed4-2cab-e7889b2df64f} - - - - diff --git a/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj b/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj deleted file mode 100644 index 2367b3ea08..0000000000 --- a/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F164F666-C866-D607-E1DF-E7BF3CF98255} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - sequential_connectivity_test - static - Debug - static - Debug - - - sequential_connectivity_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj.filters b/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj.filters deleted file mode 100644 index e2b0d038a6..0000000000 --- a/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {432df9fa-0f9a-912a-8413-adc38d9c27ca} - - - {42030451-0f78-add5-87be-b81131bcc0f5} - - - {34047576-8f8d-eeb2-d596-35be59941f62} - - - - diff --git a/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj b/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj deleted file mode 100644 index 0ebdd98817..0000000000 --- a/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {86751DC8-C8D9-57B6-2C8A-BB33021C773C} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - server_builder_plugin_test - static - Debug - static - Debug - - - server_builder_plugin_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj.filters b/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj.filters deleted file mode 100644 index 629b913fc6..0000000000 --- a/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {37b2ebc1-b2f2-ecb9-37b7-f6d757bb99e3} - - - {39400fed-f7b7-0f44-0ef3-ba3693d42011} - - - {dab9dd19-3e5b-005e-4b5a-456de6111d71} - - - - diff --git a/vsprojects/vcxproj/test/server_chttp2_test/server_chttp2_test.vcxproj b/vsprojects/vcxproj/test/server_chttp2_test/server_chttp2_test.vcxproj deleted file mode 100644 index 3562e6acb3..0000000000 --- a/vsprojects/vcxproj/test/server_chttp2_test/server_chttp2_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {BF9F909B-8266-6AAC-A81B-05F8210AA8CA} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - server_chttp2_test - static - Debug - static - Debug - - - server_chttp2_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/server_chttp2_test/server_chttp2_test.vcxproj.filters b/vsprojects/vcxproj/test/server_chttp2_test/server_chttp2_test.vcxproj.filters deleted file mode 100644 index 1312fbc4b3..0000000000 --- a/vsprojects/vcxproj/test/server_chttp2_test/server_chttp2_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {95a6b4b6-b1fb-3c20-945d-ec3dbde1b334} - - - {c0e66b85-9758-a554-2a83-be1a4ee1e27e} - - - {621e8242-2bcf-70e0-9db0-2c27907e925c} - - - - diff --git a/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj b/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj deleted file mode 100644 index 9e586c647c..0000000000 --- a/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A6F63996-B33B-9904-57AB-9C9559D52007} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - server_context_test_spouse_test - static - Debug - static - Debug - - - server_context_test_spouse_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {3D3EAEA9-76C4-0CFE-4718-5A1F6B7F72C8} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj.filters b/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj.filters deleted file mode 100644 index 469ef950a6..0000000000 --- a/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\test - - - - - - {fa83809b-e1fe-3f85-ebbb-73570c33fa2e} - - - {7bad6fd3-6c15-e1fa-4037-8627e3622c7c} - - - {990725da-41e1-2c80-ecc7-2b90c8914dd7} - - - - diff --git a/vsprojects/vcxproj/test/server_crash_test_client/server_crash_test_client.vcxproj b/vsprojects/vcxproj/test/server_crash_test_client/server_crash_test_client.vcxproj deleted file mode 100644 index 4b25a3e43d..0000000000 --- a/vsprojects/vcxproj/test/server_crash_test_client/server_crash_test_client.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {00BAA4A7-8806-8D17-23DE-12C433569672} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - server_crash_test_client - static - Debug - static - Debug - - - server_crash_test_client - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/server_crash_test_client/server_crash_test_client.vcxproj.filters b/vsprojects/vcxproj/test/server_crash_test_client/server_crash_test_client.vcxproj.filters deleted file mode 100644 index 8d145fa082..0000000000 --- a/vsprojects/vcxproj/test/server_crash_test_client/server_crash_test_client.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {e6a5ebc1-209d-c455-b22c-95740cb1f2db} - - - {ec9492d8-e2e7-a63c-89ff-fa40510a32e2} - - - {f582d82f-8260-085e-376e-7b690da2aafa} - - - - diff --git a/vsprojects/vcxproj/test/server_registered_method_bad_client_test/server_registered_method_bad_client_test.vcxproj b/vsprojects/vcxproj/test/server_registered_method_bad_client_test/server_registered_method_bad_client_test.vcxproj deleted file mode 100644 index 83527d31ca..0000000000 --- a/vsprojects/vcxproj/test/server_registered_method_bad_client_test/server_registered_method_bad_client_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - server_registered_method_bad_client_test - static - Debug - static - Debug - - - server_registered_method_bad_client_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {BA67B418-B699-E41A-9CC4-0279C49481A5} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/server_registered_method_bad_client_test/server_registered_method_bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/server_registered_method_bad_client_test/server_registered_method_bad_client_test.vcxproj.filters deleted file mode 100644 index 113d908326..0000000000 --- a/vsprojects/vcxproj/test/server_registered_method_bad_client_test/server_registered_method_bad_client_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\bad_client\tests - - - - - - {e170992c-1d26-c352-1b77-0393c8e4de0d} - - - {aeb9b005-92ba-fd6b-8ad4-4cb18432e9e9} - - - {a9ea2e08-63e8-2585-98db-9f2c0e409b60} - - - {3a014dca-e8b5-bd9e-3ce0-64ced4d31a36} - - - - diff --git a/vsprojects/vcxproj/test/server_test/server_test.vcxproj b/vsprojects/vcxproj/test/server_test/server_test.vcxproj deleted file mode 100644 index 0b4d97797b..0000000000 --- a/vsprojects/vcxproj/test/server_test/server_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E765AC67-E4E5-C350-59A1-C6CA2BD9F64B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - server_test - static - Debug - static - Debug - - - server_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/server_test/server_test.vcxproj.filters b/vsprojects/vcxproj/test/server_test/server_test.vcxproj.filters deleted file mode 100644 index 7ff7ce1934..0000000000 --- a/vsprojects/vcxproj/test/server_test/server_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\surface - - - - - - {a7353dbc-848c-4320-25c9-84cbf09838a0} - - - {06c16169-257f-e57d-debf-c36fdec3e88f} - - - {78f1b1a8-86e0-9445-4bc0-a183da5deb2e} - - - - diff --git a/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj b/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj deleted file mode 100644 index a438391f25..0000000000 --- a/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {4A48E5A5-2E69-ED6D-063C-C297180A54D0} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - set_initial_connect_string_test - static - Debug - static - Debug - - - set_initial_connect_string_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {E3110C46-A148-FF65-08FD-3324829BE7FE} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj.filters b/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj.filters deleted file mode 100644 index 4422a3e792..0000000000 --- a/vsprojects/vcxproj/test/set_initial_connect_string_test/set_initial_connect_string_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\client_channel - - - - - - {413358e4-3165-f09d-071c-ee4f2ca0b826} - - - {a554b5ef-0c80-ac03-1848-bccd947a06a6} - - - {4726253c-a562-0ace-2798-996807381208} - - - - diff --git a/vsprojects/vcxproj/test/shutdown_test/shutdown_test.vcxproj b/vsprojects/vcxproj/test/shutdown_test/shutdown_test.vcxproj deleted file mode 100644 index 1ff80b7269..0000000000 --- a/vsprojects/vcxproj/test/shutdown_test/shutdown_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {7FA7570D-08DA-15BF-EF87-A29A858D1EC6} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - shutdown_test - static - Debug - static - Debug - - - shutdown_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/shutdown_test/shutdown_test.vcxproj.filters b/vsprojects/vcxproj/test/shutdown_test/shutdown_test.vcxproj.filters deleted file mode 100644 index 47ee0cee32..0000000000 --- a/vsprojects/vcxproj/test/shutdown_test/shutdown_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {d1b60cfe-52e6-cc45-0860-38b62a40d1df} - - - {3078bd35-19e7-bb98-d866-0c77bd89d216} - - - {28c8c433-b369-d77d-ed88-19ee7813c55e} - - - - diff --git a/vsprojects/vcxproj/test/simple_request_bad_client_test/simple_request_bad_client_test.vcxproj b/vsprojects/vcxproj/test/simple_request_bad_client_test/simple_request_bad_client_test.vcxproj deleted file mode 100644 index 0e065d5c47..0000000000 --- a/vsprojects/vcxproj/test/simple_request_bad_client_test/simple_request_bad_client_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {63422647-93FA-46BB-4827-95473D9D503C} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - simple_request_bad_client_test - static - Debug - static - Debug - - - simple_request_bad_client_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {BA67B418-B699-E41A-9CC4-0279C49481A5} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/simple_request_bad_client_test/simple_request_bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/simple_request_bad_client_test/simple_request_bad_client_test.vcxproj.filters deleted file mode 100644 index 34bf5ed75c..0000000000 --- a/vsprojects/vcxproj/test/simple_request_bad_client_test/simple_request_bad_client_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\bad_client\tests - - - - - - {da54a5c6-667f-8a66-e5b9-86f06ee8918d} - - - {cf029283-6744-7b11-9b3e-2bcc16bf2e86} - - - {e834ec67-8993-3265-c4aa-7b88458e1e41} - - - {b5e14515-eba9-1fc0-bb2a-f6d6a50bef5d} - - - - diff --git a/vsprojects/vcxproj/test/slice_buffer_test/slice_buffer_test.vcxproj b/vsprojects/vcxproj/test/slice_buffer_test/slice_buffer_test.vcxproj deleted file mode 100644 index ace1a3fab5..0000000000 --- a/vsprojects/vcxproj/test/slice_buffer_test/slice_buffer_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F0FA4A41-5695-580A-DCDA-EC719CB041B0} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - slice_buffer_test - static - Debug - static - Debug - - - slice_buffer_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/slice_buffer_test/slice_buffer_test.vcxproj.filters b/vsprojects/vcxproj/test/slice_buffer_test/slice_buffer_test.vcxproj.filters deleted file mode 100644 index faf98f86c0..0000000000 --- a/vsprojects/vcxproj/test/slice_buffer_test/slice_buffer_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\slice - - - - - - {03de0a72-2873-4cc6-9a73-b7faed0f32fb} - - - {4a2e8cf6-61b1-6a4d-7f9d-298ef88b720d} - - - {f486a4fe-0740-de07-63ea-00126063ee59} - - - - diff --git a/vsprojects/vcxproj/test/slice_string_helpers_test/slice_string_helpers_test.vcxproj b/vsprojects/vcxproj/test/slice_string_helpers_test/slice_string_helpers_test.vcxproj deleted file mode 100644 index 81a3cfc095..0000000000 --- a/vsprojects/vcxproj/test/slice_string_helpers_test/slice_string_helpers_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {419167BB-C3F5-DDEA-403A-394D1902DE65} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - slice_string_helpers_test - static - Debug - static - Debug - - - slice_string_helpers_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/slice_string_helpers_test/slice_string_helpers_test.vcxproj.filters b/vsprojects/vcxproj/test/slice_string_helpers_test/slice_string_helpers_test.vcxproj.filters deleted file mode 100644 index 0efa96e007..0000000000 --- a/vsprojects/vcxproj/test/slice_string_helpers_test/slice_string_helpers_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\slice - - - - - - {28e4a72c-aa96-0c05-4846-5cf3fc783de6} - - - {2b4c98dc-c5e9-dbd2-65f2-cdb15beee76b} - - - {c638007b-824d-9d7e-dd56-a732dadf7730} - - - - diff --git a/vsprojects/vcxproj/test/slice_test/slice_test.vcxproj b/vsprojects/vcxproj/test/slice_test/slice_test.vcxproj deleted file mode 100644 index 4cc854350d..0000000000 --- a/vsprojects/vcxproj/test/slice_test/slice_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D6DC2CF8-F263-49B1-DE13-D44D94BCF337} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - slice_test - static - Debug - static - Debug - - - slice_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/slice_test/slice_test.vcxproj.filters b/vsprojects/vcxproj/test/slice_test/slice_test.vcxproj.filters deleted file mode 100644 index 1528a62664..0000000000 --- a/vsprojects/vcxproj/test/slice_test/slice_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\slice - - - - - - {44997359-29c9-6a9f-598c-af6ad75b2b38} - - - {5b21ab34-9275-45b8-8dda-63b54fa77d69} - - - {341de3f3-3ccb-deb9-0d33-8c6f6a36efc6} - - - - diff --git a/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj b/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj deleted file mode 100644 index 8d5d02e707..0000000000 --- a/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9889A80C-F1D7-99C9-FE7E-657724BEDC62} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - sockaddr_resolver_test - static - Debug - static - Debug - - - sockaddr_resolver_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj.filters b/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj.filters deleted file mode 100644 index aa63da1502..0000000000 --- a/vsprojects/vcxproj/test/sockaddr_resolver_test/sockaddr_resolver_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\client_channel\resolvers - - - - - - {94ca5ded-0ab6-f1eb-c873-37df77826ae8} - - - {efc6f7cf-eb13-376c-85bb-64fae70baf03} - - - {a3fef8b1-3b99-63c9-5f35-feff99af1381} - - - {d32b4315-4e08-e492-5e10-4dc0c5c8cd55} - - - - diff --git a/vsprojects/vcxproj/test/sockaddr_utils_test/sockaddr_utils_test.vcxproj b/vsprojects/vcxproj/test/sockaddr_utils_test/sockaddr_utils_test.vcxproj deleted file mode 100644 index 1b9024caa9..0000000000 --- a/vsprojects/vcxproj/test/sockaddr_utils_test/sockaddr_utils_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {529771F0-10B0-9B1A-1E7E-8A8E01870348} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - sockaddr_utils_test - static - Debug - static - Debug - - - sockaddr_utils_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/sockaddr_utils_test/sockaddr_utils_test.vcxproj.filters b/vsprojects/vcxproj/test/sockaddr_utils_test/sockaddr_utils_test.vcxproj.filters deleted file mode 100644 index 16e75b7411..0000000000 --- a/vsprojects/vcxproj/test/sockaddr_utils_test/sockaddr_utils_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {bbfd5aee-2a2d-68d9-40ee-2dee3846174e} - - - {38408b3f-9753-e484-272b-21b7d81d7b42} - - - {4d4c0f68-3090-ffca-2f58-49cf5360bde2} - - - - diff --git a/vsprojects/vcxproj/test/status_test/status_test.vcxproj b/vsprojects/vcxproj/test/status_test/status_test.vcxproj deleted file mode 100644 index 8e8e3839cf..0000000000 --- a/vsprojects/vcxproj/test/status_test/status_test.vcxproj +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {98833D26-5BC0-1D31-220E-B7E9D0DF9367} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - status_test - static - Debug - static - Debug - - - status_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/status_test/status_test.vcxproj.filters b/vsprojects/vcxproj/test/status_test/status_test.vcxproj.filters deleted file mode 100644 index 758b47720e..0000000000 --- a/vsprojects/vcxproj/test/status_test/status_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\util - - - - - - {2befa3f4-c5bd-3755-0731-78f5b37260ae} - - - {0329179c-918f-d173-b037-3fac9c438640} - - - {b873ab64-5770-81c9-29a4-6b6e9cd993ca} - - - - diff --git a/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj b/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj deleted file mode 100644 index 8e1b6bb3a6..0000000000 --- a/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {09500BEB-9A09-F52E-9A3D-D1D27D7177F0} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - stress_test - static - Debug - static - Debug - - - stress_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj.filters b/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj.filters deleted file mode 100644 index 476c04ec95..0000000000 --- a/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj.filters +++ /dev/null @@ -1,74 +0,0 @@ - - - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - src\proto\grpc\testing - - - test\cpp\interop - - - test\cpp\interop - - - test\cpp\interop - - - test\cpp\interop - - - test\cpp\util - - - - - test\cpp\interop - - - test\cpp\interop - - - test\cpp\interop - - - test\cpp\util - - - - - - {2240848e-b50a-4076-464a-786310b2d6be} - - - {aaad45c2-b399-83f4-5950-6d90d3ee1c32} - - - {1a3222d0-0e47-792c-188e-207fcd8286c5} - - - {7f2f0ad6-9e60-abd3-c178-d82a346be435} - - - {0fddcdfd-8fd7-bb4b-e21d-f53728f4a766} - - - {a5c0e3f9-aa0c-45cd-87b0-b93b83e4ab9e} - - - {7afcf5a8-556a-6be3-15d4-b00b2518f8fb} - - - {e4704307-621e-0e9c-08c2-3c698c1b827f} - - - - diff --git a/vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj b/vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj deleted file mode 100644 index 2c35a03a02..0000000000 --- a/vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {08C611E4-7F87-73BE-76CE-C158A4CC05A3} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - thread_manager_test - static - Debug - static - Debug - - - thread_manager_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - {3F7D093D-11F9-C4BC-BEB7-18EB28E3F290} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj.filters b/vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj.filters deleted file mode 100644 index e1741f8316..0000000000 --- a/vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\thread_manager - - - - - - {e9e471cd-7f7e-9abc-af13-ec58851849ac} - - - {b350f72c-af76-7272-4342-1b0fc7a458ee} - - - {6b09ea8d-fbc6-e6fe-f884-b3d3dfcbfc12} - - - - diff --git a/vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj b/vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj deleted file mode 100644 index 44b0a35766..0000000000 --- a/vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {1891650E-2B75-FED7-89C5-74CEBE6ECEF7} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - thread_stress_test - static - Debug - static - Debug - - - thread_stress_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {0BE77741-552A-929B-A497-4EF7ECE17A64} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj.filters b/vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj.filters deleted file mode 100644 index add9c72ada..0000000000 --- a/vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\cpp\end2end - - - - - - {1d3b2723-703a-bc7b-e53f-e662d4fa4fc7} - - - {88b6cb51-e45c-f7a6-c7b2-e6cac4d643ad} - - - {82559a5d-f957-7b32-51ce-0cf7f2c2c31d} - - - - diff --git a/vsprojects/vcxproj/test/time_averaged_stats_test/time_averaged_stats_test.vcxproj b/vsprojects/vcxproj/test/time_averaged_stats_test/time_averaged_stats_test.vcxproj deleted file mode 100644 index ea8937978e..0000000000 --- a/vsprojects/vcxproj/test/time_averaged_stats_test/time_averaged_stats_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D1EB2A9B-8508-62D7-8FC4-11A11B1CBFD3} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - time_averaged_stats_test - static - Debug - static - Debug - - - time_averaged_stats_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/time_averaged_stats_test/time_averaged_stats_test.vcxproj.filters b/vsprojects/vcxproj/test/time_averaged_stats_test/time_averaged_stats_test.vcxproj.filters deleted file mode 100644 index f929b11d27..0000000000 --- a/vsprojects/vcxproj/test/time_averaged_stats_test/time_averaged_stats_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {3ae9b74a-a9ce-be77-0ae2-eccac8c26481} - - - {33ecfa3a-0016-0a7a-3f66-a48510db49b4} - - - {e7533292-78d7-dd3f-717d-3a967e7f330f} - - - - diff --git a/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj b/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj deleted file mode 100644 index 76efe30394..0000000000 --- a/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {EA073C36-A527-F749-AD4A-243A38B9BFF5} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - timeout_encoding_test - static - Debug - static - Debug - - - timeout_encoding_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj.filters b/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj.filters deleted file mode 100644 index d5fafc20ed..0000000000 --- a/vsprojects/vcxproj/test/timeout_encoding_test/timeout_encoding_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\transport - - - - - - {e72041d4-0db2-182a-57e8-b9fee2cc5d5c} - - - {d206de38-b798-fdd8-f0f0-3ffa5b21c386} - - - {3178e0c5-5a68-26eb-6bf6-a5a8dabb0a3c} - - - - diff --git a/vsprojects/vcxproj/test/timer_heap_test/timer_heap_test.vcxproj b/vsprojects/vcxproj/test/timer_heap_test/timer_heap_test.vcxproj deleted file mode 100644 index 6718a56c40..0000000000 --- a/vsprojects/vcxproj/test/timer_heap_test/timer_heap_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A2110C60-E75A-F76E-205E-1836F86C4D53} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - timer_heap_test - static - Debug - static - Debug - - - timer_heap_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/timer_heap_test/timer_heap_test.vcxproj.filters b/vsprojects/vcxproj/test/timer_heap_test/timer_heap_test.vcxproj.filters deleted file mode 100644 index 2ea0d032af..0000000000 --- a/vsprojects/vcxproj/test/timer_heap_test/timer_heap_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {c7789d63-cb31-a5ba-a830-4a6223e5561c} - - - {320a9cb8-0041-acb0-79d5-6cff8f1fdeba} - - - {df867a7c-861e-6482-a5b2-35a8ca345a6a} - - - - diff --git a/vsprojects/vcxproj/test/timer_list_test/timer_list_test.vcxproj b/vsprojects/vcxproj/test/timer_list_test/timer_list_test.vcxproj deleted file mode 100644 index 06249604bb..0000000000 --- a/vsprojects/vcxproj/test/timer_list_test/timer_list_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C43EA45B-1E72-C58D-8CE3-A879D1B1E2DB} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - timer_list_test - static - Debug - static - Debug - - - timer_list_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/timer_list_test/timer_list_test.vcxproj.filters b/vsprojects/vcxproj/test/timer_list_test/timer_list_test.vcxproj.filters deleted file mode 100644 index c6a4a3ef2f..0000000000 --- a/vsprojects/vcxproj/test/timer_list_test/timer_list_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {ce536631-1d52-1c3c-8eed-efe2f4bae6ed} - - - {b877a050-4172-3910-dede-77628e0ef150} - - - {087dd179-d26d-8e56-707b-6059afbfd70a} - - - - diff --git a/vsprojects/vcxproj/test/transport_connectivity_state_test/transport_connectivity_state_test.vcxproj b/vsprojects/vcxproj/test/transport_connectivity_state_test/transport_connectivity_state_test.vcxproj deleted file mode 100644 index fd41bd7d3f..0000000000 --- a/vsprojects/vcxproj/test/transport_connectivity_state_test/transport_connectivity_state_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {659121F6-1639-AC6B-053E-9D17A8B94D56} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - transport_connectivity_state_test - static - Debug - static - Debug - - - transport_connectivity_state_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/transport_connectivity_state_test/transport_connectivity_state_test.vcxproj.filters b/vsprojects/vcxproj/test/transport_connectivity_state_test/transport_connectivity_state_test.vcxproj.filters deleted file mode 100644 index 302a6348aa..0000000000 --- a/vsprojects/vcxproj/test/transport_connectivity_state_test/transport_connectivity_state_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\transport - - - - - - {714707eb-8e3c-a990-6aaf-a23ea345f0cc} - - - {b79db837-dc1a-74b2-dc04-664d00ca3ec7} - - - {21b47183-e00e-b938-5cae-9f2d972d032b} - - - - diff --git a/vsprojects/vcxproj/test/transport_metadata_test/transport_metadata_test.vcxproj b/vsprojects/vcxproj/test/transport_metadata_test/transport_metadata_test.vcxproj deleted file mode 100644 index 4debc5b809..0000000000 --- a/vsprojects/vcxproj/test/transport_metadata_test/transport_metadata_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - transport_metadata_test - static - Debug - static - Debug - - - transport_metadata_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/transport_metadata_test/transport_metadata_test.vcxproj.filters b/vsprojects/vcxproj/test/transport_metadata_test/transport_metadata_test.vcxproj.filters deleted file mode 100644 index 0336b2c5e1..0000000000 --- a/vsprojects/vcxproj/test/transport_metadata_test/transport_metadata_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\transport - - - - - - {b18998d2-bb48-e83a-c175-51f6a84b5c08} - - - {ba6b759a-b969-e5f5-fdab-e36acff02dee} - - - {76b131e7-136d-5db2-d57c-e6f1cd0c9b67} - - - - diff --git a/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj deleted file mode 100644 index b37310d7b0..0000000000 --- a/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B8790A2E-1106-2510-9D95-32C1D68E72EE} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - transport_pid_controller_test - static - Debug - static - Debug - - - transport_pid_controller_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters deleted file mode 100644 index bfc3b8baf1..0000000000 --- a/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\transport - - - - - - {dd5fb527-8567-108a-e6d2-51380df8a82f} - - - {18437a81-c8a9-fd37-ad74-63e9ebf0eb7a} - - - {6325372c-19b9-37ab-e8ff-16554de3bb3b} - - - - diff --git a/vsprojects/vcxproj/test/unknown_frame_bad_client_test/unknown_frame_bad_client_test.vcxproj b/vsprojects/vcxproj/test/unknown_frame_bad_client_test/unknown_frame_bad_client_test.vcxproj deleted file mode 100644 index 3fc458ee3d..0000000000 --- a/vsprojects/vcxproj/test/unknown_frame_bad_client_test/unknown_frame_bad_client_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - unknown_frame_bad_client_test - static - Debug - static - Debug - - - unknown_frame_bad_client_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {BA67B418-B699-E41A-9CC4-0279C49481A5} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/unknown_frame_bad_client_test/unknown_frame_bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/unknown_frame_bad_client_test/unknown_frame_bad_client_test.vcxproj.filters deleted file mode 100644 index 3d7e624414..0000000000 --- a/vsprojects/vcxproj/test/unknown_frame_bad_client_test/unknown_frame_bad_client_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\bad_client\tests - - - - - - {77ca54f4-deb2-3a34-5548-0a2bc7cbacc1} - - - {2e30ac00-932d-ab0d-fabf-e0ea035aae46} - - - {527abde4-b314-c50f-b007-dd3fdb2445ba} - - - {691de782-c331-3836-ac26-43873334f0c0} - - - - diff --git a/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj b/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj deleted file mode 100644 index d5229e06cb..0000000000 --- a/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E35C24A0-8725-E773-FE78-CC0C67071EF7} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - uri_parser_test - static - Debug - static - Debug - - - uri_parser_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj.filters b/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj.filters deleted file mode 100644 index bafab6af63..0000000000 --- a/vsprojects/vcxproj/test/uri_parser_test/uri_parser_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\client_channel - - - - - - {4d026376-ec29-de8b-a02b-d11e45900c44} - - - {5e9a3063-bec4-a26c-b10d-13c866d4e639} - - - {1d9f3085-019b-9673-74b6-55a857b824af} - - - - diff --git a/vsprojects/vcxproj/test/window_overflow_bad_client_test/window_overflow_bad_client_test.vcxproj b/vsprojects/vcxproj/test/window_overflow_bad_client_test/window_overflow_bad_client_test.vcxproj deleted file mode 100644 index a40c9b99cb..0000000000 --- a/vsprojects/vcxproj/test/window_overflow_bad_client_test/window_overflow_bad_client_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {658D7F7F-9628-6545-743C-D949301DC5DC} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - window_overflow_bad_client_test - static - Debug - static - Debug - - - window_overflow_bad_client_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {BA67B418-B699-E41A-9CC4-0279C49481A5} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/window_overflow_bad_client_test/window_overflow_bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/window_overflow_bad_client_test/window_overflow_bad_client_test.vcxproj.filters deleted file mode 100644 index da3c78e08e..0000000000 --- a/vsprojects/vcxproj/test/window_overflow_bad_client_test/window_overflow_bad_client_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\bad_client\tests - - - - - - {c270dcf6-4757-dece-6b4b-d6dbec5ba9bb} - - - {398af61c-4b69-7c31-c998-87171592d8d8} - - - {d33ad218-2037-5421-b068-3223bb97034d} - - - {4464f56e-aa09-7c83-5889-35a0644fab2f} - - - - diff --git a/vsprojects/vcxproj/test_tcp_server/test_tcp_server.vcxproj b/vsprojects/vcxproj/test_tcp_server/test_tcp_server.vcxproj deleted file mode 100644 index d0bf6c085b..0000000000 --- a/vsprojects/vcxproj/test_tcp_server/test_tcp_server.vcxproj +++ /dev/null @@ -1,179 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E3110C46-A148-FF65-08FD-3324829BE7FE} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - test_tcp_server - - - test_tcp_server - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test_tcp_server/test_tcp_server.vcxproj.filters b/vsprojects/vcxproj/test_tcp_server/test_tcp_server.vcxproj.filters deleted file mode 100644 index c04fa58110..0000000000 --- a/vsprojects/vcxproj/test_tcp_server/test_tcp_server.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - test\core\util - - - - - test\core\util - - - - - - {28134501-94bd-f7ba-b77b-c4863be94758} - - - {6e538eb5-ce76-212d-d785-e8450b89f1ba} - - - {f33a1bbf-69a0-d776-ab7c-2fd5c382b6d3} - - - - diff --git a/vsprojects/vcxproj/z/z.vcxproj b/vsprojects/vcxproj/z/z.vcxproj deleted file mode 100644 index 4505dfadb2..0000000000 --- a/vsprojects/vcxproj/z/z.vcxproj +++ /dev/null @@ -1,203 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {FBADE9E3-6A3F-36D3-D676-C1B808451DD7} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - z - - - z - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/z/z.vcxproj.filters b/vsprojects/vcxproj/z/z.vcxproj.filters deleted file mode 100644 index 4aea144f61..0000000000 --- a/vsprojects/vcxproj/z/z.vcxproj.filters +++ /dev/null @@ -1,95 +0,0 @@ - - - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - third_party\zlib - - - - - - {ec647746-5bc0-66f4-80c6-a5dbd9f9db6f} - - - {3c4d2d48-67ef-199d-360e-79e7f5cad175} - - - - -- cgit v1.2.3 From 071cacf1cb9ad742c51415a1e8d3bfffa644d838 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 17 Nov 2016 13:17:56 -0800 Subject: Rename security handshaker files. --- BUILD | 12 +- CMakeLists.txt | 4 +- Makefile | 6 +- binding.gyp | 2 +- build.yaml | 4 +- config.m4 | 2 +- gRPC-Core.podspec | 6 +- grpc.gemspec | 4 +- package.xml | 4 +- src/core/lib/http/httpcli_security_connector.c | 2 +- src/core/lib/security/transport/handshake.c | 393 --------------------- src/core/lib/security/transport/handshake.h | 46 --- .../lib/security/transport/security_connector.c | 2 +- .../lib/security/transport/security_handshaker.c | 393 +++++++++++++++++++++ .../lib/security/transport/security_handshaker.h | 46 +++ src/python/grpcio/grpc_core_dependencies.py | 2 +- tools/doxygen/Doxyfile.core.internal | 4 +- tools/run_tests/sources_and_headers.json | 6 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 6 +- 19 files changed, 472 insertions(+), 472 deletions(-) delete mode 100644 src/core/lib/security/transport/handshake.c delete mode 100644 src/core/lib/security/transport/handshake.h create mode 100644 src/core/lib/security/transport/security_handshaker.c create mode 100644 src/core/lib/security/transport/security_handshaker.h (limited to 'src/core') diff --git a/BUILD b/BUILD index 340e2f718d..531663652e 100644 --- a/BUILD +++ b/BUILD @@ -287,9 +287,9 @@ cc_library( "src/core/lib/security/credentials/plugin/plugin_credentials.h", "src/core/lib/security/credentials/ssl/ssl_credentials.h", "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", "src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/security_handshaker.h", "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/b64.h", "src/core/lib/security/util/json_util.h", @@ -482,9 +482,9 @@ cc_library( "src/core/lib/security/credentials/plugin/plugin_credentials.c", "src/core/lib/security/credentials/ssl/ssl_credentials.c", "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", "src/core/lib/security/transport/secure_endpoint.c", "src/core/lib/security/transport/security_connector.c", + "src/core/lib/security/transport/security_handshaker.c", "src/core/lib/security/transport/server_auth_filter.c", "src/core/lib/security/transport/tsi_error.c", "src/core/lib/security/util/b64.c", @@ -741,9 +741,9 @@ cc_library( "src/core/lib/security/credentials/plugin/plugin_credentials.h", "src/core/lib/security/credentials/ssl/ssl_credentials.h", "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", "src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/security_handshaker.h", "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/b64.h", "src/core/lib/security/util/json_util.h", @@ -926,9 +926,9 @@ cc_library( "src/core/lib/security/credentials/plugin/plugin_credentials.c", "src/core/lib/security/credentials/ssl/ssl_credentials.c", "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", "src/core/lib/security/transport/secure_endpoint.c", "src/core/lib/security/transport/security_connector.c", + "src/core/lib/security/transport/security_handshaker.c", "src/core/lib/security/transport/server_auth_filter.c", "src/core/lib/security/transport/tsi_error.c", "src/core/lib/security/util/b64.c", @@ -2154,9 +2154,9 @@ objc_library( "src/core/lib/security/credentials/plugin/plugin_credentials.c", "src/core/lib/security/credentials/ssl/ssl_credentials.c", "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", "src/core/lib/security/transport/secure_endpoint.c", "src/core/lib/security/transport/security_connector.c", + "src/core/lib/security/transport/security_handshaker.c", "src/core/lib/security/transport/server_auth_filter.c", "src/core/lib/security/transport/tsi_error.c", "src/core/lib/security/util/b64.c", @@ -2374,9 +2374,9 @@ objc_library( "src/core/lib/security/credentials/plugin/plugin_credentials.h", "src/core/lib/security/credentials/ssl/ssl_credentials.h", "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", "src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/security_handshaker.h", "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/b64.h", "src/core/lib/security/util/json_util.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 99f8195d10..10c927556a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -436,9 +436,9 @@ add_library(grpc src/core/lib/security/credentials/plugin/plugin_credentials.c src/core/lib/security/credentials/ssl/ssl_credentials.c src/core/lib/security/transport/client_auth_filter.c - src/core/lib/security/transport/handshake.c src/core/lib/security/transport/secure_endpoint.c src/core/lib/security/transport/security_connector.c + src/core/lib/security/transport/security_handshaker.c src/core/lib/security/transport/server_auth_filter.c src/core/lib/security/transport/tsi_error.c src/core/lib/security/util/b64.c @@ -739,9 +739,9 @@ add_library(grpc_cronet src/core/lib/security/credentials/plugin/plugin_credentials.c src/core/lib/security/credentials/ssl/ssl_credentials.c src/core/lib/security/transport/client_auth_filter.c - src/core/lib/security/transport/handshake.c src/core/lib/security/transport/secure_endpoint.c src/core/lib/security/transport/security_connector.c + src/core/lib/security/transport/security_handshaker.c src/core/lib/security/transport/server_auth_filter.c src/core/lib/security/transport/tsi_error.c src/core/lib/security/util/b64.c diff --git a/Makefile b/Makefile index 70e96443cf..9b17a02a98 100644 --- a/Makefile +++ b/Makefile @@ -2770,9 +2770,9 @@ LIBGRPC_SRC = \ src/core/lib/security/credentials/plugin/plugin_credentials.c \ src/core/lib/security/credentials/ssl/ssl_credentials.c \ src/core/lib/security/transport/client_auth_filter.c \ - src/core/lib/security/transport/handshake.c \ src/core/lib/security/transport/secure_endpoint.c \ src/core/lib/security/transport/security_connector.c \ + src/core/lib/security/transport/security_handshaker.c \ src/core/lib/security/transport/server_auth_filter.c \ src/core/lib/security/transport/tsi_error.c \ src/core/lib/security/util/b64.c \ @@ -3089,9 +3089,9 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/security/credentials/plugin/plugin_credentials.c \ src/core/lib/security/credentials/ssl/ssl_credentials.c \ src/core/lib/security/transport/client_auth_filter.c \ - src/core/lib/security/transport/handshake.c \ src/core/lib/security/transport/secure_endpoint.c \ src/core/lib/security/transport/security_connector.c \ + src/core/lib/security/transport/security_handshaker.c \ src/core/lib/security/transport/server_auth_filter.c \ src/core/lib/security/transport/tsi_error.c \ src/core/lib/security/util/b64.c \ @@ -16532,9 +16532,9 @@ src/core/lib/security/credentials/oauth2/oauth2_credentials.c: $(OPENSSL_DEP) src/core/lib/security/credentials/plugin/plugin_credentials.c: $(OPENSSL_DEP) src/core/lib/security/credentials/ssl/ssl_credentials.c: $(OPENSSL_DEP) src/core/lib/security/transport/client_auth_filter.c: $(OPENSSL_DEP) -src/core/lib/security/transport/handshake.c: $(OPENSSL_DEP) src/core/lib/security/transport/secure_endpoint.c: $(OPENSSL_DEP) src/core/lib/security/transport/security_connector.c: $(OPENSSL_DEP) +src/core/lib/security/transport/security_handshaker.c: $(OPENSSL_DEP) src/core/lib/security/transport/server_auth_filter.c: $(OPENSSL_DEP) src/core/lib/security/transport/tsi_error.c: $(OPENSSL_DEP) src/core/lib/security/util/b64.c: $(OPENSSL_DEP) diff --git a/binding.gyp b/binding.gyp index 1341f33975..369a34ab9e 100644 --- a/binding.gyp +++ b/binding.gyp @@ -718,9 +718,9 @@ 'src/core/lib/security/credentials/plugin/plugin_credentials.c', 'src/core/lib/security/credentials/ssl/ssl_credentials.c', 'src/core/lib/security/transport/client_auth_filter.c', - 'src/core/lib/security/transport/handshake.c', 'src/core/lib/security/transport/secure_endpoint.c', 'src/core/lib/security/transport/security_connector.c', + 'src/core/lib/security/transport/security_handshaker.c', 'src/core/lib/security/transport/server_auth_filter.c', 'src/core/lib/security/transport/tsi_error.c', 'src/core/lib/security/util/b64.c', diff --git a/build.yaml b/build.yaml index 52c2cae2cb..dbc4cf813b 100644 --- a/build.yaml +++ b/build.yaml @@ -495,9 +495,9 @@ filegroups: - src/core/lib/security/credentials/plugin/plugin_credentials.h - src/core/lib/security/credentials/ssl/ssl_credentials.h - src/core/lib/security/transport/auth_filters.h - - src/core/lib/security/transport/handshake.h - src/core/lib/security/transport/secure_endpoint.h - src/core/lib/security/transport/security_connector.h + - src/core/lib/security/transport/security_handshaker.h - src/core/lib/security/transport/tsi_error.h - src/core/lib/security/util/b64.h - src/core/lib/security/util/json_util.h @@ -518,9 +518,9 @@ filegroups: - src/core/lib/security/credentials/plugin/plugin_credentials.c - src/core/lib/security/credentials/ssl/ssl_credentials.c - src/core/lib/security/transport/client_auth_filter.c - - src/core/lib/security/transport/handshake.c - src/core/lib/security/transport/secure_endpoint.c - src/core/lib/security/transport/security_connector.c + - src/core/lib/security/transport/security_handshaker.c - src/core/lib/security/transport/server_auth_filter.c - src/core/lib/security/transport/tsi_error.c - src/core/lib/security/util/b64.c diff --git a/config.m4 b/config.m4 index ff5ae29167..157ec3f1d5 100644 --- a/config.m4 +++ b/config.m4 @@ -232,9 +232,9 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/security/credentials/plugin/plugin_credentials.c \ src/core/lib/security/credentials/ssl/ssl_credentials.c \ src/core/lib/security/transport/client_auth_filter.c \ - src/core/lib/security/transport/handshake.c \ src/core/lib/security/transport/secure_endpoint.c \ src/core/lib/security/transport/security_connector.c \ + src/core/lib/security/transport/security_handshaker.c \ src/core/lib/security/transport/server_auth_filter.c \ src/core/lib/security/transport/tsi_error.c \ src/core/lib/security/util/b64.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index d645307536..14838da8ca 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -376,9 +376,9 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials/plugin/plugin_credentials.h', 'src/core/lib/security/credentials/ssl/ssl_credentials.h', 'src/core/lib/security/transport/auth_filters.h', - 'src/core/lib/security/transport/handshake.h', 'src/core/lib/security/transport/secure_endpoint.h', 'src/core/lib/security/transport/security_connector.h', + 'src/core/lib/security/transport/security_handshaker.h', 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/b64.h', 'src/core/lib/security/util/json_util.h', @@ -575,9 +575,9 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials/plugin/plugin_credentials.c', 'src/core/lib/security/credentials/ssl/ssl_credentials.c', 'src/core/lib/security/transport/client_auth_filter.c', - 'src/core/lib/security/transport/handshake.c', 'src/core/lib/security/transport/secure_endpoint.c', 'src/core/lib/security/transport/security_connector.c', + 'src/core/lib/security/transport/security_handshaker.c', 'src/core/lib/security/transport/server_auth_filter.c', 'src/core/lib/security/transport/tsi_error.c', 'src/core/lib/security/util/b64.c', @@ -781,9 +781,9 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials/plugin/plugin_credentials.h', 'src/core/lib/security/credentials/ssl/ssl_credentials.h', 'src/core/lib/security/transport/auth_filters.h', - 'src/core/lib/security/transport/handshake.h', 'src/core/lib/security/transport/secure_endpoint.h', 'src/core/lib/security/transport/security_connector.h', + 'src/core/lib/security/transport/security_handshaker.h', 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/b64.h', 'src/core/lib/security/util/json_util.h', diff --git a/grpc.gemspec b/grpc.gemspec index 3c5c6fae05..197da23e3d 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -296,9 +296,9 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/security/credentials/plugin/plugin_credentials.h ) s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.h ) s.files += %w( src/core/lib/security/transport/auth_filters.h ) - s.files += %w( src/core/lib/security/transport/handshake.h ) s.files += %w( src/core/lib/security/transport/secure_endpoint.h ) s.files += %w( src/core/lib/security/transport/security_connector.h ) + s.files += %w( src/core/lib/security/transport/security_handshaker.h ) s.files += %w( src/core/lib/security/transport/tsi_error.h ) s.files += %w( src/core/lib/security/util/b64.h ) s.files += %w( src/core/lib/security/util/json_util.h ) @@ -495,9 +495,9 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/security/credentials/plugin/plugin_credentials.c ) s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.c ) s.files += %w( src/core/lib/security/transport/client_auth_filter.c ) - s.files += %w( src/core/lib/security/transport/handshake.c ) s.files += %w( src/core/lib/security/transport/secure_endpoint.c ) s.files += %w( src/core/lib/security/transport/security_connector.c ) + s.files += %w( src/core/lib/security/transport/security_handshaker.c ) s.files += %w( src/core/lib/security/transport/server_auth_filter.c ) s.files += %w( src/core/lib/security/transport/tsi_error.c ) s.files += %w( src/core/lib/security/util/b64.c ) diff --git a/package.xml b/package.xml index e0dbe9488d..163745a2ad 100644 --- a/package.xml +++ b/package.xml @@ -303,9 +303,9 @@ - + @@ -502,9 +502,9 @@ - + diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index dd21513269..9e7e3e2fa1 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -40,7 +40,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/security/transport/handshake.h" +#include "src/core/lib/security/transport/security_handshaker.h" #include "src/core/lib/support/string.h" #include "src/core/lib/tsi/ssl_transport_security.h" diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c deleted file mode 100644 index 27dd0251d9..0000000000 --- a/src/core/lib/security/transport/handshake.c +++ /dev/null @@ -1,393 +0,0 @@ -/* - * - * Copyright 2015, 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 "src/core/lib/security/transport/handshake.h" - -#include -#include - -#include -#include -#include - -#include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/channel/handshaker.h" -#include "src/core/lib/security/context/security_context.h" -#include "src/core/lib/security/transport/secure_endpoint.h" -#include "src/core/lib/security/transport/tsi_error.h" - -#define GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE 256 - -typedef struct { - grpc_handshaker base; - // args will be NULL when either there is no handshake in progress or - // when the handshaker is shutting down. - grpc_handshaker_args* args; - grpc_closure* on_handshake_done; - grpc_security_connector *connector; - tsi_handshaker *handshaker; -// FIXME: add locking - unsigned char *handshake_buffer; - size_t handshake_buffer_size; -// FIXME: use args->endpoint instead - grpc_endpoint *wrapped_endpoint; - grpc_endpoint *secure_endpoint; - grpc_slice_buffer left_overs; - grpc_slice_buffer outgoing; - grpc_closure on_handshake_data_sent_to_peer; - grpc_closure on_handshake_data_received_from_peer; - grpc_auth_context *auth_context; - gpr_refcount refs; -} security_handshaker; - -static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, - void *setup, - grpc_error *error); - -static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *setup, - grpc_error *error); - -static void unref_handshake(security_handshaker *h) { - if (gpr_unref(&h->refs)) { - if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker); - if (h->handshake_buffer != NULL) gpr_free(h->handshake_buffer); - grpc_slice_buffer_destroy(&h->left_overs); - grpc_slice_buffer_destroy(&h->outgoing); - GRPC_AUTH_CONTEXT_UNREF(h->auth_context, "handshake"); - GRPC_SECURITY_CONNECTOR_UNREF(h->connector, "handshake"); - gpr_free(h); - } -} - -static void security_handshake_done(grpc_exec_ctx *exec_ctx, - security_handshaker *h, - grpc_error *error) { - if (error == GRPC_ERROR_NONE) { - h->args->endpoint = h->secure_endpoint; - grpc_arg auth_context_arg = grpc_auth_context_to_arg(h->auth_context); - grpc_channel_args* tmp_args = h->args->args; - h->args->args = - grpc_channel_args_copy_and_add(tmp_args, &auth_context_arg, 1); - grpc_channel_args_destroy(tmp_args); - } else { - const char *msg = grpc_error_string(error); - gpr_log(GPR_DEBUG, "Security handshake failed: %s", msg); - grpc_error_free_string(msg); - if (h->secure_endpoint != NULL) { - grpc_endpoint_shutdown(exec_ctx, h->secure_endpoint); -// FIXME: clarify who should destroy... -// grpc_endpoint_destroy(exec_ctx, h->secure_endpoint); -// } else { -// grpc_endpoint_destroy(exec_ctx, h->wrapped_endpoint); - } - } - // Clear out the read buffer before it gets passed to the transport, - // since any excess bytes were already moved to h->left_overs. - grpc_slice_buffer_reset_and_unref(h->args->read_buffer); - h->args = NULL; - grpc_exec_ctx_sched(exec_ctx, h->on_handshake_done, error, NULL); - unref_handshake(h); -} - -static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_security_status status, - grpc_auth_context *auth_context) { - security_handshaker *h = user_data; - tsi_frame_protector *protector; - tsi_result result; - if (status != GRPC_SECURITY_OK) { - security_handshake_done( - exec_ctx, h, - grpc_error_set_int(GRPC_ERROR_CREATE("Error checking peer."), - GRPC_ERROR_INT_SECURITY_STATUS, status)); - return; - } - h->auth_context = GRPC_AUTH_CONTEXT_REF(auth_context, "handshake"); - result = - tsi_handshaker_create_frame_protector(h->handshaker, NULL, &protector); - if (result != TSI_OK) { - security_handshake_done( - exec_ctx, h, - grpc_set_tsi_error_result( - GRPC_ERROR_CREATE("Frame protector creation failed"), result)); - return; - } - h->secure_endpoint = - grpc_secure_endpoint_create(protector, h->wrapped_endpoint, - h->left_overs.slices, h->left_overs.count); - h->left_overs.count = 0; - h->left_overs.length = 0; - security_handshake_done(exec_ctx, h, GRPC_ERROR_NONE); -} - -static void check_peer(grpc_exec_ctx *exec_ctx, security_handshaker *h) { - tsi_peer peer; - tsi_result result = tsi_handshaker_extract_peer(h->handshaker, &peer); - - if (result != TSI_OK) { - security_handshake_done( - exec_ctx, h, grpc_set_tsi_error_result( - GRPC_ERROR_CREATE("Peer extraction failed"), result)); - return; - } - grpc_security_connector_check_peer(exec_ctx, h->connector, peer, - on_peer_checked, h); -} - -static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, - security_handshaker *h) { - size_t offset = 0; - tsi_result result = TSI_OK; - grpc_slice to_send; - - do { - size_t to_send_size = h->handshake_buffer_size - offset; - result = tsi_handshaker_get_bytes_to_send_to_peer( - h->handshaker, h->handshake_buffer + offset, &to_send_size); - offset += to_send_size; - if (result == TSI_INCOMPLETE_DATA) { - h->handshake_buffer_size *= 2; - h->handshake_buffer = - gpr_realloc(h->handshake_buffer, h->handshake_buffer_size); - } - } while (result == TSI_INCOMPLETE_DATA); - - if (result != TSI_OK) { - security_handshake_done(exec_ctx, h, - grpc_set_tsi_error_result( - GRPC_ERROR_CREATE("Handshake failed"), result)); - return; - } - - to_send = - grpc_slice_from_copied_buffer((const char *)h->handshake_buffer, offset); - grpc_slice_buffer_reset_and_unref(&h->outgoing); - grpc_slice_buffer_add(&h->outgoing, to_send); - grpc_endpoint_write(exec_ctx, h->wrapped_endpoint, &h->outgoing, - &h->on_handshake_data_sent_to_peer); -} - -static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, - void *handshake, - grpc_error *error) { - security_handshaker *h = handshake; - size_t consumed_slice_size = 0; - tsi_result result = TSI_OK; - size_t i; - size_t num_left_overs; - int has_left_overs_in_current_slice = 0; - - if (error != GRPC_ERROR_NONE) { - security_handshake_done( - exec_ctx, h, - GRPC_ERROR_CREATE_REFERENCING("Handshake read failed", &error, 1)); - return; - } - - for (i = 0; i < h->args->read_buffer->count; i++) { - consumed_slice_size = GRPC_SLICE_LENGTH(h->args->read_buffer->slices[i]); - result = tsi_handshaker_process_bytes_from_peer( - h->handshaker, GRPC_SLICE_START_PTR(h->args->read_buffer->slices[i]), - &consumed_slice_size); - if (!tsi_handshaker_is_in_progress(h->handshaker)) break; - } - - if (tsi_handshaker_is_in_progress(h->handshaker)) { - /* We may need more data. */ - if (result == TSI_INCOMPLETE_DATA) { - grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, h->args->read_buffer, - &h->on_handshake_data_received_from_peer); - return; - } else { - send_handshake_bytes_to_peer(exec_ctx, h); - return; - } - } - - if (result != TSI_OK) { - security_handshake_done(exec_ctx, h, - grpc_set_tsi_error_result( - GRPC_ERROR_CREATE("Handshake failed"), result)); - return; - } - - /* Handshake is done and successful this point. */ - has_left_overs_in_current_slice = - (consumed_slice_size < - GRPC_SLICE_LENGTH(h->args->read_buffer->slices[i])); - num_left_overs = - (has_left_overs_in_current_slice ? 1 : 0) - + h->args->read_buffer->count - i - 1; - if (num_left_overs > 0) { - /* Put the leftovers in our buffer (ownership transfered). */ - if (has_left_overs_in_current_slice) { - grpc_slice_buffer_add( - &h->left_overs, - grpc_slice_split_tail(&h->args->read_buffer->slices[i], - consumed_slice_size)); - /* split_tail above increments refcount. */ - grpc_slice_unref(h->args->read_buffer->slices[i]); - } - grpc_slice_buffer_addn( - &h->left_overs, &h->args->read_buffer->slices[i + 1], - num_left_overs - (size_t)has_left_overs_in_current_slice); - } - - check_peer(exec_ctx, h); -} - -/* If handshake is NULL, the handshake is done. */ -static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, - void *handshake, grpc_error *error) { - security_handshaker *h = handshake; - - /* Make sure that write is OK. */ - if (error != GRPC_ERROR_NONE) { - if (handshake != NULL) - security_handshake_done( - exec_ctx, h, - GRPC_ERROR_CREATE_REFERENCING("Handshake write failed", &error, 1)); - return; - } - - /* We may be done. */ - if (tsi_handshaker_is_in_progress(h->handshaker)) { - grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, h->args->read_buffer, - &h->on_handshake_data_received_from_peer); - } else { - check_peer(exec_ctx, h); - } -} - -// -// public handshaker API -// - -static void security_handshaker_destroy(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { - security_handshaker* h = (security_handshaker*)handshaker; - unref_handshake(h); -} - -static void security_handshaker_shutdown(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { - security_handshaker *h = (security_handshaker*)handshaker; - if (h->args != NULL) { - grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); - } -} - -static void security_handshaker_do_handshake( - grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, - grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, - grpc_handshaker_args* args) { - security_handshaker* h = (security_handshaker*)handshaker; - h->args = args; - h->on_handshake_done = on_handshake_done; - h->wrapped_endpoint = args->endpoint; // FIXME: remove? - gpr_ref(&h->refs); - send_handshake_bytes_to_peer(exec_ctx, h); -} - -static const grpc_handshaker_vtable security_handshaker_vtable = { - security_handshaker_destroy, security_handshaker_shutdown, - security_handshaker_do_handshake}; - -static grpc_handshaker* security_handshaker_create( - grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, - grpc_security_connector *connector) { - security_handshaker *h = gpr_malloc(sizeof(security_handshaker)); - memset(h, 0, sizeof(security_handshaker)); - grpc_handshaker_init(&security_handshaker_vtable, &h->base); - h->handshaker = handshaker; - h->connector = GRPC_SECURITY_CONNECTOR_REF(connector, "handshake"); - h->handshake_buffer_size = GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE; - h->handshake_buffer = gpr_malloc(h->handshake_buffer_size); - gpr_ref_init(&h->refs, 1); - grpc_closure_init(&h->on_handshake_data_sent_to_peer, - on_handshake_data_sent_to_peer, h); - grpc_closure_init(&h->on_handshake_data_received_from_peer, - on_handshake_data_received_from_peer, h); - grpc_slice_buffer_init(&h->left_overs); - grpc_slice_buffer_init(&h->outgoing); - return &h->base; -} - -// -// fail_handshaker -// - -static void fail_handshaker_destroy(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { - gpr_free(handshaker); -} - -static void fail_handshaker_shutdown(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) {} - -static void fail_handshaker_do_handshake( - grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, - grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, - grpc_handshaker_args* args) { - grpc_exec_ctx_sched( - exec_ctx, on_handshake_done, - GRPC_ERROR_CREATE("Failed to create security handshaker"), NULL); -} - -static const grpc_handshaker_vtable fail_handshaker_vtable = { - fail_handshaker_destroy, fail_handshaker_shutdown, - fail_handshaker_do_handshake}; - -static grpc_handshaker* fail_handshaker_create() { - grpc_handshaker* h = gpr_malloc(sizeof(*h)); - grpc_handshaker_init(&fail_handshaker_vtable, h); - return h; -} - -// -// exported functions -// - -void grpc_security_create_handshakers( - grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, - grpc_security_connector *connector, grpc_handshake_manager *handshake_mgr) { - // If no TSI handshaker was created, add a handshaker that always fails. - // Otherwise, add a real security handshaker. - if (handshaker == NULL) { - grpc_handshake_manager_add(handshake_mgr, fail_handshaker_create()); - } else { - grpc_handshake_manager_add( - handshake_mgr, - security_handshaker_create(exec_ctx, handshaker, connector)); - } -} diff --git a/src/core/lib/security/transport/handshake.h b/src/core/lib/security/transport/handshake.h deleted file mode 100644 index 14b60ef37f..0000000000 --- a/src/core/lib/security/transport/handshake.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright 2015, 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. - * - */ - -#ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_HANDSHAKE_H -#define GRPC_CORE_LIB_SECURITY_TRANSPORT_HANDSHAKE_H - -#include "src/core/lib/iomgr/endpoint.h" -#include "src/core/lib/security/transport/security_connector.h" - -/// Creates any necessary security handshakers and adds them to -/// \a handshake_mgr. -void grpc_security_create_handshakers( - grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, - grpc_security_connector *connector, grpc_handshake_manager *handshake_mgr); - -#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_HANDSHAKE_H */ diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index c058890a55..ac68ab3125 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -46,8 +46,8 @@ #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/security/transport/handshake.h" #include "src/core/lib/security/transport/secure_endpoint.h" +#include "src/core/lib/security/transport/security_handshaker.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" #include "src/core/lib/tsi/fake_transport_security.h" diff --git a/src/core/lib/security/transport/security_handshaker.c b/src/core/lib/security/transport/security_handshaker.c new file mode 100644 index 0000000000..4b04f58bfd --- /dev/null +++ b/src/core/lib/security/transport/security_handshaker.c @@ -0,0 +1,393 @@ +/* + * + * Copyright 2015, 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 "src/core/lib/security/transport/security_handshaker.h" + +#include +#include + +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/handshaker.h" +#include "src/core/lib/security/context/security_context.h" +#include "src/core/lib/security/transport/secure_endpoint.h" +#include "src/core/lib/security/transport/tsi_error.h" + +#define GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE 256 + +typedef struct { + grpc_handshaker base; + // args will be NULL when either there is no handshake in progress or + // when the handshaker is shutting down. + grpc_handshaker_args* args; + grpc_closure* on_handshake_done; + grpc_security_connector *connector; + tsi_handshaker *handshaker; +// FIXME: add locking + unsigned char *handshake_buffer; + size_t handshake_buffer_size; +// FIXME: use args->endpoint instead + grpc_endpoint *wrapped_endpoint; + grpc_endpoint *secure_endpoint; + grpc_slice_buffer left_overs; + grpc_slice_buffer outgoing; + grpc_closure on_handshake_data_sent_to_peer; + grpc_closure on_handshake_data_received_from_peer; + grpc_auth_context *auth_context; + gpr_refcount refs; +} security_handshaker; + +static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, + void *setup, + grpc_error *error); + +static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *setup, + grpc_error *error); + +static void unref_handshake(security_handshaker *h) { + if (gpr_unref(&h->refs)) { + if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker); + if (h->handshake_buffer != NULL) gpr_free(h->handshake_buffer); + grpc_slice_buffer_destroy(&h->left_overs); + grpc_slice_buffer_destroy(&h->outgoing); + GRPC_AUTH_CONTEXT_UNREF(h->auth_context, "handshake"); + GRPC_SECURITY_CONNECTOR_UNREF(h->connector, "handshake"); + gpr_free(h); + } +} + +static void security_handshake_done(grpc_exec_ctx *exec_ctx, + security_handshaker *h, + grpc_error *error) { + if (error == GRPC_ERROR_NONE) { + h->args->endpoint = h->secure_endpoint; + grpc_arg auth_context_arg = grpc_auth_context_to_arg(h->auth_context); + grpc_channel_args* tmp_args = h->args->args; + h->args->args = + grpc_channel_args_copy_and_add(tmp_args, &auth_context_arg, 1); + grpc_channel_args_destroy(tmp_args); + } else { + const char *msg = grpc_error_string(error); + gpr_log(GPR_DEBUG, "Security handshake failed: %s", msg); + grpc_error_free_string(msg); + if (h->secure_endpoint != NULL) { + grpc_endpoint_shutdown(exec_ctx, h->secure_endpoint); +// FIXME: clarify who should destroy... +// grpc_endpoint_destroy(exec_ctx, h->secure_endpoint); +// } else { +// grpc_endpoint_destroy(exec_ctx, h->wrapped_endpoint); + } + } + // Clear out the read buffer before it gets passed to the transport, + // since any excess bytes were already moved to h->left_overs. + grpc_slice_buffer_reset_and_unref(h->args->read_buffer); + h->args = NULL; + grpc_exec_ctx_sched(exec_ctx, h->on_handshake_done, error, NULL); + unref_handshake(h); +} + +static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data, + grpc_security_status status, + grpc_auth_context *auth_context) { + security_handshaker *h = user_data; + tsi_frame_protector *protector; + tsi_result result; + if (status != GRPC_SECURITY_OK) { + security_handshake_done( + exec_ctx, h, + grpc_error_set_int(GRPC_ERROR_CREATE("Error checking peer."), + GRPC_ERROR_INT_SECURITY_STATUS, status)); + return; + } + h->auth_context = GRPC_AUTH_CONTEXT_REF(auth_context, "handshake"); + result = + tsi_handshaker_create_frame_protector(h->handshaker, NULL, &protector); + if (result != TSI_OK) { + security_handshake_done( + exec_ctx, h, + grpc_set_tsi_error_result( + GRPC_ERROR_CREATE("Frame protector creation failed"), result)); + return; + } + h->secure_endpoint = + grpc_secure_endpoint_create(protector, h->wrapped_endpoint, + h->left_overs.slices, h->left_overs.count); + h->left_overs.count = 0; + h->left_overs.length = 0; + security_handshake_done(exec_ctx, h, GRPC_ERROR_NONE); +} + +static void check_peer(grpc_exec_ctx *exec_ctx, security_handshaker *h) { + tsi_peer peer; + tsi_result result = tsi_handshaker_extract_peer(h->handshaker, &peer); + + if (result != TSI_OK) { + security_handshake_done( + exec_ctx, h, grpc_set_tsi_error_result( + GRPC_ERROR_CREATE("Peer extraction failed"), result)); + return; + } + grpc_security_connector_check_peer(exec_ctx, h->connector, peer, + on_peer_checked, h); +} + +static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, + security_handshaker *h) { + size_t offset = 0; + tsi_result result = TSI_OK; + grpc_slice to_send; + + do { + size_t to_send_size = h->handshake_buffer_size - offset; + result = tsi_handshaker_get_bytes_to_send_to_peer( + h->handshaker, h->handshake_buffer + offset, &to_send_size); + offset += to_send_size; + if (result == TSI_INCOMPLETE_DATA) { + h->handshake_buffer_size *= 2; + h->handshake_buffer = + gpr_realloc(h->handshake_buffer, h->handshake_buffer_size); + } + } while (result == TSI_INCOMPLETE_DATA); + + if (result != TSI_OK) { + security_handshake_done(exec_ctx, h, + grpc_set_tsi_error_result( + GRPC_ERROR_CREATE("Handshake failed"), result)); + return; + } + + to_send = + grpc_slice_from_copied_buffer((const char *)h->handshake_buffer, offset); + grpc_slice_buffer_reset_and_unref(&h->outgoing); + grpc_slice_buffer_add(&h->outgoing, to_send); + grpc_endpoint_write(exec_ctx, h->wrapped_endpoint, &h->outgoing, + &h->on_handshake_data_sent_to_peer); +} + +static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, + void *handshake, + grpc_error *error) { + security_handshaker *h = handshake; + size_t consumed_slice_size = 0; + tsi_result result = TSI_OK; + size_t i; + size_t num_left_overs; + int has_left_overs_in_current_slice = 0; + + if (error != GRPC_ERROR_NONE) { + security_handshake_done( + exec_ctx, h, + GRPC_ERROR_CREATE_REFERENCING("Handshake read failed", &error, 1)); + return; + } + + for (i = 0; i < h->args->read_buffer->count; i++) { + consumed_slice_size = GRPC_SLICE_LENGTH(h->args->read_buffer->slices[i]); + result = tsi_handshaker_process_bytes_from_peer( + h->handshaker, GRPC_SLICE_START_PTR(h->args->read_buffer->slices[i]), + &consumed_slice_size); + if (!tsi_handshaker_is_in_progress(h->handshaker)) break; + } + + if (tsi_handshaker_is_in_progress(h->handshaker)) { + /* We may need more data. */ + if (result == TSI_INCOMPLETE_DATA) { + grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, h->args->read_buffer, + &h->on_handshake_data_received_from_peer); + return; + } else { + send_handshake_bytes_to_peer(exec_ctx, h); + return; + } + } + + if (result != TSI_OK) { + security_handshake_done(exec_ctx, h, + grpc_set_tsi_error_result( + GRPC_ERROR_CREATE("Handshake failed"), result)); + return; + } + + /* Handshake is done and successful this point. */ + has_left_overs_in_current_slice = + (consumed_slice_size < + GRPC_SLICE_LENGTH(h->args->read_buffer->slices[i])); + num_left_overs = + (has_left_overs_in_current_slice ? 1 : 0) + + h->args->read_buffer->count - i - 1; + if (num_left_overs > 0) { + /* Put the leftovers in our buffer (ownership transfered). */ + if (has_left_overs_in_current_slice) { + grpc_slice_buffer_add( + &h->left_overs, + grpc_slice_split_tail(&h->args->read_buffer->slices[i], + consumed_slice_size)); + /* split_tail above increments refcount. */ + grpc_slice_unref(h->args->read_buffer->slices[i]); + } + grpc_slice_buffer_addn( + &h->left_overs, &h->args->read_buffer->slices[i + 1], + num_left_overs - (size_t)has_left_overs_in_current_slice); + } + + check_peer(exec_ctx, h); +} + +/* If handshake is NULL, the handshake is done. */ +static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, + void *handshake, grpc_error *error) { + security_handshaker *h = handshake; + + /* Make sure that write is OK. */ + if (error != GRPC_ERROR_NONE) { + if (handshake != NULL) + security_handshake_done( + exec_ctx, h, + GRPC_ERROR_CREATE_REFERENCING("Handshake write failed", &error, 1)); + return; + } + + /* We may be done. */ + if (tsi_handshaker_is_in_progress(h->handshaker)) { + grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, h->args->read_buffer, + &h->on_handshake_data_received_from_peer); + } else { + check_peer(exec_ctx, h); + } +} + +// +// public handshaker API +// + +static void security_handshaker_destroy(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) { + security_handshaker* h = (security_handshaker*)handshaker; + unref_handshake(h); +} + +static void security_handshaker_shutdown(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) { + security_handshaker *h = (security_handshaker*)handshaker; + if (h->args != NULL) { + grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); + } +} + +static void security_handshaker_do_handshake( + grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, + grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, + grpc_handshaker_args* args) { + security_handshaker* h = (security_handshaker*)handshaker; + h->args = args; + h->on_handshake_done = on_handshake_done; + h->wrapped_endpoint = args->endpoint; // FIXME: remove? + gpr_ref(&h->refs); + send_handshake_bytes_to_peer(exec_ctx, h); +} + +static const grpc_handshaker_vtable security_handshaker_vtable = { + security_handshaker_destroy, security_handshaker_shutdown, + security_handshaker_do_handshake}; + +static grpc_handshaker* security_handshaker_create( + grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, + grpc_security_connector *connector) { + security_handshaker *h = gpr_malloc(sizeof(security_handshaker)); + memset(h, 0, sizeof(security_handshaker)); + grpc_handshaker_init(&security_handshaker_vtable, &h->base); + h->handshaker = handshaker; + h->connector = GRPC_SECURITY_CONNECTOR_REF(connector, "handshake"); + h->handshake_buffer_size = GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE; + h->handshake_buffer = gpr_malloc(h->handshake_buffer_size); + gpr_ref_init(&h->refs, 1); + grpc_closure_init(&h->on_handshake_data_sent_to_peer, + on_handshake_data_sent_to_peer, h); + grpc_closure_init(&h->on_handshake_data_received_from_peer, + on_handshake_data_received_from_peer, h); + grpc_slice_buffer_init(&h->left_overs); + grpc_slice_buffer_init(&h->outgoing); + return &h->base; +} + +// +// fail_handshaker +// + +static void fail_handshaker_destroy(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) { + gpr_free(handshaker); +} + +static void fail_handshaker_shutdown(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) {} + +static void fail_handshaker_do_handshake( + grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, + grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, + grpc_handshaker_args* args) { + grpc_exec_ctx_sched( + exec_ctx, on_handshake_done, + GRPC_ERROR_CREATE("Failed to create security handshaker"), NULL); +} + +static const grpc_handshaker_vtable fail_handshaker_vtable = { + fail_handshaker_destroy, fail_handshaker_shutdown, + fail_handshaker_do_handshake}; + +static grpc_handshaker* fail_handshaker_create() { + grpc_handshaker* h = gpr_malloc(sizeof(*h)); + grpc_handshaker_init(&fail_handshaker_vtable, h); + return h; +} + +// +// exported functions +// + +void grpc_security_create_handshakers( + grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, + grpc_security_connector *connector, grpc_handshake_manager *handshake_mgr) { + // If no TSI handshaker was created, add a handshaker that always fails. + // Otherwise, add a real security handshaker. + if (handshaker == NULL) { + grpc_handshake_manager_add(handshake_mgr, fail_handshaker_create()); + } else { + grpc_handshake_manager_add( + handshake_mgr, + security_handshaker_create(exec_ctx, handshaker, connector)); + } +} diff --git a/src/core/lib/security/transport/security_handshaker.h b/src/core/lib/security/transport/security_handshaker.h new file mode 100644 index 0000000000..9d4157e869 --- /dev/null +++ b/src/core/lib/security/transport/security_handshaker.h @@ -0,0 +1,46 @@ +/* + * + * Copyright 2015, 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. + * + */ + +#ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H +#define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H + +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/security/transport/security_connector.h" + +/// Creates any necessary security handshakers and adds them to +/// \a handshake_mgr. +void grpc_security_create_handshakers( + grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, + grpc_security_connector *connector, grpc_handshake_manager *handshake_mgr); + +#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 8fbf31f184..967a717a23 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -226,9 +226,9 @@ CORE_SOURCE_FILES = [ 'src/core/lib/security/credentials/plugin/plugin_credentials.c', 'src/core/lib/security/credentials/ssl/ssl_credentials.c', 'src/core/lib/security/transport/client_auth_filter.c', - 'src/core/lib/security/transport/handshake.c', 'src/core/lib/security/transport/secure_endpoint.c', 'src/core/lib/security/transport/security_connector.c', + 'src/core/lib/security/transport/security_handshaker.c', 'src/core/lib/security/transport/server_auth_filter.c', 'src/core/lib/security/transport/tsi_error.c', 'src/core/lib/security/util/b64.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 2ae9704f20..3d78f86fdb 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -919,9 +919,9 @@ src/core/lib/security/credentials/oauth2/oauth2_credentials.h \ src/core/lib/security/credentials/plugin/plugin_credentials.h \ src/core/lib/security/credentials/ssl/ssl_credentials.h \ src/core/lib/security/transport/auth_filters.h \ -src/core/lib/security/transport/handshake.h \ src/core/lib/security/transport/secure_endpoint.h \ src/core/lib/security/transport/security_connector.h \ +src/core/lib/security/transport/security_handshaker.h \ src/core/lib/security/transport/tsi_error.h \ src/core/lib/security/util/b64.h \ src/core/lib/security/util/json_util.h \ @@ -1118,9 +1118,9 @@ src/core/lib/security/credentials/oauth2/oauth2_credentials.c \ src/core/lib/security/credentials/plugin/plugin_credentials.c \ src/core/lib/security/credentials/ssl/ssl_credentials.c \ src/core/lib/security/transport/client_auth_filter.c \ -src/core/lib/security/transport/handshake.c \ src/core/lib/security/transport/secure_endpoint.c \ src/core/lib/security/transport/security_connector.c \ +src/core/lib/security/transport/security_handshaker.c \ src/core/lib/security/transport/server_auth_filter.c \ src/core/lib/security/transport/tsi_error.c \ src/core/lib/security/util/b64.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 86d2bca688..0d8337661f 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -7202,9 +7202,9 @@ "src/core/lib/security/credentials/plugin/plugin_credentials.h", "src/core/lib/security/credentials/ssl/ssl_credentials.h", "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", "src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/security_handshaker.h", "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/b64.h", "src/core/lib/security/util/json_util.h" @@ -7243,12 +7243,12 @@ "src/core/lib/security/credentials/ssl/ssl_credentials.h", "src/core/lib/security/transport/auth_filters.h", "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", - "src/core/lib/security/transport/handshake.h", "src/core/lib/security/transport/secure_endpoint.c", "src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/security_connector.c", "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/security_handshaker.c", + "src/core/lib/security/transport/security_handshaker.h", "src/core/lib/security/transport/server_auth_filter.c", "src/core/lib/security/transport/tsi_error.c", "src/core/lib/security/transport/tsi_error.h", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index fbc5f8fd46..6de7469849 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -428,9 +428,9 @@ - + @@ -781,12 +781,12 @@ - - + + -- cgit v1.2.3 From 96df9e5ef136ef1fbceb6f08c7b1711379b6d152 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 17 Nov 2016 14:55:03 -0800 Subject: Use the same synchronization in the insecure server code as in the secure. --- .../chttp2/server/insecure/server_chttp2.c | 197 ++++++++++++++++----- .../chttp2/server/secure/server_secure_chttp2.c | 146 +++++++-------- 2 files changed, 227 insertions(+), 116 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index 127cc19f0b..86d43e5721 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -33,6 +33,8 @@ #include +#include + #include #include #include @@ -47,80 +49,177 @@ #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" -typedef struct server_connection_state { +typedef struct pending_handshake_manager_node { + grpc_handshake_manager* handshake_mgr; + struct pending_handshake_manager_node *next; +} pending_handshake_manager_node; + +typedef struct { grpc_server *server; + grpc_tcp_server *tcp_server; + gpr_mu mu; + bool shutdown; + grpc_closure tcp_server_shutdown_complete; + grpc_closure *server_destroy_listener_done; + pending_handshake_manager_node *pending_handshake_mgrs; +} server_state; + +typedef struct { + server_state *server_state; grpc_pollset *accepting_pollset; grpc_tcp_server_acceptor *acceptor; grpc_handshake_manager *handshake_mgr; } server_connection_state; +static void pending_handshake_manager_add_locked( + server_state* state, grpc_handshake_manager* handshake_mgr) { + pending_handshake_manager_node* node = gpr_malloc(sizeof(*node)); + node->handshake_mgr = handshake_mgr; + node->next = state->pending_handshake_mgrs; + state->pending_handshake_mgrs = node; +} + +static void pending_handshake_manager_remove_locked( + server_state* state, grpc_handshake_manager* handshake_mgr) { + pending_handshake_manager_node** prev_node = &state->pending_handshake_mgrs; + for (pending_handshake_manager_node* node = state->pending_handshake_mgrs; + node != NULL; node = node->next) { + if (node->handshake_mgr == handshake_mgr) { + *prev_node = node->next; + gpr_free(node); + break; + } + prev_node = &node->next; + } +} + +static void pending_handshake_manager_shutdown_locked( + grpc_exec_ctx* exec_ctx, server_state* state) { + pending_handshake_manager_node* prev_node = NULL; + for (pending_handshake_manager_node* node = state->pending_handshake_mgrs; + node != NULL; node = node->next) { + grpc_handshake_manager_shutdown(exec_ctx, node->handshake_mgr); + gpr_free(prev_node); + prev_node = node; + } + gpr_free(prev_node); + state->pending_handshake_mgrs = NULL; +} + static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_handshaker_args *args = arg; - server_connection_state *state = args->user_data; + server_connection_state *connection_state = args->user_data; if (error != GRPC_ERROR_NONE) { const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); grpc_endpoint_destroy(exec_ctx, args->endpoint); gpr_free(args->read_buffer); + gpr_mu_lock(&connection_state->server_state->mu); } else { - // Beware that the call to grpc_create_chttp2_transport() has to happen - // before grpc_tcp_server_destroy(). This is fine here, but similar code - // asynchronously doing a handshake instead of calling - // grpc_tcp_server_start() (as in server_secure_chttp2.c) needs to add - // synchronization to avoid this case. - grpc_transport *transport = - grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 0); - grpc_server_setup_transport(exec_ctx, state->server, transport, - state->accepting_pollset, - grpc_server_get_channel_args(state->server)); - grpc_chttp2_transport_start_reading(exec_ctx, transport, args->read_buffer); + gpr_mu_lock(&connection_state->server_state->mu); + if (!connection_state->server_state->shutdown) { + grpc_transport *transport = + grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 0); + grpc_server_setup_transport( + exec_ctx, connection_state->server_state->server, transport, + connection_state->accepting_pollset, + grpc_server_get_channel_args(connection_state->server_state->server)); + grpc_chttp2_transport_start_reading(exec_ctx, transport, + args->read_buffer); + } else { + // Need to destroy this here, because the server may have already + // gone away. + grpc_endpoint_destroy(exec_ctx, args->endpoint); + } } - // Clean up. + pending_handshake_manager_remove_locked(connection_state->server_state, + connection_state->handshake_mgr); + gpr_mu_unlock(&connection_state->server_state->mu); + grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); + grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp_server); + gpr_free(connection_state); grpc_channel_args_destroy(args->args); - grpc_handshake_manager_destroy(exec_ctx, state->handshake_mgr); - gpr_free(state); } -static void on_accept(grpc_exec_ctx *exec_ctx, void *server, grpc_endpoint *tcp, +static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { - server_connection_state *state = gpr_malloc(sizeof(server_connection_state)); - state->server = server; - state->accepting_pollset = accepting_pollset; - state->acceptor = acceptor; - state->handshake_mgr = grpc_handshake_manager_create(); + server_state* state = arg; + gpr_mu_lock(&state->mu); + if (state->shutdown) { + gpr_mu_unlock(&state->mu); + grpc_endpoint_destroy(exec_ctx, tcp); + return; + } + grpc_handshake_manager* handshake_mgr = grpc_handshake_manager_create(); + pending_handshake_manager_add_locked(state, handshake_mgr); + gpr_mu_unlock(&state->mu); + grpc_tcp_server_ref(state->tcp_server); + server_connection_state *connection_state = + gpr_malloc(sizeof(*connection_state)); + connection_state->server_state = state; + connection_state->accepting_pollset = accepting_pollset; + connection_state->acceptor = acceptor; + connection_state->handshake_mgr = handshake_mgr; // TODO(roth): We should really get this timeout value from channel // args instead of hard-coding it. const gpr_timespec deadline = gpr_time_add( gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); grpc_handshake_manager_do_handshake( - exec_ctx, state->handshake_mgr, tcp, grpc_server_get_channel_args(server), - deadline, acceptor, on_handshake_done, state); + exec_ctx, connection_state->handshake_mgr, tcp, + grpc_server_get_channel_args(state->server), + deadline, acceptor, on_handshake_done, connection_state); } /* Server callback: start listening on our ports */ -static void start(grpc_exec_ctx *exec_ctx, grpc_server *server, void *tcpp, - grpc_pollset **pollsets, size_t pollset_count) { - grpc_tcp_server *tcp = tcpp; - grpc_tcp_server_start(exec_ctx, tcp, pollsets, pollset_count, on_accept, - server); +static void server_start_listener(grpc_exec_ctx *exec_ctx, grpc_server *server, + void *arg, grpc_pollset **pollsets, + size_t pollset_count) { + server_state *state = arg; + gpr_mu_lock(&state->mu); + state->shutdown = false; + gpr_mu_unlock(&state->mu); + grpc_tcp_server_start(exec_ctx, state->tcp_server, pollsets, pollset_count, + on_accept, state); +} + +static void tcp_server_shutdown_complete(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + server_state *state = arg; + /* ensure all threads have unlocked */ + gpr_mu_lock(&state->mu); + grpc_closure *destroy_done = state->server_destroy_listener_done; + GPR_ASSERT(state->shutdown); + pending_handshake_manager_shutdown_locked(exec_ctx, state); + gpr_mu_unlock(&state->mu); + // Invoke callback. + if (destroy_done != NULL) { + grpc_exec_ctx_sched(exec_ctx, destroy_done, GRPC_ERROR_REF(error), NULL); + } + gpr_mu_destroy(&state->mu); + gpr_free(state); } /* Server callback: destroy the tcp listener (so we don't generate further callbacks) */ -static void destroy(grpc_exec_ctx *exec_ctx, grpc_server *server, void *tcpp, - grpc_closure *destroy_done) { - grpc_tcp_server *tcp = tcpp; - grpc_tcp_server_shutdown_listeners(exec_ctx, tcp); - grpc_tcp_server_unref(exec_ctx, tcp); - grpc_exec_ctx_sched(exec_ctx, destroy_done, GRPC_ERROR_NONE, NULL); +static void server_destroy_listener(grpc_exec_ctx *exec_ctx, + grpc_server *server, void *arg, + grpc_closure *destroy_done) { + server_state *state = arg; + gpr_mu_lock(&state->mu); + state->shutdown = true; + state->server_destroy_listener_done = destroy_done; + grpc_tcp_server *tcp_server = state->tcp_server; + gpr_mu_unlock(&state->mu); + grpc_tcp_server_shutdown_listeners(exec_ctx, tcp_server); + grpc_tcp_server_unref(exec_ctx, tcp_server); } int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { grpc_resolved_addresses *resolved = NULL; - grpc_tcp_server *tcp = NULL; + grpc_tcp_server *tcp_server = NULL; size_t i; size_t count = 0; int port_num = -1; @@ -136,17 +235,28 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { if (err != GRPC_ERROR_NONE) { goto error; } - - err = grpc_tcp_server_create(&exec_ctx, NULL, - grpc_server_get_channel_args(server), &tcp); + server_state* state = gpr_malloc(sizeof(*state)); + memset(state, 0, sizeof(*state)); + grpc_closure_init(&state->tcp_server_shutdown_complete, + tcp_server_shutdown_complete, state); + err = grpc_tcp_server_create(&exec_ctx, + &state->tcp_server_shutdown_complete, + grpc_server_get_channel_args(server), + &tcp_server); if (err != GRPC_ERROR_NONE) { goto error; } + state->server = server; + state->tcp_server = tcp_server; + state->shutdown = true; + gpr_mu_init(&state->mu); + const size_t naddrs = resolved->naddrs; errors = gpr_malloc(sizeof(*errors) * naddrs); for (i = 0; i < naddrs; i++) { - errors[i] = grpc_tcp_server_add_port(tcp, &resolved->addrs[i], &port_temp); + errors[i] = grpc_tcp_server_add_port(tcp_server, &resolved->addrs[i], + &port_temp); if (errors[i] == GRPC_ERROR_NONE) { if (port_num == -1) { port_num = port_temp; @@ -179,7 +289,8 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { grpc_resolved_addresses_destroy(resolved); /* Register with the server only upon success */ - grpc_server_add_listener(&exec_ctx, server, tcp, start, destroy); + grpc_server_add_listener(&exec_ctx, server, state, + server_start_listener, server_destroy_listener); goto done; /* Error path: cleanup and return */ @@ -188,8 +299,8 @@ error: if (resolved) { grpc_resolved_addresses_destroy(resolved); } - if (tcp) { - grpc_tcp_server_unref(&exec_ctx, tcp); + if (tcp_server) { + grpc_tcp_server_unref(&exec_ctx, tcp_server); } port_num = 0; diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 7c028f9f36..ab0cebe902 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -61,11 +61,11 @@ typedef struct pending_handshake_manager_node { typedef struct server_secure_state { grpc_server *server; - grpc_tcp_server *tcp; + grpc_tcp_server *tcp_server; grpc_server_security_connector *sc; grpc_server_credentials *creds; - bool is_shutdown; gpr_mu mu; + bool shutdown; grpc_closure tcp_server_shutdown_complete; grpc_closure *server_destroy_listener_done; pending_handshake_manager_node *pending_handshake_mgrs; @@ -121,18 +121,18 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); - gpr_free(args->read_buffer); grpc_endpoint_destroy(exec_ctx, args->endpoint); + gpr_free(args->read_buffer); gpr_mu_lock(&connection_state->server_state->mu); } else { gpr_mu_lock(&connection_state->server_state->mu); - if (!connection_state->server_state->is_shutdown) { + if (!connection_state->server_state->shutdown) { grpc_arg channel_arg = grpc_server_credentials_to_arg( connection_state->server_state->creds); grpc_channel_args *args_copy = grpc_channel_args_copy_and_add(args->args, &channel_arg, 1); - grpc_transport *transport = grpc_create_chttp2_transport( - exec_ctx, args_copy, args->endpoint, 0); + grpc_transport *transport = + grpc_create_chttp2_transport(exec_ctx, args_copy, args->endpoint, 0); grpc_server_setup_transport( exec_ctx, connection_state->server_state->server, transport, connection_state->accepting_pollset, args_copy); @@ -140,105 +140,103 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_chttp2_transport_start_reading(exec_ctx, transport, args->read_buffer); } else { - /* We need to consume this here, because the server may already have - * gone away. */ + // Need to destroy this here, because the server may have already + // gone away. grpc_endpoint_destroy(exec_ctx, args->endpoint); } } - pending_handshake_manager_remove_locked( - connection_state->server_state, connection_state->handshake_mgr); + pending_handshake_manager_remove_locked(connection_state->server_state, + connection_state->handshake_mgr); gpr_mu_unlock(&connection_state->server_state->mu); grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); - grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp); + grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp_server); gpr_free(connection_state); grpc_channel_args_destroy(args->args); } -static void on_accept(grpc_exec_ctx *exec_ctx, void *statep, grpc_endpoint *tcp, +static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { - server_secure_state *server_state = statep; - gpr_mu_lock(&server_state->mu); - if (server_state->is_shutdown) { - gpr_mu_unlock(&server_state->mu); + server_secure_state *state = arg; + gpr_mu_lock(&state->mu); + if (state->shutdown) { + gpr_mu_unlock(&state->mu); grpc_endpoint_destroy(exec_ctx, tcp); return; } grpc_handshake_manager* handshake_mgr = grpc_handshake_manager_create(); - pending_handshake_manager_add_locked(server_state, handshake_mgr); - gpr_mu_unlock(&server_state->mu); - grpc_tcp_server_ref(server_state->tcp); + pending_handshake_manager_add_locked(state, handshake_mgr); + gpr_mu_unlock(&state->mu); + grpc_tcp_server_ref(state->tcp_server); server_secure_connection_state *connection_state = gpr_malloc(sizeof(*connection_state)); - connection_state->server_state = server_state; + connection_state->server_state = state; connection_state->accepting_pollset = accepting_pollset; connection_state->acceptor = acceptor; connection_state->handshake_mgr = handshake_mgr; grpc_server_security_connector_create_handshakers( - exec_ctx, server_state->sc, connection_state->handshake_mgr); + exec_ctx, state->sc, connection_state->handshake_mgr); // TODO(roth): We should really get this timeout value from channel // args instead of hard-coding it. - gpr_timespec deadline = gpr_time_add( + const gpr_timespec deadline = gpr_time_add( gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); grpc_handshake_manager_do_handshake( exec_ctx, connection_state->handshake_mgr, tcp, - grpc_server_get_channel_args(connection_state->server_state->server), + grpc_server_get_channel_args(state->server), deadline, acceptor, on_handshake_done, connection_state); } /* Server callback: start listening on our ports */ static void server_start_listener(grpc_exec_ctx *exec_ctx, grpc_server *server, - void *statep, grpc_pollset **pollsets, + void *arg, grpc_pollset **pollsets, size_t pollset_count) { - server_secure_state *server_state = statep; - gpr_mu_lock(&server_state->mu); - server_state->is_shutdown = false; - gpr_mu_unlock(&server_state->mu); - grpc_tcp_server_start(exec_ctx, server_state->tcp, pollsets, pollset_count, - on_accept, server_state); + server_secure_state *state = arg; + gpr_mu_lock(&state->mu); + state->shutdown = false; + gpr_mu_unlock(&state->mu); + grpc_tcp_server_start(exec_ctx, state->tcp_server, pollsets, pollset_count, + on_accept, state); } -static void tcp_server_shutdown_complete(grpc_exec_ctx *exec_ctx, void *statep, +static void tcp_server_shutdown_complete(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - server_secure_state *server_state = statep; + server_secure_state *state = arg; /* ensure all threads have unlocked */ - gpr_mu_lock(&server_state->mu); - grpc_closure *destroy_done = server_state->server_destroy_listener_done; - GPR_ASSERT(server_state->is_shutdown); - pending_handshake_manager_shutdown_locked(exec_ctx, server_state); - gpr_mu_unlock(&server_state->mu); - + gpr_mu_lock(&state->mu); + grpc_closure *destroy_done = state->server_destroy_listener_done; + GPR_ASSERT(state->shutdown); + pending_handshake_manager_shutdown_locked(exec_ctx, state); + gpr_mu_unlock(&state->mu); /* Flush queued work before a synchronous unref. */ grpc_exec_ctx_flush(exec_ctx); - GRPC_SECURITY_CONNECTOR_UNREF(&server_state->sc->base, "server"); - grpc_server_credentials_unref(server_state->creds); - + GRPC_SECURITY_CONNECTOR_UNREF(&state->sc->base, "server"); + grpc_server_credentials_unref(state->creds); if (destroy_done != NULL) { destroy_done->cb(exec_ctx, destroy_done->cb_arg, GRPC_ERROR_REF(error)); grpc_exec_ctx_flush(exec_ctx); } - gpr_free(server_state); + gpr_mu_destroy(&state->mu); + gpr_free(state); } static void server_destroy_listener(grpc_exec_ctx *exec_ctx, - grpc_server *server, void *statep, - grpc_closure *callback) { - server_secure_state *server_state = statep; - grpc_tcp_server *tcp; - gpr_mu_lock(&server_state->mu); - server_state->is_shutdown = true; - server_state->server_destroy_listener_done = callback; - tcp = server_state->tcp; - gpr_mu_unlock(&server_state->mu); - grpc_tcp_server_shutdown_listeners(exec_ctx, tcp); - grpc_tcp_server_unref(exec_ctx, server_state->tcp); + grpc_server *server, void *arg, + grpc_closure *destroy_done) { + server_secure_state *state = arg; + gpr_mu_lock(&state->mu); + state->shutdown = true; + state->server_destroy_listener_done = destroy_done; + grpc_tcp_server *tcp_server = state->tcp_server; + gpr_mu_unlock(&state->mu); + grpc_tcp_server_shutdown_listeners(exec_ctx, tcp_server); + grpc_tcp_server_unref(exec_ctx, tcp_server); } int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_server_credentials *creds) { grpc_resolved_addresses *resolved = NULL; - grpc_tcp_server *tcp = NULL; - server_secure_state *server_state = NULL; + grpc_tcp_server *tcp_server = NULL; + server_secure_state *state = NULL; size_t i; size_t count = 0; int port_num = -1; @@ -277,27 +275,29 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, if (err != GRPC_ERROR_NONE) { goto error; } - server_state = gpr_malloc(sizeof(*server_state)); - memset(server_state, 0, sizeof(*server_state)); - grpc_closure_init(&server_state->tcp_server_shutdown_complete, - tcp_server_shutdown_complete, server_state); + state = gpr_malloc(sizeof(*state)); + memset(state, 0, sizeof(*state)); + grpc_closure_init(&state->tcp_server_shutdown_complete, + tcp_server_shutdown_complete, state); err = grpc_tcp_server_create(&exec_ctx, - &server_state->tcp_server_shutdown_complete, - grpc_server_get_channel_args(server), &tcp); + &state->tcp_server_shutdown_complete, + grpc_server_get_channel_args(server), + &tcp_server); if (err != GRPC_ERROR_NONE) { goto error; } - server_state->server = server; - server_state->tcp = tcp; - server_state->sc = sc; - server_state->creds = grpc_server_credentials_ref(creds); - server_state->is_shutdown = true; - gpr_mu_init(&server_state->mu); + state->server = server; + state->tcp_server = tcp_server; + state->sc = sc; + state->creds = grpc_server_credentials_ref(creds); + state->shutdown = true; + gpr_mu_init(&state->mu); errors = gpr_malloc(sizeof(*errors) * resolved->naddrs); for (i = 0; i < resolved->naddrs; i++) { - errors[i] = grpc_tcp_server_add_port(tcp, &resolved->addrs[i], &port_temp); + errors[i] = + grpc_tcp_server_add_port(tcp_server, &resolved->addrs[i], &port_temp); if (errors[i] == GRPC_ERROR_NONE) { if (port_num == -1) { port_num = port_temp; @@ -336,7 +336,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_resolved_addresses_destroy(resolved); /* Register with the server only upon success */ - grpc_server_add_listener(&exec_ctx, server, server_state, + grpc_server_add_listener(&exec_ctx, server, state, server_start_listener, server_destroy_listener); grpc_exec_ctx_finish(&exec_ctx); @@ -354,15 +354,15 @@ error: if (resolved) { grpc_resolved_addresses_destroy(resolved); } - if (tcp) { - grpc_tcp_server_unref(&exec_ctx, tcp); + if (tcp_server) { + grpc_tcp_server_unref(&exec_ctx, tcp_server); } else { if (sc) { grpc_exec_ctx_flush(&exec_ctx); GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "server"); } - if (server_state) { - gpr_free(server_state); + if (state) { + gpr_free(state); } } grpc_exec_ctx_finish(&exec_ctx); -- cgit v1.2.3 From e46de3d416efd6d2f6f69bb3c3803ebaac20bc01 Mon Sep 17 00:00:00 2001 From: yang-g Date: Thu, 17 Nov 2016 15:20:02 -0800 Subject: Expose message limit constants so that users can reference them --- include/grpc/impl/codegen/grpc_types.h | 4 ++++ src/core/lib/channel/message_size_filter.c | 17 +++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 9a86224795..750d9b806e 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -261,6 +261,10 @@ typedef enum grpc_call_error { GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH } grpc_call_error; +/* Default send/receive message size limits in bytes. -1 for unlimited. */ +#define GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH -1 +#define GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH (4 * 1024 * 1024) + /* Write Flags: */ /** Hint that the write may be buffered and need not go out on the wire immediately. GRPC is free to buffer the message until the next non-buffered diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 28ad587c0e..1cf68d790d 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -42,10 +43,6 @@ #include "src/core/lib/support/string.h" #include "src/core/lib/transport/service_config.h" -#define DEFAULT_MAX_SEND_MESSAGE_LENGTH -1 // Unlimited. -// The protobuf library will (by default) start warning at 100 megs. -#define DEFAULT_MAX_RECV_MESSAGE_LENGTH (4 * 1024 * 1024) - typedef struct message_size_limits { int max_send_size; int max_recv_size; @@ -201,20 +198,20 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, GPR_ASSERT(!args->is_last); channel_data* chand = elem->channel_data; memset(chand, 0, sizeof(*chand)); - chand->max_send_size = DEFAULT_MAX_SEND_MESSAGE_LENGTH; - chand->max_recv_size = DEFAULT_MAX_RECV_MESSAGE_LENGTH; + chand->max_send_size = GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH; + chand->max_recv_size = GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH; for (size_t i = 0; i < args->channel_args->num_args; ++i) { if (strcmp(args->channel_args->args[i].key, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH) == 0) { - const grpc_integer_options options = {DEFAULT_MAX_SEND_MESSAGE_LENGTH, 0, - INT_MAX}; + const grpc_integer_options options = { + GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH, 0, INT_MAX}; chand->max_send_size = grpc_channel_arg_get_integer(&args->channel_args->args[i], options); } if (strcmp(args->channel_args->args[i].key, GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH) == 0) { - const grpc_integer_options options = {DEFAULT_MAX_RECV_MESSAGE_LENGTH, 0, - INT_MAX}; + const grpc_integer_options options = { + GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH, 0, INT_MAX}; chand->max_recv_size = grpc_channel_arg_get_integer(&args->channel_args->args[i], options); } -- cgit v1.2.3 From 149f09da97393cb95ab715bbd823eb0ddc948c83 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 17 Nov 2016 20:43:10 -0800 Subject: Rewrote connectivity status logic for gRPC LB --- src/core/ext/lb_policy/grpclb/grpclb.c | 168 ++++++++++++++++++++++++++------- test/cpp/grpclb/grpclb_test.cc | 5 + 2 files changed, 138 insertions(+), 35 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index b7f4698400..e094fdc799 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -467,6 +467,65 @@ static grpc_lb_addresses *process_serverlist( return lb_addresses; } +/* returns true if the new RR policy should replace the current one, if any */ +static bool update_lb_connectivity_status_locked( + grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy, + grpc_connectivity_state new_rr_state, grpc_error *new_rr_state_error) { + grpc_error *curr_state_error; + const grpc_connectivity_state curr_glb_state = grpc_connectivity_state_check( + &glb_policy->state_tracker, &curr_state_error); + + /* The new connectivity status is a function of the previous one and the new + * input coming from the status of the RR policy. + * + * old state (grpclb's) + * | + * v || I | C | R | TF | SD | <- new state (RR's) + * ===++====+=====+=====+======+======+ + * I || I | C | R | I | I | + * ---++----+-----+-----+------+------+ + * C || I | C | R | C | C | + * ---++----+-----+-----+------+------+ + * R || I | C | R | R | R | + * ---++----+-----+-----+------+------+ + * TF || I | C | R | TF | TF | + * ---++----+-----+-----+------+------+ + * SD || NA | NA | NA | NA | NA | (*) + * ---++----+-----+-----+------+------+ + * + * In summary, if the new state is TRANSIENT_FAILURE or SHUTDOWN, stick to + * the previous RR instance. + * + * Note that the status is never updated to SHUTDOWN as a result of calling + * this function. Only glb_shutdown() has the power to set that state. + * + * (*) This function mustn't be called during shutting down. */ + GPR_ASSERT(curr_glb_state != GRPC_CHANNEL_SHUTDOWN); + + switch (new_rr_state) { + case GRPC_CHANNEL_TRANSIENT_FAILURE: + case GRPC_CHANNEL_SHUTDOWN: + GPR_ASSERT(new_rr_state_error != GRPC_ERROR_NONE); + return false; /* don't replace the RR policy */ + case GRPC_CHANNEL_INIT: + case GRPC_CHANNEL_IDLE: + case GRPC_CHANNEL_CONNECTING: + case GRPC_CHANNEL_READY: + GPR_ASSERT(new_rr_state_error == GRPC_ERROR_NONE); + } + + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, + "Setting grpclb's state to %s from new RR policy %p state.", + grpc_connectivity_state_name(new_rr_state), + (void *)glb_policy->rr_policy); + } + grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, + new_rr_state, GRPC_ERROR_REF(new_rr_state_error), + "update_lb_connectivity_status_locked"); + return true; +} + /* perform a pick over \a rr_policy. Given that a pick can return immediately * (ignoring its completion callback) we need to perform the cleanups this * callback would be otherwise resposible for */ @@ -529,49 +588,81 @@ static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); /* glb_policy->rr_policy may be NULL (initial handover) */ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, - glb_lb_policy *glb_policy, grpc_error *error) { + glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->serverlist != NULL && glb_policy->serverlist->num_servers > 0); - if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "RR handover. Old RR: %p", (void *)glb_policy->rr_policy); - } - if (glb_policy->rr_policy != NULL) { - /* if we are phasing out an existing RR instance, unref it. */ - GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "rr_handover"); - } + if (glb_policy->shutting_down) return; + + grpc_lb_policy *old_rr_policy = glb_policy->rr_policy; glb_policy->rr_policy = create_rr_locked(exec_ctx, glb_policy->serverlist, glb_policy); + if (glb_policy->rr_policy == NULL) { + gpr_log(GPR_ERROR, + "Failure creating a RoundRobin policy for serverlist update with " + "%lu entries. The previous RR instance (%p), if any, will continue " + "to be used. Future updates from the LB will attempt to create new " + "instances.", + (unsigned long)glb_policy->serverlist->num_servers, + (void *)old_rr_policy); + /* restore the old policy */ + glb_policy->rr_policy = old_rr_policy; + return; + } + + grpc_error *new_rr_state_error = NULL; + const grpc_connectivity_state new_rr_state = + grpc_lb_policy_check_connectivity(exec_ctx, glb_policy->rr_policy, + &new_rr_state_error); + /* Connectivity state is a function of the new RR policy just created */ + const bool replace_old_rr = update_lb_connectivity_status_locked( + exec_ctx, glb_policy, new_rr_state, new_rr_state_error); + + if (!replace_old_rr) { + /* dispose of the new RR policy that won't be used after all */ + GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, + "rr_handover_no_replace"); + /* restore the old policy */ + glb_policy->rr_policy = old_rr_policy; + return; + } + if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Created RR policy (%p)", (void *)glb_policy->rr_policy); + gpr_log(GPR_INFO, "RR handover. Old RR: %p", (void *)glb_policy->rr_policy); } - GPR_ASSERT(glb_policy->rr_policy != NULL); + if (old_rr_policy != NULL) { + /* if we are phasing out an existing RR instance, unref it. */ + GRPC_LB_POLICY_UNREF(exec_ctx, old_rr_policy, "rr_handover"); + } + + /* Add the gRPC LB's interested_parties pollset_set to that of the newly + * created RR policy. This will make the RR policy progress upon activity on + * gRPC LB, which in turn is tied to the application's call */ grpc_pollset_set_add_pollset_set(exec_ctx, glb_policy->rr_policy->interested_parties, glb_policy->base.interested_parties); + /* Allocate the data for the tracking of the new RR policy's connectivity. + * It'll be deallocated in glb_rr_connectivity_changed() */ rr_connectivity_data *rr_connectivity = gpr_malloc(sizeof(rr_connectivity_data)); memset(rr_connectivity, 0, sizeof(rr_connectivity_data)); grpc_closure_init(&rr_connectivity->on_change, glb_rr_connectivity_changed, rr_connectivity); rr_connectivity->glb_policy = glb_policy; - rr_connectivity->state = grpc_lb_policy_check_connectivity( - exec_ctx, glb_policy->rr_policy, &error); + rr_connectivity->state = new_rr_state; - grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, - rr_connectivity->state, GRPC_ERROR_REF(error), - "rr_handover"); - /* subscribe */ + /* Subscribe to changes to the connectivity of the new RR */ GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "rr_connectivity_cb"); grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, &rr_connectivity->state, &rr_connectivity->on_change); grpc_lb_policy_exit_idle(exec_ctx, glb_policy->rr_policy); - /* flush pending ops */ + /* Update picks and pings in wait */ pending_pick *pp; while ((pp = glb_policy->pending_picks)) { glb_policy->pending_picks = pp->next; @@ -602,28 +693,35 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - /* If shutdown or error free the arg. Rely on the rest of the code to set the - * right grpclb status. */ - rr_connectivity_data *rr_conn_data = arg; - glb_lb_policy *glb_policy = rr_conn_data->glb_policy; - gpr_mu_lock(&glb_policy->mu); + rr_connectivity_data *rr_connectivity = arg; + glb_lb_policy *glb_policy = rr_connectivity->glb_policy; - if (rr_conn_data->state != GRPC_CHANNEL_SHUTDOWN && - !glb_policy->shutting_down) { - /* RR not shutting down. Mimic the RR's policy state */ - grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, - rr_conn_data->state, GRPC_ERROR_REF(error), - "rr_connectivity_cb"); - /* resubscribe. Reuse the "rr_connectivity_cb" weak ref. */ + gpr_mu_lock(&glb_policy->mu); + const bool shutting_down = glb_policy->shutting_down; + grpc_lb_policy *maybe_unref = NULL; + GRPC_ERROR_REF(error); + + if (rr_connectivity->state == GRPC_CHANNEL_SHUTDOWN || shutting_down) { + /* RR policy shutting down. Don't renew subscription and free the arg of + * this callback. In addition we need to stash away the current policy to + * be UNREF'd after releasing the lock. Otherwise, if the UNREF is the last + * one, the policy would be destroyed, alongside the lock, which would + * result in a use-after-free */ + maybe_unref = &glb_policy->base; + gpr_free(rr_connectivity); + } else { /* rr state != SHUTDOWN && !shutting down: biz as usual */ + update_lb_connectivity_status_locked(exec_ctx, glb_policy, + rr_connectivity->state, error); + /* Resubscribe. Reuse the "rr_connectivity_cb" weak ref. */ grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, - &rr_conn_data->state, - &rr_conn_data->on_change); - } else { - GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, - "rr_connectivity_cb"); - gpr_free(rr_conn_data); + &rr_connectivity->state, + &rr_connectivity->on_change); } gpr_mu_unlock(&glb_policy->mu); + if (maybe_unref != NULL) { + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, maybe_unref, "rr_connectivity_cb"); + } + GRPC_ERROR_UNREF(error); } static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, @@ -1133,7 +1231,7 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, /* and update the copy in the glb_lb_policy instance */ glb_policy->serverlist = serverlist; - rr_handover_locked(exec_ctx, glb_policy, error); + rr_handover_locked(exec_ctx, glb_policy); } } else { if (grpc_lb_glb_trace) { diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 175786332b..61309805db 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -79,6 +79,9 @@ extern "C" { // - Test against a non-LB server. // - Random LB server closing the stream unexpectedly. // - Test using DNS-resolvable names (localhost?) +// - Test handling of creation of faulty RR instance by having the LB return a +// serverlist with non-existent backends after having initially returned a +// valid one. // // Findings from end to end testing to be covered here: // - Handling of LB servers restart, including reconnection after backing-off @@ -521,6 +524,8 @@ static void perform_request(client_fixture *cf) { CQ_EXPECT_COMPLETION(cqv, tag(2), 1); cq_verify(cqv); GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, PAYLOAD)); + GPR_ASSERT(grpc_channel_check_connectivity_state( + cf->client, 0 /* try to connect */) == GRPC_CHANNEL_READY); grpc_byte_buffer_destroy(request_payload); grpc_byte_buffer_destroy(response_payload_recv); -- cgit v1.2.3 From e7d2f21d6b2670b7e7275b9842760aec582ad02a Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 17 Nov 2016 22:04:22 -0800 Subject: improved logging --- src/core/ext/lb_policy/grpclb/grpclb.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 5a93aa6b57..d16489fbc9 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -633,12 +633,19 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, "rr_handover_no_replace"); /* restore the old policy */ glb_policy->rr_policy = old_rr_policy; + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, + "Keeping old RR policy (%p) despite new serverlist: new RR " + "policy was in %s connectivity state.", + (void *)old_rr_policy, + grpc_connectivity_state_name(new_rr_state)); + } return; } if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "Created RR policy (%p)", (void *)glb_policy->rr_policy); - gpr_log(GPR_INFO, "RR handover. Old RR: %p", (void *)glb_policy->rr_policy); + gpr_log(GPR_INFO, "Created RR policy (%p) to replace old RR (%p)", + (void *)glb_policy->rr_policy, (void *)old_rr_policy); } if (old_rr_policy != NULL) { -- cgit v1.2.3 From 062ab441c422cf9f474a1df203891cc5d62bdd13 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 18 Nov 2016 09:01:27 -0800 Subject: Fix locking in HTTP CONNECT handshaker. --- src/core/ext/client_channel/http_connect_handshaker.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 971bbe8944..c9861a5aed 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -86,9 +86,9 @@ static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) { static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { http_connect_handshaker* handshaker = arg; + gpr_mu_lock(&handshaker->mu); if (error != GRPC_ERROR_NONE || handshaker->args == NULL) { // If the write failed, invoke the callback immediately with the error. - gpr_mu_lock(&handshaker->mu); grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, GRPC_ERROR_REF(error), NULL); handshaker->args = NULL; @@ -97,7 +97,6 @@ static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, } else { // Otherwise, read the response. // The read callback inherits our ref to the handshaker. - gpr_mu_lock(&handshaker->mu); grpc_endpoint_read(exec_ctx, handshaker->args->endpoint, handshaker->args->read_buffer, &handshaker->response_read_closure); -- cgit v1.2.3 From 21d4b2d930642b2b8d272352dfa982b5102efd1e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 18 Nov 2016 09:53:41 -0800 Subject: Pass client channel factory and server name via channel args. --- include/grpc/impl/codegen/grpc_types.h | 2 + src/core/ext/client_channel/client_channel.c | 48 ++++++---------- src/core/ext/client_channel/client_channel.h | 7 --- .../chttp2/client/insecure/channel_create.c | 50 ++++++++++------ .../chttp2/client/secure/secure_channel_create.c | 67 ++++++++++++++-------- 5 files changed, 93 insertions(+), 81 deletions(-) (limited to 'src/core') diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 8c5215faee..5ecc5ba043 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -220,6 +220,8 @@ typedef struct { #define GRPC_ARG_LB_ADDRESSES "grpc.lb_addresses" /** The grpc_socket_mutator instance that set the socket options. A pointer. */ #define GRPC_ARG_SOCKET_MUTATOR "grpc.socket_mutator" +/** Client channel factory. Not intended for external use. */ +#define GRPC_ARG_CLIENT_CHANNEL_FACTORY "grpc.client_channel_factory" /** \} */ /** Result of a grpc call. If the caller satisfies the prerequisites of a diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index b66fed4b88..a607f73c04 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -44,6 +44,7 @@ #include #include "src/core/ext/client_channel/lb_policy_registry.h" +#include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/ext/client_channel/subchannel.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" @@ -454,20 +455,31 @@ static void cc_init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { channel_data *chand = elem->channel_data; - memset(chand, 0, sizeof(*chand)); - GPR_ASSERT(args->is_last); GPR_ASSERT(elem->filter == &grpc_client_channel_filter); - + // Initialize data members. gpr_mu_init(&chand->mu); + chand->owning_stack = args->channel_stack; grpc_closure_init(&chand->on_resolver_result_changed, on_resolver_result_changed, chand); - chand->owning_stack = args->channel_stack; - + chand->interested_parties = grpc_pollset_set_create(); grpc_connectivity_state_init(&chand->state_tracker, GRPC_CHANNEL_IDLE, "client_channel"); - chand->interested_parties = grpc_pollset_set_create(); + // Record client channel factory. + const grpc_arg *arg = grpc_channel_args_find(args->channel_args, + GRPC_ARG_CLIENT_CHANNEL_FACTORY); + GPR_ASSERT(arg != NULL); + GPR_ASSERT(arg->type == GRPC_ARG_POINTER); + grpc_client_channel_factory_ref(arg->value.pointer.p); + chand->client_channel_factory = arg->value.pointer.p; + // Instantiate resolver. + arg = grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVER_NAME); + GPR_ASSERT(arg != NULL); + GPR_ASSERT(arg->type == GRPC_ARG_STRING); + chand->resolver = grpc_resolver_create(arg->value.string, args->channel_args); +// FIXME: return failure instead of asserting + GPR_ASSERT(chand->resolver != NULL); } /* Destructor for channel_data */ @@ -1080,30 +1092,6 @@ const grpc_channel_filter grpc_client_channel_filter = { "client-channel", }; -void grpc_client_channel_finish_initialization( - grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack, - grpc_resolver *resolver, - grpc_client_channel_factory *client_channel_factory) { - /* post construction initialization: set the transport setup pointer */ - GPR_ASSERT(client_channel_factory != NULL); - grpc_channel_element *elem = grpc_channel_stack_last_element(channel_stack); - channel_data *chand = elem->channel_data; - gpr_mu_lock(&chand->mu); - GPR_ASSERT(!chand->resolver); - chand->resolver = resolver; - GRPC_RESOLVER_REF(resolver, "channel"); - if (!grpc_closure_list_empty(chand->waiting_for_config_closures) || - chand->exit_idle_when_lb_policy_arrives) { - chand->started_resolving = true; - GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver"); - grpc_resolver_next(exec_ctx, resolver, &chand->resolver_result, - &chand->on_resolver_result_changed); - } - chand->client_channel_factory = client_channel_factory; - grpc_client_channel_factory_ref(client_channel_factory); - gpr_mu_unlock(&chand->mu); -} - grpc_connectivity_state grpc_client_channel_check_connectivity_state( grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, int try_to_connect) { channel_data *chand = elem->channel_data; diff --git a/src/core/ext/client_channel/client_channel.h b/src/core/ext/client_channel/client_channel.h index ab5a84fdfb..9ba012865c 100644 --- a/src/core/ext/client_channel/client_channel.h +++ b/src/core/ext/client_channel/client_channel.h @@ -47,13 +47,6 @@ extern const grpc_channel_filter grpc_client_channel_filter; -/* Post-construction initializer to give the client channel its resolver - and factory. */ -void grpc_client_channel_finish_initialization( - grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack, - grpc_resolver *resolver, - grpc_client_channel_factory *client_channel_factory); - grpc_connectivity_state grpc_client_channel_check_connectivity_state( grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, int try_to_connect); diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 8e03fd82c1..d448b90992 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -42,7 +42,6 @@ #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" -#include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/compress_filter.h" @@ -195,20 +194,7 @@ static grpc_channel *client_channel_factory_create_channel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const char *target, grpc_client_channel_type type, const grpc_channel_args *args) { - grpc_channel *channel = - grpc_channel_create(exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); - grpc_resolver *resolver = grpc_resolver_create(target, args); - if (!resolver) { - GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, - "client_channel_factory_create_channel"); - return NULL; - } - - grpc_client_channel_finish_initialization( - exec_ctx, grpc_channel_get_channel_stack(channel), resolver, cc_factory); - GRPC_RESOLVER_UNREF(exec_ctx, resolver, "create_channel"); - - return channel; + return grpc_channel_create(exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); } static const grpc_client_channel_factory_vtable client_channel_factory_vtable = @@ -219,6 +205,21 @@ static const grpc_client_channel_factory_vtable client_channel_factory_vtable = static grpc_client_channel_factory client_channel_factory = { &client_channel_factory_vtable}; +static void *cc_factory_arg_copy(void *cc_factory) { + return cc_factory; +} + +static void cc_factory_arg_destroy(void *cc_factory) {} + +static int cc_factory_arg_cmp(void *cc_factory1, void *cc_factory2) { + if (cc_factory1 < cc_factory2) return -1; + if (cc_factory1 > cc_factory2) return 1; + return 0; +} + +static const grpc_arg_pointer_vtable cc_factory_arg_vtable = { + cc_factory_arg_copy, cc_factory_arg_destroy, cc_factory_arg_cmp}; + /* Create a client channel: Asynchronously: - resolve target - connect to it (trying alternatives as presented) @@ -231,15 +232,26 @@ grpc_channel *grpc_insecure_channel_create(const char *target, "grpc_insecure_channel_create(target=%p, args=%p, reserved=%p)", 3, (target, args, reserved)); GPR_ASSERT(!reserved); - grpc_client_channel_factory *factory = (grpc_client_channel_factory *)&client_channel_factory; + // Add channel args containing the server name and client channel factory. + grpc_arg new_args[2]; + new_args[0].type = GRPC_ARG_STRING; + new_args[0].key = GRPC_ARG_SERVER_NAME; + new_args[0].value.string = (char *)target; + new_args[1].type = GRPC_ARG_POINTER; + new_args[1].key = GRPC_ARG_CLIENT_CHANNEL_FACTORY; + new_args[1].value.pointer.p = factory; + new_args[1].value.pointer.vtable = &cc_factory_arg_vtable; + grpc_channel_args *args_copy = + grpc_channel_args_copy_and_add(args, new_args, GPR_ARRAY_SIZE(new_args)); + // Create channel. grpc_channel *channel = client_channel_factory_create_channel( - &exec_ctx, factory, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, args); - + &exec_ctx, factory, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, args_copy); + // Clean up. + grpc_channel_args_destroy(args_copy); grpc_client_channel_factory_unref(&exec_ctx, factory); grpc_exec_ctx_finish(&exec_ctx); - return channel != NULL ? channel : grpc_lame_client_channel_create( target, GRPC_STATUS_INTERNAL, "Failed to create client channel"); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 04c88a2d36..b53e637fc2 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -42,7 +42,6 @@ #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" -#include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/handshaker.h" @@ -273,20 +272,7 @@ static grpc_channel *client_channel_factory_create_channel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const char *target, grpc_client_channel_type type, const grpc_channel_args *args) { - client_channel_factory *f = (client_channel_factory *)cc_factory; - grpc_channel *channel = - grpc_channel_create(exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); - grpc_resolver *resolver = grpc_resolver_create(target, args); - if (resolver != NULL) { - grpc_client_channel_finish_initialization( - exec_ctx, grpc_channel_get_channel_stack(channel), resolver, &f->base); - GRPC_RESOLVER_UNREF(exec_ctx, resolver, "create"); - } else { - GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, - "client_channel_factory_create_channel"); - channel = NULL; - } - return channel; + return grpc_channel_create(exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); } static const grpc_client_channel_factory_vtable client_channel_factory_vtable = @@ -294,6 +280,28 @@ static const grpc_client_channel_factory_vtable client_channel_factory_vtable = client_channel_factory_create_subchannel, client_channel_factory_create_channel}; +static void *cc_factory_arg_copy(void *cc_factory) { + client_channel_factory_ref(cc_factory); + return cc_factory; +} + +static void cc_factory_arg_destroy(void *cc_factory) { + // TODO(roth): remove local exec_ctx when + // https://github.com/grpc/grpc/pull/8705 is merged + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + client_channel_factory_unref(&exec_ctx, cc_factory); + grpc_exec_ctx_finish(&exec_ctx); +} + +static int cc_factory_arg_cmp(void *cc_factory1, void *cc_factory2) { + if (cc_factory1 < cc_factory2) return -1; + if (cc_factory1 > cc_factory2) return 1; + return 0; +} + +static const grpc_arg_pointer_vtable cc_factory_arg_vtable = { + cc_factory_arg_copy, cc_factory_arg_destroy, cc_factory_arg_cmp}; + /* Create a secure client channel: Asynchronously: - resolve target - connect to it (trying alternatives as presented) @@ -326,14 +334,6 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, return grpc_lame_client_channel_create( target, GRPC_STATUS_INTERNAL, "Failed to create security connector."); } - grpc_arg connector_arg = - grpc_security_connector_to_arg(&security_connector->base); - grpc_channel_args *new_args = grpc_channel_args_copy_and_add( - new_args_from_connector != NULL ? new_args_from_connector : args, - &connector_arg, 1); - if (new_args_from_connector != NULL) { - grpc_channel_args_destroy(new_args_from_connector); - } // Create client channel factory. client_channel_factory *f = gpr_malloc(sizeof(*f)); memset(f, 0, sizeof(*f)); @@ -342,13 +342,30 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, GRPC_SECURITY_CONNECTOR_REF(&security_connector->base, "grpc_secure_channel_create"); f->security_connector = security_connector; + // Add channel args containing the server name, client channel + // factory, and security connector. + grpc_arg new_args[3]; + new_args[0].type = GRPC_ARG_STRING; + new_args[0].key = GRPC_ARG_SERVER_NAME; + new_args[0].value.string = (char *)target; + new_args[1].type = GRPC_ARG_POINTER; + new_args[1].key = GRPC_ARG_CLIENT_CHANNEL_FACTORY; + new_args[1].value.pointer.p = f; + new_args[1].value.pointer.vtable = &cc_factory_arg_vtable; + new_args[2] = grpc_security_connector_to_arg(&security_connector->base); + grpc_channel_args *args_copy = grpc_channel_args_copy_and_add( + new_args_from_connector != NULL ? new_args_from_connector : args, + new_args, GPR_ARRAY_SIZE(new_args)); + if (new_args_from_connector != NULL) { + grpc_channel_args_destroy(new_args_from_connector); + } // Create channel. grpc_channel *channel = client_channel_factory_create_channel( - &exec_ctx, &f->base, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, new_args); + &exec_ctx, &f->base, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, args_copy); // Clean up. GRPC_SECURITY_CONNECTOR_UNREF(&f->security_connector->base, "secure_client_channel_factory_create_channel"); - grpc_channel_args_destroy(new_args); + grpc_channel_args_destroy(args_copy); grpc_client_channel_factory_unref(&exec_ctx, &f->base); grpc_exec_ctx_finish(&exec_ctx); return channel; /* may be NULL */ -- cgit v1.2.3 From 86e905901fa1331f2326f0a881dd79322eeff6c8 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 18 Nov 2016 09:56:40 -0800 Subject: Avoid confusion between server name and URI. --- include/grpc/impl/codegen/grpc_types.h | 2 ++ src/core/ext/client_channel/client_channel.c | 2 +- src/core/ext/transport/chttp2/client/insecure/channel_create.c | 2 +- src/core/ext/transport/chttp2/client/secure/secure_channel_create.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 5ecc5ba043..9a9118ceaf 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -213,6 +213,8 @@ typedef struct { #define GRPC_ARG_SERVICE_CONFIG "grpc.service_config" /** LB policy name. */ #define GRPC_ARG_LB_POLICY_NAME "grpc.lb_policy_name" +/** Server URI. Not intended for external use. */ +#define GRPC_ARG_SERVER_URI "grpc.server_uri" /** Server name. Not intended for external use. */ #define GRPC_ARG_SERVER_NAME "grpc.server_name" /** Resolved addresses in a form used by the LB policy. diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index a607f73c04..7df3bca5d8 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -474,7 +474,7 @@ static void cc_init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_client_channel_factory_ref(arg->value.pointer.p); chand->client_channel_factory = arg->value.pointer.p; // Instantiate resolver. - arg = grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVER_NAME); + arg = grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVER_URI); GPR_ASSERT(arg != NULL); GPR_ASSERT(arg->type == GRPC_ARG_STRING); chand->resolver = grpc_resolver_create(arg->value.string, args->channel_args); diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index d448b90992..0d2395266b 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -237,7 +237,7 @@ grpc_channel *grpc_insecure_channel_create(const char *target, // Add channel args containing the server name and client channel factory. grpc_arg new_args[2]; new_args[0].type = GRPC_ARG_STRING; - new_args[0].key = GRPC_ARG_SERVER_NAME; + new_args[0].key = GRPC_ARG_SERVER_URI; new_args[0].value.string = (char *)target; new_args[1].type = GRPC_ARG_POINTER; new_args[1].key = GRPC_ARG_CLIENT_CHANNEL_FACTORY; diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index b53e637fc2..be57f30bd0 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -346,7 +346,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, // factory, and security connector. grpc_arg new_args[3]; new_args[0].type = GRPC_ARG_STRING; - new_args[0].key = GRPC_ARG_SERVER_NAME; + new_args[0].key = GRPC_ARG_SERVER_URI; new_args[0].value.string = (char *)target; new_args[1].type = GRPC_ARG_POINTER; new_args[1].key = GRPC_ARG_CLIENT_CHANNEL_FACTORY; -- cgit v1.2.3 From 5e2566e92b0603cfa6c6a989ab7e2372525ca03d Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 18 Nov 2016 10:53:13 -0800 Subject: Change destroy_call_elem() to return a grpc_error*. --- src/core/ext/census/grpc_filter.c | 7 ++++--- src/core/ext/client_channel/client_channel.c | 12 ++++++----- src/core/ext/client_channel/subchannel.c | 16 ++++++++++----- .../ext/load_reporting/load_reporting_filter.c | 8 +++++--- src/core/lib/channel/channel_stack.c | 24 ++++++++++++++-------- src/core/lib/channel/channel_stack.h | 17 +++++++-------- src/core/lib/channel/channel_stack_builder.c | 23 ++++++++++----------- src/core/lib/channel/channel_stack_builder.h | 11 +++++----- src/core/lib/channel/compress_filter.c | 7 ++++--- src/core/lib/channel/connected_channel.c | 7 ++++--- src/core/lib/channel/deadline_filter.c | 7 ++++--- src/core/lib/channel/http_client_filter.c | 7 ++++--- src/core/lib/channel/http_server_filter.c | 7 ++++--- src/core/lib/channel/message_size_filter.c | 7 ++++--- .../lib/security/transport/client_auth_filter.c | 7 ++++--- .../lib/security/transport/server_auth_filter.c | 7 ++++--- src/core/lib/surface/channel.c | 15 +++++++++----- src/core/lib/surface/lame_client.c | 7 ++++--- src/core/lib/surface/server.c | 7 ++++--- test/core/end2end/tests/filter_call_init_fails.c | 8 +++++--- test/core/end2end/tests/filter_causes_close.c | 8 +++++--- test/core/end2end/tests/filter_latency.c | 8 +++++--- 22 files changed, 133 insertions(+), 94 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index 397dbc40a8..c73385f98b 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -167,11 +167,12 @@ static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, /* TODO(hongyu): record rpc server stats and census_tracing_end_op here */ } -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { channel_data *chand = elem->channel_data; GPR_ASSERT(chand != NULL); + return GRPC_ERROR_NONE; } static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 7df3bca5d8..13d8036b8d 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -451,9 +451,9 @@ static void cc_get_channel_info(grpc_exec_ctx *exec_ctx, } /* Constructor for channel_data */ -static void cc_init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error* cc_init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { channel_data *chand = elem->channel_data; memset(chand, 0, sizeof(*chand)); GPR_ASSERT(args->is_last); @@ -478,8 +478,10 @@ static void cc_init_channel_elem(grpc_exec_ctx *exec_ctx, GPR_ASSERT(arg != NULL); GPR_ASSERT(arg->type == GRPC_ARG_STRING); chand->resolver = grpc_resolver_create(arg->value.string, args->channel_args); -// FIXME: return failure instead of asserting - GPR_ASSERT(chand->resolver != NULL); + if (chand->resolver == NULL) { + return GRPC_ERROR_CREATE("resolver creation failed"); + } + return GRPC_ERROR_NONE; } /* Destructor for channel_data */ diff --git a/src/core/ext/client_channel/subchannel.c b/src/core/ext/client_channel/subchannel.c index a148b2a0e1..f1ed95ba9d 100644 --- a/src/core/ext/client_channel/subchannel.c +++ b/src/core/ext/client_channel/subchannel.c @@ -542,14 +542,20 @@ static void publish_transport_locked(grpc_exec_ctx *exec_ctx, grpc_channel_stack_builder_set_transport(builder, c->connecting_result.transport); - if (grpc_channel_init_create_stack(exec_ctx, builder, - GRPC_CLIENT_SUBCHANNEL)) { - con = grpc_channel_stack_builder_finish(exec_ctx, builder, 0, 1, - connection_destroy, NULL); - } else { + if (!grpc_channel_init_create_stack(exec_ctx, builder, + GRPC_CLIENT_SUBCHANNEL)) { grpc_channel_stack_builder_destroy(builder); abort(); /* TODO(ctiller): what to do here (previously we just crashed) */ } + grpc_error *error = grpc_channel_stack_builder_finish( + exec_ctx, builder, 0, 1, connection_destroy, NULL, (void**)&con); + if (error != GRPC_ERROR_NONE) { + const char* msg = grpc_error_string(error); + gpr_log(GPR_ERROR, "error initializing subchannel stack: %s", msg); + grpc_error_free_string(msg); + GRPC_ERROR_UNREF(error); + abort(); /* TODO(ctiller): what to do here? */ + } stk = CHANNEL_STACK_FROM_CONNECTION(con); memset(&c->connecting_result, 0, sizeof(c->connecting_result)); diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index b810e20bb9..a0feb086c7 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -152,9 +152,9 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Constructor for channel_data */ -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { GPR_ASSERT(!args->is_last); channel_data *chand = elem->channel_data; @@ -171,6 +171,8 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, NULL, NULL}; */ + + return GRPC_ERROR_NONE; } /* Destructor for channel data */ diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 999ad5f507..ab78dfbf3e 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -102,13 +102,11 @@ grpc_call_element *grpc_call_stack_element(grpc_call_stack *call_stack, return CALL_ELEMS_FROM_STACK(call_stack) + index; } -void grpc_channel_stack_init(grpc_exec_ctx *exec_ctx, int initial_refs, - grpc_iomgr_cb_func destroy, void *destroy_arg, - const grpc_channel_filter **filters, - size_t filter_count, - const grpc_channel_args *channel_args, - grpc_transport *optional_transport, - const char *name, grpc_channel_stack *stack) { +grpc_error* grpc_channel_stack_init( + grpc_exec_ctx *exec_ctx, int initial_refs, grpc_iomgr_cb_func destroy, + void *destroy_arg, const grpc_channel_filter **filters, size_t filter_count, + const grpc_channel_args *channel_args, grpc_transport *optional_transport, + const char *name, grpc_channel_stack *stack) { size_t call_size = ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(grpc_call_stack)) + ROUND_UP_TO_ALIGNMENT_SIZE(filter_count * sizeof(grpc_call_element)); @@ -126,6 +124,7 @@ void grpc_channel_stack_init(grpc_exec_ctx *exec_ctx, int initial_refs, ROUND_UP_TO_ALIGNMENT_SIZE(filter_count * sizeof(grpc_channel_element)); /* init per-filter data */ + grpc_error *first_error = GRPC_ERROR_NONE; for (i = 0; i < filter_count; i++) { args.channel_stack = stack; args.channel_args = channel_args; @@ -134,7 +133,15 @@ void grpc_channel_stack_init(grpc_exec_ctx *exec_ctx, int initial_refs, args.is_last = i == (filter_count - 1); elems[i].filter = filters[i]; elems[i].channel_data = user_data; - elems[i].filter->init_channel_elem(exec_ctx, &elems[i], &args); + grpc_error *error = + elems[i].filter->init_channel_elem(exec_ctx, &elems[i], &args); + if (error != GRPC_ERROR_NONE) { + if (first_error == GRPC_ERROR_NONE) { + first_error = error; + } else { + GRPC_ERROR_UNREF(error); + } + } user_data += ROUND_UP_TO_ALIGNMENT_SIZE(filters[i]->sizeof_channel_data); call_size += ROUND_UP_TO_ALIGNMENT_SIZE(filters[i]->sizeof_call_data); } @@ -144,6 +151,7 @@ void grpc_channel_stack_init(grpc_exec_ctx *exec_ctx, int initial_refs, grpc_channel_stack_size(filters, filter_count)); stack->call_stack_size = call_size; + return first_error; } void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 004643d45f..9491b9ab1b 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -146,8 +146,9 @@ typedef struct { is_first, is_last designate this elements position in the stack, and are useful for asserting correct configuration by upper layer code. The filter does not need to do any chaining */ - void (*init_channel_elem)(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_element_args *args); + grpc_error *(*init_channel_elem)(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args); /* Destroy per channel data. The filter does not need to do any chaining */ void (*destroy_channel_elem)(grpc_exec_ctx *exec_ctx, @@ -214,12 +215,12 @@ grpc_call_element *grpc_call_stack_element(grpc_call_stack *stack, size_t i); size_t grpc_channel_stack_size(const grpc_channel_filter **filters, size_t filter_count); /* Initialize a channel stack given some filters */ -void grpc_channel_stack_init(grpc_exec_ctx *exec_ctx, int initial_refs, - grpc_iomgr_cb_func destroy, void *destroy_arg, - const grpc_channel_filter **filters, - size_t filter_count, const grpc_channel_args *args, - grpc_transport *optional_transport, - const char *name, grpc_channel_stack *stack); +grpc_error* grpc_channel_stack_init( + grpc_exec_ctx *exec_ctx, int initial_refs, grpc_iomgr_cb_func destroy, + void *destroy_arg, const grpc_channel_filter **filters, + size_t filter_count, const grpc_channel_args *args, + grpc_transport *optional_transport, const char *name, + grpc_channel_stack *stack); /* Destroy a channel stack */ void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_channel_stack *stack); diff --git a/src/core/lib/channel/channel_stack_builder.c b/src/core/lib/channel/channel_stack_builder.c index eda4968f48..747db0749e 100644 --- a/src/core/lib/channel/channel_stack_builder.c +++ b/src/core/lib/channel/channel_stack_builder.c @@ -227,11 +227,10 @@ void grpc_channel_stack_builder_destroy(grpc_channel_stack_builder *builder) { gpr_free(builder); } -void *grpc_channel_stack_builder_finish(grpc_exec_ctx *exec_ctx, - grpc_channel_stack_builder *builder, - size_t prefix_bytes, int initial_refs, - grpc_iomgr_cb_func destroy, - void *destroy_arg) { +grpc_error *grpc_channel_stack_builder_finish( + grpc_exec_ctx *exec_ctx, grpc_channel_stack_builder *builder, + size_t prefix_bytes, int initial_refs, grpc_iomgr_cb_func destroy, + void *destroy_arg, void **result) { // count the number of filters size_t num_filters = 0; for (filter_node *p = builder->begin.next; p != &builder->end; p = p->next) { @@ -250,15 +249,15 @@ void *grpc_channel_stack_builder_finish(grpc_exec_ctx *exec_ctx, size_t channel_stack_size = grpc_channel_stack_size(filters, num_filters); // allocate memory, with prefix_bytes followed by channel_stack_size - char *result = gpr_malloc(prefix_bytes + channel_stack_size); + *result = gpr_malloc(prefix_bytes + channel_stack_size); // fetch a pointer to the channel stack grpc_channel_stack *channel_stack = - (grpc_channel_stack *)(result + prefix_bytes); + (grpc_channel_stack *)(*result + prefix_bytes); // and initialize it - grpc_channel_stack_init(exec_ctx, initial_refs, destroy, - destroy_arg == NULL ? result : destroy_arg, filters, - num_filters, builder->args, builder->transport, - builder->name, channel_stack); + grpc_error* error = grpc_channel_stack_init( + exec_ctx, initial_refs, destroy, + destroy_arg == NULL ? *result : destroy_arg, filters, num_filters, + builder->args, builder->transport, builder->name, channel_stack); // run post-initialization functions i = 0; @@ -273,5 +272,5 @@ void *grpc_channel_stack_builder_finish(grpc_exec_ctx *exec_ctx, grpc_channel_stack_builder_destroy(builder); gpr_free((grpc_channel_filter **)filters); - return result; + return error; } diff --git a/src/core/lib/channel/channel_stack_builder.h b/src/core/lib/channel/channel_stack_builder.h index 4a00f7bfdb..65bfebcabc 100644 --- a/src/core/lib/channel/channel_stack_builder.h +++ b/src/core/lib/channel/channel_stack_builder.h @@ -146,16 +146,15 @@ bool grpc_channel_stack_builder_append_filter( void grpc_channel_stack_builder_iterator_destroy( grpc_channel_stack_builder_iterator *iterator); -/// Destroy the builder, return the freshly minted channel stack +/// Destroy the builder, return the freshly minted channel stack in \a result. /// Allocates \a prefix_bytes bytes before the channel stack /// Returns the base pointer of the allocated block /// \a initial_refs, \a destroy, \a destroy_arg are as per /// grpc_channel_stack_init -void *grpc_channel_stack_builder_finish(grpc_exec_ctx *exec_ctx, - grpc_channel_stack_builder *builder, - size_t prefix_bytes, int initial_refs, - grpc_iomgr_cb_func destroy, - void *destroy_arg); +grpc_error *grpc_channel_stack_builder_finish( + grpc_exec_ctx *exec_ctx, grpc_channel_stack_builder *builder, + size_t prefix_bytes, int initial_refs, grpc_iomgr_cb_func destroy, + void *destroy_arg, void **result); /// Destroy the builder without creating a channel stack void grpc_channel_stack_builder_destroy(grpc_channel_stack_builder *builder); diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 2874d63fc7..2afe28941a 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -285,9 +285,9 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Constructor for channel_data */ -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { channel_data *channeld = elem->channel_data; channeld->enabled_algorithms_bitset = @@ -315,6 +315,7 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, } GPR_ASSERT(!args->is_last); + return GRPC_ERROR_NONE; } /* Destructor for channel data */ diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 038e819f72..92739f70c7 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -114,12 +114,13 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Constructor for channel_data */ -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { channel_data *cd = (channel_data *)elem->channel_data; GPR_ASSERT(args->is_last); cd->transport = NULL; + return GRPC_ERROR_NONE; } /* Destructor for channel_data */ diff --git a/src/core/lib/channel/deadline_filter.c b/src/core/lib/channel/deadline_filter.c index 0e703d8d27..470ccfea57 100644 --- a/src/core/lib/channel/deadline_filter.c +++ b/src/core/lib/channel/deadline_filter.c @@ -207,10 +207,11 @@ void grpc_deadline_state_client_start_transport_stream_op( // // Constructor for channel_data. Used for both client and server filters. -static void init_channel_elem(grpc_exec_ctx* exec_ctx, - grpc_channel_element* elem, - grpc_channel_element_args* args) { +static grpc_error* init_channel_elem(grpc_exec_ctx* exec_ctx, + grpc_channel_element* elem, + grpc_channel_element_args* args) { GPR_ASSERT(!args->is_last); + return GRPC_ERROR_NONE; } // Destructor for channel_data. Used for both client and server filters. diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index f57d7c2453..8be9e0a2cb 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -415,9 +415,9 @@ static grpc_mdstr *user_agent_from_args(const grpc_channel_args *args, } /* Constructor for channel_data */ -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { channel_data *chand = elem->channel_data; GPR_ASSERT(!args->is_last); GPR_ASSERT(args->optional_transport != NULL); @@ -428,6 +428,7 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, GRPC_MDSTR_USER_AGENT, user_agent_from_args(args->channel_args, args->optional_transport->vtable->name)); + return GRPC_ERROR_NONE; } /* Destructor for channel data */ diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 6a33689fec..035124ade9 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -326,10 +326,11 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Constructor for channel_data */ -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { GPR_ASSERT(!args->is_last); + return GRPC_ERROR_NONE; } /* Destructor for channel data */ diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 1331fe1c65..c6bfb80d78 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -195,9 +195,9 @@ static void destroy_call_elem(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, void* ignored) {} // Constructor for channel_data. -static void init_channel_elem(grpc_exec_ctx* exec_ctx, - grpc_channel_element* elem, - grpc_channel_element_args* args) { +static grpc_error* init_channel_elem(grpc_exec_ctx* exec_ctx, + grpc_channel_element* elem, + grpc_channel_element_args* args) { GPR_ASSERT(!args->is_last); channel_data* chand = elem->channel_data; memset(chand, 0, sizeof(*chand)); @@ -228,6 +228,7 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, (grpc_method_config_table*)channel_arg->value.pointer.p, method_config_convert_value, &message_size_limits_vtable); } + return GRPC_ERROR_NONE; } // Destructor for channel_data. diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index 053bf5972c..eeb11feeb2 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -303,9 +303,9 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Constructor for channel_data */ -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { grpc_security_connector *sc = grpc_find_security_connector_in_args(args->channel_args); grpc_auth_context *auth_context = @@ -327,6 +327,7 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, sc, "client_auth_filter"); chand->auth_context = GRPC_AUTH_CONTEXT_REF(auth_context, "client_auth_filter"); + return GRPC_ERROR_NONE; } /* Destructor for channel data */ diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index eaa1d0720b..3abbeb35ef 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -238,9 +238,9 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, void *ignored) {} /* Constructor for channel_data */ -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { grpc_auth_context *auth_context = grpc_find_auth_context_in_args(args->channel_args); grpc_server_credentials *creds = @@ -256,6 +256,7 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, chand->auth_context = GRPC_AUTH_CONTEXT_REF(auth_context, "server_auth_filter"); chand->creds = grpc_server_credentials_ref(creds); + return GRPC_ERROR_NONE; } /* Destructor for channel data */ diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 1389df6886..1b5cf5ffec 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -97,11 +97,16 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, if (!grpc_channel_init_create_stack(exec_ctx, builder, channel_stack_type)) { grpc_channel_stack_builder_destroy(builder); return NULL; - } else { - args = grpc_channel_args_copy( - grpc_channel_stack_builder_get_channel_arguments(builder)); - channel = grpc_channel_stack_builder_finish( - exec_ctx, builder, sizeof(grpc_channel), 1, destroy_channel, NULL); + } + args = grpc_channel_args_copy( + grpc_channel_stack_builder_get_channel_arguments(builder)); + grpc_error* error = grpc_channel_stack_builder_finish( + exec_ctx, builder, sizeof(grpc_channel), 1, destroy_channel, NULL, + (void**)&channel); + if (error != GRPC_ERROR_NONE) { + grpc_channel_stack_destroy(exec_ctx, (grpc_channel_stack *)channel); + gpr_free(channel); + return NULL; } memset(channel, 0, sizeof(*channel)); diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index d0df8e7e17..995a88de9e 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -123,11 +123,12 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, gpr_free(and_free_memory); } -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { GPR_ASSERT(args->is_first); GPR_ASSERT(args->is_last); + return GRPC_ERROR_NONE; } static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 89dd825460..eeeb6cd432 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -913,9 +913,9 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, server_unref(exec_ctx, chand->server); } -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { channel_data *chand = elem->channel_data; GPR_ASSERT(args->is_first); GPR_ASSERT(!args->is_last); @@ -926,6 +926,7 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, chand->connectivity_state = GRPC_CHANNEL_IDLE; grpc_closure_init(&chand->channel_connectivity_changed, channel_connectivity_changed, chand); + return GRPC_ERROR_NONE; } static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c index 41ae575fff..13a32bf64d 100644 --- a/test/core/end2end/tests/filter_call_init_fails.c +++ b/test/core/end2end/tests/filter_call_init_fails.c @@ -216,9 +216,11 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_final_info *final_info, void *and_free_memory) {} -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) {} +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { + return GRPC_ERROR_NONE; +} static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) {} diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index bf9fd9073d..4c1ff8459a 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -243,9 +243,11 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_final_info *final_info, void *and_free_memory) {} -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) {} +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { + return GRPC_ERROR_NONE; +} static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) {} diff --git a/test/core/end2end/tests/filter_latency.c b/test/core/end2end/tests/filter_latency.c index 37ce3b1222..3e9c0352a5 100644 --- a/test/core/end2end/tests/filter_latency.c +++ b/test/core/end2end/tests/filter_latency.c @@ -275,9 +275,11 @@ static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&g_mu); } -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) {} +static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { + return GRPC_ERROR_NONE; +} static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) {} -- cgit v1.2.3 From c1087883579714691dc5cb3a66445da497c1a08c Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 18 Nov 2016 10:54:45 -0800 Subject: clang-format --- src/core/ext/census/grpc_filter.c | 2 +- src/core/ext/client_channel/client_channel.c | 2 +- src/core/ext/client_channel/subchannel.c | 4 ++-- src/core/ext/load_reporting/load_reporting_filter.c | 2 +- src/core/ext/transport/chttp2/client/insecure/channel_create.c | 4 +--- src/core/lib/channel/channel_stack.c | 2 +- src/core/lib/channel/channel_stack.h | 9 ++++----- src/core/lib/channel/channel_stack_builder.c | 2 +- src/core/lib/channel/compress_filter.c | 2 +- src/core/lib/channel/connected_channel.c | 2 +- src/core/lib/channel/http_client_filter.c | 2 +- src/core/lib/channel/http_server_filter.c | 2 +- src/core/lib/security/transport/client_auth_filter.c | 2 +- src/core/lib/security/transport/server_auth_filter.c | 2 +- src/core/lib/surface/channel.c | 4 ++-- src/core/lib/surface/lame_client.c | 2 +- src/core/lib/surface/server.c | 2 +- test/core/end2end/tests/filter_call_init_fails.c | 2 +- test/core/end2end/tests/filter_causes_close.c | 2 +- test/core/end2end/tests/filter_latency.c | 2 +- 20 files changed, 25 insertions(+), 28 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index c73385f98b..3e8acc85e1 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -167,7 +167,7 @@ static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, /* TODO(hongyu): record rpc server stats and census_tracing_end_op here */ } -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { channel_data *chand = elem->channel_data; diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 13d8036b8d..64f507f424 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -451,7 +451,7 @@ static void cc_get_channel_info(grpc_exec_ctx *exec_ctx, } /* Constructor for channel_data */ -static grpc_error* cc_init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *cc_init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { channel_data *chand = elem->channel_data; diff --git a/src/core/ext/client_channel/subchannel.c b/src/core/ext/client_channel/subchannel.c index f1ed95ba9d..b25957518a 100644 --- a/src/core/ext/client_channel/subchannel.c +++ b/src/core/ext/client_channel/subchannel.c @@ -548,9 +548,9 @@ static void publish_transport_locked(grpc_exec_ctx *exec_ctx, abort(); /* TODO(ctiller): what to do here (previously we just crashed) */ } grpc_error *error = grpc_channel_stack_builder_finish( - exec_ctx, builder, 0, 1, connection_destroy, NULL, (void**)&con); + exec_ctx, builder, 0, 1, connection_destroy, NULL, (void **)&con); if (error != GRPC_ERROR_NONE) { - const char* msg = grpc_error_string(error); + const char *msg = grpc_error_string(error); gpr_log(GPR_ERROR, "error initializing subchannel stack: %s", msg); grpc_error_free_string(msg); GRPC_ERROR_UNREF(error); diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index a0feb086c7..18bb826948 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -152,7 +152,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Constructor for channel_data */ -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { GPR_ASSERT(!args->is_last); diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 0d2395266b..9e0478feab 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -205,9 +205,7 @@ static const grpc_client_channel_factory_vtable client_channel_factory_vtable = static grpc_client_channel_factory client_channel_factory = { &client_channel_factory_vtable}; -static void *cc_factory_arg_copy(void *cc_factory) { - return cc_factory; -} +static void *cc_factory_arg_copy(void *cc_factory) { return cc_factory; } static void cc_factory_arg_destroy(void *cc_factory) {} diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index ab78dfbf3e..1d0b7d4f31 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -102,7 +102,7 @@ grpc_call_element *grpc_call_stack_element(grpc_call_stack *call_stack, return CALL_ELEMS_FROM_STACK(call_stack) + index; } -grpc_error* grpc_channel_stack_init( +grpc_error *grpc_channel_stack_init( grpc_exec_ctx *exec_ctx, int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg, const grpc_channel_filter **filters, size_t filter_count, const grpc_channel_args *channel_args, grpc_transport *optional_transport, diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 9491b9ab1b..5d064c5695 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -215,12 +215,11 @@ grpc_call_element *grpc_call_stack_element(grpc_call_stack *stack, size_t i); size_t grpc_channel_stack_size(const grpc_channel_filter **filters, size_t filter_count); /* Initialize a channel stack given some filters */ -grpc_error* grpc_channel_stack_init( +grpc_error *grpc_channel_stack_init( grpc_exec_ctx *exec_ctx, int initial_refs, grpc_iomgr_cb_func destroy, - void *destroy_arg, const grpc_channel_filter **filters, - size_t filter_count, const grpc_channel_args *args, - grpc_transport *optional_transport, const char *name, - grpc_channel_stack *stack); + void *destroy_arg, const grpc_channel_filter **filters, size_t filter_count, + const grpc_channel_args *args, grpc_transport *optional_transport, + const char *name, grpc_channel_stack *stack); /* Destroy a channel stack */ void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_channel_stack *stack); diff --git a/src/core/lib/channel/channel_stack_builder.c b/src/core/lib/channel/channel_stack_builder.c index 747db0749e..047d85f44d 100644 --- a/src/core/lib/channel/channel_stack_builder.c +++ b/src/core/lib/channel/channel_stack_builder.c @@ -254,7 +254,7 @@ grpc_error *grpc_channel_stack_builder_finish( grpc_channel_stack *channel_stack = (grpc_channel_stack *)(*result + prefix_bytes); // and initialize it - grpc_error* error = grpc_channel_stack_init( + grpc_error *error = grpc_channel_stack_init( exec_ctx, initial_refs, destroy, destroy_arg == NULL ? *result : destroy_arg, filters, num_filters, builder->args, builder->transport, builder->name, channel_stack); diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 2afe28941a..0e336dc330 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -285,7 +285,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Constructor for channel_data */ -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { channel_data *channeld = elem->channel_data; diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 92739f70c7..c2a36b5558 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -114,7 +114,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Constructor for channel_data */ -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { channel_data *cd = (channel_data *)elem->channel_data; diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 8be9e0a2cb..35528e1b8c 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -415,7 +415,7 @@ static grpc_mdstr *user_agent_from_args(const grpc_channel_args *args, } /* Constructor for channel_data */ -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { channel_data *chand = elem->channel_data; diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 035124ade9..4b976ed8d5 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -326,7 +326,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Constructor for channel_data */ -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { GPR_ASSERT(!args->is_last); diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index eeb11feeb2..da897296e4 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -303,7 +303,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Constructor for channel_data */ -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { grpc_security_connector *sc = diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index 3abbeb35ef..e6a242e68f 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -238,7 +238,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, void *ignored) {} /* Constructor for channel_data */ -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { grpc_auth_context *auth_context = diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 1b5cf5ffec..22bb55c7b4 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -100,9 +100,9 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, } args = grpc_channel_args_copy( grpc_channel_stack_builder_get_channel_arguments(builder)); - grpc_error* error = grpc_channel_stack_builder_finish( + grpc_error *error = grpc_channel_stack_builder_finish( exec_ctx, builder, sizeof(grpc_channel), 1, destroy_channel, NULL, - (void**)&channel); + (void **)&channel); if (error != GRPC_ERROR_NONE) { grpc_channel_stack_destroy(exec_ctx, (grpc_channel_stack *)channel); gpr_free(channel); diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index 995a88de9e..57da94ac1e 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -123,7 +123,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, gpr_free(and_free_memory); } -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { GPR_ASSERT(args->is_first); diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index eeeb6cd432..78bd13bbbd 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -913,7 +913,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, server_unref(exec_ctx, chand->server); } -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { channel_data *chand = elem->channel_data; diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c index 13a32bf64d..6d9351ed8c 100644 --- a/test/core/end2end/tests/filter_call_init_fails.c +++ b/test/core/end2end/tests/filter_call_init_fails.c @@ -216,7 +216,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_final_info *final_info, void *and_free_memory) {} -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { return GRPC_ERROR_NONE; diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index 4c1ff8459a..21905b98fa 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -243,7 +243,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_final_info *final_info, void *and_free_memory) {} -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { return GRPC_ERROR_NONE; diff --git a/test/core/end2end/tests/filter_latency.c b/test/core/end2end/tests/filter_latency.c index 3e9c0352a5..9263dcc203 100644 --- a/test/core/end2end/tests/filter_latency.c +++ b/test/core/end2end/tests/filter_latency.c @@ -275,7 +275,7 @@ static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&g_mu); } -static grpc_error* init_channel_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { return GRPC_ERROR_NONE; -- cgit v1.2.3 From 4283a2648427ed3a095d9d36172eefd858781c4d Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 18 Nov 2016 10:43:56 -0800 Subject: pr comments --- src/core/ext/lb_policy/grpclb/grpclb.c | 50 +++++++++++++++++----------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index d16489fbc9..0829e05b43 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -486,21 +486,24 @@ static bool update_lb_connectivity_status_locked( /* The new connectivity status is a function of the previous one and the new * input coming from the status of the RR policy. * - * old state (grpclb's) + * current state (grpclb's) * | * v || I | C | R | TF | SD | <- new state (RR's) * ===++====+=====+=====+======+======+ - * I || I | C | R | I | I | + * I || I | C | R | [I] | [I] | * ---++----+-----+-----+------+------+ - * C || I | C | R | C | C | + * C || I | C | R | [C] | [C] | * ---++----+-----+-----+------+------+ - * R || I | C | R | R | R | + * R || I | C | R | [R] | [R] | * ---++----+-----+-----+------+------+ - * TF || I | C | R | TF | TF | + * TF || I | C | R | [TF] | [TF] | * ---++----+-----+-----+------+------+ * SD || NA | NA | NA | NA | NA | (*) * ---++----+-----+-----+------+------+ * + * A [STATE] indicates that the old RR policy is kept. In those cases, STATE + * is the current state of grpclb, which is left untouched. + * * In summary, if the new state is TRANSIENT_FAILURE or SHUTDOWN, stick to * the previous RR instance. * @@ -602,26 +605,22 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, if (glb_policy->shutting_down) return; - grpc_lb_policy *old_rr_policy = glb_policy->rr_policy; - - glb_policy->rr_policy = + grpc_lb_policy *new_rr_policy = create_rr_locked(exec_ctx, glb_policy->serverlist, glb_policy); - if (glb_policy->rr_policy == NULL) { + if (new_rr_policy == NULL) { gpr_log(GPR_ERROR, "Failure creating a RoundRobin policy for serverlist update with " "%lu entries. The previous RR instance (%p), if any, will continue " "to be used. Future updates from the LB will attempt to create new " "instances.", (unsigned long)glb_policy->serverlist->num_servers, - (void *)old_rr_policy); - /* restore the old policy */ - glb_policy->rr_policy = old_rr_policy; + (void *)glb_policy->rr_policy); return; } grpc_error *new_rr_state_error = NULL; const grpc_connectivity_state new_rr_state = - grpc_lb_policy_check_connectivity(exec_ctx, glb_policy->rr_policy, + grpc_lb_policy_check_connectivity(exec_ctx, new_rr_policy, &new_rr_state_error); /* Connectivity state is a function of the new RR policy just created */ const bool replace_old_rr = update_lb_connectivity_status_locked( @@ -629,15 +628,12 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, if (!replace_old_rr) { /* dispose of the new RR policy that won't be used after all */ - GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, - "rr_handover_no_replace"); - /* restore the old policy */ - glb_policy->rr_policy = old_rr_policy; + GRPC_LB_POLICY_UNREF(exec_ctx, new_rr_policy, "rr_handover_no_replace"); if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Keeping old RR policy (%p) despite new serverlist: new RR " "policy was in %s connectivity state.", - (void *)old_rr_policy, + (void *)glb_policy->rr_policy, grpc_connectivity_state_name(new_rr_state)); } return; @@ -645,14 +641,17 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Created RR policy (%p) to replace old RR (%p)", - (void *)glb_policy->rr_policy, (void *)old_rr_policy); + (void *)new_rr_policy, (void *)glb_policy->rr_policy); } - if (old_rr_policy != NULL) { + if (glb_policy->rr_policy != NULL) { /* if we are phasing out an existing RR instance, unref it. */ - GRPC_LB_POLICY_UNREF(exec_ctx, old_rr_policy, "rr_handover"); + GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "rr_handover"); } + /* Finally update the RR policy to the newly created one */ + glb_policy->rr_policy = new_rr_policy; + /* Add the gRPC LB's interested_parties pollset_set to that of the newly * created RR policy. This will make the RR policy progress upon activity on * gRPC LB, which in turn is tied to the application's call */ @@ -713,7 +712,7 @@ static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, gpr_mu_lock(&glb_policy->mu); const bool shutting_down = glb_policy->shutting_down; - grpc_lb_policy *maybe_unref = NULL; + bool unref_needed = false; GRPC_ERROR_REF(error); if (rr_connectivity->state == GRPC_CHANNEL_SHUTDOWN || shutting_down) { @@ -722,7 +721,7 @@ static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, * be UNREF'd after releasing the lock. Otherwise, if the UNREF is the last * one, the policy would be destroyed, alongside the lock, which would * result in a use-after-free */ - maybe_unref = &glb_policy->base; + unref_needed = true; gpr_free(rr_connectivity); } else { /* rr state != SHUTDOWN && !shutting down: biz as usual */ update_lb_connectivity_status_locked(exec_ctx, glb_policy, @@ -733,8 +732,9 @@ static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, &rr_connectivity->on_change); } gpr_mu_unlock(&glb_policy->mu); - if (maybe_unref != NULL) { - GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, maybe_unref, "rr_connectivity_cb"); + if (unref_needed) { + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, + "rr_connectivity_cb"); } GRPC_ERROR_UNREF(error); } -- cgit v1.2.3 From f6f33d73545bd3666cb130af6ecdc1a6ab1a9d4c Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 18 Nov 2016 11:38:52 -0800 Subject: Add poll_object struct (and related changes to fix compilation errors). No other functionality changes --- src/core/lib/iomgr/ev_epoll_linux.c | 404 ++++++++++++++++++++++++------------ 1 file changed, 270 insertions(+), 134 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 91041a7c28..f81125c8b9 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -90,10 +90,39 @@ void grpc_use_signal(int signum) { struct polling_island; +typedef enum { + POLL_OBJ_FD, + POLL_OBJ_POLLSET, + POLL_OBJ_POLLSET_SET +} poll_obj_type; + +typedef struct poll_obj { + gpr_mu mu; + struct polling_island *pi; +} poll_obj; + +const char *poll_obj_string(poll_obj_type po_type) { + switch (po_type) { + case POLL_OBJ_FD: + return "fd"; + case POLL_OBJ_POLLSET: + return "pollset"; + case POLL_OBJ_POLLSET_SET: + return "pollset_set"; + } + + GPR_UNREACHABLE_CODE(return "UNKNOWN"); +} + /******************************************************************************* * Fd Declarations */ + +#define FD_FROM_PO(po) ((grpc_fd *)(po)) + struct grpc_fd { + poll_obj po; + int fd; /* refst format: bit 0 : 1=Active / 0=Orphaned @@ -101,8 +130,6 @@ struct grpc_fd { Ref/Unref by two to avoid altering the orphaned bit */ gpr_atm refst; - gpr_mu mu; - /* Indicates that the fd is shutdown and that any pending read/write closures should fail */ bool shutdown; @@ -115,9 +142,6 @@ struct grpc_fd { grpc_closure *read_closure; grpc_closure *write_closure; - /* The polling island to which this fd belongs to (protected by mu) */ - struct polling_island *polling_island; - struct grpc_fd *freelist_next; grpc_closure *on_done_closure; @@ -220,16 +244,14 @@ struct grpc_pollset_worker { }; struct grpc_pollset { - gpr_mu mu; + poll_obj po; + grpc_pollset_worker root_worker; bool kicked_without_pollers; bool shutting_down; /* Is the pollset shutting down ? */ bool finish_shutdown_called; /* Is the 'finish_shutdown_locked()' called ? */ grpc_closure *shutdown_done; /* Called after after shutdown is complete */ - - /* The polling island to which this pollset belongs to */ - struct polling_island *polling_island; }; /******************************************************************************* @@ -242,7 +264,7 @@ struct grpc_pollset { * simplify the grpc_fd structure since we would no longer need to explicitly * maintain the orphaned state */ struct grpc_pollset_set { - gpr_mu mu; + poll_obj po; size_t pollset_count; size_t pollset_capacity; @@ -916,7 +938,7 @@ static void fd_global_shutdown(void) { while (fd_freelist != NULL) { grpc_fd *fd = fd_freelist; fd_freelist = fd_freelist->freelist_next; - gpr_mu_destroy(&fd->mu); + gpr_mu_destroy(&fd->po.mu); gpr_free(fd); } gpr_mu_destroy(&fd_freelist_mu); @@ -934,13 +956,14 @@ static grpc_fd *fd_create(int fd, const char *name) { if (new_fd == NULL) { new_fd = gpr_malloc(sizeof(grpc_fd)); - gpr_mu_init(&new_fd->mu); + gpr_mu_init(&new_fd->po.mu); } - /* Note: It is not really needed to get the new_fd->mu lock here. If this is a - newly created fd (or an fd we got from the freelist), no one else would be - holding a lock to it anyway. */ - gpr_mu_lock(&new_fd->mu); + /* Note: It is not really needed to get the new_fd->po.mu lock here. If this + * is a newly created fd (or an fd we got from the freelist), no one else + * would be holding a lock to it anyway. */ + gpr_mu_lock(&new_fd->po.mu); + new_fd->po.pi = NULL; gpr_atm_rel_store(&new_fd->refst, (gpr_atm)1); new_fd->fd = fd; @@ -948,12 +971,11 @@ static grpc_fd *fd_create(int fd, const char *name) { new_fd->orphaned = false; new_fd->read_closure = CLOSURE_NOT_READY; new_fd->write_closure = CLOSURE_NOT_READY; - new_fd->polling_island = NULL; new_fd->freelist_next = NULL; new_fd->on_done_closure = NULL; new_fd->read_notifier_pollset = NULL; - gpr_mu_unlock(&new_fd->mu); + gpr_mu_unlock(&new_fd->po.mu); char *fd_name; gpr_asprintf(&fd_name, "%s fd=%d", name, fd); @@ -971,11 +993,11 @@ static bool fd_is_orphaned(grpc_fd *fd) { static int fd_wrapped_fd(grpc_fd *fd) { int ret_fd = -1; - gpr_mu_lock(&fd->mu); + gpr_mu_lock(&fd->po.mu); if (!fd->orphaned) { ret_fd = fd->fd; } - gpr_mu_unlock(&fd->mu); + gpr_mu_unlock(&fd->po.mu); return ret_fd; } @@ -987,7 +1009,7 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_error *error = GRPC_ERROR_NONE; polling_island *unref_pi = NULL; - gpr_mu_lock(&fd->mu); + gpr_mu_lock(&fd->po.mu); fd->on_done_closure = on_done; /* If release_fd is not NULL, we should be relinquishing control of the file @@ -1007,25 +1029,25 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, /* Remove the fd from the polling island: - Get a lock on the latest polling island (i.e the last island in the - linked list pointed by fd->polling_island). This is the island that + linked list pointed by fd->po.pi). This is the island that would actually contain the fd - Remove the fd from the latest polling island - Unlock the latest polling island - - Set fd->polling_island to NULL (but remove the ref on the polling island + - Set fd->po.pi to NULL (but remove the ref on the polling island before doing this.) */ - if (fd->polling_island != NULL) { - polling_island *pi_latest = polling_island_lock(fd->polling_island); + if (fd->po.pi != NULL) { + polling_island *pi_latest = polling_island_lock(fd->po.pi); polling_island_remove_fd_locked(pi_latest, fd, is_fd_closed, &error); gpr_mu_unlock(&pi_latest->mu); - unref_pi = fd->polling_island; - fd->polling_island = NULL; + unref_pi = fd->po.pi; + fd->po.pi = NULL; } grpc_exec_ctx_sched(exec_ctx, fd->on_done_closure, GRPC_ERROR_REF(error), NULL); - gpr_mu_unlock(&fd->mu); + gpr_mu_unlock(&fd->po.mu); UNREF_BY(fd, 2, reason); /* Drop the reference */ if (unref_pi != NULL) { /* Unref stale polling island here, outside the fd lock above. @@ -1090,23 +1112,23 @@ static grpc_pollset *fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { grpc_pollset *notifier = NULL; - gpr_mu_lock(&fd->mu); + gpr_mu_lock(&fd->po.mu); notifier = fd->read_notifier_pollset; - gpr_mu_unlock(&fd->mu); + gpr_mu_unlock(&fd->po.mu); return notifier; } static bool fd_is_shutdown(grpc_fd *fd) { - gpr_mu_lock(&fd->mu); + gpr_mu_lock(&fd->po.mu); const bool r = fd->shutdown; - gpr_mu_unlock(&fd->mu); + gpr_mu_unlock(&fd->po.mu); return r; } /* Might be called multiple times */ static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - gpr_mu_lock(&fd->mu); + gpr_mu_lock(&fd->po.mu); /* Do the actual shutdown only once */ if (!fd->shutdown) { fd->shutdown = true; @@ -1117,28 +1139,28 @@ static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { set_ready_locked(exec_ctx, fd, &fd->read_closure); set_ready_locked(exec_ctx, fd, &fd->write_closure); } - gpr_mu_unlock(&fd->mu); + gpr_mu_unlock(&fd->po.mu); } static void fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure) { - gpr_mu_lock(&fd->mu); + gpr_mu_lock(&fd->po.mu); notify_on_locked(exec_ctx, fd, &fd->read_closure, closure); - gpr_mu_unlock(&fd->mu); + gpr_mu_unlock(&fd->po.mu); } static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure) { - gpr_mu_lock(&fd->mu); + gpr_mu_lock(&fd->po.mu); notify_on_locked(exec_ctx, fd, &fd->write_closure, closure); - gpr_mu_unlock(&fd->mu); + gpr_mu_unlock(&fd->po.mu); } static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { - gpr_mu_lock(&fd->mu); + gpr_mu_lock(&fd->po.mu); grpc_workqueue *workqueue = GRPC_WORKQUEUE_REF( - (grpc_workqueue *)fd->polling_island, "fd_get_workqueue"); - gpr_mu_unlock(&fd->mu); + (grpc_workqueue *)fd->po.pi, "fd_get_workqueue"); + gpr_mu_unlock(&fd->po.mu); return workqueue; } @@ -1278,8 +1300,9 @@ static grpc_error *kick_poller(void) { } static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { - gpr_mu_init(&pollset->mu); - *mu = &pollset->mu; + gpr_mu_init(&pollset->po.mu); + *mu = &pollset->po.mu; + pollset->po.pi = NULL; pollset->root_worker.next = pollset->root_worker.prev = &pollset->root_worker; pollset->kicked_without_pollers = false; @@ -1287,8 +1310,6 @@ static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { pollset->shutting_down = false; pollset->finish_shutdown_called = false; pollset->shutdown_done = NULL; - - pollset->polling_island = NULL; } /* Convert a timespec to milliseconds: @@ -1318,26 +1339,26 @@ static int poll_deadline_to_millis_timeout(gpr_timespec deadline, static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_pollset *notifier) { - /* Need the fd->mu since we might be racing with fd_notify_on_read */ - gpr_mu_lock(&fd->mu); + /* Need the fd->po.mu since we might be racing with fd_notify_on_read */ + gpr_mu_lock(&fd->po.mu); set_ready_locked(exec_ctx, fd, &fd->read_closure); fd->read_notifier_pollset = notifier; - gpr_mu_unlock(&fd->mu); + gpr_mu_unlock(&fd->po.mu); } static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - /* Need the fd->mu since we might be racing with fd_notify_on_write */ - gpr_mu_lock(&fd->mu); + /* Need the fd->po.mu since we might be racing with fd_notify_on_write */ + gpr_mu_lock(&fd->po.mu); set_ready_locked(exec_ctx, fd, &fd->write_closure); - gpr_mu_unlock(&fd->mu); + gpr_mu_unlock(&fd->po.mu); } static void pollset_release_polling_island(grpc_exec_ctx *exec_ctx, grpc_pollset *ps, char *reason) { - if (ps->polling_island != NULL) { - PI_UNREF(exec_ctx, ps->polling_island, reason); + if (ps->po.pi != NULL) { + PI_UNREF(exec_ctx, ps->po.pi, reason); } - ps->polling_island = NULL; + ps->po.pi = NULL; } static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, @@ -1347,12 +1368,12 @@ static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, pollset->finish_shutdown_called = true; - /* Release the ref and set pollset->polling_island to NULL */ + /* Release the ref and set pollset->po.pi to NULL */ pollset_release_polling_island(exec_ctx, pollset, "ps_shutdown"); grpc_exec_ctx_sched(exec_ctx, pollset->shutdown_done, GRPC_ERROR_NONE, NULL); } -/* pollset->mu lock must be held by the caller before calling this */ +/* pollset->po.mu lock must be held by the caller before calling this */ static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_closure *closure) { GPR_TIMER_BEGIN("pollset_shutdown", 0); @@ -1377,7 +1398,7 @@ static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, * here */ static void pollset_destroy(grpc_pollset *pollset) { GPR_ASSERT(!pollset_has_workers(pollset)); - gpr_mu_destroy(&pollset->mu); + gpr_mu_destroy(&pollset->po.mu); } static void pollset_reset(grpc_pollset *pollset) { @@ -1387,7 +1408,7 @@ static void pollset_reset(grpc_pollset *pollset) { pollset->finish_shutdown_called = false; pollset->kicked_without_pollers = false; pollset->shutdown_done = NULL; - GPR_ASSERT(pollset->polling_island == NULL); + GPR_ASSERT(pollset->po.pi == NULL); } static bool maybe_do_workqueue_work(grpc_exec_ctx *exec_ctx, @@ -1427,7 +1448,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, GPR_TIMER_BEGIN("pollset_work_and_unlock", 0); /* We need to get the epoll_fd to wait on. The epoll_fd is in inside the - latest polling island pointed by pollset->polling_island. + latest polling island pointed by pollset->po.pi Since epoll_fd is immutable, we can read it without obtaining the polling island lock. There is however a possibility that the polling island (from @@ -1436,36 +1457,36 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, right-away from epoll_wait() and pick up the latest polling_island the next this function (i.e pollset_work_and_unlock()) is called */ - if (pollset->polling_island == NULL) { - pollset->polling_island = polling_island_create(exec_ctx, NULL, error); - if (pollset->polling_island == NULL) { + if (pollset->po.pi == NULL) { + pollset->po.pi = polling_island_create(exec_ctx, NULL, error); + if (pollset->po.pi == NULL) { GPR_TIMER_END("pollset_work_and_unlock", 0); return; /* Fatal error. We cannot continue */ } - PI_ADD_REF(pollset->polling_island, "ps"); + PI_ADD_REF(pollset->po.pi, "ps"); GRPC_POLLING_TRACE("pollset_work: pollset: %p created new pi: %p", - (void *)pollset, (void *)pollset->polling_island); + (void *)pollset, (void *)pollset->po.pi); } - pi = polling_island_maybe_get_latest(pollset->polling_island); + pi = polling_island_maybe_get_latest(pollset->po.pi); epoll_fd = pi->epoll_fd; - /* Update the pollset->polling_island since the island being pointed by - pollset->polling_island maybe older than the one pointed by pi) */ - if (pollset->polling_island != pi) { + /* Update the pollset->po.pi since the island being pointed by + pollset->po.pi maybe older than the one pointed by pi) */ + if (pollset->po.pi != pi) { /* Always do PI_ADD_REF before PI_UNREF because PI_UNREF may cause the polling island to be deleted */ PI_ADD_REF(pi, "ps"); - PI_UNREF(exec_ctx, pollset->polling_island, "ps"); - pollset->polling_island = pi; + PI_UNREF(exec_ctx, pollset->po.pi, "ps"); + pollset->po.pi = pi; } /* Add an extra ref so that the island does not get destroyed (which means the epoll_fd won't be closed) while we are are doing an epoll_wait() on the epoll_fd */ PI_ADD_REF(pi, "ps_work"); - gpr_mu_unlock(&pollset->mu); + gpr_mu_unlock(&pollset->po.mu); /* If we get some workqueue work to do, it might end up completing an item on the completion queue, so there's no need to poll... so we skip that and @@ -1540,17 +1561,17 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, GPR_ASSERT(pi != NULL); /* Before leaving, release the extra ref we added to the polling island. It - is important to use "pi" here (i.e our old copy of pollset->polling_island + is important to use "pi" here (i.e our old copy of pollset->po.pi that we got before releasing the polling island lock). This is because - pollset->polling_island pointer might get udpated in other parts of the + pollset->po.pi pointer might get udpated in other parts of the code when there is an island merge while we are doing epoll_wait() above */ PI_UNREF(exec_ctx, pi, "ps_work"); GPR_TIMER_END("pollset_work_and_unlock", 0); } -/* pollset->mu lock must be held by the caller before calling this. - The function pollset_work() may temporarily release the lock (pollset->mu) +/* pollset->po.mu lock must be held by the caller before calling this. + The function pollset_work() may temporarily release the lock (pollset->po.mu) during the course of its execution but it will always re-acquire the lock and ensure that it is held by the time the function returns */ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, @@ -1620,7 +1641,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, &g_orig_sigmask, &error); grpc_exec_ctx_flush(exec_ctx); - gpr_mu_lock(&pollset->mu); + gpr_mu_lock(&pollset->po.mu); /* Note: There is no need to reset worker.is_kicked to 0 since we are no longer going to use this worker */ @@ -1640,9 +1661,9 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, GPR_TIMER_MARK("pollset_work.finish_shutdown_locked", 0); finish_shutdown_locked(exec_ctx, pollset); - gpr_mu_unlock(&pollset->mu); + gpr_mu_unlock(&pollset->po.mu); grpc_exec_ctx_flush(exec_ctx); - gpr_mu_lock(&pollset->mu); + gpr_mu_lock(&pollset->po.mu); } *worker_hdl = NULL; @@ -1656,42 +1677,159 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, return error; } +#if 0 +static void add_poll_object(grpc_exec_ctx *exec_ctx, poll_obj *bag, + poll_obj *item, poll_obj_type bag_type, + poll_obj_type item_type) { + GPR_TIMER_BEGIN("add_poll_object", 0); + + grpc_error *error = GRPC_ERROR_NONE; + polling_island *pi_new = NULL; + + gpr_mu_lock(&bag->mu); + gpr_mu_lock(&item->mu); + +retry: + /* + * 1) If item->pi and bag->pi are both non-NULL and equal, do nothing + * 2) If item->pi and bag->pi are both NULL, create a new polling island (with + * a refcount of 2) and point item->pi and bag->pi to the new island + * 3) If exactly one of item->pi or bag->pi is NULL, update it to point to + * the other's non-NULL pi + * 4) Finally if item->pi and bag-pi are non-NULL and not-equal, merge the + * polling islands and update item->pi and bag->pi to point to the new + * island + */ + + /* Early out if we are trying to add an 'fd' to a 'bag' but the fd is already + * orphaned */ + if (item_type == POLL_OBJ_FD && (FD_FROM_PO(item))->orphaned) { + gpr_mu_unlock(&item->mu); + gpr_mu_unlock(&bag->mu); + return; + } + + if (item->pi == bag->pi) { + pi_new = item->pi; + if (pi_new == NULL) { + /* GPR_ASSERT(item->pi == bag->pi == NULL) */ + + /* If we are adding an fd to a bag (i.e pollset or pollset_set), then + * we need to do some extra work to make TSAN happy */ + if (item_type == POLL_OBJ_FD) { + /* Unlock before creating a new polling island: the polling island will + create a workqueue which creates a file descriptor, and holding an fd + lock here can eventually cause a loop to appear to TSAN (making it + unhappy). We don't think it's a real loop (there's an epoch point + where that loop possibility disappears), but the advantages of + keeping TSAN happy outweigh any performance advantage we might have + by keeping the lock held. */ + gpr_mu_unlock(&item->mu); + pi_new = polling_island_create(exec_ctx, FD_FROM_PO(item), &error); + gpr_mu_lock(&item->mu); + + /* Need to reverify any assumptions made between the initial lock and + getting to this branch: if they've changed, we need to throw away our + work and figure things out again. */ + if (item->pi != NULL) { + /* No need to lock 'pi_new' here since this is a new polling island + * and no one has a reference to it yet */ + polling_island_remove_all_fds_locked(pi_new, true, &error); + + /* Ref and unref so that the polling island gets deleted during unref + */ + PI_ADD_REF(pi_new, "dance_of_destruction"); + PI_UNREF(exec_ctx, pi_new, "dance_of_destruction"); + goto retry; + } + } else { + pi_new = polling_island_create(exec_ctx, NULL, &error); + } + } + } else if (item->pi == NULL) { + /* GPR_ASSERT(bag->pi != NULL) */ + /* Make pi_new point to latest pi*/ + pi_new = polling_island_lock(bag->pi); + + if (item_type == POLL_OBJ_FD) { + grpc_fd *fd = FD_FROM_PO(item); + polling_island_add_fds_locked(pi_new, &fd, 1, true, &error); + } + + gpr_mu_unlock(&pi_new->mu); + + } else if (bag->pi == NULL) { + /* GPR_ASSERT(item->pi != NULL) */ + /* Make pi_new to point to latest pi */ + pi_new = polling_island_lock(item->pi); + gpr_mu_unlock(&pi_new->mu); + } else { + pi_new = polling_island_merge(item->pi, bag->pi, &error); + } + + /* At this point, pi_new is the polling island that both item->pi and bag->pi + MUST be pointing to */ + + if (item->pi != pi_new) { + PI_ADD_REF(pi_new, poll_obj_string(item_type)); + if (item->pi != NULL) { + PI_UNREF(exec_ctx, item->pi, poll_obj_string(item_type)); + } + item->pi = pi_new; + } + + if (bag->pi != pi_new) { + PI_ADD_REF(pi_new, poll_obj_string(bag_type)); + if (bag->pi != NULL) { + PI_UNREF(exec_ctx, bag->pi, poll_obj_string(bag_type)); + } + bag->pi = pi_new; + } + + gpr_mu_unlock(&item->mu); + gpr_mu_unlock(&bag->mu); + + GRPC_LOG_IF_ERROR("add_poll_object", error); + GPR_TIMER_END("add_poll_object", 0); +} +#endif + static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_fd *fd) { GPR_TIMER_BEGIN("pollset_add_fd", 0); grpc_error *error = GRPC_ERROR_NONE; - gpr_mu_lock(&pollset->mu); - gpr_mu_lock(&fd->mu); + gpr_mu_lock(&pollset->po.mu); + gpr_mu_lock(&fd->po.mu); polling_island *pi_new = NULL; retry: - /* 1) If fd->polling_island and pollset->polling_island are both non-NULL and + /* 1) If fd->po.pi and pollset->po.pi are both non-NULL and * equal, do nothing. - * 2) If fd->polling_island and pollset->polling_island are both NULL, create + * 2) If fd->po.pi and pollset->po.pi are both NULL, create * a new polling island (with a refcount of 2) and make the polling_island * fields in both fd and pollset to point to the new island - * 3) If one of fd->polling_island or pollset->polling_island is NULL, update + * 3) If one of fd->po.pi or pollset->po.pi is NULL, update * the NULL polling_island field to point to the non-NULL polling_island * field (ensure that the refcount on the polling island is incremented by * 1 to account for the newly added reference) - * 4) Finally, if fd->polling_island and pollset->polling_island are non-NULL + * 4) Finally, if fd->po.pi and pollset->po.pi are non-NULL * and different, merge both the polling islands and update the * polling_island fields in both fd and pollset to point to the merged * polling island. */ if (fd->orphaned) { - gpr_mu_unlock(&fd->mu); - gpr_mu_unlock(&pollset->mu); + gpr_mu_unlock(&fd->po.mu); + gpr_mu_unlock(&pollset->po.mu); /* early out */ return; } - if (fd->polling_island == pollset->polling_island) { - pi_new = fd->polling_island; + if (fd->po.pi == pollset->po.pi) { + pi_new = fd->po.pi; if (pi_new == NULL) { /* Unlock before creating a new polling island: the polling island will create a workqueue which creates a file descriptor, and holding an fd @@ -1700,13 +1838,13 @@ retry: that loop possibility disappears), but the advantages of keeping TSAN happy outweigh any performance advantage we might have by keeping the lock held. */ - gpr_mu_unlock(&fd->mu); + gpr_mu_unlock(&fd->po.mu); pi_new = polling_island_create(exec_ctx, fd, &error); - gpr_mu_lock(&fd->mu); + gpr_mu_lock(&fd->po.mu); /* Need to reverify any assumptions made between the initial lock and getting to this branch: if they've changed, we need to throw away our work and figure things out again. */ - if (fd->polling_island != NULL) { + if (fd->po.pi != NULL) { GRPC_POLLING_TRACE( "pollset_add_fd: Raced creating new polling island. pi_new: %p " "(fd: %d, pollset: %p)", @@ -1727,55 +1865,53 @@ retry: (void *)pi_new, fd->fd, (void *)pollset); } } - } else if (fd->polling_island == NULL) { - pi_new = polling_island_lock(pollset->polling_island); + } else if (fd->po.pi == NULL) { + pi_new = polling_island_lock(pollset->po.pi); polling_island_add_fds_locked(pi_new, &fd, 1, true, &error); gpr_mu_unlock(&pi_new->mu); GRPC_POLLING_TRACE( "pollset_add_fd: fd->pi was NULL. pi_new: %p (fd: %d, pollset: %p, " "pollset->pi: %p)", - (void *)pi_new, fd->fd, (void *)pollset, - (void *)pollset->polling_island); - } else if (pollset->polling_island == NULL) { - pi_new = polling_island_lock(fd->polling_island); + (void *)pi_new, fd->fd, (void *)pollset, (void *)pollset->po.pi); + } else if (pollset->po.pi == NULL) { + pi_new = polling_island_lock(fd->po.pi); gpr_mu_unlock(&pi_new->mu); GRPC_POLLING_TRACE( "pollset_add_fd: pollset->pi was NULL. pi_new: %p (fd: %d, pollset: " "%p, fd->pi: %p", - (void *)pi_new, fd->fd, (void *)pollset, (void *)fd->polling_island); + (void *)pi_new, fd->fd, (void *)pollset, (void *)fd->po.pi); } else { - pi_new = polling_island_merge(fd->polling_island, pollset->polling_island, - &error); + pi_new = polling_island_merge(fd->po.pi, pollset->po.pi, &error); GRPC_POLLING_TRACE( "pollset_add_fd: polling islands merged. pi_new: %p (fd: %d, pollset: " "%p, fd->pi: %p, pollset->pi: %p)", - (void *)pi_new, fd->fd, (void *)pollset, (void *)fd->polling_island, - (void *)pollset->polling_island); + (void *)pi_new, fd->fd, (void *)pollset, (void *)fd->po.pi, + (void *)pollset->po.pi); } - /* At this point, pi_new is the polling island that both fd->polling_island - and pollset->polling_island must be pointing to */ + /* At this point, pi_new is the polling island that both fd->po.pi + and pollset->po.pi must be pointing to */ - if (fd->polling_island != pi_new) { + if (fd->po.pi != pi_new) { PI_ADD_REF(pi_new, "fd"); - if (fd->polling_island != NULL) { - PI_UNREF(exec_ctx, fd->polling_island, "fd"); + if (fd->po.pi != NULL) { + PI_UNREF(exec_ctx, fd->po.pi, "fd"); } - fd->polling_island = pi_new; + fd->po.pi = pi_new; } - if (pollset->polling_island != pi_new) { + if (pollset->po.pi != pi_new) { PI_ADD_REF(pi_new, "ps"); - if (pollset->polling_island != NULL) { - PI_UNREF(exec_ctx, pollset->polling_island, "ps"); + if (pollset->po.pi != NULL) { + PI_UNREF(exec_ctx, pollset->po.pi, "ps"); } - pollset->polling_island = pi_new; + pollset->po.pi = pi_new; } - gpr_mu_unlock(&fd->mu); - gpr_mu_unlock(&pollset->mu); + gpr_mu_unlock(&fd->po.mu); + gpr_mu_unlock(&pollset->po.mu); GRPC_LOG_IF_ERROR("pollset_add_fd", error); @@ -1789,13 +1925,13 @@ retry: static grpc_pollset_set *pollset_set_create(void) { grpc_pollset_set *pollset_set = gpr_malloc(sizeof(*pollset_set)); memset(pollset_set, 0, sizeof(*pollset_set)); - gpr_mu_init(&pollset_set->mu); + gpr_mu_init(&pollset_set->po.mu); return pollset_set; } static void pollset_set_destroy(grpc_pollset_set *pollset_set) { size_t i; - gpr_mu_destroy(&pollset_set->mu); + gpr_mu_destroy(&pollset_set->po.mu); for (i = 0; i < pollset_set->fd_count; i++) { GRPC_FD_UNREF(pollset_set->fds[i], "pollset_set"); } @@ -1808,7 +1944,7 @@ static void pollset_set_destroy(grpc_pollset_set *pollset_set) { static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pollset_set, grpc_fd *fd) { size_t i; - gpr_mu_lock(&pollset_set->mu); + gpr_mu_lock(&pollset_set->po.mu); if (pollset_set->fd_count == pollset_set->fd_capacity) { pollset_set->fd_capacity = GPR_MAX(8, 2 * pollset_set->fd_capacity); pollset_set->fds = gpr_realloc( @@ -1822,13 +1958,13 @@ static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, for (i = 0; i < pollset_set->pollset_set_count; i++) { pollset_set_add_fd(exec_ctx, pollset_set->pollset_sets[i], fd); } - gpr_mu_unlock(&pollset_set->mu); + gpr_mu_unlock(&pollset_set->po.mu); } static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pollset_set, grpc_fd *fd) { size_t i; - gpr_mu_lock(&pollset_set->mu); + gpr_mu_lock(&pollset_set->po.mu); for (i = 0; i < pollset_set->fd_count; i++) { if (pollset_set->fds[i] == fd) { pollset_set->fd_count--; @@ -1841,14 +1977,14 @@ static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, for (i = 0; i < pollset_set->pollset_set_count; i++) { pollset_set_del_fd(exec_ctx, pollset_set->pollset_sets[i], fd); } - gpr_mu_unlock(&pollset_set->mu); + gpr_mu_unlock(&pollset_set->po.mu); } static void pollset_set_add_pollset(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pollset_set, grpc_pollset *pollset) { size_t i, j; - gpr_mu_lock(&pollset_set->mu); + gpr_mu_lock(&pollset_set->po.mu); if (pollset_set->pollset_count == pollset_set->pollset_capacity) { pollset_set->pollset_capacity = GPR_MAX(8, 2 * pollset_set->pollset_capacity); @@ -1866,14 +2002,14 @@ static void pollset_set_add_pollset(grpc_exec_ctx *exec_ctx, } } pollset_set->fd_count = j; - gpr_mu_unlock(&pollset_set->mu); + gpr_mu_unlock(&pollset_set->po.mu); } static void pollset_set_del_pollset(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pollset_set, grpc_pollset *pollset) { size_t i; - gpr_mu_lock(&pollset_set->mu); + gpr_mu_lock(&pollset_set->po.mu); for (i = 0; i < pollset_set->pollset_count; i++) { if (pollset_set->pollsets[i] == pollset) { pollset_set->pollset_count--; @@ -1882,14 +2018,14 @@ static void pollset_set_del_pollset(grpc_exec_ctx *exec_ctx, break; } } - gpr_mu_unlock(&pollset_set->mu); + gpr_mu_unlock(&pollset_set->po.mu); } static void pollset_set_add_pollset_set(grpc_exec_ctx *exec_ctx, grpc_pollset_set *bag, grpc_pollset_set *item) { size_t i, j; - gpr_mu_lock(&bag->mu); + gpr_mu_lock(&bag->po.mu); if (bag->pollset_set_count == bag->pollset_set_capacity) { bag->pollset_set_capacity = GPR_MAX(8, 2 * bag->pollset_set_capacity); bag->pollset_sets = @@ -1906,14 +2042,14 @@ static void pollset_set_add_pollset_set(grpc_exec_ctx *exec_ctx, } } bag->fd_count = j; - gpr_mu_unlock(&bag->mu); + gpr_mu_unlock(&bag->po.mu); } static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, grpc_pollset_set *bag, grpc_pollset_set *item) { size_t i; - gpr_mu_lock(&bag->mu); + gpr_mu_lock(&bag->po.mu); for (i = 0; i < bag->pollset_set_count; i++) { if (bag->pollset_sets[i] == item) { bag->pollset_set_count--; @@ -1922,7 +2058,7 @@ static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, break; } } - gpr_mu_unlock(&bag->mu); + gpr_mu_unlock(&bag->po.mu); } /* Test helper functions @@ -1930,9 +2066,9 @@ static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, void *grpc_fd_get_polling_island(grpc_fd *fd) { polling_island *pi; - gpr_mu_lock(&fd->mu); - pi = fd->polling_island; - gpr_mu_unlock(&fd->mu); + gpr_mu_lock(&fd->po.mu); + pi = fd->po.pi; + gpr_mu_unlock(&fd->po.mu); return pi; } @@ -1940,9 +2076,9 @@ void *grpc_fd_get_polling_island(grpc_fd *fd) { void *grpc_pollset_get_polling_island(grpc_pollset *ps) { polling_island *pi; - gpr_mu_lock(&ps->mu); - pi = ps->polling_island; - gpr_mu_unlock(&ps->mu); + gpr_mu_lock(&ps->po.mu); + pi = ps->po.pi; + gpr_mu_unlock(&ps->po.mu); return pi; } -- cgit v1.2.3 From 499b94b7988eb75064d2d8727171e3e8a8414672 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 18 Nov 2016 14:35:47 -0800 Subject: Replace pollset_add_fd with add_poll_obj --- src/core/lib/iomgr/ev_epoll_linux.c | 50 +++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index f81125c8b9..e9a0c690c0 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1158,8 +1158,8 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { gpr_mu_lock(&fd->po.mu); - grpc_workqueue *workqueue = GRPC_WORKQUEUE_REF( - (grpc_workqueue *)fd->po.pi, "fd_get_workqueue"); + grpc_workqueue *workqueue = + GRPC_WORKQUEUE_REF((grpc_workqueue *)fd->po.pi, "fd_get_workqueue"); gpr_mu_unlock(&fd->po.mu); return workqueue; } @@ -1677,7 +1677,6 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, return error; } -#if 0 static void add_poll_object(grpc_exec_ctx *exec_ctx, poll_obj *bag, poll_obj *item, poll_obj_type bag_type, poll_obj_type item_type) { @@ -1732,8 +1731,13 @@ retry: getting to this branch: if they've changed, we need to throw away our work and figure things out again. */ if (item->pi != NULL) { + GRPC_POLLING_TRACE( + "add_poll_object: Raced creating new polling island. pi_new: %p " + "(fd: %d, %s: %p)", + (void *)pi_new, FD_FROM_PO(item)->fd, poll_obj_string(bag_type), + (void *)bag); /* No need to lock 'pi_new' here since this is a new polling island - * and no one has a reference to it yet */ + * and no one has a reference to it yet */ polling_island_remove_all_fds_locked(pi_new, true, &error); /* Ref and unref so that the polling island gets deleted during unref @@ -1745,6 +1749,17 @@ retry: } else { pi_new = polling_island_create(exec_ctx, NULL, &error); } + + GRPC_POLLING_TRACE( + "add_poll_object: Created new polling island. pi_new: %p (%s: %p, " + "%s: %p)", + (void *)pi_new, poll_obj_string(item_type), (void *)item, + poll_obj_string(bag_type), (void *)bag); + } else { + GRPC_POLLING_TRACE( + "add_poll_object: Same polling island. pi: %p (%s, %s)", + (void *)pi_new, poll_obj_string(item_type), + poll_obj_string(bag_type)); } } else if (item->pi == NULL) { /* GPR_ASSERT(bag->pi != NULL) */ @@ -1757,14 +1772,28 @@ retry: } gpr_mu_unlock(&pi_new->mu); - + GRPC_POLLING_TRACE( + "add_poll_obj: item->pi was NULL. pi_new: %p (item(%s): %p, " + "bag(%s): %p)", + (void *)pi_new, poll_obj_string(item_type), (void *)item, + poll_obj_string(bag_type), (void *)bag); } else if (bag->pi == NULL) { /* GPR_ASSERT(item->pi != NULL) */ /* Make pi_new to point to latest pi */ pi_new = polling_island_lock(item->pi); gpr_mu_unlock(&pi_new->mu); + GRPC_POLLING_TRACE( + "add_poll_obj: bag->pi was NULL. pi_new: %p (item(%s): %p, " + "bag(%s): %p)", + (void *)pi_new, poll_obj_string(item_type), (void *)item, + poll_obj_string(bag_type), (void *)bag); } else { pi_new = polling_island_merge(item->pi, bag->pi, &error); + GRPC_POLLING_TRACE( + "add_poll_obj: polling islands merged. pi_new: %p (item(%s): %p, " + "bag(%s): %p)", + (void *)pi_new, poll_obj_string(item_type), (void *)item, + poll_obj_string(bag_type), (void *)bag); } /* At this point, pi_new is the polling island that both item->pi and bag->pi @@ -1792,8 +1821,14 @@ retry: GRPC_LOG_IF_ERROR("add_poll_object", error); GPR_TIMER_END("add_poll_object", 0); } -#endif +static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_fd *fd) { + add_poll_object(exec_ctx, &pollset->po, &fd->po, POLL_OBJ_POLLSET, + POLL_OBJ_FD); +} + +#if 0 static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_fd *fd) { GPR_TIMER_BEGIN("pollset_add_fd", 0); @@ -1914,9 +1949,8 @@ retry: gpr_mu_unlock(&pollset->po.mu); GRPC_LOG_IF_ERROR("pollset_add_fd", error); - - GPR_TIMER_END("pollset_add_fd", 0); } +#endif /******************************************************************************* * Pollset-set Definitions -- cgit v1.2.3 From 2385fd7e24fdab23e97c295bb949eab6b258ab7d Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 18 Nov 2016 16:30:41 -0800 Subject: Pollset_set reimplementation --- src/core/lib/iomgr/ev_epoll_linux.c | 76 ++++++++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 18 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index e9a0c690c0..c4f3aefb82 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -257,26 +257,8 @@ struct grpc_pollset { /******************************************************************************* * Pollset-set Declarations */ -/* TODO: sreek - Change the pollset_set implementation such that a pollset_set - * directly points to a polling_island (and adding an fd/pollset/pollset_set to - * the current pollset_set would result in polling island merges. This would - * remove the need to maintain fd_count here. This will also significantly - * simplify the grpc_fd structure since we would no longer need to explicitly - * maintain the orphaned state */ struct grpc_pollset_set { poll_obj po; - - size_t pollset_count; - size_t pollset_capacity; - grpc_pollset **pollsets; - - size_t pollset_set_count; - size_t pollset_set_capacity; - struct grpc_pollset_set **pollset_sets; - - size_t fd_count; - size_t fd_capacity; - grpc_fd **fds; }; /******************************************************************************* @@ -987,9 +969,11 @@ static grpc_fd *fd_create(int fd, const char *name) { return new_fd; } +/* static bool fd_is_orphaned(grpc_fd *fd) { return (gpr_atm_acq_load(&fd->refst) & 1) == 0; } +*/ static int fd_wrapped_fd(grpc_fd *fd) { int ret_fd = -1; @@ -1956,6 +1940,7 @@ retry: * Pollset-set Definitions */ +#if 0 static grpc_pollset_set *pollset_set_create(void) { grpc_pollset_set *pollset_set = gpr_malloc(sizeof(*pollset_set)); memset(pollset_set, 0, sizeof(*pollset_set)); @@ -2094,6 +2079,61 @@ static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, } gpr_mu_unlock(&bag->po.mu); } +#endif // Pollset_set functions + +static grpc_pollset_set *pollset_set_create(void) { + grpc_pollset_set *pss = gpr_malloc(sizeof(*pss)); + pss->po.pi = NULL; + gpr_mu_init(&pss->po.mu); + return pss; +} + +static void pollset_set_destroy(grpc_pollset_set *pss) { + gpr_mu_destroy(&pss->po.mu); + + if (pss->po.pi != NULL) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + PI_UNREF(&exec_ctx, pss->po.pi, "pss_destroy"); + grpc_exec_ctx_finish(&exec_ctx); + } + + gpr_free(pss); +} + +static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pss, + grpc_fd *fd) { + add_poll_object(exec_ctx, &pss->po, &fd->po, POLL_OBJ_POLLSET_SET, + POLL_OBJ_FD); +} + +static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pss, + grpc_fd *fd) { + /* Nothing to do */ +} + +static void pollset_set_add_pollset(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *pss, grpc_pollset *ps) { + add_poll_object(exec_ctx, &pss->po, &ps->po, POLL_OBJ_POLLSET_SET, + POLL_OBJ_POLLSET); +} + +static void pollset_set_del_pollset(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *pss, grpc_pollset *ps) { + /* Nothing to do */ +} + +static void pollset_set_add_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *bag, + grpc_pollset_set *item) { + add_poll_object(exec_ctx, &bag->po, &item->po, POLL_OBJ_POLLSET_SET, + POLL_OBJ_POLLSET_SET); +} + +static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *bag, + grpc_pollset_set *item) { + /* Nothing to do */ +} /* Test helper functions * */ -- cgit v1.2.3 From 6bed2d6ade2ee980f97f3b41f9b765404334c1fe Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 18 Nov 2016 16:48:03 -0800 Subject: Delete commented out code --- src/core/lib/iomgr/ev_epoll_linux.c | 271 ------------------------------------ 1 file changed, 271 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index c4f3aefb82..12e1b1a756 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -969,12 +969,6 @@ static grpc_fd *fd_create(int fd, const char *name) { return new_fd; } -/* -static bool fd_is_orphaned(grpc_fd *fd) { - return (gpr_atm_acq_load(&fd->refst) & 1) == 0; -} -*/ - static int fd_wrapped_fd(grpc_fd *fd) { int ret_fd = -1; gpr_mu_lock(&fd->po.mu); @@ -1812,275 +1806,10 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, POLL_OBJ_FD); } -#if 0 -static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_fd *fd) { - GPR_TIMER_BEGIN("pollset_add_fd", 0); - - grpc_error *error = GRPC_ERROR_NONE; - - gpr_mu_lock(&pollset->po.mu); - gpr_mu_lock(&fd->po.mu); - - polling_island *pi_new = NULL; - -retry: - /* 1) If fd->po.pi and pollset->po.pi are both non-NULL and - * equal, do nothing. - * 2) If fd->po.pi and pollset->po.pi are both NULL, create - * a new polling island (with a refcount of 2) and make the polling_island - * fields in both fd and pollset to point to the new island - * 3) If one of fd->po.pi or pollset->po.pi is NULL, update - * the NULL polling_island field to point to the non-NULL polling_island - * field (ensure that the refcount on the polling island is incremented by - * 1 to account for the newly added reference) - * 4) Finally, if fd->po.pi and pollset->po.pi are non-NULL - * and different, merge both the polling islands and update the - * polling_island fields in both fd and pollset to point to the merged - * polling island. - */ - - if (fd->orphaned) { - gpr_mu_unlock(&fd->po.mu); - gpr_mu_unlock(&pollset->po.mu); - /* early out */ - return; - } - - if (fd->po.pi == pollset->po.pi) { - pi_new = fd->po.pi; - if (pi_new == NULL) { - /* Unlock before creating a new polling island: the polling island will - create a workqueue which creates a file descriptor, and holding an fd - lock here can eventually cause a loop to appear to TSAN (making it - unhappy). We don't think it's a real loop (there's an epoch point where - that loop possibility disappears), but the advantages of keeping TSAN - happy outweigh any performance advantage we might have by keeping the - lock held. */ - gpr_mu_unlock(&fd->po.mu); - pi_new = polling_island_create(exec_ctx, fd, &error); - gpr_mu_lock(&fd->po.mu); - /* Need to reverify any assumptions made between the initial lock and - getting to this branch: if they've changed, we need to throw away our - work and figure things out again. */ - if (fd->po.pi != NULL) { - GRPC_POLLING_TRACE( - "pollset_add_fd: Raced creating new polling island. pi_new: %p " - "(fd: %d, pollset: %p)", - (void *)pi_new, fd->fd, (void *)pollset); - - /* No need to lock 'pi_new' here since this is a new polling island and - * no one has a reference to it yet */ - polling_island_remove_all_fds_locked(pi_new, true, &error); - - /* Ref and unref so that the polling island gets deleted during unref */ - PI_ADD_REF(pi_new, "dance_of_destruction"); - PI_UNREF(exec_ctx, pi_new, "dance_of_destruction"); - goto retry; - } else { - GRPC_POLLING_TRACE( - "pollset_add_fd: Created new polling island. pi_new: %p (fd: %d, " - "pollset: %p)", - (void *)pi_new, fd->fd, (void *)pollset); - } - } - } else if (fd->po.pi == NULL) { - pi_new = polling_island_lock(pollset->po.pi); - polling_island_add_fds_locked(pi_new, &fd, 1, true, &error); - gpr_mu_unlock(&pi_new->mu); - - GRPC_POLLING_TRACE( - "pollset_add_fd: fd->pi was NULL. pi_new: %p (fd: %d, pollset: %p, " - "pollset->pi: %p)", - (void *)pi_new, fd->fd, (void *)pollset, (void *)pollset->po.pi); - } else if (pollset->po.pi == NULL) { - pi_new = polling_island_lock(fd->po.pi); - gpr_mu_unlock(&pi_new->mu); - - GRPC_POLLING_TRACE( - "pollset_add_fd: pollset->pi was NULL. pi_new: %p (fd: %d, pollset: " - "%p, fd->pi: %p", - (void *)pi_new, fd->fd, (void *)pollset, (void *)fd->po.pi); - } else { - pi_new = polling_island_merge(fd->po.pi, pollset->po.pi, &error); - GRPC_POLLING_TRACE( - "pollset_add_fd: polling islands merged. pi_new: %p (fd: %d, pollset: " - "%p, fd->pi: %p, pollset->pi: %p)", - (void *)pi_new, fd->fd, (void *)pollset, (void *)fd->po.pi, - (void *)pollset->po.pi); - } - - /* At this point, pi_new is the polling island that both fd->po.pi - and pollset->po.pi must be pointing to */ - - if (fd->po.pi != pi_new) { - PI_ADD_REF(pi_new, "fd"); - if (fd->po.pi != NULL) { - PI_UNREF(exec_ctx, fd->po.pi, "fd"); - } - fd->po.pi = pi_new; - } - - if (pollset->po.pi != pi_new) { - PI_ADD_REF(pi_new, "ps"); - if (pollset->po.pi != NULL) { - PI_UNREF(exec_ctx, pollset->po.pi, "ps"); - } - pollset->po.pi = pi_new; - } - - gpr_mu_unlock(&fd->po.mu); - gpr_mu_unlock(&pollset->po.mu); - - GRPC_LOG_IF_ERROR("pollset_add_fd", error); -} -#endif - /******************************************************************************* * Pollset-set Definitions */ -#if 0 -static grpc_pollset_set *pollset_set_create(void) { - grpc_pollset_set *pollset_set = gpr_malloc(sizeof(*pollset_set)); - memset(pollset_set, 0, sizeof(*pollset_set)); - gpr_mu_init(&pollset_set->po.mu); - return pollset_set; -} - -static void pollset_set_destroy(grpc_pollset_set *pollset_set) { - size_t i; - gpr_mu_destroy(&pollset_set->po.mu); - for (i = 0; i < pollset_set->fd_count; i++) { - GRPC_FD_UNREF(pollset_set->fds[i], "pollset_set"); - } - gpr_free(pollset_set->pollsets); - gpr_free(pollset_set->pollset_sets); - gpr_free(pollset_set->fds); - gpr_free(pollset_set); -} - -static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, grpc_fd *fd) { - size_t i; - gpr_mu_lock(&pollset_set->po.mu); - if (pollset_set->fd_count == pollset_set->fd_capacity) { - pollset_set->fd_capacity = GPR_MAX(8, 2 * pollset_set->fd_capacity); - pollset_set->fds = gpr_realloc( - pollset_set->fds, pollset_set->fd_capacity * sizeof(*pollset_set->fds)); - } - GRPC_FD_REF(fd, "pollset_set"); - pollset_set->fds[pollset_set->fd_count++] = fd; - for (i = 0; i < pollset_set->pollset_count; i++) { - pollset_add_fd(exec_ctx, pollset_set->pollsets[i], fd); - } - for (i = 0; i < pollset_set->pollset_set_count; i++) { - pollset_set_add_fd(exec_ctx, pollset_set->pollset_sets[i], fd); - } - gpr_mu_unlock(&pollset_set->po.mu); -} - -static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, grpc_fd *fd) { - size_t i; - gpr_mu_lock(&pollset_set->po.mu); - for (i = 0; i < pollset_set->fd_count; i++) { - if (pollset_set->fds[i] == fd) { - pollset_set->fd_count--; - GPR_SWAP(grpc_fd *, pollset_set->fds[i], - pollset_set->fds[pollset_set->fd_count]); - GRPC_FD_UNREF(fd, "pollset_set"); - break; - } - } - for (i = 0; i < pollset_set->pollset_set_count; i++) { - pollset_set_del_fd(exec_ctx, pollset_set->pollset_sets[i], fd); - } - gpr_mu_unlock(&pollset_set->po.mu); -} - -static void pollset_set_add_pollset(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, - grpc_pollset *pollset) { - size_t i, j; - gpr_mu_lock(&pollset_set->po.mu); - if (pollset_set->pollset_count == pollset_set->pollset_capacity) { - pollset_set->pollset_capacity = - GPR_MAX(8, 2 * pollset_set->pollset_capacity); - pollset_set->pollsets = - gpr_realloc(pollset_set->pollsets, pollset_set->pollset_capacity * - sizeof(*pollset_set->pollsets)); - } - pollset_set->pollsets[pollset_set->pollset_count++] = pollset; - for (i = 0, j = 0; i < pollset_set->fd_count; i++) { - if (fd_is_orphaned(pollset_set->fds[i])) { - GRPC_FD_UNREF(pollset_set->fds[i], "pollset_set"); - } else { - pollset_add_fd(exec_ctx, pollset, pollset_set->fds[i]); - pollset_set->fds[j++] = pollset_set->fds[i]; - } - } - pollset_set->fd_count = j; - gpr_mu_unlock(&pollset_set->po.mu); -} - -static void pollset_set_del_pollset(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, - grpc_pollset *pollset) { - size_t i; - gpr_mu_lock(&pollset_set->po.mu); - for (i = 0; i < pollset_set->pollset_count; i++) { - if (pollset_set->pollsets[i] == pollset) { - pollset_set->pollset_count--; - GPR_SWAP(grpc_pollset *, pollset_set->pollsets[i], - pollset_set->pollsets[pollset_set->pollset_count]); - break; - } - } - gpr_mu_unlock(&pollset_set->po.mu); -} - -static void pollset_set_add_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *bag, - grpc_pollset_set *item) { - size_t i, j; - gpr_mu_lock(&bag->po.mu); - if (bag->pollset_set_count == bag->pollset_set_capacity) { - bag->pollset_set_capacity = GPR_MAX(8, 2 * bag->pollset_set_capacity); - bag->pollset_sets = - gpr_realloc(bag->pollset_sets, - bag->pollset_set_capacity * sizeof(*bag->pollset_sets)); - } - bag->pollset_sets[bag->pollset_set_count++] = item; - for (i = 0, j = 0; i < bag->fd_count; i++) { - if (fd_is_orphaned(bag->fds[i])) { - GRPC_FD_UNREF(bag->fds[i], "pollset_set"); - } else { - pollset_set_add_fd(exec_ctx, item, bag->fds[i]); - bag->fds[j++] = bag->fds[i]; - } - } - bag->fd_count = j; - gpr_mu_unlock(&bag->po.mu); -} - -static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *bag, - grpc_pollset_set *item) { - size_t i; - gpr_mu_lock(&bag->po.mu); - for (i = 0; i < bag->pollset_set_count; i++) { - if (bag->pollset_sets[i] == item) { - bag->pollset_set_count--; - GPR_SWAP(grpc_pollset_set *, bag->pollset_sets[i], - bag->pollset_sets[bag->pollset_set_count]); - break; - } - } - gpr_mu_unlock(&bag->po.mu); -} -#endif // Pollset_set functions - static grpc_pollset_set *pollset_set_create(void) { grpc_pollset_set *pss = gpr_malloc(sizeof(*pss)); pss->po.pi = NULL; -- cgit v1.2.3 From a0749a6fe80cacb5698da5b07d0c3174d500b66b Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 18 Nov 2016 20:22:09 -0800 Subject: Minor debug support --- Makefile | 15 +-- build.yaml | 2 +- src/core/lib/iomgr/ev_epoll_linux.c | 29 +++-- tools/run_tests/sources_and_headers.json | 23 +--- .../google_benchmark/google_benchmark.vcxproj | 48 +-------- .../google_benchmark.vcxproj.filters | 118 --------------------- 6 files changed, 27 insertions(+), 208 deletions(-) (limited to 'src/core') diff --git a/Makefile b/Makefile index 1609d6951b..083b09ec54 100644 --- a/Makefile +++ b/Makefile @@ -111,7 +111,7 @@ CXX_dbg = $(DEFAULT_CXX) LD_dbg = $(DEFAULT_CC) LDXX_dbg = $(DEFAULT_CXX) CPPFLAGS_dbg = -O0 -DEFINES_dbg = _DEBUG DEBUG +DEFINES_dbg = _DEBUG DEBUG PO_DEBUG VALID_CONFIG_easan = 1 REQUIRE_CUSTOM_LIBRARIES_easan = 1 @@ -6809,19 +6809,6 @@ endif LIBGOOGLE_BENCHMARK_SRC = \ - third_party/google_benchmark/src/benchmark.cc \ - third_party/google_benchmark/src/benchmark_register.cc \ - third_party/google_benchmark/src/colorprint.cc \ - third_party/google_benchmark/src/commandlineflags.cc \ - third_party/google_benchmark/src/complexity.cc \ - third_party/google_benchmark/src/console_reporter.cc \ - third_party/google_benchmark/src/csv_reporter.cc \ - third_party/google_benchmark/src/json_reporter.cc \ - third_party/google_benchmark/src/reporter.cc \ - third_party/google_benchmark/src/sleep.cc \ - third_party/google_benchmark/src/string_util.cc \ - third_party/google_benchmark/src/sysinfo.cc \ - third_party/google_benchmark/src/timers.cc \ PUBLIC_HEADERS_CXX += \ diff --git a/build.yaml b/build.yaml index 407b50ca7b..f0432bf14f 100644 --- a/build.yaml +++ b/build.yaml @@ -3662,7 +3662,7 @@ configs: DEFINES: NDEBUG dbg: CPPFLAGS: -O0 - DEFINES: _DEBUG DEBUG + DEFINES: _DEBUG DEBUG PO_DEBUG easan: CC: clang CPPFLAGS: -O0 -fsanitize-coverage=edge -fsanitize=address -fno-omit-frame-pointer diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 12e1b1a756..16a22b7b9b 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -97,6 +97,9 @@ typedef enum { } poll_obj_type; typedef struct poll_obj { +#ifdef PO_DEBUG + poll_obj_type obj_type; +#endif gpr_mu mu; struct polling_island *pi; } poll_obj; @@ -946,6 +949,9 @@ static grpc_fd *fd_create(int fd, const char *name) { * would be holding a lock to it anyway. */ gpr_mu_lock(&new_fd->po.mu); new_fd->po.pi = NULL; +#ifdef PO_DEBUG + new_fd->po.obj_type = POLL_OBJ_FD; +#endif gpr_atm_rel_store(&new_fd->refst, (gpr_atm)1); new_fd->fd = fd; @@ -1281,6 +1287,9 @@ static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { gpr_mu_init(&pollset->po.mu); *mu = &pollset->po.mu; pollset->po.pi = NULL; +#ifdef PO_DEBUG + pollset->po.obj_type = POLL_OBJ_POLLSET; +#endif pollset->root_worker.next = pollset->root_worker.prev = &pollset->root_worker; pollset->kicked_without_pollers = false; @@ -1656,10 +1665,15 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } static void add_poll_object(grpc_exec_ctx *exec_ctx, poll_obj *bag, - poll_obj *item, poll_obj_type bag_type, + poll_obj_type bag_type, poll_obj *item, poll_obj_type item_type) { GPR_TIMER_BEGIN("add_poll_object", 0); +#ifdef PO_DEBUG + GPR_ASSERT(item->obj_type == item_type); + GPR_ASSERT(bag->obj_type == bag_type); +#endif + grpc_error *error = GRPC_ERROR_NONE; polling_island *pi_new = NULL; @@ -1802,7 +1816,7 @@ retry: static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_fd *fd) { - add_poll_object(exec_ctx, &pollset->po, &fd->po, POLL_OBJ_POLLSET, + add_poll_object(exec_ctx, &pollset->po, POLL_OBJ_POLLSET, &fd->po, POLL_OBJ_FD); } @@ -1812,8 +1826,11 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, static grpc_pollset_set *pollset_set_create(void) { grpc_pollset_set *pss = gpr_malloc(sizeof(*pss)); - pss->po.pi = NULL; gpr_mu_init(&pss->po.mu); + pss->po.pi = NULL; +#ifdef PO_DEBUG + pss->po.obj_type = POLL_OBJ_POLLSET_SET; +#endif return pss; } @@ -1831,7 +1848,7 @@ static void pollset_set_destroy(grpc_pollset_set *pss) { static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pss, grpc_fd *fd) { - add_poll_object(exec_ctx, &pss->po, &fd->po, POLL_OBJ_POLLSET_SET, + add_poll_object(exec_ctx, &pss->po, POLL_OBJ_POLLSET_SET, &fd->po, POLL_OBJ_FD); } @@ -1842,7 +1859,7 @@ static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pss, static void pollset_set_add_pollset(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pss, grpc_pollset *ps) { - add_poll_object(exec_ctx, &pss->po, &ps->po, POLL_OBJ_POLLSET_SET, + add_poll_object(exec_ctx, &pss->po, POLL_OBJ_POLLSET_SET, &ps->po, POLL_OBJ_POLLSET); } @@ -1854,7 +1871,7 @@ static void pollset_set_del_pollset(grpc_exec_ctx *exec_ctx, static void pollset_set_add_pollset_set(grpc_exec_ctx *exec_ctx, grpc_pollset_set *bag, grpc_pollset_set *item) { - add_poll_object(exec_ctx, &bag->po, &item->po, POLL_OBJ_POLLSET_SET, + add_poll_object(exec_ctx, &bag->po, POLL_OBJ_POLLSET_SET, &item->po, POLL_OBJ_POLLSET_SET); } diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 9be07941d7..1206a90e85 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6203,28 +6203,7 @@ }, { "deps": [], - "headers": [ - "third_party/google_benchmark/include/benchmark/benchmark.h", - "third_party/google_benchmark/include/benchmark/benchmark_api.h", - "third_party/google_benchmark/include/benchmark/macros.h", - "third_party/google_benchmark/include/benchmark/reporter.h", - "third_party/google_benchmark/src/arraysize.h", - "third_party/google_benchmark/src/benchmark_api_internal.h", - "third_party/google_benchmark/src/check.h", - "third_party/google_benchmark/src/colorprint.h", - "third_party/google_benchmark/src/commandlineflags.h", - "third_party/google_benchmark/src/complexity.h", - "third_party/google_benchmark/src/cycleclock.h", - "third_party/google_benchmark/src/internal_macros.h", - "third_party/google_benchmark/src/log.h", - "third_party/google_benchmark/src/mutex.h", - "third_party/google_benchmark/src/re.h", - "third_party/google_benchmark/src/sleep.h", - "third_party/google_benchmark/src/stat.h", - "third_party/google_benchmark/src/string_util.h", - "third_party/google_benchmark/src/sysinfo.h", - "third_party/google_benchmark/src/timers.h" - ], + "headers": [], "is_filegroup": false, "language": "c++", "name": "google_benchmark", diff --git a/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj b/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj index 52774e0802..1c875d7c09 100644 --- a/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj +++ b/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj @@ -147,53 +147,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters b/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters index 9db6ed4657..00e4276f1d 100644 --- a/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters +++ b/vsprojects/vcxproj/google_benchmark/google_benchmark.vcxproj.filters @@ -1,125 +1,7 @@ - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - - - third_party\google_benchmark\include\benchmark - - - third_party\google_benchmark\include\benchmark - - - third_party\google_benchmark\include\benchmark - - - third_party\google_benchmark\include\benchmark - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - third_party\google_benchmark\src - - - - {7458b63d-7ba4-103d-2bed-3e3ad30d8237} - - - {54a154e8-669b-a7c1-9b6e-bd1aab2f86e3} - - - {f54c3cb1-ec20-a651-6956-78379b51e1a5} - - - {0483a457-8050-4565-bc15-09695bf7b822} - - - {c39ff2d1-691e-4614-4d75-4bc20db05e09} - -- cgit v1.2.3 From 19badff717ef3a7858486737af6265d86e9c1bcb Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sun, 20 Nov 2016 20:17:46 -0800 Subject: tcp_client_posix: Don't overwrite error descr. --- src/core/lib/iomgr/tcp_client_posix.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 13347735df..a3a70a8ed7 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -251,8 +251,11 @@ finish: done = (--ac->refs == 0); gpr_mu_unlock(&ac->mu); if (error != GRPC_ERROR_NONE) { - error = grpc_error_set_str(error, GRPC_ERROR_STR_DESCRIPTION, - "Failed to connect to remote host"); + char *error_descr; + gpr_asprintf(&error_descr, "Failed to connect to remote host: %s", + grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION)); + error = grpc_error_set_str(error, GRPC_ERROR_STR_DESCRIPTION, error_descr); + gpr_free(error_descr); error = grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, ac->addr_str); } -- cgit v1.2.3 From 8fb73d22f157bc6c95442ff7407423f8cd5fa882 Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 21 Nov 2016 16:29:58 -0800 Subject: Pretty print outgoing headers --- .../ext/transport/chttp2/transport/chttp2_transport.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 127e1cdc13..4e3c7ff681 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -954,6 +954,16 @@ static void complete_fetch(grpc_exec_ctx *exec_ctx, void *gs, static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {} +static void log_metadata(const grpc_metadata_batch *md_batch, uint32_t id, + bool is_client, bool is_initial) { + for (grpc_linked_mdelem *md = md_batch->list.head; md != md_batch->list.tail; + md = md->next) { + gpr_log(GPR_INFO, "HTTP:%d:%s:%s: %s: %s", id, is_initial ? "HDR" : "TRL", + is_client ? "CLI" : "SVR", grpc_mdstr_as_c_string(md->md->key), + grpc_mdstr_as_c_string(md->md->value)); + } +} + static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, grpc_error *error_ignored) { GPR_TIMER_BEGIN("perform_stream_op_locked", 0); @@ -967,6 +977,12 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, gpr_log(GPR_DEBUG, "perform_stream_op_locked: %s; on_complete = %p", str, op->on_complete); gpr_free(str); + if (op->send_initial_metadata) { + log_metadata(op->send_initial_metadata, s->id, t->is_client, true); + } + if (op->send_trailing_metadata) { + log_metadata(op->send_trailing_metadata, s->id, t->is_client, false); + } } grpc_closure *on_complete = op->on_complete; -- cgit v1.2.3 From 1ebcaa2f547d4f38319c4125380dc4ee93a3f3f2 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 21 Nov 2016 21:52:47 -0800 Subject: Fixed leak upon duped serverlist updates --- src/core/ext/lb_policy/grpclb/grpclb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 0829e05b43..6132ccaf78 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -1238,12 +1238,15 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, gpr_log(GPR_INFO, "Incoming server list identical to current, ignoring."); } + grpc_grpclb_destroy_serverlist(serverlist); } else { /* new serverlist */ if (glb_policy->serverlist != NULL) { /* dispose of the old serverlist */ grpc_grpclb_destroy_serverlist(glb_policy->serverlist); } - /* and update the copy in the glb_lb_policy instance */ + /* and update the copy in the glb_lb_policy instance. This serverlist + * instance will be destroyed either upon the next update or in + * glb_destroy() */ glb_policy->serverlist = serverlist; rr_handover_locked(exec_ctx, glb_policy); -- cgit v1.2.3 From 6f8507f2b07e0da7d8ffb30d4150a1f2e84ca581 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 22 Nov 2016 15:13:34 +0100 Subject: UserResource does not reference tcp endpoint on windows --- src/core/lib/iomgr/tcp_windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 62afbcef51..d4613b674e 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -423,7 +423,7 @@ grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, tcp->base.vtable = &vtable; tcp->socket = socket; gpr_mu_init(&tcp->mu); - gpr_ref_init(&tcp->refcount, 2); + gpr_ref_init(&tcp->refcount, 1); grpc_closure_init(&tcp->on_read, on_read, tcp); grpc_closure_init(&tcp->on_write, on_write, tcp); tcp->peer_string = gpr_strdup(peer_string); -- cgit v1.2.3 From 6493a7388838e7674ff13ddade2595e780bb3102 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 22 Nov 2016 10:25:52 -0800 Subject: Check on *target, not target --- src/core/ext/lb_policy/grpclb/grpclb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 0829e05b43..658b55551f 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -182,10 +182,10 @@ static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg, NULL); if (wc_arg->rr_policy != NULL) { - /* if target is NULL, no pick has been made by the RR policy (eg, all + /* if *target is NULL, no pick has been made by the RR policy (eg, all * addresses failed to connect). There won't be any user_data/token * available */ - if (wc_arg->target != NULL) { + if (*wc_arg->target != NULL) { if (wc_arg->lb_token != NULL) { initial_metadata_add_lb_token(wc_arg->initial_metadata, wc_arg->lb_token_mdelem_storage, -- cgit v1.2.3 From d255a727f9638ce97e3b97f70e7ec54a6e9ce74f Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 23 Nov 2016 13:10:44 -0800 Subject: Clang-format --- src/core/lib/iomgr/ev_poll_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 27083ca6d0..8f5d9d43fb 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -1361,7 +1361,7 @@ static int cvfd_poll(struct pollfd *fds, nfds_t nfds, int timeout) { g_cvfds.cvfds[idx].cvs = cvn; // Don't bother polling if a wakeup fd is ready if (g_cvfds.cvfds[idx].is_set) { - skip_poll=1; + skip_poll = 1; } } else if (fds[i].fd >= 0) { nsockfds++; -- cgit v1.2.3 From cb09e7009ecbccf772b1dd0cdd023181a8288840 Mon Sep 17 00:00:00 2001 From: Paul Marks Date: Wed, 23 Nov 2016 16:23:18 -0800 Subject: Fix a memory leak in grpc_udp_server_add_port() This occurred when running a QUIC test in an IPv6-only environment: E1123 16:04:20.282041 159850 heap-profile-table.cc:489] RAW: Leak of 1360 bytes in 17 objects allocated from: @ 0x7f160b8923ab gpr_malloc @ 0x7f160b8cff27 copy_error_and_unref @ 0x7f160b8d0151 grpc_error_set_str @ 0x7f160b8e3ff8 error_for_fd @ 0x7f160b8e3edd grpc_create_dualstack_socket @ 0x7f160b8ea5c3 grpc_udp_server_add_port @ 0x7f1627a65d20 grpc_server_add_quic_port @ 0x7f1627a6bea4 grpc::(anonymous namespace)::QuicServerCredentialsImpl::AddPortToServer() ... --- src/core/lib/iomgr/udp_server.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index fd0c7a0f9d..dd82563127 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -388,7 +388,9 @@ int grpc_udp_server_add_port(grpc_udp_server *s, /* Try listening on IPv6 first. */ addr = &wild6; // TODO(rjshade): Test and propagate the returned grpc_error*: - grpc_create_dualstack_socket(addr, SOCK_DGRAM, IPPROTO_UDP, &dsmode, &fd); + GRPC_ERROR_UNREF( + grpc_create_dualstack_socket(addr, SOCK_DGRAM, IPPROTO_UDP, + &dsmode, &fd)); allocated_port1 = add_socket_to_server(s, fd, addr, read_cb, orphan_cb); if (fd >= 0 && dsmode == GRPC_DSMODE_DUALSTACK) { goto done; @@ -402,7 +404,9 @@ int grpc_udp_server_add_port(grpc_udp_server *s, } // TODO(rjshade): Test and propagate the returned grpc_error*: - grpc_create_dualstack_socket(addr, SOCK_DGRAM, IPPROTO_UDP, &dsmode, &fd); + GRPC_ERROR_UNREF( + grpc_create_dualstack_socket(addr, SOCK_DGRAM, IPPROTO_UDP, + &dsmode, &fd)); if (fd < 0) { gpr_log(GPR_ERROR, "Unable to create socket: %s", strerror(errno)); } -- cgit v1.2.3 From 1edfb952d0aa12bdc154e85eab24e87621292366 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 22 Nov 2016 17:15:34 -0800 Subject: Updated backoff to spec. --- doc/connection-backoff.md | 7 +- src/core/ext/client_channel/subchannel.c | 14 ++-- src/core/ext/lb_policy/grpclb/grpclb.c | 18 +++-- src/core/ext/resolver/dns/native/dns_resolver.c | 16 +++-- src/core/lib/support/backoff.c | 37 ++++++---- src/core/lib/support/backoff.h | 7 +- test/core/client_channel/lb_policies_test.c | 4 +- test/core/end2end/goaway_server_test.c | 10 ++- test/core/end2end/tests/connectivity.c | 10 ++- test/core/end2end/tests/simple_delayed_request.c | 19 ++++- test/core/support/backoff_test.c | 91 ++++++++++++++++++------ 11 files changed, 170 insertions(+), 63 deletions(-) (limited to 'src/core') diff --git a/doc/connection-backoff.md b/doc/connection-backoff.md index 251a60f384..0e83d9b97f 100644 --- a/doc/connection-backoff.md +++ b/doc/connection-backoff.md @@ -7,9 +7,10 @@ requests) and instead do some form of exponential backoff. We have several parameters: 1. INITIAL_BACKOFF (how long to wait after the first failure before retrying) - 2. MULTIPLIER (factor with which to multiply backoff after a failed retry) - 3. MAX_BACKOFF (upper bound on backoff) - 4. MIN_CONNECT_TIMEOUT (minimum time we're willing to give a connection to + 1. MULTIPLIER (factor with which to multiply backoff after a failed retry) + 1. JITTER (by how much to randomize backoffs). + 1. MAX_BACKOFF (upper bound on backoff) + 1. MIN_CONNECT_TIMEOUT (minimum time we're willing to give a connection to complete) ## Proposed Backoff Algorithm diff --git a/src/core/ext/client_channel/subchannel.c b/src/core/ext/client_channel/subchannel.c index a148b2a0e1..3e8c93ee45 100644 --- a/src/core/ext/client_channel/subchannel.c +++ b/src/core/ext/client_channel/subchannel.c @@ -334,16 +334,18 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx, int initial_backoff_ms = GRPC_SUBCHANNEL_INITIAL_CONNECT_BACKOFF_SECONDS * 1000; int max_backoff_ms = GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS * 1000; + int min_backoff_ms = GRPC_SUBCHANNEL_MIN_CONNECT_TIMEOUT_SECONDS * 1000; bool fixed_reconnect_backoff = false; if (c->args) { for (size_t i = 0; i < c->args->num_args; i++) { if (0 == strcmp(c->args->args[i].key, - "grpc.testing.fixed_reconnect_backoff")) { + "grpc.testing.fixed_reconnect_backoff_ms")) { GPR_ASSERT(c->args->args[i].type == GRPC_ARG_INTEGER); fixed_reconnect_backoff = true; - initial_backoff_ms = max_backoff_ms = grpc_channel_arg_get_integer( - &c->args->args[i], - (grpc_integer_options){initial_backoff_ms, 100, INT_MAX}); + initial_backoff_ms = min_backoff_ms = max_backoff_ms = + grpc_channel_arg_get_integer( + &c->args->args[i], + (grpc_integer_options){initial_backoff_ms, 100, INT_MAX}); } else if (0 == strcmp(c->args->args[i].key, GRPC_ARG_MAX_RECONNECT_BACKOFF_MS)) { fixed_reconnect_backoff = false; @@ -360,11 +362,11 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx, } } gpr_backoff_init( - &c->backoff_state, + &c->backoff_state, initial_backoff_ms, fixed_reconnect_backoff ? 1.0 : GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER, fixed_reconnect_backoff ? 0.0 : GRPC_SUBCHANNEL_RECONNECT_JITTER, - initial_backoff_ms, max_backoff_ms); + min_backoff_ms, max_backoff_ms); gpr_mu_init(&c->mu); return grpc_subchannel_index_register(exec_ctx, key, c); diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 4262d2b9a4..df0db61c22 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -123,10 +123,11 @@ #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/static_metadata.h" -#define BACKOFF_MULTIPLIER 1.6 -#define BACKOFF_JITTER 0.2 -#define BACKOFF_MIN_SECONDS 10 -#define BACKOFF_MAX_SECONDS 60 +#define GRPC_GRPCLB_MIN_CONNECT_TIMEOUT_SECONDS 20 +#define GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS 1 +#define GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER 1.6 +#define GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS 120 +#define GRPC_GRPCLB_RECONNECT_JITTER 0.2 int grpc_lb_glb_trace = 0; @@ -1107,9 +1108,12 @@ static void lb_call_init_locked(glb_lb_policy *glb_policy) { grpc_closure_init(&glb_policy->lb_on_response_received, lb_on_response_received, glb_policy); - gpr_backoff_init(&glb_policy->lb_call_backoff_state, BACKOFF_MULTIPLIER, - BACKOFF_JITTER, BACKOFF_MIN_SECONDS * 1000, - BACKOFF_MAX_SECONDS * 1000); + gpr_backoff_init(&glb_policy->lb_call_backoff_state, + GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS, + GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER, + GRPC_GRPCLB_RECONNECT_JITTER, + GRPC_GRPCLB_MIN_CONNECT_TIMEOUT_SECONDS * 1000, + GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS * 1000); } static void lb_call_destroy_locked(glb_lb_policy *glb_policy) { diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index 665439f360..15476f5792 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -46,10 +46,11 @@ #include "src/core/lib/support/backoff.h" #include "src/core/lib/support/string.h" -#define BACKOFF_MULTIPLIER 1.6 -#define BACKOFF_JITTER 0.2 -#define BACKOFF_MIN_SECONDS 1 -#define BACKOFF_MAX_SECONDS 120 +#define GRPC_DNS_MIN_CONNECT_TIMEOUT_SECONDS 1 +#define GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS 1 +#define GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER 1.6 +#define GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS 120 +#define GRPC_DNS_RECONNECT_JITTER 0.2 typedef struct { /** base class: must be first */ @@ -269,8 +270,11 @@ static grpc_resolver *dns_create(grpc_resolver_args *args, server_name_arg.value.string = (char *)path; r->channel_args = grpc_channel_args_copy_and_add(args->args, &server_name_arg, 1); - gpr_backoff_init(&r->backoff_state, BACKOFF_MULTIPLIER, BACKOFF_JITTER, - BACKOFF_MIN_SECONDS * 1000, BACKOFF_MAX_SECONDS * 1000); + gpr_backoff_init(&r->backoff_state, GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS, + GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER, + GRPC_DNS_RECONNECT_JITTER, + GRPC_DNS_MIN_CONNECT_TIMEOUT_SECONDS * 1000, + GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000); return &r->base; } diff --git a/src/core/lib/support/backoff.c b/src/core/lib/support/backoff.c index e89ef47220..0612472712 100644 --- a/src/core/lib/support/backoff.c +++ b/src/core/lib/support/backoff.c @@ -35,8 +35,10 @@ #include -void gpr_backoff_init(gpr_backoff *backoff, double multiplier, double jitter, +void gpr_backoff_init(gpr_backoff *backoff, int64_t initial_connect_timeout, + double multiplier, double jitter, int64_t min_timeout_millis, int64_t max_timeout_millis) { + backoff->initial_connect_timeout = initial_connect_timeout; backoff->multiplier = multiplier; backoff->jitter = jitter; backoff->min_timeout_millis = min_timeout_millis; @@ -45,9 +47,10 @@ void gpr_backoff_init(gpr_backoff *backoff, double multiplier, double jitter, } gpr_timespec gpr_backoff_begin(gpr_backoff *backoff, gpr_timespec now) { - backoff->current_timeout_millis = backoff->min_timeout_millis; - return gpr_time_add( - now, gpr_time_from_millis(backoff->current_timeout_millis, GPR_TIMESPAN)); + backoff->current_timeout_millis = backoff->initial_connect_timeout; + const int64_t first_timeout = + GPR_MAX(backoff->current_timeout_millis, backoff->min_timeout_millis); + return gpr_time_add(now, gpr_time_from_millis(first_timeout, GPR_TIMESPAN)); } /* Generate a random number between 0 and 1. */ @@ -57,20 +60,28 @@ static double generate_uniform_random_number(uint32_t *rng_state) { } gpr_timespec gpr_backoff_step(gpr_backoff *backoff, gpr_timespec now) { - double new_timeout_millis = + const double new_timeout_millis = backoff->multiplier * (double)backoff->current_timeout_millis; - double jitter_range = backoff->jitter * new_timeout_millis; - double jitter = + backoff->current_timeout_millis = + GPR_MIN((int64_t)new_timeout_millis, backoff->max_timeout_millis); + + const double jitter_range_width = backoff->jitter * new_timeout_millis; + const double jitter = (2 * generate_uniform_random_number(&backoff->rng_state) - 1) * - jitter_range; + jitter_range_width; + backoff->current_timeout_millis = - GPR_CLAMP((int64_t)(new_timeout_millis + jitter), - backoff->min_timeout_millis, backoff->max_timeout_millis); - return gpr_time_add( + (int64_t)((double)(backoff->current_timeout_millis) + jitter); + + const gpr_timespec current_deadline = gpr_time_add( now, gpr_time_from_millis(backoff->current_timeout_millis, GPR_TIMESPAN)); + + const gpr_timespec min_deadline = gpr_time_add( + now, gpr_time_from_millis(backoff->min_timeout_millis, GPR_TIMESPAN)); + + return gpr_time_max(current_deadline, min_deadline); } void gpr_backoff_reset(gpr_backoff *backoff) { - // forces step() to return a timeout of min_timeout_millis - backoff->current_timeout_millis = 0; + backoff->current_timeout_millis = backoff->initial_connect_timeout; } diff --git a/src/core/lib/support/backoff.h b/src/core/lib/support/backoff.h index 6d40c15546..5e9b740824 100644 --- a/src/core/lib/support/backoff.h +++ b/src/core/lib/support/backoff.h @@ -37,7 +37,9 @@ #include typedef struct { - /// const: multiplier between retry attempts + /// const: how long to wait after the first failure before retrying + int64_t initial_connect_timeout; + /// const: factor with which to multiply backoff after a failed retry double multiplier; /// const: amount to randomize backoffs double jitter; @@ -54,7 +56,8 @@ typedef struct { } gpr_backoff; /// Initialize backoff machinery - does not need to be destroyed -void gpr_backoff_init(gpr_backoff *backoff, double multiplier, double jitter, +void gpr_backoff_init(gpr_backoff *backoff, int64_t initial_connect_timeout, + double multiplier, double jitter, int64_t min_timeout_millis, int64_t max_timeout_millis); /// Begin retry loop: returns a timespec for the NEXT retry diff --git a/test/core/client_channel/lb_policies_test.c b/test/core/client_channel/lb_policies_test.c index 95595d7c51..404db19568 100644 --- a/test/core/client_channel/lb_policies_test.c +++ b/test/core/client_channel/lb_policies_test.c @@ -481,7 +481,7 @@ void run_spec(const test_spec *spec) { gpr_asprintf(&client_hostport, "ipv4:%s", servers_hostports_str); arg_array[0].type = GRPC_ARG_INTEGER; - arg_array[0].key = "grpc.testing.fixed_reconnect_backoff"; + arg_array[0].key = "grpc.testing.fixed_reconnect_backoff_ms"; arg_array[0].value.integer = RETRY_TIMEOUT; arg_array[1].type = GRPC_ARG_STRING; arg_array[1].key = GRPC_ARG_LB_POLICY_NAME; @@ -519,7 +519,7 @@ static grpc_channel *create_client(const servers_fixture *f) { gpr_asprintf(&client_hostport, "ipv4:%s", servers_hostports_str); arg_array[0].type = GRPC_ARG_INTEGER; - arg_array[0].key = "grpc.testing.fixed_reconnect_backoff"; + arg_array[0].key = "grpc.testing.fixed_reconnect_backoff_ms"; arg_array[0].value.integer = RETRY_TIMEOUT; arg_array[1].type = GRPC_ARG_STRING; arg_array[1].key = GRPC_ARG_LB_POLICY_NAME; diff --git a/test/core/end2end/goaway_server_test.c b/test/core/end2end/goaway_server_test.c index a8c7b2be5a..cd68b390bb 100644 --- a/test/core/end2end/goaway_server_test.c +++ b/test/core/end2end/goaway_server_test.c @@ -126,8 +126,16 @@ int main(int argc, char **argv) { char *addr; + grpc_channel_args client_args; + grpc_arg arg_array[1]; + arg_array[0].type = GRPC_ARG_INTEGER; + arg_array[0].key = "grpc.testing.fixed_reconnect_backoff_ms"; + arg_array[0].value.integer = 1000; + client_args.args = arg_array; + client_args.num_args = 1; + /* create a channel that picks first amongst the servers */ - grpc_channel *chan = grpc_insecure_channel_create("test", NULL, NULL); + grpc_channel *chan = grpc_insecure_channel_create("test", &client_args, NULL); /* and an initial call to them */ grpc_call *call1 = grpc_channel_create_call( chan, NULL, GRPC_PROPAGATE_DEFAULTS, cq, "/foo", "127.0.0.1", diff --git a/test/core/end2end/tests/connectivity.c b/test/core/end2end/tests/connectivity.c index 260297ebd4..42475c7331 100644 --- a/test/core/end2end/tests/connectivity.c +++ b/test/core/end2end/tests/connectivity.c @@ -68,7 +68,15 @@ static void test_connectivity(grpc_end2end_test_config config) { gpr_thd_options thdopt = gpr_thd_options_default(); gpr_thd_id thdid; - config.init_client(&f, NULL); + grpc_channel_args client_args; + grpc_arg arg_array[1]; + arg_array[0].type = GRPC_ARG_INTEGER; + arg_array[0].key = "grpc.testing.fixed_reconnect_backoff_ms"; + arg_array[0].value.integer = 1000; + client_args.args = arg_array; + client_args.num_args = 1; + + config.init_client(&f, &client_args); ce.channel = f.client; ce.cq = f.cq; diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c index ec40c8f22d..414a03d98b 100644 --- a/test/core/end2end/tests/simple_delayed_request.c +++ b/test/core/end2end/tests/simple_delayed_request.c @@ -200,21 +200,36 @@ static void simple_delayed_request_body(grpc_end2end_test_config config, static void test_simple_delayed_request_short(grpc_end2end_test_config config) { grpc_end2end_test_fixture f; + grpc_channel_args client_args; + grpc_arg arg_array[1]; + arg_array[0].type = GRPC_ARG_INTEGER; + arg_array[0].key = "grpc.testing.fixed_reconnect_backoff_ms"; + arg_array[0].value.integer = 1000; + client_args.args = arg_array; + client_args.num_args = 1; gpr_log(GPR_INFO, "%s/%s", "test_simple_delayed_request_short", config.name); f = config.create_fixture(NULL, NULL); - simple_delayed_request_body(config, &f, NULL, NULL, 100000); + + simple_delayed_request_body(config, &f, &client_args, NULL, 100000); end_test(&f); config.tear_down_data(&f); } static void test_simple_delayed_request_long(grpc_end2end_test_config config) { grpc_end2end_test_fixture f; + grpc_channel_args client_args; + grpc_arg arg_array[1]; + arg_array[0].type = GRPC_ARG_INTEGER; + arg_array[0].key = "grpc.testing.fixed_reconnect_backoff_ms"; + arg_array[0].value.integer = 1000; + client_args.args = arg_array; + client_args.num_args = 1; gpr_log(GPR_INFO, "%s/%s", "test_simple_delayed_request_long", config.name); f = config.create_fixture(NULL, NULL); /* This timeout should be longer than a single retry */ - simple_delayed_request_body(config, &f, NULL, NULL, 1500000); + simple_delayed_request_body(config, &f, &client_args, NULL, 1500000); end_test(&f); config.tear_down_data(&f); } diff --git a/test/core/support/backoff_test.c b/test/core/support/backoff_test.c index 13cba7d750..ad6e5a98f2 100644 --- a/test/core/support/backoff_test.c +++ b/test/core/support/backoff_test.c @@ -39,61 +39,110 @@ static void test_constant_backoff(void) { gpr_backoff backoff; - gpr_backoff_init(&backoff, 1.0, 0.0, 1000, 1000); + gpr_backoff_init(&backoff, 200 /* initial timeout */, 1.0 /* multiplier */, + 0.0 /* jitter */, 100 /* min timeout */, + 1000 /* max timeout */); gpr_timespec now = gpr_time_0(GPR_TIMESPAN); gpr_timespec next = gpr_backoff_begin(&backoff, now); - GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 1000); + GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 200); for (int i = 0; i < 10000; i++) { next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 1000); + GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 200); now = next; } } -static void test_no_jitter_backoff(void) { +static void test_min_connect(void) { gpr_backoff backoff; - gpr_backoff_init(&backoff, 2.0, 0.0, 1, 513); + gpr_backoff_init(&backoff, 100 /* initial timeout */, 1.0 /* multiplier */, + 0.0 /* jitter */, 200 /* min timeout */, + 1000 /* max timeout */); gpr_timespec now = gpr_time_0(GPR_TIMESPAN); gpr_timespec next = gpr_backoff_begin(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(1, GPR_TIMESPAN), next) == 0); - now = next; - next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(3, GPR_TIMESPAN), next) == 0); + GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 200); +} + +static void test_no_jitter_backoff(void) { + gpr_backoff backoff; + gpr_backoff_init(&backoff, 2 /* initial timeout */, 2.0 /* multiplier */, + 0.0 /* jitter */, 1 /* min timeout */, + 513 /* max timeout */); + // x_1 = 2 + // x_n = 2**i + x_{i-1} ( = 2**(n+1) - 2 ) + gpr_timespec now = gpr_time_0(GPR_TIMESPAN); + gpr_timespec next = gpr_backoff_begin(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(2, GPR_TIMESPAN), next) == 0); now = next; next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(7, GPR_TIMESPAN), next) == 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(6, GPR_TIMESPAN), next) == 0); now = next; next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(15, GPR_TIMESPAN), next) == 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(14, GPR_TIMESPAN), next) == 0); now = next; next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(31, GPR_TIMESPAN), next) == 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(30, GPR_TIMESPAN), next) == 0); now = next; next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(63, GPR_TIMESPAN), next) == 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(62, GPR_TIMESPAN), next) == 0); now = next; next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(127, GPR_TIMESPAN), next) == 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(126, GPR_TIMESPAN), next) == 0); now = next; next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(255, GPR_TIMESPAN), next) == 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(254, GPR_TIMESPAN), next) == 0); now = next; next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(511, GPR_TIMESPAN), next) == 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(510, GPR_TIMESPAN), next) == 0); now = next; next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(1023, GPR_TIMESPAN), next) == 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(1022, GPR_TIMESPAN), next) == 0); now = next; next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(1536, GPR_TIMESPAN), next) == 0); + // Hit the maximum timeout. From this point onwards, retries will increase + // only by max timeout. + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(1535, GPR_TIMESPAN), next) == 0); now = next; next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(2049, GPR_TIMESPAN), next) == 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(2048, GPR_TIMESPAN), next) == 0); now = next; next = gpr_backoff_step(&backoff, now); - GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(2562, GPR_TIMESPAN), next) == 0); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(2561, GPR_TIMESPAN), next) == 0); +} + +static void test_jitter_backoff(void) { + const int64_t initial_timeout = 500; + const double jitter = 0.1; + gpr_backoff backoff; + gpr_backoff_init(&backoff, initial_timeout, 1.0 /* multiplier */, jitter, + 100 /* min timeout */, 1000 /* max timeout */); + + backoff.rng_state = 0; // force consistent PRNG + + gpr_timespec now = gpr_time_0(GPR_TIMESPAN); + gpr_timespec next = gpr_backoff_begin(&backoff, now); + GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 500); + + int64_t expected_next_lower_bound = + (int64_t)((double)initial_timeout * (1 - jitter)); + int64_t expected_next_upper_bound = + (int64_t)((double)initial_timeout * (1 + jitter)); + + for (int i = 0; i < 10000; i++) { + next = gpr_backoff_step(&backoff, now); + + // next-now must be within (jitter*100)% of the previous timeout. + const int64_t timeout_millis = gpr_time_to_millis(gpr_time_sub(next, now)); + GPR_ASSERT(timeout_millis >= expected_next_lower_bound); + GPR_ASSERT(timeout_millis <= expected_next_upper_bound); + + expected_next_lower_bound = + (int64_t)((double)timeout_millis * (1 - jitter)); + expected_next_upper_bound = + (int64_t)((double)timeout_millis * (1 + jitter)); + now = next; + } } int main(int argc, char **argv) { @@ -101,7 +150,9 @@ int main(int argc, char **argv) { gpr_time_init(); test_constant_backoff(); + test_min_connect(); test_no_jitter_backoff(); + test_jitter_backoff(); return 0; } -- cgit v1.2.3 From b4b8e1efc62c473c18fdf30b647fe850f97fec74 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 28 Nov 2016 07:33:13 -0800 Subject: Fix mac build Localize global_wakeup_fd declarations, instead of trying to share them, so that this bug is less likely to occur in the future. --- src/core/lib/iomgr/ev_epoll_linux.c | 26 +++++++++++++------------- src/core/lib/iomgr/ev_poll_posix.c | 12 +++++++----- src/core/lib/iomgr/ev_posix.h | 1 - 3 files changed, 20 insertions(+), 19 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 91041a7c28..48ab5bf826 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -72,6 +72,11 @@ static int grpc_polling_trace = 0; /* Disabled by default */ static int grpc_wakeup_signal = -1; static bool is_grpc_wakeup_signal_initialized = false; +/* TODO: sreek: Right now, this wakes up all pollers. In future we should make + * sure to wake up one polling thread (which can wake up other threads if + * needed) */ +static grpc_wakeup_fd global_wakeup_fd; + /* Implements the function defined in grpc_posix.h. This function might be * called before even calling grpc_init() to set either a different signal to * use. If signum == -1, then the use of signals is disabled */ @@ -438,7 +443,7 @@ static void polling_island_add_wakeup_fd_locked(polling_island *pi, "epoll_ctl (epoll_fd: %d) add wakeup fd: %d failed with " "error: %d (%s)", pi->epoll_fd, - GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), errno, + GRPC_WAKEUP_FD_GET_READ_FD(&global_wakeup_fd), errno, strerror(errno)); append_error(error, GRPC_OS_ERROR(errno, err_msg), err_desc); gpr_free(err_msg); @@ -541,7 +546,7 @@ static polling_island *polling_island_create(grpc_exec_ctx *exec_ctx, goto done; } - polling_island_add_wakeup_fd_locked(pi, &grpc_global_wakeup_fd, error); + polling_island_add_wakeup_fd_locked(pi, &global_wakeup_fd, error); polling_island_add_wakeup_fd_locked(pi, &pi->workqueue_wakeup_fd, error); if (initial_fd != NULL) { @@ -843,11 +848,6 @@ static void polling_island_global_shutdown() { * alarm 'epoch'). This wakeup_fd gives us something to alert on when such a * case occurs. */ -/* TODO: sreek: Right now, this wakes up all pollers. In future we should make - * sure to wake up one polling thread (which can wake up other threads if - * needed) */ -grpc_wakeup_fd grpc_global_wakeup_fd; - static grpc_fd *fd_freelist = NULL; static gpr_mu fd_freelist_mu; @@ -1163,11 +1163,11 @@ static grpc_error *pollset_global_init(void) { gpr_tls_init(&g_current_thread_pollset); gpr_tls_init(&g_current_thread_worker); poller_kick_init(); - return grpc_wakeup_fd_init(&grpc_global_wakeup_fd); + return grpc_wakeup_fd_init(&global_wakeup_fd); } static void pollset_global_shutdown(void) { - grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); + grpc_wakeup_fd_destroy(&global_wakeup_fd); gpr_tls_destroy(&g_current_thread_pollset); gpr_tls_destroy(&g_current_thread_worker); } @@ -1274,7 +1274,7 @@ static grpc_error *pollset_kick(grpc_pollset *p, } static grpc_error *kick_poller(void) { - return grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); + return grpc_wakeup_fd_wakeup(&global_wakeup_fd); } static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { @@ -1501,13 +1501,13 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, for (int i = 0; i < ep_rv; ++i) { void *data_ptr = ep_ev[i].data.ptr; - if (data_ptr == &grpc_global_wakeup_fd) { + if (data_ptr == &global_wakeup_fd) { append_error(error, - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd), + grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd), err_desc); } else if (data_ptr == &pi->workqueue_wakeup_fd) { append_error(error, - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd), + grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd), err_desc); maybe_do_workqueue_work(exec_ctx, pi); } else if (data_ptr == &polling_island_wakeup_fd) { diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 8f5d9d43fb..f9d8332686 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -120,6 +120,8 @@ struct grpc_fd { grpc_pollset *read_notifier_pollset; }; +static grpc_wakeup_fd global_wakeup_fd; + /* Begin polling on an fd. Registers that the given pollset is interested in this fd - so that if read or writability interest changes, the pollset can be kicked to pick up that @@ -769,17 +771,17 @@ static grpc_error *pollset_kick(grpc_pollset *p, static grpc_error *pollset_global_init(void) { gpr_tls_init(&g_current_thread_poller); gpr_tls_init(&g_current_thread_worker); - return grpc_wakeup_fd_init(&grpc_global_wakeup_fd); + return grpc_wakeup_fd_init(&global_wakeup_fd); } static void pollset_global_shutdown(void) { - grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); + grpc_wakeup_fd_destroy(&global_wakeup_fd); gpr_tls_destroy(&g_current_thread_poller); gpr_tls_destroy(&g_current_thread_worker); } static grpc_error *kick_poller(void) { - return grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); + return grpc_wakeup_fd_wakeup(&global_wakeup_fd); } /* main interface */ @@ -947,7 +949,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, fd_count = 0; pfd_count = 2; - pfds[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd); + pfds[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&global_wakeup_fd); pfds[0].events = POLLIN; pfds[0].revents = 0; pfds[1].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker.wakeup_fd->fd); @@ -1002,7 +1004,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } else { if (pfds[0].revents & POLLIN_CHECK) { work_combine_error( - &error, grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd)); + &error, grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd)); } if (pfds[1].revents & POLLIN_CHECK) { work_combine_error( diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 2fdef06838..cb5832539d 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -183,6 +183,5 @@ void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx, /* override to allow tests to hook poll() usage */ typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int); extern grpc_poll_function_type grpc_poll_function; -extern grpc_wakeup_fd grpc_global_wakeup_fd; #endif /* GRPC_CORE_LIB_IOMGR_EV_POSIX_H */ -- cgit v1.2.3 From 1fa9ddb12ec9aafd37bb51910e1b9c6f27094abf Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 28 Nov 2016 08:19:37 -0800 Subject: Fix clang-format --- src/core/lib/iomgr/ev_epoll_linux.c | 11 ++++------- src/core/lib/iomgr/ev_poll_posix.c | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 48ab5bf826..07fbfd849e 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -442,9 +442,8 @@ static void polling_island_add_wakeup_fd_locked(polling_island *pi, gpr_asprintf(&err_msg, "epoll_ctl (epoll_fd: %d) add wakeup fd: %d failed with " "error: %d (%s)", - pi->epoll_fd, - GRPC_WAKEUP_FD_GET_READ_FD(&global_wakeup_fd), errno, - strerror(errno)); + pi->epoll_fd, GRPC_WAKEUP_FD_GET_READ_FD(&global_wakeup_fd), + errno, strerror(errno)); append_error(error, GRPC_OS_ERROR(errno, err_msg), err_desc); gpr_free(err_msg); } @@ -1502,12 +1501,10 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, for (int i = 0; i < ep_rv; ++i) { void *data_ptr = ep_ev[i].data.ptr; if (data_ptr == &global_wakeup_fd) { - append_error(error, - grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd), + append_error(error, grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd), err_desc); } else if (data_ptr == &pi->workqueue_wakeup_fd) { - append_error(error, - grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd), + append_error(error, grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd), err_desc); maybe_do_workqueue_work(exec_ctx, pi); } else if (data_ptr == &polling_island_wakeup_fd) { diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index f9d8332686..21b28e5554 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -1003,8 +1003,8 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } } else { if (pfds[0].revents & POLLIN_CHECK) { - work_combine_error( - &error, grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd)); + work_combine_error(&error, + grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd)); } if (pfds[1].revents & POLLIN_CHECK) { work_combine_error( -- cgit v1.2.3 From e85477646c5b6ec159715a7e8d9ebaaf6d451777 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 28 Nov 2016 17:42:53 +0000 Subject: Fix build problems. --- src/core/lib/channel/channel_stack_builder.c | 2 +- src/cpp/common/channel_filter.h | 13 +++++++++---- test/core/channel/channel_stack_test.c | 7 ++++--- 3 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/channel_stack_builder.c b/src/core/lib/channel/channel_stack_builder.c index 047d85f44d..dd11e5bf6b 100644 --- a/src/core/lib/channel/channel_stack_builder.c +++ b/src/core/lib/channel/channel_stack_builder.c @@ -252,7 +252,7 @@ grpc_error *grpc_channel_stack_builder_finish( *result = gpr_malloc(prefix_bytes + channel_stack_size); // fetch a pointer to the channel stack grpc_channel_stack *channel_stack = - (grpc_channel_stack *)(*result + prefix_bytes); + (grpc_channel_stack *)((char *)(*result) + prefix_bytes); // and initialize it grpc_error *error = grpc_channel_stack_init( exec_ctx, initial_refs, destroy, diff --git a/src/cpp/common/channel_filter.h b/src/cpp/common/channel_filter.h index e420efc71c..6bda74b9be 100644 --- a/src/cpp/common/channel_filter.h +++ b/src/cpp/common/channel_filter.h @@ -220,6 +220,9 @@ class ChannelData { if (peer_) gpr_free((void *)peer_); } + /// Initializes the call data. + virtual grpc_error *Init() { return GRPC_ERROR_NONE; } + /// Caller does NOT take ownership of result. const char *peer() const { return peer_; } @@ -276,15 +279,17 @@ class ChannelFilter final { public: static const size_t channel_data_size = sizeof(ChannelDataType); - static void InitChannelElement(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { + static grpc_error *InitChannelElement(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { const char *peer = args->optional_transport ? grpc_transport_get_peer(exec_ctx, args->optional_transport) : nullptr; // Construct the object in the already-allocated memory. - new (elem->channel_data) ChannelDataType(*args->channel_args, peer); + ChannelDataType* channel_data = + new (elem->channel_data) ChannelDataType(*args->channel_args, peer); + return channel_data->Init(); } static void DestroyChannelElement(grpc_exec_ctx *exec_ctx, diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index 0840820cca..b43d05eec3 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -41,9 +41,9 @@ #include "test/core/util/test_config.h" -static void channel_init_func(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { +static grpc_error *channel_init_func(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { GPR_ASSERT(args->channel_args->num_args == 1); GPR_ASSERT(args->channel_args->args[0].type == GRPC_ARG_INTEGER); GPR_ASSERT(0 == strcmp(args->channel_args->args[0].key, "test_key")); @@ -51,6 +51,7 @@ static void channel_init_func(grpc_exec_ctx *exec_ctx, GPR_ASSERT(args->is_first); GPR_ASSERT(args->is_last); *(int *)(elem->channel_data) = 0; + return GRPC_ERROR_NONE; } static grpc_error *call_init_func(grpc_exec_ctx *exec_ctx, -- cgit v1.2.3 From 491d97546c54ad1192968bbf8505d0db6e3b983e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 28 Nov 2016 10:39:00 -0800 Subject: Fix subprocess code to avoid redundant calls to waitpid(). --- src/core/lib/support/subprocess_posix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/support/subprocess_posix.c b/src/core/lib/support/subprocess_posix.c index 4f4de9298e..daf371d03e 100644 --- a/src/core/lib/support/subprocess_posix.c +++ b/src/core/lib/support/subprocess_posix.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -52,7 +53,7 @@ struct gpr_subprocess { int pid; - int joined; + bool joined; }; const char *gpr_subprocess_binary_extension() { return ""; } @@ -100,6 +101,7 @@ retry: gpr_log(GPR_ERROR, "waitpid failed: %s", strerror(errno)); return -1; } + p->joined = true; return status; } -- cgit v1.2.3 From a540848c20b556f6827fd8c9b23f5313df6b1d18 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 28 Nov 2016 13:46:19 -0800 Subject: Fixed http_client race --- src/core/lib/channel/http_client_filter.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index dbe0d25211..fd8b46afcb 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -245,12 +245,15 @@ static void hc_mutate_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, message, and the payload is below the size threshold, and all the data for this request is immediately available. */ grpc_mdelem *method = GRPC_MDELEM_METHOD_POST; - calld->send_message_blocked = false; if ((op->send_initial_metadata_flags & GRPC_INITIAL_METADATA_CACHEABLE_REQUEST) && op->send_message != NULL && op->send_message->length < channeld->max_payload_size_for_get) { method = GRPC_MDELEM_METHOD_GET; + /* The following write to calld->send_message_blocked isn't racy with + reads in hc_start_transport_op (which deals with SEND_MESSAGE ops) because + being here means ops->send_message is not NULL, which is primarily + guarding the read there. */ calld->send_message_blocked = true; } else if (op->send_initial_metadata_flags & GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST) { @@ -331,8 +334,7 @@ static void hc_start_transport_op(grpc_exec_ctx *exec_ctx, call_data *calld = elem->call_data; if (op->send_message != NULL && calld->send_message_blocked) { /* Don't forward the op. send_message contains slices that aren't ready - yet. The call will be forwarded by the op_complete of slice read call. - */ + yet. The call will be forwarded by the op_complete of slice read call. */ } else { grpc_call_next_op(exec_ctx, elem, op); } @@ -347,6 +349,7 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, calld->on_done_recv_trailing_metadata = NULL; calld->on_complete = NULL; calld->payload_bytes = NULL; + calld->send_message_blocked = false; grpc_slice_buffer_init(&calld->slices); grpc_closure_init(&calld->hc_on_recv_initial_metadata, hc_on_recv_initial_metadata, elem); -- cgit v1.2.3 From da81d1a43deecd815b7d2520a2425f0afd1a858d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 28 Nov 2016 15:00:53 -0800 Subject: Flush platform stuff after timer events It can happen that a timer event causes something to be queued to an IOCP, which means that on Windows we need to flush that queue each time a timer event fires during shutdown. --- src/core/lib/iomgr/iomgr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/lib/iomgr/iomgr.c b/src/core/lib/iomgr/iomgr.c index 4fd83e0b22..3470b5ac81 100644 --- a/src/core/lib/iomgr/iomgr.c +++ b/src/core/lib/iomgr/iomgr.c @@ -108,6 +108,7 @@ void grpc_iomgr_shutdown(void) { NULL)) { gpr_mu_unlock(&g_mu); grpc_exec_ctx_flush(&exec_ctx); + grpc_iomgr_platform_flush(); gpr_mu_lock(&g_mu); continue; } -- cgit v1.2.3 From 83b6e8e6152dd04e35d3221ecaa108f48c7e07a5 Mon Sep 17 00:00:00 2001 From: Paul Marks Date: Mon, 28 Nov 2016 16:10:27 -0800 Subject: Run clang-format on udp_server.c --- src/core/lib/iomgr/udp_server.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index dd82563127..3c24ea9afa 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -388,9 +388,8 @@ int grpc_udp_server_add_port(grpc_udp_server *s, /* Try listening on IPv6 first. */ addr = &wild6; // TODO(rjshade): Test and propagate the returned grpc_error*: - GRPC_ERROR_UNREF( - grpc_create_dualstack_socket(addr, SOCK_DGRAM, IPPROTO_UDP, - &dsmode, &fd)); + GRPC_ERROR_UNREF(grpc_create_dualstack_socket(addr, SOCK_DGRAM, IPPROTO_UDP, + &dsmode, &fd)); allocated_port1 = add_socket_to_server(s, fd, addr, read_cb, orphan_cb); if (fd >= 0 && dsmode == GRPC_DSMODE_DUALSTACK) { goto done; @@ -404,9 +403,8 @@ int grpc_udp_server_add_port(grpc_udp_server *s, } // TODO(rjshade): Test and propagate the returned grpc_error*: - GRPC_ERROR_UNREF( - grpc_create_dualstack_socket(addr, SOCK_DGRAM, IPPROTO_UDP, - &dsmode, &fd)); + GRPC_ERROR_UNREF(grpc_create_dualstack_socket(addr, SOCK_DGRAM, IPPROTO_UDP, + &dsmode, &fd)); if (fd < 0) { gpr_log(GPR_ERROR, "Unable to create socket: %s", strerror(errno)); } -- cgit v1.2.3 From ea0d61f80666b92cf4dc5fa3b2fc6fc460e48f9e Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 28 Nov 2016 15:07:28 -0800 Subject: Return correct status on cancel --- .../transport/cronet/transport/cronet_transport.c | 52 ++++++++++++++-------- 1 file changed, 34 insertions(+), 18 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 961e0a5acc..4ac2ebf04e 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -151,6 +151,7 @@ struct op_state { bool state_callback_received[OP_NUM_OPS]; bool fail_state; bool flush_read; + grpc_error *cancel_error; /* data structure for storing data coming from server */ struct read_state rs; /* data structure for storing data going to the server */ @@ -250,6 +251,12 @@ static void free_read_buffer(stream_obj *s) { } } +static grpc_error* make_error_with_desc(int error_code, const char *desc) { + grpc_error *error = GRPC_ERROR_CREATE(desc); + error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS, error_code); + return error; +} + /* Add a new stream op to op storage. */ @@ -817,17 +824,10 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, op_can_be_run(stream_op, stream_state, &oas->state, OP_SEND_INITIAL_METADATA)) { CRONET_LOG(GPR_DEBUG, "running: %p OP_SEND_INITIAL_METADATA", oas); - /* This OP is the beginning. Reset various states */ - stream_state->fail_state = stream_state->flush_read = false; - memset(&s->header_array, 0, sizeof(s->header_array)); - memset(&stream_state->rs, 0, sizeof(stream_state->rs)); - memset(&stream_state->ws, 0, sizeof(stream_state->ws)); - memset(stream_state->state_op_done, 0, sizeof(stream_state->state_op_done)); - memset(stream_state->state_callback_received, 0, - sizeof(stream_state->state_callback_received)); /* Start new cronet stream. It is destroyed in on_succeeded, on_canceled, * on_failed */ GPR_ASSERT(s->cbs == NULL); + GPR_ASSERT(!stream_state->state_op_done[OP_SEND_INITIAL_METADATA]); s->cbs = cronet_bidirectional_stream_create(s->curr_ct.engine, s->curr_gs, &cronet_callbacks); CRONET_LOG(GPR_DEBUG, "%p = cronet_bidirectional_stream_create()", s->cbs); @@ -848,10 +848,11 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, op_can_be_run(stream_op, stream_state, &oas->state, OP_RECV_INITIAL_METADATA)) { CRONET_LOG(GPR_DEBUG, "running: %p OP_RECV_INITIAL_METADATA", oas); - if (stream_state->state_op_done[OP_CANCEL_ERROR] || - stream_state->state_callback_received[OP_FAILED]) { + if (stream_state->state_op_done[OP_CANCEL_ERROR]) { grpc_exec_ctx_sched(exec_ctx, stream_op->recv_initial_metadata_ready, GRPC_ERROR_CANCELLED, NULL); + } else if (stream_state->state_callback_received[OP_FAILED]) { + grpc_exec_ctx_sched(exec_ctx, stream_op->recv_initial_metadata_ready, make_error_with_desc(GRPC_STATUS_UNAVAILABLE, "Unavailable."), NULL); } else { grpc_chttp2_incoming_metadata_buffer_publish( &oas->s->state.rs.initial_metadata, stream_op->recv_initial_metadata); @@ -905,12 +906,16 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, op_can_be_run(stream_op, stream_state, &oas->state, OP_RECV_MESSAGE)) { CRONET_LOG(GPR_DEBUG, "running: %p OP_RECV_MESSAGE", oas); - if (stream_state->state_op_done[OP_CANCEL_ERROR] || - stream_state->state_callback_received[OP_FAILED]) { - CRONET_LOG(GPR_DEBUG, "Stream is either cancelled or failed."); + if (stream_state->state_op_done[OP_CANCEL_ERROR]) { + CRONET_LOG(GPR_DEBUG, "Stream is cancelled."); grpc_exec_ctx_sched(exec_ctx, stream_op->recv_message_ready, GRPC_ERROR_CANCELLED, NULL); stream_state->state_op_done[OP_RECV_MESSAGE] = true; + } else if (stream_state->state_callback_received[OP_FAILED]) { + CRONET_LOG(GPR_DEBUG, "Stream failed."); + grpc_exec_ctx_sched(exec_ctx, stream_op->recv_message_ready, + make_error_with_desc(GRPC_STATUS_UNAVAILABLE, "Unavailable."), NULL); + stream_state->state_op_done[OP_RECV_MESSAGE] = true; } else if (stream_state->rs.read_stream_closed == true) { /* No more data will be received */ CRONET_LOG(GPR_DEBUG, "read stream closed"); @@ -1031,17 +1036,23 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, CRONET_LOG(GPR_DEBUG, "W: cronet_bidirectional_stream_cancel(%p)", s->cbs); if (s->cbs) { cronet_bidirectional_stream_cancel(s->cbs); + result = ACTION_TAKEN_WITH_CALLBACK; + } else { + result = ACTION_TAKEN_NO_CALLBACK; } stream_state->state_op_done[OP_CANCEL_ERROR] = true; - result = ACTION_TAKEN_WITH_CALLBACK; + if (!stream_state->cancel_error) { + stream_state->cancel_error = GRPC_ERROR_REF(stream_op->cancel_error); + } } else if (stream_op->on_complete && op_can_be_run(stream_op, stream_state, &oas->state, OP_ON_COMPLETE)) { CRONET_LOG(GPR_DEBUG, "running: %p OP_ON_COMPLETE", oas); - if (stream_state->state_op_done[OP_CANCEL_ERROR] || - stream_state->state_callback_received[OP_FAILED]) { + if (stream_state->state_op_done[OP_CANCEL_ERROR]) { grpc_exec_ctx_sched(exec_ctx, stream_op->on_complete, - GRPC_ERROR_CANCELLED, NULL); + GRPC_ERROR_REF(stream_state->cancel_error), NULL); + } else if (stream_state->state_callback_received[OP_FAILED]) { + grpc_exec_ctx_sched(exec_ctx, stream_op->on_complete, make_error_with_desc(GRPC_STATUS_UNAVAILABLE, "Unavailable."), NULL); } else { /* All actions in this stream_op are complete. Call the on_complete * callback @@ -1096,6 +1107,8 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, memset(s->state.state_op_done, 0, sizeof(s->state.state_op_done)); memset(s->state.state_callback_received, 0, sizeof(s->state.state_callback_received)); + s->state.fail_state = s->state.flush_read = false; + s->state.cancel_error = NULL; gpr_mu_init(&s->mu); return 0; } @@ -1142,7 +1155,10 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, } static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, - grpc_stream *gs, void *and_free_memory) {} + grpc_stream *gs, void *and_free_memory) { + stream_obj *s = (stream_obj *)gs; + GRPC_ERROR_UNREF(s->state.cancel_error); +} static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) {} -- cgit v1.2.3 From a6b88dfcd642784d6566b342d086f862c717d138 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 28 Nov 2016 16:19:28 -0800 Subject: Change behavior of RECV_MESSAGE --- src/core/ext/transport/cronet/transport/cronet_transport.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 4ac2ebf04e..69e2e27c08 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -59,7 +59,7 @@ } while (0) /* TODO (makdharma): Hook up into the wider tracing mechanism */ -int grpc_cronet_trace = 0; +int grpc_cronet_trace = 1; enum e_op_result { ACTION_TAKEN_WITH_CALLBACK, @@ -911,11 +911,13 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, grpc_exec_ctx_sched(exec_ctx, stream_op->recv_message_ready, GRPC_ERROR_CANCELLED, NULL); stream_state->state_op_done[OP_RECV_MESSAGE] = true; + result = ACTION_TAKEN_NO_CALLBACK; } else if (stream_state->state_callback_received[OP_FAILED]) { CRONET_LOG(GPR_DEBUG, "Stream failed."); grpc_exec_ctx_sched(exec_ctx, stream_op->recv_message_ready, make_error_with_desc(GRPC_STATUS_UNAVAILABLE, "Unavailable."), NULL); stream_state->state_op_done[OP_RECV_MESSAGE] = true; + result = ACTION_TAKEN_NO_CALLBACK; } else if (stream_state->rs.read_stream_closed == true) { /* No more data will be received */ CRONET_LOG(GPR_DEBUG, "read stream closed"); @@ -923,6 +925,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, GRPC_ERROR_NONE, NULL); stream_state->state_op_done[OP_RECV_MESSAGE] = true; oas->state.state_op_done[OP_RECV_MESSAGE] = true; + result = ACTION_TAKEN_NO_CALLBACK; } else if (stream_state->rs.length_field_received == false) { if (stream_state->rs.received_bytes == GRPC_HEADER_SIZE_IN_BYTES && stream_state->rs.remaining_bytes == 0) { -- cgit v1.2.3 From a05909faf2394433e841a5eb4399e89afd05c26a Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 28 Nov 2016 18:02:52 -0800 Subject: Added pid logging to subprocess --- src/core/lib/support/subprocess_posix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/support/subprocess_posix.c b/src/core/lib/support/subprocess_posix.c index 4f4de9298e..074769879b 100644 --- a/src/core/lib/support/subprocess_posix.c +++ b/src/core/lib/support/subprocess_posix.c @@ -97,7 +97,8 @@ retry: if (errno == EINTR) { goto retry; } - gpr_log(GPR_ERROR, "waitpid failed: %s", strerror(errno)); + gpr_log(GPR_ERROR, "waitpid failed for pid %d: %s", p->pid, + strerror(errno)); return -1; } return status; -- cgit v1.2.3 From e62605f41e00c3e4652e0a7ad19846d8995a101f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 29 Nov 2016 16:31:36 +0000 Subject: Fix error handling in channel initialization. --- src/core/lib/channel/channel_stack_builder.c | 21 +++-- src/core/lib/surface/channel.c | 113 +++++++++++++-------------- test/core/surface/channel_create_test.c | 12 +++ 3 files changed, 82 insertions(+), 64 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/channel_stack_builder.c b/src/core/lib/channel/channel_stack_builder.c index dd11e5bf6b..f54eac06ec 100644 --- a/src/core/lib/channel/channel_stack_builder.c +++ b/src/core/lib/channel/channel_stack_builder.c @@ -259,14 +259,21 @@ grpc_error *grpc_channel_stack_builder_finish( destroy_arg == NULL ? *result : destroy_arg, filters, num_filters, builder->args, builder->transport, builder->name, channel_stack); - // run post-initialization functions - i = 0; - for (filter_node *p = builder->begin.next; p != &builder->end; p = p->next) { - if (p->init != NULL) { - p->init(channel_stack, grpc_channel_stack_element(channel_stack, i), - p->init_arg); + if (error != GRPC_ERROR_NONE) { + grpc_channel_stack_destroy(exec_ctx, channel_stack); + gpr_free(*result); + *result = NULL; + } else { + // run post-initialization functions + i = 0; + for (filter_node *p = builder->begin.next; p != &builder->end;\ + p = p->next) { + if (p->init != NULL) { + p->init(channel_stack, grpc_channel_stack_element(channel_stack, i), + p->init_arg); + } + i++; } - i++; } grpc_channel_stack_builder_destroy(builder); diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 22bb55c7b4..72e64a2076 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -86,92 +86,91 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, const grpc_channel_args *input_args, grpc_channel_stack_type channel_stack_type, grpc_transport *optional_transport) { - bool is_client = grpc_channel_stack_type_is_client(channel_stack_type); - grpc_channel_stack_builder *builder = grpc_channel_stack_builder_create(); grpc_channel_stack_builder_set_channel_arguments(builder, input_args); grpc_channel_stack_builder_set_target(builder, target); grpc_channel_stack_builder_set_transport(builder, optional_transport); - grpc_channel *channel; - grpc_channel_args *args; if (!grpc_channel_init_create_stack(exec_ctx, builder, channel_stack_type)) { grpc_channel_stack_builder_destroy(builder); return NULL; } - args = grpc_channel_args_copy( + grpc_channel_args *args = grpc_channel_args_copy( grpc_channel_stack_builder_get_channel_arguments(builder)); + grpc_channel *channel; grpc_error *error = grpc_channel_stack_builder_finish( exec_ctx, builder, sizeof(grpc_channel), 1, destroy_channel, NULL, (void **)&channel); if (error != GRPC_ERROR_NONE) { - grpc_channel_stack_destroy(exec_ctx, (grpc_channel_stack *)channel); - gpr_free(channel); - return NULL; + const char* msg = grpc_error_string(error); + gpr_log(GPR_ERROR, "channel stack builder failed: %s", msg); + grpc_error_free_string(msg); + GRPC_ERROR_UNREF(error); + goto done; } memset(channel, 0, sizeof(*channel)); channel->target = gpr_strdup(target); - channel->is_client = is_client; + channel->is_client = grpc_channel_stack_type_is_client(channel_stack_type); gpr_mu_init(&channel->registered_call_mu); channel->registered_calls = NULL; grpc_compression_options_init(&channel->compression_options); - if (args) { - for (size_t i = 0; i < args->num_args; i++) { - if (0 == strcmp(args->args[i].key, GRPC_ARG_DEFAULT_AUTHORITY)) { - if (args->args[i].type != GRPC_ARG_STRING) { - gpr_log(GPR_ERROR, "%s ignored: it must be a string", - GRPC_ARG_DEFAULT_AUTHORITY); - } else { - if (channel->default_authority) { - /* setting this takes precedence over anything else */ - GRPC_MDELEM_UNREF(channel->default_authority); - } - channel->default_authority = grpc_mdelem_from_strings( - ":authority", args->args[i].value.string); + + for (size_t i = 0; i < args->num_args; i++) { + if (0 == strcmp(args->args[i].key, GRPC_ARG_DEFAULT_AUTHORITY)) { + if (args->args[i].type != GRPC_ARG_STRING) { + gpr_log(GPR_ERROR, "%s ignored: it must be a string", + GRPC_ARG_DEFAULT_AUTHORITY); + } else { + if (channel->default_authority) { + /* setting this takes precedence over anything else */ + GRPC_MDELEM_UNREF(channel->default_authority); } - } else if (0 == - strcmp(args->args[i].key, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG)) { - if (args->args[i].type != GRPC_ARG_STRING) { - gpr_log(GPR_ERROR, "%s ignored: it must be a string", + channel->default_authority = grpc_mdelem_from_strings( + ":authority", args->args[i].value.string); + } + } else if (0 == + strcmp(args->args[i].key, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG)) { + if (args->args[i].type != GRPC_ARG_STRING) { + gpr_log(GPR_ERROR, "%s ignored: it must be a string", + GRPC_SSL_TARGET_NAME_OVERRIDE_ARG); + } else { + if (channel->default_authority) { + /* other ways of setting this (notably ssl) take precedence */ + gpr_log(GPR_ERROR, + "%s ignored: default host already set some other way", GRPC_SSL_TARGET_NAME_OVERRIDE_ARG); } else { - if (channel->default_authority) { - /* other ways of setting this (notably ssl) take precedence */ - gpr_log(GPR_ERROR, - "%s ignored: default host already set some other way", - GRPC_SSL_TARGET_NAME_OVERRIDE_ARG); - } else { - channel->default_authority = grpc_mdelem_from_strings( - ":authority", args->args[i].value.string); - } + channel->default_authority = grpc_mdelem_from_strings( + ":authority", args->args[i].value.string); } - } else if (0 == strcmp(args->args[i].key, - GRPC_COMPRESSION_CHANNEL_DEFAULT_LEVEL)) { - channel->compression_options.default_level.is_set = true; - GPR_ASSERT(args->args[i].value.integer >= 0 && - args->args[i].value.integer < GRPC_COMPRESS_LEVEL_COUNT); - channel->compression_options.default_level.level = - (grpc_compression_level)args->args[i].value.integer; - } else if (0 == strcmp(args->args[i].key, - GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM)) { - channel->compression_options.default_algorithm.is_set = true; - GPR_ASSERT(args->args[i].value.integer >= 0 && - args->args[i].value.integer < - GRPC_COMPRESS_ALGORITHMS_COUNT); - channel->compression_options.default_algorithm.algorithm = - (grpc_compression_algorithm)args->args[i].value.integer; - } else if (0 == - strcmp(args->args[i].key, - GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET)) { - channel->compression_options.enabled_algorithms_bitset = - (uint32_t)args->args[i].value.integer | - 0x1; /* always support no compression */ } + } else if (0 == strcmp(args->args[i].key, + GRPC_COMPRESSION_CHANNEL_DEFAULT_LEVEL)) { + channel->compression_options.default_level.is_set = true; + GPR_ASSERT(args->args[i].value.integer >= 0 && + args->args[i].value.integer < GRPC_COMPRESS_LEVEL_COUNT); + channel->compression_options.default_level.level = + (grpc_compression_level)args->args[i].value.integer; + } else if (0 == strcmp(args->args[i].key, + GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM)) { + channel->compression_options.default_algorithm.is_set = true; + GPR_ASSERT(args->args[i].value.integer >= 0 && + args->args[i].value.integer < + GRPC_COMPRESS_ALGORITHMS_COUNT); + channel->compression_options.default_algorithm.algorithm = + (grpc_compression_algorithm)args->args[i].value.integer; + } else if (0 == + strcmp(args->args[i].key, + GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET)) { + channel->compression_options.enabled_algorithms_bitset = + (uint32_t)args->args[i].value.integer | + 0x1; /* always support no compression */ } - grpc_channel_args_destroy(args); } +done: + grpc_channel_args_destroy(args); return channel; } diff --git a/test/core/surface/channel_create_test.c b/test/core/surface/channel_create_test.c index ad7970aab9..654e5324d9 100644 --- a/test/core/surface/channel_create_test.c +++ b/test/core/surface/channel_create_test.c @@ -31,9 +31,14 @@ * */ +#include + #include #include + #include "src/core/ext/client_channel/resolver_registry.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/surface/channel.h" #include "test/core/util/test_config.h" void test_unknown_scheme_target(void) { @@ -44,6 +49,13 @@ void test_unknown_scheme_target(void) { chan = grpc_insecure_channel_create("blah://blah", NULL, NULL); GPR_ASSERT(chan != NULL); + + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_channel_element *elem = + grpc_channel_stack_element(grpc_channel_get_channel_stack(chan), 0); + GPR_ASSERT(0 == strcmp(elem->filter->name, "lame-client")); + grpc_exec_ctx_finish(&exec_ctx); + grpc_channel_destroy(chan); } -- cgit v1.2.3 From 72e409655ece13b84f8b110a7bcb904187737254 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 29 Nov 2016 10:07:43 -0800 Subject: clang-format --- .../ext/transport/cronet/transport/cronet_transport.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 69e2e27c08..c3abb47735 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -251,7 +251,7 @@ static void free_read_buffer(stream_obj *s) { } } -static grpc_error* make_error_with_desc(int error_code, const char *desc) { +static grpc_error *make_error_with_desc(int error_code, const char *desc) { grpc_error *error = GRPC_ERROR_CREATE(desc); error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS, error_code); return error; @@ -852,7 +852,9 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, grpc_exec_ctx_sched(exec_ctx, stream_op->recv_initial_metadata_ready, GRPC_ERROR_CANCELLED, NULL); } else if (stream_state->state_callback_received[OP_FAILED]) { - grpc_exec_ctx_sched(exec_ctx, stream_op->recv_initial_metadata_ready, make_error_with_desc(GRPC_STATUS_UNAVAILABLE, "Unavailable."), NULL); + grpc_exec_ctx_sched( + exec_ctx, stream_op->recv_initial_metadata_ready, + make_error_with_desc(GRPC_STATUS_UNAVAILABLE, "Unavailable."), NULL); } else { grpc_chttp2_incoming_metadata_buffer_publish( &oas->s->state.rs.initial_metadata, stream_op->recv_initial_metadata); @@ -914,8 +916,9 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, result = ACTION_TAKEN_NO_CALLBACK; } else if (stream_state->state_callback_received[OP_FAILED]) { CRONET_LOG(GPR_DEBUG, "Stream failed."); - grpc_exec_ctx_sched(exec_ctx, stream_op->recv_message_ready, - make_error_with_desc(GRPC_STATUS_UNAVAILABLE, "Unavailable."), NULL); + grpc_exec_ctx_sched( + exec_ctx, stream_op->recv_message_ready, + make_error_with_desc(GRPC_STATUS_UNAVAILABLE, "Unavailable."), NULL); stream_state->state_op_done[OP_RECV_MESSAGE] = true; result = ACTION_TAKEN_NO_CALLBACK; } else if (stream_state->rs.read_stream_closed == true) { @@ -1055,7 +1058,9 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, grpc_exec_ctx_sched(exec_ctx, stream_op->on_complete, GRPC_ERROR_REF(stream_state->cancel_error), NULL); } else if (stream_state->state_callback_received[OP_FAILED]) { - grpc_exec_ctx_sched(exec_ctx, stream_op->on_complete, make_error_with_desc(GRPC_STATUS_UNAVAILABLE, "Unavailable."), NULL); + grpc_exec_ctx_sched( + exec_ctx, stream_op->on_complete, + make_error_with_desc(GRPC_STATUS_UNAVAILABLE, "Unavailable."), NULL); } else { /* All actions in this stream_op are complete. Call the on_complete * callback -- cgit v1.2.3 From c0c0dbc01ce092a9f8bbf3f0dd8ea12d5486b026 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 29 Nov 2016 10:10:21 -0800 Subject: Fix TSAN race on adding a reclaimer --- src/core/lib/iomgr/resource_quota.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 051a30baa3..379bf9bd23 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -104,6 +104,9 @@ struct grpc_resource_user { /* Reclaimers: index 0 is the benign reclaimer, 1 is the destructive reclaimer */ grpc_closure *reclaimers[2]; + /* Reclaimers just posted: once we're in the combiner lock, we'll move them + to the array above */ + grpc_closure *new_reclaimers[2]; /* Trampoline closures to finish reclamation and re-enter the quota combiner lock */ grpc_closure post_reclaimer_closure[2]; @@ -418,9 +421,25 @@ static void ru_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *ru, rulist_add_tail(resource_user, GRPC_RULIST_NON_EMPTY_FREE_POOL); } +static bool ru_post_reclaimer(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, + bool destructive) { + grpc_closure *closure = resource_user->new_reclaimers[destructive]; + GPR_ASSERT(closure != NULL); + resource_user->new_reclaimers[destructive] = NULL; + GPR_ASSERT(resource_user->reclaimers[destructive] == NULL); + if (gpr_atm_acq_load(&resource_user->shutdown) > 0) { + grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CANCELLED, NULL); + return false; + } + resource_user->reclaimers[destructive] = closure; + return true; +} + static void ru_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { grpc_resource_user *resource_user = ru; + if (!ru_post_reclaimer(exec_ctx, resource_user, false)) return; if (!rulist_empty(resource_user->resource_quota, GRPC_RULIST_AWAITING_ALLOCATION) && rulist_empty(resource_user->resource_quota, @@ -435,6 +454,7 @@ static void ru_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *ru, static void ru_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { grpc_resource_user *resource_user = ru; + if (!ru_post_reclaimer(exec_ctx, resource_user, true)) return; if (!rulist_empty(resource_user->resource_quota, GRPC_RULIST_AWAITING_ALLOCATION) && rulist_empty(resource_user->resource_quota, @@ -649,6 +669,8 @@ grpc_resource_user *grpc_resource_user_create( resource_user->added_to_free_pool = false; resource_user->reclaimers[0] = NULL; resource_user->reclaimers[1] = NULL; + resource_user->new_reclaimers[0] = NULL; + resource_user->new_reclaimers[1] = NULL; for (int i = 0; i < GRPC_RULIST_COUNT; i++) { resource_user->links[i].next = resource_user->links[i].prev = NULL; } @@ -748,12 +770,8 @@ void grpc_resource_user_post_reclaimer(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, bool destructive, grpc_closure *closure) { - GPR_ASSERT(resource_user->reclaimers[destructive] == NULL); - if (gpr_atm_acq_load(&resource_user->shutdown) > 0) { - grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CANCELLED, NULL); - return; - } - resource_user->reclaimers[destructive] = closure; + GPR_ASSERT(resource_user->new_reclaimers[destructive] == NULL); + resource_user->new_reclaimers[destructive] = closure; grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, &resource_user->post_reclaimer_closure[destructive], GRPC_ERROR_NONE, false); -- cgit v1.2.3 From 3beb6c52ac27febccf2aa37c87bf6a8070084093 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 29 Nov 2016 11:25:12 -0800 Subject: Add locking in security handshaker. --- src/core/lib/http/httpcli_security_connector.c | 16 +- .../lib/security/transport/security_connector.c | 88 +++++----- .../lib/security/transport/security_connector.h | 20 +-- .../lib/security/transport/security_handshaker.c | 177 ++++++++++++--------- 4 files changed, 161 insertions(+), 140 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index 9e7e3e2fa1..229021a345 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -86,20 +86,22 @@ static void httpcli_ssl_create_handshakers( static void httpcli_ssl_check_peer(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer, - grpc_security_peer_check_cb cb, - void *user_data) { + grpc_auth_context **auth_context, + grpc_closure *on_peer_checked) { grpc_httpcli_ssl_channel_security_connector *c = (grpc_httpcli_ssl_channel_security_connector *)sc; - grpc_security_status status = GRPC_SECURITY_OK; + grpc_error *error = GRPC_ERROR_NONE; /* Check the peer name. */ if (c->secure_peer_name != NULL && !tsi_ssl_peer_matches_name(&peer, c->secure_peer_name)) { - gpr_log(GPR_ERROR, "Peer name %s is not in peer certificate", - c->secure_peer_name); - status = GRPC_SECURITY_ERROR; + char *msg; + gpr_asprintf(&msg, "Peer name %s is not in peer certificate", + c->secure_peer_name); + error = GRPC_ERROR_CREATE(msg); + gpr_free(msg); } - cb(exec_ctx, user_data, status, NULL); + grpc_exec_ctx_sched(exec_ctx, on_peer_checked, error, NULL); tsi_peer_destruct(&peer); } diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index ac68ab3125..cb2e8a2d9a 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -130,13 +130,15 @@ void grpc_server_security_connector_create_handshakers( void grpc_security_connector_check_peer(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer, - grpc_security_peer_check_cb cb, - void *user_data) { + grpc_auth_context **auth_context, + grpc_closure *on_peer_checked) { if (sc == NULL) { - cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL); + grpc_exec_ctx_sched( + exec_ctx, on_peer_checked, + GRPC_ERROR_CREATE("cannot check peer -- no security connector"), NULL); tsi_peer_destruct(&peer); } else { - sc->vtable->check_peer(exec_ctx, sc, peer, cb, user_data); + sc->vtable->check_peer(exec_ctx, sc, peer, auth_context, on_peer_checked); } } @@ -242,37 +244,37 @@ static void fake_server_destroy(grpc_security_connector *sc) { static void fake_check_peer(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer, - grpc_security_peer_check_cb cb, void *user_data) { + grpc_auth_context **auth_context, + grpc_closure *on_peer_checked) { const char *prop_name; - grpc_security_status status = GRPC_SECURITY_OK; - grpc_auth_context *auth_context = NULL; + grpc_error *error = GRPC_ERROR_NONE; + *auth_context = NULL; if (peer.property_count != 1) { - gpr_log(GPR_ERROR, "Fake peers should only have 1 property."); - status = GRPC_SECURITY_ERROR; + error = GRPC_ERROR_CREATE("Fake peers should only have 1 property."); goto end; } prop_name = peer.properties[0].name; if (prop_name == NULL || strcmp(prop_name, TSI_CERTIFICATE_TYPE_PEER_PROPERTY)) { - gpr_log(GPR_ERROR, "Unexpected property in fake peer: %s.", - prop_name == NULL ? "" : prop_name); - status = GRPC_SECURITY_ERROR; + char *msg; + gpr_asprintf(&msg, "Unexpected property in fake peer: %s.", + prop_name == NULL ? "" : prop_name); + error = GRPC_ERROR_CREATE(msg); + gpr_free(msg); goto end; } if (strncmp(peer.properties[0].value.data, TSI_FAKE_CERTIFICATE_TYPE, peer.properties[0].value.length)) { - gpr_log(GPR_ERROR, "Invalid value for cert type property."); - status = GRPC_SECURITY_ERROR; + error = GRPC_ERROR_CREATE("Invalid value for cert type property."); goto end; } - auth_context = grpc_auth_context_create(NULL); + *auth_context = grpc_auth_context_create(NULL); grpc_auth_context_add_cstring_property( - auth_context, GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME, + *auth_context, GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME, GRPC_FAKE_TRANSPORT_SECURITY_TYPE); end: - cb(exec_ctx, user_data, status, auth_context); - grpc_auth_context_unref(auth_context); + grpc_exec_ctx_sched(exec_ctx, on_peer_checked, error, NULL); tsi_peer_destruct(&peer); } @@ -466,57 +468,53 @@ grpc_auth_context *tsi_ssl_peer_to_auth_context(const tsi_peer *peer) { return ctx; } -static grpc_security_status ssl_check_peer(grpc_security_connector *sc, - const char *peer_name, - const tsi_peer *peer, - grpc_auth_context **auth_context) { +static grpc_error *ssl_check_peer(grpc_security_connector *sc, + const char *peer_name, const tsi_peer *peer, + grpc_auth_context **auth_context) { /* Check the ALPN. */ const tsi_peer_property *p = tsi_peer_get_property_by_name(peer, TSI_SSL_ALPN_SELECTED_PROTOCOL); if (p == NULL) { - gpr_log(GPR_ERROR, "Missing selected ALPN property."); - return GRPC_SECURITY_ERROR; + return GRPC_ERROR_CREATE("Cannot check peer: " + "missing selected ALPN property."); } if (!grpc_chttp2_is_alpn_version_supported(p->value.data, p->value.length)) { - gpr_log(GPR_ERROR, "Invalid ALPN value."); - return GRPC_SECURITY_ERROR; + return GRPC_ERROR_CREATE("Cannot check peer: invalid ALPN value."); } /* Check the peer name if specified. */ if (peer_name != NULL && !ssl_host_matches_name(peer, peer_name)) { - gpr_log(GPR_ERROR, "Peer name %s is not in peer certificate", peer_name); - return GRPC_SECURITY_ERROR; + char *msg; + gpr_asprintf(&msg, "Peer name %s is not in peer certificate", peer_name); + grpc_error *error = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return error; } *auth_context = tsi_ssl_peer_to_auth_context(peer); - return GRPC_SECURITY_OK; + return GRPC_ERROR_NONE; } static void ssl_channel_check_peer(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer, - grpc_security_peer_check_cb cb, - void *user_data) { + grpc_auth_context **auth_context, + grpc_closure *on_peer_checked) { grpc_ssl_channel_security_connector *c = (grpc_ssl_channel_security_connector *)sc; - grpc_security_status status; - grpc_auth_context *auth_context = NULL; - status = ssl_check_peer(sc, c->overridden_target_name != NULL - ? c->overridden_target_name - : c->target_name, - &peer, &auth_context); - cb(exec_ctx, user_data, status, auth_context); - grpc_auth_context_unref(auth_context); + grpc_error *error = ssl_check_peer(sc, c->overridden_target_name != NULL + ? c->overridden_target_name + : c->target_name, + &peer, auth_context); + grpc_exec_ctx_sched(exec_ctx, on_peer_checked, error, NULL); tsi_peer_destruct(&peer); } static void ssl_server_check_peer(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer, - grpc_security_peer_check_cb cb, - void *user_data) { - grpc_auth_context *auth_context = NULL; - grpc_security_status status = ssl_check_peer(sc, NULL, &peer, &auth_context); + grpc_auth_context **auth_context, + grpc_closure *on_peer_checked) { + grpc_error *error = ssl_check_peer(sc, NULL, &peer, auth_context); tsi_peer_destruct(&peer); - cb(exec_ctx, user_data, status, auth_context); - grpc_auth_context_unref(auth_context); + grpc_exec_ctx_sched(exec_ctx, on_peer_checked, error, NULL); } static void add_shallow_auth_property_to_peer(tsi_peer *peer, diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h index 2dffb5c24a..0e4e0aa720 100644 --- a/src/core/lib/security/transport/security_connector.h +++ b/src/core/lib/security/transport/security_connector.h @@ -59,21 +59,11 @@ typedef struct grpc_security_connector grpc_security_connector; #define GRPC_SECURITY_CONNECTOR_ARG "grpc.security_connector" -typedef void (*grpc_security_peer_check_cb)(grpc_exec_ctx *exec_ctx, - void *user_data, - grpc_security_status status, - grpc_auth_context *auth_context); - -/* Ownership of the secure_endpoint is transfered. */ -typedef void (*grpc_security_handshake_done_cb)( - grpc_exec_ctx *exec_ctx, void *user_data, grpc_security_status status, - grpc_endpoint *secure_endpoint, grpc_auth_context *auth_context); - typedef struct { void (*destroy)(grpc_security_connector *sc); void (*check_peer)(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, - tsi_peer peer, grpc_security_peer_check_cb cb, - void *user_data); + tsi_peer peer, grpc_auth_context **auth_context, + grpc_closure *on_peer_checked); } grpc_security_connector_vtable; typedef struct grpc_security_connector_handshake_list { @@ -108,12 +98,12 @@ void grpc_security_connector_unref(grpc_security_connector *policy); #endif /* Check the peer. Callee takes ownership of the peer object. - The callback will include the resulting auth_context. */ + Sets *auth_context and invokes on_peer_checked when done. */ void grpc_security_connector_check_peer(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer, - grpc_security_peer_check_cb cb, - void *user_data); + grpc_auth_context **auth_context, + grpc_closure *on_peer_checked); /* Util to encapsulate the connector in a channel arg. */ grpc_arg grpc_security_connector_to_arg(grpc_security_connector *sc); diff --git a/src/core/lib/security/transport/security_handshaker.c b/src/core/lib/security/transport/security_handshaker.c index 4b04f58bfd..1f9a4dae4a 100644 --- a/src/core/lib/security/transport/security_handshaker.c +++ b/src/core/lib/security/transport/security_handshaker.c @@ -56,7 +56,8 @@ typedef struct { grpc_closure* on_handshake_done; grpc_security_connector *connector; tsi_handshaker *handshaker; -// FIXME: add locking + gpr_mu mu; + gpr_refcount refs; unsigned char *handshake_buffer; size_t handshake_buffer_size; // FIXME: use args->endpoint instead @@ -66,8 +67,8 @@ typedef struct { grpc_slice_buffer outgoing; grpc_closure on_handshake_data_sent_to_peer; grpc_closure on_handshake_data_received_from_peer; + grpc_closure on_peer_checked; grpc_auth_context *auth_context; - gpr_refcount refs; } security_handshaker; static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, @@ -80,6 +81,7 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *setup, static void unref_handshake(security_handshaker *h) { if (gpr_unref(&h->refs)) { if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker); + gpr_mu_destroy(&h->mu); if (h->handshake_buffer != NULL) gpr_free(h->handshake_buffer); grpc_slice_buffer_destroy(&h->left_overs); grpc_slice_buffer_destroy(&h->outgoing); @@ -89,9 +91,9 @@ static void unref_handshake(security_handshaker *h) { } } -static void security_handshake_done(grpc_exec_ctx *exec_ctx, - security_handshaker *h, - grpc_error *error) { +static void security_handshake_done_locked(grpc_exec_ctx *exec_ctx, + security_handshaker *h, + grpc_error *error) { if (error == GRPC_ERROR_NONE) { h->args->endpoint = h->secure_endpoint; grpc_arg auth_context_arg = grpc_auth_context_to_arg(h->auth_context); @@ -116,60 +118,55 @@ static void security_handshake_done(grpc_exec_ctx *exec_ctx, grpc_slice_buffer_reset_and_unref(h->args->read_buffer); h->args = NULL; grpc_exec_ctx_sched(exec_ctx, h->on_handshake_done, error, NULL); - unref_handshake(h); } -static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_security_status status, - grpc_auth_context *auth_context) { - security_handshaker *h = user_data; - tsi_frame_protector *protector; - tsi_result result; - if (status != GRPC_SECURITY_OK) { - security_handshake_done( - exec_ctx, h, - grpc_error_set_int(GRPC_ERROR_CREATE("Error checking peer."), - GRPC_ERROR_INT_SECURITY_STATUS, status)); - return; +static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + security_handshaker *h = arg; + gpr_mu_lock(&h->mu); + if (error != GRPC_ERROR_NONE) { + // Take a new ref to pass to security_handshake_done_locked(). + GRPC_ERROR_REF(error); + goto done; } - h->auth_context = GRPC_AUTH_CONTEXT_REF(auth_context, "handshake"); - result = + // Get frame protector. + tsi_frame_protector *protector; + tsi_result result = tsi_handshaker_create_frame_protector(h->handshaker, NULL, &protector); if (result != TSI_OK) { - security_handshake_done( - exec_ctx, h, - grpc_set_tsi_error_result( - GRPC_ERROR_CREATE("Frame protector creation failed"), result)); - return; + error = grpc_set_tsi_error_result( + GRPC_ERROR_CREATE("Frame protector creation failed"), result); + goto done; } h->secure_endpoint = grpc_secure_endpoint_create(protector, h->wrapped_endpoint, h->left_overs.slices, h->left_overs.count); h->left_overs.count = 0; h->left_overs.length = 0; - security_handshake_done(exec_ctx, h, GRPC_ERROR_NONE); +done: + security_handshake_done_locked(exec_ctx, h, error); + gpr_mu_unlock(&h->mu); + unref_handshake(h); } -static void check_peer(grpc_exec_ctx *exec_ctx, security_handshaker *h) { +static grpc_error* check_peer_locked(grpc_exec_ctx *exec_ctx, + security_handshaker *h) { tsi_peer peer; tsi_result result = tsi_handshaker_extract_peer(h->handshaker, &peer); - if (result != TSI_OK) { - security_handshake_done( - exec_ctx, h, grpc_set_tsi_error_result( - GRPC_ERROR_CREATE("Peer extraction failed"), result)); - return; + return grpc_set_tsi_error_result( + GRPC_ERROR_CREATE("Peer extraction failed"), result); } grpc_security_connector_check_peer(exec_ctx, h->connector, peer, - on_peer_checked, h); + &h->auth_context, &h->on_peer_checked); + return GRPC_ERROR_NONE; } -static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, - security_handshaker *h) { - size_t offset = 0; +static grpc_error* send_handshake_bytes_to_peer_locked(grpc_exec_ctx *exec_ctx, + security_handshaker *h) { + // Get data to send. tsi_result result = TSI_OK; - grpc_slice to_send; - + size_t offset = 0; do { size_t to_send_size = h->handshake_buffer_size - offset; result = tsi_handshaker_get_bytes_to_send_to_peer( @@ -181,39 +178,37 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, gpr_realloc(h->handshake_buffer, h->handshake_buffer_size); } } while (result == TSI_INCOMPLETE_DATA); - if (result != TSI_OK) { - security_handshake_done(exec_ctx, h, - grpc_set_tsi_error_result( - GRPC_ERROR_CREATE("Handshake failed"), result)); - return; + return grpc_set_tsi_error_result(GRPC_ERROR_CREATE("Handshake failed"), + result); } - - to_send = + // Send data. + grpc_slice to_send = grpc_slice_from_copied_buffer((const char *)h->handshake_buffer, offset); grpc_slice_buffer_reset_and_unref(&h->outgoing); grpc_slice_buffer_add(&h->outgoing, to_send); grpc_endpoint_write(exec_ctx, h->wrapped_endpoint, &h->outgoing, &h->on_handshake_data_sent_to_peer); + return GRPC_ERROR_NONE; } static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, void *handshake, grpc_error *error) { security_handshaker *h = handshake; - size_t consumed_slice_size = 0; - tsi_result result = TSI_OK; - size_t i; - size_t num_left_overs; - int has_left_overs_in_current_slice = 0; - + gpr_mu_lock(&h->mu); if (error != GRPC_ERROR_NONE) { - security_handshake_done( + security_handshake_done_locked( exec_ctx, h, GRPC_ERROR_CREATE_REFERENCING("Handshake read failed", &error, 1)); + gpr_mu_unlock(&h->mu); + unref_handshake(h); return; } - + // Process received data. + tsi_result result = TSI_OK; + size_t consumed_slice_size = 0; + size_t i; for (i = 0; i < h->args->read_buffer->count; i++) { consumed_slice_size = GRPC_SLICE_LENGTH(h->args->read_buffer->slices[i]); result = tsi_handshaker_process_bytes_from_peer( @@ -221,31 +216,37 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, &consumed_slice_size); if (!tsi_handshaker_is_in_progress(h->handshaker)) break; } - if (tsi_handshaker_is_in_progress(h->handshaker)) { /* We may need more data. */ if (result == TSI_INCOMPLETE_DATA) { grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, h->args->read_buffer, &h->on_handshake_data_received_from_peer); - return; + goto done; } else { - send_handshake_bytes_to_peer(exec_ctx, h); - return; + error = send_handshake_bytes_to_peer_locked(exec_ctx, h); + if (error != GRPC_ERROR_NONE) { + security_handshake_done_locked(exec_ctx, h, error); + gpr_mu_unlock(&h->mu); + unref_handshake(h); + return; + } + goto done; } } - if (result != TSI_OK) { - security_handshake_done(exec_ctx, h, - grpc_set_tsi_error_result( - GRPC_ERROR_CREATE("Handshake failed"), result)); + security_handshake_done_locked( + exec_ctx, h, + grpc_set_tsi_error_result(GRPC_ERROR_CREATE("Handshake failed"), + result)); + gpr_mu_unlock(&h->mu); + unref_handshake(h); return; } - /* Handshake is done and successful this point. */ - has_left_overs_in_current_slice = + bool has_left_overs_in_current_slice = (consumed_slice_size < GRPC_SLICE_LENGTH(h->args->read_buffer->slices[i])); - num_left_overs = + size_t num_left_overs = (has_left_overs_in_current_slice ? 1 : 0) + h->args->read_buffer->count - i - 1; if (num_left_overs > 0) { @@ -262,31 +263,49 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, &h->left_overs, &h->args->read_buffer->slices[i + 1], num_left_overs - (size_t)has_left_overs_in_current_slice); } - - check_peer(exec_ctx, h); + // Check peer. + error = check_peer_locked(exec_ctx, h); + if (error != GRPC_ERROR_NONE) { + security_handshake_done_locked(exec_ctx, h, error); + gpr_mu_unlock(&h->mu); + unref_handshake(h); + return; + } +done: + gpr_mu_unlock(&h->mu); } /* If handshake is NULL, the handshake is done. */ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *handshake, grpc_error *error) { security_handshaker *h = handshake; - /* Make sure that write is OK. */ if (error != GRPC_ERROR_NONE) { - if (handshake != NULL) - security_handshake_done( + if (handshake != NULL) { + gpr_mu_lock(&h->mu); + security_handshake_done_locked( exec_ctx, h, GRPC_ERROR_CREATE_REFERENCING("Handshake write failed", &error, 1)); + gpr_mu_unlock(&h->mu); + unref_handshake(h); + } return; } - /* We may be done. */ + gpr_mu_lock(&h->mu); if (tsi_handshaker_is_in_progress(h->handshaker)) { grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, h->args->read_buffer, &h->on_handshake_data_received_from_peer); } else { - check_peer(exec_ctx, h); + error = check_peer_locked(exec_ctx, h); + if (error != GRPC_ERROR_NONE) { + security_handshake_done_locked(exec_ctx, h, error); + gpr_mu_unlock(&h->mu); + unref_handshake(h); + return; + } } + gpr_mu_unlock(&h->mu); } // @@ -302,9 +321,11 @@ static void security_handshaker_destroy(grpc_exec_ctx* exec_ctx, static void security_handshaker_shutdown(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker) { security_handshaker *h = (security_handshaker*)handshaker; + gpr_mu_lock(&h->mu); if (h->args != NULL) { grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); } + gpr_mu_unlock(&h->mu); } static void security_handshaker_do_handshake( @@ -312,11 +333,19 @@ static void security_handshaker_do_handshake( grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, grpc_handshaker_args* args) { security_handshaker* h = (security_handshaker*)handshaker; + gpr_mu_lock(&h->mu); h->args = args; h->on_handshake_done = on_handshake_done; h->wrapped_endpoint = args->endpoint; // FIXME: remove? gpr_ref(&h->refs); - send_handshake_bytes_to_peer(exec_ctx, h); + grpc_error* error = send_handshake_bytes_to_peer_locked(exec_ctx, h); + if (error != GRPC_ERROR_NONE) { + security_handshake_done_locked(exec_ctx, h, error); + gpr_mu_unlock(&h->mu); + unref_handshake(h); + return; + } + gpr_mu_unlock(&h->mu); } static const grpc_handshaker_vtable security_handshaker_vtable = { @@ -331,13 +360,15 @@ static grpc_handshaker* security_handshaker_create( grpc_handshaker_init(&security_handshaker_vtable, &h->base); h->handshaker = handshaker; h->connector = GRPC_SECURITY_CONNECTOR_REF(connector, "handshake"); + gpr_mu_init(&h->mu); + gpr_ref_init(&h->refs, 1); h->handshake_buffer_size = GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE; h->handshake_buffer = gpr_malloc(h->handshake_buffer_size); - gpr_ref_init(&h->refs, 1); grpc_closure_init(&h->on_handshake_data_sent_to_peer, on_handshake_data_sent_to_peer, h); grpc_closure_init(&h->on_handshake_data_received_from_peer, on_handshake_data_received_from_peer, h); + grpc_closure_init(&h->on_peer_checked, on_peer_checked, h); grpc_slice_buffer_init(&h->left_overs); grpc_slice_buffer_init(&h->outgoing); return &h->base; -- cgit v1.2.3 From 95fcb58fc1c3f71e42dd1a7a618d31bf2ae6e43e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 29 Nov 2016 11:29:19 -0800 Subject: Remove redundant fields for endpoints. --- .../lib/security/transport/security_handshaker.c | 27 ++++++++-------------- 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/security/transport/security_handshaker.c b/src/core/lib/security/transport/security_handshaker.c index 1f9a4dae4a..681826a287 100644 --- a/src/core/lib/security/transport/security_handshaker.c +++ b/src/core/lib/security/transport/security_handshaker.c @@ -60,9 +60,6 @@ typedef struct { gpr_refcount refs; unsigned char *handshake_buffer; size_t handshake_buffer_size; -// FIXME: use args->endpoint instead - grpc_endpoint *wrapped_endpoint; - grpc_endpoint *secure_endpoint; grpc_slice_buffer left_overs; grpc_slice_buffer outgoing; grpc_closure on_handshake_data_sent_to_peer; @@ -95,7 +92,6 @@ static void security_handshake_done_locked(grpc_exec_ctx *exec_ctx, security_handshaker *h, grpc_error *error) { if (error == GRPC_ERROR_NONE) { - h->args->endpoint = h->secure_endpoint; grpc_arg auth_context_arg = grpc_auth_context_to_arg(h->auth_context); grpc_channel_args* tmp_args = h->args->args; h->args->args = @@ -105,16 +101,12 @@ static void security_handshake_done_locked(grpc_exec_ctx *exec_ctx, const char *msg = grpc_error_string(error); gpr_log(GPR_DEBUG, "Security handshake failed: %s", msg); grpc_error_free_string(msg); - if (h->secure_endpoint != NULL) { - grpc_endpoint_shutdown(exec_ctx, h->secure_endpoint); + grpc_endpoint_shutdown(exec_ctx, h->args->endpoint); // FIXME: clarify who should destroy... -// grpc_endpoint_destroy(exec_ctx, h->secure_endpoint); -// } else { -// grpc_endpoint_destroy(exec_ctx, h->wrapped_endpoint); - } + //grpc_endpoint_destroy(exec_ctx, h->args->endpoint); } // Clear out the read buffer before it gets passed to the transport, - // since any excess bytes were already moved to h->left_overs. + // since any excess bytes were already copied to h->left_overs. grpc_slice_buffer_reset_and_unref(h->args->read_buffer); h->args = NULL; grpc_exec_ctx_sched(exec_ctx, h->on_handshake_done, error, NULL); @@ -138,8 +130,8 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *arg, GRPC_ERROR_CREATE("Frame protector creation failed"), result); goto done; } - h->secure_endpoint = - grpc_secure_endpoint_create(protector, h->wrapped_endpoint, + h->args->endpoint = + grpc_secure_endpoint_create(protector, h->args->endpoint, h->left_overs.slices, h->left_overs.count); h->left_overs.count = 0; h->left_overs.length = 0; @@ -187,7 +179,7 @@ static grpc_error* send_handshake_bytes_to_peer_locked(grpc_exec_ctx *exec_ctx, grpc_slice_from_copied_buffer((const char *)h->handshake_buffer, offset); grpc_slice_buffer_reset_and_unref(&h->outgoing); grpc_slice_buffer_add(&h->outgoing, to_send); - grpc_endpoint_write(exec_ctx, h->wrapped_endpoint, &h->outgoing, + grpc_endpoint_write(exec_ctx, h->args->endpoint, &h->outgoing, &h->on_handshake_data_sent_to_peer); return GRPC_ERROR_NONE; } @@ -219,7 +211,7 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, if (tsi_handshaker_is_in_progress(h->handshaker)) { /* We may need more data. */ if (result == TSI_INCOMPLETE_DATA) { - grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, h->args->read_buffer, + grpc_endpoint_read(exec_ctx, h->args->endpoint, h->args->read_buffer, &h->on_handshake_data_received_from_peer); goto done; } else { @@ -294,7 +286,7 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, /* We may be done. */ gpr_mu_lock(&h->mu); if (tsi_handshaker_is_in_progress(h->handshaker)) { - grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, h->args->read_buffer, + grpc_endpoint_read(exec_ctx, h->args->endpoint, h->args->read_buffer, &h->on_handshake_data_received_from_peer); } else { error = check_peer_locked(exec_ctx, h); @@ -323,7 +315,7 @@ static void security_handshaker_shutdown(grpc_exec_ctx* exec_ctx, security_handshaker *h = (security_handshaker*)handshaker; gpr_mu_lock(&h->mu); if (h->args != NULL) { - grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); + grpc_endpoint_shutdown(exec_ctx, h->args->endpoint); } gpr_mu_unlock(&h->mu); } @@ -336,7 +328,6 @@ static void security_handshaker_do_handshake( gpr_mu_lock(&h->mu); h->args = args; h->on_handshake_done = on_handshake_done; - h->wrapped_endpoint = args->endpoint; // FIXME: remove? gpr_ref(&h->refs); grpc_error* error = send_handshake_bytes_to_peer_locked(exec_ctx, h); if (error != GRPC_ERROR_NONE) { -- cgit v1.2.3 From 99080d1488ab1d286d2019a15b3f18f0a6e630fb Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Tue, 29 Nov 2016 14:59:57 -0500 Subject: Fix TSAN failure when running DEBUG mode. --- src/core/lib/surface/completion_queue.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 4e0feb56ac..184c1a1a16 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -354,11 +354,13 @@ static void dump_pending_tags(grpc_completion_queue *cc) { gpr_strvec v; gpr_strvec_init(&v); gpr_strvec_add(&v, gpr_strdup("PENDING TAGS:")); + gpr_mu_lock(cc->mu); for (size_t i = 0; i < cc->outstanding_tag_count; i++) { char *s; gpr_asprintf(&s, " %p", cc->outstanding_tags[i]); gpr_strvec_add(&v, s); } + gpr_mu_unlock(cc->mu); char *out = gpr_strvec_flatten(&v, NULL); gpr_strvec_destroy(&v); gpr_log(GPR_DEBUG, "%s", out); -- cgit v1.2.3 From 4cdcd12f755e98709e2b470715aefa1005601a33 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 29 Nov 2016 12:39:54 -0800 Subject: Fix locking bug in HTTP CONNECT handshaker. --- src/core/ext/client_channel/http_connect_handshaker.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 971bbe8944..c9861a5aed 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -86,9 +86,9 @@ static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) { static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { http_connect_handshaker* handshaker = arg; + gpr_mu_lock(&handshaker->mu); if (error != GRPC_ERROR_NONE || handshaker->args == NULL) { // If the write failed, invoke the callback immediately with the error. - gpr_mu_lock(&handshaker->mu); grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, GRPC_ERROR_REF(error), NULL); handshaker->args = NULL; @@ -97,7 +97,6 @@ static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, } else { // Otherwise, read the response. // The read callback inherits our ref to the handshaker. - gpr_mu_lock(&handshaker->mu); grpc_endpoint_read(exec_ctx, handshaker->args->endpoint, handshaker->args->read_buffer, &handshaker->response_read_closure); -- cgit v1.2.3 From 447569490d05f95b8caa79a1e9f35f2ac1f7a2bd Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 29 Nov 2016 12:43:55 -0800 Subject: Eliminate the user_data overloading hack in handshake_manager. --- src/core/lib/channel/handshaker.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 905db118be..3c125a22f3 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -154,7 +154,6 @@ static void call_next_handshaker(grpc_exec_ctx* exec_ctx, void* arg, // on_handshake_done callback. static void call_next_handshaker_locked(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr, - grpc_handshaker_args* args, grpc_error* error) { GPR_ASSERT(mgr->index <= mgr->count); // If we got an error, skip all remaining handshakers and invoke the @@ -165,9 +164,7 @@ static void call_next_handshaker_locked(grpc_exec_ctx* exec_ctx, // Cancel deadline timer, since we're invoking the on_handshake_done // callback now. grpc_timer_cancel(exec_ctx, &mgr->deadline_timer); - args->user_data = mgr->user_data; - grpc_exec_ctx_sched(exec_ctx, &mgr->on_handshake_done, - GRPC_ERROR_REF(error), NULL); + grpc_exec_ctx_sched(exec_ctx, &mgr->on_handshake_done, error, NULL); // Since we're invoking the final callback, we won't be coming back // to this function, so we can release our reference to the // handshake manager. @@ -176,7 +173,8 @@ static void call_next_handshaker_locked(grpc_exec_ctx* exec_ctx, } // Call the next handshaker. grpc_handshaker_do_handshake(exec_ctx, mgr->handshakers[mgr->index], - mgr->acceptor, &mgr->call_next_handshaker, args); + mgr->acceptor, &mgr->call_next_handshaker, + &mgr->args); ++mgr->index; } @@ -184,10 +182,9 @@ static void call_next_handshaker_locked(grpc_exec_ctx* exec_ctx, // handshakers together. static void call_next_handshaker(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { - grpc_handshaker_args* args = arg; - grpc_handshake_manager* mgr = args->user_data; + grpc_handshake_manager* mgr = arg; gpr_mu_lock(&mgr->mu); - call_next_handshaker_locked(exec_ctx, mgr, args, error); + call_next_handshaker_locked(exec_ctx, mgr, GRPC_ERROR_REF(error)); gpr_mu_unlock(&mgr->mu); } @@ -209,21 +206,15 @@ void grpc_handshake_manager_do_handshake( // handshakers and eventually be freed by the on_handshake_done callback. mgr->args.endpoint = endpoint; mgr->args.args = grpc_channel_args_copy(channel_args); + mgr->args.user_data = user_data; mgr->args.read_buffer = gpr_malloc(sizeof(*mgr->args.read_buffer)); grpc_slice_buffer_init(mgr->args.read_buffer); // Initialize state needed for calling handshakers. gpr_mu_lock(&mgr->mu); GPR_ASSERT(mgr->index == 0); mgr->acceptor = acceptor; - grpc_closure_init(&mgr->call_next_handshaker, call_next_handshaker, - &mgr->args); + grpc_closure_init(&mgr->call_next_handshaker, call_next_handshaker, mgr); grpc_closure_init(&mgr->on_handshake_done, on_handshake_done, &mgr->args); - // While chaining between handshakers, we use args->user_data to - // store a pointer to the handshake manager. This will be - // changed to point to the caller-supplied user_data before calling - // the on_handshake_done callback. - mgr->args.user_data = mgr; - mgr->user_data = user_data; // Start deadline timer, which owns a ref. gpr_ref(&mgr->refs); grpc_timer_init(exec_ctx, &mgr->deadline_timer, @@ -231,6 +222,6 @@ void grpc_handshake_manager_do_handshake( on_timeout, mgr, gpr_now(GPR_CLOCK_MONOTONIC)); // Start first handshaker, which also owns a ref. gpr_ref(&mgr->refs); - call_next_handshaker_locked(exec_ctx, mgr, &mgr->args, GRPC_ERROR_NONE); + call_next_handshaker_locked(exec_ctx, mgr, GRPC_ERROR_NONE); gpr_mu_unlock(&mgr->mu); } -- cgit v1.2.3 From cbafdd1084384e9233aa846b7f3e627fdc281910 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 29 Nov 2016 13:54:00 -0800 Subject: Fix races on tcp server shutdown on Windows - we were treating an int as atomic, which is dubious at best - it was possible to shutdown while an accept was being handled, and process that shutdown accept before the real accept finished, leading to a use-after-free up the stack --- src/core/lib/iomgr/tcp_server_windows.c | 77 ++++++++++++++++----------------- 1 file changed, 37 insertions(+), 40 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index ae54c70d2d..cd031a6c02 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -73,6 +73,7 @@ struct grpc_tcp_listener { /* The cached AcceptEx for that port. */ LPFN_ACCEPTEX AcceptEx; int shutting_down; + int outstanding_calls; /* closure for socket notification of accept being ready */ grpc_closure on_accept; /* linked list */ @@ -140,10 +141,8 @@ grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, return GRPC_ERROR_NONE; } -static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { - if (s->shutdown_complete != NULL) { - grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); - } +static void destroy_server(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + grpc_tcp_server *s = arg; /* Now that the accepts have been aborted, we can destroy the sockets. The IOCP won't get notified on these, so we can flag them as already @@ -159,6 +158,14 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { gpr_free(s); } +static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { + if (s->shutdown_complete != NULL) { + grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); + } + + grpc_exec_ctx_sched(exec_ctx, grpc_closure_create(destroy_server, s), GRPC_ERROR_NONE, NULL); +} + grpc_tcp_server *grpc_tcp_server_ref(grpc_tcp_server *s) { gpr_ref_non_zero(&s->refs); return s; @@ -180,17 +187,14 @@ static void tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { /* First, shutdown all fd's. This will queue abortion calls for all of the pending accepts due to the normal operation mechanism. */ if (s->active_ports == 0) { - immediately_done = 1; - } - for (sp = s->head; sp; sp = sp->next) { - sp->shutting_down = 1; - grpc_winsocket_shutdown(sp->socket); + finish_shutdown_locked(exec_ctx, s); + } else { + for (sp = s->head; sp; sp = sp->next) { + sp->shutting_down = 1; + grpc_winsocket_shutdown(sp->socket); + } } gpr_mu_unlock(&s->mu); - - if (immediately_done) { - finish_shutdown(exec_ctx, s); - } } void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { @@ -251,24 +255,19 @@ failure: return error; } -static void decrement_active_ports_and_notify(grpc_exec_ctx *exec_ctx, +static void decrement_active_ports_and_notify_locked(grpc_exec_ctx *exec_ctx, grpc_tcp_listener *sp) { int notify = 0; sp->shutting_down = 0; - gpr_mu_lock(&sp->server->mu); GPR_ASSERT(sp->server->active_ports > 0); if (0 == --sp->server->active_ports) { - notify = 1; - } - gpr_mu_unlock(&sp->server->mu); - if (notify) { - finish_shutdown(exec_ctx, sp->server); + finish_shutdown_locked(exec_ctx, sp->server); } } /* In order to do an async accept, we need to create a socket first which will be the one assigned to the new incoming connection. */ -static grpc_error *start_accept(grpc_exec_ctx *exec_ctx, +static grpc_error *start_accept_locked(grpc_exec_ctx *exec_ctx, grpc_tcp_listener *port) { SOCKET sock = INVALID_SOCKET; BOOL success; @@ -276,6 +275,10 @@ static grpc_error *start_accept(grpc_exec_ctx *exec_ctx, DWORD bytes_received = 0; grpc_error *error = GRPC_ERROR_NONE; + if (port->shutting_down) { + return GRPC_ERROR_NONE; + } + sock = WSASocket(AF_INET6, SOCK_STREAM, IPPROTO_TCP, NULL, 0, WSA_FLAG_OVERLAPPED); if (sock == INVALID_SOCKET) { @@ -305,20 +308,11 @@ static grpc_error *start_accept(grpc_exec_ctx *exec_ctx, immediately process an accept that happened in the meantime. */ port->new_socket = sock; grpc_socket_notify_on_read(exec_ctx, port->socket, &port->on_accept); + port->outstanding_calls++; return error; failure: GPR_ASSERT(error != GRPC_ERROR_NONE); - if (port->shutting_down) { - /* We are abandoning the listener port, take that into account to prevent - occasional hangs on shutdown. The hang happens when sp->shutting_down - change is not seen by on_accept and we proceed to trying new accept, - but we fail there because the listening port has been closed in the - meantime. */ - decrement_active_ports_and_notify(exec_ctx, port); - GRPC_ERROR_UNREF(error); - return GRPC_ERROR_NONE; - } if (sock != INVALID_SOCKET) closesocket(sock); return error; } @@ -338,6 +332,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { BOOL wsa_success; int err; + gpr_mu_lock(&sp->server->mu); + peer_name.len = sizeof(struct sockaddr_storage); /* The general mechanism for shutting down is to queue abortion calls. While @@ -347,6 +343,7 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { const char *msg = grpc_error_string(error); gpr_log(GPR_INFO, "Skipping on_accept due to error: %s", msg); grpc_error_free_string(msg); + gpr_mu_unlock(&sp->server->mu); return; } @@ -356,17 +353,12 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { wsa_success = WSAGetOverlappedResult(sock, &info->overlapped, &transfered_bytes, FALSE, &flags); if (!wsa_success) { - if (sp->shutting_down) { - /* During the shutdown case, we ARE expecting an error. So that's well, - and we can wake up the shutdown thread. */ - decrement_active_ports_and_notify(exec_ctx, sp); - return; - } else { + if (!sp->shutting_down) { char *utf8_message = gpr_format_message(WSAGetLastError()); gpr_log(GPR_ERROR, "on_accept error: %s", utf8_message); gpr_free(utf8_message); - closesocket(sock); } + closesocket(sock); } else { if (!sp->shutting_down) { peer_name_string = NULL; @@ -408,7 +400,11 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { the former socked we created has now either been destroy or assigned to the new connection. We need to create a new one for the next connection. */ - GPR_ASSERT(GRPC_LOG_IF_ERROR("start_accept", start_accept(exec_ctx, sp))); + GPR_ASSERT(GRPC_LOG_IF_ERROR("start_accept", start_accept_locked(exec_ctx, sp))); + if (0 == --sp->outstanding_calls) { + decrement_active_ports_and_notify_locked(exec_ctx, sp); + } + gpr_mu_unlock(&sp->server->mu); } static grpc_error *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, @@ -456,6 +452,7 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, sp->server = s; sp->socket = grpc_winsocket_create(sock, "listener"); sp->shutting_down = 0; + sp->outstanding_calls = 0; sp->AcceptEx = AcceptEx; sp->new_socket = INVALID_SOCKET; sp->port = port; @@ -553,7 +550,7 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, s->on_accept_cb = on_accept_cb; s->on_accept_cb_arg = on_accept_cb_arg; for (sp = s->head; sp; sp = sp->next) { - GPR_ASSERT(GRPC_LOG_IF_ERROR("start_accept", start_accept(exec_ctx, sp))); + GPR_ASSERT(GRPC_LOG_IF_ERROR("start_accept", start_accept_locked(exec_ctx, sp))); s->active_ports++; } gpr_mu_unlock(&s->mu); -- cgit v1.2.3 From fdc17aab96b4a8a4651e7d3042051baa29860dba Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 29 Nov 2016 13:54:19 -0800 Subject: clang-format --- src/core/lib/iomgr/tcp_server_windows.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index cd031a6c02..b8a391c059 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -141,7 +141,8 @@ grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, return GRPC_ERROR_NONE; } -static void destroy_server(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { +static void destroy_server(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { grpc_tcp_server *s = arg; /* Now that the accepts have been aborted, we can destroy the sockets. @@ -158,12 +159,14 @@ static void destroy_server(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error gpr_free(s); } -static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { +static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, + grpc_tcp_server *s) { if (s->shutdown_complete != NULL) { grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); } - grpc_exec_ctx_sched(exec_ctx, grpc_closure_create(destroy_server, s), GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, grpc_closure_create(destroy_server, s), + GRPC_ERROR_NONE, NULL); } grpc_tcp_server *grpc_tcp_server_ref(grpc_tcp_server *s) { @@ -256,7 +259,7 @@ failure: } static void decrement_active_ports_and_notify_locked(grpc_exec_ctx *exec_ctx, - grpc_tcp_listener *sp) { + grpc_tcp_listener *sp) { int notify = 0; sp->shutting_down = 0; GPR_ASSERT(sp->server->active_ports > 0); @@ -268,7 +271,7 @@ static void decrement_active_ports_and_notify_locked(grpc_exec_ctx *exec_ctx, /* In order to do an async accept, we need to create a socket first which will be the one assigned to the new incoming connection. */ static grpc_error *start_accept_locked(grpc_exec_ctx *exec_ctx, - grpc_tcp_listener *port) { + grpc_tcp_listener *port) { SOCKET sock = INVALID_SOCKET; BOOL success; DWORD addrlen = sizeof(struct sockaddr_in6) + 16; @@ -400,7 +403,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { the former socked we created has now either been destroy or assigned to the new connection. We need to create a new one for the next connection. */ - GPR_ASSERT(GRPC_LOG_IF_ERROR("start_accept", start_accept_locked(exec_ctx, sp))); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("start_accept", start_accept_locked(exec_ctx, sp))); if (0 == --sp->outstanding_calls) { decrement_active_ports_and_notify_locked(exec_ctx, sp); } @@ -550,7 +554,8 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, s->on_accept_cb = on_accept_cb; s->on_accept_cb_arg = on_accept_cb_arg; for (sp = s->head; sp; sp = sp->next) { - GPR_ASSERT(GRPC_LOG_IF_ERROR("start_accept", start_accept_locked(exec_ctx, sp))); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("start_accept", start_accept_locked(exec_ctx, sp))); s->active_ports++; } gpr_mu_unlock(&s->mu); -- cgit v1.2.3 From 30f698f1bcb8956d49b093391997b8d01dc2524f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 29 Nov 2016 14:02:32 -0800 Subject: Make handshaker responsible for destroying endpoint on shutdown or failure. --- .../ext/client_channel/http_connect_handshaker.c | 81 +++++++++++++++++----- .../chttp2/client/insecure/channel_create.c | 6 +- .../chttp2/client/secure/secure_channel_create.c | 2 - .../chttp2/server/insecure/server_chttp2.c | 4 +- .../chttp2/server/secure/server_secure_chttp2.c | 3 - src/core/lib/channel/handshaker.c | 17 ++--- src/core/lib/channel/handshaker.h | 21 ++++-- 7 files changed, 87 insertions(+), 47 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index c9861a5aed..48990f9dac 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -41,6 +41,7 @@ #include #include "src/core/ext/client_channel/uri_parser.h" +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/http/format_request.h" #include "src/core/lib/http/parser.h" #include "src/core/lib/support/env.h" @@ -55,9 +56,12 @@ typedef struct http_connect_handshaker { gpr_refcount refcount; gpr_mu mu; + bool shutdown; + // Endpoint and read buffer to destroy after a shutdown. + grpc_endpoint* endpoint_to_destroy; + grpc_slice_buffer* read_buffer_to_destroy; + // State saved while performing the handshake. - // args will be NULL when either there is no handshake in progress or - // when the handshaker is shutting down. grpc_handshaker_args* args; grpc_closure* on_handshake_done; @@ -70,9 +74,17 @@ typedef struct http_connect_handshaker { } http_connect_handshaker; // Unref and clean up handshaker. -static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) { +static void http_connect_handshaker_unref(grpc_exec_ctx* exec_ctx, + http_connect_handshaker* handshaker) { if (gpr_unref(&handshaker->refcount)) { gpr_mu_destroy(&handshaker->mu); + if (handshaker->endpoint_to_destroy != NULL) { + grpc_endpoint_destroy(exec_ctx, handshaker->endpoint_to_destroy); + } + if (handshaker->read_buffer_to_destroy != NULL) { + grpc_slice_buffer_destroy(handshaker->read_buffer_to_destroy); + gpr_free(handshaker->read_buffer_to_destroy); + } gpr_free(handshaker->proxy_server); gpr_free(handshaker->server_name); grpc_slice_buffer_destroy(&handshaker->write_buffer); @@ -82,18 +94,42 @@ static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) { } } +// Set args fields to NULL, saving the endpoint and read buffer for +// later destruction. +static void cleanup_args_for_failure_locked( + http_connect_handshaker* handshaker) { + handshaker->endpoint_to_destroy = handshaker->args->endpoint; + handshaker->args->endpoint = NULL; + handshaker->read_buffer_to_destroy = handshaker->args->read_buffer; + handshaker->args->read_buffer = NULL; + grpc_channel_args_destroy(handshaker->args->args); + handshaker->args->args = NULL; +} + // Callback invoked when finished writing HTTP CONNECT request. static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { http_connect_handshaker* handshaker = arg; gpr_mu_lock(&handshaker->mu); - if (error != GRPC_ERROR_NONE || handshaker->args == NULL) { - // If the write failed, invoke the callback immediately with the error. - grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, - GRPC_ERROR_REF(error), NULL); - handshaker->args = NULL; + if (error != GRPC_ERROR_NONE || handshaker->shutdown) { + // If the write failed or we're shutting down, clean up and invoke the + // callback with the error. + if (error == GRPC_ERROR_NONE) { + // If we were shut down after the write succeeded but before this + // callback was invoked, we need to generate our own error. + error = GRPC_ERROR_CREATE("Handshaker shutdown"); + } else { + GRPC_ERROR_REF(error); // Take ref for the handshake-done callback. + } + if (!handshaker->shutdown) { + // Not shutting down, so the write failed. Clean up before + // invoking the callback. + cleanup_args_for_failure_locked(handshaker); + } + // Invoke callback. + grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, error, NULL); gpr_mu_unlock(&handshaker->mu); - http_connect_handshaker_unref(handshaker); + http_connect_handshaker_unref(exec_ctx, handshaker); } else { // Otherwise, read the response. // The read callback inherits our ref to the handshaker. @@ -109,8 +145,21 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { http_connect_handshaker* handshaker = arg; gpr_mu_lock(&handshaker->mu); - if (error != GRPC_ERROR_NONE || handshaker->args == NULL) { - GRPC_ERROR_REF(error); // Take ref to pass to the handshake-done callback. + if (error != GRPC_ERROR_NONE || handshaker->shutdown) { + // If the write failed or we're shutting down, clean up and invoke the + // callback with the error. + if (error == GRPC_ERROR_NONE) { + // If we were shut down after the write succeeded but before this + // callback was invoked, we need to generate our own error. + error = GRPC_ERROR_CREATE("Handshaker shutdown"); + } else { + GRPC_ERROR_REF(error); // Take ref for the handshake-done callback. + } + if (!handshaker->shutdown) { + // Not shutting down, so the write failed. Clean up before + // invoking the callback. + cleanup_args_for_failure_locked(handshaker); + } goto done; } // Add buffer to parser. @@ -172,10 +221,9 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, } done: // Invoke handshake-done callback. - handshaker->args = NULL; grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, error, NULL); gpr_mu_unlock(&handshaker->mu); - http_connect_handshaker_unref(handshaker); + http_connect_handshaker_unref(exec_ctx, handshaker); } // @@ -185,16 +233,17 @@ done: static void http_connect_handshaker_destroy(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker_in) { http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; - http_connect_handshaker_unref(handshaker); + http_connect_handshaker_unref(exec_ctx, handshaker); } static void http_connect_handshaker_shutdown(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker_in) { http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; gpr_mu_lock(&handshaker->mu); - if (handshaker->args != NULL) { + if (!handshaker->shutdown) { + handshaker->shutdown = true; grpc_endpoint_shutdown(exec_ctx, handshaker->args->endpoint); - handshaker->args = NULL; + cleanup_args_for_failure_locked(handshaker); } gpr_mu_unlock(&handshaker->mu); } diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index e0bce57fc2..00b272de27 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -96,11 +96,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_handshaker_args *args = arg; connector *c = args->user_data; - if (error != GRPC_ERROR_NONE) { - grpc_endpoint_destroy(exec_ctx, args->endpoint); - grpc_channel_args_destroy(args->args); - gpr_free(args->read_buffer); - } else { + if (error == GRPC_ERROR_NONE) { c->result->transport = grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 1); GPR_ASSERT(c->result->transport); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 4182aa730f..b4a30f94fc 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -135,8 +135,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, connector *c = args->user_data; c->tmp_args = args->args; if (error != GRPC_ERROR_NONE) { - grpc_endpoint_destroy(exec_ctx, args->endpoint); - gpr_free(args->read_buffer); grpc_closure *notify = c->notify; c->notify = NULL; grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index 5a9d4f8928..1b38d4decd 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -62,8 +62,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); - grpc_endpoint_destroy(exec_ctx, args->endpoint); - gpr_free(args->read_buffer); } else { // Beware that the call to grpc_create_chttp2_transport() has to happen // before grpc_tcp_server_destroy(). This is fine here, but similar code @@ -76,9 +74,9 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, state->accepting_pollset, grpc_server_get_channel_args(state->server)); grpc_chttp2_transport_start_reading(exec_ctx, transport, args->read_buffer); + grpc_channel_args_destroy(args->args); } // Clean up. - grpc_channel_args_destroy(args->args); grpc_handshake_manager_destroy(exec_ctx, state->handshake_mgr); gpr_free(state); } diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 1d1973be8b..22af94199f 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -123,9 +123,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); - grpc_endpoint_destroy(exec_ctx, args->endpoint); - grpc_channel_args_destroy(args->args); - gpr_free(args->read_buffer); grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp); gpr_free(connection_state); diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 3c125a22f3..f3bd91284e 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -141,25 +141,20 @@ void grpc_handshake_manager_destroy(grpc_exec_ctx* exec_ctx, void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr) { gpr_mu_lock(&mgr->mu); - for (size_t i = 0; i < mgr->count; ++i) { - grpc_handshaker_shutdown(exec_ctx, mgr->handshakers[i]); + if (mgr->index > 0) { + grpc_handshaker_shutdown(exec_ctx, mgr->handshakers[mgr->index - 1]); } gpr_mu_unlock(&mgr->mu); } -static void call_next_handshaker(grpc_exec_ctx* exec_ctx, void* arg, - grpc_error* error); - // Helper function to call either the next handshaker or the // on_handshake_done callback. static void call_next_handshaker_locked(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr, grpc_error* error) { GPR_ASSERT(mgr->index <= mgr->count); - // If we got an error, skip all remaining handshakers and invoke the - // caller-supplied callback immediately. - // Otherwise, if this is the last handshaker, then call the on_handshake_done - // callback instead of chaining back to this function again. + // If we got an error or we've finished the last handshaker, invoke + // the on_handshake_done callback. Otherwise, call the next handshaker. if (error != GRPC_ERROR_NONE || mgr->index == mgr->count) { // Cancel deadline timer, since we're invoking the on_handshake_done // callback now. @@ -202,6 +197,8 @@ void grpc_handshake_manager_do_handshake( grpc_endpoint* endpoint, const grpc_channel_args* channel_args, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_iomgr_cb_func on_handshake_done, void* user_data) { + gpr_mu_lock(&mgr->mu); + GPR_ASSERT(mgr->index == 0); // Construct handshaker args. These will be passed through all // handshakers and eventually be freed by the on_handshake_done callback. mgr->args.endpoint = endpoint; @@ -210,8 +207,6 @@ void grpc_handshake_manager_do_handshake( mgr->args.read_buffer = gpr_malloc(sizeof(*mgr->args.read_buffer)); grpc_slice_buffer_init(mgr->args.read_buffer); // Initialize state needed for calling handshakers. - gpr_mu_lock(&mgr->mu); - GPR_ASSERT(mgr->index == 0); mgr->acceptor = acceptor; grpc_closure_init(&mgr->call_next_handshaker, call_next_handshaker, mgr); grpc_closure_init(&mgr->on_handshake_done, on_handshake_done, &mgr->args); diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index f0614c354b..2e1f543512 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -57,17 +57,24 @@ typedef struct grpc_handshaker grpc_handshaker; /// Arguments passed through handshakers and to the on_handshake_done callback. /// /// For handshakers, all members are input/output parameters; for -/// example, a handshaker may read from \a endpoint and then later -/// replace it with a wrapped endpoint. Similarly, a handshaker may -/// modify \a args. +/// example, a handshaker may read from or write to \a endpoint and +/// then later replace it with a wrapped endpoint. Similarly, a +/// handshaker may modify \a args. +/// +/// A handshaker takes ownership of the members while a handshake is in +/// progress. Upon failure or shutdown of an in-progress handshaker, +/// the handshaker is responsible for destroying the members and setting +/// them to NULL before invoking the on_handshake_done callback. /// /// For the on_handshake_done callback, all members are input arguments, /// which the callback takes ownership of. typedef struct { grpc_endpoint* endpoint; grpc_channel_args* args; - void* user_data; grpc_slice_buffer* read_buffer; + // User data passed through the handshake manager. Not used by + // individual handshakers. + void* user_data; } grpc_handshaker_args; typedef struct { @@ -132,9 +139,9 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, /// /// When done, invokes \a on_handshake_done with a grpc_handshaker_args /// object as its argument. If the callback is invoked with error != -/// GRPC_ERROR_NONE, then handshaking failed and the resulting endpoint -/// will have already been shut down (although the caller will still be -/// responsible for destroying it). +/// GRPC_ERROR_NONE, then handshaking failed and the handshaker has done +/// the necessary clean-up. Otherwise, the callback takes ownership of +/// the arguments. void grpc_handshake_manager_do_handshake( grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr, grpc_endpoint* endpoint, const grpc_channel_args* channel_args, -- cgit v1.2.3 From 0610434185cd528b72e5be936075cae4c4a07a8e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 29 Nov 2016 14:06:45 -0800 Subject: Always shut down endpoints before destroying them. --- src/core/ext/client_channel/http_connect_handshaker.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core') diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 48990f9dac..61fec5cba9 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -122,6 +122,11 @@ static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, GRPC_ERROR_REF(error); // Take ref for the handshake-done callback. } if (!handshaker->shutdown) { + // TODO(ctiller): It is currently necessary to shutdown endpoints + // before destroying them, even if we know that there are no + // pending read/write callbacks. This should be fixed, at which + // point this can be removed. + grpc_endpoint_shutdown(exec_ctx, handshaker->args->endpoint); // Not shutting down, so the write failed. Clean up before // invoking the callback. cleanup_args_for_failure_locked(handshaker); @@ -156,6 +161,11 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, GRPC_ERROR_REF(error); // Take ref for the handshake-done callback. } if (!handshaker->shutdown) { + // TODO(ctiller): It is currently necessary to shutdown endpoints + // before destroying them, even if we know that there are no + // pending read/write callbacks. This should be fixed, at which + // point this can be removed. + grpc_endpoint_shutdown(exec_ctx, handshaker->args->endpoint); // Not shutting down, so the write failed. Clean up before // invoking the callback. cleanup_args_for_failure_locked(handshaker); -- cgit v1.2.3 From d112ed94daf5a0f656f7d0d34f7c76d06a60e195 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 30 Nov 2016 09:16:07 -0800 Subject: Further safety fixes for TCP on Windows --- src/core/lib/iomgr/socket_windows.c | 8 ++++++++ src/core/lib/iomgr/socket_windows.h | 1 + src/core/lib/iomgr/tcp_client_windows.c | 24 ++++++++++++++---------- 3 files changed, 23 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/socket_windows.c b/src/core/lib/iomgr/socket_windows.c index 35f23300dc..54911e0e31 100644 --- a/src/core/lib/iomgr/socket_windows.c +++ b/src/core/lib/iomgr/socket_windows.c @@ -76,6 +76,14 @@ void grpc_winsocket_shutdown(grpc_winsocket *winsocket) { LPFN_DISCONNECTEX DisconnectEx; DWORD ioctl_num_bytes; + gpr_mu_lock(&winsocket->state_mu); + if (winsocket->shutdown_called) { + gpr_mu_unlock(&winsocket->state_mu); + return; + } + winsocket->shutdown_called = true; + gpr_mu_unlock(&winsocket->state_mu); + status = WSAIoctl(winsocket->socket, SIO_GET_EXTENSION_FUNCTION_POINTER, &guid, sizeof(guid), &DisconnectEx, sizeof(DisconnectEx), &ioctl_num_bytes, NULL, NULL); diff --git a/src/core/lib/iomgr/socket_windows.h b/src/core/lib/iomgr/socket_windows.h index 490d0e0a06..a3875ce16c 100644 --- a/src/core/lib/iomgr/socket_windows.h +++ b/src/core/lib/iomgr/socket_windows.h @@ -87,6 +87,7 @@ typedef struct grpc_winsocket { grpc_winsocket_callback_info read_info; gpr_mu state_mu; + bool shutdown_called; /* You can't add the same socket twice to the same IO Completion Port. This prevents that. */ diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 4d1e809872..14bd9447cb 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -107,18 +107,22 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { gpr_mu_lock(&ac->mu); - if (error == GRPC_ERROR_NONE && socket != NULL) { - DWORD transfered_bytes = 0; - DWORD flags; - BOOL wsa_success = + if (error == GRPC_ERROR_NONE) { + if (socket != NULL) { + DWORD transfered_bytes = 0; + DWORD flags; + BOOL wsa_success = WSAGetOverlappedResult(socket->socket, &socket->write_info.overlapped, - &transfered_bytes, FALSE, &flags); - GPR_ASSERT(transfered_bytes == 0); - if (!wsa_success) { - error = GRPC_WSA_ERROR(WSAGetLastError(), "ConnectEx"); + &transfered_bytes, FALSE, &flags); + GPR_ASSERT(transfered_bytes == 0); + if (!wsa_success) { + error = GRPC_WSA_ERROR(WSAGetLastError(), "ConnectEx"); + } else { + *ep = grpc_tcp_create(socket, ac->resource_quota, ac->addr_name); + socket = NULL; + } } else { - *ep = grpc_tcp_create(socket, ac->resource_quota, ac->addr_name); - socket = NULL; + error = GRPC_ERROR_CREATE("socket is null"); } } -- cgit v1.2.3 From e06836130015bccc7d1ae8afd1fad403318503b0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 30 Nov 2016 09:16:02 -0800 Subject: clang-format --- src/core/lib/iomgr/tcp_client_windows.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 14bd9447cb..1127588ebc 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -112,8 +112,8 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { DWORD transfered_bytes = 0; DWORD flags; BOOL wsa_success = - WSAGetOverlappedResult(socket->socket, &socket->write_info.overlapped, - &transfered_bytes, FALSE, &flags); + WSAGetOverlappedResult(socket->socket, &socket->write_info.overlapped, + &transfered_bytes, FALSE, &flags); GPR_ASSERT(transfered_bytes == 0); if (!wsa_success) { error = GRPC_WSA_ERROR(WSAGetLastError(), "ConnectEx"); -- cgit v1.2.3 From a9bd94335cd20ab918daf74c4e8881d56670633e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 30 Nov 2016 09:38:55 -0800 Subject: Fix unref-while-lock-held bug. Only shut down handshaker if in progress. --- src/core/lib/channel/handshaker.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index f3bd91284e..927723499a 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -141,7 +141,8 @@ void grpc_handshake_manager_destroy(grpc_exec_ctx* exec_ctx, void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr) { gpr_mu_lock(&mgr->mu); - if (mgr->index > 0) { + // Shutdown the handshaker that's currently in progress, if any. + if (mgr->index > 0 && mgr->index <= mgr->count) { grpc_handshaker_shutdown(exec_ctx, mgr->handshakers[mgr->index - 1]); } gpr_mu_unlock(&mgr->mu); @@ -149,28 +150,27 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, // Helper function to call either the next handshaker or the // on_handshake_done callback. -static void call_next_handshaker_locked(grpc_exec_ctx* exec_ctx, +// Returns true if we've scheduled the on_handshake_done callback. +static bool call_next_handshaker_locked(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr, grpc_error* error) { GPR_ASSERT(mgr->index <= mgr->count); // If we got an error or we've finished the last handshaker, invoke // the on_handshake_done callback. Otherwise, call the next handshaker. + bool done = false; if (error != GRPC_ERROR_NONE || mgr->index == mgr->count) { // Cancel deadline timer, since we're invoking the on_handshake_done // callback now. grpc_timer_cancel(exec_ctx, &mgr->deadline_timer); grpc_exec_ctx_sched(exec_ctx, &mgr->on_handshake_done, error, NULL); - // Since we're invoking the final callback, we won't be coming back - // to this function, so we can release our reference to the - // handshake manager. - grpc_handshake_manager_unref(exec_ctx, mgr); - return; + done = true; + } else { + grpc_handshaker_do_handshake(exec_ctx, mgr->handshakers[mgr->index], + mgr->acceptor, &mgr->call_next_handshaker, + &mgr->args); } - // Call the next handshaker. - grpc_handshaker_do_handshake(exec_ctx, mgr->handshakers[mgr->index], - mgr->acceptor, &mgr->call_next_handshaker, - &mgr->args); ++mgr->index; + return done; } // A function used as the handshaker-done callback when chaining @@ -179,8 +179,14 @@ static void call_next_handshaker(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { grpc_handshake_manager* mgr = arg; gpr_mu_lock(&mgr->mu); - call_next_handshaker_locked(exec_ctx, mgr, GRPC_ERROR_REF(error)); + bool done = call_next_handshaker_locked(exec_ctx, mgr, GRPC_ERROR_REF(error)); gpr_mu_unlock(&mgr->mu); + // If we're invoked the final callback, we won't be coming back + // to this function, so we can release our reference to the + // handshake manager. + if (done) { + grpc_handshake_manager_unref(exec_ctx, mgr); + } } // Callback invoked when deadline is exceeded. @@ -217,6 +223,9 @@ void grpc_handshake_manager_do_handshake( on_timeout, mgr, gpr_now(GPR_CLOCK_MONOTONIC)); // Start first handshaker, which also owns a ref. gpr_ref(&mgr->refs); - call_next_handshaker_locked(exec_ctx, mgr, GRPC_ERROR_NONE); + bool done = call_next_handshaker_locked(exec_ctx, mgr, GRPC_ERROR_NONE); gpr_mu_unlock(&mgr->mu); + if (done) { + grpc_handshake_manager_unref(exec_ctx, mgr); + } } -- cgit v1.2.3 From c584d995d87038368959ed88f7e4acd875de09ce Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 30 Nov 2016 09:45:32 -0800 Subject: Eliminate some code duplication. --- .../ext/client_channel/http_connect_handshaker.c | 76 ++++++++++------------ 1 file changed, 36 insertions(+), 40 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 61fec5cba9..6a34e390bc 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -106,6 +106,31 @@ static void cleanup_args_for_failure_locked( handshaker->args->args = NULL; } +// If the handshake failed or we're shutting down, clean up and invoke the +// callback with the error. +static void handshake_failed_locked(grpc_exec_ctx* exec_ctx, + http_connect_handshaker* handshaker, + grpc_error* error) { + if (error == GRPC_ERROR_NONE) { + // If we were shut down after an endpoint operation succeeded but + // before the endpoint callback was invoked, we need to generate our + // own error. + error = GRPC_ERROR_CREATE("Handshaker shutdown"); + } + if (!handshaker->shutdown) { + // TODO(ctiller): It is currently necessary to shutdown endpoints + // before destroying them, even if we know that there are no + // pending read/write callbacks. This should be fixed, at which + // point this can be removed. + grpc_endpoint_shutdown(exec_ctx, handshaker->args->endpoint); + // Not shutting down, so the handshake failed. Clean up before + // invoking the callback. + cleanup_args_for_failure_locked(handshaker); + } + // Invoke callback. + grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, error, NULL); +} + // Callback invoked when finished writing HTTP CONNECT request. static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { @@ -114,25 +139,7 @@ static void on_write_done(grpc_exec_ctx* exec_ctx, void* arg, if (error != GRPC_ERROR_NONE || handshaker->shutdown) { // If the write failed or we're shutting down, clean up and invoke the // callback with the error. - if (error == GRPC_ERROR_NONE) { - // If we were shut down after the write succeeded but before this - // callback was invoked, we need to generate our own error. - error = GRPC_ERROR_CREATE("Handshaker shutdown"); - } else { - GRPC_ERROR_REF(error); // Take ref for the handshake-done callback. - } - if (!handshaker->shutdown) { - // TODO(ctiller): It is currently necessary to shutdown endpoints - // before destroying them, even if we know that there are no - // pending read/write callbacks. This should be fixed, at which - // point this can be removed. - grpc_endpoint_shutdown(exec_ctx, handshaker->args->endpoint); - // Not shutting down, so the write failed. Clean up before - // invoking the callback. - cleanup_args_for_failure_locked(handshaker); - } - // Invoke callback. - grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, error, NULL); + handshake_failed_locked(exec_ctx, handshaker, GRPC_ERROR_REF(error)); gpr_mu_unlock(&handshaker->mu); http_connect_handshaker_unref(exec_ctx, handshaker); } else { @@ -151,25 +158,9 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, http_connect_handshaker* handshaker = arg; gpr_mu_lock(&handshaker->mu); if (error != GRPC_ERROR_NONE || handshaker->shutdown) { - // If the write failed or we're shutting down, clean up and invoke the + // If the read failed or we're shutting down, clean up and invoke the // callback with the error. - if (error == GRPC_ERROR_NONE) { - // If we were shut down after the write succeeded but before this - // callback was invoked, we need to generate our own error. - error = GRPC_ERROR_CREATE("Handshaker shutdown"); - } else { - GRPC_ERROR_REF(error); // Take ref for the handshake-done callback. - } - if (!handshaker->shutdown) { - // TODO(ctiller): It is currently necessary to shutdown endpoints - // before destroying them, even if we know that there are no - // pending read/write callbacks. This should be fixed, at which - // point this can be removed. - grpc_endpoint_shutdown(exec_ctx, handshaker->args->endpoint); - // Not shutting down, so the write failed. Clean up before - // invoking the callback. - cleanup_args_for_failure_locked(handshaker); - } + handshake_failed_locked(exec_ctx, handshaker, GRPC_ERROR_REF(error)); goto done; } // Add buffer to parser. @@ -179,7 +170,10 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, error = grpc_http_parser_parse(&handshaker->http_parser, handshaker->args->read_buffer->slices[i], &body_start_offset); - if (error != GRPC_ERROR_NONE) goto done; + if (error != GRPC_ERROR_NONE) { + handshake_failed_locked(exec_ctx, handshaker, error); + goto done; + } if (handshaker->http_parser.state == GRPC_HTTP_BODY) { // Remove the data we've already read from the read buffer, // leaving only the leftover bytes (if any). @@ -228,10 +222,12 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, handshaker->http_response.status); error = GRPC_ERROR_CREATE(msg); gpr_free(msg); + handshake_failed_locked(exec_ctx, handshaker, error); + goto done; } -done: - // Invoke handshake-done callback. + // Success. Invoke handshake-done callback. grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, error, NULL); +done: gpr_mu_unlock(&handshaker->mu); http_connect_handshaker_unref(exec_ctx, handshaker); } -- cgit v1.2.3 From b8f97a4ac02536bcb88867061b9dad6c35818f2a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 30 Nov 2016 11:05:27 -0800 Subject: Allow handshaking to be retried. --- src/core/lib/channel/handshaker.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 927723499a..992cd420de 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -142,7 +142,7 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr) { gpr_mu_lock(&mgr->mu); // Shutdown the handshaker that's currently in progress, if any. - if (mgr->index > 0 && mgr->index <= mgr->count) { + if (mgr->index > 0) { grpc_handshaker_shutdown(exec_ctx, mgr->handshakers[mgr->index - 1]); } gpr_mu_unlock(&mgr->mu); @@ -157,20 +157,21 @@ static bool call_next_handshaker_locked(grpc_exec_ctx* exec_ctx, GPR_ASSERT(mgr->index <= mgr->count); // If we got an error or we've finished the last handshaker, invoke // the on_handshake_done callback. Otherwise, call the next handshaker. - bool done = false; if (error != GRPC_ERROR_NONE || mgr->index == mgr->count) { // Cancel deadline timer, since we're invoking the on_handshake_done // callback now. grpc_timer_cancel(exec_ctx, &mgr->deadline_timer); grpc_exec_ctx_sched(exec_ctx, &mgr->on_handshake_done, error, NULL); - done = true; - } else { - grpc_handshaker_do_handshake(exec_ctx, mgr->handshakers[mgr->index], - mgr->acceptor, &mgr->call_next_handshaker, - &mgr->args); + // Reset index to 0 so that we can start over if we re-attempt the + // connection. + mgr->index = 0; + return true; } + grpc_handshaker_do_handshake(exec_ctx, mgr->handshakers[mgr->index], + mgr->acceptor, &mgr->call_next_handshaker, + &mgr->args); ++mgr->index; - return done; + return false; } // A function used as the handshaker-done callback when chaining -- cgit v1.2.3 From 75d0c420f298384ce23ab025b2ab67860512b51d Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 30 Nov 2016 11:40:57 -0800 Subject: Fix shutdown semantics for security handshaker. --- .../lib/security/transport/security_handshaker.c | 174 ++++++++++++--------- 1 file changed, 103 insertions(+), 71 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/security/transport/security_handshaker.c b/src/core/lib/security/transport/security_handshaker.c index 681826a287..964a692ae7 100644 --- a/src/core/lib/security/transport/security_handshaker.c +++ b/src/core/lib/security/transport/security_handshaker.c @@ -50,14 +50,23 @@ typedef struct { grpc_handshaker base; - // args will be NULL when either there is no handshake in progress or - // when the handshaker is shutting down. - grpc_handshaker_args* args; - grpc_closure* on_handshake_done; - grpc_security_connector *connector; + + // State set at creation time. tsi_handshaker *handshaker; + grpc_security_connector *connector; + gpr_mu mu; gpr_refcount refs; + + bool shutdown; + // Endpoint and read buffer to destroy after a shutdown. + grpc_endpoint *endpoint_to_destroy; + grpc_slice_buffer *read_buffer_to_destroy; + + // State saved while performing the handshake. + grpc_handshaker_args* args; + grpc_closure* on_handshake_done; + unsigned char *handshake_buffer; size_t handshake_buffer_size; grpc_slice_buffer left_overs; @@ -68,18 +77,19 @@ typedef struct { grpc_auth_context *auth_context; } security_handshaker; -static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, - void *setup, - grpc_error *error); - -static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *setup, - grpc_error *error); - -static void unref_handshake(security_handshaker *h) { +static void security_handshaker_unref(grpc_exec_ctx *exec_ctx, + security_handshaker *h) { if (gpr_unref(&h->refs)) { - if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker); gpr_mu_destroy(&h->mu); + if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker); if (h->handshake_buffer != NULL) gpr_free(h->handshake_buffer); + if (h->endpoint_to_destroy != NULL) { + grpc_endpoint_destroy(exec_ctx, h->endpoint_to_destroy); + } + if (h->read_buffer_to_destroy != NULL) { + grpc_slice_buffer_destroy(h->read_buffer_to_destroy); + gpr_free(h->read_buffer_to_destroy); + } grpc_slice_buffer_destroy(&h->left_overs); grpc_slice_buffer_destroy(&h->outgoing); GRPC_AUTH_CONTEXT_UNREF(h->auth_context, "handshake"); @@ -88,27 +98,41 @@ static void unref_handshake(security_handshaker *h) { } } -static void security_handshake_done_locked(grpc_exec_ctx *exec_ctx, - security_handshaker *h, - grpc_error *error) { +// Set args fields to NULL, saving the endpoint and read buffer for +// later destruction. +static void cleanup_args_for_failure_locked(security_handshaker *h) { + h->endpoint_to_destroy = h->args->endpoint; + h->args->endpoint = NULL; + h->read_buffer_to_destroy = h->args->read_buffer; + h->args->read_buffer = NULL; + grpc_channel_args_destroy(h->args->args); + h->args->args = NULL; +} + +// If the handshake failed or we're shutting down, clean up and invoke the +// callback with the error. +static void security_handshake_failed_locked(grpc_exec_ctx *exec_ctx, + security_handshaker *h, + grpc_error *error) { if (error == GRPC_ERROR_NONE) { - grpc_arg auth_context_arg = grpc_auth_context_to_arg(h->auth_context); - grpc_channel_args* tmp_args = h->args->args; - h->args->args = - grpc_channel_args_copy_and_add(tmp_args, &auth_context_arg, 1); - grpc_channel_args_destroy(tmp_args); - } else { - const char *msg = grpc_error_string(error); - gpr_log(GPR_DEBUG, "Security handshake failed: %s", msg); - grpc_error_free_string(msg); + // If we were shut down after the handshake succeeded but before an + // endpoint callback was invoked, we need to generate our own error. + error = GRPC_ERROR_CREATE("Handshaker shutdown"); + } + const char *msg = grpc_error_string(error); + gpr_log(GPR_DEBUG, "Security handshake failed: %s", msg); + grpc_error_free_string(msg); + if (!h->shutdown) { + // TODO(ctiller): It is currently necessary to shutdown endpoints + // before destroying them, even if we know that there are no + // pending read/write callbacks. This should be fixed, at which + // point this can be removed. grpc_endpoint_shutdown(exec_ctx, h->args->endpoint); -// FIXME: clarify who should destroy... - //grpc_endpoint_destroy(exec_ctx, h->args->endpoint); + // Not shutting down, so the write failed. Clean up before + // invoking the callback. + cleanup_args_for_failure_locked(h); } - // Clear out the read buffer before it gets passed to the transport, - // since any excess bytes were already copied to h->left_overs. - grpc_slice_buffer_reset_and_unref(h->args->read_buffer); - h->args = NULL; + // Invoke callback. grpc_exec_ctx_sched(exec_ctx, h->on_handshake_done, error, NULL); } @@ -116,9 +140,8 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { security_handshaker *h = arg; gpr_mu_lock(&h->mu); - if (error != GRPC_ERROR_NONE) { - // Take a new ref to pass to security_handshake_done_locked(). - GRPC_ERROR_REF(error); + if (error != GRPC_ERROR_NONE || h->shutdown) { + security_handshake_failed_locked(exec_ctx, h, GRPC_ERROR_REF(error)); goto done; } // Get frame protector. @@ -128,17 +151,30 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *arg, if (result != TSI_OK) { error = grpc_set_tsi_error_result( GRPC_ERROR_CREATE("Frame protector creation failed"), result); + security_handshake_failed_locked(exec_ctx, h, error); goto done; } + // Success. + // Create secure endpoint. h->args->endpoint = grpc_secure_endpoint_create(protector, h->args->endpoint, h->left_overs.slices, h->left_overs.count); h->left_overs.count = 0; h->left_overs.length = 0; + // Clear out the read buffer before it gets passed to the transport, + // since any excess bytes were already copied to h->left_overs. + grpc_slice_buffer_reset_and_unref(h->args->read_buffer); + // Add auth context to channel args. + grpc_arg auth_context_arg = grpc_auth_context_to_arg(h->auth_context); + grpc_channel_args* tmp_args = h->args->args; + h->args->args = + grpc_channel_args_copy_and_add(tmp_args, &auth_context_arg, 1); + grpc_channel_args_destroy(tmp_args); + // Invoke callback. + grpc_exec_ctx_sched(exec_ctx, h->on_handshake_done, GRPC_ERROR_NONE, NULL); done: - security_handshake_done_locked(exec_ctx, h, error); gpr_mu_unlock(&h->mu); - unref_handshake(h); + security_handshaker_unref(exec_ctx, h); } static grpc_error* check_peer_locked(grpc_exec_ctx *exec_ctx, @@ -185,16 +221,15 @@ static grpc_error* send_handshake_bytes_to_peer_locked(grpc_exec_ctx *exec_ctx, } static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, - void *handshake, - grpc_error *error) { - security_handshaker *h = handshake; + void *arg, grpc_error *error) { + security_handshaker *h = arg; gpr_mu_lock(&h->mu); - if (error != GRPC_ERROR_NONE) { - security_handshake_done_locked( + if (error != GRPC_ERROR_NONE || h->shutdown) { + security_handshake_failed_locked( exec_ctx, h, GRPC_ERROR_CREATE_REFERENCING("Handshake read failed", &error, 1)); gpr_mu_unlock(&h->mu); - unref_handshake(h); + security_handshaker_unref(exec_ctx, h); return; } // Process received data. @@ -217,21 +252,21 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, } else { error = send_handshake_bytes_to_peer_locked(exec_ctx, h); if (error != GRPC_ERROR_NONE) { - security_handshake_done_locked(exec_ctx, h, error); + security_handshake_failed_locked(exec_ctx, h, error); gpr_mu_unlock(&h->mu); - unref_handshake(h); + security_handshaker_unref(exec_ctx, h); return; } goto done; } } if (result != TSI_OK) { - security_handshake_done_locked( + security_handshake_failed_locked( exec_ctx, h, grpc_set_tsi_error_result(GRPC_ERROR_CREATE("Handshake failed"), result)); gpr_mu_unlock(&h->mu); - unref_handshake(h); + security_handshaker_unref(exec_ctx, h); return; } /* Handshake is done and successful this point. */ @@ -258,42 +293,37 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, // Check peer. error = check_peer_locked(exec_ctx, h); if (error != GRPC_ERROR_NONE) { - security_handshake_done_locked(exec_ctx, h, error); + security_handshake_failed_locked(exec_ctx, h, error); gpr_mu_unlock(&h->mu); - unref_handshake(h); + security_handshaker_unref(exec_ctx, h); return; } done: gpr_mu_unlock(&h->mu); } -/* If handshake is NULL, the handshake is done. */ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, - void *handshake, grpc_error *error) { - security_handshaker *h = handshake; - /* Make sure that write is OK. */ - if (error != GRPC_ERROR_NONE) { - if (handshake != NULL) { - gpr_mu_lock(&h->mu); - security_handshake_done_locked( - exec_ctx, h, - GRPC_ERROR_CREATE_REFERENCING("Handshake write failed", &error, 1)); - gpr_mu_unlock(&h->mu); - unref_handshake(h); - } + void *arg, grpc_error *error) { + security_handshaker *h = arg; + gpr_mu_lock(&h->mu); + if (error != GRPC_ERROR_NONE || h->shutdown) { + security_handshake_failed_locked( + exec_ctx, h, + GRPC_ERROR_CREATE_REFERENCING("Handshake write failed", &error, 1)); + gpr_mu_unlock(&h->mu); + security_handshaker_unref(exec_ctx, h); return; } /* We may be done. */ - gpr_mu_lock(&h->mu); if (tsi_handshaker_is_in_progress(h->handshaker)) { grpc_endpoint_read(exec_ctx, h->args->endpoint, h->args->read_buffer, &h->on_handshake_data_received_from_peer); } else { error = check_peer_locked(exec_ctx, h); if (error != GRPC_ERROR_NONE) { - security_handshake_done_locked(exec_ctx, h, error); + security_handshake_failed_locked(exec_ctx, h, error); gpr_mu_unlock(&h->mu); - unref_handshake(h); + security_handshaker_unref(exec_ctx, h); return; } } @@ -305,17 +335,19 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, // static void security_handshaker_destroy(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { + grpc_handshaker* handshaker) { security_handshaker* h = (security_handshaker*)handshaker; - unref_handshake(h); + security_handshaker_unref(exec_ctx, h); } static void security_handshaker_shutdown(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { + grpc_handshaker* handshaker) { security_handshaker *h = (security_handshaker*)handshaker; gpr_mu_lock(&h->mu); - if (h->args != NULL) { + if (!h->shutdown) { + h->shutdown = true; grpc_endpoint_shutdown(exec_ctx, h->args->endpoint); + cleanup_args_for_failure_locked(h); } gpr_mu_unlock(&h->mu); } @@ -331,9 +363,9 @@ static void security_handshaker_do_handshake( gpr_ref(&h->refs); grpc_error* error = send_handshake_bytes_to_peer_locked(exec_ctx, h); if (error != GRPC_ERROR_NONE) { - security_handshake_done_locked(exec_ctx, h, error); + security_handshake_failed_locked(exec_ctx, h, error); gpr_mu_unlock(&h->mu); - unref_handshake(h); + security_handshaker_unref(exec_ctx, h); return; } gpr_mu_unlock(&h->mu); -- cgit v1.2.3 From b62f364d0a6a4413c1535dd5fbbfea288142fc02 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 30 Nov 2016 11:41:25 -0800 Subject: Fix shutdown semantics for client and server code. --- .../ext/transport/chttp2/client/chttp2_connector.c | 14 +++++-- .../chttp2/server/insecure/server_chttp2.c | 36 ++++++++++-------- .../chttp2/server/secure/server_secure_chttp2.c | 44 ++++++++++++---------- 3 files changed, 54 insertions(+), 40 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.c b/src/core/ext/transport/chttp2/client/chttp2_connector.c index 43649376a1..6341682ade 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.c +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.c @@ -107,15 +107,20 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, if (error == GRPC_ERROR_NONE) { error = GRPC_ERROR_CREATE("connector shutdown"); // We were shut down after handshaking completed successfully, so - // shutdown the endpoint here. + // destroy the endpoint here. + // TODO(ctiller): It is currently necessary to shutdown endpoints + // before destroying them, even if we know that there are no + // pending read/write callbacks. This should be fixed, at which + // point this can be removed. grpc_endpoint_shutdown(exec_ctx, args->endpoint); + grpc_endpoint_destroy(exec_ctx, args->endpoint); + grpc_channel_args_destroy(args->args); + grpc_slice_buffer_destroy(args->read_buffer); + gpr_free(args->read_buffer); } else { error = GRPC_ERROR_REF(error); } memset(c->result, 0, sizeof(*c->result)); - grpc_endpoint_destroy(exec_ctx, args->endpoint); - grpc_channel_args_destroy(args->args); - gpr_free(args->read_buffer); } else { c->result->transport = grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 1); @@ -232,6 +237,7 @@ grpc_connector *grpc_chttp2_connector_create( gpr_free(proxy_name); } if (security_connector != NULL) { +// FIXME: this function call is not linked in for the insecure target! grpc_channel_security_connector_create_handshakers( exec_ctx, security_connector, c->handshake_mgr); } diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index 9284d19357..bdf10de49e 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -110,29 +110,33 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_handshaker_args *args = arg; server_connection_state *connection_state = args->user_data; - if (error != GRPC_ERROR_NONE) { + gpr_mu_lock(&connection_state->server_state->mu); + if (error != GRPC_ERROR_NONE || connection_state->server_state->shutdown) { const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); - gpr_mu_lock(&connection_state->server_state->mu); - } else { - gpr_mu_lock(&connection_state->server_state->mu); - if (!connection_state->server_state->shutdown) { - grpc_transport *transport = - grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 0); - grpc_server_setup_transport( - exec_ctx, connection_state->server_state->server, transport, - connection_state->accepting_pollset, - grpc_server_get_channel_args(connection_state->server_state->server)); - grpc_chttp2_transport_start_reading(exec_ctx, transport, - args->read_buffer); - } else { - // Need to destroy this here, because the server may have already - // gone away. + if (error == GRPC_ERROR_NONE) { + // We were shut down after handshaking completed successfully, so + // destroy the endpoint here. + // TODO(ctiller): It is currently necessary to shutdown endpoints + // before destroying them, even if we know that there are no + // pending read/write callbacks. This should be fixed, at which + // point this can be removed. + grpc_endpoint_shutdown(exec_ctx, args->endpoint); grpc_endpoint_destroy(exec_ctx, args->endpoint); + grpc_channel_args_destroy(args->args); grpc_slice_buffer_destroy(args->read_buffer); gpr_free(args->read_buffer); } + } else { + grpc_transport *transport = + grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 0); + grpc_server_setup_transport( + exec_ctx, connection_state->server_state->server, transport, + connection_state->accepting_pollset, + grpc_server_get_channel_args(connection_state->server_state->server)); + grpc_chttp2_transport_start_reading(exec_ctx, transport, + args->read_buffer); grpc_channel_args_destroy(args->args); } pending_handshake_manager_remove_locked(connection_state->server_state, diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index afdf93398f..19aa22c7c4 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -117,34 +117,38 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_handshaker_args *args = arg; server_secure_connection_state *connection_state = args->user_data; - if (error != GRPC_ERROR_NONE) { + gpr_mu_lock(&connection_state->server_state->mu); + if (error != GRPC_ERROR_NONE || connection_state->server_state->shutdown) { const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); - gpr_mu_lock(&connection_state->server_state->mu); - } else { - gpr_mu_lock(&connection_state->server_state->mu); - if (!connection_state->server_state->shutdown) { - grpc_arg channel_arg = grpc_server_credentials_to_arg( - connection_state->server_state->creds); - grpc_channel_args *args_copy = - grpc_channel_args_copy_and_add(args->args, &channel_arg, 1); - grpc_transport *transport = - grpc_create_chttp2_transport(exec_ctx, args_copy, args->endpoint, 0); - grpc_server_setup_transport( - exec_ctx, connection_state->server_state->server, transport, - connection_state->accepting_pollset, args_copy); - grpc_channel_args_destroy(args_copy); - grpc_chttp2_transport_start_reading(exec_ctx, transport, - args->read_buffer); - } else { - // Need to destroy this here, because the server may have already - // gone away. + if (error == GRPC_ERROR_NONE) { + // We were shut down after handshaking completed successfully, so + // destroy the endpoint here. + // TODO(ctiller): It is currently necessary to shutdown endpoints + // before destroying them, even if we know that there are no + // pending read/write callbacks. This should be fixed, at which + // point this can be removed. + grpc_endpoint_shutdown(exec_ctx, args->endpoint); grpc_endpoint_destroy(exec_ctx, args->endpoint); + grpc_channel_args_destroy(args->args); grpc_slice_buffer_destroy(args->read_buffer); gpr_free(args->read_buffer); } + } else { + grpc_arg channel_arg = grpc_server_credentials_to_arg( + connection_state->server_state->creds); + grpc_channel_args *args_copy = + grpc_channel_args_copy_and_add(args->args, &channel_arg, 1); grpc_channel_args_destroy(args->args); + grpc_transport *transport = + grpc_create_chttp2_transport(exec_ctx, args_copy, args->endpoint, 0); + grpc_server_setup_transport( + exec_ctx, connection_state->server_state->server, transport, + connection_state->accepting_pollset, args_copy); + grpc_channel_args_destroy(args_copy); + grpc_chttp2_transport_start_reading(exec_ctx, transport, + args->read_buffer); } pending_handshake_manager_remove_locked(connection_state->server_state, connection_state->handshake_mgr); -- cgit v1.2.3 From 296984b46c5e130c7aed4bdae1fc910108e3cbce Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 30 Nov 2016 12:25:02 -0800 Subject: Break infinite connection retry loop Previously, we'd keep retrying a connection until the channel closed. With this change, we only retry connecting *if there's a watcher on the subchannel connection state*. This ultimately means that if the lb_policy doesn't care if the subchannel connects, it'll stop trying. --- src/core/ext/client_channel/subchannel.c | 135 +++++++++++++++++----------- src/core/lib/transport/connectivity_state.c | 13 ++- src/core/lib/transport/connectivity_state.h | 5 +- 3 files changed, 95 insertions(+), 58 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/subchannel.c b/src/core/ext/client_channel/subchannel.c index a148b2a0e1..bb3d167bec 100644 --- a/src/core/ext/client_channel/subchannel.c +++ b/src/core/ext/client_channel/subchannel.c @@ -119,9 +119,9 @@ struct grpc_subchannel { gpr_mu mu; /** have we seen a disconnection? */ - int disconnected; + bool disconnected; /** are we connecting */ - int connecting; + bool connecting; /** connectivity state tracking */ grpc_connectivity_state_tracker state_tracker; @@ -132,7 +132,9 @@ struct grpc_subchannel { /** backoff state */ gpr_backoff backoff_state; /** do we have an active alarm? */ - int have_alarm; + bool have_alarm; + /** have we started the backoff loop */ + bool backoff_begun; /** our alarm */ grpc_timer alarm; }; @@ -264,7 +266,7 @@ static void disconnect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { grpc_subchannel_index_unregister(exec_ctx, c->key, c); gpr_mu_lock(&c->mu); GPR_ASSERT(!c->disconnected); - c->disconnected = 1; + c->disconnected = true; grpc_connector_shutdown(exec_ctx, c->connector); con = GET_CONNECTED_SUBCHANNEL(c, no_barrier); if (con != NULL) { @@ -386,12 +388,6 @@ static void continue_connect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { &c->connected); } -static void start_connect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { - c->next_attempt = - gpr_backoff_begin(&c->backoff_state, gpr_now(GPR_CLOCK_MONOTONIC)); - continue_connect(exec_ctx, c); -} - grpc_connectivity_state grpc_subchannel_check_connectivity(grpc_subchannel *c, grpc_error **error) { grpc_connectivity_state state; @@ -418,6 +414,73 @@ static void on_external_state_watcher_done(grpc_exec_ctx *exec_ctx, void *arg, follow_up->cb(exec_ctx, follow_up->cb_arg, error); } +static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + grpc_subchannel *c = arg; + gpr_mu_lock(&c->mu); + c->have_alarm = 0; + if (c->disconnected) { + error = GRPC_ERROR_CREATE_REFERENCING("Disconnected", &error, 1); + } else { + GRPC_ERROR_REF(error); + } + if (error == GRPC_ERROR_NONE) { + gpr_log(GPR_INFO, "Failed to connect to channel, retrying"); + c->next_attempt = + gpr_backoff_step(&c->backoff_state, gpr_now(GPR_CLOCK_MONOTONIC)); + continue_connect(exec_ctx, c); + gpr_mu_unlock(&c->mu); + } else { + gpr_mu_unlock(&c->mu); + GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); + } + GRPC_ERROR_UNREF(error); +} + +static void maybe_start_connecting_locked(grpc_exec_ctx *exec_ctx, + grpc_subchannel *c) { + if (c->disconnected) { + /* Don't try to connect if we're already disconnected */ + return; + } + + if (c->connecting) { + /* Already connecting: don't restart */ + return; + } + + if (GET_CONNECTED_SUBCHANNEL(c, no_barrier) != NULL) { + /* Already connected: don't restart */ + return; + } + + if (!grpc_connectivity_state_has_watchers(&c->state_tracker)) { + /* Nobody is interested in connecting: so don't just yet */ + return; + } + + c->connecting = true; + GRPC_SUBCHANNEL_WEAK_REF(c, "connecting"); + + gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); + if (!c->backoff_begun) { + c->backoff_begun = true; + c->next_attempt = gpr_backoff_begin(&c->backoff_state, now); + continue_connect(exec_ctx, c); + } else { + GPR_ASSERT(!c->have_alarm); + c->have_alarm = 1; + gpr_timespec time_til_next = gpr_time_sub(c->next_attempt, now); + if (gpr_time_cmp(time_til_next, gpr_time_0(time_til_next.clock_type)) <= + 0) { + gpr_log(GPR_INFO, "Retry immediately"); + } else { + gpr_log(GPR_INFO, "Retry in %" PRId64 ".%09d seconds", + time_til_next.tv_sec, time_til_next.tv_nsec); + } + grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, on_alarm, c, now); + } +} + void grpc_subchannel_notify_on_state_change( grpc_exec_ctx *exec_ctx, grpc_subchannel *c, grpc_pollset_set *interested_parties, grpc_connectivity_state *state, @@ -449,13 +512,9 @@ void grpc_subchannel_notify_on_state_change( w->next = &c->root_external_state_watcher; w->prev = w->next->prev; w->next->prev = w->prev->next = w; - if (grpc_connectivity_state_notify_on_state_change( - exec_ctx, &c->state_tracker, state, &w->closure)) { - c->connecting = 1; - /* released by connection */ - GRPC_SUBCHANNEL_WEAK_REF(c, "connecting"); - start_connect(exec_ctx, c); - } + grpc_connectivity_state_notify_on_state_change(exec_ctx, &c->state_tracker, + state, &w->closure); + maybe_start_connecting_locked(exec_ctx, c); gpr_mu_unlock(&c->mu); } } @@ -575,7 +634,6 @@ static void publish_transport_locked(grpc_exec_ctx *exec_ctx, Re-evaluate if we really need this. */ gpr_atm_full_barrier(); GPR_ASSERT(gpr_atm_rel_cas(&c->connected_subchannel, 0, (gpr_atm)con)); - c->connecting = 0; /* setup subchannel watching connected subchannel for changes; subchannel ref @@ -592,28 +650,6 @@ static void publish_transport_locked(grpc_exec_ctx *exec_ctx, GRPC_ERROR_NONE, "connected"); } -static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - grpc_subchannel *c = arg; - gpr_mu_lock(&c->mu); - c->have_alarm = 0; - if (c->disconnected) { - error = GRPC_ERROR_CREATE_REFERENCING("Disconnected", &error, 1); - } else { - GRPC_ERROR_REF(error); - } - if (error == GRPC_ERROR_NONE) { - gpr_log(GPR_INFO, "Failed to connect to channel, retrying"); - c->next_attempt = - gpr_backoff_step(&c->backoff_state, gpr_now(GPR_CLOCK_MONOTONIC)); - continue_connect(exec_ctx, c); - gpr_mu_unlock(&c->mu); - } else { - gpr_mu_unlock(&c->mu); - GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); - } - GRPC_ERROR_UNREF(error); -} - static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_subchannel *c = arg; @@ -621,35 +657,28 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, GRPC_SUBCHANNEL_WEAK_REF(c, "connected"); gpr_mu_lock(&c->mu); + c->connecting = false; if (c->connecting_result.transport != NULL) { publish_transport_locked(exec_ctx, c); } else if (c->disconnected) { GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); } else { - gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); - GPR_ASSERT(!c->have_alarm); - c->have_alarm = 1; grpc_connectivity_state_set( exec_ctx, &c->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, grpc_error_set_int( GRPC_ERROR_CREATE_REFERENCING("Connect Failed", &error, 1), GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE), "connect_failed"); - gpr_timespec time_til_next = gpr_time_sub(c->next_attempt, now); + const char *errmsg = grpc_error_string(error); gpr_log(GPR_INFO, "Connect failed: %s", errmsg); - if (gpr_time_cmp(time_til_next, gpr_time_0(time_til_next.clock_type)) <= - 0) { - gpr_log(GPR_INFO, "Retry immediately"); - } else { - gpr_log(GPR_INFO, "Retry in %" PRId64 ".%09d seconds", - time_til_next.tv_sec, time_til_next.tv_nsec); - } - grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, on_alarm, c, now); grpc_error_free_string(errmsg); + + maybe_start_connecting_locked(exec_ctx, c); + GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); } gpr_mu_unlock(&c->mu); - GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); + GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connected"); grpc_channel_args_destroy(delete_channel_args); } diff --git a/src/core/lib/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.c index 89072879d9..4f49d7cf7d 100644 --- a/src/core/lib/transport/connectivity_state.c +++ b/src/core/lib/transport/connectivity_state.c @@ -100,7 +100,12 @@ grpc_connectivity_state grpc_connectivity_state_check( return tracker->current_state; } -int grpc_connectivity_state_notify_on_state_change( +bool grpc_connectivity_state_has_watchers( + grpc_connectivity_state_tracker *connectivity_state) { + return connectivity_state->watchers != NULL; +} + +bool grpc_connectivity_state_notify_on_state_change( grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker, grpc_connectivity_state *current, grpc_closure *notify) { if (grpc_connectivity_state_trace) { @@ -119,7 +124,7 @@ int grpc_connectivity_state_notify_on_state_change( grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_CANCELLED, NULL); tracker->watchers = w->next; gpr_free(w); - return 0; + return false; } while (w != NULL) { grpc_connectivity_state_watcher *rm_candidate = w->next; @@ -127,11 +132,11 @@ int grpc_connectivity_state_notify_on_state_change( grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_CANCELLED, NULL); w->next = w->next->next; gpr_free(rm_candidate); - return 0; + return false; } w = w->next; } - return 0; + return false; } else { if (tracker->current_state != *current) { *current = tracker->current_state; diff --git a/src/core/lib/transport/connectivity_state.h b/src/core/lib/transport/connectivity_state.h index 7a2fa52c10..769c675b79 100644 --- a/src/core/lib/transport/connectivity_state.h +++ b/src/core/lib/transport/connectivity_state.h @@ -75,13 +75,16 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, grpc_error *associated_error, const char *reason); +bool grpc_connectivity_state_has_watchers( + grpc_connectivity_state_tracker *tracker); + grpc_connectivity_state grpc_connectivity_state_check( grpc_connectivity_state_tracker *tracker, grpc_error **current_error); /** Return 1 if the channel should start connecting, 0 otherwise. If current==NULL cancel notify if it is already queued (success==0 in that case) */ -int grpc_connectivity_state_notify_on_state_change( +bool grpc_connectivity_state_notify_on_state_change( grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker, grpc_connectivity_state *current, grpc_closure *notify); -- cgit v1.2.3 From e6e1c9e7a1d5c57121822c77cee36c441fc315ba Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 30 Nov 2016 12:33:21 -0800 Subject: Fix link problem for insecure target. --- src/core/ext/transport/chttp2/client/chttp2_connector.c | 10 +++++----- src/core/ext/transport/chttp2/client/chttp2_connector.h | 8 ++++++-- src/core/ext/transport/chttp2/client/insecure/channel_create.c | 3 ++- .../ext/transport/chttp2/client/secure/secure_channel_create.c | 9 ++++++++- 4 files changed, 21 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.c b/src/core/ext/transport/chttp2/client/chttp2_connector.c index 6341682ade..5f9ef5a32b 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.c +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.c @@ -222,7 +222,9 @@ static const grpc_connector_vtable chttp2_connector_vtable = { grpc_connector *grpc_chttp2_connector_create( grpc_exec_ctx *exec_ctx, const char* server_name, - grpc_channel_security_connector* security_connector) { + void (*create_handshakers)(grpc_exec_ctx* exec_ctx, void* user_data, + grpc_handshake_manager* handshake_mgr), + void* user_data) { chttp2_connector *c = gpr_malloc(sizeof(*c)); memset(c, 0, sizeof(*c)); c->base.vtable = &chttp2_connector_vtable; @@ -236,10 +238,8 @@ grpc_connector *grpc_chttp2_connector_create( grpc_http_connect_handshaker_create(proxy_name, server_name)); gpr_free(proxy_name); } - if (security_connector != NULL) { -// FIXME: this function call is not linked in for the insecure target! - grpc_channel_security_connector_create_handshakers( - exec_ctx, security_connector, c->handshake_mgr); + if (create_handshakers != NULL) { + create_handshakers(exec_ctx, user_data, c->handshake_mgr); } return &c->base; } diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.h b/src/core/ext/transport/chttp2/client/chttp2_connector.h index 5a85d8fa7c..fc8c8e1369 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.h +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.h @@ -35,10 +35,14 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/channel/handshaker.h" +/// If \a create_handshakers is non-NULL, it will be called with +/// \a user_data to add handshakers. grpc_connector *grpc_chttp2_connector_create( grpc_exec_ctx *exec_ctx, const char* server_name, - grpc_channel_security_connector* security_connector); + void (*create_handshakers)(grpc_exec_ctx* exec_ctx, void* user_data, + grpc_handshake_manager* handshake_mgr), + void* user_data); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H */ diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 5bb0f83f69..fa8353c794 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -53,7 +53,8 @@ static grpc_subchannel *client_channel_factory_create_subchannel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const grpc_subchannel_args *args) { grpc_connector *connector = grpc_chttp2_connector_create( - exec_ctx, args->server_name, NULL /* security_connector */); + exec_ctx, args->server_name, NULL /* create_handshakers */, + NULL /* user_data */); grpc_subchannel *s = grpc_subchannel_create(exec_ctx, connector, args); grpc_connector_unref(exec_ctx, connector); return s; diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index a5cc1633ae..928bc0b352 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -68,13 +68,20 @@ static void client_channel_factory_unref( } } +static void create_handshakers(grpc_exec_ctx* exec_ctx, + void* security_connector, + grpc_handshake_manager* handshake_mgr) { + grpc_channel_security_connector_create_handshakers( + exec_ctx, security_connector, handshake_mgr); +} + static grpc_subchannel *client_channel_factory_create_subchannel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const grpc_subchannel_args *args) { client_channel_factory *f = (client_channel_factory *)cc_factory; grpc_connector *connector = grpc_chttp2_connector_create(exec_ctx, args->server_name, - f->security_connector); + create_handshakers, f->security_connector); grpc_subchannel *s = grpc_subchannel_create(exec_ctx, connector, args); grpc_connector_unref(exec_ctx, connector); return s; -- cgit v1.2.3 From 9fbb3387d09e90670fba8e0fae01eff8f393acd9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 30 Nov 2016 12:58:23 -0800 Subject: Review feedback --- src/core/ext/client_channel/subchannel.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/subchannel.c b/src/core/ext/client_channel/subchannel.c index bb3d167bec..b83c6882dc 100644 --- a/src/core/ext/client_channel/subchannel.c +++ b/src/core/ext/client_channel/subchannel.c @@ -372,7 +372,8 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx, return grpc_subchannel_index_register(exec_ctx, key, c); } -static void continue_connect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { +static void continue_connect_locked(grpc_exec_ctx *exec_ctx, + grpc_subchannel *c) { grpc_connect_in_args args; args.interested_parties = c->pollset_set; @@ -417,7 +418,7 @@ static void on_external_state_watcher_done(grpc_exec_ctx *exec_ctx, void *arg, static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_subchannel *c = arg; gpr_mu_lock(&c->mu); - c->have_alarm = 0; + c->have_alarm = false; if (c->disconnected) { error = GRPC_ERROR_CREATE_REFERENCING("Disconnected", &error, 1); } else { @@ -427,7 +428,7 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_log(GPR_INFO, "Failed to connect to channel, retrying"); c->next_attempt = gpr_backoff_step(&c->backoff_state, gpr_now(GPR_CLOCK_MONOTONIC)); - continue_connect(exec_ctx, c); + continue_connect_locked(exec_ctx, c); gpr_mu_unlock(&c->mu); } else { gpr_mu_unlock(&c->mu); @@ -465,10 +466,10 @@ static void maybe_start_connecting_locked(grpc_exec_ctx *exec_ctx, if (!c->backoff_begun) { c->backoff_begun = true; c->next_attempt = gpr_backoff_begin(&c->backoff_state, now); - continue_connect(exec_ctx, c); + continue_connect_locked(exec_ctx, c); } else { GPR_ASSERT(!c->have_alarm); - c->have_alarm = 1; + c->have_alarm = true; gpr_timespec time_til_next = gpr_time_sub(c->next_attempt, now); if (gpr_time_cmp(time_til_next, gpr_time_0(time_til_next.clock_type)) <= 0) { -- cgit v1.2.3 From f1926c048ada37371f66c547f5219a164c2a0060 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 30 Nov 2016 13:18:10 -0800 Subject: Add a TODO comment. --- src/core/lib/http/httpcli_security_connector.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index 229021a345..82593d33a8 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -52,7 +52,10 @@ typedef struct { } grpc_httpcli_ssl_channel_security_connector; static void httpcli_ssl_destroy(grpc_security_connector *sc) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; // FIXME + // TODO(roth, ctiller): Once https://github.com/grpc/grpc/pull/8705 is + // merged, change this to use the passed-in exec_ctx instead of creating + // its own. + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_httpcli_ssl_channel_security_connector *c = (grpc_httpcli_ssl_channel_security_connector *)sc; if (c->handshaker_factory != NULL) { -- cgit v1.2.3 From 977f5d4e7dc8bdf21bda2e8b9a7a232f88de8e73 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 30 Nov 2016 14:03:58 -0800 Subject: clang-format --- src/core/lib/channel/channel_stack_builder.c | 2 +- src/core/lib/surface/channel.c | 9 ++++----- src/cpp/common/channel_filter.h | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/channel_stack_builder.c b/src/core/lib/channel/channel_stack_builder.c index f54eac06ec..b959517afb 100644 --- a/src/core/lib/channel/channel_stack_builder.c +++ b/src/core/lib/channel/channel_stack_builder.c @@ -266,7 +266,7 @@ grpc_error *grpc_channel_stack_builder_finish( } else { // run post-initialization functions i = 0; - for (filter_node *p = builder->begin.next; p != &builder->end;\ + for (filter_node *p = builder->begin.next; p != &builder->end; p = p->next) { if (p->init != NULL) { p->init(channel_stack, grpc_channel_stack_element(channel_stack, i), diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 72e64a2076..9405015c50 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -101,7 +101,7 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, exec_ctx, builder, sizeof(grpc_channel), 1, destroy_channel, NULL, (void **)&channel); if (error != GRPC_ERROR_NONE) { - const char* msg = grpc_error_string(error); + const char *msg = grpc_error_string(error); gpr_log(GPR_ERROR, "channel stack builder failed: %s", msg); grpc_error_free_string(msg); GRPC_ERROR_UNREF(error); @@ -126,8 +126,8 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, /* setting this takes precedence over anything else */ GRPC_MDELEM_UNREF(channel->default_authority); } - channel->default_authority = grpc_mdelem_from_strings( - ":authority", args->args[i].value.string); + channel->default_authority = + grpc_mdelem_from_strings(":authority", args->args[i].value.string); } } else if (0 == strcmp(args->args[i].key, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG)) { @@ -156,8 +156,7 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM)) { channel->compression_options.default_algorithm.is_set = true; GPR_ASSERT(args->args[i].value.integer >= 0 && - args->args[i].value.integer < - GRPC_COMPRESS_ALGORITHMS_COUNT); + args->args[i].value.integer < GRPC_COMPRESS_ALGORITHMS_COUNT); channel->compression_options.default_algorithm.algorithm = (grpc_compression_algorithm)args->args[i].value.integer; } else if (0 == diff --git a/src/cpp/common/channel_filter.h b/src/cpp/common/channel_filter.h index 6bda74b9be..107522ea04 100644 --- a/src/cpp/common/channel_filter.h +++ b/src/cpp/common/channel_filter.h @@ -287,7 +287,7 @@ class ChannelFilter final { ? grpc_transport_get_peer(exec_ctx, args->optional_transport) : nullptr; // Construct the object in the already-allocated memory. - ChannelDataType* channel_data = + ChannelDataType *channel_data = new (elem->channel_data) ChannelDataType(*args->channel_args, peer); return channel_data->Init(); } -- cgit v1.2.3 From 2388b95984eccb74484405ffd458579f961ab10f Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 1 Dec 2016 01:44:24 -0800 Subject: Remove redundant includes --- src/core/lib/support/string.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index e933e2eb46..db59308425 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -36,8 +36,6 @@ #include -#include -#include #include #ifdef __cplusplus -- cgit v1.2.3 From 6c870f6c6268fe1818c566efa91c02024dffdc34 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 1 Dec 2016 01:52:17 -0800 Subject: Remove redundant includes --- src/core/lib/support/tmpfile.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/support/tmpfile.h b/src/core/lib/support/tmpfile.h index 8952e5ec3d..f613cf9bc8 100644 --- a/src/core/lib/support/tmpfile.h +++ b/src/core/lib/support/tmpfile.h @@ -36,8 +36,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif -- cgit v1.2.3 From 53bd69330ca12c8d430997283402a50cbe307e2f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 1 Dec 2016 08:00:38 -0800 Subject: Code review changes. --- .../ext/client_channel/http_connect_handshaker.c | 3 +++ .../chttp2/client/insecure/channel_create.c | 23 ++++++++++-------- .../chttp2/client/secure/secure_channel_create.c | 27 ++++++++++++---------- src/core/lib/channel/handshaker.h | 2 +- 4 files changed, 33 insertions(+), 22 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 6a34e390bc..e0b717dac5 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -228,6 +228,9 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, // Success. Invoke handshake-done callback. grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, error, NULL); done: + // Set shutdown to true so that subsequent calls to + // http_connect_handshaker_shutdown() do nothing. + handshaker->shutdown = true; gpr_mu_unlock(&handshaker->mu); http_connect_handshaker_unref(exec_ctx, handshaker); } diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 00b272de27..d42e6e98aa 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -39,6 +39,7 @@ #include #include #include +#include #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" @@ -60,6 +61,8 @@ typedef struct { grpc_connector base; gpr_refcount refs; + char *server_name; + grpc_closure *notify; grpc_connect_in_args args; grpc_connect_out_args *result; @@ -82,7 +85,7 @@ static void connector_unref(grpc_exec_ctx *exec_ctx, grpc_connector *con) { connector *c = (connector *)con; if (gpr_unref(&c->refs)) { /* c->initial_string_buffer does not need to be destroyed */ - grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); + gpr_free(c->server_name); gpr_free(c); } } @@ -107,6 +110,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_closure *notify = c->notify; c->notify = NULL; grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); + grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); } static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { @@ -123,6 +127,14 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, &c->initial_string_sent); } else { + c->handshake_mgr = grpc_handshake_manager_create(); + char *proxy_name = grpc_get_http_proxy_server(); + if (proxy_name != NULL) { + grpc_handshake_manager_add( + c->handshake_mgr, + grpc_http_connect_handshaker_create(proxy_name, c->server_name)); + gpr_free(proxy_name); + } grpc_handshake_manager_do_handshake( exec_ctx, c->handshake_mgr, tcp, c->args.channel_args, c->args.deadline, NULL /* acceptor */, on_handshake_done, c); @@ -174,14 +186,7 @@ static grpc_subchannel *client_channel_factory_create_subchannel( memset(c, 0, sizeof(*c)); c->base.vtable = &connector_vtable; gpr_ref_init(&c->refs, 1); - c->handshake_mgr = grpc_handshake_manager_create(); - char *proxy_name = grpc_get_http_proxy_server(); - if (proxy_name != NULL) { - grpc_handshake_manager_add( - c->handshake_mgr, - grpc_http_connect_handshaker_create(proxy_name, args->server_name)); - gpr_free(proxy_name); - } + c->server_name = gpr_strdup(args->server_name); grpc_subchannel *s = grpc_subchannel_create(exec_ctx, &c->base, args); grpc_connector_unref(exec_ctx, &c->base); return s; diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index b4a30f94fc..93023af275 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -39,6 +39,7 @@ #include #include #include +#include #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" @@ -63,6 +64,7 @@ typedef struct { gpr_refcount refs; grpc_channel_security_connector *security_connector; + char *server_name; grpc_closure *notify; grpc_connect_in_args args; @@ -92,7 +94,7 @@ static void connector_unref(grpc_exec_ctx *exec_ctx, grpc_connector *con) { if (gpr_unref(&c->refs)) { /* c->initial_string_buffer does not need to be destroyed */ grpc_channel_args_destroy(c->tmp_args); - grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); + gpr_free(c->server_name); gpr_free(c); } } @@ -146,11 +148,20 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, exec_ctx, c->security_connector, args->endpoint, args->read_buffer, c->args.deadline, on_secure_handshake_done, c); } + grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); } static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { connector *c = arg; + c->handshake_mgr = grpc_handshake_manager_create(); + char *proxy_name = grpc_get_http_proxy_server(); + if (proxy_name != NULL) { + grpc_handshake_manager_add( + c->handshake_mgr, + grpc_http_connect_handshaker_create(proxy_name, c->server_name)); + gpr_free(proxy_name); + } grpc_handshake_manager_do_handshake( exec_ctx, c->handshake_mgr, c->connecting_endpoint, c->args.channel_args, c->args.deadline, NULL /* acceptor */, on_handshake_done, c); @@ -173,9 +184,8 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, &c->initial_string_sent); } else { - grpc_handshake_manager_do_handshake( - exec_ctx, c->handshake_mgr, tcp, c->args.channel_args, - c->args.deadline, NULL /* acceptor */, on_handshake_done, c); + // Start handshaking. + on_initial_connect_string_sent(exec_ctx, c, error); } } else { memset(c->result, 0, sizeof(*c->result)); @@ -252,14 +262,7 @@ static grpc_subchannel *client_channel_factory_create_subchannel( memset(c, 0, sizeof(*c)); c->base.vtable = &connector_vtable; c->security_connector = f->security_connector; - c->handshake_mgr = grpc_handshake_manager_create(); - char *proxy_name = grpc_get_http_proxy_server(); - if (proxy_name != NULL) { - grpc_handshake_manager_add( - c->handshake_mgr, - grpc_http_connect_handshaker_create(proxy_name, args->server_name)); - gpr_free(proxy_name); - } + c->server_name = gpr_strdup(args->server_name); gpr_mu_init(&c->mu); gpr_ref_init(&c->refs, 1); grpc_subchannel *s = grpc_subchannel_create(exec_ctx, &c->base, args); diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index 2e1f543512..ebbc1ff7f3 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -133,7 +133,7 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, /// Invokes handshakers in the order they were added. /// Takes ownership of \a endpoint, and then passes that ownership to /// the \a on_handshake_done callback. -/// Does NOT take ownership of \a args. Instead, makes a copy before +/// Does NOT take ownership of \a channel_args. Instead, makes a copy before /// invoking the first handshaker. /// \a acceptor will be NULL for client-side handshakers. /// -- cgit v1.2.3 From 9b3f1b7ab1c925695412d7dd6febed8ca31b493c Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 1 Dec 2016 08:44:44 -0800 Subject: Fix httpcli cleanup code. --- src/core/lib/http/httpcli_security_connector.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index 82593d33a8..1a6d31a75d 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -158,18 +158,24 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_handshaker_args *args = arg; on_done_closure *c = args->user_data; + grpc_channel_args_destroy(args->args); + grpc_slice_buffer_destroy(args->read_buffer); + gpr_free(args->read_buffer); if (error != GRPC_ERROR_NONE) { const char* msg = grpc_error_string(error); gpr_log(GPR_ERROR, "Secure transport setup failed: %s", msg); grpc_error_free_string(msg); c->func(exec_ctx, c->arg, NULL); + // TODO(ctiller): It is currently necessary to shutdown endpoints + // before destroying them, even if we know that there are no + // pending read/write callbacks. This should be fixed, at which + // point this can be removed. + grpc_endpoint_shutdown(exec_ctx, args->endpoint); + grpc_endpoint_destroy(exec_ctx, args->endpoint); } else { c->func(exec_ctx, c->arg, args->endpoint); } gpr_free(c); - grpc_channel_args_destroy(args->args); - gpr_free(args->read_buffer); - gpr_free(args); } static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg, -- cgit v1.2.3 From a5617850522ed729eb79ad040e87811ab6925484 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 1 Dec 2016 08:48:22 -0800 Subject: clang-format --- .../ext/transport/chttp2/client/chttp2_connector.c | 8 +- .../ext/transport/chttp2/client/chttp2_connector.h | 6 +- .../chttp2/client/secure/secure_channel_create.c | 11 +-- .../chttp2/server/insecure/server_chttp2.c | 48 +++++----- .../chttp2/server/secure/server_secure_chttp2.c | 50 +++++----- src/core/lib/http/httpcli_security_connector.c | 6 +- .../lib/security/transport/security_connector.c | 31 +++---- .../lib/security/transport/security_connector.h | 12 +-- .../lib/security/transport/security_handshaker.c | 102 ++++++++++----------- .../lib/security/transport/security_handshaker.h | 7 +- test/core/security/ssl_server_fuzzer.c | 7 +- 11 files changed, 140 insertions(+), 148 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.c b/src/core/ext/transport/chttp2/client/chttp2_connector.c index 2af6b1e14d..213395c20f 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.c +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.c @@ -41,9 +41,9 @@ #include #include +#include "src/core/ext/client_channel/connector.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" -#include "src/core/ext/client_channel/connector.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/handshaker.h" #include "src/core/lib/iomgr/tcp_client.h" @@ -144,7 +144,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); c->handshake_mgr = NULL; gpr_mu_unlock(&c->mu); - chttp2_connector_unref(exec_ctx, (grpc_connector*)c); + chttp2_connector_unref(exec_ctx, (grpc_connector *)c); } static void start_handshake_locked(grpc_exec_ctx *exec_ctx, @@ -246,9 +246,9 @@ static const grpc_connector_vtable chttp2_connector_vtable = { chttp2_connector_connect}; grpc_connector *grpc_chttp2_connector_create( - grpc_exec_ctx *exec_ctx, const char* server_name, + grpc_exec_ctx *exec_ctx, const char *server_name, grpc_chttp2_create_handshakers_func create_handshakers, - void* create_handshakers_user_data) { + void *create_handshakers_user_data) { chttp2_connector *c = gpr_malloc(sizeof(*c)); memset(c, 0, sizeof(*c)); c->base.vtable = &chttp2_connector_vtable; diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.h b/src/core/ext/transport/chttp2/client/chttp2_connector.h index 46401c34de..6c34ce1af1 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.h +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.h @@ -35,8 +35,8 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H #include "src/core/ext/client_channel/connector.h" -#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/channel/handshaker.h" +#include "src/core/lib/iomgr/exec_ctx.h" typedef void (*grpc_chttp2_create_handshakers_func)( grpc_exec_ctx* exec_ctx, void* user_data, @@ -44,8 +44,8 @@ typedef void (*grpc_chttp2_create_handshakers_func)( /// If \a create_handshakers is non-NULL, it will be called with /// \a create_handshakers_user_data to add handshakers. -grpc_connector *grpc_chttp2_connector_create( - grpc_exec_ctx *exec_ctx, const char* server_name, +grpc_connector* grpc_chttp2_connector_create( + grpc_exec_ctx* exec_ctx, const char* server_name, grpc_chttp2_create_handshakers_func create_handshakers, void* create_handshakers_user_data); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 10a84630ce..35e1e1f716 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -69,9 +69,9 @@ static void client_channel_factory_unref( } } -static void create_handshakers(grpc_exec_ctx* exec_ctx, - void* security_connector, - grpc_handshake_manager* handshake_mgr) { +static void create_handshakers(grpc_exec_ctx *exec_ctx, + void *security_connector, + grpc_handshake_manager *handshake_mgr) { grpc_channel_security_connector_create_handshakers( exec_ctx, security_connector, handshake_mgr); } @@ -80,9 +80,8 @@ static grpc_subchannel *client_channel_factory_create_subchannel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const grpc_subchannel_args *args) { client_channel_factory *f = (client_channel_factory *)cc_factory; - grpc_connector *connector = - grpc_chttp2_connector_create(exec_ctx, args->server_name, - create_handshakers, f->security_connector); + grpc_connector *connector = grpc_chttp2_connector_create( + exec_ctx, args->server_name, create_handshakers, f->security_connector); grpc_subchannel *s = grpc_subchannel_create(exec_ctx, connector, args); grpc_connector_unref(exec_ctx, connector); return s; diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index bdf10de49e..a4d7fc5f70 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -50,7 +50,7 @@ #include "src/core/lib/surface/server.h" typedef struct pending_handshake_manager_node { - grpc_handshake_manager* handshake_mgr; + grpc_handshake_manager *handshake_mgr; struct pending_handshake_manager_node *next; } pending_handshake_manager_node; @@ -72,17 +72,17 @@ typedef struct { } server_connection_state; static void pending_handshake_manager_add_locked( - server_state* state, grpc_handshake_manager* handshake_mgr) { - pending_handshake_manager_node* node = gpr_malloc(sizeof(*node)); + server_state *state, grpc_handshake_manager *handshake_mgr) { + pending_handshake_manager_node *node = gpr_malloc(sizeof(*node)); node->handshake_mgr = handshake_mgr; node->next = state->pending_handshake_mgrs; state->pending_handshake_mgrs = node; } static void pending_handshake_manager_remove_locked( - server_state* state, grpc_handshake_manager* handshake_mgr) { - pending_handshake_manager_node** prev_node = &state->pending_handshake_mgrs; - for (pending_handshake_manager_node* node = state->pending_handshake_mgrs; + server_state *state, grpc_handshake_manager *handshake_mgr) { + pending_handshake_manager_node **prev_node = &state->pending_handshake_mgrs; + for (pending_handshake_manager_node *node = state->pending_handshake_mgrs; node != NULL; node = node->next) { if (node->handshake_mgr == handshake_mgr) { *prev_node = node->next; @@ -93,10 +93,10 @@ static void pending_handshake_manager_remove_locked( } } -static void pending_handshake_manager_shutdown_locked( - grpc_exec_ctx* exec_ctx, server_state* state) { - pending_handshake_manager_node* prev_node = NULL; - for (pending_handshake_manager_node* node = state->pending_handshake_mgrs; +static void pending_handshake_manager_shutdown_locked(grpc_exec_ctx *exec_ctx, + server_state *state) { + pending_handshake_manager_node *prev_node = NULL; + for (pending_handshake_manager_node *node = state->pending_handshake_mgrs; node != NULL; node = node->next) { grpc_handshake_manager_shutdown(exec_ctx, node->handshake_mgr); gpr_free(prev_node); @@ -135,8 +135,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, exec_ctx, connection_state->server_state->server, transport, connection_state->accepting_pollset, grpc_server_get_channel_args(connection_state->server_state->server)); - grpc_chttp2_transport_start_reading(exec_ctx, transport, - args->read_buffer); + grpc_chttp2_transport_start_reading(exec_ctx, transport, args->read_buffer); grpc_channel_args_destroy(args->args); } pending_handshake_manager_remove_locked(connection_state->server_state, @@ -150,14 +149,14 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { - server_state* state = arg; + server_state *state = arg; gpr_mu_lock(&state->mu); if (state->shutdown) { gpr_mu_unlock(&state->mu); grpc_endpoint_destroy(exec_ctx, tcp); return; } - grpc_handshake_manager* handshake_mgr = grpc_handshake_manager_create(); + grpc_handshake_manager *handshake_mgr = grpc_handshake_manager_create(); pending_handshake_manager_add_locked(state, handshake_mgr); gpr_mu_unlock(&state->mu); grpc_tcp_server_ref(state->tcp_server); @@ -173,8 +172,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); grpc_handshake_manager_do_handshake( exec_ctx, connection_state->handshake_mgr, tcp, - grpc_server_get_channel_args(state->server), - deadline, acceptor, on_handshake_done, connection_state); + grpc_server_get_channel_args(state->server), deadline, acceptor, + on_handshake_done, connection_state); } /* Server callback: start listening on our ports */ @@ -239,14 +238,13 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { if (err != GRPC_ERROR_NONE) { goto error; } - server_state* state = gpr_malloc(sizeof(*state)); + server_state *state = gpr_malloc(sizeof(*state)); memset(state, 0, sizeof(*state)); grpc_closure_init(&state->tcp_server_shutdown_complete, tcp_server_shutdown_complete, state); - err = grpc_tcp_server_create(&exec_ctx, - &state->tcp_server_shutdown_complete, - grpc_server_get_channel_args(server), - &tcp_server); + err = + grpc_tcp_server_create(&exec_ctx, &state->tcp_server_shutdown_complete, + grpc_server_get_channel_args(server), &tcp_server); if (err != GRPC_ERROR_NONE) { goto error; } @@ -259,8 +257,8 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { const size_t naddrs = resolved->naddrs; errors = gpr_malloc(sizeof(*errors) * naddrs); for (i = 0; i < naddrs; i++) { - errors[i] = grpc_tcp_server_add_port(tcp_server, &resolved->addrs[i], - &port_temp); + errors[i] = + grpc_tcp_server_add_port(tcp_server, &resolved->addrs[i], &port_temp); if (errors[i] == GRPC_ERROR_NONE) { if (port_num == -1) { port_num = port_temp; @@ -293,8 +291,8 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { grpc_resolved_addresses_destroy(resolved); /* Register with the server only upon success */ - grpc_server_add_listener(&exec_ctx, server, state, - server_start_listener, server_destroy_listener); + grpc_server_add_listener(&exec_ctx, server, state, server_start_listener, + server_destroy_listener); goto done; /* Error path: cleanup and return */ diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 19aa22c7c4..8d2371c917 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -55,7 +55,7 @@ #include "src/core/lib/surface/server.h" typedef struct pending_handshake_manager_node { - grpc_handshake_manager* handshake_mgr; + grpc_handshake_manager *handshake_mgr; struct pending_handshake_manager_node *next; } pending_handshake_manager_node; @@ -79,17 +79,17 @@ typedef struct server_secure_connection_state { } server_secure_connection_state; static void pending_handshake_manager_add_locked( - server_secure_state* state, grpc_handshake_manager* handshake_mgr) { - pending_handshake_manager_node* node = gpr_malloc(sizeof(*node)); + server_secure_state *state, grpc_handshake_manager *handshake_mgr) { + pending_handshake_manager_node *node = gpr_malloc(sizeof(*node)); node->handshake_mgr = handshake_mgr; node->next = state->pending_handshake_mgrs; state->pending_handshake_mgrs = node; } static void pending_handshake_manager_remove_locked( - server_secure_state* state, grpc_handshake_manager* handshake_mgr) { - pending_handshake_manager_node** prev_node = &state->pending_handshake_mgrs; - for (pending_handshake_manager_node* node = state->pending_handshake_mgrs; + server_secure_state *state, grpc_handshake_manager *handshake_mgr) { + pending_handshake_manager_node **prev_node = &state->pending_handshake_mgrs; + for (pending_handshake_manager_node *node = state->pending_handshake_mgrs; node != NULL; node = node->next) { if (node->handshake_mgr == handshake_mgr) { *prev_node = node->next; @@ -101,9 +101,9 @@ static void pending_handshake_manager_remove_locked( } static void pending_handshake_manager_shutdown_locked( - grpc_exec_ctx* exec_ctx, server_secure_state* state) { - pending_handshake_manager_node* prev_node = NULL; - for (pending_handshake_manager_node* node = state->pending_handshake_mgrs; + grpc_exec_ctx *exec_ctx, server_secure_state *state) { + pending_handshake_manager_node *prev_node = NULL; + for (pending_handshake_manager_node *node = state->pending_handshake_mgrs; node != NULL; node = node->next) { grpc_handshake_manager_shutdown(exec_ctx, node->handshake_mgr); gpr_free(prev_node); @@ -136,19 +136,18 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, gpr_free(args->read_buffer); } } else { - grpc_arg channel_arg = grpc_server_credentials_to_arg( - connection_state->server_state->creds); + grpc_arg channel_arg = + grpc_server_credentials_to_arg(connection_state->server_state->creds); grpc_channel_args *args_copy = - grpc_channel_args_copy_and_add(args->args, &channel_arg, 1); + grpc_channel_args_copy_and_add(args->args, &channel_arg, 1); grpc_channel_args_destroy(args->args); grpc_transport *transport = - grpc_create_chttp2_transport(exec_ctx, args_copy, args->endpoint, 0); + grpc_create_chttp2_transport(exec_ctx, args_copy, args->endpoint, 0); grpc_server_setup_transport( - exec_ctx, connection_state->server_state->server, transport, - connection_state->accepting_pollset, args_copy); + exec_ctx, connection_state->server_state->server, transport, + connection_state->accepting_pollset, args_copy); grpc_channel_args_destroy(args_copy); - grpc_chttp2_transport_start_reading(exec_ctx, transport, - args->read_buffer); + grpc_chttp2_transport_start_reading(exec_ctx, transport, args->read_buffer); } pending_handshake_manager_remove_locked(connection_state->server_state, connection_state->handshake_mgr); @@ -168,7 +167,7 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_endpoint_destroy(exec_ctx, tcp); return; } - grpc_handshake_manager* handshake_mgr = grpc_handshake_manager_create(); + grpc_handshake_manager *handshake_mgr = grpc_handshake_manager_create(); pending_handshake_manager_add_locked(state, handshake_mgr); gpr_mu_unlock(&state->mu); grpc_tcp_server_ref(state->tcp_server); @@ -186,8 +185,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); grpc_handshake_manager_do_handshake( exec_ctx, connection_state->handshake_mgr, tcp, - grpc_server_get_channel_args(state->server), - deadline, acceptor, on_handshake_done, connection_state); + grpc_server_get_channel_args(state->server), deadline, acceptor, + on_handshake_done, connection_state); } /* Server callback: start listening on our ports */ @@ -283,10 +282,9 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, memset(state, 0, sizeof(*state)); grpc_closure_init(&state->tcp_server_shutdown_complete, tcp_server_shutdown_complete, state); - err = grpc_tcp_server_create(&exec_ctx, - &state->tcp_server_shutdown_complete, - grpc_server_get_channel_args(server), - &tcp_server); + err = + grpc_tcp_server_create(&exec_ctx, &state->tcp_server_shutdown_complete, + grpc_server_get_channel_args(server), &tcp_server); if (err != GRPC_ERROR_NONE) { goto error; } @@ -340,8 +338,8 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_resolved_addresses_destroy(resolved); /* Register with the server only upon success */ - grpc_server_add_listener(&exec_ctx, server, state, - server_start_listener, server_destroy_listener); + grpc_server_add_listener(&exec_ctx, server, state, server_start_listener, + server_destroy_listener); grpc_exec_ctx_finish(&exec_ctx); return port_num; diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index 1a6d31a75d..5fc1893554 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -162,7 +162,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_slice_buffer_destroy(args->read_buffer); gpr_free(args->read_buffer); if (error != GRPC_ERROR_NONE) { - const char* msg = grpc_error_string(error); + const char *msg = grpc_error_string(error); gpr_log(GPR_ERROR, "Secure transport setup failed: %s", msg); grpc_error_free_string(msg); c->func(exec_ctx, c->arg, NULL); @@ -198,8 +198,8 @@ static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(httpcli_ssl_channel_security_connector_create( pem_root_certs, pem_root_certs_size, host, &sc) == GRPC_SECURITY_OK); - grpc_httpcli_ssl_channel_security_connector* httpcli_connector = - (grpc_httpcli_ssl_channel_security_connector*)sc; + grpc_httpcli_ssl_channel_security_connector *httpcli_connector = + (grpc_httpcli_ssl_channel_security_connector *)sc; grpc_channel_security_connector_create_handshakers( exec_ctx, sc, httpcli_connector->handshake_mgr); grpc_handshake_manager_do_handshake( diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index cb2e8a2d9a..a2e0c7c7c7 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -238,9 +238,7 @@ static void fake_channel_destroy(grpc_security_connector *sc) { gpr_free(sc); } -static void fake_server_destroy(grpc_security_connector *sc) { - gpr_free(sc); -} +static void fake_server_destroy(grpc_security_connector *sc) { gpr_free(sc); } static void fake_check_peer(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer, @@ -387,15 +385,15 @@ static grpc_security_status ssl_create_handshaker( static void ssl_channel_create_handshakers( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_handshake_manager *handshake_mgr) { - grpc_ssl_channel_security_connector* c = - (grpc_ssl_channel_security_connector*)sc; + grpc_ssl_channel_security_connector *c = + (grpc_ssl_channel_security_connector *)sc; // Instantiate TSI handshaker. tsi_handshaker *tsi_hs = NULL; - ssl_create_handshaker( - c->handshaker_factory, true /* is_client */, - c->overridden_target_name != NULL ? c->overridden_target_name - : c->target_name, - &tsi_hs); + ssl_create_handshaker(c->handshaker_factory, true /* is_client */, + c->overridden_target_name != NULL + ? c->overridden_target_name + : c->target_name, + &tsi_hs); // Create handshakers. grpc_security_create_handshakers(exec_ctx, tsi_hs, &sc->base, handshake_mgr); } @@ -403,13 +401,12 @@ static void ssl_channel_create_handshakers( static void ssl_server_create_handshakers( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_handshake_manager *handshake_mgr) { - grpc_ssl_server_security_connector* c = - (grpc_ssl_server_security_connector*)sc; + grpc_ssl_server_security_connector *c = + (grpc_ssl_server_security_connector *)sc; // Instantiate TSI handshaker. tsi_handshaker *tsi_hs = NULL; - ssl_create_handshaker( - c->handshaker_factory, false /* is_client */, NULL /* peer_name */, - &tsi_hs); + ssl_create_handshaker(c->handshaker_factory, false /* is_client */, + NULL /* peer_name */, &tsi_hs); // Create handshakers. grpc_security_create_handshakers(exec_ctx, tsi_hs, &sc->base, handshake_mgr); } @@ -475,8 +472,8 @@ static grpc_error *ssl_check_peer(grpc_security_connector *sc, const tsi_peer_property *p = tsi_peer_get_property_by_name(peer, TSI_SSL_ALPN_SELECTED_PROTOCOL); if (p == NULL) { - return GRPC_ERROR_CREATE("Cannot check peer: " - "missing selected ALPN property."); + return GRPC_ERROR_CREATE( + "Cannot check peer: missing selected ALPN property."); } if (!grpc_chttp2_is_alpn_version_supported(p->value.data, p->value.length)) { return GRPC_ERROR_CREATE("Cannot check peer: invalid ALPN value."); diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h index 0e4e0aa720..696db0e02e 100644 --- a/src/core/lib/security/transport/security_connector.h +++ b/src/core/lib/security/transport/security_connector.h @@ -133,9 +133,9 @@ struct grpc_channel_security_connector { grpc_channel_security_connector *sc, const char *host, grpc_auth_context *auth_context, grpc_security_call_host_check_cb cb, void *user_data); - void (*create_handshakers)( - grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, - grpc_handshake_manager *handshake_mgr); + void (*create_handshakers)(grpc_exec_ctx *exec_ctx, + grpc_channel_security_connector *sc, + grpc_handshake_manager *handshake_mgr); }; /* Checks that the host that will be set for a call is acceptable. */ @@ -158,9 +158,9 @@ typedef struct grpc_server_security_connector grpc_server_security_connector; struct grpc_server_security_connector { grpc_security_connector base; - void (*create_handshakers)( - grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, - grpc_handshake_manager *handshake_mgr); + void (*create_handshakers)(grpc_exec_ctx *exec_ctx, + grpc_server_security_connector *sc, + grpc_handshake_manager *handshake_mgr); }; void grpc_server_security_connector_create_handshakers( diff --git a/src/core/lib/security/transport/security_handshaker.c b/src/core/lib/security/transport/security_handshaker.c index 61144bf436..65982bbc85 100644 --- a/src/core/lib/security/transport/security_handshaker.c +++ b/src/core/lib/security/transport/security_handshaker.c @@ -64,8 +64,8 @@ typedef struct { grpc_slice_buffer *read_buffer_to_destroy; // State saved while performing the handshake. - grpc_handshaker_args* args; - grpc_closure* on_handshake_done; + grpc_handshaker_args *args; + grpc_closure *on_handshake_done; unsigned char *handshake_buffer; size_t handshake_buffer_size; @@ -156,9 +156,8 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *arg, } // Success. // Create secure endpoint. - h->args->endpoint = - grpc_secure_endpoint_create(protector, h->args->endpoint, - h->left_overs.slices, h->left_overs.count); + h->args->endpoint = grpc_secure_endpoint_create( + protector, h->args->endpoint, h->left_overs.slices, h->left_overs.count); h->left_overs.count = 0; h->left_overs.length = 0; // Clear out the read buffer before it gets passed to the transport, @@ -166,7 +165,7 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *arg, grpc_slice_buffer_reset_and_unref(h->args->read_buffer); // Add auth context to channel args. grpc_arg auth_context_arg = grpc_auth_context_to_arg(h->auth_context); - grpc_channel_args* tmp_args = h->args->args; + grpc_channel_args *tmp_args = h->args->args; h->args->args = grpc_channel_args_copy_and_add(tmp_args, &auth_context_arg, 1); grpc_channel_args_destroy(tmp_args); @@ -180,7 +179,7 @@ done: security_handshaker_unref(exec_ctx, h); } -static grpc_error* check_peer_locked(grpc_exec_ctx *exec_ctx, +static grpc_error *check_peer_locked(grpc_exec_ctx *exec_ctx, security_handshaker *h) { tsi_peer peer; tsi_result result = tsi_handshaker_extract_peer(h->handshaker, &peer); @@ -193,7 +192,7 @@ static grpc_error* check_peer_locked(grpc_exec_ctx *exec_ctx, return GRPC_ERROR_NONE; } -static grpc_error* send_handshake_bytes_to_peer_locked(grpc_exec_ctx *exec_ctx, +static grpc_error *send_handshake_bytes_to_peer_locked(grpc_exec_ctx *exec_ctx, security_handshaker *h) { // Get data to send. tsi_result result = TSI_OK; @@ -265,9 +264,8 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, } if (result != TSI_OK) { security_handshake_failed_locked( - exec_ctx, h, - grpc_set_tsi_error_result(GRPC_ERROR_CREATE("Handshake failed"), - result)); + exec_ctx, h, grpc_set_tsi_error_result( + GRPC_ERROR_CREATE("Handshake failed"), result)); gpr_mu_unlock(&h->mu); security_handshaker_unref(exec_ctx, h); return; @@ -276,16 +274,15 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, bool has_left_overs_in_current_slice = (consumed_slice_size < GRPC_SLICE_LENGTH(h->args->read_buffer->slices[i])); - size_t num_left_overs = - (has_left_overs_in_current_slice ? 1 : 0) - + h->args->read_buffer->count - i - 1; + size_t num_left_overs = (has_left_overs_in_current_slice ? 1 : 0) + + h->args->read_buffer->count - i - 1; if (num_left_overs > 0) { /* Put the leftovers in our buffer (ownership transfered). */ if (has_left_overs_in_current_slice) { grpc_slice_buffer_add( &h->left_overs, grpc_slice_split_tail(&h->args->read_buffer->slices[i], - consumed_slice_size)); + consumed_slice_size)); /* split_tail above increments refcount. */ grpc_slice_unref(h->args->read_buffer->slices[i]); } @@ -305,8 +302,8 @@ done: gpr_mu_unlock(&h->mu); } -static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, - void *arg, grpc_error *error) { +static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { security_handshaker *h = arg; gpr_mu_lock(&h->mu); if (error != GRPC_ERROR_NONE || h->shutdown) { @@ -337,15 +334,15 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, // public handshaker API // -static void security_handshaker_destroy(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { - security_handshaker* h = (security_handshaker*)handshaker; +static void security_handshaker_destroy(grpc_exec_ctx *exec_ctx, + grpc_handshaker *handshaker) { + security_handshaker *h = (security_handshaker *)handshaker; security_handshaker_unref(exec_ctx, h); } -static void security_handshaker_shutdown(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { - security_handshaker *h = (security_handshaker*)handshaker; +static void security_handshaker_shutdown(grpc_exec_ctx *exec_ctx, + grpc_handshaker *handshaker) { + security_handshaker *h = (security_handshaker *)handshaker; gpr_mu_lock(&h->mu); if (!h->shutdown) { h->shutdown = true; @@ -355,16 +352,17 @@ static void security_handshaker_shutdown(grpc_exec_ctx* exec_ctx, gpr_mu_unlock(&h->mu); } -static void security_handshaker_do_handshake( - grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, - grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, - grpc_handshaker_args* args) { - security_handshaker* h = (security_handshaker*)handshaker; +static void security_handshaker_do_handshake(grpc_exec_ctx *exec_ctx, + grpc_handshaker *handshaker, + grpc_tcp_server_acceptor *acceptor, + grpc_closure *on_handshake_done, + grpc_handshaker_args *args) { + security_handshaker *h = (security_handshaker *)handshaker; gpr_mu_lock(&h->mu); h->args = args; h->on_handshake_done = on_handshake_done; gpr_ref(&h->refs); - grpc_error* error = send_handshake_bytes_to_peer_locked(exec_ctx, h); + grpc_error *error = send_handshake_bytes_to_peer_locked(exec_ctx, h); if (error != GRPC_ERROR_NONE) { security_handshake_failed_locked(exec_ctx, h, error); gpr_mu_unlock(&h->mu); @@ -375,10 +373,10 @@ static void security_handshaker_do_handshake( } static const grpc_handshaker_vtable security_handshaker_vtable = { - security_handshaker_destroy, security_handshaker_shutdown, - security_handshaker_do_handshake}; + security_handshaker_destroy, security_handshaker_shutdown, + security_handshaker_do_handshake}; -static grpc_handshaker* security_handshaker_create( +static grpc_handshaker *security_handshaker_create( grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, grpc_security_connector *connector) { security_handshaker *h = gpr_malloc(sizeof(security_handshaker)); @@ -404,29 +402,30 @@ static grpc_handshaker* security_handshaker_create( // fail_handshaker // -static void fail_handshaker_destroy(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { +static void fail_handshaker_destroy(grpc_exec_ctx *exec_ctx, + grpc_handshaker *handshaker) { gpr_free(handshaker); } -static void fail_handshaker_shutdown(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) {} - -static void fail_handshaker_do_handshake( - grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, - grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, - grpc_handshaker_args* args) { - grpc_exec_ctx_sched( - exec_ctx, on_handshake_done, - GRPC_ERROR_CREATE("Failed to create security handshaker"), NULL); +static void fail_handshaker_shutdown(grpc_exec_ctx *exec_ctx, + grpc_handshaker *handshaker) {} + +static void fail_handshaker_do_handshake(grpc_exec_ctx *exec_ctx, + grpc_handshaker *handshaker, + grpc_tcp_server_acceptor *acceptor, + grpc_closure *on_handshake_done, + grpc_handshaker_args *args) { + grpc_exec_ctx_sched(exec_ctx, on_handshake_done, + GRPC_ERROR_CREATE("Failed to create security handshaker"), + NULL); } static const grpc_handshaker_vtable fail_handshaker_vtable = { - fail_handshaker_destroy, fail_handshaker_shutdown, - fail_handshaker_do_handshake}; + fail_handshaker_destroy, fail_handshaker_shutdown, + fail_handshaker_do_handshake}; -static grpc_handshaker* fail_handshaker_create() { - grpc_handshaker* h = gpr_malloc(sizeof(*h)); +static grpc_handshaker *fail_handshaker_create() { + grpc_handshaker *h = gpr_malloc(sizeof(*h)); grpc_handshaker_init(&fail_handshaker_vtable, h); return h; } @@ -435,9 +434,10 @@ static grpc_handshaker* fail_handshaker_create() { // exported functions // -void grpc_security_create_handshakers( - grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, - grpc_security_connector *connector, grpc_handshake_manager *handshake_mgr) { +void grpc_security_create_handshakers(grpc_exec_ctx *exec_ctx, + tsi_handshaker *handshaker, + grpc_security_connector *connector, + grpc_handshake_manager *handshake_mgr) { // If no TSI handshaker was created, add a handshaker that always fails. // Otherwise, add a real security handshaker. if (handshaker == NULL) { diff --git a/src/core/lib/security/transport/security_handshaker.h b/src/core/lib/security/transport/security_handshaker.h index 9d4157e869..f71f43a359 100644 --- a/src/core/lib/security/transport/security_handshaker.h +++ b/src/core/lib/security/transport/security_handshaker.h @@ -39,8 +39,9 @@ /// Creates any necessary security handshakers and adds them to /// \a handshake_mgr. -void grpc_security_create_handshakers( - grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, - grpc_security_connector *connector, grpc_handshake_manager *handshake_mgr); +void grpc_security_create_handshakers(grpc_exec_ctx *exec_ctx, + tsi_handshaker *handshaker, + grpc_security_connector *connector, + grpc_handshake_manager *handshake_mgr); #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H */ diff --git a/test/core/security/ssl_server_fuzzer.c b/test/core/security/ssl_server_fuzzer.c index 32ef60b3b1..ca629a6eba 100644 --- a/test/core/security/ssl_server_fuzzer.c +++ b/test/core/security/ssl_server_fuzzer.c @@ -113,10 +113,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_handshake_manager *handshake_mgr = grpc_handshake_manager_create(); grpc_server_security_connector_create_handshakers(&exec_ctx, sc, handshake_mgr); - grpc_handshake_manager_do_handshake(&exec_ctx, handshake_mgr, mock_endpoint, - NULL /* channel_args */, deadline, - NULL /* acceptor */, on_handshake_done, - &state); + grpc_handshake_manager_do_handshake( + &exec_ctx, handshake_mgr, mock_endpoint, NULL /* channel_args */, + deadline, NULL /* acceptor */, on_handshake_done, &state); grpc_exec_ctx_flush(&exec_ctx); // If the given string happens to be part of the correct client hello, the -- cgit v1.2.3 From bd913a8637594e7432571a543a28095bf453a09f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 2 Dec 2016 16:47:35 +0000 Subject: Fix asan failures. --- src/core/lib/http/httpcli_security_connector.c | 35 +++++++--------------- .../lib/security/transport/security_handshaker.c | 4 +-- 2 files changed, 12 insertions(+), 27 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index 5fc1893554..0ab34d00e4 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -47,26 +47,17 @@ typedef struct { grpc_channel_security_connector base; tsi_ssl_handshaker_factory *handshaker_factory; - grpc_handshake_manager *handshake_mgr; char *secure_peer_name; } grpc_httpcli_ssl_channel_security_connector; static void httpcli_ssl_destroy(grpc_security_connector *sc) { - // TODO(roth, ctiller): Once https://github.com/grpc/grpc/pull/8705 is - // merged, change this to use the passed-in exec_ctx instead of creating - // its own. - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_httpcli_ssl_channel_security_connector *c = (grpc_httpcli_ssl_channel_security_connector *)sc; if (c->handshaker_factory != NULL) { tsi_ssl_handshaker_factory_destroy(c->handshaker_factory); } - if (c->handshake_mgr != NULL) { - grpc_handshake_manager_destroy(&exec_ctx, c->handshake_mgr); - } if (c->secure_peer_name != NULL) gpr_free(c->secure_peer_name); gpr_free(sc); - grpc_exec_ctx_finish(&exec_ctx); } static void httpcli_ssl_create_handshakers( @@ -141,7 +132,6 @@ static grpc_security_status httpcli_ssl_channel_security_connector_create( *sc = NULL; return GRPC_SECURITY_ERROR; } - c->handshake_mgr = grpc_handshake_manager_create(); c->base.create_handshakers = httpcli_ssl_create_handshakers; *sc = &c->base; return GRPC_SECURITY_OK; @@ -152,29 +142,25 @@ static grpc_security_status httpcli_ssl_channel_security_connector_create( typedef struct { void (*func)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *endpoint); void *arg; + grpc_handshake_manager *handshake_mgr; } on_done_closure; static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_handshaker_args *args = arg; on_done_closure *c = args->user_data; - grpc_channel_args_destroy(args->args); - grpc_slice_buffer_destroy(args->read_buffer); - gpr_free(args->read_buffer); if (error != GRPC_ERROR_NONE) { const char *msg = grpc_error_string(error); gpr_log(GPR_ERROR, "Secure transport setup failed: %s", msg); grpc_error_free_string(msg); c->func(exec_ctx, c->arg, NULL); - // TODO(ctiller): It is currently necessary to shutdown endpoints - // before destroying them, even if we know that there are no - // pending read/write callbacks. This should be fixed, at which - // point this can be removed. - grpc_endpoint_shutdown(exec_ctx, args->endpoint); - grpc_endpoint_destroy(exec_ctx, args->endpoint); } else { + grpc_channel_args_destroy(args->args); + grpc_slice_buffer_destroy(args->read_buffer); + gpr_free(args->read_buffer); c->func(exec_ctx, c->arg, args->endpoint); } + grpc_handshake_manager_destroy(exec_ctx, c->handshake_mgr); gpr_free(c); } @@ -195,16 +181,15 @@ static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg, } c->func = on_done; c->arg = arg; + c->handshake_mgr = grpc_handshake_manager_create(); GPR_ASSERT(httpcli_ssl_channel_security_connector_create( pem_root_certs, pem_root_certs_size, host, &sc) == GRPC_SECURITY_OK); - grpc_httpcli_ssl_channel_security_connector *httpcli_connector = - (grpc_httpcli_ssl_channel_security_connector *)sc; - grpc_channel_security_connector_create_handshakers( - exec_ctx, sc, httpcli_connector->handshake_mgr); + grpc_channel_security_connector_create_handshakers(exec_ctx, sc, + c->handshake_mgr); grpc_handshake_manager_do_handshake( - exec_ctx, httpcli_connector->handshake_mgr, tcp, NULL /* channel_args */, - deadline, NULL /* acceptor */, on_handshake_done, c /* user_data */); + exec_ctx, c->handshake_mgr, tcp, NULL /* channel_args */, deadline, + NULL /* acceptor */, on_handshake_done, c /* user_data */); GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "httpcli"); } diff --git a/src/core/lib/security/transport/security_handshaker.c b/src/core/lib/security/transport/security_handshaker.c index 65982bbc85..fc01bec2f2 100644 --- a/src/core/lib/security/transport/security_handshaker.c +++ b/src/core/lib/security/transport/security_handshaker.c @@ -81,8 +81,7 @@ static void security_handshaker_unref(grpc_exec_ctx *exec_ctx, security_handshaker *h) { if (gpr_unref(&h->refs)) { gpr_mu_destroy(&h->mu); - if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker); - if (h->handshake_buffer != NULL) gpr_free(h->handshake_buffer); + tsi_handshaker_destroy(h->handshaker); if (h->endpoint_to_destroy != NULL) { grpc_endpoint_destroy(exec_ctx, h->endpoint_to_destroy); } @@ -90,6 +89,7 @@ static void security_handshaker_unref(grpc_exec_ctx *exec_ctx, grpc_slice_buffer_destroy(h->read_buffer_to_destroy); gpr_free(h->read_buffer_to_destroy); } + gpr_free(h->handshake_buffer); grpc_slice_buffer_destroy(&h->left_overs); grpc_slice_buffer_destroy(&h->outgoing); GRPC_AUTH_CONTEXT_UNREF(h->auth_context, "handshake"); -- cgit v1.2.3 From 714038204a897c4eb7064686181b447f3dfa9da5 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 2 Dec 2016 10:51:39 -0800 Subject: Use the same server code for both secure and insecure servers. --- BUILD | 8 + CMakeLists.txt | 3 + Makefile | 3 + binding.gyp | 1 + build.yaml | 10 + config.m4 | 2 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + .../ext/transport/chttp2/server/chttp2_server.c | 355 +++++++++++++++++++++ .../ext/transport/chttp2/server/chttp2_server.h | 79 +++++ .../chttp2/server/insecure/server_chttp2.c | 283 +--------------- .../chttp2/server/secure/server_secure_chttp2.c | 346 +++----------------- src/python/grpcio/grpc_core_dependencies.py | 1 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 23 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 + 20 files changed, 572 insertions(+), 569 deletions(-) create mode 100644 src/core/ext/transport/chttp2/server/chttp2_server.c create mode 100644 src/core/ext/transport/chttp2/server/chttp2_server.h (limited to 'src/core') diff --git a/BUILD b/BUILD index 1ee5fd3dac..ab0fc237b7 100644 --- a/BUILD +++ b/BUILD @@ -298,6 +298,7 @@ cc_library( "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/transport/chttp2/server/chttp2_server.h", "src/core/ext/client_channel/client_channel.h", "src/core/ext/client_channel/client_channel_factory.h", "src/core/ext/client_channel/connector.h", @@ -493,6 +494,7 @@ cc_library( "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/server/chttp2_server.c", "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", "src/core/ext/client_channel/channel_connectivity.c", "src/core/ext/client_channel/client_channel.c", @@ -1101,6 +1103,7 @@ cc_library( "src/core/ext/transport/chttp2/transport/stream_map.h", "src/core/ext/transport/chttp2/transport/varint.h", "src/core/ext/transport/chttp2/alpn/alpn.h", + "src/core/ext/transport/chttp2/server/chttp2_server.h", "src/core/ext/transport/chttp2/client/chttp2_connector.h", "src/core/ext/client_channel/client_channel.h", "src/core/ext/client_channel/client_channel_factory.h", @@ -1271,6 +1274,7 @@ cc_library( "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/ext/transport/chttp2/server/chttp2_server.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", "src/core/ext/transport/chttp2/client/chttp2_connector.c", @@ -1655,6 +1659,7 @@ cc_library( "src/core/ext/client_channel/subchannel.h", "src/core/ext/client_channel/subchannel_index.h", "src/core/ext/client_channel/uri_parser.h", + "src/core/ext/transport/chttp2/server/chttp2_server.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/base_resources.h", "src/core/ext/census/census_interface.h", @@ -1856,6 +1861,7 @@ cc_library( "src/core/ext/client_channel/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", + "src/core/ext/transport/chttp2/server/chttp2_server.c", "src/core/ext/census/base_resources.c", "src/core/ext/census/context.c", "src/core/ext/census/gen/census.pb.c", @@ -2486,6 +2492,7 @@ objc_library( "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/server/chttp2_server.c", "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", "src/core/ext/client_channel/channel_connectivity.c", "src/core/ext/client_channel/client_channel.c", @@ -2706,6 +2713,7 @@ objc_library( "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/transport/chttp2/server/chttp2_server.h", "src/core/ext/client_channel/client_channel.h", "src/core/ext/client_channel/client_channel_factory.h", "src/core/ext/client_channel/connector.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 66f740fe28..ff0927504a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -447,6 +447,7 @@ add_library(grpc 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/server/chttp2_server.c src/core/ext/transport/chttp2/client/secure/secure_channel_create.c src/core/ext/client_channel/channel_connectivity.c src/core/ext/client_channel/client_channel.c @@ -953,6 +954,7 @@ add_library(grpc_unsecure 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/ext/transport/chttp2/server/chttp2_server.c src/core/ext/transport/chttp2/client/insecure/channel_create.c src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c src/core/ext/transport/chttp2/client/chttp2_connector.c @@ -1416,6 +1418,7 @@ add_library(grpc++_cronet src/core/ext/client_channel/uri_parser.c src/core/ext/transport/chttp2/server/insecure/server_chttp2.c src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c + src/core/ext/transport/chttp2/server/chttp2_server.c src/core/ext/census/base_resources.c src/core/ext/census/context.c src/core/ext/census/gen/census.pb.c diff --git a/Makefile b/Makefile index e80a10e443..db30c21586 100644 --- a/Makefile +++ b/Makefile @@ -2786,6 +2786,7 @@ LIBGRPC_SRC = \ 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/server/chttp2_server.c \ src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \ src/core/ext/client_channel/channel_connectivity.c \ src/core/ext/client_channel/client_channel.c \ @@ -3564,6 +3565,7 @@ LIBGRPC_UNSECURE_SRC = \ 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/ext/transport/chttp2/server/chttp2_server.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ src/core/ext/transport/chttp2/client/chttp2_connector.c \ @@ -4139,6 +4141,7 @@ LIBGRPC++_CRONET_SRC = \ src/core/ext/client_channel/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ + src/core/ext/transport/chttp2/server/chttp2_server.c \ src/core/ext/census/base_resources.c \ src/core/ext/census/context.c \ src/core/ext/census/gen/census.pb.c \ diff --git a/binding.gyp b/binding.gyp index 8b1f5131fc..516cbdce5d 100644 --- a/binding.gyp +++ b/binding.gyp @@ -727,6 +727,7 @@ '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/server/chttp2_server.c', 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c', 'src/core/ext/client_channel/channel_connectivity.c', 'src/core/ext/client_channel/client_channel.c', diff --git a/build.yaml b/build.yaml index 1b95b2098e..68d19a6b44 100644 --- a/build.yaml +++ b/build.yaml @@ -647,6 +647,14 @@ filegroups: - grpc_client_channel - grpc_secure - grpc_transport_chttp2_client_connector +- name: grpc_transport_chttp2_server + headers: + - src/core/ext/transport/chttp2/server/chttp2_server.h + src: + - src/core/ext/transport/chttp2/server/chttp2_server.c + uses: + - grpc_transport_chttp2 + - grpc_base - name: grpc_transport_chttp2_server_insecure src: - src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -654,6 +662,7 @@ filegroups: uses: - grpc_transport_chttp2 - grpc_base + - grpc_transport_chttp2_server - name: grpc_transport_chttp2_server_secure src: - src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -661,6 +670,7 @@ filegroups: - grpc_transport_chttp2 - grpc_base - grpc_secure + - grpc_transport_chttp2_server - name: grpc_transport_cronet_client_secure public_headers: - include/grpc/grpc_cronet.h diff --git a/config.m4 b/config.m4 index 5f48cf04a0..4b86e25581 100644 --- a/config.m4 +++ b/config.m4 @@ -243,6 +243,7 @@ if test "$PHP_GRPC" != "no"; then 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/server/chttp2_server.c \ src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \ src/core/ext/client_channel/channel_connectivity.c \ src/core/ext/client_channel/client_channel.c \ @@ -613,6 +614,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client/insecure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client/secure) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/insecure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/secure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/transport) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 8ea6eca6a5..04f7211d21 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -387,6 +387,7 @@ Pod::Spec.new do |s| '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/transport/chttp2/server/chttp2_server.h', 'src/core/ext/client_channel/client_channel.h', 'src/core/ext/client_channel/client_channel_factory.h', 'src/core/ext/client_channel/connector.h', @@ -586,6 +587,7 @@ Pod::Spec.new do |s| '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/server/chttp2_server.c', 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c', 'src/core/ext/client_channel/channel_connectivity.c', 'src/core/ext/client_channel/client_channel.c', @@ -792,6 +794,7 @@ Pod::Spec.new do |s| '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/transport/chttp2/server/chttp2_server.h', 'src/core/ext/client_channel/client_channel.h', 'src/core/ext/client_channel/client_channel_factory.h', 'src/core/ext/client_channel/connector.h', diff --git a/grpc.gemspec b/grpc.gemspec index 9fe6512673..6019b97f67 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -306,6 +306,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/tsi/ssl_types.h ) s.files += %w( src/core/lib/tsi/transport_security.h ) s.files += %w( src/core/lib/tsi/transport_security_interface.h ) + s.files += %w( src/core/ext/transport/chttp2/server/chttp2_server.h ) s.files += %w( src/core/ext/client_channel/client_channel.h ) s.files += %w( src/core/ext/client_channel/client_channel_factory.h ) s.files += %w( src/core/ext/client_channel/connector.h ) @@ -505,6 +506,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/tsi/fake_transport_security.c ) s.files += %w( src/core/lib/tsi/ssl_transport_security.c ) s.files += %w( src/core/lib/tsi/transport_security.c ) + s.files += %w( src/core/ext/transport/chttp2/server/chttp2_server.c ) s.files += %w( src/core/ext/transport/chttp2/client/secure/secure_channel_create.c ) s.files += %w( src/core/ext/client_channel/channel_connectivity.c ) s.files += %w( src/core/ext/client_channel/client_channel.c ) diff --git a/package.xml b/package.xml index 7f2c6130ff..61668815a6 100644 --- a/package.xml +++ b/package.xml @@ -314,6 +314,7 @@ + @@ -513,6 +514,7 @@ + diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c new file mode 100644 index 0000000000..9282d7ef89 --- /dev/null +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -0,0 +1,355 @@ +/* + * + * Copyright 2015, 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 "src/core/ext/transport/chttp2/server/chttp2_server.h" + +#include + +#include + +#include +#include +#include +#include +#include + +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/handshaker.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/server.h" + +void grpc_chttp2_server_handshaker_factory_create_handshakers( + grpc_exec_ctx *exec_ctx, + grpc_chttp2_server_handshaker_factory *handshaker_factory, + grpc_handshake_manager *handshake_mgr) { + if (handshaker_factory != NULL) { + handshaker_factory->vtable->create_handshakers( + exec_ctx, handshaker_factory, handshake_mgr); + } +} + +void grpc_chttp2_server_handshaker_factory_destroy( + grpc_exec_ctx *exec_ctx, + grpc_chttp2_server_handshaker_factory *handshaker_factory) { + if (handshaker_factory != NULL) { + handshaker_factory->vtable->destroy(exec_ctx, handshaker_factory); + } +} + + +typedef struct pending_handshake_manager_node { + grpc_handshake_manager *handshake_mgr; + struct pending_handshake_manager_node *next; +} pending_handshake_manager_node; + +typedef struct { + grpc_server *server; + grpc_tcp_server *tcp_server; + grpc_channel_args *args; + grpc_chttp2_server_handshaker_factory *handshaker_factory; + gpr_mu mu; + bool shutdown; + grpc_closure tcp_server_shutdown_complete; + grpc_closure *server_destroy_listener_done; + pending_handshake_manager_node *pending_handshake_mgrs; +} server_state; + +typedef struct { + server_state *server_state; + grpc_pollset *accepting_pollset; + grpc_tcp_server_acceptor *acceptor; + grpc_handshake_manager *handshake_mgr; +} server_connection_state; + +static void pending_handshake_manager_add_locked( + server_state *state, grpc_handshake_manager *handshake_mgr) { + pending_handshake_manager_node *node = gpr_malloc(sizeof(*node)); + node->handshake_mgr = handshake_mgr; + node->next = state->pending_handshake_mgrs; + state->pending_handshake_mgrs = node; +} + +static void pending_handshake_manager_remove_locked( + server_state *state, grpc_handshake_manager *handshake_mgr) { + pending_handshake_manager_node **prev_node = &state->pending_handshake_mgrs; + for (pending_handshake_manager_node *node = state->pending_handshake_mgrs; + node != NULL; node = node->next) { + if (node->handshake_mgr == handshake_mgr) { + *prev_node = node->next; + gpr_free(node); + break; + } + prev_node = &node->next; + } +} + +static void pending_handshake_manager_shutdown_locked(grpc_exec_ctx *exec_ctx, + server_state *state) { + pending_handshake_manager_node *prev_node = NULL; + for (pending_handshake_manager_node *node = state->pending_handshake_mgrs; + node != NULL; node = node->next) { + grpc_handshake_manager_shutdown(exec_ctx, node->handshake_mgr); + gpr_free(prev_node); + prev_node = node; + } + gpr_free(prev_node); + state->pending_handshake_mgrs = NULL; +} + +static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + grpc_handshaker_args *args = arg; + server_connection_state *connection_state = args->user_data; + gpr_mu_lock(&connection_state->server_state->mu); + if (error != GRPC_ERROR_NONE || connection_state->server_state->shutdown) { + const char *error_str = grpc_error_string(error); + gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); + grpc_error_free_string(error_str); + if (error == GRPC_ERROR_NONE) { + // We were shut down after handshaking completed successfully, so + // destroy the endpoint here. + // TODO(ctiller): It is currently necessary to shutdown endpoints + // before destroying them, even if we know that there are no + // pending read/write callbacks. This should be fixed, at which + // point this can be removed. + grpc_endpoint_shutdown(exec_ctx, args->endpoint); + grpc_endpoint_destroy(exec_ctx, args->endpoint); + grpc_channel_args_destroy(args->args); + grpc_slice_buffer_destroy(args->read_buffer); + gpr_free(args->read_buffer); + } + } else { + grpc_transport *transport = + grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 0); + grpc_server_setup_transport( + exec_ctx, connection_state->server_state->server, transport, + connection_state->accepting_pollset, args->args); + grpc_chttp2_transport_start_reading(exec_ctx, transport, args->read_buffer); + grpc_channel_args_destroy(args->args); + } + pending_handshake_manager_remove_locked(connection_state->server_state, + connection_state->handshake_mgr); + gpr_mu_unlock(&connection_state->server_state->mu); + grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); + grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp_server); + gpr_free(connection_state); +} + +static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, + grpc_pollset *accepting_pollset, + grpc_tcp_server_acceptor *acceptor) { + server_state *state = arg; + gpr_mu_lock(&state->mu); + if (state->shutdown) { + gpr_mu_unlock(&state->mu); + grpc_endpoint_destroy(exec_ctx, tcp); + return; + } + grpc_handshake_manager *handshake_mgr = grpc_handshake_manager_create(); + pending_handshake_manager_add_locked(state, handshake_mgr); + gpr_mu_unlock(&state->mu); + grpc_tcp_server_ref(state->tcp_server); + server_connection_state *connection_state = + gpr_malloc(sizeof(*connection_state)); + connection_state->server_state = state; + connection_state->accepting_pollset = accepting_pollset; + connection_state->acceptor = acceptor; + connection_state->handshake_mgr = handshake_mgr; + grpc_chttp2_server_handshaker_factory_create_handshakers( + exec_ctx, state->handshaker_factory, connection_state->handshake_mgr); + // TODO(roth): We should really get this timeout value from channel + // args instead of hard-coding it. + const gpr_timespec deadline = gpr_time_add( + gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); + grpc_handshake_manager_do_handshake( + exec_ctx, connection_state->handshake_mgr, tcp, state->args, deadline, + acceptor, on_handshake_done, connection_state); +} + +/* Server callback: start listening on our ports */ +static void server_start_listener(grpc_exec_ctx *exec_ctx, grpc_server *server, + void *arg, grpc_pollset **pollsets, + size_t pollset_count) { + server_state *state = arg; + gpr_mu_lock(&state->mu); + state->shutdown = false; + gpr_mu_unlock(&state->mu); + grpc_tcp_server_start(exec_ctx, state->tcp_server, pollsets, pollset_count, + on_accept, state); +} + +static void tcp_server_shutdown_complete(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + server_state *state = arg; + /* ensure all threads have unlocked */ + gpr_mu_lock(&state->mu); + grpc_closure *destroy_done = state->server_destroy_listener_done; + GPR_ASSERT(state->shutdown); + pending_handshake_manager_shutdown_locked(exec_ctx, state); + gpr_mu_unlock(&state->mu); + // Flush queued work before destroying handshaker factory, since that + // may do a synchronous unref. + grpc_exec_ctx_flush(exec_ctx); + grpc_chttp2_server_handshaker_factory_destroy(exec_ctx, + state->handshaker_factory); + if (destroy_done != NULL) { + destroy_done->cb(exec_ctx, destroy_done->cb_arg, GRPC_ERROR_REF(error)); + grpc_exec_ctx_flush(exec_ctx); + } + grpc_channel_args_destroy(state->args); + gpr_mu_destroy(&state->mu); + gpr_free(state); +} + +/* Server callback: destroy the tcp listener (so we don't generate further + callbacks) */ +static void server_destroy_listener(grpc_exec_ctx *exec_ctx, + grpc_server *server, void *arg, + grpc_closure *destroy_done) { + server_state *state = arg; + gpr_mu_lock(&state->mu); + state->shutdown = true; + state->server_destroy_listener_done = destroy_done; + grpc_tcp_server *tcp_server = state->tcp_server; + gpr_mu_unlock(&state->mu); + grpc_tcp_server_shutdown_listeners(exec_ctx, tcp_server); + grpc_tcp_server_unref(exec_ctx, tcp_server); +} + +grpc_error *grpc_chttp2_server_add_port( + grpc_exec_ctx *exec_ctx, grpc_server *server, const char *addr, + grpc_channel_args *args, + grpc_chttp2_server_handshaker_factory *handshaker_factory, int *port_num) { + grpc_resolved_addresses *resolved = NULL; + grpc_tcp_server *tcp_server = NULL; + size_t i; + size_t count = 0; + int port_temp; + grpc_error *err = GRPC_ERROR_NONE; + server_state *state = NULL; + + *port_num = -1; + + /* resolve address */ + err = grpc_blocking_resolve_address(addr, "https", &resolved); + if (err != GRPC_ERROR_NONE) { + goto error; + } + state = gpr_malloc(sizeof(*state)); + memset(state, 0, sizeof(*state)); + grpc_closure_init(&state->tcp_server_shutdown_complete, + tcp_server_shutdown_complete, state); + err = + grpc_tcp_server_create(exec_ctx, &state->tcp_server_shutdown_complete, + args, &tcp_server); + if (err != GRPC_ERROR_NONE) { + goto error; + } + + state->server = server; + state->tcp_server = tcp_server; + state->args = args; + state->handshaker_factory = handshaker_factory; + state->shutdown = true; + gpr_mu_init(&state->mu); + + const size_t naddrs = resolved->naddrs; + grpc_error **errors = gpr_malloc(sizeof(*errors) * naddrs); + for (i = 0; i < naddrs; i++) { + errors[i] = + grpc_tcp_server_add_port(tcp_server, &resolved->addrs[i], &port_temp); + if (errors[i] == GRPC_ERROR_NONE) { + if (*port_num == -1) { + *port_num = port_temp; + } else { + GPR_ASSERT(*port_num == port_temp); + } + count++; + } + } + if (count == 0) { + char *msg; + gpr_asprintf(&msg, "No address added out of total %" PRIuPTR " resolved", + naddrs); + err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, naddrs); + gpr_free(msg); + goto error; + } else if (count != naddrs) { + char *msg; + gpr_asprintf(&msg, "Only %" PRIuPTR + " addresses added out of total %" PRIuPTR " resolved", + count, naddrs); + err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, naddrs); + gpr_free(msg); + + const char *warning_message = grpc_error_string(err); + gpr_log(GPR_INFO, "WARNING: %s", warning_message); + grpc_error_free_string(warning_message); + /* we managed to bind some addresses: continue */ + } + grpc_resolved_addresses_destroy(resolved); + + /* Register with the server only upon success */ + grpc_server_add_listener(exec_ctx, server, state, server_start_listener, + server_destroy_listener); + goto done; + +/* Error path: cleanup and return */ +error: + GPR_ASSERT(err != GRPC_ERROR_NONE); + if (resolved) { + grpc_resolved_addresses_destroy(resolved); + } + if (tcp_server) { + grpc_tcp_server_unref(exec_ctx, tcp_server); + } + grpc_channel_args_destroy(state->args); + grpc_chttp2_server_handshaker_factory_destroy(exec_ctx, + state->handshaker_factory); + gpr_free(state); + *port_num = 0; + +done: + if (errors != NULL) { + for (i = 0; i < naddrs; i++) { + GRPC_ERROR_UNREF(errors[i]); + } + gpr_free(errors); + } + return err; +} diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.h b/src/core/ext/transport/chttp2/server/chttp2_server.h new file mode 100644 index 0000000000..b1ff04bcbb --- /dev/null +++ b/src/core/ext/transport/chttp2/server/chttp2_server.h @@ -0,0 +1,79 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H + +#include + +#include "src/core/lib/channel/handshaker.h" +#include "src/core/lib/iomgr/exec_ctx.h" + +/// A server handshaker factory is used to create handshakers for server +/// connections. +typedef struct grpc_chttp2_server_handshaker_factory + grpc_chttp2_server_handshaker_factory; + +typedef struct { + void (*create_handshakers)( + grpc_exec_ctx *exec_ctx, + grpc_chttp2_server_handshaker_factory *handshaker_factory, + grpc_handshake_manager *handshake_mgr); + void (*destroy)(grpc_exec_ctx *exec_ctx, + grpc_chttp2_server_handshaker_factory *handshaker_factory); +} grpc_chttp2_server_handshaker_factory_vtable; + +struct grpc_chttp2_server_handshaker_factory { + const grpc_chttp2_server_handshaker_factory_vtable *vtable; +}; + +void grpc_chttp2_server_handshaker_factory_create_handshakers( + grpc_exec_ctx *exec_ctx, + grpc_chttp2_server_handshaker_factory *handshaker_factory, + grpc_handshake_manager *handshake_mgr); + +void grpc_chttp2_server_handshaker_factory_destroy( + grpc_exec_ctx *exec_ctx, + grpc_chttp2_server_handshaker_factory *handshaker_factory); + +/// Adds a port to \a server. Sets \a port_num to the port number. +/// If \a handshaker_factory is not NULL, it will be used to create +/// handshakers for the port. +/// Takes ownership of \a args and \a handshaker_factory. +grpc_error *grpc_chttp2_server_add_port( + grpc_exec_ctx *exec_ctx, grpc_server *server, const char *addr, + grpc_channel_args *args, + grpc_chttp2_server_handshaker_factory *handshaker_factory, + int *port_num); + +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H */ diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index a4d7fc5f70..366312bd72 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -33,291 +33,28 @@ #include -#include - -#include #include -#include -#include -#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/server/chttp2_server.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/channel/handshaker.h" -#include "src/core/lib/channel/http_server_filter.h" -#include "src/core/lib/iomgr/resolve_address.h" -#include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" -typedef struct pending_handshake_manager_node { - grpc_handshake_manager *handshake_mgr; - struct pending_handshake_manager_node *next; -} pending_handshake_manager_node; - -typedef struct { - grpc_server *server; - grpc_tcp_server *tcp_server; - gpr_mu mu; - bool shutdown; - grpc_closure tcp_server_shutdown_complete; - grpc_closure *server_destroy_listener_done; - pending_handshake_manager_node *pending_handshake_mgrs; -} server_state; - -typedef struct { - server_state *server_state; - grpc_pollset *accepting_pollset; - grpc_tcp_server_acceptor *acceptor; - grpc_handshake_manager *handshake_mgr; -} server_connection_state; - -static void pending_handshake_manager_add_locked( - server_state *state, grpc_handshake_manager *handshake_mgr) { - pending_handshake_manager_node *node = gpr_malloc(sizeof(*node)); - node->handshake_mgr = handshake_mgr; - node->next = state->pending_handshake_mgrs; - state->pending_handshake_mgrs = node; -} - -static void pending_handshake_manager_remove_locked( - server_state *state, grpc_handshake_manager *handshake_mgr) { - pending_handshake_manager_node **prev_node = &state->pending_handshake_mgrs; - for (pending_handshake_manager_node *node = state->pending_handshake_mgrs; - node != NULL; node = node->next) { - if (node->handshake_mgr == handshake_mgr) { - *prev_node = node->next; - gpr_free(node); - break; - } - prev_node = &node->next; - } -} - -static void pending_handshake_manager_shutdown_locked(grpc_exec_ctx *exec_ctx, - server_state *state) { - pending_handshake_manager_node *prev_node = NULL; - for (pending_handshake_manager_node *node = state->pending_handshake_mgrs; - node != NULL; node = node->next) { - grpc_handshake_manager_shutdown(exec_ctx, node->handshake_mgr); - gpr_free(prev_node); - prev_node = node; - } - gpr_free(prev_node); - state->pending_handshake_mgrs = NULL; -} - -static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - grpc_handshaker_args *args = arg; - server_connection_state *connection_state = args->user_data; - gpr_mu_lock(&connection_state->server_state->mu); - if (error != GRPC_ERROR_NONE || connection_state->server_state->shutdown) { - const char *error_str = grpc_error_string(error); - gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); - grpc_error_free_string(error_str); - if (error == GRPC_ERROR_NONE) { - // We were shut down after handshaking completed successfully, so - // destroy the endpoint here. - // TODO(ctiller): It is currently necessary to shutdown endpoints - // before destroying them, even if we know that there are no - // pending read/write callbacks. This should be fixed, at which - // point this can be removed. - grpc_endpoint_shutdown(exec_ctx, args->endpoint); - grpc_endpoint_destroy(exec_ctx, args->endpoint); - grpc_channel_args_destroy(args->args); - grpc_slice_buffer_destroy(args->read_buffer); - gpr_free(args->read_buffer); - } - } else { - grpc_transport *transport = - grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 0); - grpc_server_setup_transport( - exec_ctx, connection_state->server_state->server, transport, - connection_state->accepting_pollset, - grpc_server_get_channel_args(connection_state->server_state->server)); - grpc_chttp2_transport_start_reading(exec_ctx, transport, args->read_buffer); - grpc_channel_args_destroy(args->args); - } - pending_handshake_manager_remove_locked(connection_state->server_state, - connection_state->handshake_mgr); - gpr_mu_unlock(&connection_state->server_state->mu); - grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); - grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp_server); - gpr_free(connection_state); -} - -static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, - grpc_pollset *accepting_pollset, - grpc_tcp_server_acceptor *acceptor) { - server_state *state = arg; - gpr_mu_lock(&state->mu); - if (state->shutdown) { - gpr_mu_unlock(&state->mu); - grpc_endpoint_destroy(exec_ctx, tcp); - return; - } - grpc_handshake_manager *handshake_mgr = grpc_handshake_manager_create(); - pending_handshake_manager_add_locked(state, handshake_mgr); - gpr_mu_unlock(&state->mu); - grpc_tcp_server_ref(state->tcp_server); - server_connection_state *connection_state = - gpr_malloc(sizeof(*connection_state)); - connection_state->server_state = state; - connection_state->accepting_pollset = accepting_pollset; - connection_state->acceptor = acceptor; - connection_state->handshake_mgr = handshake_mgr; - // TODO(roth): We should really get this timeout value from channel - // args instead of hard-coding it. - const gpr_timespec deadline = gpr_time_add( - gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); - grpc_handshake_manager_do_handshake( - exec_ctx, connection_state->handshake_mgr, tcp, - grpc_server_get_channel_args(state->server), deadline, acceptor, - on_handshake_done, connection_state); -} - -/* Server callback: start listening on our ports */ -static void server_start_listener(grpc_exec_ctx *exec_ctx, grpc_server *server, - void *arg, grpc_pollset **pollsets, - size_t pollset_count) { - server_state *state = arg; - gpr_mu_lock(&state->mu); - state->shutdown = false; - gpr_mu_unlock(&state->mu); - grpc_tcp_server_start(exec_ctx, state->tcp_server, pollsets, pollset_count, - on_accept, state); -} - -static void tcp_server_shutdown_complete(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - server_state *state = arg; - /* ensure all threads have unlocked */ - gpr_mu_lock(&state->mu); - grpc_closure *destroy_done = state->server_destroy_listener_done; - GPR_ASSERT(state->shutdown); - pending_handshake_manager_shutdown_locked(exec_ctx, state); - gpr_mu_unlock(&state->mu); - // Invoke callback. - if (destroy_done != NULL) { - grpc_exec_ctx_sched(exec_ctx, destroy_done, GRPC_ERROR_REF(error), NULL); - } - gpr_mu_destroy(&state->mu); - gpr_free(state); -} - -/* Server callback: destroy the tcp listener (so we don't generate further - callbacks) */ -static void server_destroy_listener(grpc_exec_ctx *exec_ctx, - grpc_server *server, void *arg, - grpc_closure *destroy_done) { - server_state *state = arg; - gpr_mu_lock(&state->mu); - state->shutdown = true; - state->server_destroy_listener_done = destroy_done; - grpc_tcp_server *tcp_server = state->tcp_server; - gpr_mu_unlock(&state->mu); - grpc_tcp_server_shutdown_listeners(exec_ctx, tcp_server); - grpc_tcp_server_unref(exec_ctx, tcp_server); -} - int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { - grpc_resolved_addresses *resolved = NULL; - grpc_tcp_server *tcp_server = NULL; - size_t i; - size_t count = 0; - int port_num = -1; - int port_temp; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_error *err = GRPC_ERROR_NONE; - + int port_num = 0; GRPC_API_TRACE("grpc_server_add_insecure_http2_port(server=%p, addr=%s)", 2, (server, addr)); - - grpc_error **errors = NULL; - err = grpc_blocking_resolve_address(addr, "https", &resolved); - if (err != GRPC_ERROR_NONE) { - goto error; - } - server_state *state = gpr_malloc(sizeof(*state)); - memset(state, 0, sizeof(*state)); - grpc_closure_init(&state->tcp_server_shutdown_complete, - tcp_server_shutdown_complete, state); - err = - grpc_tcp_server_create(&exec_ctx, &state->tcp_server_shutdown_complete, - grpc_server_get_channel_args(server), &tcp_server); + grpc_error* err = grpc_chttp2_server_add_port( + &exec_ctx, server, addr, + grpc_channel_args_copy(grpc_server_get_channel_args(server)), + NULL /* handshaker_factory */, &port_num); if (err != GRPC_ERROR_NONE) { - goto error; - } - - state->server = server; - state->tcp_server = tcp_server; - state->shutdown = true; - gpr_mu_init(&state->mu); - - const size_t naddrs = resolved->naddrs; - errors = gpr_malloc(sizeof(*errors) * naddrs); - for (i = 0; i < naddrs; i++) { - errors[i] = - grpc_tcp_server_add_port(tcp_server, &resolved->addrs[i], &port_temp); - if (errors[i] == GRPC_ERROR_NONE) { - if (port_num == -1) { - port_num = port_temp; - } else { - GPR_ASSERT(port_num == port_temp); - } - count++; - } - } - if (count == 0) { - char *msg; - gpr_asprintf(&msg, "No address added out of total %" PRIuPTR " resolved", - naddrs); - err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, naddrs); - gpr_free(msg); - goto error; - } else if (count != naddrs) { - char *msg; - gpr_asprintf(&msg, "Only %" PRIuPTR - " addresses added out of total %" PRIuPTR " resolved", - count, naddrs); - err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, naddrs); - gpr_free(msg); - - const char *warning_message = grpc_error_string(err); - gpr_log(GPR_INFO, "WARNING: %s", warning_message); - grpc_error_free_string(warning_message); - /* we managed to bind some addresses: continue */ - } - grpc_resolved_addresses_destroy(resolved); - - /* Register with the server only upon success */ - grpc_server_add_listener(&exec_ctx, server, state, server_start_listener, - server_destroy_listener); - goto done; - -/* Error path: cleanup and return */ -error: - GPR_ASSERT(err != GRPC_ERROR_NONE); - if (resolved) { - grpc_resolved_addresses_destroy(resolved); - } - if (tcp_server) { - grpc_tcp_server_unref(&exec_ctx, tcp_server); + const char *msg = grpc_error_string(err); + gpr_log(GPR_ERROR, "%s", msg); + grpc_error_free_string(msg); + GRPC_ERROR_UNREF(err); } - port_num = 0; - - const char *msg = grpc_error_string(err); - gpr_log(GPR_ERROR, "%s", msg); - grpc_error_free_string(msg); - GRPC_ERROR_UNREF(err); - -done: grpc_exec_ctx_finish(&exec_ctx); - if (errors != NULL) { - for (i = 0; i < naddrs; i++) { - GRPC_ERROR_UNREF(errors[i]); - } - } - gpr_free(errors); return port_num; } diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 8d2371c917..b9a833803b 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -38,230 +38,62 @@ #include #include #include -#include -#include + +#include "src/core/ext/transport/chttp2/server/chttp2_server.h" + #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/handshaker.h" -#include "src/core/lib/channel/http_server_filter.h" -#include "src/core/lib/iomgr/endpoint.h" -#include "src/core/lib/iomgr/resolve_address.h" -#include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/security/transport/auth_filters.h" -#include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" -typedef struct pending_handshake_manager_node { - grpc_handshake_manager *handshake_mgr; - struct pending_handshake_manager_node *next; -} pending_handshake_manager_node; - -typedef struct server_secure_state { - grpc_server *server; - grpc_tcp_server *tcp_server; - grpc_server_security_connector *sc; - grpc_server_credentials *creds; - gpr_mu mu; - bool shutdown; - grpc_closure tcp_server_shutdown_complete; - grpc_closure *server_destroy_listener_done; - pending_handshake_manager_node *pending_handshake_mgrs; -} server_secure_state; - -typedef struct server_secure_connection_state { - server_secure_state *server_state; - grpc_pollset *accepting_pollset; - grpc_tcp_server_acceptor *acceptor; - grpc_handshake_manager *handshake_mgr; -} server_secure_connection_state; - -static void pending_handshake_manager_add_locked( - server_secure_state *state, grpc_handshake_manager *handshake_mgr) { - pending_handshake_manager_node *node = gpr_malloc(sizeof(*node)); - node->handshake_mgr = handshake_mgr; - node->next = state->pending_handshake_mgrs; - state->pending_handshake_mgrs = node; -} - -static void pending_handshake_manager_remove_locked( - server_secure_state *state, grpc_handshake_manager *handshake_mgr) { - pending_handshake_manager_node **prev_node = &state->pending_handshake_mgrs; - for (pending_handshake_manager_node *node = state->pending_handshake_mgrs; - node != NULL; node = node->next) { - if (node->handshake_mgr == handshake_mgr) { - *prev_node = node->next; - gpr_free(node); - break; - } - prev_node = &node->next; - } -} +typedef struct { + grpc_chttp2_server_handshaker_factory base; + grpc_server_security_connector *security_connector; +} server_security_handshaker_factory; -static void pending_handshake_manager_shutdown_locked( - grpc_exec_ctx *exec_ctx, server_secure_state *state) { - pending_handshake_manager_node *prev_node = NULL; - for (pending_handshake_manager_node *node = state->pending_handshake_mgrs; - node != NULL; node = node->next) { - grpc_handshake_manager_shutdown(exec_ctx, node->handshake_mgr); - gpr_free(prev_node); - prev_node = node; - } - gpr_free(prev_node); - state->pending_handshake_mgrs = NULL; -} - -static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - grpc_handshaker_args *args = arg; - server_secure_connection_state *connection_state = args->user_data; - gpr_mu_lock(&connection_state->server_state->mu); - if (error != GRPC_ERROR_NONE || connection_state->server_state->shutdown) { - const char *error_str = grpc_error_string(error); - gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); - grpc_error_free_string(error_str); - if (error == GRPC_ERROR_NONE) { - // We were shut down after handshaking completed successfully, so - // destroy the endpoint here. - // TODO(ctiller): It is currently necessary to shutdown endpoints - // before destroying them, even if we know that there are no - // pending read/write callbacks. This should be fixed, at which - // point this can be removed. - grpc_endpoint_shutdown(exec_ctx, args->endpoint); - grpc_endpoint_destroy(exec_ctx, args->endpoint); - grpc_channel_args_destroy(args->args); - grpc_slice_buffer_destroy(args->read_buffer); - gpr_free(args->read_buffer); - } - } else { - grpc_arg channel_arg = - grpc_server_credentials_to_arg(connection_state->server_state->creds); - grpc_channel_args *args_copy = - grpc_channel_args_copy_and_add(args->args, &channel_arg, 1); - grpc_channel_args_destroy(args->args); - grpc_transport *transport = - grpc_create_chttp2_transport(exec_ctx, args_copy, args->endpoint, 0); - grpc_server_setup_transport( - exec_ctx, connection_state->server_state->server, transport, - connection_state->accepting_pollset, args_copy); - grpc_channel_args_destroy(args_copy); - grpc_chttp2_transport_start_reading(exec_ctx, transport, args->read_buffer); - } - pending_handshake_manager_remove_locked(connection_state->server_state, - connection_state->handshake_mgr); - gpr_mu_unlock(&connection_state->server_state->mu); - grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); - grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp_server); - gpr_free(connection_state); -} - -static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, - grpc_pollset *accepting_pollset, - grpc_tcp_server_acceptor *acceptor) { - server_secure_state *state = arg; - gpr_mu_lock(&state->mu); - if (state->shutdown) { - gpr_mu_unlock(&state->mu); - grpc_endpoint_destroy(exec_ctx, tcp); - return; - } - grpc_handshake_manager *handshake_mgr = grpc_handshake_manager_create(); - pending_handshake_manager_add_locked(state, handshake_mgr); - gpr_mu_unlock(&state->mu); - grpc_tcp_server_ref(state->tcp_server); - server_secure_connection_state *connection_state = - gpr_malloc(sizeof(*connection_state)); - connection_state->server_state = state; - connection_state->accepting_pollset = accepting_pollset; - connection_state->acceptor = acceptor; - connection_state->handshake_mgr = handshake_mgr; +static void server_security_handshaker_factory_create_handshakers( + grpc_exec_ctx *exec_ctx, grpc_chttp2_server_handshaker_factory *hf, + grpc_handshake_manager *handshake_mgr) { + server_security_handshaker_factory *handshaker_factory = + (server_security_handshaker_factory *)hf; grpc_server_security_connector_create_handshakers( - exec_ctx, state->sc, connection_state->handshake_mgr); - // TODO(roth): We should really get this timeout value from channel - // args instead of hard-coding it. - const gpr_timespec deadline = gpr_time_add( - gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); - grpc_handshake_manager_do_handshake( - exec_ctx, connection_state->handshake_mgr, tcp, - grpc_server_get_channel_args(state->server), deadline, acceptor, - on_handshake_done, connection_state); + exec_ctx, handshaker_factory->security_connector, handshake_mgr); } -/* Server callback: start listening on our ports */ -static void server_start_listener(grpc_exec_ctx *exec_ctx, grpc_server *server, - void *arg, grpc_pollset **pollsets, - size_t pollset_count) { - server_secure_state *state = arg; - gpr_mu_lock(&state->mu); - state->shutdown = false; - gpr_mu_unlock(&state->mu); - grpc_tcp_server_start(exec_ctx, state->tcp_server, pollsets, pollset_count, - on_accept, state); +static void server_security_handshaker_factory_destroy( + grpc_exec_ctx* exec_ctx, grpc_chttp2_server_handshaker_factory *hf) { + server_security_handshaker_factory *handshaker_factory = + (server_security_handshaker_factory *)hf; + GRPC_SECURITY_CONNECTOR_UNREF(&handshaker_factory->security_connector->base, + "server"); } -static void tcp_server_shutdown_complete(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - server_secure_state *state = arg; - /* ensure all threads have unlocked */ - gpr_mu_lock(&state->mu); - grpc_closure *destroy_done = state->server_destroy_listener_done; - GPR_ASSERT(state->shutdown); - pending_handshake_manager_shutdown_locked(exec_ctx, state); - gpr_mu_unlock(&state->mu); - /* Flush queued work before a synchronous unref. */ - grpc_exec_ctx_flush(exec_ctx); - GRPC_SECURITY_CONNECTOR_UNREF(&state->sc->base, "server"); - grpc_server_credentials_unref(state->creds); - if (destroy_done != NULL) { - destroy_done->cb(exec_ctx, destroy_done->cb_arg, GRPC_ERROR_REF(error)); - grpc_exec_ctx_flush(exec_ctx); - } - gpr_mu_destroy(&state->mu); - gpr_free(state); -} - -static void server_destroy_listener(grpc_exec_ctx *exec_ctx, - grpc_server *server, void *arg, - grpc_closure *destroy_done) { - server_secure_state *state = arg; - gpr_mu_lock(&state->mu); - state->shutdown = true; - state->server_destroy_listener_done = destroy_done; - grpc_tcp_server *tcp_server = state->tcp_server; - gpr_mu_unlock(&state->mu); - grpc_tcp_server_shutdown_listeners(exec_ctx, tcp_server); - grpc_tcp_server_unref(exec_ctx, tcp_server); -} +static const grpc_chttp2_server_handshaker_factory_vtable + server_security_handshaker_factory_vtable = { + server_security_handshaker_factory_create_handshakers, + server_security_handshaker_factory_destroy}; int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_server_credentials *creds) { - grpc_resolved_addresses *resolved = NULL; - grpc_tcp_server *tcp_server = NULL; - server_secure_state *state = NULL; - size_t i; - size_t count = 0; - int port_num = -1; - int port_temp; - grpc_security_status status = GRPC_SECURITY_ERROR; - grpc_server_security_connector *sc = NULL; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_error *err = GRPC_ERROR_NONE; - grpc_error **errors = NULL; - + grpc_server_security_connector *sc = NULL; + int port_num = 0; GRPC_API_TRACE( "grpc_server_add_secure_http2_port(" "server=%p, addr=%s, creds=%p)", 3, (server, addr, creds)); - - /* create security context */ + // Create security context. if (creds == NULL) { err = GRPC_ERROR_CREATE( "No credentials specified for secure server port (creds==NULL)"); - goto error; + goto done; } - status = grpc_server_credentials_create_security_connector(creds, &sc); + grpc_security_status status = + grpc_server_credentials_create_security_connector(creds, &sc); if (status != GRPC_SECURITY_OK) { char *msg; gpr_asprintf(&msg, @@ -270,107 +102,31 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, err = grpc_error_set_int(GRPC_ERROR_CREATE(msg), GRPC_ERROR_INT_SECURITY_STATUS, status); gpr_free(msg); - goto error; + goto done; } - - /* resolve address */ - err = grpc_blocking_resolve_address(addr, "https", &resolved); - if (err != GRPC_ERROR_NONE) { - goto error; - } - state = gpr_malloc(sizeof(*state)); - memset(state, 0, sizeof(*state)); - grpc_closure_init(&state->tcp_server_shutdown_complete, - tcp_server_shutdown_complete, state); - err = - grpc_tcp_server_create(&exec_ctx, &state->tcp_server_shutdown_complete, - grpc_server_get_channel_args(server), &tcp_server); - if (err != GRPC_ERROR_NONE) { - goto error; - } - - state->server = server; - state->tcp_server = tcp_server; - state->sc = sc; - state->creds = grpc_server_credentials_ref(creds); - state->shutdown = true; - gpr_mu_init(&state->mu); - - errors = gpr_malloc(sizeof(*errors) * resolved->naddrs); - for (i = 0; i < resolved->naddrs; i++) { - errors[i] = - grpc_tcp_server_add_port(tcp_server, &resolved->addrs[i], &port_temp); - if (errors[i] == GRPC_ERROR_NONE) { - if (port_num == -1) { - port_num = port_temp; - } else { - GPR_ASSERT(port_num == port_temp); - } - count++; - } - } - if (count == 0) { - char *msg; - gpr_asprintf(&msg, "No address added out of total %" PRIuPTR " resolved", - resolved->naddrs); - err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, resolved->naddrs); - gpr_free(msg); - goto error; - } else if (count != resolved->naddrs) { - char *msg; - gpr_asprintf(&msg, "Only %" PRIuPTR - " addresses added out of total %" PRIuPTR " resolved", - count, resolved->naddrs); - err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, resolved->naddrs); - gpr_free(msg); - - const char *warning_message = grpc_error_string(err); - gpr_log(GPR_INFO, "WARNING: %s", warning_message); - grpc_error_free_string(warning_message); - /* we managed to bind some addresses: continue */ - } else { - for (i = 0; i < resolved->naddrs; i++) { - GRPC_ERROR_UNREF(errors[i]); - } - } - gpr_free(errors); - errors = NULL; - grpc_resolved_addresses_destroy(resolved); - - /* Register with the server only upon success */ - grpc_server_add_listener(&exec_ctx, server, state, server_start_listener, - server_destroy_listener); - + // Create handshaker factory. + server_security_handshaker_factory* handshaker_factory = + gpr_malloc(sizeof(*handshaker_factory)); + memset(handshaker_factory, 0, sizeof(*handshaker_factory)); + handshaker_factory->base.vtable = &server_security_handshaker_factory_vtable; + handshaker_factory->security_connector = sc; + // Create channel args. + grpc_arg channel_arg = grpc_server_credentials_to_arg(creds); + grpc_channel_args *args = grpc_channel_args_copy_and_add( + grpc_server_get_channel_args(server), &channel_arg, 1); + // Add server port. + err = grpc_chttp2_server_add_port(&exec_ctx, server, addr, args, + &handshaker_factory->base, &port_num); +done: grpc_exec_ctx_finish(&exec_ctx); - return port_num; - -/* Error path: cleanup and return */ -error: - GPR_ASSERT(err != GRPC_ERROR_NONE); - if (errors != NULL) { - for (i = 0; i < resolved->naddrs; i++) { - GRPC_ERROR_UNREF(errors[i]); - } - gpr_free(errors); - } - if (resolved) { - grpc_resolved_addresses_destroy(resolved); - } - if (tcp_server) { - grpc_tcp_server_unref(&exec_ctx, tcp_server); - } else { - if (sc) { - grpc_exec_ctx_flush(&exec_ctx); + if (err != GRPC_ERROR_NONE) { + const char *msg = grpc_error_string(err); + gpr_log(GPR_ERROR, "%s", msg); + grpc_error_free_string(msg); + GRPC_ERROR_UNREF(err); + if (sc != NULL) { GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "server"); } - if (state) { - gpr_free(state); - } } - grpc_exec_ctx_finish(&exec_ctx); - const char *msg = grpc_error_string(err); - GRPC_ERROR_UNREF(err); - gpr_log(GPR_ERROR, "%s", msg); - grpc_error_free_string(msg); - return 0; + return port_num; } diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 3e5aa1416f..d43f93b94f 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -237,6 +237,7 @@ CORE_SOURCE_FILES = [ '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/server/chttp2_server.c', 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c', 'src/core/ext/client_channel/channel_connectivity.c', 'src/core/ext/client_channel/client_channel.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index ce29f8e43c..6572bd4ddf 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -930,6 +930,7 @@ 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/transport/chttp2/server/chttp2_server.h \ src/core/ext/client_channel/client_channel.h \ src/core/ext/client_channel/client_channel_factory.h \ src/core/ext/client_channel/connector.h \ @@ -1129,6 +1130,7 @@ 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/server/chttp2_server.c \ src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \ src/core/ext/client_channel/channel_connectivity.c \ src/core/ext/client_channel/client_channel.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 19b8a8be2a..2e6877ccac 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -7491,6 +7491,26 @@ "grpc_base", "grpc_transport_chttp2" ], + "headers": [ + "src/core/ext/transport/chttp2/server/chttp2_server.h" + ], + "is_filegroup": true, + "language": "c", + "name": "grpc_transport_chttp2_server", + "src": [ + "src/core/ext/transport/chttp2/server/chttp2_server.c", + "src/core/ext/transport/chttp2/server/chttp2_server.h" + ], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ + "gpr", + "grpc_base", + "grpc_transport_chttp2", + "grpc_transport_chttp2_server" + ], "headers": [], "is_filegroup": true, "language": "c", @@ -7507,7 +7527,8 @@ "gpr", "grpc_base", "grpc_secure", - "grpc_transport_chttp2" + "grpc_transport_chttp2", + "grpc_transport_chttp2_server" ], "headers": [], "is_filegroup": true, diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index fe7e06aa77..558b5b0c66 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -439,6 +439,7 @@ + @@ -803,6 +804,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 8fce4ceb41..a40a1b5f1c 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -490,6 +490,9 @@ src\core\lib\tsi + + src\core\ext\transport\chttp2\server + src\core\ext\transport\chttp2\client\secure @@ -1157,6 +1160,9 @@ src\core\lib\tsi + + src\core\ext\transport\chttp2\server + src\core\ext\client_channel diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 5e5b724609..661192101c 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -405,6 +405,7 @@ + @@ -719,6 +720,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 4363f8a868..466116e604 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -415,6 +415,9 @@ src\core\ext\transport\chttp2\alpn + + src\core\ext\transport\chttp2\server + src\core\ext\transport\chttp2\client\insecure @@ -998,6 +1001,9 @@ src\core\ext\transport\chttp2\alpn + + src\core\ext\transport\chttp2\server + src\core\ext\transport\chttp2\client -- cgit v1.2.3 From 8aa2f70f57b3c6c30264e4f1b5ddfaa9b7953f9f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 2 Dec 2016 11:00:27 -0800 Subject: Code review changes. --- src/core/ext/client_channel/http_connect_handshaker.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core') diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index e0b717dac5..572af52dfd 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -126,6 +126,9 @@ static void handshake_failed_locked(grpc_exec_ctx* exec_ctx, // Not shutting down, so the handshake failed. Clean up before // invoking the callback. cleanup_args_for_failure_locked(handshaker); + // Set shutdown to true so that subsequent calls to + // http_connect_handshaker_shutdown() do nothing. + handshaker->shutdown = true; } // Invoke callback. grpc_exec_ctx_sched(exec_ctx, handshaker->on_handshake_done, error, NULL); -- cgit v1.2.3 From a0bcfbbfe2378459a439a3344df59774e32cd774 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 2 Dec 2016 12:10:25 -0800 Subject: Fix Windows build problem. --- src/core/ext/transport/chttp2/server/chttp2_server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c index 9282d7ef89..50cbafab56 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.c +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -262,6 +262,7 @@ grpc_error *grpc_chttp2_server_add_port( int port_temp; grpc_error *err = GRPC_ERROR_NONE; server_state *state = NULL; + grpc_error **errors = NULL; *port_num = -1; @@ -289,7 +290,7 @@ grpc_error *grpc_chttp2_server_add_port( gpr_mu_init(&state->mu); const size_t naddrs = resolved->naddrs; - grpc_error **errors = gpr_malloc(sizeof(*errors) * naddrs); + errors = gpr_malloc(sizeof(*errors) * naddrs); for (i = 0; i < naddrs; i++) { errors[i] = grpc_tcp_server_add_port(tcp_server, &resolved->addrs[i], &port_temp); -- cgit v1.2.3 From db25f083c2ec0e2912aecaed4ae2826865305320 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Dec 2016 12:45:24 -0800 Subject: Make TCP error messages more descriptive --- src/core/lib/iomgr/tcp_posix.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 12a4797e6f..fd80779519 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -107,6 +107,12 @@ typedef struct { grpc_resource_user_slice_allocator slice_allocator; } grpc_tcp; +static grpc_error *tcp_annotate_error(grpc_error *src_error, grpc_tcp *tcp) { + return grpc_error_set_str( + grpc_error_set_int(src_error, GRPC_ERROR_INT_FD, tcp->fd), + GRPC_ERROR_STR_TARGET_ADDRESS, tcp->peer_string); +} + static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, grpc_error *error); static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, @@ -230,13 +236,15 @@ static void tcp_do_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { grpc_fd_notify_on_read(exec_ctx, tcp->em_fd, &tcp->read_closure); } else { grpc_slice_buffer_reset_and_unref(tcp->incoming_buffer); - call_read_cb(exec_ctx, tcp, GRPC_OS_ERROR(errno, "recvmsg")); + call_read_cb(exec_ctx, tcp, + tcp_annotate_error(GRPC_OS_ERROR(errno, "recvmsg"), tcp)); TCP_UNREF(exec_ctx, tcp, "read"); } } else if (read_bytes == 0) { /* 0 read size ==> end of stream */ grpc_slice_buffer_reset_and_unref(tcp->incoming_buffer); - call_read_cb(exec_ctx, tcp, GRPC_ERROR_CREATE("Socket closed")); + call_read_cb(exec_ctx, tcp, + tcp_annotate_error(GRPC_ERROR_CREATE("Socket closed"), tcp)); TCP_UNREF(exec_ctx, tcp, "read"); } else { GPR_ASSERT((size_t)read_bytes <= tcp->incoming_buffer->length); @@ -366,7 +374,7 @@ static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) { tcp->outgoing_byte_idx = unwind_byte_idx; return false; } else { - *error = GRPC_OS_ERROR(errno, "sendmsg"); + *error = tcp_annotate_error(GRPC_OS_ERROR(errno, "sendmsg"), tcp); return true; } } @@ -447,9 +455,10 @@ static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, if (buf->length == 0) { GPR_TIMER_END("tcp_write", 0); - grpc_exec_ctx_sched(exec_ctx, cb, grpc_fd_is_shutdown(tcp->em_fd) - ? GRPC_ERROR_CREATE("EOF") - : GRPC_ERROR_NONE, + grpc_exec_ctx_sched(exec_ctx, cb, + grpc_fd_is_shutdown(tcp->em_fd) + ? tcp_annotate_error(GRPC_ERROR_CREATE("EOF"), tcp) + : GRPC_ERROR_NONE, NULL); return; } -- cgit v1.2.3 From 13b9a9a5f59105d62518013e03335bd379ae9c3f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Dec 2016 12:43:09 -0800 Subject: Remove resource users from reclaimer lists when shutting down Otherwise, a null closure could be executed to reclaim, the reclaimation finished edge would never be executed, and a future allocation will stall forever. --- src/core/lib/iomgr/resource_quota.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 379bf9bd23..16392020f4 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -144,6 +144,12 @@ struct grpc_resource_quota { /* Closure around rq_reclamation_done */ grpc_closure rq_reclamation_done_closure; + /* This is only really usable for debugging: it's always a stale pointer, but + a stale pointer that might just be fresh enough to guide us to where the + reclamation system is stuck */ + grpc_closure *debug_only_last_initiated_reclaimer; + grpc_resource_user *debug_only_last_reclaimer_resource_user; + /* Roots of all resource user lists */ grpc_resource_user *roots[GRPC_RULIST_COUNT]; @@ -340,6 +346,9 @@ static bool rq_reclaim(grpc_exec_ctx *exec_ctx, resource_quota->reclaiming = true; grpc_resource_quota_internal_ref(resource_quota); grpc_closure *c = resource_user->reclaimers[destructive]; + GPR_ASSERT(c); + resource_quota->debug_only_last_reclaimer_resource_user = resource_user; + resource_quota->debug_only_last_initiated_reclaimer = c; resource_user->reclaimers[destructive] = NULL; grpc_closure_run(exec_ctx, c, GRPC_ERROR_NONE); return true; @@ -476,6 +485,8 @@ static void ru_shutdown(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { GRPC_ERROR_CANCELLED, NULL); resource_user->reclaimers[0] = NULL; resource_user->reclaimers[1] = NULL; + rulist_remove(resource_user, GRPC_RULIST_RECLAIMER_BENIGN); + rulist_remove(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE); } static void ru_destroy(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { -- cgit v1.2.3 From f6a046e82095ac02889085d5eb67a8f354f50e3e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 2 Dec 2016 13:15:42 -0800 Subject: Fix race condition during handshake manager shutdown. --- src/core/lib/channel/handshaker.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 992cd420de..90626dc2d1 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -75,6 +75,7 @@ static void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, struct grpc_handshake_manager { gpr_mu mu; gpr_refcount refs; + bool shutdown; // An array of handshakers added via grpc_handshake_manager_add(). size_t count; grpc_handshaker** handshakers; @@ -142,7 +143,8 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr) { gpr_mu_lock(&mgr->mu); // Shutdown the handshaker that's currently in progress, if any. - if (mgr->index > 0) { + if (!mgr->shutdown && mgr->index > 0) { + mgr->shutdown = true; grpc_handshaker_shutdown(exec_ctx, mgr->handshakers[mgr->index - 1]); } gpr_mu_unlock(&mgr->mu); @@ -155,23 +157,22 @@ static bool call_next_handshaker_locked(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr, grpc_error* error) { GPR_ASSERT(mgr->index <= mgr->count); - // If we got an error or we've finished the last handshaker, invoke - // the on_handshake_done callback. Otherwise, call the next handshaker. - if (error != GRPC_ERROR_NONE || mgr->index == mgr->count) { + // If we got an error or we've been shut down or we've finished the last + // handshaker, invoke the on_handshake_done callback. Otherwise, call the + // next handshaker. + if (error != GRPC_ERROR_NONE || mgr->shutdown || mgr->index == mgr->count) { // Cancel deadline timer, since we're invoking the on_handshake_done // callback now. grpc_timer_cancel(exec_ctx, &mgr->deadline_timer); grpc_exec_ctx_sched(exec_ctx, &mgr->on_handshake_done, error, NULL); - // Reset index to 0 so that we can start over if we re-attempt the - // connection. - mgr->index = 0; - return true; + mgr->shutdown = true; + } else { + grpc_handshaker_do_handshake(exec_ctx, mgr->handshakers[mgr->index], + mgr->acceptor, &mgr->call_next_handshaker, + &mgr->args); } - grpc_handshaker_do_handshake(exec_ctx, mgr->handshakers[mgr->index], - mgr->acceptor, &mgr->call_next_handshaker, - &mgr->args); ++mgr->index; - return false; + return mgr->shutdown; } // A function used as the handshaker-done callback when chaining @@ -206,6 +207,7 @@ void grpc_handshake_manager_do_handshake( grpc_iomgr_cb_func on_handshake_done, void* user_data) { gpr_mu_lock(&mgr->mu); GPR_ASSERT(mgr->index == 0); + GPR_ASSERT(!mgr->shutdown); // Construct handshaker args. These will be passed through all // handshakers and eventually be freed by the on_handshake_done callback. mgr->args.endpoint = endpoint; -- cgit v1.2.3 From 0f4bbba82687420a2ebc56ea66021c29890472f0 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 2 Dec 2016 22:16:03 +0000 Subject: Fix allocation bugs in server shutdown. --- src/core/ext/transport/chttp2/server/chttp2_server.c | 9 +++++---- .../ext/transport/chttp2/server/secure/server_secure_chttp2.c | 4 +--- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c index 50cbafab56..dc85d1cf5c 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.c +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -338,11 +338,12 @@ error: } if (tcp_server) { grpc_tcp_server_unref(exec_ctx, tcp_server); + } else { + grpc_channel_args_destroy(state->args); + grpc_chttp2_server_handshaker_factory_destroy(exec_ctx, + state->handshaker_factory); + gpr_free(state); } - grpc_channel_args_destroy(state->args); - grpc_chttp2_server_handshaker_factory_destroy(exec_ctx, - state->handshaker_factory); - gpr_free(state); *port_num = 0; done: diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index b9a833803b..5f41728132 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -69,6 +69,7 @@ static void server_security_handshaker_factory_destroy( (server_security_handshaker_factory *)hf; GRPC_SECURITY_CONNECTOR_UNREF(&handshaker_factory->security_connector->base, "server"); + gpr_free(hf); } static const grpc_chttp2_server_handshaker_factory_vtable @@ -124,9 +125,6 @@ done: gpr_log(GPR_ERROR, "%s", msg); grpc_error_free_string(msg); GRPC_ERROR_UNREF(err); - if (sc != NULL) { - GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "server"); - } } return port_num; } -- cgit v1.2.3 From a0bb3742d9a51da96c182bf4b7eb68335678b7f6 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 2 Dec 2016 22:27:26 +0000 Subject: Fix server_chttp2_test. --- src/core/ext/transport/chttp2/server/chttp2_server.c | 5 ++--- test/core/surface/server_chttp2_test.c | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c index dc85d1cf5c..7795606e73 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.c +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -339,9 +339,8 @@ error: if (tcp_server) { grpc_tcp_server_unref(exec_ctx, tcp_server); } else { - grpc_channel_args_destroy(state->args); - grpc_chttp2_server_handshaker_factory_destroy(exec_ctx, - state->handshaker_factory); + grpc_channel_args_destroy(args); + grpc_chttp2_server_handshaker_factory_destroy(exec_ctx, handshaker_factory); gpr_free(state); } *port_num = 0; diff --git a/test/core/surface/server_chttp2_test.c b/test/core/surface/server_chttp2_test.c index 6310b6f00b..6c178abdad 100644 --- a/test/core/surface/server_chttp2_test.c +++ b/test/core/surface/server_chttp2_test.c @@ -44,8 +44,11 @@ #include "test/core/util/test_config.h" void test_unparsable_target(void) { - int port = grpc_server_add_insecure_http2_port(NULL, "["); + grpc_channel_args args = {0, NULL}; + grpc_server *server = grpc_server_create(&args, NULL); + int port = grpc_server_add_insecure_http2_port(server, "["); GPR_ASSERT(port == 0); + grpc_server_destroy(server); } void test_add_same_port_twice() { -- cgit v1.2.3 From c494c7b104faf393839ff33dc02f0994dec70ba1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Dec 2016 17:10:06 -0800 Subject: Fix some things: - use after free for resource quota - stuck-in-combiner-lock bug for End2endTest.ClientCancelsBidi/1 under asan/epoll - fixes clang-format stuff for a few files --- .../ext/transport/chttp2/server/chttp2_server.c | 16 +++--- .../ext/transport/chttp2/server/chttp2_server.h | 3 +- .../chttp2/server/insecure/server_chttp2.c | 2 +- .../chttp2/server/secure/server_secure_chttp2.c | 6 +-- .../transport/chttp2/transport/chttp2_transport.c | 61 ++++++++-------------- src/core/ext/transport/chttp2/transport/internal.h | 9 ++-- src/core/ext/transport/chttp2/transport/writing.c | 3 +- src/core/lib/iomgr/resource_quota.c | 3 ++ 8 files changed, 41 insertions(+), 62 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c index 7795606e73..8ee7e29316 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.c +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -58,8 +58,8 @@ void grpc_chttp2_server_handshaker_factory_create_handshakers( grpc_chttp2_server_handshaker_factory *handshaker_factory, grpc_handshake_manager *handshake_mgr) { if (handshaker_factory != NULL) { - handshaker_factory->vtable->create_handshakers( - exec_ctx, handshaker_factory, handshake_mgr); + handshaker_factory->vtable->create_handshakers(exec_ctx, handshaker_factory, + handshake_mgr); } } @@ -71,7 +71,6 @@ void grpc_chttp2_server_handshaker_factory_destroy( } } - typedef struct pending_handshake_manager_node { grpc_handshake_manager *handshake_mgr; struct pending_handshake_manager_node *next; @@ -196,9 +195,9 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, // args instead of hard-coding it. const gpr_timespec deadline = gpr_time_add( gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); - grpc_handshake_manager_do_handshake( - exec_ctx, connection_state->handshake_mgr, tcp, state->args, deadline, - acceptor, on_handshake_done, connection_state); + grpc_handshake_manager_do_handshake(exec_ctx, connection_state->handshake_mgr, + tcp, state->args, deadline, acceptor, + on_handshake_done, connection_state); } /* Server callback: start listening on our ports */ @@ -275,9 +274,8 @@ grpc_error *grpc_chttp2_server_add_port( memset(state, 0, sizeof(*state)); grpc_closure_init(&state->tcp_server_shutdown_complete, tcp_server_shutdown_complete, state); - err = - grpc_tcp_server_create(exec_ctx, &state->tcp_server_shutdown_complete, - args, &tcp_server); + err = grpc_tcp_server_create(exec_ctx, &state->tcp_server_shutdown_complete, + args, &tcp_server); if (err != GRPC_ERROR_NONE) { goto error; } diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.h b/src/core/ext/transport/chttp2/server/chttp2_server.h index b1ff04bcbb..3073399267 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.h +++ b/src/core/ext/transport/chttp2/server/chttp2_server.h @@ -73,7 +73,6 @@ void grpc_chttp2_server_handshaker_factory_destroy( grpc_error *grpc_chttp2_server_add_port( grpc_exec_ctx *exec_ctx, grpc_server *server, const char *addr, grpc_channel_args *args, - grpc_chttp2_server_handshaker_factory *handshaker_factory, - int *port_num); + grpc_chttp2_server_handshaker_factory *handshaker_factory, int *port_num); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H */ diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index 366312bd72..7e286d4e46 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -45,7 +45,7 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { int port_num = 0; GRPC_API_TRACE("grpc_server_add_insecure_http2_port(server=%p, addr=%s)", 2, (server, addr)); - grpc_error* err = grpc_chttp2_server_add_port( + grpc_error *err = grpc_chttp2_server_add_port( &exec_ctx, server, addr, grpc_channel_args_copy(grpc_server_get_channel_args(server)), NULL /* handshaker_factory */, &port_num); diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 5f41728132..85c21f0ca2 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -64,7 +64,7 @@ static void server_security_handshaker_factory_create_handshakers( } static void server_security_handshaker_factory_destroy( - grpc_exec_ctx* exec_ctx, grpc_chttp2_server_handshaker_factory *hf) { + grpc_exec_ctx *exec_ctx, grpc_chttp2_server_handshaker_factory *hf) { server_security_handshaker_factory *handshaker_factory = (server_security_handshaker_factory *)hf; GRPC_SECURITY_CONNECTOR_UNREF(&handshaker_factory->security_connector->base, @@ -106,8 +106,8 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, goto done; } // Create handshaker factory. - server_security_handshaker_factory* handshaker_factory = - gpr_malloc(sizeof(*handshaker_factory)); + server_security_handshaker_factory *handshaker_factory = + gpr_malloc(sizeof(*handshaker_factory)); memset(handshaker_factory, 0, sizeof(*handshaker_factory)); handshaker_factory->base.vtable = &server_security_handshaker_factory_vtable; handshaker_factory->security_connector = sc; diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 3e7c078d3c..d449300969 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -425,7 +425,6 @@ static void close_transport_locked(grpc_exec_ctx *exec_ctx, /* flush writable stream list to avoid dangling references */ grpc_chttp2_stream *s; while (grpc_chttp2_list_pop_writable_stream(t, &s)) { - grpc_chttp2_leave_writing_lists(exec_ctx, t, s); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:close"); } end_all_the_calls(exec_ctx, t, GRPC_ERROR_REF(error)); @@ -521,10 +520,6 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, void *sp, } } - if (s->fail_pending_writes_on_writes_finished_error != NULL) { - GRPC_ERROR_UNREF(s->fail_pending_writes_on_writes_finished_error); - } - GPR_ASSERT(s->send_initial_metadata_finished == NULL); GPR_ASSERT(s->fetching_send_message == NULL); GPR_ASSERT(s->send_trailing_metadata_finished == NULL); @@ -826,6 +821,7 @@ static void maybe_start_some_streams(grpc_exec_ctx *exec_ctx, } #define CLOSURE_BARRIER_STATS_BIT (1 << 0) +#define CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE (1 << 1) #define CLOSURE_BARRIER_FIRST_REF_BIT (1 << 16) static grpc_closure *add_closure_barrier(grpc_closure *closure) { @@ -852,6 +848,16 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, return; } closure->next_data.scratch -= CLOSURE_BARRIER_FIRST_REF_BIT; + if (grpc_http_trace) { + const char *errstr = grpc_error_string(error); + gpr_log(GPR_DEBUG, + "complete_closure_step: %p refs=%d flags=0x%04x desc=%s err=%s", + closure, + (int)(closure->next_data.scratch / CLOSURE_BARRIER_FIRST_REF_BIT), + (int)(closure->next_data.scratch % CLOSURE_BARRIER_FIRST_REF_BIT), + desc, errstr); + grpc_error_free_string(errstr); + } if (error != GRPC_ERROR_NONE) { if (closure->error_data.error == GRPC_ERROR_NONE) { closure->error_data.error = @@ -868,7 +874,14 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, grpc_transport_move_stats(&s->stats, s->collecting_stats); s->collecting_stats = NULL; } - grpc_closure_run(exec_ctx, closure, closure->error_data.error); + if (t->write_state == GRPC_CHTTP2_WRITE_STATE_IDLE || + (closure->next_data.scratch & CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE) == + 0) { + grpc_closure_run(exec_ctx, closure, closure->error_data.error); + } else { + grpc_closure_list_append(&t->run_after_write, closure, + closure->error_data.error); + } } } @@ -1013,6 +1026,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, if (op->send_initial_metadata != NULL) { GPR_ASSERT(s->send_initial_metadata_finished == NULL); + on_complete->next_data.scratch |= CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE; s->send_initial_metadata_finished = add_closure_barrier(on_complete); s->send_initial_metadata = op->send_initial_metadata; const size_t metadata_size = @@ -1066,6 +1080,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, } if (op->send_message != NULL) { + on_complete->next_data.scratch |= CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE; s->fetching_send_message_finished = add_closure_barrier(op->on_complete); if (s->write_closed) { grpc_chttp2_complete_closure_step( @@ -1103,6 +1118,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, if (op->send_trailing_metadata != NULL) { GPR_ASSERT(s->send_trailing_metadata_finished == NULL); + on_complete->next_data.scratch |= CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE; s->send_trailing_metadata_finished = add_closure_barrier(on_complete); s->send_trailing_metadata = op->send_trailing_metadata; const size_t metadata_size = @@ -1406,7 +1422,6 @@ static void remove_stream(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } } if (grpc_chttp2_list_remove_writable_stream(t, s)) { - grpc_chttp2_leave_writing_lists(exec_ctx, t, s); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:remove_stream"); } @@ -1537,41 +1552,9 @@ static grpc_error *removal_error(grpc_error *extra_error, grpc_chttp2_stream *s, return error; } -void grpc_chttp2_leave_writing_lists(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, - grpc_chttp2_stream *s) { - if (s->need_fail_pending_writes_on_writes_finished) { - grpc_error *error = s->fail_pending_writes_on_writes_finished_error; - s->fail_pending_writes_on_writes_finished_error = NULL; - s->need_fail_pending_writes_on_writes_finished = false; - grpc_chttp2_fail_pending_writes(exec_ctx, t, s, error); - } -} - void grpc_chttp2_fail_pending_writes(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_error *error) { - if (s->need_fail_pending_writes_on_writes_finished || - (t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE && - (s->included[GRPC_CHTTP2_LIST_WRITABLE] || - s->included[GRPC_CHTTP2_LIST_WRITING]))) { - /* If a write is in progress, and it involves this stream, wait for the - * write to complete before cancelling things out. If we don't do this, then - * our combiner lock might think that some operation on its queue might be - * covering a completion even though there is none, in which case we might - * offload to another thread, which isn't guarateed to exist */ - if (error != GRPC_ERROR_NONE) { - if (s->fail_pending_writes_on_writes_finished_error == GRPC_ERROR_NONE) { - s->fail_pending_writes_on_writes_finished_error = GRPC_ERROR_CREATE( - "Post-poned fail writes due to in-progress write"); - } - s->fail_pending_writes_on_writes_finished_error = grpc_error_add_child( - s->fail_pending_writes_on_writes_finished_error, error); - } - s->need_fail_pending_writes_on_writes_finished = true; - return; /* early out */ - } - error = removal_error(error, s, "Pending writes failed due to stream closure"); s->send_initial_metadata = NULL; diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 6cba1e7fd2..31eb1e01ac 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -327,6 +327,9 @@ struct grpc_chttp2_transport { */ grpc_error *close_transport_on_writes_finished; + /* a list of closures to run after writes are finished */ + grpc_closure_list run_after_write; + /* buffer pool state */ /** have we scheduled a benign cleanup? */ bool benign_reclaimer_registered; @@ -409,9 +412,6 @@ struct grpc_chttp2_stream { grpc_error *read_closed_error; /** the error that resulted in this stream being write-closed */ grpc_error *write_closed_error; - /** should any writes be cleared once this stream becomes non-writable */ - bool need_fail_pending_writes_on_writes_finished; - grpc_error *fail_pending_writes_on_writes_finished_error; grpc_published_metadata_method published_metadata[2]; bool final_metadata_requested; @@ -692,9 +692,6 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s); -void grpc_chttp2_leave_writing_lists(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, - grpc_chttp2_stream *s); void grpc_chttp2_fail_pending_writes(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_error *error); diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index 769b229a0d..ddd75ee574 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -208,7 +208,6 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:already_writing"); } } else { - grpc_chttp2_leave_writing_lists(exec_ctx, t, s); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:no_write"); } } @@ -253,9 +252,9 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_mark_stream_closed(exec_ctx, t, s, !t->is_client, 1, GRPC_ERROR_REF(error)); } - grpc_chttp2_leave_writing_lists(exec_ctx, t, s); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:end"); } + grpc_exec_ctx_enqueue_list(exec_ctx, &t->run_after_write, NULL); grpc_slice_buffer_reset_and_unref(&t->outbuf); GRPC_ERROR_UNREF(error); GPR_TIMER_END("grpc_chttp2_end_write", 0); diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 16392020f4..cc1840d36b 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -231,6 +231,7 @@ static void rulist_remove(grpc_resource_user *resource_user, grpc_rulist list) { resource_user->links[list].prev; resource_user->links[list].prev->links[list].next = resource_user->links[list].next; + resource_user->links[list].next = resource_user->links[list].prev = NULL; } /******************************************************************************* @@ -703,6 +704,8 @@ static void ru_unref_by(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, gpr_atm amount) { GPR_ASSERT(amount > 0); gpr_atm old = gpr_atm_full_fetch_add(&resource_user->refs, -amount); + gpr_log(GPR_DEBUG, "%p unref_by %d, old=%d", resource_user, (int)amount, + (int)old); GPR_ASSERT(old >= amount); if (old == amount) { grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, -- cgit v1.2.3 From ab5a4990809fef0bbed10c5f2c827fc7065d8fad Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Dec 2016 17:17:07 -0800 Subject: Fix use-after-free --- src/core/lib/iomgr/resource_quota.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 16392020f4..213d29600c 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -231,6 +231,7 @@ static void rulist_remove(grpc_resource_user *resource_user, grpc_rulist list) { resource_user->links[list].prev; resource_user->links[list].prev->links[list].next = resource_user->links[list].next; + resource_user->links[list].next = resource_user->links[list].prev = NULL; } /******************************************************************************* -- cgit v1.2.3 From 1af5401e734d9dd12845b50951f199d6b4caaa92 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Dec 2016 17:17:33 -0800 Subject: Fix spam --- src/core/lib/iomgr/resource_quota.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index cc1840d36b..213d29600c 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -704,8 +704,6 @@ static void ru_unref_by(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, gpr_atm amount) { GPR_ASSERT(amount > 0); gpr_atm old = gpr_atm_full_fetch_add(&resource_user->refs, -amount); - gpr_log(GPR_DEBUG, "%p unref_by %d, old=%d", resource_user, (int)amount, - (int)old); GPR_ASSERT(old >= amount); if (old == amount) { grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, -- cgit v1.2.3 From 4eec0041f5093f6bec7dbef0e960f1bb48e0d3b0 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 5 Dec 2016 08:03:41 -0800 Subject: Revert "Remove redundant includes from string.h and tmpfile.h" --- BUILD | 9 --- CMakeLists.txt | 7 -- Makefile | 9 --- build.yaml | 1 - gRPC-Core.podspec | 2 - grpc.gemspec | 2 - include/grpc/impl/codegen/gpr_slice.h | 84 ---------------------- include/grpc/impl/codegen/slice.h | 21 ------ package.xml | 2 - src/core/lib/support/string.h | 2 + src/core/lib/support/tmpfile.h | 2 + test/core/surface/public_headers_must_be_c89.c | 1 - tools/doxygen/Doxyfile.c++ | 1 - tools/doxygen/Doxyfile.c++.internal | 1 - tools/doxygen/Doxyfile.core | 2 - tools/doxygen/Doxyfile.core.internal | 2 - tools/run_tests/sources_and_headers.json | 2 - vsprojects/vcxproj/gpr/gpr.vcxproj | 1 - vsprojects/vcxproj/gpr/gpr.vcxproj.filters | 3 - vsprojects/vcxproj/grpc++/grpc++.vcxproj | 1 - vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 3 - .../grpc++_test_util/grpc++_test_util.vcxproj | 1 - .../grpc++_test_util.vcxproj.filters | 3 - .../grpc++_unsecure/grpc++_unsecure.vcxproj | 1 - .../grpc++_unsecure.vcxproj.filters | 3 - vsprojects/vcxproj/grpc/grpc.vcxproj | 1 - vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 - .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 1 - .../grpc_test_util/grpc_test_util.vcxproj.filters | 3 - .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 1 - .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 3 - .../codegen_test_full/codegen_test_full.vcxproj | 1 - .../codegen_test_full.vcxproj.filters | 3 - .../codegen_test_minimal.vcxproj | 1 - .../codegen_test_minimal.vcxproj.filters | 3 - .../test/grpc_tool_test/grpc_tool_test.vcxproj | 1 - .../grpc_tool_test/grpc_tool_test.vcxproj.filters | 3 - 37 files changed, 4 insertions(+), 186 deletions(-) delete mode 100644 include/grpc/impl/codegen/gpr_slice.h (limited to 'src/core') diff --git a/BUILD b/BUILD index fb81cf65fc..ab0fc237b7 100644 --- a/BUILD +++ b/BUILD @@ -135,7 +135,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -565,7 +564,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -962,7 +960,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1344,7 +1341,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1500,7 +1496,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1963,7 +1958,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -2140,7 +2134,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -2303,7 +2296,6 @@ objc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -2570,7 +2562,6 @@ objc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 16e5d62de2..ff0927504a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -258,7 +258,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -538,7 +537,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -790,7 +788,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1042,7 +1039,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1206,7 +1202,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1540,7 +1535,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1747,7 +1741,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h diff --git a/Makefile b/Makefile index 8e93da2111..73fc743230 100644 --- a/Makefile +++ b/Makefile @@ -2552,7 +2552,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -2860,7 +2859,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3131,7 +3129,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3348,7 +3345,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3639,7 +3635,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3884,7 +3879,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -4247,7 +4241,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -4603,7 +4596,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -4782,7 +4774,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/build.yaml b/build.yaml index 664a530ebf..a5fbaa3a4e 100644 --- a/build.yaml +++ b/build.yaml @@ -144,7 +144,6 @@ filegroups: - include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_windows.h - - include/grpc/impl/codegen/gpr_slice.h - include/grpc/impl/codegen/gpr_types.h - include/grpc/impl/codegen/port_platform.h - include/grpc/impl/codegen/slice.h diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index f9e0164bdc..04f7211d21 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -146,7 +146,6 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_windows.h', - 'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/slice.h', @@ -173,7 +172,6 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_windows.h', - 'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/slice.h', diff --git a/grpc.gemspec b/grpc.gemspec index 9c9568ce64..6019b97f67 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -73,7 +73,6 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h ) - s.files += %w( include/grpc/impl/codegen/gpr_slice.h ) s.files += %w( include/grpc/impl/codegen/gpr_types.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/slice.h ) @@ -156,7 +155,6 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h ) - s.files += %w( include/grpc/impl/codegen/gpr_slice.h ) s.files += %w( include/grpc/impl/codegen/gpr_types.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/slice.h ) diff --git a/include/grpc/impl/codegen/gpr_slice.h b/include/grpc/impl/codegen/gpr_slice.h deleted file mode 100644 index c62e976b8f..0000000000 --- a/include/grpc/impl/codegen/gpr_slice.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * - * 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. - * - */ -#ifndef GRPC_IMPL_CODEGEN_GPR_SLICE_H -#define GRPC_IMPL_CODEGEN_GPR_SLICE_H - -/* WARNING: Please do not use this header. This was added as a temporary measure - * to not break some of the external projects that depend on gpr_slice_* - * functions. We are actively working on moving all the gpr_slice_* references - * to grpc_slice_* and this file will be removed - * */ - -/* TODO (sreek) - Allowed by default but will be very soon turned off */ -#define GRPC_ALLOW_GPR_SLICE_FUNCTIONS 1 - -#ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS - -#define gpr_slice_refcount grpc_slice_refcount -#define gpr_slice grpc_slice -#define gpr_slice_buffer grpc_slice_buffer - -#define gpr_slice_ref grpc_slice_ref -#define gpr_slice_unref grpc_slice_unref -#define gpr_slice_new grpc_slice_new -#define gpr_slice_new_with_user_data grpc_slice_new_with_user_data -#define gpr_slice_new_with_len grpc_slice_new_with_len -#define gpr_slice_malloc grpc_slice_malloc -#define gpr_slice_from_copied_string grpc_slice_from_copied_string -#define gpr_slice_from_copied_buffer grpc_slice_from_copied_buffer -#define gpr_slice_from_static_string grpc_slice_from_static_string -#define gpr_slice_sub grpc_slice_sub -#define gpr_slice_sub_no_ref grpc_slice_sub_no_ref -#define gpr_slice_split_tail grpc_slice_split_tail -#define gpr_slice_split_head grpc_slice_split_head -#define gpr_slice_cmp grpc_slice_cmp -#define gpr_slice_str_cmp grpc_slice_str_cmp - -#define gpr_slice_buffer grpc_slice_buffer -#define gpr_slice_buffer_init grpc_slice_buffer_init -#define gpr_slice_buffer_destroy grpc_slice_buffer_destroy -#define gpr_slice_buffer_add grpc_slice_buffer_add -#define gpr_slice_buffer_add_indexed grpc_slice_buffer_add_indexed -#define gpr_slice_buffer_addn grpc_slice_buffer_addn -#define gpr_slice_buffer_tiny_add grpc_slice_buffer_tiny_add -#define gpr_slice_buffer_pop grpc_slice_buffer_pop -#define gpr_slice_buffer_reset_and_unref grpc_slice_buffer_reset_and_unref -#define gpr_slice_buffer_swap grpc_slice_buffer_swap -#define gpr_slice_buffer_move_into grpc_slice_buffer_move_into -#define gpr_slice_buffer_trim_end grpc_slice_buffer_trim_end -#define gpr_slice_buffer_move_first grpc_slice_buffer_move_first -#define gpr_slice_buffer_take_first grpc_slice_buffer_take_first - -#endif /* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */ - -#endif /* GRPC_IMPL_CODEGEN_GPR_SLICE_H */ diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index 06fed046a9..774ba0e95d 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -37,8 +37,6 @@ #include #include -#include - /* Slice API A slice represents a contiguous reference counted array of bytes. @@ -117,23 +115,4 @@ typedef struct { GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice) #define GRPC_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0) - -#ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS - -/* Duplicate GPR_* definitions */ -#define GPR_SLICE_START_PTR(slice) \ - ((slice).refcount ? (slice).data.refcounted.bytes \ - : (slice).data.inlined.bytes) -#define GPR_SLICE_LENGTH(slice) \ - ((slice).refcount ? (slice).data.refcounted.length \ - : (slice).data.inlined.length) -#define GPR_SLICE_SET_LENGTH(slice, newlen) \ - ((slice).refcount ? ((slice).data.refcounted.length = (size_t)(newlen)) \ - : ((slice).data.inlined.length = (uint8_t)(newlen))) -#define GPR_SLICE_END_PTR(slice) \ - GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice) -#define GPR_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0) - -#endif /* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */ - #endif /* GRPC_IMPL_CODEGEN_SLICE_H */ diff --git a/package.xml b/package.xml index 2106b8f666..61668815a6 100644 --- a/package.xml +++ b/package.xml @@ -81,7 +81,6 @@ - @@ -164,7 +163,6 @@ - diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index db59308425..e933e2eb46 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -36,6 +36,8 @@ #include +#include +#include #include #ifdef __cplusplus diff --git a/src/core/lib/support/tmpfile.h b/src/core/lib/support/tmpfile.h index f613cf9bc8..8952e5ec3d 100644 --- a/src/core/lib/support/tmpfile.h +++ b/src/core/lib/support/tmpfile.h @@ -36,6 +36,8 @@ #include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index df6b733493..d4cfa25d44 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 9e3fc62ebc..ff3a0e381d 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -840,7 +840,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 074ba504fa..04e8f4e7f2 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -840,7 +840,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index b83e710a2b..1e748ba4a8 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -779,7 +779,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -819,7 +818,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 533999b765..6572bd4ddf 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -779,7 +779,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -1213,7 +1212,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 9b25263cd7..b1114deb05 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6631,7 +6631,6 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -6648,7 +6647,6 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj b/vsprojects/vcxproj/gpr/gpr.vcxproj index c4f9c55308..ce593473c0 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj @@ -177,7 +177,6 @@ - diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters index 77a1ba64d6..a50a9f4200 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters @@ -225,9 +225,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 14b3453b74..f281db72b6 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -338,7 +338,6 @@ - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 5360819649..f359e4ef31 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -354,9 +354,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj index 6a928e173f..d2305b2e25 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj @@ -185,7 +185,6 @@ - diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters index bf8fab03bb..d1aaba7092 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters @@ -147,9 +147,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 39b01e6a4e..1511a2cfe4 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -338,7 +338,6 @@ - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 9cafa1670a..bed77b25a4 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -339,9 +339,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 40f0f141b5..558b5b0c66 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -286,7 +286,6 @@ - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index c0de28563e..a40a1b5f1c 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -705,9 +705,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 01b73ce1a2..2acdd32cf3 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -166,7 +166,6 @@ - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 40ff67671f..6c918f1254 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -456,9 +456,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 49c2d2db30..661192101c 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -277,7 +277,6 @@ - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 5bca4fb9a5..466116e604 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -621,9 +621,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj index 377d86fa5a..a2b2a1dfa0 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj @@ -198,7 +198,6 @@ - diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters index e9ba002e9b..94b6c2530e 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters @@ -135,9 +135,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj index 3254ad8d45..1a3c157983 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj @@ -198,7 +198,6 @@ - diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters index 6f32f65524..1f4b60ca4d 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters @@ -138,9 +138,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj index 7fad922233..1e3cc3ca04 100644 --- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj +++ b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj @@ -199,7 +199,6 @@ - diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters index 19cb113341..1c308c5881 100644 --- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters @@ -129,9 +129,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen -- cgit v1.2.3 From 2d317fbc575742704797033fce284ef234bf021a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 5 Dec 2016 08:07:13 -0800 Subject: Revert "Revert "Remove redundant includes from string.h and tmpfile.h"" --- BUILD | 9 +++ CMakeLists.txt | 7 ++ Makefile | 9 +++ build.yaml | 1 + gRPC-Core.podspec | 2 + grpc.gemspec | 2 + include/grpc/impl/codegen/gpr_slice.h | 84 ++++++++++++++++++++++ include/grpc/impl/codegen/slice.h | 21 ++++++ package.xml | 2 + src/core/lib/support/string.h | 2 - src/core/lib/support/tmpfile.h | 2 - test/core/surface/public_headers_must_be_c89.c | 1 + tools/doxygen/Doxyfile.c++ | 1 + tools/doxygen/Doxyfile.c++.internal | 1 + tools/doxygen/Doxyfile.core | 2 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 2 + vsprojects/vcxproj/gpr/gpr.vcxproj | 1 + vsprojects/vcxproj/gpr/gpr.vcxproj.filters | 3 + vsprojects/vcxproj/grpc++/grpc++.vcxproj | 1 + vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 3 + .../grpc++_test_util/grpc++_test_util.vcxproj | 1 + .../grpc++_test_util.vcxproj.filters | 3 + .../grpc++_unsecure/grpc++_unsecure.vcxproj | 1 + .../grpc++_unsecure.vcxproj.filters | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj | 1 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 + .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 1 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 3 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 1 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 3 + .../codegen_test_full/codegen_test_full.vcxproj | 1 + .../codegen_test_full.vcxproj.filters | 3 + .../codegen_test_minimal.vcxproj | 1 + .../codegen_test_minimal.vcxproj.filters | 3 + .../test/grpc_tool_test/grpc_tool_test.vcxproj | 1 + .../grpc_tool_test/grpc_tool_test.vcxproj.filters | 3 + 37 files changed, 186 insertions(+), 4 deletions(-) create mode 100644 include/grpc/impl/codegen/gpr_slice.h (limited to 'src/core') diff --git a/BUILD b/BUILD index ab0fc237b7..fb81cf65fc 100644 --- a/BUILD +++ b/BUILD @@ -135,6 +135,7 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -564,6 +565,7 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -960,6 +962,7 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1341,6 +1344,7 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1496,6 +1500,7 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1958,6 +1963,7 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -2134,6 +2140,7 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -2296,6 +2303,7 @@ objc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -2562,6 +2570,7 @@ objc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index ff0927504a..16e5d62de2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -258,6 +258,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -537,6 +538,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -788,6 +790,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1039,6 +1042,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1202,6 +1206,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1535,6 +1540,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1741,6 +1747,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h diff --git a/Makefile b/Makefile index db30c21586..844ce28255 100644 --- a/Makefile +++ b/Makefile @@ -2552,6 +2552,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -2859,6 +2860,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3129,6 +3131,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3345,6 +3348,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3635,6 +3639,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3879,6 +3884,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -4241,6 +4247,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -4596,6 +4603,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -4774,6 +4782,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/build.yaml b/build.yaml index 68d19a6b44..652d7bf0d8 100644 --- a/build.yaml +++ b/build.yaml @@ -144,6 +144,7 @@ filegroups: - include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_windows.h + - include/grpc/impl/codegen/gpr_slice.h - include/grpc/impl/codegen/gpr_types.h - include/grpc/impl/codegen/port_platform.h - include/grpc/impl/codegen/slice.h diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 04f7211d21..f9e0164bdc 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -146,6 +146,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_windows.h', + 'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/slice.h', @@ -172,6 +173,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_windows.h', + 'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/slice.h', diff --git a/grpc.gemspec b/grpc.gemspec index 6019b97f67..9c9568ce64 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -73,6 +73,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h ) + s.files += %w( include/grpc/impl/codegen/gpr_slice.h ) s.files += %w( include/grpc/impl/codegen/gpr_types.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/slice.h ) @@ -155,6 +156,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h ) + s.files += %w( include/grpc/impl/codegen/gpr_slice.h ) s.files += %w( include/grpc/impl/codegen/gpr_types.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/slice.h ) diff --git a/include/grpc/impl/codegen/gpr_slice.h b/include/grpc/impl/codegen/gpr_slice.h new file mode 100644 index 0000000000..c62e976b8f --- /dev/null +++ b/include/grpc/impl/codegen/gpr_slice.h @@ -0,0 +1,84 @@ +/* + * + * 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. + * + */ +#ifndef GRPC_IMPL_CODEGEN_GPR_SLICE_H +#define GRPC_IMPL_CODEGEN_GPR_SLICE_H + +/* WARNING: Please do not use this header. This was added as a temporary measure + * to not break some of the external projects that depend on gpr_slice_* + * functions. We are actively working on moving all the gpr_slice_* references + * to grpc_slice_* and this file will be removed + * */ + +/* TODO (sreek) - Allowed by default but will be very soon turned off */ +#define GRPC_ALLOW_GPR_SLICE_FUNCTIONS 1 + +#ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS + +#define gpr_slice_refcount grpc_slice_refcount +#define gpr_slice grpc_slice +#define gpr_slice_buffer grpc_slice_buffer + +#define gpr_slice_ref grpc_slice_ref +#define gpr_slice_unref grpc_slice_unref +#define gpr_slice_new grpc_slice_new +#define gpr_slice_new_with_user_data grpc_slice_new_with_user_data +#define gpr_slice_new_with_len grpc_slice_new_with_len +#define gpr_slice_malloc grpc_slice_malloc +#define gpr_slice_from_copied_string grpc_slice_from_copied_string +#define gpr_slice_from_copied_buffer grpc_slice_from_copied_buffer +#define gpr_slice_from_static_string grpc_slice_from_static_string +#define gpr_slice_sub grpc_slice_sub +#define gpr_slice_sub_no_ref grpc_slice_sub_no_ref +#define gpr_slice_split_tail grpc_slice_split_tail +#define gpr_slice_split_head grpc_slice_split_head +#define gpr_slice_cmp grpc_slice_cmp +#define gpr_slice_str_cmp grpc_slice_str_cmp + +#define gpr_slice_buffer grpc_slice_buffer +#define gpr_slice_buffer_init grpc_slice_buffer_init +#define gpr_slice_buffer_destroy grpc_slice_buffer_destroy +#define gpr_slice_buffer_add grpc_slice_buffer_add +#define gpr_slice_buffer_add_indexed grpc_slice_buffer_add_indexed +#define gpr_slice_buffer_addn grpc_slice_buffer_addn +#define gpr_slice_buffer_tiny_add grpc_slice_buffer_tiny_add +#define gpr_slice_buffer_pop grpc_slice_buffer_pop +#define gpr_slice_buffer_reset_and_unref grpc_slice_buffer_reset_and_unref +#define gpr_slice_buffer_swap grpc_slice_buffer_swap +#define gpr_slice_buffer_move_into grpc_slice_buffer_move_into +#define gpr_slice_buffer_trim_end grpc_slice_buffer_trim_end +#define gpr_slice_buffer_move_first grpc_slice_buffer_move_first +#define gpr_slice_buffer_take_first grpc_slice_buffer_take_first + +#endif /* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */ + +#endif /* GRPC_IMPL_CODEGEN_GPR_SLICE_H */ diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index 774ba0e95d..06fed046a9 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -37,6 +37,8 @@ #include #include +#include + /* Slice API A slice represents a contiguous reference counted array of bytes. @@ -115,4 +117,23 @@ typedef struct { GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice) #define GRPC_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0) + +#ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS + +/* Duplicate GPR_* definitions */ +#define GPR_SLICE_START_PTR(slice) \ + ((slice).refcount ? (slice).data.refcounted.bytes \ + : (slice).data.inlined.bytes) +#define GPR_SLICE_LENGTH(slice) \ + ((slice).refcount ? (slice).data.refcounted.length \ + : (slice).data.inlined.length) +#define GPR_SLICE_SET_LENGTH(slice, newlen) \ + ((slice).refcount ? ((slice).data.refcounted.length = (size_t)(newlen)) \ + : ((slice).data.inlined.length = (uint8_t)(newlen))) +#define GPR_SLICE_END_PTR(slice) \ + GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice) +#define GPR_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0) + +#endif /* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */ + #endif /* GRPC_IMPL_CODEGEN_SLICE_H */ diff --git a/package.xml b/package.xml index 61668815a6..2106b8f666 100644 --- a/package.xml +++ b/package.xml @@ -81,6 +81,7 @@ + @@ -163,6 +164,7 @@ + diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index e933e2eb46..db59308425 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -36,8 +36,6 @@ #include -#include -#include #include #ifdef __cplusplus diff --git a/src/core/lib/support/tmpfile.h b/src/core/lib/support/tmpfile.h index 8952e5ec3d..f613cf9bc8 100644 --- a/src/core/lib/support/tmpfile.h +++ b/src/core/lib/support/tmpfile.h @@ -36,8 +36,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index d4cfa25d44..df6b733493 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index ff3a0e381d..9e3fc62ebc 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -840,6 +840,7 @@ 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_windows.h \ +include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 04e8f4e7f2..074ba504fa 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -840,6 +840,7 @@ 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_windows.h \ +include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 1e748ba4a8..b83e710a2b 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -779,6 +779,7 @@ 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_windows.h \ +include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -818,6 +819,7 @@ 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_windows.h \ +include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 6572bd4ddf..533999b765 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -779,6 +779,7 @@ 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_windows.h \ +include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -1212,6 +1213,7 @@ 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_windows.h \ +include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 2e6877ccac..e080f0d175 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6631,6 +6631,7 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -6647,6 +6648,7 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj b/vsprojects/vcxproj/gpr/gpr.vcxproj index ce593473c0..c4f9c55308 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj @@ -177,6 +177,7 @@ + diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters index a50a9f4200..77a1ba64d6 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters @@ -225,6 +225,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index f281db72b6..14b3453b74 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -338,6 +338,7 @@ + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index f359e4ef31..5360819649 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -354,6 +354,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj index d2305b2e25..6a928e173f 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj @@ -185,6 +185,7 @@ + diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters index d1aaba7092..bf8fab03bb 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters @@ -147,6 +147,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 1511a2cfe4..39b01e6a4e 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -338,6 +338,7 @@ + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index bed77b25a4..9cafa1670a 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -339,6 +339,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 558b5b0c66..40f0f141b5 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -286,6 +286,7 @@ + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index a40a1b5f1c..c0de28563e 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -705,6 +705,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 2acdd32cf3..01b73ce1a2 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -166,6 +166,7 @@ + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 6c918f1254..40ff67671f 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -456,6 +456,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 661192101c..49c2d2db30 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -277,6 +277,7 @@ + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 466116e604..5bca4fb9a5 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -621,6 +621,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj index a2b2a1dfa0..377d86fa5a 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj @@ -198,6 +198,7 @@ + diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters index 94b6c2530e..e9ba002e9b 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters @@ -135,6 +135,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj index 1a3c157983..3254ad8d45 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj @@ -198,6 +198,7 @@ + diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters index 1f4b60ca4d..6f32f65524 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters @@ -138,6 +138,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj index 1e3cc3ca04..7fad922233 100644 --- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj +++ b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj @@ -199,6 +199,7 @@ + diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters index 1c308c5881..19cb113341 100644 --- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters @@ -129,6 +129,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen -- cgit v1.2.3 From 909935087b7875dd46507cb87934911edfb507db Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Dec 2016 08:32:53 -0800 Subject: Get idle edge reliably --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 12 +++++++----- src/core/ext/transport/chttp2/transport/writing.c | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index d449300969..22e63d7682 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -599,11 +599,13 @@ static void set_write_state(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, write_state_name(t->write_state), write_state_name(st), reason)); t->write_state = st; - if (st == GRPC_CHTTP2_WRITE_STATE_IDLE && - t->close_transport_on_writes_finished != NULL) { - grpc_error *err = t->close_transport_on_writes_finished; - t->close_transport_on_writes_finished = NULL; - close_transport_locked(exec_ctx, t, err); + if (st == GRPC_CHTTP2_WRITE_STATE_IDLE) { + grpc_exec_ctx_enqueue_list(exec_ctx, &t->run_after_write, NULL); + if (t->close_transport_on_writes_finished != NULL) { + grpc_error *err = t->close_transport_on_writes_finished; + t->close_transport_on_writes_finished = NULL; + close_transport_locked(exec_ctx, t, err); + } } } diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index ddd75ee574..139e7387c4 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -254,7 +254,6 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:end"); } - grpc_exec_ctx_enqueue_list(exec_ctx, &t->run_after_write, NULL); grpc_slice_buffer_reset_and_unref(&t->outbuf); GRPC_ERROR_UNREF(error); GPR_TIMER_END("grpc_chttp2_end_write", 0); -- cgit v1.2.3 From 504ae4347bee3589f6695dff4e28a1d7e40b8f59 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Dec 2016 11:07:58 -0800 Subject: Add parens --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 22e63d7682..f995d2180e 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -876,9 +876,9 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, grpc_transport_move_stats(&s->stats, s->collecting_stats); s->collecting_stats = NULL; } - if (t->write_state == GRPC_CHTTP2_WRITE_STATE_IDLE || - (closure->next_data.scratch & CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE) == - 0) { + if ((t->write_state == GRPC_CHTTP2_WRITE_STATE_IDLE) || + ((closure->next_data.scratch & CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE) == + 0)) { grpc_closure_run(exec_ctx, closure, closure->error_data.error); } else { grpc_closure_list_append(&t->run_after_write, closure, -- cgit v1.2.3 From 73c4f8fce1eec86638d989e395ca2f004024b33d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Dec 2016 11:11:59 -0800 Subject: Readability improvements --- .../ext/transport/chttp2/transport/chttp2_transport.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index f995d2180e..3b84898fee 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -822,8 +822,14 @@ static void maybe_start_some_streams(grpc_exec_ctx *exec_ctx, } } +/* Flag that this closure barrier wants stats to be updated before finishing */ #define CLOSURE_BARRIER_STATS_BIT (1 << 0) -#define CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE (1 << 1) +/* Flag that this closure barrier may be covering a write in a pollset, and so + we should not complete this closure until we can prove that the write got + scheduled */ +#define CLOSURE_BARRIER_MAY_COVER_WRITE (1 << 1) +/* First bit of the reference count, stored in the high order bits (with the low + bits being used for flags defined above) */ #define CLOSURE_BARRIER_FIRST_REF_BIT (1 << 16) static grpc_closure *add_closure_barrier(grpc_closure *closure) { @@ -877,8 +883,7 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, s->collecting_stats = NULL; } if ((t->write_state == GRPC_CHTTP2_WRITE_STATE_IDLE) || - ((closure->next_data.scratch & CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE) == - 0)) { + !(closure->next_data.scratch & CLOSURE_BARRIER_MAY_COVER_WRITE)) { grpc_closure_run(exec_ctx, closure, closure->error_data.error); } else { grpc_closure_list_append(&t->run_after_write, closure, @@ -1028,7 +1033,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, if (op->send_initial_metadata != NULL) { GPR_ASSERT(s->send_initial_metadata_finished == NULL); - on_complete->next_data.scratch |= CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE; + on_complete->next_data.scratch |= CLOSURE_BARRIER_MAY_COVER_WRITE; s->send_initial_metadata_finished = add_closure_barrier(on_complete); s->send_initial_metadata = op->send_initial_metadata; const size_t metadata_size = @@ -1082,7 +1087,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, } if (op->send_message != NULL) { - on_complete->next_data.scratch |= CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE; + on_complete->next_data.scratch |= CLOSURE_BARRIER_MAY_COVER_WRITE; s->fetching_send_message_finished = add_closure_barrier(op->on_complete); if (s->write_closed) { grpc_chttp2_complete_closure_step( @@ -1120,7 +1125,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, if (op->send_trailing_metadata != NULL) { GPR_ASSERT(s->send_trailing_metadata_finished == NULL); - on_complete->next_data.scratch |= CLOSURE_BARRIER_CANNOT_RUN_WITH_WRITE; + on_complete->next_data.scratch |= CLOSURE_BARRIER_MAY_COVER_WRITE; s->send_trailing_metadata_finished = add_closure_barrier(on_complete); s->send_trailing_metadata = op->send_trailing_metadata; const size_t metadata_size = -- cgit v1.2.3 From 9c5318aba097dc8634626ba0b106fc8993ce32b5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Dec 2016 15:07:04 -0800 Subject: Fix shutdown problems with sync server --- src/core/lib/surface/call.c | 4 ++++ src/cpp/server/server_cc.cc | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 1e0f3eeca5..8ca3cab9d5 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1551,6 +1551,10 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, error = GRPC_CALL_ERROR_TOO_MANY_OPERATIONS; goto done_with_error; } + /* IF this is a server, then GRPC_OP_RECV_INITIAL_METADATA *must* come + from server.c. In that case, it's coming from accept_stream, and in + that case we're not necessarily covered by a poller. */ + stream_op->covered_by_poller = call->is_client; call->received_initial_metadata = 1; call->buffered_metadata[0] = op->data.recv_initial_metadata; grpc_closure_init(&call->receiving_initial_metadata_ready, diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc index b7cfd6dbf1..3ec7faddad 100644 --- a/src/cpp/server/server_cc.cc +++ b/src/cpp/server/server_cc.cc @@ -510,12 +510,6 @@ void Server::ShutdownInternal(gpr_timespec deadline) { ShutdownTag shutdown_tag; // Dummy shutdown tag grpc_server_shutdown_and_notify(server_, shutdown_cq.cq(), &shutdown_tag); - // Shutdown all ThreadManagers. This will try to gracefully stop all the - // threads in the ThreadManagers (once they process any inflight requests) - for (auto it = sync_req_mgrs_.begin(); it != sync_req_mgrs_.end(); it++) { - (*it)->Shutdown(); // ThreadManager's Shutdown() - } - shutdown_cq.Shutdown(); void* tag; @@ -531,6 +525,12 @@ void Server::ShutdownInternal(gpr_timespec deadline) { // Else in case of SHUTDOWN or GOT_EVENT, it means that the server has // successfully shutdown + // Shutdown all ThreadManagers. This will try to gracefully stop all the + // threads in the ThreadManagers (once they process any inflight requests) + for (auto it = sync_req_mgrs_.begin(); it != sync_req_mgrs_.end(); it++) { + (*it)->Shutdown(); // ThreadManager's Shutdown() + } + // Wait for threads in all ThreadManagers to terminate for (auto it = sync_req_mgrs_.begin(); it != sync_req_mgrs_.end(); it++) { (*it)->Wait(); -- cgit v1.2.3 From 4ee9bb06b92a7cdd5f87240b0ec882c368d325dd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Dec 2016 15:37:47 -0800 Subject: Fix race if connector is shutdown while connecting --- src/core/ext/transport/chttp2/client/chttp2_connector.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.c b/src/core/ext/transport/chttp2/client/chttp2_connector.c index 213395c20f..568b114d64 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.c +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.c @@ -56,6 +56,7 @@ typedef struct { gpr_refcount refs; bool shutdown; + bool connecting; char *server_name; grpc_chttp2_create_handshakers_func create_handshakers; @@ -103,7 +104,9 @@ static void chttp2_connector_shutdown(grpc_exec_ctx *exec_ctx, } // If handshaking is not yet in progress, shutdown the endpoint. // Otherwise, the handshaker will do this for us. - if (c->endpoint != NULL) grpc_endpoint_shutdown(exec_ctx, c->endpoint); + if (!c->connecting && c->endpoint != NULL) { + grpc_endpoint_shutdown(exec_ctx, c->endpoint); + } gpr_mu_unlock(&c->mu); } @@ -192,6 +195,8 @@ static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { chttp2_connector *c = arg; gpr_mu_lock(&c->mu); + GPR_ASSERT(c->connecting); + c->connecting = false; if (error != GRPC_ERROR_NONE || c->shutdown) { if (error == GRPC_ERROR_NONE) { error = GRPC_ERROR_CREATE("connector shutdown"); @@ -202,6 +207,7 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_closure *notify = c->notify; c->notify = NULL; grpc_exec_ctx_sched(exec_ctx, notify, error, NULL); + if (c->endpoint != NULL) grpc_endpoint_shutdown(exec_ctx, c->endpoint); gpr_mu_unlock(&c->mu); chttp2_connector_unref(exec_ctx, arg); } else { @@ -235,6 +241,8 @@ static void chttp2_connector_connect(grpc_exec_ctx *exec_ctx, GPR_ASSERT(c->endpoint == NULL); chttp2_connector_ref(con); // Ref taken for callback. grpc_closure_init(&c->connected, connected, c); + GPR_ASSERT(!c->connecting); + c->connecting = true; grpc_tcp_client_connect(exec_ctx, &c->connected, &c->endpoint, args->interested_parties, args->channel_args, args->addr, args->deadline); -- cgit v1.2.3 From 65b79c8ddabf31ac3300ddd6ad61e7ae7166c412 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 6 Dec 2016 07:20:20 -0800 Subject: Rename *_create_handshakers() to *_add_handshakers(). --- .../ext/transport/chttp2/client/chttp2_connector.c | 18 ++++++------ .../ext/transport/chttp2/client/chttp2_connector.h | 10 +++---- .../chttp2/client/insecure/channel_create.c | 2 +- .../chttp2/client/secure/secure_channel_create.c | 12 ++++---- .../ext/transport/chttp2/server/chttp2_server.c | 8 +++--- .../ext/transport/chttp2/server/chttp2_server.h | 4 +-- .../chttp2/server/secure/server_secure_chttp2.c | 6 ++-- src/core/lib/http/httpcli_security_connector.c | 11 ++++---- .../lib/security/transport/security_connector.c | 32 +++++++++++----------- .../lib/security/transport/security_connector.h | 16 +++++------ .../lib/security/transport/security_handshaker.c | 8 +++--- .../lib/security/transport/security_handshaker.h | 8 +++--- 12 files changed, 67 insertions(+), 68 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.c b/src/core/ext/transport/chttp2/client/chttp2_connector.c index 568b114d64..58a6877b9b 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.c +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.c @@ -59,8 +59,8 @@ typedef struct { bool connecting; char *server_name; - grpc_chttp2_create_handshakers_func create_handshakers; - void *create_handshakers_user_data; + grpc_chttp2_add_handshakers_func add_handshakers; + void *add_handshakers_user_data; grpc_closure *notify; grpc_connect_in_args args; @@ -160,9 +160,9 @@ static void start_handshake_locked(grpc_exec_ctx *exec_ctx, grpc_http_connect_handshaker_create(proxy_name, c->server_name)); gpr_free(proxy_name); } - if (c->create_handshakers != NULL) { - c->create_handshakers(exec_ctx, c->create_handshakers_user_data, - c->handshake_mgr); + if (c->add_handshakers != NULL) { + c->add_handshakers(exec_ctx, c->add_handshakers_user_data, + c->handshake_mgr); } grpc_handshake_manager_do_handshake( exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args, @@ -255,15 +255,15 @@ static const grpc_connector_vtable chttp2_connector_vtable = { grpc_connector *grpc_chttp2_connector_create( grpc_exec_ctx *exec_ctx, const char *server_name, - grpc_chttp2_create_handshakers_func create_handshakers, - void *create_handshakers_user_data) { + grpc_chttp2_add_handshakers_func add_handshakers, + void *add_handshakers_user_data) { chttp2_connector *c = gpr_malloc(sizeof(*c)); memset(c, 0, sizeof(*c)); c->base.vtable = &chttp2_connector_vtable; gpr_mu_init(&c->mu); gpr_ref_init(&c->refs, 1); c->server_name = gpr_strdup(server_name); - c->create_handshakers = create_handshakers; - c->create_handshakers_user_data = create_handshakers_user_data; + c->add_handshakers = add_handshakers; + c->add_handshakers_user_data = add_handshakers_user_data; return &c->base; } diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.h b/src/core/ext/transport/chttp2/client/chttp2_connector.h index 6c34ce1af1..c57fb1a9a0 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.h +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.h @@ -38,15 +38,15 @@ #include "src/core/lib/channel/handshaker.h" #include "src/core/lib/iomgr/exec_ctx.h" -typedef void (*grpc_chttp2_create_handshakers_func)( +typedef void (*grpc_chttp2_add_handshakers_func)( grpc_exec_ctx* exec_ctx, void* user_data, grpc_handshake_manager* handshake_mgr); -/// If \a create_handshakers is non-NULL, it will be called with -/// \a create_handshakers_user_data to add handshakers. +/// If \a add_handshakers is non-NULL, it will be called with +/// \a add_handshakers_user_data to add handshakers. grpc_connector* grpc_chttp2_connector_create( grpc_exec_ctx* exec_ctx, const char* server_name, - grpc_chttp2_create_handshakers_func create_handshakers, - void* create_handshakers_user_data); + grpc_chttp2_add_handshakers_func add_handshakers, + void* add_handshakers_user_data); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H */ diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 29f3759d00..89501c5905 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -54,7 +54,7 @@ static grpc_subchannel *client_channel_factory_create_subchannel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const grpc_subchannel_args *args) { grpc_connector *connector = grpc_chttp2_connector_create( - exec_ctx, args->server_name, NULL /* create_handshakers */, + exec_ctx, args->server_name, NULL /* add_handshakers */, NULL /* user_data */); grpc_subchannel *s = grpc_subchannel_create(exec_ctx, connector, args); grpc_connector_unref(exec_ctx, connector); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 35e1e1f716..4bfca32898 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -69,11 +69,11 @@ static void client_channel_factory_unref( } } -static void create_handshakers(grpc_exec_ctx *exec_ctx, - void *security_connector, - grpc_handshake_manager *handshake_mgr) { - grpc_channel_security_connector_create_handshakers( - exec_ctx, security_connector, handshake_mgr); +static void add_handshakers(grpc_exec_ctx *exec_ctx, + void *security_connector, + grpc_handshake_manager *handshake_mgr) { + grpc_channel_security_connector_add_handshakers(exec_ctx, security_connector, + handshake_mgr); } static grpc_subchannel *client_channel_factory_create_subchannel( @@ -81,7 +81,7 @@ static grpc_subchannel *client_channel_factory_create_subchannel( const grpc_subchannel_args *args) { client_channel_factory *f = (client_channel_factory *)cc_factory; grpc_connector *connector = grpc_chttp2_connector_create( - exec_ctx, args->server_name, create_handshakers, f->security_connector); + exec_ctx, args->server_name, add_handshakers, f->security_connector); grpc_subchannel *s = grpc_subchannel_create(exec_ctx, connector, args); grpc_connector_unref(exec_ctx, connector); return s; diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c index 8ee7e29316..5763ff5bb9 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.c +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -53,13 +53,13 @@ #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" -void grpc_chttp2_server_handshaker_factory_create_handshakers( +void grpc_chttp2_server_handshaker_factory_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_chttp2_server_handshaker_factory *handshaker_factory, grpc_handshake_manager *handshake_mgr) { if (handshaker_factory != NULL) { - handshaker_factory->vtable->create_handshakers(exec_ctx, handshaker_factory, - handshake_mgr); + handshaker_factory->vtable->add_handshakers(exec_ctx, handshaker_factory, + handshake_mgr); } } @@ -189,7 +189,7 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, connection_state->accepting_pollset = accepting_pollset; connection_state->acceptor = acceptor; connection_state->handshake_mgr = handshake_mgr; - grpc_chttp2_server_handshaker_factory_create_handshakers( + grpc_chttp2_server_handshaker_factory_add_handshakers( exec_ctx, state->handshaker_factory, connection_state->handshake_mgr); // TODO(roth): We should really get this timeout value from channel // args instead of hard-coding it. diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.h b/src/core/ext/transport/chttp2/server/chttp2_server.h index 3073399267..aa364b565d 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.h +++ b/src/core/ext/transport/chttp2/server/chttp2_server.h @@ -45,7 +45,7 @@ typedef struct grpc_chttp2_server_handshaker_factory grpc_chttp2_server_handshaker_factory; typedef struct { - void (*create_handshakers)( + void (*add_handshakers)( grpc_exec_ctx *exec_ctx, grpc_chttp2_server_handshaker_factory *handshaker_factory, grpc_handshake_manager *handshake_mgr); @@ -57,7 +57,7 @@ struct grpc_chttp2_server_handshaker_factory { const grpc_chttp2_server_handshaker_factory_vtable *vtable; }; -void grpc_chttp2_server_handshaker_factory_create_handshakers( +void grpc_chttp2_server_handshaker_factory_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_chttp2_server_handshaker_factory *handshaker_factory, grpc_handshake_manager *handshake_mgr); diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 85c21f0ca2..a33a7a3f7d 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -54,12 +54,12 @@ typedef struct { grpc_server_security_connector *security_connector; } server_security_handshaker_factory; -static void server_security_handshaker_factory_create_handshakers( +static void server_security_handshaker_factory_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_chttp2_server_handshaker_factory *hf, grpc_handshake_manager *handshake_mgr) { server_security_handshaker_factory *handshaker_factory = (server_security_handshaker_factory *)hf; - grpc_server_security_connector_create_handshakers( + grpc_server_security_connector_add_handshakers( exec_ctx, handshaker_factory->security_connector, handshake_mgr); } @@ -74,7 +74,7 @@ static void server_security_handshaker_factory_destroy( static const grpc_chttp2_server_handshaker_factory_vtable server_security_handshaker_factory_vtable = { - server_security_handshaker_factory_create_handshakers, + server_security_handshaker_factory_add_handshakers, server_security_handshaker_factory_destroy}; int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index 0ab34d00e4..b00b51c492 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -60,7 +60,7 @@ static void httpcli_ssl_destroy(grpc_security_connector *sc) { gpr_free(sc); } -static void httpcli_ssl_create_handshakers( +static void httpcli_ssl_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_handshake_manager *handshake_mgr) { grpc_httpcli_ssl_channel_security_connector *c = @@ -74,8 +74,7 @@ static void httpcli_ssl_create_handshakers( tsi_result_to_string(result)); } } - grpc_security_create_handshakers(exec_ctx, handshaker, &sc->base, - handshake_mgr); + grpc_security_add_handshakers(exec_ctx, handshaker, &sc->base, handshake_mgr); } static void httpcli_ssl_check_peer(grpc_exec_ctx *exec_ctx, @@ -132,7 +131,7 @@ static grpc_security_status httpcli_ssl_channel_security_connector_create( *sc = NULL; return GRPC_SECURITY_ERROR; } - c->base.create_handshakers = httpcli_ssl_create_handshakers; + c->base.add_handshakers = httpcli_ssl_add_handshakers; *sc = &c->base; return GRPC_SECURITY_OK; } @@ -185,8 +184,8 @@ static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(httpcli_ssl_channel_security_connector_create( pem_root_certs, pem_root_certs_size, host, &sc) == GRPC_SECURITY_OK); - grpc_channel_security_connector_create_handshakers(exec_ctx, sc, - c->handshake_mgr); + grpc_channel_security_connector_add_handshakers(exec_ctx, sc, + c->handshake_mgr); grpc_handshake_manager_do_handshake( exec_ctx, c->handshake_mgr, tcp, NULL /* channel_args */, deadline, NULL /* acceptor */, on_handshake_done, c /* user_data */); diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index a2e0c7c7c7..fff0c4e2d2 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -111,19 +111,19 @@ const tsi_peer_property *tsi_peer_get_property_by_name(const tsi_peer *peer, return NULL; } -void grpc_channel_security_connector_create_handshakers( +void grpc_channel_security_connector_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *connector, grpc_handshake_manager *handshake_mgr) { if (connector != NULL) { - connector->create_handshakers(exec_ctx, connector, handshake_mgr); + connector->add_handshakers(exec_ctx, connector, handshake_mgr); } } -void grpc_server_security_connector_create_handshakers( +void grpc_server_security_connector_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *connector, grpc_handshake_manager *handshake_mgr) { if (connector != NULL) { - connector->create_handshakers(exec_ctx, connector, handshake_mgr); + connector->add_handshakers(exec_ctx, connector, handshake_mgr); } } @@ -285,18 +285,18 @@ static void fake_channel_check_call_host(grpc_exec_ctx *exec_ctx, cb(exec_ctx, user_data, GRPC_SECURITY_OK); } -static void fake_channel_create_handshakers( +static void fake_channel_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_handshake_manager *handshake_mgr) { - grpc_security_create_handshakers( + grpc_security_add_handshakers( exec_ctx, tsi_create_fake_handshaker(true /* is_client */), &sc->base, handshake_mgr); } -static void fake_server_create_handshakers( +static void fake_server_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_handshake_manager *handshake_mgr) { - grpc_security_create_handshakers( + grpc_security_add_handshakers( exec_ctx, tsi_create_fake_handshaker(false /* is_client */), &sc->base, handshake_mgr); } @@ -316,7 +316,7 @@ grpc_channel_security_connector *grpc_fake_channel_security_connector_create( c->base.vtable = &fake_channel_vtable; c->request_metadata_creds = grpc_call_credentials_ref(request_metadata_creds); c->check_call_host = fake_channel_check_call_host; - c->create_handshakers = fake_channel_create_handshakers; + c->add_handshakers = fake_channel_add_handshakers; return c; } @@ -328,7 +328,7 @@ grpc_server_security_connector *grpc_fake_server_security_connector_create( gpr_ref_init(&c->base.refcount, 1); c->base.vtable = &fake_server_vtable; c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME; - c->create_handshakers = fake_server_create_handshakers; + c->add_handshakers = fake_server_add_handshakers; return c; } @@ -382,7 +382,7 @@ static grpc_security_status ssl_create_handshaker( return GRPC_SECURITY_OK; } -static void ssl_channel_create_handshakers( +static void ssl_channel_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_handshake_manager *handshake_mgr) { grpc_ssl_channel_security_connector *c = @@ -395,10 +395,10 @@ static void ssl_channel_create_handshakers( : c->target_name, &tsi_hs); // Create handshakers. - grpc_security_create_handshakers(exec_ctx, tsi_hs, &sc->base, handshake_mgr); + grpc_security_add_handshakers(exec_ctx, tsi_hs, &sc->base, handshake_mgr); } -static void ssl_server_create_handshakers( +static void ssl_server_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_handshake_manager *handshake_mgr) { grpc_ssl_server_security_connector *c = @@ -408,7 +408,7 @@ static void ssl_server_create_handshakers( ssl_create_handshaker(c->handshaker_factory, false /* is_client */, NULL /* peer_name */, &tsi_hs); // Create handshakers. - grpc_security_create_handshakers(exec_ctx, tsi_hs, &sc->base, handshake_mgr); + grpc_security_add_handshakers(exec_ctx, tsi_hs, &sc->base, handshake_mgr); } static int ssl_host_matches_name(const tsi_peer *peer, const char *peer_name) { @@ -708,7 +708,7 @@ grpc_security_status grpc_ssl_channel_security_connector_create( c->base.request_metadata_creds = grpc_call_credentials_ref(request_metadata_creds); c->base.check_call_host = ssl_channel_check_call_host; - c->base.create_handshakers = ssl_channel_create_handshakers; + c->base.add_handshakers = ssl_channel_add_handshakers; gpr_split_host_port(target_name, &c->target_name, &port); gpr_free(port); if (overridden_target_name != NULL) { @@ -783,7 +783,7 @@ grpc_security_status grpc_ssl_server_security_connector_create( *sc = NULL; goto error; } - c->base.create_handshakers = ssl_server_create_handshakers; + c->base.add_handshakers = ssl_server_add_handshakers; *sc = &c->base; gpr_free((void *)alpn_protocol_strings); gpr_free(alpn_protocol_string_lengths); diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h index 696db0e02e..3ff887bf50 100644 --- a/src/core/lib/security/transport/security_connector.h +++ b/src/core/lib/security/transport/security_connector.h @@ -133,9 +133,9 @@ struct grpc_channel_security_connector { grpc_channel_security_connector *sc, const char *host, grpc_auth_context *auth_context, grpc_security_call_host_check_cb cb, void *user_data); - void (*create_handshakers)(grpc_exec_ctx *exec_ctx, - grpc_channel_security_connector *sc, - grpc_handshake_manager *handshake_mgr); + void (*add_handshakers)(grpc_exec_ctx *exec_ctx, + grpc_channel_security_connector *sc, + grpc_handshake_manager *handshake_mgr); }; /* Checks that the host that will be set for a call is acceptable. */ @@ -145,7 +145,7 @@ void grpc_channel_security_connector_check_call_host( grpc_security_call_host_check_cb cb, void *user_data); /* Registers handshakers with \a handshake_mgr. */ -void grpc_channel_security_connector_create_handshakers( +void grpc_channel_security_connector_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *connector, grpc_handshake_manager *handshake_mgr); @@ -158,12 +158,12 @@ typedef struct grpc_server_security_connector grpc_server_security_connector; struct grpc_server_security_connector { grpc_security_connector base; - void (*create_handshakers)(grpc_exec_ctx *exec_ctx, - grpc_server_security_connector *sc, - grpc_handshake_manager *handshake_mgr); + void (*add_handshakers)(grpc_exec_ctx *exec_ctx, + grpc_server_security_connector *sc, + grpc_handshake_manager *handshake_mgr); }; -void grpc_server_security_connector_create_handshakers( +void grpc_server_security_connector_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_handshake_manager *handshake_mgr); diff --git a/src/core/lib/security/transport/security_handshaker.c b/src/core/lib/security/transport/security_handshaker.c index fc01bec2f2..c50d5b873c 100644 --- a/src/core/lib/security/transport/security_handshaker.c +++ b/src/core/lib/security/transport/security_handshaker.c @@ -434,10 +434,10 @@ static grpc_handshaker *fail_handshaker_create() { // exported functions // -void grpc_security_create_handshakers(grpc_exec_ctx *exec_ctx, - tsi_handshaker *handshaker, - grpc_security_connector *connector, - grpc_handshake_manager *handshake_mgr) { +void grpc_security_add_handshakers(grpc_exec_ctx *exec_ctx, + tsi_handshaker *handshaker, + grpc_security_connector *connector, + grpc_handshake_manager *handshake_mgr) { // If no TSI handshaker was created, add a handshaker that always fails. // Otherwise, add a real security handshaker. if (handshaker == NULL) { diff --git a/src/core/lib/security/transport/security_handshaker.h b/src/core/lib/security/transport/security_handshaker.h index f71f43a359..745cf942b3 100644 --- a/src/core/lib/security/transport/security_handshaker.h +++ b/src/core/lib/security/transport/security_handshaker.h @@ -39,9 +39,9 @@ /// Creates any necessary security handshakers and adds them to /// \a handshake_mgr. -void grpc_security_create_handshakers(grpc_exec_ctx *exec_ctx, - tsi_handshaker *handshaker, - grpc_security_connector *connector, - grpc_handshake_manager *handshake_mgr); +void grpc_security_add_handshakers(grpc_exec_ctx *exec_ctx, + tsi_handshaker *handshaker, + grpc_security_connector *connector, + grpc_handshake_manager *handshake_mgr); #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H */ -- cgit v1.2.3 From 71daef7e32834710eb5db91c6f0e003deae8b64b Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 6 Dec 2016 07:26:52 -0800 Subject: Clarify comment. --- src/core/lib/security/transport/security_connector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h index 3ff887bf50..a84b359051 100644 --- a/src/core/lib/security/transport/security_connector.h +++ b/src/core/lib/security/transport/security_connector.h @@ -98,7 +98,7 @@ void grpc_security_connector_unref(grpc_security_connector *policy); #endif /* Check the peer. Callee takes ownership of the peer object. - Sets *auth_context and invokes on_peer_checked when done. */ + When done, sets *auth_context and invokes on_peer_checked. */ void grpc_security_connector_check_peer(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer, -- cgit v1.2.3 From d9ef2830d0aa0ca447019ed505e154bb6f5d3745 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 6 Dec 2016 07:37:27 -0800 Subject: clang-format --- .../chttp2/client/secure/secure_channel_create.c | 3 +-- src/core/lib/http/httpcli_security_connector.c | 6 +++--- src/core/lib/security/transport/security_connector.c | 18 +++++++++--------- 3 files changed, 13 insertions(+), 14 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 4bfca32898..4bce3ba25f 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -69,8 +69,7 @@ static void client_channel_factory_unref( } } -static void add_handshakers(grpc_exec_ctx *exec_ctx, - void *security_connector, +static void add_handshakers(grpc_exec_ctx *exec_ctx, void *security_connector, grpc_handshake_manager *handshake_mgr) { grpc_channel_security_connector_add_handshakers(exec_ctx, security_connector, handshake_mgr); diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index b00b51c492..7afbdeeb3f 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -60,9 +60,9 @@ static void httpcli_ssl_destroy(grpc_security_connector *sc) { gpr_free(sc); } -static void httpcli_ssl_add_handshakers( - grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, - grpc_handshake_manager *handshake_mgr) { +static void httpcli_ssl_add_handshakers(grpc_exec_ctx *exec_ctx, + grpc_channel_security_connector *sc, + grpc_handshake_manager *handshake_mgr) { grpc_httpcli_ssl_channel_security_connector *c = (grpc_httpcli_ssl_channel_security_connector *)sc; tsi_handshaker *handshaker = NULL; diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index fff0c4e2d2..33a973aa59 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -293,9 +293,9 @@ static void fake_channel_add_handshakers( handshake_mgr); } -static void fake_server_add_handshakers( - grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, - grpc_handshake_manager *handshake_mgr) { +static void fake_server_add_handshakers(grpc_exec_ctx *exec_ctx, + grpc_server_security_connector *sc, + grpc_handshake_manager *handshake_mgr) { grpc_security_add_handshakers( exec_ctx, tsi_create_fake_handshaker(false /* is_client */), &sc->base, handshake_mgr); @@ -382,9 +382,9 @@ static grpc_security_status ssl_create_handshaker( return GRPC_SECURITY_OK; } -static void ssl_channel_add_handshakers( - grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, - grpc_handshake_manager *handshake_mgr) { +static void ssl_channel_add_handshakers(grpc_exec_ctx *exec_ctx, + grpc_channel_security_connector *sc, + grpc_handshake_manager *handshake_mgr) { grpc_ssl_channel_security_connector *c = (grpc_ssl_channel_security_connector *)sc; // Instantiate TSI handshaker. @@ -398,9 +398,9 @@ static void ssl_channel_add_handshakers( grpc_security_add_handshakers(exec_ctx, tsi_hs, &sc->base, handshake_mgr); } -static void ssl_server_add_handshakers( - grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, - grpc_handshake_manager *handshake_mgr) { +static void ssl_server_add_handshakers(grpc_exec_ctx *exec_ctx, + grpc_server_security_connector *sc, + grpc_handshake_manager *handshake_mgr) { grpc_ssl_server_security_connector *c = (grpc_ssl_server_security_connector *)sc; // Instantiate TSI handshaker. -- cgit v1.2.3 From cc527cf0e4b36ef7d42992ad43ae10f2d2108929 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 6 Dec 2016 10:43:12 -0800 Subject: Provide a way to exit handshaking early without an error. --- .../ext/transport/chttp2/server/chttp2_server.c | 21 +++++++++++++++------ src/core/lib/channel/handshaker.c | 9 +++++---- src/core/lib/channel/handshaker.h | 3 +++ 3 files changed, 23 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c index 8ee7e29316..9602fa6ab8 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.c +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -153,12 +153,21 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, gpr_free(args->read_buffer); } } else { - grpc_transport *transport = - grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 0); - grpc_server_setup_transport( - exec_ctx, connection_state->server_state->server, transport, - connection_state->accepting_pollset, args->args); - grpc_chttp2_transport_start_reading(exec_ctx, transport, args->read_buffer); + if (args->endpoint != NULL) { + grpc_transport *transport = + grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 0); + grpc_server_setup_transport( + exec_ctx, connection_state->server_state->server, transport, + connection_state->accepting_pollset, args->args); + grpc_chttp2_transport_start_reading(exec_ctx, transport, + args->read_buffer); + } else { + // If the handshaking succeeded but there is no endpoint, then the + // handshaker may have handed off the connection to some external + // code, so we can just clean up here without creating a transport. + grpc_slice_buffer_destroy(args->read_buffer); + gpr_free(args->read_buffer); + } grpc_channel_args_destroy(args->args); } pending_handshake_manager_remove_locked(connection_state->server_state, diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 90626dc2d1..755e42cfca 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -157,10 +157,11 @@ static bool call_next_handshaker_locked(grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr, grpc_error* error) { GPR_ASSERT(mgr->index <= mgr->count); - // If we got an error or we've been shut down or we've finished the last - // handshaker, invoke the on_handshake_done callback. Otherwise, call the - // next handshaker. - if (error != GRPC_ERROR_NONE || mgr->shutdown || mgr->index == mgr->count) { + // If we got an error or we've been shut down or we're exiting early or + // we've finished the last handshaker, invoke the on_handshake_done + // callback. Otherwise, call the next handshaker. + if (error != GRPC_ERROR_NONE || mgr->shutdown || mgr->args.exit_early || + mgr->index == mgr->count) { // Cancel deadline timer, since we're invoking the on_handshake_done // callback now. grpc_timer_cancel(exec_ctx, &mgr->deadline_timer); diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index ebbc1ff7f3..5bec20eb74 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -72,6 +72,9 @@ typedef struct { grpc_endpoint* endpoint; grpc_channel_args* args; grpc_slice_buffer* read_buffer; + // A handshaker may set this to true before invoking on_handshake_done + // to indicate that subsequent handshakers should be skipped. + bool exit_early; // User data passed through the handshake manager. Not used by // individual handshakers. void* user_data; -- cgit v1.2.3 From 170a073b26b79200bbbaac2613965434a76df434 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 6 Dec 2016 14:01:22 -0800 Subject: clang-format --- include/grpc/impl/codegen/slice.h | 1 - src/core/ext/transport/chttp2/server/chttp2_server.c | 16 +++++++--------- src/core/ext/transport/chttp2/server/chttp2_server.h | 3 +-- .../ext/transport/chttp2/server/insecure/server_chttp2.c | 2 +- .../chttp2/server/secure/server_secure_chttp2.c | 6 +++--- 5 files changed, 12 insertions(+), 16 deletions(-) (limited to 'src/core') diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index 06fed046a9..50b5426e1a 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -117,7 +117,6 @@ typedef struct { GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice) #define GRPC_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0) - #ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS /* Duplicate GPR_* definitions */ diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c index 7795606e73..8ee7e29316 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.c +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -58,8 +58,8 @@ void grpc_chttp2_server_handshaker_factory_create_handshakers( grpc_chttp2_server_handshaker_factory *handshaker_factory, grpc_handshake_manager *handshake_mgr) { if (handshaker_factory != NULL) { - handshaker_factory->vtable->create_handshakers( - exec_ctx, handshaker_factory, handshake_mgr); + handshaker_factory->vtable->create_handshakers(exec_ctx, handshaker_factory, + handshake_mgr); } } @@ -71,7 +71,6 @@ void grpc_chttp2_server_handshaker_factory_destroy( } } - typedef struct pending_handshake_manager_node { grpc_handshake_manager *handshake_mgr; struct pending_handshake_manager_node *next; @@ -196,9 +195,9 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, // args instead of hard-coding it. const gpr_timespec deadline = gpr_time_add( gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); - grpc_handshake_manager_do_handshake( - exec_ctx, connection_state->handshake_mgr, tcp, state->args, deadline, - acceptor, on_handshake_done, connection_state); + grpc_handshake_manager_do_handshake(exec_ctx, connection_state->handshake_mgr, + tcp, state->args, deadline, acceptor, + on_handshake_done, connection_state); } /* Server callback: start listening on our ports */ @@ -275,9 +274,8 @@ grpc_error *grpc_chttp2_server_add_port( memset(state, 0, sizeof(*state)); grpc_closure_init(&state->tcp_server_shutdown_complete, tcp_server_shutdown_complete, state); - err = - grpc_tcp_server_create(exec_ctx, &state->tcp_server_shutdown_complete, - args, &tcp_server); + err = grpc_tcp_server_create(exec_ctx, &state->tcp_server_shutdown_complete, + args, &tcp_server); if (err != GRPC_ERROR_NONE) { goto error; } diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.h b/src/core/ext/transport/chttp2/server/chttp2_server.h index b1ff04bcbb..3073399267 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.h +++ b/src/core/ext/transport/chttp2/server/chttp2_server.h @@ -73,7 +73,6 @@ void grpc_chttp2_server_handshaker_factory_destroy( grpc_error *grpc_chttp2_server_add_port( grpc_exec_ctx *exec_ctx, grpc_server *server, const char *addr, grpc_channel_args *args, - grpc_chttp2_server_handshaker_factory *handshaker_factory, - int *port_num); + grpc_chttp2_server_handshaker_factory *handshaker_factory, int *port_num); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H */ diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index 366312bd72..7e286d4e46 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -45,7 +45,7 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { int port_num = 0; GRPC_API_TRACE("grpc_server_add_insecure_http2_port(server=%p, addr=%s)", 2, (server, addr)); - grpc_error* err = grpc_chttp2_server_add_port( + grpc_error *err = grpc_chttp2_server_add_port( &exec_ctx, server, addr, grpc_channel_args_copy(grpc_server_get_channel_args(server)), NULL /* handshaker_factory */, &port_num); diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 5f41728132..85c21f0ca2 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -64,7 +64,7 @@ static void server_security_handshaker_factory_create_handshakers( } static void server_security_handshaker_factory_destroy( - grpc_exec_ctx* exec_ctx, grpc_chttp2_server_handshaker_factory *hf) { + grpc_exec_ctx *exec_ctx, grpc_chttp2_server_handshaker_factory *hf) { server_security_handshaker_factory *handshaker_factory = (server_security_handshaker_factory *)hf; GRPC_SECURITY_CONNECTOR_UNREF(&handshaker_factory->security_connector->base, @@ -106,8 +106,8 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, goto done; } // Create handshaker factory. - server_security_handshaker_factory* handshaker_factory = - gpr_malloc(sizeof(*handshaker_factory)); + server_security_handshaker_factory *handshaker_factory = + gpr_malloc(sizeof(*handshaker_factory)); memset(handshaker_factory, 0, sizeof(*handshaker_factory)); handshaker_factory->base.vtable = &server_security_handshaker_factory_vtable; handshaker_factory->security_connector = sc; -- cgit v1.2.3 From 3059828bf6129d6ecb6ce705347fc43e0affa209 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 7 Dec 2016 07:13:58 -0800 Subject: Make handshakers that exit early responsible for cleaning up all args. --- src/core/ext/transport/chttp2/server/chttp2_server.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c index 9602fa6ab8..4a2ec52cea 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.c +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -153,6 +153,9 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, gpr_free(args->read_buffer); } } else { + // If the handshaking succeeded but there is no endpoint, then the + // handshaker may have handed off the connection to some external + // code, so we can just clean up here without creating a transport. if (args->endpoint != NULL) { grpc_transport *transport = grpc_create_chttp2_transport(exec_ctx, args->args, args->endpoint, 0); @@ -161,14 +164,8 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, connection_state->accepting_pollset, args->args); grpc_chttp2_transport_start_reading(exec_ctx, transport, args->read_buffer); - } else { - // If the handshaking succeeded but there is no endpoint, then the - // handshaker may have handed off the connection to some external - // code, so we can just clean up here without creating a transport. - grpc_slice_buffer_destroy(args->read_buffer); - gpr_free(args->read_buffer); + grpc_channel_args_destroy(args->args); } - grpc_channel_args_destroy(args->args); } pending_handshake_manager_remove_locked(connection_state->server_state, connection_state->handshake_mgr); -- cgit v1.2.3 From d0953408971fcc8260de83f2afce9980081f0af5 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 7 Dec 2016 07:56:48 -0800 Subject: Allow creating security handshaker without adding it to handshake manager. --- src/core/lib/http/httpcli_security_connector.c | 4 ++- .../lib/security/transport/security_connector.c | 31 ++++++++++++++-------- .../lib/security/transport/security_handshaker.c | 17 +++++------- .../lib/security/transport/security_handshaker.h | 13 +++++---- 4 files changed, 36 insertions(+), 29 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index 7afbdeeb3f..14cdb1dab3 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -74,7 +74,9 @@ static void httpcli_ssl_add_handshakers(grpc_exec_ctx *exec_ctx, tsi_result_to_string(result)); } } - grpc_security_add_handshakers(exec_ctx, handshaker, &sc->base, handshake_mgr); + grpc_handshake_manager_add( + handshake_mgr, + grpc_security_handshaker_create(exec_ctx, handshaker, &sc->base)); } static void httpcli_ssl_check_peer(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 33a973aa59..6431adbd61 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -43,6 +43,7 @@ #include #include "src/core/ext/transport/chttp2/alpn/alpn.h" +#include "src/core/lib/channel/handshaker.h" #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/credentials/credentials.h" @@ -288,17 +289,21 @@ static void fake_channel_check_call_host(grpc_exec_ctx *exec_ctx, static void fake_channel_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_handshake_manager *handshake_mgr) { - grpc_security_add_handshakers( - exec_ctx, tsi_create_fake_handshaker(true /* is_client */), &sc->base, - handshake_mgr); + grpc_handshake_manager_add( + handshake_mgr, + grpc_security_handshaker_create( + exec_ctx, tsi_create_fake_handshaker(true /* is_client */), + &sc->base)); } -static void fake_server_add_handshakers(grpc_exec_ctx *exec_ctx, - grpc_server_security_connector *sc, - grpc_handshake_manager *handshake_mgr) { - grpc_security_add_handshakers( - exec_ctx, tsi_create_fake_handshaker(false /* is_client */), &sc->base, - handshake_mgr); +static void fake_server_create_handshakers( + grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, + grpc_handshake_manager *handshake_mgr) { + grpc_handshake_manager_add( + handshake_mgr, + grpc_security_handshaker_create( + exec_ctx, tsi_create_fake_handshaker(false /* is_client */), + &sc->base)); } static grpc_security_connector_vtable fake_channel_vtable = { @@ -395,7 +400,9 @@ static void ssl_channel_add_handshakers(grpc_exec_ctx *exec_ctx, : c->target_name, &tsi_hs); // Create handshakers. - grpc_security_add_handshakers(exec_ctx, tsi_hs, &sc->base, handshake_mgr); + grpc_handshake_manager_add( + handshake_mgr, + grpc_security_handshaker_create(exec_ctx, tsi_hs, &sc->base)); } static void ssl_server_add_handshakers(grpc_exec_ctx *exec_ctx, @@ -408,7 +415,9 @@ static void ssl_server_add_handshakers(grpc_exec_ctx *exec_ctx, ssl_create_handshaker(c->handshaker_factory, false /* is_client */, NULL /* peer_name */, &tsi_hs); // Create handshakers. - grpc_security_add_handshakers(exec_ctx, tsi_hs, &sc->base, handshake_mgr); + grpc_handshake_manager_add( + handshake_mgr, + grpc_security_handshaker_create(exec_ctx, tsi_hs, &sc->base)); } static int ssl_host_matches_name(const tsi_peer *peer, const char *peer_name) { diff --git a/src/core/lib/security/transport/security_handshaker.c b/src/core/lib/security/transport/security_handshaker.c index c50d5b873c..628c747bf6 100644 --- a/src/core/lib/security/transport/security_handshaker.c +++ b/src/core/lib/security/transport/security_handshaker.c @@ -434,17 +434,14 @@ static grpc_handshaker *fail_handshaker_create() { // exported functions // -void grpc_security_add_handshakers(grpc_exec_ctx *exec_ctx, - tsi_handshaker *handshaker, - grpc_security_connector *connector, - grpc_handshake_manager *handshake_mgr) { - // If no TSI handshaker was created, add a handshaker that always fails. - // Otherwise, add a real security handshaker. +grpc_handshaker *grpc_security_handshaker_create( + grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, + grpc_security_connector *connector) { + // If no TSI handshaker was created, return a handshaker that always fails. + // Otherwise, return a real security handshaker. if (handshaker == NULL) { - grpc_handshake_manager_add(handshake_mgr, fail_handshaker_create()); + return fail_handshaker_create(); } else { - grpc_handshake_manager_add( - handshake_mgr, - security_handshaker_create(exec_ctx, handshaker, connector)); + return security_handshaker_create(exec_ctx, handshaker, connector); } } diff --git a/src/core/lib/security/transport/security_handshaker.h b/src/core/lib/security/transport/security_handshaker.h index 745cf942b3..5ddbf4b451 100644 --- a/src/core/lib/security/transport/security_handshaker.h +++ b/src/core/lib/security/transport/security_handshaker.h @@ -34,14 +34,13 @@ #ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H #define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H -#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/channel/handshaker.h" +#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/security/transport/security_connector.h" -/// Creates any necessary security handshakers and adds them to -/// \a handshake_mgr. -void grpc_security_add_handshakers(grpc_exec_ctx *exec_ctx, - tsi_handshaker *handshaker, - grpc_security_connector *connector, - grpc_handshake_manager *handshake_mgr); +/// Creates a security handshaker using \a handshaker. +grpc_handshaker *grpc_security_handshaker_create( + grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, + grpc_security_connector *connector); #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H */ -- cgit v1.2.3 From cc8487eebe81216c0ca741344904a5dd619abf74 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 7 Dec 2016 08:17:06 -0800 Subject: clang-format --- src/core/lib/security/transport/security_connector.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 6431adbd61..95d6563ac1 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -400,9 +400,8 @@ static void ssl_channel_add_handshakers(grpc_exec_ctx *exec_ctx, : c->target_name, &tsi_hs); // Create handshakers. - grpc_handshake_manager_add( - handshake_mgr, - grpc_security_handshaker_create(exec_ctx, tsi_hs, &sc->base)); + grpc_handshake_manager_add(handshake_mgr, grpc_security_handshaker_create( + exec_ctx, tsi_hs, &sc->base)); } static void ssl_server_add_handshakers(grpc_exec_ctx *exec_ctx, @@ -415,9 +414,8 @@ static void ssl_server_add_handshakers(grpc_exec_ctx *exec_ctx, ssl_create_handshaker(c->handshaker_factory, false /* is_client */, NULL /* peer_name */, &tsi_hs); // Create handshakers. - grpc_handshake_manager_add( - handshake_mgr, - grpc_security_handshaker_create(exec_ctx, tsi_hs, &sc->base)); + grpc_handshake_manager_add(handshake_mgr, grpc_security_handshaker_create( + exec_ctx, tsi_hs, &sc->base)); } static int ssl_host_matches_name(const tsi_peer *peer, const char *peer_name) { -- cgit v1.2.3 From 887e218cccdefa1268da536755879d090fbcfe81 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 7 Dec 2016 08:19:34 -0800 Subject: Make grpc_handshaker vtable wrapper functions public. --- src/core/lib/channel/handshaker.c | 18 +++++++++--------- src/core/lib/channel/handshaker.h | 10 ++++++++++ 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 90626dc2d1..6f5c6bb97a 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -49,21 +49,21 @@ void grpc_handshaker_init(const grpc_handshaker_vtable* vtable, handshaker->vtable = vtable; } -static void grpc_handshaker_destroy(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { +void grpc_handshaker_destroy(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) { handshaker->vtable->destroy(exec_ctx, handshaker); } -static void grpc_handshaker_shutdown(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker) { +void grpc_handshaker_shutdown(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker) { handshaker->vtable->shutdown(exec_ctx, handshaker); } -static void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, - grpc_handshaker* handshaker, - grpc_tcp_server_acceptor* acceptor, - grpc_closure* on_handshake_done, - grpc_handshaker_args* args) { +void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker, + grpc_tcp_server_acceptor* acceptor, + grpc_closure* on_handshake_done, + grpc_handshaker_args* args) { handshaker->vtable->do_handshake(exec_ctx, handshaker, acceptor, on_handshake_done, args); } diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index ebbc1ff7f3..0dd34b9d08 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -105,6 +105,16 @@ struct grpc_handshaker { void grpc_handshaker_init(const grpc_handshaker_vtable* vtable, grpc_handshaker* handshaker); +void grpc_handshaker_destroy(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker); +void grpc_handshaker_shutdown(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker); +void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, + grpc_handshaker* handshaker, + grpc_tcp_server_acceptor* acceptor, + grpc_closure* on_handshake_done, + grpc_handshaker_args* args); + /// /// grpc_handshake_manager /// -- cgit v1.2.3 From 7d74b666bb54674b85369f292debae29fc5d01a4 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 7 Dec 2016 09:14:42 -0800 Subject: Redo change accidentally reverted in previous commit. --- src/core/lib/security/transport/security_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 95d6563ac1..7f3daf5963 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -296,7 +296,7 @@ static void fake_channel_add_handshakers( &sc->base)); } -static void fake_server_create_handshakers( +static void fake_server_add_handshakers( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_handshake_manager *handshake_mgr) { grpc_handshake_manager_add( -- cgit v1.2.3 From 58d68f0d49fb2eaf03f19f6775f4f19a611899bc Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 7 Dec 2016 11:20:57 -0800 Subject: Turn off Cronet logging --- src/core/ext/transport/cronet/transport/cronet_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index c3abb47735..afc59f4b12 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -59,7 +59,7 @@ } while (0) /* TODO (makdharma): Hook up into the wider tracing mechanism */ -int grpc_cronet_trace = 1; +int grpc_cronet_trace = 0; enum e_op_result { ACTION_TAKEN_WITH_CALLBACK, -- cgit v1.2.3 From 3da4188176eb76a1a786249ac840b0a83242e397 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 6 Dec 2016 15:40:19 -0800 Subject: Fix handling of streams waiting for concurrency --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 1 + src/core/ext/transport/chttp2/transport/internal.h | 2 ++ src/core/ext/transport/chttp2/transport/stream_lists.c | 5 +++++ 3 files changed, 8 insertions(+) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 3b84898fee..72711d69dc 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1623,6 +1623,7 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx, remove_stream(exec_ctx, t, s->id, removal_error(GRPC_ERROR_REF(error), s, "Stream removed")); } + grpc_chttp2_list_remove_waiting_for_concurrency(t, s); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2"); } GRPC_ERROR_UNREF(error); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 31eb1e01ac..b727965d43 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -496,6 +496,8 @@ void grpc_chttp2_list_add_waiting_for_concurrency(grpc_chttp2_transport *t, grpc_chttp2_stream *s); int grpc_chttp2_list_pop_waiting_for_concurrency(grpc_chttp2_transport *t, grpc_chttp2_stream **s); +void grpc_chttp2_list_remove_waiting_for_concurrency(grpc_chttp2_transport *t, + grpc_chttp2_stream *s); void grpc_chttp2_list_add_stalled_by_transport(grpc_chttp2_transport *t, grpc_chttp2_stream *s); diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.c b/src/core/ext/transport/chttp2/transport/stream_lists.c index 6d25b3ae57..a60264cc51 100644 --- a/src/core/ext/transport/chttp2/transport/stream_lists.c +++ b/src/core/ext/transport/chttp2/transport/stream_lists.c @@ -158,6 +158,11 @@ int grpc_chttp2_list_pop_waiting_for_concurrency(grpc_chttp2_transport *t, return stream_list_pop(t, s, GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY); } +void grpc_chttp2_list_remove_waiting_for_concurrency(grpc_chttp2_transport *t, + grpc_chttp2_stream *s) { + stream_list_maybe_remove(t, s, GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY); +} + void grpc_chttp2_list_add_stalled_by_transport(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { stream_list_add(t, s, GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT); -- cgit v1.2.3 From ec7ba3931741f349b59f531d35677891a0a24baf Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 7 Dec 2016 10:50:30 -0800 Subject: PR comments --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 72711d69dc..6bc054866b 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1622,8 +1622,10 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx, if (s->id != 0) { remove_stream(exec_ctx, t, s->id, removal_error(GRPC_ERROR_REF(error), s, "Stream removed")); + } else { + /* Purge streams waiting on concurrency still waiting for id assignment */ + grpc_chttp2_list_remove_waiting_for_concurrency(t, s); } - grpc_chttp2_list_remove_waiting_for_concurrency(t, s); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2"); } GRPC_ERROR_UNREF(error); -- cgit v1.2.3 From c898417302f4f28013e7cc21bb4476d150c962cf Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 8 Dec 2016 09:40:33 -0800 Subject: Fix race condition on shutdown. --- src/core/lib/security/transport/security_handshaker.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/security/transport/security_handshaker.c b/src/core/lib/security/transport/security_handshaker.c index 628c747bf6..41a775db85 100644 --- a/src/core/lib/security/transport/security_handshaker.c +++ b/src/core/lib/security/transport/security_handshaker.c @@ -131,6 +131,9 @@ static void security_handshake_failed_locked(grpc_exec_ctx *exec_ctx, // Not shutting down, so the write failed. Clean up before // invoking the callback. cleanup_args_for_failure_locked(h); + // Set shutdown to true so that subsequent calls to + // security_handshaker_shutdown() do nothing. + h->shutdown = true; } // Invoke callback. grpc_exec_ctx_sched(exec_ctx, h->on_handshake_done, error, NULL); -- cgit v1.2.3 From 5b850b2194d668292959131635bda17c4f497a06 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 8 Dec 2016 09:40:58 -0800 Subject: clang-format --- src/core/lib/security/transport/security_connector.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 7f3daf5963..5b088aa58d 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -296,9 +296,9 @@ static void fake_channel_add_handshakers( &sc->base)); } -static void fake_server_add_handshakers( - grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, - grpc_handshake_manager *handshake_mgr) { +static void fake_server_add_handshakers(grpc_exec_ctx *exec_ctx, + grpc_server_security_connector *sc, + grpc_handshake_manager *handshake_mgr) { grpc_handshake_manager_add( handshake_mgr, grpc_security_handshaker_create( -- cgit v1.2.3 From e6f516ecc9ad4049b68d3c1d86129f76ca270824 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 8 Dec 2016 12:20:23 -0800 Subject: Remove PO_DEBUG from build.yaml and move it to ev_epoll_linux.c --- Makefile | 2 +- build.yaml | 2 +- src/core/lib/iomgr/ev_epoll_linux.c | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/Makefile b/Makefile index 9f869fe81d..fb088d1d1e 100644 --- a/Makefile +++ b/Makefile @@ -111,7 +111,7 @@ CXX_dbg = $(DEFAULT_CXX) LD_dbg = $(DEFAULT_CC) LDXX_dbg = $(DEFAULT_CXX) CPPFLAGS_dbg = -O0 -DEFINES_dbg = _DEBUG DEBUG PO_DEBUG +DEFINES_dbg = _DEBUG DEBUG VALID_CONFIG_easan = 1 REQUIRE_CUSTOM_LIBRARIES_easan = 1 diff --git a/build.yaml b/build.yaml index 13fecc55f8..a6b8b41eb9 100644 --- a/build.yaml +++ b/build.yaml @@ -3699,7 +3699,7 @@ configs: DEFINES: NDEBUG dbg: CPPFLAGS: -O0 - DEFINES: _DEBUG DEBUG PO_DEBUG + DEFINES: _DEBUG DEBUG easan: CC: clang CPPFLAGS: -O0 -fsanitize-coverage=edge -fsanitize=address -fno-omit-frame-pointer diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 5d54ebc026..1b15e0eb4f 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -69,6 +69,9 @@ static int grpc_polling_trace = 0; /* Disabled by default */ gpr_log(GPR_INFO, (fmt), __VA_ARGS__); \ } +/* Uncomment the following enable extra checks on poll_object operations */ +/* #define PO_DEBUG */ + static int grpc_wakeup_signal = -1; static bool is_grpc_wakeup_signal_initialized = false; -- cgit v1.2.3 From eed3815e9e51995a74d09ad642fdd7aaab1a33be Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 8 Dec 2016 13:59:13 -0800 Subject: Pass ownership of grpc_tcp_server_acceptor to connector. --- src/core/ext/transport/chttp2/server/chttp2_server.c | 1 + src/core/lib/iomgr/tcp_server.h | 3 ++- src/core/lib/iomgr/tcp_server_posix.c | 16 +++++++++------- src/core/lib/iomgr/tcp_server_uv.c | 10 ++++++++-- src/core/lib/iomgr/tcp_server_windows.c | 9 +++++++-- 5 files changed, 27 insertions(+), 12 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c index 5763ff5bb9..844330c0d8 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.c +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -166,6 +166,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, gpr_mu_unlock(&connection_state->server_state->mu); grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp_server); + gpr_free(connection_state->acceptor); gpr_free(connection_state); } diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h index 6eba8c4057..437a94beff 100644 --- a/src/core/lib/iomgr/tcp_server.h +++ b/src/core/lib/iomgr/tcp_server.h @@ -52,7 +52,8 @@ typedef struct grpc_tcp_server_acceptor { unsigned fd_index; } grpc_tcp_server_acceptor; -/* Called for newly connected TCP connections. */ +/* Called for newly connected TCP connections. + Takes ownership of acceptor. */ typedef void (*grpc_tcp_server_cb)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *ep, grpc_pollset *accepting_pollset, diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 7e2fb0f1f9..93d02e69df 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -381,16 +381,18 @@ error: /* event manager callback when reads are ready */ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *err) { grpc_tcp_listener *sp = arg; - grpc_tcp_server_acceptor acceptor = {sp->server, sp->port_index, - sp->fd_index}; - grpc_pollset *read_notifier_pollset = NULL; - grpc_fd *fdobj; if (err != GRPC_ERROR_NONE) { goto error; } - read_notifier_pollset = + // Create acceptor. + grpc_tcp_server_acceptor *acceptor = gpr_malloc(sizeof(*acceptor)); + acceptor->from_server = sp->server; + acceptor->port_index = sp->port_index; + acceptor->fd_index = sp->fd_index; + + grpc_pollset *read_notifier_pollset = sp->server->pollsets[(size_t)gpr_atm_no_barrier_fetch_add( &sp->server->next_pollset_to_assign, 1) % sp->server->pollset_count]; @@ -426,7 +428,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *err) { gpr_log(GPR_DEBUG, "SERVER_CONNECT: incoming connection: %s", addr_str); } - fdobj = grpc_fd_create(fd, name); + grpc_fd *fdobj = grpc_fd_create(fd, name); if (read_notifier_pollset == NULL) { gpr_log(GPR_ERROR, "Read notifier pollset is not set on the fd"); @@ -439,7 +441,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *err) { exec_ctx, sp->server->on_accept_cb_arg, grpc_tcp_create(fdobj, sp->server->resource_quota, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, addr_str), - read_notifier_pollset, &acceptor); + read_notifier_pollset, acceptor); gpr_free(name); gpr_free(addr_str); diff --git a/src/core/lib/iomgr/tcp_server_uv.c b/src/core/lib/iomgr/tcp_server_uv.c index b5b9b92a20..f4f133a5c6 100644 --- a/src/core/lib/iomgr/tcp_server_uv.c +++ b/src/core/lib/iomgr/tcp_server_uv.c @@ -188,7 +188,6 @@ static void accepted_connection_close_cb(uv_handle_t *handle) { static void on_connect(uv_stream_t *server, int status) { grpc_tcp_listener *sp = (grpc_tcp_listener *)server->data; - grpc_tcp_server_acceptor acceptor = {sp->server, sp->port_index, 0}; uv_tcp_t *client; grpc_endpoint *ep = NULL; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -201,6 +200,13 @@ static void on_connect(uv_stream_t *server, int status) { uv_strerror(status)); return; } + + // Create acceptor. + grpc_tcp_server_acceptor *acceptor = gpr_malloc(sizeof(*acceptor)); + acceptor->from_server = sp->server; + acceptor->port_index = sp->port_index; + acceptor->fd_index = 0; + client = gpr_malloc(sizeof(uv_tcp_t)); uv_tcp_init(uv_default_loop(), client); // UV documentation says this is guaranteed to succeed @@ -221,7 +227,7 @@ static void on_connect(uv_stream_t *server, int status) { } ep = grpc_tcp_create(client, sp->server->resource_quota, peer_name_string); sp->server->on_accept_cb(&exec_ctx, sp->server->on_accept_cb_arg, ep, NULL, - &acceptor); + acceptor); grpc_exec_ctx_finish(&exec_ctx); } } diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index b8a391c059..46a9ea24dd 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -323,7 +323,6 @@ failure: /* Event manager callback when reads are ready. */ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_tcp_listener *sp = arg; - grpc_tcp_server_acceptor acceptor = {sp->server, sp->port_index, 0}; SOCKET sock = sp->new_socket; grpc_winsocket_callback_info *info = &sp->socket->read_info; grpc_endpoint *ep = NULL; @@ -350,6 +349,12 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { return; } + // Create acceptor. + grpc_tcp_server_acceptor *acceptor = gpr_malloc(sizeof(*acceptor)); + acceptor->from_server = sp->server; + acceptor->port_index = sp->port_index; + acceptor->fd_index = 0; + /* The IOCP notified us of a completed operation. Let's grab the results, and act accordingly. */ transfered_bytes = 0; @@ -397,7 +402,7 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { managed to accept a connection, and created an endpoint. */ if (ep) { sp->server->on_accept_cb(exec_ctx, sp->server->on_accept_cb_arg, ep, NULL, - &acceptor); + acceptor); } /* As we were notified from the IOCP of one and exactly one accept, the former socked we created has now either been destroy or assigned -- cgit v1.2.3 From 6c07bf85a336c1cfbdf4547e134161a9be4a0fa5 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 9 Dec 2016 08:38:38 -0800 Subject: Fix allocation bug. --- src/core/lib/iomgr/tcp_server_posix.c | 12 ++++++------ src/core/lib/iomgr/tcp_server_uv.c | 11 +++++------ src/core/lib/iomgr/tcp_server_windows.c | 11 +++++------ 3 files changed, 16 insertions(+), 18 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 93d02e69df..179f47ef76 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -386,12 +386,6 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *err) { goto error; } - // Create acceptor. - grpc_tcp_server_acceptor *acceptor = gpr_malloc(sizeof(*acceptor)); - acceptor->from_server = sp->server; - acceptor->port_index = sp->port_index; - acceptor->fd_index = sp->fd_index; - grpc_pollset *read_notifier_pollset = sp->server->pollsets[(size_t)gpr_atm_no_barrier_fetch_add( &sp->server->next_pollset_to_assign, 1) % @@ -437,6 +431,12 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *err) { grpc_pollset_add_fd(exec_ctx, read_notifier_pollset, fdobj); + // Create acceptor. + grpc_tcp_server_acceptor *acceptor = gpr_malloc(sizeof(*acceptor)); + acceptor->from_server = sp->server; + acceptor->port_index = sp->port_index; + acceptor->fd_index = sp->fd_index; + sp->server->on_accept_cb( exec_ctx, sp->server->on_accept_cb_arg, grpc_tcp_create(fdobj, sp->server->resource_quota, diff --git a/src/core/lib/iomgr/tcp_server_uv.c b/src/core/lib/iomgr/tcp_server_uv.c index f4f133a5c6..e1a174cfa2 100644 --- a/src/core/lib/iomgr/tcp_server_uv.c +++ b/src/core/lib/iomgr/tcp_server_uv.c @@ -201,12 +201,6 @@ static void on_connect(uv_stream_t *server, int status) { return; } - // Create acceptor. - grpc_tcp_server_acceptor *acceptor = gpr_malloc(sizeof(*acceptor)); - acceptor->from_server = sp->server; - acceptor->port_index = sp->port_index; - acceptor->fd_index = 0; - client = gpr_malloc(sizeof(uv_tcp_t)); uv_tcp_init(uv_default_loop(), client); // UV documentation says this is guaranteed to succeed @@ -226,6 +220,11 @@ static void on_connect(uv_stream_t *server, int status) { gpr_log(GPR_INFO, "uv_tcp_getpeername error: %s", uv_strerror(status)); } ep = grpc_tcp_create(client, sp->server->resource_quota, peer_name_string); + // Create acceptor. + grpc_tcp_server_acceptor *acceptor = gpr_malloc(sizeof(*acceptor)); + acceptor->from_server = sp->server; + acceptor->port_index = sp->port_index; + acceptor->fd_index = 0; sp->server->on_accept_cb(&exec_ctx, sp->server->on_accept_cb_arg, ep, NULL, acceptor); grpc_exec_ctx_finish(&exec_ctx); diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 46a9ea24dd..b0c8586bac 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -349,12 +349,6 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { return; } - // Create acceptor. - grpc_tcp_server_acceptor *acceptor = gpr_malloc(sizeof(*acceptor)); - acceptor->from_server = sp->server; - acceptor->port_index = sp->port_index; - acceptor->fd_index = 0; - /* The IOCP notified us of a completed operation. Let's grab the results, and act accordingly. */ transfered_bytes = 0; @@ -401,6 +395,11 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { /* The only time we should call our callback, is where we successfully managed to accept a connection, and created an endpoint. */ if (ep) { + // Create acceptor. + grpc_tcp_server_acceptor *acceptor = gpr_malloc(sizeof(*acceptor)); + acceptor->from_server = sp->server; + acceptor->port_index = sp->port_index; + acceptor->fd_index = 0; sp->server->on_accept_cb(exec_ctx, sp->server->on_accept_cb_arg, ep, NULL, acceptor); } -- cgit v1.2.3 From 96ba68d7cd4ecc3d366df2b33f8d62db9c4c8df6 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 9 Dec 2016 17:21:26 +0000 Subject: Fix more allocation bugs. --- src/core/ext/transport/chttp2/server/chttp2_server.c | 1 + test/core/client_channel/set_initial_connect_string_test.c | 1 + test/core/end2end/bad_server_response_test.c | 1 + test/core/end2end/fixtures/http_proxy.c | 1 + test/core/iomgr/tcp_server_posix_test.c | 1 + test/core/surface/concurrent_connectivity_test.c | 2 +- test/core/util/reconnect_server.c | 1 + 7 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c index 844330c0d8..af0b9e5b0b 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.c +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -178,6 +178,7 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, if (state->shutdown) { gpr_mu_unlock(&state->mu); grpc_endpoint_destroy(exec_ctx, tcp); + gpr_free(acceptor); return; } grpc_handshake_manager *handshake_mgr = grpc_handshake_manager_create(); diff --git a/test/core/client_channel/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c index b16a3ebf45..11e57439d5 100644 --- a/test/core/client_channel/set_initial_connect_string_test.c +++ b/test/core/client_channel/set_initial_connect_string_test.c @@ -92,6 +92,7 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { + gpr_free(acceptor); test_tcp_server *server = arg; grpc_closure_init(&on_read, handle_read, NULL); grpc_slice_buffer_init(&state.incoming_buffer); diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 1c4a17fda8..30468558e8 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -145,6 +145,7 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { + gpr_free(acceptor); test_tcp_server *server = arg; grpc_closure_init(&on_read, handle_read, NULL); grpc_closure_init(&on_write, done_write, NULL); diff --git a/test/core/end2end/fixtures/http_proxy.c b/test/core/end2end/fixtures/http_proxy.c index 57fc4a38f8..80865fc7a6 100644 --- a/test/core/end2end/fixtures/http_proxy.c +++ b/test/core/end2end/fixtures/http_proxy.c @@ -367,6 +367,7 @@ static void on_read_request_done(grpc_exec_ctx* exec_ctx, void* arg, static void on_accept(grpc_exec_ctx* exec_ctx, void* arg, grpc_endpoint* endpoint, grpc_pollset* accepting_pollset, grpc_tcp_server_acceptor* acceptor) { + gpr_free(acceptor); grpc_end2end_http_proxy* proxy = arg; // Instantiate proxy_connection. proxy_connection* conn = gpr_malloc(sizeof(*conn)); diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index 1b8a39c1be..9a7810e227 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -126,6 +126,7 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, on_connect_result temp_result; on_connect_result_set(&temp_result, acceptor); + gpr_free(acceptor); gpr_mu_lock(g_mu); g_result = temp_result; diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index f9f4675454..93a4794222 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -105,8 +105,8 @@ void server_thread(void *vargs) { static void on_connect(grpc_exec_ctx *exec_ctx, void *vargs, grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { + gpr_free(acceptor); struct server_thread_args *args = (struct server_thread_args *)vargs; - (void)acceptor; grpc_endpoint_shutdown(exec_ctx, tcp); grpc_endpoint_destroy(exec_ctx, tcp); GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(args->pollset, NULL)); diff --git a/test/core/util/reconnect_server.c b/test/core/util/reconnect_server.c index 6509cc5b68..7bf83a74a1 100644 --- a/test/core/util/reconnect_server.c +++ b/test/core/util/reconnect_server.c @@ -73,6 +73,7 @@ static void pretty_print_backoffs(reconnect_server *server) { static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { + gpr_free(acceptor); char *peer; char *last_colon; reconnect_server *server = (reconnect_server *)arg; -- cgit v1.2.3 From 0ee1dbbfa9b1b1d595eb6a91be564679d5d3df78 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 9 Dec 2016 09:57:20 -0800 Subject: Catch the case where we were shutdown after a handoff. --- src/core/ext/transport/chttp2/server/chttp2_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.c index 4a2ec52cea..c7e1ddcc42 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.c +++ b/src/core/ext/transport/chttp2/server/chttp2_server.c @@ -139,7 +139,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); - if (error == GRPC_ERROR_NONE) { + if (error == GRPC_ERROR_NONE && args->endpoint != NULL) { // We were shut down after handshaking completed successfully, so // destroy the endpoint here. // TODO(ctiller): It is currently necessary to shutdown endpoints -- cgit v1.2.3 From 94601669683024e895c6e8c52d50c036510b5aaf Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 9 Dec 2016 13:58:24 -0800 Subject: Short deadlines: set Status on deadline --- Makefile | 2 + src/core/ext/client_channel/client_channel.c | 13 +- test/core/end2end/end2end_nosec_tests.c | 8 + test/core/end2end/end2end_tests.c | 8 + test/core/end2end/gen_build_yaml.py | 1 + test/core/end2end/tests/short_deadlines.c | 203 ++++++ tools/run_tests/sources_and_headers.json | 2 + tools/run_tests/tests.json | 738 ++++++++++++++++++++- .../end2end_nosec_tests.vcxproj | 2 + .../end2end_nosec_tests.vcxproj.filters | 3 + .../tests/end2end_tests/end2end_tests.vcxproj | 2 + .../end2end_tests/end2end_tests.vcxproj.filters | 3 + 12 files changed, 972 insertions(+), 13 deletions(-) create mode 100644 test/core/end2end/tests/short_deadlines.c (limited to 'src/core') diff --git a/Makefile b/Makefile index eae4f46e70..3a228b4414 100644 --- a/Makefile +++ b/Makefile @@ -7216,6 +7216,7 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/request_with_payload.c \ test/core/end2end/tests/resource_quota_server.c \ test/core/end2end/tests/server_finishes_request.c \ + test/core/end2end/tests/short_deadlines.c \ test/core/end2end/tests/shutdown_finishes_calls.c \ test/core/end2end/tests/shutdown_finishes_tags.c \ test/core/end2end/tests/simple_cacheable_request.c \ @@ -7302,6 +7303,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/request_with_payload.c \ test/core/end2end/tests/resource_quota_server.c \ test/core/end2end/tests/server_finishes_request.c \ + test/core/end2end/tests/short_deadlines.c \ test/core/end2end/tests/shutdown_finishes_calls.c \ test/core/end2end/tests/shutdown_finishes_tags.c \ test/core/end2end/tests/simple_cacheable_request.c \ diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 1fcff4388a..4b3d8951d7 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -683,9 +683,15 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, "Failed to create subchannel", &error, 1)); } else if (GET_CALL(calld) == CANCELLED_CALL) { /* already cancelled before subchannel became ready */ - fail_locked(exec_ctx, calld, - GRPC_ERROR_CREATE_REFERENCING( - "Cancelled before creating subchannel", &error, 1)); + grpc_error *cancellation_error = GRPC_ERROR_CREATE_REFERENCING( + "Cancelled before creating subchannel", &error, 1); + /* if due to deadline, attach the deadline exceeded status to the error */ + if (gpr_time_cmp(calld->deadline, gpr_now(GPR_CLOCK_MONOTONIC)) < 0) { + cancellation_error = + grpc_error_set_int(cancellation_error, GRPC_ERROR_INT_GRPC_STATUS, + GRPC_STATUS_DEADLINE_EXCEEDED); + } + fail_locked(exec_ctx, calld, cancellation_error); } else { /* Create call on subchannel. */ grpc_subchannel_call *subchannel_call = NULL; @@ -809,7 +815,6 @@ static bool pick_subchannel(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY; } } - // TODO(dgq): make this deadline configurable somehow. const grpc_lb_policy_pick_args inputs = { initial_metadata, initial_metadata_flags, &calld->lb_token_mdelem, gpr_inf_future(GPR_CLOCK_MONOTONIC)}; diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c index 663489082f..76dd645b93 100644 --- a/test/core/end2end/end2end_nosec_tests.c +++ b/test/core/end2end/end2end_nosec_tests.c @@ -119,6 +119,8 @@ extern void resource_quota_server(grpc_end2end_test_config config); extern void resource_quota_server_pre_init(void); extern void server_finishes_request(grpc_end2end_test_config config); extern void server_finishes_request_pre_init(void); +extern void short_deadlines(grpc_end2end_test_config config); +extern void short_deadlines_pre_init(void); extern void shutdown_finishes_calls(grpc_end2end_test_config config); extern void shutdown_finishes_calls_pre_init(void); extern void shutdown_finishes_tags(grpc_end2end_test_config config); @@ -177,6 +179,7 @@ void grpc_end2end_tests_pre_init(void) { request_with_payload_pre_init(); resource_quota_server_pre_init(); server_finishes_request_pre_init(); + short_deadlines_pre_init(); shutdown_finishes_calls_pre_init(); shutdown_finishes_tags_pre_init(); simple_cacheable_request_pre_init(); @@ -232,6 +235,7 @@ void grpc_end2end_tests(int argc, char **argv, request_with_payload(config); resource_quota_server(config); server_finishes_request(config); + short_deadlines(config); shutdown_finishes_calls(config); shutdown_finishes_tags(config); simple_cacheable_request(config); @@ -396,6 +400,10 @@ void grpc_end2end_tests(int argc, char **argv, server_finishes_request(config); continue; } + if (0 == strcmp("short_deadlines", argv[i])) { + short_deadlines(config); + continue; + } if (0 == strcmp("shutdown_finishes_calls", argv[i])) { shutdown_finishes_calls(config); continue; diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index 25c7c62fde..754fbfc6fa 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -121,6 +121,8 @@ extern void resource_quota_server(grpc_end2end_test_config config); extern void resource_quota_server_pre_init(void); extern void server_finishes_request(grpc_end2end_test_config config); extern void server_finishes_request_pre_init(void); +extern void short_deadlines(grpc_end2end_test_config config); +extern void short_deadlines_pre_init(void); extern void shutdown_finishes_calls(grpc_end2end_test_config config); extern void shutdown_finishes_calls_pre_init(void); extern void shutdown_finishes_tags(grpc_end2end_test_config config); @@ -180,6 +182,7 @@ void grpc_end2end_tests_pre_init(void) { request_with_payload_pre_init(); resource_quota_server_pre_init(); server_finishes_request_pre_init(); + short_deadlines_pre_init(); shutdown_finishes_calls_pre_init(); shutdown_finishes_tags_pre_init(); simple_cacheable_request_pre_init(); @@ -236,6 +239,7 @@ void grpc_end2end_tests(int argc, char **argv, request_with_payload(config); resource_quota_server(config); server_finishes_request(config); + short_deadlines(config); shutdown_finishes_calls(config); shutdown_finishes_tags(config); simple_cacheable_request(config); @@ -404,6 +408,10 @@ void grpc_end2end_tests(int argc, char **argv, server_finishes_request(config); continue; } + if (0 == strcmp("short_deadlines", argv[i])) { + short_deadlines(config); + continue; + } if (0 == strcmp("shutdown_finishes_calls", argv[i])) { shutdown_finishes_calls(config); continue; diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 201a92a1fd..655236ca5d 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -122,6 +122,7 @@ END2END_TESTS = { 'max_concurrent_streams': default_test_options._replace(proxyable=False), 'max_message_length': default_test_options, 'negative_deadline': default_test_options, + 'short_deadlines': default_test_options, 'network_status_change': default_test_options, 'no_logging': default_test_options._replace(traceable=False), 'no_op': default_test_options, diff --git a/test/core/end2end/tests/short_deadlines.c b/test/core/end2end/tests/short_deadlines.c new file mode 100644 index 0000000000..9602a34f91 --- /dev/null +++ b/test/core/end2end/tests/short_deadlines.c @@ -0,0 +1,203 @@ +/* + * + * 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 "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include "src/core/lib/support/string.h" +#include "test/core/end2end/cq_verifier.h" + +static void *tag(intptr_t t) { return (void *)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char *test_name, + grpc_channel_args *client_args, + grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "%s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_time(int n) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); +} + +static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } + +static void drain_cq(grpc_completion_queue *cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture *f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = NULL; +} + +static void shutdown_client(grpc_end2end_test_fixture *f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = NULL; +} + +static void end_test(grpc_end2end_test_fixture *f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); +} + +static void simple_request_body_with_deadline(grpc_end2end_test_config config, + grpc_end2end_test_fixture f, + size_t num_ops, int deadline_ms) { + grpc_call *c; + const gpr_timespec deadline = + gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), + gpr_time_from_millis(deadline_ms, GPR_TIMESPAN)); + + cq_verifier *cqv = cq_verifier_create(f.cq); + grpc_op ops[6]; + grpc_op *op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_status_code status; + grpc_call_error error; + char *details = NULL; + size_t details_capacity = 0; + + gpr_log(GPR_DEBUG, "test with %" PRIuPTR " ops, %d ms deadline", num_ops, + deadline_ms); + + c = grpc_channel_create_call( + f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", + get_host_override_string("foo.test.google.fr:1234", config), deadline, + NULL); + GPR_ASSERT(c); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + + memset(ops, 0, sizeof(ops)); + op = ops; + 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++; + 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_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++; + GPR_ASSERT(num_ops <= (size_t)(op - ops)); + error = grpc_call_start_batch(c, ops, num_ops, tag(1), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + /* because there's no logic here to move along the server side of the call, + * client calls are always going to timeout */ + + CQ_EXPECT_COMPLETION(cqv, tag(1), 1); + cq_verify(cqv); + + if (status != GRPC_STATUS_DEADLINE_EXCEEDED) { + gpr_log(GPR_ERROR, + "Expected GRPC_STATUS_DEADLINE_EXCEEDED (code %d), got code %d", + GRPC_STATUS_DEADLINE_EXCEEDED, status); + abort(); + } + + gpr_free(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + + grpc_call_destroy(c); + + cq_verifier_destroy(cqv); +} + +static void test_invoke_short_deadline_request(grpc_end2end_test_config config, + size_t num_ops, + int deadline_ms) { + grpc_end2end_test_fixture f; + + f = begin_test(config, "test_invoke_short_deadline_request", NULL, NULL); + simple_request_body_with_deadline(config, f, num_ops, deadline_ms); + end_test(&f); + config.tear_down_data(&f); +} + +void short_deadlines(grpc_end2end_test_config config) { + size_t i; + for (i = 1; i <= 4; i++) { + test_invoke_short_deadline_request(config, i, 0); + test_invoke_short_deadline_request(config, i, 1); + test_invoke_short_deadline_request(config, i, 5); + test_invoke_short_deadline_request(config, i, 10); + test_invoke_short_deadline_request(config, i, 15); + test_invoke_short_deadline_request(config, i, 30); + } +} + +void short_deadlines_pre_init(void) {} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 449cc126e3..9dd5a1c85f 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6355,6 +6355,7 @@ "test/core/end2end/tests/request_with_payload.c", "test/core/end2end/tests/resource_quota_server.c", "test/core/end2end/tests/server_finishes_request.c", + "test/core/end2end/tests/short_deadlines.c", "test/core/end2end/tests/shutdown_finishes_calls.c", "test/core/end2end/tests/shutdown_finishes_tags.c", "test/core/end2end/tests/simple_cacheable_request.c", @@ -6424,6 +6425,7 @@ "test/core/end2end/tests/request_with_payload.c", "test/core/end2end/tests/resource_quota_server.c", "test/core/end2end/tests/server_finishes_request.c", + "test/core/end2end/tests/short_deadlines.c", "test/core/end2end/tests/shutdown_finishes_calls.c", "test/core/end2end/tests/shutdown_finishes_tags.c", "test/core/end2end/tests/simple_cacheable_request.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index b76263b8b9..8d1e9b4568 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -5896,6 +5896,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -6979,6 +7002,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -8023,6 +8069,28 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -9004,6 +9072,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -10064,6 +10155,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -10989,6 +11103,25 @@ "linux" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -11994,6 +12127,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -13114,6 +13270,30 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -14205,6 +14385,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -15325,6 +15528,30 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -16285,6 +16512,30 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -17319,7 +17570,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "short_deadlines" ], "ci_platforms": [ "windows", @@ -17343,7 +17594,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -17367,7 +17618,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -17391,7 +17642,7 @@ }, { "args": [ - "simple_metadata" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -17415,7 +17666,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -17439,7 +17690,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -17463,7 +17714,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -17487,7 +17738,7 @@ }, { "args": [ - "authority_not_supported" + "trailing_metadata" ], "ci_platforms": [ "windows", @@ -17501,7 +17752,31 @@ ], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "authority_not_supported" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -18253,6 +18528,30 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -19305,6 +19604,32 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -20386,6 +20711,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -21469,6 +21817,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -22421,6 +22792,30 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -23487,6 +23882,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -24547,6 +24965,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -25607,6 +26048,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -26573,6 +27037,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -27610,6 +28097,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -28516,6 +29026,25 @@ "linux" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -29498,6 +30027,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -30594,6 +31146,30 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -31662,6 +32238,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -32590,6 +33189,30 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -33598,6 +34221,30 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -34510,6 +35157,30 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -35536,6 +36207,32 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" @@ -36569,6 +37266,29 @@ "posix" ] }, + { + "args": [ + "short_deadlines" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "shutdown_finishes_calls" diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj index 4fb8f8f4a1..a79b44afee 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj @@ -231,6 +231,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters index ff82a4dd43..ac60d4c789 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters @@ -121,6 +121,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj index 0b7d7c2e75..a218fa0310 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj @@ -233,6 +233,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters index e641930e64..978893fcd0 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters @@ -124,6 +124,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests -- cgit v1.2.3 From c217e490b176669bf93c04e772218d88b5fef764 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 9 Dec 2016 14:03:58 -0800 Subject: Add function to create channel arg for client channel factory. --- .../ext/client_channel/client_channel_factory.c | 32 ++++++++++++++++++++++ .../ext/client_channel/client_channel_factory.h | 3 ++ .../chttp2/client/insecure/channel_create.c | 18 +----------- .../chttp2/client/secure/secure_channel_create.c | 27 +----------------- 4 files changed, 37 insertions(+), 43 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel_factory.c b/src/core/ext/client_channel/client_channel_factory.c index 4900832d57..01eee02979 100644 --- a/src/core/ext/client_channel/client_channel_factory.c +++ b/src/core/ext/client_channel/client_channel_factory.c @@ -55,3 +55,35 @@ grpc_channel* grpc_client_channel_factory_create_channel( return factory->vtable->create_client_channel(exec_ctx, factory, target, type, args); } + +static void *factory_arg_copy(void *factory) { + grpc_client_channel_factory_ref(factory); + return factory; +} + +static void factory_arg_destroy(void *factory) { + // TODO(roth): Remove local exec_ctx when + // https://github.com/grpc/grpc/pull/8705 is merged. + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_client_channel_factory_unref(&exec_ctx, factory); + grpc_exec_ctx_finish(&exec_ctx); +} + +static int factory_arg_cmp(void *factory1, void *factory2) { + if (factory1 < factory2) return -1; + if (factory1 > factory2) return 1; + return 0; +} + +static const grpc_arg_pointer_vtable factory_arg_vtable = { + factory_arg_copy, factory_arg_destroy, factory_arg_cmp}; + +grpc_arg grpc_client_channel_factory_create_channel_arg( + grpc_client_channel_factory *factory) { + grpc_arg arg; + arg.type = GRPC_ARG_POINTER; + arg.key = GRPC_ARG_CLIENT_CHANNEL_FACTORY; + arg.value.pointer.p = factory; + arg.value.pointer.vtable = &factory_arg_vtable; + return arg; +} diff --git a/src/core/ext/client_channel/client_channel_factory.h b/src/core/ext/client_channel/client_channel_factory.h index 2b8fc577b3..e7ad918881 100644 --- a/src/core/ext/client_channel/client_channel_factory.h +++ b/src/core/ext/client_channel/client_channel_factory.h @@ -83,4 +83,7 @@ grpc_channel *grpc_client_channel_factory_create_channel( const char *target, grpc_client_channel_type type, const grpc_channel_args *args); +grpc_arg grpc_client_channel_factory_create_channel_arg( + grpc_client_channel_factory *factory); + #endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H */ diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 3ad34b0870..1e1bed10dc 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -76,19 +76,6 @@ static const grpc_client_channel_factory_vtable client_channel_factory_vtable = static grpc_client_channel_factory client_channel_factory = { &client_channel_factory_vtable}; -static void *cc_factory_arg_copy(void *cc_factory) { return cc_factory; } - -static void cc_factory_arg_destroy(void *cc_factory) {} - -static int cc_factory_arg_cmp(void *cc_factory1, void *cc_factory2) { - if (cc_factory1 < cc_factory2) return -1; - if (cc_factory1 > cc_factory2) return 1; - return 0; -} - -static const grpc_arg_pointer_vtable cc_factory_arg_vtable = { - cc_factory_arg_copy, cc_factory_arg_destroy, cc_factory_arg_cmp}; - /* Create a client channel: Asynchronously: - resolve target - connect to it (trying alternatives as presented) @@ -108,10 +95,7 @@ grpc_channel *grpc_insecure_channel_create(const char *target, new_args[0].type = GRPC_ARG_STRING; new_args[0].key = GRPC_ARG_SERVER_URI; new_args[0].value.string = (char *)target; - new_args[1].type = GRPC_ARG_POINTER; - new_args[1].key = GRPC_ARG_CLIENT_CHANNEL_FACTORY; - new_args[1].value.pointer.p = factory; - new_args[1].value.pointer.vtable = &cc_factory_arg_vtable; + new_args[1] = grpc_client_channel_factory_create_channel_arg(factory); grpc_channel_args *args_copy = grpc_channel_args_copy_and_add(args, new_args, GPR_ARRAY_SIZE(new_args)); // Create channel. diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 2bef684398..2474f544cf 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -97,28 +97,6 @@ static const grpc_client_channel_factory_vtable client_channel_factory_vtable = client_channel_factory_create_subchannel, client_channel_factory_create_channel}; -static void *cc_factory_arg_copy(void *cc_factory) { - client_channel_factory_ref(cc_factory); - return cc_factory; -} - -static void cc_factory_arg_destroy(void *cc_factory) { - // TODO(roth): remove local exec_ctx when - // https://github.com/grpc/grpc/pull/8705 is merged - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - client_channel_factory_unref(&exec_ctx, cc_factory); - grpc_exec_ctx_finish(&exec_ctx); -} - -static int cc_factory_arg_cmp(void *cc_factory1, void *cc_factory2) { - if (cc_factory1 < cc_factory2) return -1; - if (cc_factory1 > cc_factory2) return 1; - return 0; -} - -static const grpc_arg_pointer_vtable cc_factory_arg_vtable = { - cc_factory_arg_copy, cc_factory_arg_destroy, cc_factory_arg_cmp}; - /* Create a secure client channel: Asynchronously: - resolve target - connect to it (trying alternatives as presented) @@ -165,10 +143,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, new_args[0].type = GRPC_ARG_STRING; new_args[0].key = GRPC_ARG_SERVER_URI; new_args[0].value.string = (char *)target; - new_args[1].type = GRPC_ARG_POINTER; - new_args[1].key = GRPC_ARG_CLIENT_CHANNEL_FACTORY; - new_args[1].value.pointer.p = f; - new_args[1].value.pointer.vtable = &cc_factory_arg_vtable; + new_args[1] = grpc_client_channel_factory_create_channel_arg(&f->base); new_args[2] = grpc_security_connector_to_arg(&security_connector->base); grpc_channel_args *args_copy = grpc_channel_args_copy_and_add( new_args_from_connector != NULL ? new_args_from_connector : args, -- cgit v1.2.3 From 70a85ad6178260253136688a4f6bb3244aee927f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 12 Dec 2016 06:40:23 -0800 Subject: Revert "Handle (and test) short call deadlines" --- Makefile | 2 - src/core/ext/client_channel/client_channel.c | 13 +- test/core/end2end/end2end_nosec_tests.c | 8 - test/core/end2end/end2end_tests.c | 8 - test/core/end2end/gen_build_yaml.py | 1 - test/core/end2end/tests/short_deadlines.c | 203 ------ tools/run_tests/sources_and_headers.json | 2 - tools/run_tests/tests.json | 736 +-------------------- .../end2end_nosec_tests.vcxproj | 2 - .../end2end_nosec_tests.vcxproj.filters | 3 - .../tests/end2end_tests/end2end_tests.vcxproj | 2 - .../end2end_tests/end2end_tests.vcxproj.filters | 3 - 12 files changed, 12 insertions(+), 971 deletions(-) delete mode 100644 test/core/end2end/tests/short_deadlines.c (limited to 'src/core') diff --git a/Makefile b/Makefile index 3a228b4414..eae4f46e70 100644 --- a/Makefile +++ b/Makefile @@ -7216,7 +7216,6 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/request_with_payload.c \ test/core/end2end/tests/resource_quota_server.c \ test/core/end2end/tests/server_finishes_request.c \ - test/core/end2end/tests/short_deadlines.c \ test/core/end2end/tests/shutdown_finishes_calls.c \ test/core/end2end/tests/shutdown_finishes_tags.c \ test/core/end2end/tests/simple_cacheable_request.c \ @@ -7303,7 +7302,6 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/request_with_payload.c \ test/core/end2end/tests/resource_quota_server.c \ test/core/end2end/tests/server_finishes_request.c \ - test/core/end2end/tests/short_deadlines.c \ test/core/end2end/tests/shutdown_finishes_calls.c \ test/core/end2end/tests/shutdown_finishes_tags.c \ test/core/end2end/tests/simple_cacheable_request.c \ diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 4b3d8951d7..1fcff4388a 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -683,15 +683,9 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, "Failed to create subchannel", &error, 1)); } else if (GET_CALL(calld) == CANCELLED_CALL) { /* already cancelled before subchannel became ready */ - grpc_error *cancellation_error = GRPC_ERROR_CREATE_REFERENCING( - "Cancelled before creating subchannel", &error, 1); - /* if due to deadline, attach the deadline exceeded status to the error */ - if (gpr_time_cmp(calld->deadline, gpr_now(GPR_CLOCK_MONOTONIC)) < 0) { - cancellation_error = - grpc_error_set_int(cancellation_error, GRPC_ERROR_INT_GRPC_STATUS, - GRPC_STATUS_DEADLINE_EXCEEDED); - } - fail_locked(exec_ctx, calld, cancellation_error); + fail_locked(exec_ctx, calld, + GRPC_ERROR_CREATE_REFERENCING( + "Cancelled before creating subchannel", &error, 1)); } else { /* Create call on subchannel. */ grpc_subchannel_call *subchannel_call = NULL; @@ -815,6 +809,7 @@ static bool pick_subchannel(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY; } } + // TODO(dgq): make this deadline configurable somehow. const grpc_lb_policy_pick_args inputs = { initial_metadata, initial_metadata_flags, &calld->lb_token_mdelem, gpr_inf_future(GPR_CLOCK_MONOTONIC)}; diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c index 76dd645b93..663489082f 100644 --- a/test/core/end2end/end2end_nosec_tests.c +++ b/test/core/end2end/end2end_nosec_tests.c @@ -119,8 +119,6 @@ extern void resource_quota_server(grpc_end2end_test_config config); extern void resource_quota_server_pre_init(void); extern void server_finishes_request(grpc_end2end_test_config config); extern void server_finishes_request_pre_init(void); -extern void short_deadlines(grpc_end2end_test_config config); -extern void short_deadlines_pre_init(void); extern void shutdown_finishes_calls(grpc_end2end_test_config config); extern void shutdown_finishes_calls_pre_init(void); extern void shutdown_finishes_tags(grpc_end2end_test_config config); @@ -179,7 +177,6 @@ void grpc_end2end_tests_pre_init(void) { request_with_payload_pre_init(); resource_quota_server_pre_init(); server_finishes_request_pre_init(); - short_deadlines_pre_init(); shutdown_finishes_calls_pre_init(); shutdown_finishes_tags_pre_init(); simple_cacheable_request_pre_init(); @@ -235,7 +232,6 @@ void grpc_end2end_tests(int argc, char **argv, request_with_payload(config); resource_quota_server(config); server_finishes_request(config); - short_deadlines(config); shutdown_finishes_calls(config); shutdown_finishes_tags(config); simple_cacheable_request(config); @@ -400,10 +396,6 @@ void grpc_end2end_tests(int argc, char **argv, server_finishes_request(config); continue; } - if (0 == strcmp("short_deadlines", argv[i])) { - short_deadlines(config); - continue; - } if (0 == strcmp("shutdown_finishes_calls", argv[i])) { shutdown_finishes_calls(config); continue; diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index 754fbfc6fa..25c7c62fde 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -121,8 +121,6 @@ extern void resource_quota_server(grpc_end2end_test_config config); extern void resource_quota_server_pre_init(void); extern void server_finishes_request(grpc_end2end_test_config config); extern void server_finishes_request_pre_init(void); -extern void short_deadlines(grpc_end2end_test_config config); -extern void short_deadlines_pre_init(void); extern void shutdown_finishes_calls(grpc_end2end_test_config config); extern void shutdown_finishes_calls_pre_init(void); extern void shutdown_finishes_tags(grpc_end2end_test_config config); @@ -182,7 +180,6 @@ void grpc_end2end_tests_pre_init(void) { request_with_payload_pre_init(); resource_quota_server_pre_init(); server_finishes_request_pre_init(); - short_deadlines_pre_init(); shutdown_finishes_calls_pre_init(); shutdown_finishes_tags_pre_init(); simple_cacheable_request_pre_init(); @@ -239,7 +236,6 @@ void grpc_end2end_tests(int argc, char **argv, request_with_payload(config); resource_quota_server(config); server_finishes_request(config); - short_deadlines(config); shutdown_finishes_calls(config); shutdown_finishes_tags(config); simple_cacheable_request(config); @@ -408,10 +404,6 @@ void grpc_end2end_tests(int argc, char **argv, server_finishes_request(config); continue; } - if (0 == strcmp("short_deadlines", argv[i])) { - short_deadlines(config); - continue; - } if (0 == strcmp("shutdown_finishes_calls", argv[i])) { shutdown_finishes_calls(config); continue; diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 655236ca5d..201a92a1fd 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -122,7 +122,6 @@ END2END_TESTS = { 'max_concurrent_streams': default_test_options._replace(proxyable=False), 'max_message_length': default_test_options, 'negative_deadline': default_test_options, - 'short_deadlines': default_test_options, 'network_status_change': default_test_options, 'no_logging': default_test_options._replace(traceable=False), 'no_op': default_test_options, diff --git a/test/core/end2end/tests/short_deadlines.c b/test/core/end2end/tests/short_deadlines.c deleted file mode 100644 index 9602a34f91..0000000000 --- a/test/core/end2end/tests/short_deadlines.c +++ /dev/null @@ -1,203 +0,0 @@ -/* - * - * 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 "test/core/end2end/end2end_tests.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include "src/core/lib/support/string.h" -#include "test/core/end2end/cq_verifier.h" - -static void *tag(intptr_t t) { return (void *)t; } - -static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, - const char *test_name, - grpc_channel_args *client_args, - grpc_channel_args *server_args) { - grpc_end2end_test_fixture f; - gpr_log(GPR_INFO, "%s/%s", test_name, config.name); - f = config.create_fixture(client_args, server_args); - config.init_server(&f, server_args); - config.init_client(&f, client_args); - return f; -} - -static gpr_timespec n_seconds_time(int n) { - return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); -} - -static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } - -static void drain_cq(grpc_completion_queue *cq) { - grpc_event ev; - do { - ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); - } while (ev.type != GRPC_QUEUE_SHUTDOWN); -} - -static void shutdown_server(grpc_end2end_test_fixture *f) { - if (!f->server) return; - grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck( - f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) - .type == GRPC_OP_COMPLETE); - grpc_server_destroy(f->server); - f->server = NULL; -} - -static void shutdown_client(grpc_end2end_test_fixture *f) { - if (!f->client) return; - grpc_channel_destroy(f->client); - f->client = NULL; -} - -static void end_test(grpc_end2end_test_fixture *f) { - shutdown_server(f); - shutdown_client(f); - - grpc_completion_queue_shutdown(f->cq); - drain_cq(f->cq); - grpc_completion_queue_destroy(f->cq); -} - -static void simple_request_body_with_deadline(grpc_end2end_test_config config, - grpc_end2end_test_fixture f, - size_t num_ops, int deadline_ms) { - grpc_call *c; - const gpr_timespec deadline = - gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), - gpr_time_from_millis(deadline_ms, GPR_TIMESPAN)); - - cq_verifier *cqv = cq_verifier_create(f.cq); - grpc_op ops[6]; - grpc_op *op; - grpc_metadata_array initial_metadata_recv; - grpc_metadata_array trailing_metadata_recv; - grpc_status_code status; - grpc_call_error error; - char *details = NULL; - size_t details_capacity = 0; - - gpr_log(GPR_DEBUG, "test with %" PRIuPTR " ops, %d ms deadline", num_ops, - deadline_ms); - - c = grpc_channel_create_call( - f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", - get_host_override_string("foo.test.google.fr:1234", config), deadline, - NULL); - GPR_ASSERT(c); - - grpc_metadata_array_init(&initial_metadata_recv); - grpc_metadata_array_init(&trailing_metadata_recv); - - memset(ops, 0, sizeof(ops)); - op = ops; - 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++; - 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_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++; - GPR_ASSERT(num_ops <= (size_t)(op - ops)); - error = grpc_call_start_batch(c, ops, num_ops, tag(1), NULL); - GPR_ASSERT(GRPC_CALL_OK == error); - - /* because there's no logic here to move along the server side of the call, - * client calls are always going to timeout */ - - CQ_EXPECT_COMPLETION(cqv, tag(1), 1); - cq_verify(cqv); - - if (status != GRPC_STATUS_DEADLINE_EXCEEDED) { - gpr_log(GPR_ERROR, - "Expected GRPC_STATUS_DEADLINE_EXCEEDED (code %d), got code %d", - GRPC_STATUS_DEADLINE_EXCEEDED, status); - abort(); - } - - gpr_free(details); - grpc_metadata_array_destroy(&initial_metadata_recv); - grpc_metadata_array_destroy(&trailing_metadata_recv); - - grpc_call_destroy(c); - - cq_verifier_destroy(cqv); -} - -static void test_invoke_short_deadline_request(grpc_end2end_test_config config, - size_t num_ops, - int deadline_ms) { - grpc_end2end_test_fixture f; - - f = begin_test(config, "test_invoke_short_deadline_request", NULL, NULL); - simple_request_body_with_deadline(config, f, num_ops, deadline_ms); - end_test(&f); - config.tear_down_data(&f); -} - -void short_deadlines(grpc_end2end_test_config config) { - size_t i; - for (i = 1; i <= 4; i++) { - test_invoke_short_deadline_request(config, i, 0); - test_invoke_short_deadline_request(config, i, 1); - test_invoke_short_deadline_request(config, i, 5); - test_invoke_short_deadline_request(config, i, 10); - test_invoke_short_deadline_request(config, i, 15); - test_invoke_short_deadline_request(config, i, 30); - } -} - -void short_deadlines_pre_init(void) {} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 9dd5a1c85f..449cc126e3 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6355,7 +6355,6 @@ "test/core/end2end/tests/request_with_payload.c", "test/core/end2end/tests/resource_quota_server.c", "test/core/end2end/tests/server_finishes_request.c", - "test/core/end2end/tests/short_deadlines.c", "test/core/end2end/tests/shutdown_finishes_calls.c", "test/core/end2end/tests/shutdown_finishes_tags.c", "test/core/end2end/tests/simple_cacheable_request.c", @@ -6425,7 +6424,6 @@ "test/core/end2end/tests/request_with_payload.c", "test/core/end2end/tests/resource_quota_server.c", "test/core/end2end/tests/server_finishes_request.c", - "test/core/end2end/tests/short_deadlines.c", "test/core/end2end/tests/shutdown_finishes_calls.c", "test/core/end2end/tests/shutdown_finishes_tags.c", "test/core/end2end/tests/simple_cacheable_request.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 8d1e9b4568..b76263b8b9 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -5896,29 +5896,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_census_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -7002,29 +6979,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -8069,28 +8023,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -9072,29 +9004,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_fd_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -10155,29 +10064,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -11103,25 +10989,6 @@ "linux" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -12127,29 +11994,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -13270,30 +13114,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_http_proxy_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -14385,29 +14205,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -15528,30 +15325,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -16512,30 +16285,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -17570,7 +17319,7 @@ }, { "args": [ - "short_deadlines" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -17594,7 +17343,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -17618,7 +17367,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -17642,7 +17391,7 @@ }, { "args": [ - "simple_cacheable_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -17666,7 +17415,7 @@ }, { "args": [ - "simple_metadata" + "simple_request" ], "ci_platforms": [ "windows", @@ -17690,7 +17439,7 @@ }, { "args": [ - "simple_request" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -17714,7 +17463,7 @@ }, { "args": [ - "streaming_error_response" + "trailing_metadata" ], "ci_platforms": [ "windows", @@ -17738,31 +17487,7 @@ }, { "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "authority_not_supported" + "authority_not_supported" ], "ci_platforms": [ "windows", @@ -18528,30 +18253,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -19604,32 +19305,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -20711,29 +20386,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -21817,29 +21469,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_cert_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -22792,30 +22421,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -23882,29 +23487,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_uds_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -24965,29 +24547,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_census_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -26048,29 +25607,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -27037,29 +26573,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_fd_nosec_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -28097,29 +27610,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -29026,25 +28516,6 @@ "linux" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -30027,29 +29498,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -31146,30 +30594,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_http_proxy_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -32238,29 +31662,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -33189,30 +32590,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_proxy_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -34221,30 +33598,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -35157,30 +34510,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -36207,32 +35536,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" @@ -37266,29 +36569,6 @@ "posix" ] }, - { - "args": [ - "short_deadlines" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_uds_nosec_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, { "args": [ "shutdown_finishes_calls" diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj index a79b44afee..4fb8f8f4a1 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj @@ -231,8 +231,6 @@ - - diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters index ac60d4c789..ff82a4dd43 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters @@ -121,9 +121,6 @@ test\core\end2end\tests - - test\core\end2end\tests - test\core\end2end\tests diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj index a218fa0310..0b7d7c2e75 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj @@ -233,8 +233,6 @@ - - diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters index 978893fcd0..e641930e64 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters @@ -124,9 +124,6 @@ test\core\end2end\tests - - test\core\end2end\tests - test\core\end2end\tests -- cgit v1.2.3 From 30268a99e022e2c52746276a85d05a737d2ca1e4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 12 Dec 2016 06:48:30 -0800 Subject: Revert "Revert "Revert "Remove redundant includes from string.h and tmpfile.h""" --- BUILD | 9 --- CMakeLists.txt | 7 -- Makefile | 9 --- build.yaml | 1 - gRPC-Core.podspec | 2 - grpc.gemspec | 2 - include/grpc/impl/codegen/gpr_slice.h | 84 ---------------------- include/grpc/impl/codegen/slice.h | 20 ------ package.xml | 2 - src/core/lib/support/string.h | 2 + src/core/lib/support/tmpfile.h | 2 + test/core/surface/public_headers_must_be_c89.c | 1 - tools/doxygen/Doxyfile.c++ | 1 - tools/doxygen/Doxyfile.c++.internal | 1 - tools/doxygen/Doxyfile.core | 2 - tools/doxygen/Doxyfile.core.internal | 2 - tools/run_tests/sources_and_headers.json | 2 - vsprojects/vcxproj/gpr/gpr.vcxproj | 1 - vsprojects/vcxproj/gpr/gpr.vcxproj.filters | 3 - vsprojects/vcxproj/grpc++/grpc++.vcxproj | 1 - vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 3 - .../grpc++_test_util/grpc++_test_util.vcxproj | 1 - .../grpc++_test_util.vcxproj.filters | 3 - .../grpc++_unsecure/grpc++_unsecure.vcxproj | 1 - .../grpc++_unsecure.vcxproj.filters | 3 - vsprojects/vcxproj/grpc/grpc.vcxproj | 1 - vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 - .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 1 - .../grpc_test_util/grpc_test_util.vcxproj.filters | 3 - .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 1 - .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 3 - .../codegen_test_full/codegen_test_full.vcxproj | 1 - .../codegen_test_full.vcxproj.filters | 3 - .../codegen_test_minimal.vcxproj | 1 - .../codegen_test_minimal.vcxproj.filters | 3 - .../test/grpc_tool_test/grpc_tool_test.vcxproj | 1 - .../grpc_tool_test/grpc_tool_test.vcxproj.filters | 3 - 37 files changed, 4 insertions(+), 185 deletions(-) delete mode 100644 include/grpc/impl/codegen/gpr_slice.h (limited to 'src/core') diff --git a/BUILD b/BUILD index fb81cf65fc..ab0fc237b7 100644 --- a/BUILD +++ b/BUILD @@ -135,7 +135,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -565,7 +564,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -962,7 +960,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1344,7 +1341,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1500,7 +1496,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1963,7 +1958,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -2140,7 +2134,6 @@ cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -2303,7 +2296,6 @@ objc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -2570,7 +2562,6 @@ objc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 16e5d62de2..ff0927504a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -258,7 +258,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -538,7 +537,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -790,7 +788,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1042,7 +1039,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1206,7 +1202,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1540,7 +1535,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h @@ -1747,7 +1741,6 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/slice.h diff --git a/Makefile b/Makefile index 3a228b4414..98c540bfd3 100644 --- a/Makefile +++ b/Makefile @@ -2552,7 +2552,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -2860,7 +2859,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3131,7 +3129,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3348,7 +3345,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3639,7 +3635,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3884,7 +3879,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -4247,7 +4241,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -4603,7 +4596,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -4782,7 +4774,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/build.yaml b/build.yaml index 2555abce0c..de9d253ef1 100644 --- a/build.yaml +++ b/build.yaml @@ -144,7 +144,6 @@ filegroups: - include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_windows.h - - include/grpc/impl/codegen/gpr_slice.h - include/grpc/impl/codegen/gpr_types.h - include/grpc/impl/codegen/port_platform.h - include/grpc/impl/codegen/slice.h diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index f9e0164bdc..04f7211d21 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -146,7 +146,6 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_windows.h', - 'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/slice.h', @@ -173,7 +172,6 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_windows.h', - 'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/slice.h', diff --git a/grpc.gemspec b/grpc.gemspec index 9c9568ce64..6019b97f67 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -73,7 +73,6 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h ) - s.files += %w( include/grpc/impl/codegen/gpr_slice.h ) s.files += %w( include/grpc/impl/codegen/gpr_types.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/slice.h ) @@ -156,7 +155,6 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h ) - s.files += %w( include/grpc/impl/codegen/gpr_slice.h ) s.files += %w( include/grpc/impl/codegen/gpr_types.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/slice.h ) diff --git a/include/grpc/impl/codegen/gpr_slice.h b/include/grpc/impl/codegen/gpr_slice.h deleted file mode 100644 index c62e976b8f..0000000000 --- a/include/grpc/impl/codegen/gpr_slice.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * - * 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. - * - */ -#ifndef GRPC_IMPL_CODEGEN_GPR_SLICE_H -#define GRPC_IMPL_CODEGEN_GPR_SLICE_H - -/* WARNING: Please do not use this header. This was added as a temporary measure - * to not break some of the external projects that depend on gpr_slice_* - * functions. We are actively working on moving all the gpr_slice_* references - * to grpc_slice_* and this file will be removed - * */ - -/* TODO (sreek) - Allowed by default but will be very soon turned off */ -#define GRPC_ALLOW_GPR_SLICE_FUNCTIONS 1 - -#ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS - -#define gpr_slice_refcount grpc_slice_refcount -#define gpr_slice grpc_slice -#define gpr_slice_buffer grpc_slice_buffer - -#define gpr_slice_ref grpc_slice_ref -#define gpr_slice_unref grpc_slice_unref -#define gpr_slice_new grpc_slice_new -#define gpr_slice_new_with_user_data grpc_slice_new_with_user_data -#define gpr_slice_new_with_len grpc_slice_new_with_len -#define gpr_slice_malloc grpc_slice_malloc -#define gpr_slice_from_copied_string grpc_slice_from_copied_string -#define gpr_slice_from_copied_buffer grpc_slice_from_copied_buffer -#define gpr_slice_from_static_string grpc_slice_from_static_string -#define gpr_slice_sub grpc_slice_sub -#define gpr_slice_sub_no_ref grpc_slice_sub_no_ref -#define gpr_slice_split_tail grpc_slice_split_tail -#define gpr_slice_split_head grpc_slice_split_head -#define gpr_slice_cmp grpc_slice_cmp -#define gpr_slice_str_cmp grpc_slice_str_cmp - -#define gpr_slice_buffer grpc_slice_buffer -#define gpr_slice_buffer_init grpc_slice_buffer_init -#define gpr_slice_buffer_destroy grpc_slice_buffer_destroy -#define gpr_slice_buffer_add grpc_slice_buffer_add -#define gpr_slice_buffer_add_indexed grpc_slice_buffer_add_indexed -#define gpr_slice_buffer_addn grpc_slice_buffer_addn -#define gpr_slice_buffer_tiny_add grpc_slice_buffer_tiny_add -#define gpr_slice_buffer_pop grpc_slice_buffer_pop -#define gpr_slice_buffer_reset_and_unref grpc_slice_buffer_reset_and_unref -#define gpr_slice_buffer_swap grpc_slice_buffer_swap -#define gpr_slice_buffer_move_into grpc_slice_buffer_move_into -#define gpr_slice_buffer_trim_end grpc_slice_buffer_trim_end -#define gpr_slice_buffer_move_first grpc_slice_buffer_move_first -#define gpr_slice_buffer_take_first grpc_slice_buffer_take_first - -#endif /* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */ - -#endif /* GRPC_IMPL_CODEGEN_GPR_SLICE_H */ diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index 50b5426e1a..774ba0e95d 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -37,8 +37,6 @@ #include #include -#include - /* Slice API A slice represents a contiguous reference counted array of bytes. @@ -117,22 +115,4 @@ typedef struct { GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice) #define GRPC_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0) -#ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS - -/* Duplicate GPR_* definitions */ -#define GPR_SLICE_START_PTR(slice) \ - ((slice).refcount ? (slice).data.refcounted.bytes \ - : (slice).data.inlined.bytes) -#define GPR_SLICE_LENGTH(slice) \ - ((slice).refcount ? (slice).data.refcounted.length \ - : (slice).data.inlined.length) -#define GPR_SLICE_SET_LENGTH(slice, newlen) \ - ((slice).refcount ? ((slice).data.refcounted.length = (size_t)(newlen)) \ - : ((slice).data.inlined.length = (uint8_t)(newlen))) -#define GPR_SLICE_END_PTR(slice) \ - GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice) -#define GPR_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0) - -#endif /* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */ - #endif /* GRPC_IMPL_CODEGEN_SLICE_H */ diff --git a/package.xml b/package.xml index 2106b8f666..61668815a6 100644 --- a/package.xml +++ b/package.xml @@ -81,7 +81,6 @@ - @@ -164,7 +163,6 @@ - diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index db59308425..e933e2eb46 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -36,6 +36,8 @@ #include +#include +#include #include #ifdef __cplusplus diff --git a/src/core/lib/support/tmpfile.h b/src/core/lib/support/tmpfile.h index f613cf9bc8..8952e5ec3d 100644 --- a/src/core/lib/support/tmpfile.h +++ b/src/core/lib/support/tmpfile.h @@ -36,6 +36,8 @@ #include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index df6b733493..d4cfa25d44 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 9e3fc62ebc..ff3a0e381d 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -840,7 +840,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 074ba504fa..04e8f4e7f2 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -840,7 +840,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index b83e710a2b..1e748ba4a8 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -779,7 +779,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -819,7 +818,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 533999b765..6572bd4ddf 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -779,7 +779,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -1213,7 +1212,6 @@ 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_windows.h \ -include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 9dd5a1c85f..c3c24e5b6a 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6633,7 +6633,6 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -6650,7 +6649,6 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj b/vsprojects/vcxproj/gpr/gpr.vcxproj index c4f9c55308..ce593473c0 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj @@ -177,7 +177,6 @@ - diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters index 77a1ba64d6..a50a9f4200 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters @@ -225,9 +225,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 14b3453b74..f281db72b6 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -338,7 +338,6 @@ - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 5360819649..f359e4ef31 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -354,9 +354,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj index 6a928e173f..d2305b2e25 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj @@ -185,7 +185,6 @@ - diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters index bf8fab03bb..d1aaba7092 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters @@ -147,9 +147,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 39b01e6a4e..1511a2cfe4 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -338,7 +338,6 @@ - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 9cafa1670a..bed77b25a4 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -339,9 +339,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 40f0f141b5..558b5b0c66 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -286,7 +286,6 @@ - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index c0de28563e..a40a1b5f1c 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -705,9 +705,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 01b73ce1a2..2acdd32cf3 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -166,7 +166,6 @@ - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 40ff67671f..6c918f1254 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -456,9 +456,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 49c2d2db30..661192101c 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -277,7 +277,6 @@ - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 5bca4fb9a5..466116e604 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -621,9 +621,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj index 377d86fa5a..a2b2a1dfa0 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj @@ -198,7 +198,6 @@ - diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters index e9ba002e9b..94b6c2530e 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters @@ -135,9 +135,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj index 3254ad8d45..1a3c157983 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj @@ -198,7 +198,6 @@ - diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters index 6f32f65524..1f4b60ca4d 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters @@ -138,9 +138,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj index 7fad922233..1e3cc3ca04 100644 --- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj +++ b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj @@ -199,7 +199,6 @@ - diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters index 19cb113341..1c308c5881 100644 --- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters @@ -129,9 +129,6 @@ include\grpc\impl\codegen - - include\grpc\impl\codegen - include\grpc\impl\codegen -- cgit v1.2.3 From f75d26925f3371b44b774b15165d79484f3f12e1 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 12 Dec 2016 08:41:42 -0800 Subject: Fix grpclb code. --- src/core/ext/lb_policy/grpclb/grpclb.c | 8 ++++++- .../chttp2/client/insecure/channel_create.c | 26 +++++++++++++--------- .../chttp2/client/secure/secure_channel_create.c | 24 ++++++++++++-------- 3 files changed, 37 insertions(+), 21 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index df0db61c22..da1cf65060 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -818,9 +818,15 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, * We need the LB channel to return addresses with is_balancer=false * so that it does not wind up recursively using the grpclb LB policy, * as per the special case logic in client_channel.c. + * + * Finally, we also strip out the channel arg for the server URI, + * since that will be different for the LB channel than for the parent + * channel. (The client channel factory will re-add this arg with + * the right value.) */ static const char *keys_to_remove[] = {GRPC_ARG_LB_POLICY_NAME, - GRPC_ARG_LB_ADDRESSES}; + GRPC_ARG_LB_ADDRESSES, + GRPC_ARG_SERVER_URI}; grpc_channel_args *new_args = grpc_channel_args_copy_and_remove( args->args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove)); glb_policy->lb_channel = grpc_client_channel_factory_create_channel( diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 1e1bed10dc..90d3503959 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -65,7 +65,16 @@ static grpc_channel *client_channel_factory_create_channel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const char *target, grpc_client_channel_type type, const grpc_channel_args *args) { - return grpc_channel_create(exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); + // Add channel arg containing the server URI. + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = GRPC_ARG_SERVER_URI; + arg.value.string = (char *)target; + grpc_channel_args *new_args = grpc_channel_args_copy_and_add(args, &arg, 1); + grpc_channel *channel = grpc_channel_create(exec_ctx, target, new_args, + GRPC_CLIENT_CHANNEL, NULL); + grpc_channel_args_destroy(new_args); + return channel; } static const grpc_client_channel_factory_vtable client_channel_factory_vtable = @@ -90,19 +99,14 @@ grpc_channel *grpc_insecure_channel_create(const char *target, GPR_ASSERT(reserved == NULL); grpc_client_channel_factory *factory = (grpc_client_channel_factory *)&client_channel_factory; - // Add channel args containing the server name and client channel factory. - grpc_arg new_args[2]; - new_args[0].type = GRPC_ARG_STRING; - new_args[0].key = GRPC_ARG_SERVER_URI; - new_args[0].value.string = (char *)target; - new_args[1] = grpc_client_channel_factory_create_channel_arg(factory); - grpc_channel_args *args_copy = - grpc_channel_args_copy_and_add(args, new_args, GPR_ARRAY_SIZE(new_args)); + // Add channel arg containing the client channel factory. + grpc_arg arg = grpc_client_channel_factory_create_channel_arg(factory); + grpc_channel_args *new_args = grpc_channel_args_copy_and_add(args, &arg, 1); // Create channel. grpc_channel *channel = client_channel_factory_create_channel( - &exec_ctx, factory, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, args_copy); + &exec_ctx, factory, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, new_args); // Clean up. - grpc_channel_args_destroy(args_copy); + grpc_channel_args_destroy(new_args); grpc_client_channel_factory_unref(&exec_ctx, factory); grpc_exec_ctx_finish(&exec_ctx); return channel != NULL ? channel : grpc_lame_client_channel_create( diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 2474f544cf..9b6d3819b6 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -89,7 +89,16 @@ static grpc_channel *client_channel_factory_create_channel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const char *target, grpc_client_channel_type type, const grpc_channel_args *args) { - return grpc_channel_create(exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); + // Add channel arg containing the server URI. + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = GRPC_ARG_SERVER_URI; + arg.value.string = (char *)target; + grpc_channel_args *new_args = grpc_channel_args_copy_and_add(args, &arg, 1); + grpc_channel *channel = grpc_channel_create(exec_ctx, target, new_args, + GRPC_CLIENT_CHANNEL, NULL); + grpc_channel_args_destroy(new_args); + return channel; } static const grpc_client_channel_factory_vtable client_channel_factory_vtable = @@ -137,14 +146,11 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, GRPC_SECURITY_CONNECTOR_REF(&security_connector->base, "grpc_secure_channel_create"); f->security_connector = security_connector; - // Add channel args containing the server name, client channel - // factory, and security connector. - grpc_arg new_args[3]; - new_args[0].type = GRPC_ARG_STRING; - new_args[0].key = GRPC_ARG_SERVER_URI; - new_args[0].value.string = (char *)target; - new_args[1] = grpc_client_channel_factory_create_channel_arg(&f->base); - new_args[2] = grpc_security_connector_to_arg(&security_connector->base); + // Add channel args containing the client channel factory and security + // connector. + grpc_arg new_args[2]; + new_args[0] = grpc_client_channel_factory_create_channel_arg(&f->base); + new_args[1] = grpc_security_connector_to_arg(&security_connector->base); grpc_channel_args *args_copy = grpc_channel_args_copy_and_add( new_args_from_connector != NULL ? new_args_from_connector : args, new_args, GPR_ARRAY_SIZE(new_args)); -- cgit v1.2.3 From 201db7d613e73d3324d541d0e87a860dd656ca9f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 12 Dec 2016 09:36:02 -0800 Subject: Eliminate redundant places where server name was stored. --- include/grpc/impl/codegen/grpc_types.h | 2 -- .../ext/client_channel/http_connect_handshaker.c | 30 ++++++++++++-------- .../ext/client_channel/http_connect_handshaker.h | 5 ++-- src/core/ext/client_channel/resolver_registry.c | 32 ++++++++++++++++------ src/core/ext/client_channel/resolver_registry.h | 4 +++ src/core/ext/client_channel/subchannel.h | 2 -- src/core/ext/client_channel/subchannel_index.c | 4 --- src/core/ext/lb_policy/grpclb/grpclb.c | 26 +++++++++--------- src/core/ext/lb_policy/pick_first/pick_first.c | 12 ++------ src/core/ext/lb_policy/round_robin/round_robin.c | 12 ++------ src/core/ext/resolver/dns/native/dns_resolver.c | 7 +---- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 7 +---- .../ext/transport/chttp2/client/chttp2_connector.c | 11 ++------ .../ext/transport/chttp2/client/chttp2_connector.h | 3 +- .../chttp2/client/insecure/channel_create.c | 3 +- .../chttp2/client/secure/secure_channel_create.c | 2 +- test/core/end2end/fake_resolver.c | 7 +---- 17 files changed, 74 insertions(+), 95 deletions(-) (limited to 'src/core') diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index c86f7ecd7d..f2ee5af78c 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -215,8 +215,6 @@ typedef struct { #define GRPC_ARG_LB_POLICY_NAME "grpc.lb_policy_name" /** Server URI. Not intended for external use. */ #define GRPC_ARG_SERVER_URI "grpc.server_uri" -/** Server name. Not intended for external use. */ -#define GRPC_ARG_SERVER_NAME "grpc.server_name" /** Resolved addresses in a form used by the LB policy. Not intended for external use. */ #define GRPC_ARG_LB_ADDRESSES "grpc.lb_addresses" diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 572af52dfd..6dc68eaaea 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -40,6 +40,7 @@ #include #include +#include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/ext/client_channel/uri_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/http/format_request.h" @@ -51,7 +52,6 @@ typedef struct http_connect_handshaker { grpc_handshaker base; char* proxy_server; - char* server_name; gpr_refcount refcount; gpr_mu mu; @@ -86,7 +86,6 @@ static void http_connect_handshaker_unref(grpc_exec_ctx* exec_ctx, gpr_free(handshaker->read_buffer_to_destroy); } gpr_free(handshaker->proxy_server); - gpr_free(handshaker->server_name); grpc_slice_buffer_destroy(&handshaker->write_buffer); grpc_http_parser_destroy(&handshaker->http_parser); grpc_http_response_destroy(&handshaker->http_response); @@ -265,18 +264,27 @@ static void http_connect_handshaker_do_handshake( grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, grpc_handshaker_args* args) { http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; - gpr_mu_lock(&handshaker->mu); + // Get server name from channel args. + const grpc_arg* arg = grpc_channel_args_find(args->args, GRPC_ARG_SERVER_URI); + GPR_ASSERT(arg != NULL); + GPR_ASSERT(arg->type == GRPC_ARG_STRING); + char *canonical_uri = + grpc_resolver_factory_add_default_prefix_if_needed(arg->value.string); + grpc_uri* uri = grpc_uri_parse(canonical_uri, 1); + char* server_name = uri->path; + if (server_name[0] == '/') ++server_name; // Save state in the handshaker object. + gpr_mu_lock(&handshaker->mu); handshaker->args = args; handshaker->on_handshake_done = on_handshake_done; // Send HTTP CONNECT request. - gpr_log(GPR_INFO, "Connecting to server %s via HTTP proxy %s", - handshaker->server_name, handshaker->proxy_server); + gpr_log(GPR_INFO, "Connecting to server %s via HTTP proxy %s", server_name, + handshaker->proxy_server); grpc_httpcli_request request; memset(&request, 0, sizeof(request)); - request.host = handshaker->proxy_server; + request.host = server_name; request.http.method = "CONNECT"; - request.http.path = handshaker->server_name; + request.http.path = server_name; request.handshaker = &grpc_httpcli_plaintext; grpc_slice request_slice = grpc_httpcli_format_connect_request(&request); grpc_slice_buffer_add(&handshaker->write_buffer, request_slice); @@ -285,23 +293,23 @@ static void http_connect_handshaker_do_handshake( grpc_endpoint_write(exec_ctx, args->endpoint, &handshaker->write_buffer, &handshaker->request_done_closure); gpr_mu_unlock(&handshaker->mu); + // Clean up. + gpr_free(canonical_uri); + grpc_uri_destroy(uri); } static const grpc_handshaker_vtable http_connect_handshaker_vtable = { http_connect_handshaker_destroy, http_connect_handshaker_shutdown, http_connect_handshaker_do_handshake}; -grpc_handshaker* grpc_http_connect_handshaker_create(const char* proxy_server, - const char* server_name) { +grpc_handshaker* grpc_http_connect_handshaker_create(const char* proxy_server) { GPR_ASSERT(proxy_server != NULL); - GPR_ASSERT(server_name != NULL); http_connect_handshaker* handshaker = gpr_malloc(sizeof(*handshaker)); memset(handshaker, 0, sizeof(*handshaker)); grpc_handshaker_init(&http_connect_handshaker_vtable, &handshaker->base); gpr_mu_init(&handshaker->mu); gpr_ref_init(&handshaker->refcount, 1); handshaker->proxy_server = gpr_strdup(proxy_server); - handshaker->server_name = gpr_strdup(server_name); grpc_slice_buffer_init(&handshaker->write_buffer); grpc_closure_init(&handshaker->request_done_closure, on_write_done, handshaker); diff --git a/src/core/ext/client_channel/http_connect_handshaker.h b/src/core/ext/client_channel/http_connect_handshaker.h index c689df2b2b..ea293852e6 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.h +++ b/src/core/ext/client_channel/http_connect_handshaker.h @@ -36,9 +36,8 @@ #include "src/core/lib/channel/handshaker.h" -/// Does NOT take ownership of \a proxy_server or \a server_name. -grpc_handshaker* grpc_http_connect_handshaker_create(const char* proxy_server, - const char* server_name); +/// Does NOT take ownership of \a proxy_server. +grpc_handshaker* grpc_http_connect_handshaker_create(const char* proxy_server); /// Returns the name of the proxy to use, or NULL if no proxy is configured. /// Caller takes ownership of result. diff --git a/src/core/ext/client_channel/resolver_registry.c b/src/core/ext/client_channel/resolver_registry.c index d0f0fc3f33..2b62b976a9 100644 --- a/src/core/ext/client_channel/resolver_registry.c +++ b/src/core/ext/client_channel/resolver_registry.c @@ -109,8 +109,8 @@ static grpc_resolver_factory *lookup_factory_by_uri(grpc_uri *uri) { } static grpc_resolver_factory *resolve_factory(const char *target, - grpc_uri **uri) { - char *tmp; + grpc_uri **uri, + char **canonical_target) { grpc_resolver_factory *factory = NULL; GPR_ASSERT(uri != NULL); @@ -118,15 +118,15 @@ static grpc_resolver_factory *resolve_factory(const char *target, factory = lookup_factory_by_uri(*uri); if (factory == NULL) { grpc_uri_destroy(*uri); - gpr_asprintf(&tmp, "%s%s", g_default_resolver_prefix, target); - *uri = grpc_uri_parse(tmp, 1); + gpr_asprintf(canonical_target, "%s%s", g_default_resolver_prefix, target); + *uri = grpc_uri_parse(*canonical_target, 1); factory = lookup_factory_by_uri(*uri); if (factory == NULL) { grpc_uri_destroy(grpc_uri_parse(target, 0)); - grpc_uri_destroy(grpc_uri_parse(tmp, 0)); - gpr_log(GPR_ERROR, "don't know how to resolve '%s' or '%s'", target, tmp); + grpc_uri_destroy(grpc_uri_parse(*canonical_target, 0)); + gpr_log(GPR_ERROR, "don't know how to resolve '%s' or '%s'", target, + *canonical_target); } - gpr_free(tmp); } return factory; } @@ -134,7 +134,9 @@ static grpc_resolver_factory *resolve_factory(const char *target, grpc_resolver *grpc_resolver_create(const char *target, const grpc_channel_args *args) { grpc_uri *uri = NULL; - grpc_resolver_factory *factory = resolve_factory(target, &uri); + char *canonical_target = NULL; + grpc_resolver_factory *factory = + resolve_factory(target, &uri, &canonical_target); grpc_resolver *resolver; grpc_resolver_args resolver_args; memset(&resolver_args, 0, sizeof(resolver_args)); @@ -142,13 +144,25 @@ grpc_resolver *grpc_resolver_create(const char *target, resolver_args.args = args; resolver = grpc_resolver_factory_create_resolver(factory, &resolver_args); grpc_uri_destroy(uri); + gpr_free(canonical_target); return resolver; } char *grpc_get_default_authority(const char *target) { grpc_uri *uri = NULL; - grpc_resolver_factory *factory = resolve_factory(target, &uri); + char *canonical_target = NULL; + grpc_resolver_factory *factory = + resolve_factory(target, &uri, &canonical_target); char *authority = grpc_resolver_factory_get_default_authority(factory, uri); grpc_uri_destroy(uri); + gpr_free(canonical_target); return authority; } + +char *grpc_resolver_factory_add_default_prefix_if_needed(const char *target) { + grpc_uri *uri = NULL; + char *canonical_target = NULL; + resolve_factory(target, &uri, &canonical_target); + grpc_uri_destroy(uri); + return canonical_target == NULL ? gpr_strdup(target) : canonical_target; +} diff --git a/src/core/ext/client_channel/resolver_registry.h b/src/core/ext/client_channel/resolver_registry.h index 2a95a669f0..24678bc05f 100644 --- a/src/core/ext/client_channel/resolver_registry.h +++ b/src/core/ext/client_channel/resolver_registry.h @@ -71,4 +71,8 @@ grpc_resolver_factory *grpc_resolver_factory_lookup(const char *name); representing the default authority to pass from a client. */ char *grpc_get_default_authority(const char *target); +/** Returns a newly allocated string containing \a target, adding the + default prefix if needed. */ +char *grpc_resolver_factory_add_default_prefix_if_needed(const char *target); + #endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_REGISTRY_H */ diff --git a/src/core/ext/client_channel/subchannel.h b/src/core/ext/client_channel/subchannel.h index 10bae620df..24aa9f73dc 100644 --- a/src/core/ext/client_channel/subchannel.h +++ b/src/core/ext/client_channel/subchannel.h @@ -164,8 +164,6 @@ struct grpc_subchannel_args { size_t filter_count; /** Channel arguments to be supplied to the newly created channel */ const grpc_channel_args *args; - /** Server name */ - const char *server_name; /** Address to connect to */ grpc_resolved_address *addr; }; diff --git a/src/core/ext/client_channel/subchannel_index.c b/src/core/ext/client_channel/subchannel_index.c index 227013a7d7..a1ba5e945c 100644 --- a/src/core/ext/client_channel/subchannel_index.c +++ b/src/core/ext/client_channel/subchannel_index.c @@ -86,7 +86,6 @@ static grpc_subchannel_key *create_key( } else { k->args.filters = NULL; } - k->args.server_name = gpr_strdup(args->server_name); k->args.addr = gpr_malloc(sizeof(grpc_resolved_address)); k->args.addr->len = args->addr->len; if (k->args.addr->len > 0) { @@ -113,8 +112,6 @@ static int subchannel_key_compare(grpc_subchannel_key *a, if (c != 0) return c; c = GPR_ICMP(a->args.filter_count, b->args.filter_count); if (c != 0) return c; - c = strcmp(a->args.server_name, b->args.server_name); - if (c != 0) return c; if (a->args.addr->len) { c = memcmp(a->args.addr->addr, b->args.addr->addr, a->args.addr->len); if (c != 0) return c; @@ -132,7 +129,6 @@ void grpc_subchannel_key_destroy(grpc_exec_ctx *exec_ctx, grpc_connector_unref(exec_ctx, k->connector); gpr_free((grpc_channel_args *)k->args.filters); grpc_channel_args_destroy((grpc_channel_args *)k->args.args); - gpr_free((void *)k->args.server_name); gpr_free(k->args.addr); gpr_free(k); } diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index da1cf65060..b7c06a55bb 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -743,12 +743,6 @@ static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, grpc_lb_policy_factory *factory, grpc_lb_policy_args *args) { - /* Get server name. */ - const grpc_arg *arg = - grpc_channel_args_find(args->args, GRPC_ARG_SERVER_NAME); - const char *server_name = - arg != NULL && arg->type == GRPC_ARG_STRING ? arg->value.string : NULL; - /* Count the number of gRPC-LB addresses. There must be at least one. * TODO(roth): For now, we ignore non-balancer addresses, but in the * future, we may change the behavior such that we fall back to using @@ -756,7 +750,8 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, * time, this should be changed to allow a list with no balancer addresses, * since the resolver might fail to return a balancer address even when * this is the right LB policy to use. */ - arg = grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); + const grpc_arg *arg = + grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); GPR_ASSERT(arg != NULL && arg->type == GRPC_ARG_POINTER); grpc_lb_addresses *addresses = arg->value.pointer.p; size_t num_grpclb_addrs = 0; @@ -768,13 +763,19 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy = gpr_malloc(sizeof(*glb_policy)); memset(glb_policy, 0, sizeof(*glb_policy)); + /* Get server name. */ + arg = grpc_channel_args_find(args->args, GRPC_ARG_SERVER_URI); + GPR_ASSERT(arg != NULL); + GPR_ASSERT(arg->type == GRPC_ARG_STRING); + grpc_uri *uri = grpc_uri_parse(arg->value.string, 1); + glb_policy->server_name = gpr_strdup(uri->path); + grpc_uri_destroy(uri); + /* All input addresses in addresses come from a resolver that claims * they are LB services. It's the resolver's responsibility to make sure - * this - * policy is only instantiated and used in that case. + * this policy is only instantiated and used in that case. * * Create a client channel over them to communicate with a LB service */ - glb_policy->server_name = gpr_strdup(server_name); glb_policy->cc_factory = args->client_channel_factory; glb_policy->args = grpc_channel_args_copy(args->args); GPR_ASSERT(glb_policy->cc_factory != NULL); @@ -824,9 +825,8 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, * channel. (The client channel factory will re-add this arg with * the right value.) */ - static const char *keys_to_remove[] = {GRPC_ARG_LB_POLICY_NAME, - GRPC_ARG_LB_ADDRESSES, - GRPC_ARG_SERVER_URI}; + static const char *keys_to_remove[] = { + GRPC_ARG_LB_POLICY_NAME, GRPC_ARG_LB_ADDRESSES, GRPC_ARG_SERVER_URI}; grpc_channel_args *new_args = grpc_channel_args_copy_and_remove( args->args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove)); glb_policy->lb_channel = grpc_client_channel_factory_create_channel( diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index c69f773e78..b9cfe6b5c0 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -438,15 +438,10 @@ static grpc_lb_policy *create_pick_first(grpc_exec_ctx *exec_ctx, grpc_lb_policy_args *args) { GPR_ASSERT(args->client_channel_factory != NULL); - /* Get server name. */ - const grpc_arg *arg = - grpc_channel_args_find(args->args, GRPC_ARG_SERVER_NAME); - const char *server_name = - arg != NULL && arg->type == GRPC_ARG_STRING ? arg->value.string : NULL; - /* Find the number of backend addresses. We ignore balancer * addresses, since we don't know how to handle them. */ - arg = grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); + const grpc_arg *arg = + grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); GPR_ASSERT(arg != NULL && arg->type == GRPC_ARG_POINTER); grpc_lb_addresses *addresses = arg->value.pointer.p; size_t num_addrs = 0; @@ -472,9 +467,6 @@ static grpc_lb_policy *create_pick_first(grpc_exec_ctx *exec_ctx, } memset(&sc_args, 0, sizeof(grpc_subchannel_args)); - /* server_name will be copied as part of the subchannel creation. This makes - * the copying of server_name (a borrowed pointer) OK. */ - sc_args.server_name = server_name; sc_args.addr = &addresses->addresses[i].address; sc_args.args = args->args; diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 59f84054c4..f0305473d2 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -703,15 +703,10 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, grpc_lb_policy_args *args) { GPR_ASSERT(args->client_channel_factory != NULL); - /* Get server name. */ - const grpc_arg *arg = - grpc_channel_args_find(args->args, GRPC_ARG_SERVER_NAME); - const char *server_name = - arg != NULL && arg->type == GRPC_ARG_STRING ? arg->value.string : NULL; - /* Find the number of backend addresses. We ignore balancer * addresses, since we don't know how to handle them. */ - arg = grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); + const grpc_arg *arg = + grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); GPR_ASSERT(arg != NULL && arg->type == GRPC_ARG_POINTER); grpc_lb_addresses *addresses = arg->value.pointer.p; size_t num_addrs = 0; @@ -734,9 +729,6 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, if (addresses->addresses[i].is_balancer) continue; memset(&sc_args, 0, sizeof(grpc_subchannel_args)); - /* server_name will be copied as part of the subchannel creation. This makes - * the copying of server_name (a borrowed pointer) OK. */ - sc_args.server_name = server_name; sc_args.addr = &addresses->addresses[i].address; sc_args.args = args->args; diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index 15476f5792..a7392e14ad 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -264,12 +264,7 @@ static grpc_resolver *dns_create(grpc_resolver_args *args, grpc_resolver_init(&r->base, &dns_resolver_vtable); r->name_to_resolve = proxy_name == NULL ? gpr_strdup(path) : proxy_name; r->default_port = gpr_strdup(default_port); - grpc_arg server_name_arg; - server_name_arg.type = GRPC_ARG_STRING; - server_name_arg.key = GRPC_ARG_SERVER_NAME; - server_name_arg.value.string = (char *)path; - r->channel_args = - grpc_channel_args_copy_and_add(args->args, &server_name_arg, 1); + r->channel_args = grpc_channel_args_copy(args->args); gpr_backoff_init(&r->backoff_state, GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS, GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER, GRPC_DNS_RECONNECT_JITTER, diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 26a650aadd..0a9b1aa49a 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -198,12 +198,7 @@ static grpc_resolver *sockaddr_create(grpc_resolver_args *args, sockaddr_resolver *r = gpr_malloc(sizeof(sockaddr_resolver)); memset(r, 0, sizeof(*r)); r->addresses = addresses; - grpc_arg server_name_arg; - server_name_arg.type = GRPC_ARG_STRING; - server_name_arg.key = GRPC_ARG_SERVER_NAME; - server_name_arg.value.string = args->uri->path; - r->channel_args = - grpc_channel_args_copy_and_add(args->args, &server_name_arg, 1); + r->channel_args = grpc_channel_args_copy(args->args); gpr_mu_init(&r->mu); grpc_resolver_init(&r->base, &sockaddr_resolver_vtable); return &r->base; diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.c b/src/core/ext/transport/chttp2/client/chttp2_connector.c index 58a6877b9b..114bb07222 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.c +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.c @@ -58,7 +58,6 @@ typedef struct { bool shutdown; bool connecting; - char *server_name; grpc_chttp2_add_handshakers_func add_handshakers; void *add_handshakers_user_data; @@ -89,7 +88,6 @@ static void chttp2_connector_unref(grpc_exec_ctx *exec_ctx, // If handshaking is not yet in progress, destroy the endpoint. // Otherwise, the handshaker will do this for us. if (c->endpoint != NULL) grpc_endpoint_destroy(exec_ctx, c->endpoint); - gpr_free(c->server_name); gpr_free(c); } } @@ -155,9 +153,8 @@ static void start_handshake_locked(grpc_exec_ctx *exec_ctx, c->handshake_mgr = grpc_handshake_manager_create(); char *proxy_name = grpc_get_http_proxy_server(); if (proxy_name != NULL) { - grpc_handshake_manager_add( - c->handshake_mgr, - grpc_http_connect_handshaker_create(proxy_name, c->server_name)); + grpc_handshake_manager_add(c->handshake_mgr, + grpc_http_connect_handshaker_create(proxy_name)); gpr_free(proxy_name); } if (c->add_handshakers != NULL) { @@ -254,15 +251,13 @@ static const grpc_connector_vtable chttp2_connector_vtable = { chttp2_connector_connect}; grpc_connector *grpc_chttp2_connector_create( - grpc_exec_ctx *exec_ctx, const char *server_name, - grpc_chttp2_add_handshakers_func add_handshakers, + grpc_exec_ctx *exec_ctx, grpc_chttp2_add_handshakers_func add_handshakers, void *add_handshakers_user_data) { chttp2_connector *c = gpr_malloc(sizeof(*c)); memset(c, 0, sizeof(*c)); c->base.vtable = &chttp2_connector_vtable; gpr_mu_init(&c->mu); gpr_ref_init(&c->refs, 1); - c->server_name = gpr_strdup(server_name); c->add_handshakers = add_handshakers; c->add_handshakers_user_data = add_handshakers_user_data; return &c->base; diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.h b/src/core/ext/transport/chttp2/client/chttp2_connector.h index c57fb1a9a0..58eba22417 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.h +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.h @@ -45,8 +45,7 @@ typedef void (*grpc_chttp2_add_handshakers_func)( /// If \a add_handshakers is non-NULL, it will be called with /// \a add_handshakers_user_data to add handshakers. grpc_connector* grpc_chttp2_connector_create( - grpc_exec_ctx* exec_ctx, const char* server_name, - grpc_chttp2_add_handshakers_func add_handshakers, + grpc_exec_ctx* exec_ctx, grpc_chttp2_add_handshakers_func add_handshakers, void* add_handshakers_user_data); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H */ diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 90d3503959..a0d0652ce7 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -54,8 +54,7 @@ static grpc_subchannel *client_channel_factory_create_subchannel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const grpc_subchannel_args *args) { grpc_connector *connector = grpc_chttp2_connector_create( - exec_ctx, args->server_name, NULL /* add_handshakers */, - NULL /* user_data */); + exec_ctx, NULL /* add_handshakers */, NULL /* user_data */); grpc_subchannel *s = grpc_subchannel_create(exec_ctx, connector, args); grpc_connector_unref(exec_ctx, connector); return s; diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 9b6d3819b6..f35439cd44 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -79,7 +79,7 @@ static grpc_subchannel *client_channel_factory_create_subchannel( const grpc_subchannel_args *args) { client_channel_factory *f = (client_channel_factory *)cc_factory; grpc_connector *connector = grpc_chttp2_connector_create( - exec_ctx, args->server_name, add_handshakers, f->security_connector); + exec_ctx, add_handshakers, f->security_connector); grpc_subchannel *s = grpc_subchannel_create(exec_ctx, connector, args); grpc_connector_unref(exec_ctx, connector); return s; diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c index 865b55de4d..7380dccd80 100644 --- a/test/core/end2end/fake_resolver.c +++ b/test/core/end2end/fake_resolver.c @@ -181,12 +181,7 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory, // Instantiate resolver. fake_resolver* r = gpr_malloc(sizeof(fake_resolver)); memset(r, 0, sizeof(*r)); - grpc_arg server_name_arg; - server_name_arg.type = GRPC_ARG_STRING; - server_name_arg.key = GRPC_ARG_SERVER_NAME; - server_name_arg.value.string = args->uri->path; - r->channel_args = - grpc_channel_args_copy_and_add(args->args, &server_name_arg, 1); + r->channel_args = grpc_channel_args_copy(args->args); r->addresses = addresses; gpr_mu_init(&r->mu); grpc_resolver_init(&r->base, &fake_resolver_vtable); -- cgit v1.2.3 From be5e3ca5057b93e7958c9bc757c5299b9debacee Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 12 Dec 2016 09:58:20 -0800 Subject: Move internal channel arg definitions out of public headers. --- include/grpc/impl/codegen/grpc_types.h | 12 ++---------- src/core/ext/client_channel/client_channel.h | 3 +++ src/core/ext/client_channel/client_channel_factory.h | 3 +++ src/core/ext/client_channel/http_connect_handshaker.c | 1 + src/core/ext/client_channel/lb_policy_factory.h | 3 +++ src/core/ext/lb_policy/grpclb/grpclb.c | 1 + 6 files changed, 13 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index f2ee5af78c..4471ccf745 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -206,22 +206,14 @@ typedef struct { /** If non-zero, allow the use of SO_REUSEPORT if it's available (default 1) */ #define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport" /** If non-zero, a pointer to a buffer pool (use grpc_resource_quota_arg_vtable - to fetch an appropriate pointer arg vtable */ + to fetch an appropriate pointer arg vtable) */ #define GRPC_ARG_RESOURCE_QUOTA "grpc.resource_quota" -/** Service config data, to be passed to subchannels. - Not intended for external use. */ +/** Service config data in JSON form. Not intended for use outside of tests. */ #define GRPC_ARG_SERVICE_CONFIG "grpc.service_config" /** LB policy name. */ #define GRPC_ARG_LB_POLICY_NAME "grpc.lb_policy_name" -/** Server URI. Not intended for external use. */ -#define GRPC_ARG_SERVER_URI "grpc.server_uri" -/** Resolved addresses in a form used by the LB policy. - Not intended for external use. */ -#define GRPC_ARG_LB_ADDRESSES "grpc.lb_addresses" /** The grpc_socket_mutator instance that set the socket options. A pointer. */ #define GRPC_ARG_SOCKET_MUTATOR "grpc.socket_mutator" -/** Client channel factory. Not intended for external use. */ -#define GRPC_ARG_CLIENT_CHANNEL_FACTORY "grpc.client_channel_factory" /** \} */ /** Result of a grpc call. If the caller satisfies the prerequisites of a diff --git a/src/core/ext/client_channel/client_channel.h b/src/core/ext/client_channel/client_channel.h index 9ba012865c..f02587d0c1 100644 --- a/src/core/ext/client_channel/client_channel.h +++ b/src/core/ext/client_channel/client_channel.h @@ -38,6 +38,9 @@ #include "src/core/ext/client_channel/resolver.h" #include "src/core/lib/channel/channel_stack.h" +// Channel arg key for server URI string. +#define GRPC_ARG_SERVER_URI "grpc.server_uri" + /* A client channel is a channel that begins disconnected, and can connect to some endpoint on demand. If that endpoint disconnects, it will be connected to again later. diff --git a/src/core/ext/client_channel/client_channel_factory.h b/src/core/ext/client_channel/client_channel_factory.h index e7ad918881..bf2764b537 100644 --- a/src/core/ext/client_channel/client_channel_factory.h +++ b/src/core/ext/client_channel/client_channel_factory.h @@ -39,6 +39,9 @@ #include "src/core/ext/client_channel/subchannel.h" #include "src/core/lib/channel/channel_stack.h" +// Channel arg key for client channel factory. +#define GRPC_ARG_CLIENT_CHANNEL_FACTORY "grpc.client_channel_factory" + typedef struct grpc_client_channel_factory grpc_client_channel_factory; typedef struct grpc_client_channel_factory_vtable grpc_client_channel_factory_vtable; diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 6dc68eaaea..cf10dfb3e9 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -40,6 +40,7 @@ #include #include +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/ext/client_channel/uri_parser.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/ext/client_channel/lb_policy_factory.h b/src/core/ext/client_channel/lb_policy_factory.h index e2b8080a32..79b3dee259 100644 --- a/src/core/ext/client_channel/lb_policy_factory.h +++ b/src/core/ext/client_channel/lb_policy_factory.h @@ -40,6 +40,9 @@ #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolve_address.h" +// Channel arg key for grpc_lb_addresses. +#define GRPC_ARG_LB_ADDRESSES "grpc.lb_addresses" + typedef struct grpc_lb_policy_factory grpc_lb_policy_factory; typedef struct grpc_lb_policy_factory_vtable grpc_lb_policy_factory_vtable; diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index b7c06a55bb..38eebdc758 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -106,6 +106,7 @@ #include #include +#include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/client_channel_factory.h" #include "src/core/ext/client_channel/lb_policy_factory.h" #include "src/core/ext/client_channel/lb_policy_registry.h" -- cgit v1.2.3 From aa1cd147291cb57665eccf2dc9baeaa39184f0ba Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 12 Dec 2016 10:24:59 -0800 Subject: Clean up C++ filter API. --- src/core/lib/channel/channel_stack.h | 7 ++++++ src/cpp/common/channel_filter.h | 40 ++++++++++++++-------------------- test/cpp/common/channel_filter_test.cc | 17 +++++++++++---- 3 files changed, 36 insertions(+), 28 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 5d064c5695..d9d3a85233 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -34,6 +34,13 @@ #ifndef GRPC_CORE_LIB_CHANNEL_CHANNEL_STACK_H #define GRPC_CORE_LIB_CHANNEL_CHANNEL_STACK_H +////////////////////////////////////////////////////////////////////////////// +// IMPORTANT NOTE: +// +// When you update this API, please make the corresponding changes to +// the C++ API in src/cpp/common/channel_filter.{h,cc} +////////////////////////////////////////////////////////////////////////////// + /* A channel filter defines how operations on a channel are implemented. Channel filters are chained together to create full channels, and if those chains are linear, then channel stacks provide a mechanism to minimize diff --git a/src/cpp/common/channel_filter.h b/src/cpp/common/channel_filter.h index 107522ea04..93efe0fc3b 100644 --- a/src/cpp/common/channel_filter.h +++ b/src/cpp/common/channel_filter.h @@ -217,14 +217,13 @@ class TransportStreamOp { class ChannelData { public: virtual ~ChannelData() { - if (peer_) gpr_free((void *)peer_); } /// Initializes the call data. - virtual grpc_error *Init() { return GRPC_ERROR_NONE; } - - /// Caller does NOT take ownership of result. - const char *peer() const { return peer_; } + virtual grpc_error *Init(grpc_exec_ctx *exec_ctx, + grpc_channel_element_args *args) { + return GRPC_ERROR_NONE; + } // TODO(roth): Find a way to avoid passing elem into these methods. @@ -235,11 +234,7 @@ class ChannelData { const grpc_channel_info *channel_info); protected: - /// Takes ownership of \a peer. - ChannelData(const grpc_channel_args &args, const char *peer) : peer_(peer) {} - - private: - const char *peer_; + ChannelData() {} }; /// Represents call data. @@ -248,7 +243,10 @@ class CallData { virtual ~CallData() {} /// Initializes the call data. - virtual grpc_error *Init() { return GRPC_ERROR_NONE; } + virtual grpc_error *Init(grpc_exec_ctx *exec_ctx, ChannelData *channel_data, + grpc_channel_element_args *args) { + return GRPC_ERROR_NONE; + } // TODO(roth): Find a way to avoid passing elem into these methods. @@ -266,7 +264,7 @@ class CallData { virtual char *GetPeer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); protected: - explicit CallData(const ChannelData &) {} + CallData() {} }; namespace internal { @@ -282,14 +280,8 @@ class ChannelFilter final { static grpc_error *InitChannelElement(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { - const char *peer = - args->optional_transport - ? grpc_transport_get_peer(exec_ctx, args->optional_transport) - : nullptr; - // Construct the object in the already-allocated memory. - ChannelDataType *channel_data = - new (elem->channel_data) ChannelDataType(*args->channel_args, peer); - return channel_data->Init(); + ChannelDataType *channel_data = new (elem->channel_data) ChannelDataType(); + return channel_data->Init(exec_ctx, args); } static void DestroyChannelElement(grpc_exec_ctx *exec_ctx, @@ -317,11 +309,11 @@ class ChannelFilter final { static grpc_error *InitCallElement(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { - const ChannelDataType &channel_data = - *(ChannelDataType *)elem->channel_data; + ChannelDataType *channel_data = + (ChannelDataType *)elem->channel_data; // Construct the object in the already-allocated memory. - CallDataType *call_data = new (elem->call_data) CallDataType(channel_data); - return call_data->Init(); + CallDataType *call_data = new (elem->call_data) CallDataType(); + return call_data->Init(exec_ctx, channel_data, args); } static void DestroyCallElement(grpc_exec_ctx *exec_ctx, diff --git a/test/cpp/common/channel_filter_test.cc b/test/cpp/common/channel_filter_test.cc index 600a953d82..26d341c2b9 100644 --- a/test/cpp/common/channel_filter_test.cc +++ b/test/cpp/common/channel_filter_test.cc @@ -41,14 +41,23 @@ namespace testing { class MyChannelData : public ChannelData { public: - MyChannelData(const grpc_channel_args& args, const char* peer) - : ChannelData(args, peer) {} + MyChannelData() {} + + grpc_error *Init(grpc_exec_ctx *exec_ctx, grpc_channel_element_args *args) { + (void)args->channel_args; // Make sure field is available. + return GRPC_ERROR_NONE; + } }; class MyCallData : public CallData { public: - explicit MyCallData(const ChannelData& channel_data) - : CallData(channel_data) {} + MyCallData() {} + + grpc_error *Init(grpc_exec_ctx *exec_ctx, ChannelData *channel_data, + grpc_call_element_args *args) { + (void)args->path; // Make sure field is available. + return GRPC_ERROR_NONE; + } }; // This test ensures that when we make changes to the filter API in -- cgit v1.2.3 From 68a9e38c56bb76e31de1d10b900c34474a1be4c0 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 13 Dec 2016 10:50:40 -0800 Subject: Short deadlines: set Status on deadline --- src/core/ext/client_channel/client_channel.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 1fcff4388a..4b3d8951d7 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -683,9 +683,15 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, "Failed to create subchannel", &error, 1)); } else if (GET_CALL(calld) == CANCELLED_CALL) { /* already cancelled before subchannel became ready */ - fail_locked(exec_ctx, calld, - GRPC_ERROR_CREATE_REFERENCING( - "Cancelled before creating subchannel", &error, 1)); + grpc_error *cancellation_error = GRPC_ERROR_CREATE_REFERENCING( + "Cancelled before creating subchannel", &error, 1); + /* if due to deadline, attach the deadline exceeded status to the error */ + if (gpr_time_cmp(calld->deadline, gpr_now(GPR_CLOCK_MONOTONIC)) < 0) { + cancellation_error = + grpc_error_set_int(cancellation_error, GRPC_ERROR_INT_GRPC_STATUS, + GRPC_STATUS_DEADLINE_EXCEEDED); + } + fail_locked(exec_ctx, calld, cancellation_error); } else { /* Create call on subchannel. */ grpc_subchannel_call *subchannel_call = NULL; @@ -809,7 +815,6 @@ static bool pick_subchannel(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY; } } - // TODO(dgq): make this deadline configurable somehow. const grpc_lb_policy_pick_args inputs = { initial_metadata, initial_metadata_flags, &calld->lb_token_mdelem, gpr_inf_future(GPR_CLOCK_MONOTONIC)}; -- cgit v1.2.3 From 78246df236e46c1a6d7c59f43040f646a7cdc6a5 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 13 Dec 2016 16:49:55 -0800 Subject: Add GRPC_CONTEXT_TRAFFIC in grpc_context_index --- src/core/lib/channel/context.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/channel/context.h b/src/core/lib/channel/context.h index 071c5f695c..6c931ad28a 100644 --- a/src/core/lib/channel/context.h +++ b/src/core/lib/channel/context.h @@ -47,6 +47,9 @@ typedef enum { /// Value is a \a census_context. GRPC_CONTEXT_TRACING, + /// Reserved for traffic_class_context. + GRPC_CONTEXT_TRAFFIC, + GRPC_CONTEXT_COUNT } grpc_context_index; -- cgit v1.2.3 From f8439141a0727d8ccb7b3ce61c368aa2fdb4ca68 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 14 Dec 2016 12:36:39 -0800 Subject: clang-format --- src/core/ext/client_channel/client_channel_factory.c | 8 ++++---- src/core/ext/client_channel/http_connect_handshaker.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel_factory.c b/src/core/ext/client_channel/client_channel_factory.c index 01eee02979..4eb35dfcf7 100644 --- a/src/core/ext/client_channel/client_channel_factory.c +++ b/src/core/ext/client_channel/client_channel_factory.c @@ -56,12 +56,12 @@ grpc_channel* grpc_client_channel_factory_create_channel( args); } -static void *factory_arg_copy(void *factory) { +static void* factory_arg_copy(void* factory) { grpc_client_channel_factory_ref(factory); return factory; } -static void factory_arg_destroy(void *factory) { +static void factory_arg_destroy(void* factory) { // TODO(roth): Remove local exec_ctx when // https://github.com/grpc/grpc/pull/8705 is merged. grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -69,7 +69,7 @@ static void factory_arg_destroy(void *factory) { grpc_exec_ctx_finish(&exec_ctx); } -static int factory_arg_cmp(void *factory1, void *factory2) { +static int factory_arg_cmp(void* factory1, void* factory2) { if (factory1 < factory2) return -1; if (factory1 > factory2) return 1; return 0; @@ -79,7 +79,7 @@ static const grpc_arg_pointer_vtable factory_arg_vtable = { factory_arg_copy, factory_arg_destroy, factory_arg_cmp}; grpc_arg grpc_client_channel_factory_create_channel_arg( - grpc_client_channel_factory *factory) { + grpc_client_channel_factory* factory) { grpc_arg arg; arg.type = GRPC_ARG_POINTER; arg.key = GRPC_ARG_CLIENT_CHANNEL_FACTORY; diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index cf10dfb3e9..76c78ee853 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -269,7 +269,7 @@ static void http_connect_handshaker_do_handshake( const grpc_arg* arg = grpc_channel_args_find(args->args, GRPC_ARG_SERVER_URI); GPR_ASSERT(arg != NULL); GPR_ASSERT(arg->type == GRPC_ARG_STRING); - char *canonical_uri = + char* canonical_uri = grpc_resolver_factory_add_default_prefix_if_needed(arg->value.string); grpc_uri* uri = grpc_uri_parse(canonical_uri, 1); char* server_name = uri->path; -- cgit v1.2.3 From 15521de93fc0a9feb2e1a555d249d8fd070ec9ab Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 17 Nov 2016 20:39:27 -0800 Subject: Request a pollset_set in grpc_resolve_address --- src/core/ext/resolver/dns/native/dns_resolver.c | 1 + src/core/lib/http/httpcli.c | 1 + src/core/lib/iomgr/resolve_address.h | 2 + src/core/lib/iomgr/resolve_address_posix.c | 9 +-- src/core/lib/iomgr/resolve_address_uv.c | 9 +-- test/core/end2end/fuzzers/api_fuzzer.c | 4 +- test/core/iomgr/resolve_address_test.c | 74 ++++++++++++++++++++++--- 7 files changed, 82 insertions(+), 18 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index a7392e14ad..688c4fa845 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -218,6 +218,7 @@ static void dns_start_resolving_locked(grpc_exec_ctx *exec_ctx, r->resolving = true; r->addresses = NULL; grpc_resolve_address(exec_ctx, r->name_to_resolve, r->default_port, + r->base.pollset_set, grpc_closure_create(dns_on_resolved, r), &r->addresses); } diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index fdb8abaa2d..1035f31109 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -278,6 +278,7 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx, grpc_polling_entity_add_to_pollset_set(exec_ctx, req->pollent, req->context->pollset_set); grpc_resolve_address(exec_ctx, request->host, req->handshaker->default_port, + req->context->pollset_set, grpc_closure_create(on_resolved, req), &req->addresses); } diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h index 275924448a..e03d16fa4e 100644 --- a/src/core/lib/iomgr/resolve_address.h +++ b/src/core/lib/iomgr/resolve_address.h @@ -36,6 +36,7 @@ #include #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/pollset_set.h" #define GRPC_MAX_SOCKADDR_SIZE 128 @@ -54,6 +55,7 @@ typedef struct { /* TODO(ctiller): add a timeout here */ extern void (*grpc_resolve_address)(grpc_exec_ctx *exec_ctx, const char *addr, const char *default_port, + grpc_pollset_set *interested_parties, grpc_closure *on_done, grpc_resolved_addresses **addresses); /* Destroy resolved addresses */ diff --git a/src/core/lib/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.c index de791b2b67..821932e562 100644 --- a/src/core/lib/iomgr/resolve_address_posix.c +++ b/src/core/lib/iomgr/resolve_address_posix.c @@ -181,6 +181,7 @@ void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addrs) { static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, const char *default_port, + grpc_pollset_set *interested_parties, grpc_closure *on_done, grpc_resolved_addresses **addrs) { request *r = gpr_malloc(sizeof(request)); @@ -192,9 +193,9 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, grpc_executor_push(&r->request_closure, GRPC_ERROR_NONE); } -void (*grpc_resolve_address)(grpc_exec_ctx *exec_ctx, const char *name, - const char *default_port, grpc_closure *on_done, - grpc_resolved_addresses **addrs) = - resolve_address_impl; +void (*grpc_resolve_address)( + grpc_exec_ctx *exec_ctx, const char *name, const char *default_port, + grpc_pollset_set *interested_parties, grpc_closure *on_done, + grpc_resolved_addresses **addrs) = resolve_address_impl; #endif diff --git a/src/core/lib/iomgr/resolve_address_uv.c b/src/core/lib/iomgr/resolve_address_uv.c index b8295acfa1..3269c4f09f 100644 --- a/src/core/lib/iomgr/resolve_address_uv.c +++ b/src/core/lib/iomgr/resolve_address_uv.c @@ -181,6 +181,7 @@ void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addrs) { static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, const char *default_port, + grpc_pollset_set *interested_parties, grpc_closure *on_done, grpc_resolved_addresses **addrs) { uv_getaddrinfo_t *req; @@ -223,9 +224,9 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, } } -void (*grpc_resolve_address)(grpc_exec_ctx *exec_ctx, const char *name, - const char *default_port, grpc_closure *on_done, - grpc_resolved_addresses **addrs) = - resolve_address_impl; +void (*grpc_resolve_address)( + grpc_exec_ctx *exec_ctx, const char *name, const char *default_port, + grpc_pollset_set *interested_parties, grpc_closure *on_done, + grpc_resolved_addresses **addrs) = resolve_address_impl; #endif /* GRPC_UV */ diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 19ac6ced14..746134c85b 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -361,7 +361,9 @@ static void finish_resolve(grpc_exec_ctx *exec_ctx, void *arg, } void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr, - const char *default_port, grpc_closure *on_done, + const char *default_port, + grpc_pollset_set *interested_parties, + grpc_closure *on_done, grpc_resolved_addresses **addresses) { addr_req *r = gpr_malloc(sizeof(*r)); r->addr = gpr_strdup(addr); diff --git a/test/core/iomgr/resolve_address_test.c b/test/core/iomgr/resolve_address_test.c index 2dd0d88b3f..2f533137d8 100644 --- a/test/core/iomgr/resolve_address_test.c +++ b/test/core/iomgr/resolve_address_test.c @@ -34,6 +34,7 @@ #include "src/core/lib/iomgr/resolve_address.h" #include #include +#include #include #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr.h" @@ -46,16 +47,64 @@ static gpr_timespec test_deadline(void) { typedef struct args_struct { gpr_event ev; grpc_resolved_addresses *addrs; + gpr_atm done_atm; + gpr_mu *mu; + grpc_pollset *pollset; + grpc_pollset_set *pollset_set; } args_struct; void args_init(args_struct *args) { gpr_event_init(&args->ev); + grpc_pollset_init(args->pollset, &args->mu); + args->pollset_set = grpc_pollset_set_create(); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_pollset_set_add_pollset(&exec_ctx, args->pollset_set, args->pollset); + grpc_exec_ctx_finish(&exec_ctx); args->addrs = NULL; } void args_finish(args_struct *args) { GPR_ASSERT(gpr_event_wait(&args->ev, test_deadline())); grpc_resolved_addresses_destroy(args->addrs); + grpc_pollset_set_destroy(args->pollset_set); + grpc_pollset_destroy(args->pollset); +} + +static gpr_timespec n_sec_deadline(int seconds) { + return gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(seconds, GPR_TIMESPAN)); +} + +static void actually_poll(void *argsp) { + args_struct *args = argsp; + gpr_timespec deadline = n_sec_deadline(10); + grpc_pollset_worker *worker = NULL; + while (true) { + bool done = gpr_atm_acq_load(&args->done_atm) != 0; + if (done) { + break; + } + gpr_timespec time_left = + gpr_time_sub(deadline, gpr_now(GPR_CLOCK_REALTIME)); + gpr_log(GPR_DEBUG, "done=%d, time_left=%" PRId64 ".%09d", done, + time_left.tv_sec, time_left.tv_nsec); + GPR_ASSERT(gpr_time_cmp(time_left, gpr_time_0(GPR_TIMESPAN)) >= 0); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + gpr_mu_lock(args->mu); + GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, args->pollset, &worker, + gpr_now(GPR_CLOCK_REALTIME), n_sec_deadline(1))); + gpr_mu_unlock(args->mu); + grpc_exec_ctx_finish(&exec_ctx); + } + gpr_event_set(&args->ev, (void *)1); +} + +static void poll_pollset_until_request_done(args_struct *args) { + gpr_atm_rel_store(&args->done_atm, 0); + gpr_thd_id id; + gpr_thd_new(&id, actually_poll, args, NULL); } static void must_succeed(grpc_exec_ctx *exec_ctx, void *argsp, @@ -64,20 +113,21 @@ static void must_succeed(grpc_exec_ctx *exec_ctx, void *argsp, GPR_ASSERT(err == GRPC_ERROR_NONE); GPR_ASSERT(args->addrs != NULL); GPR_ASSERT(args->addrs->naddrs > 0); - gpr_event_set(&args->ev, (void *)1); + gpr_atm_rel_store(&args->done_atm, 1); } static void must_fail(grpc_exec_ctx *exec_ctx, void *argsp, grpc_error *err) { args_struct *args = argsp; GPR_ASSERT(err != GRPC_ERROR_NONE); - gpr_event_set(&args->ev, (void *)1); + gpr_atm_rel_store(&args->done_atm, 1); } static void test_localhost(void) { args_struct args; args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, "localhost:1", NULL, + poll_pollset_until_request_done(&args); + grpc_resolve_address(&exec_ctx, "localhost:1", NULL, args.pollset_set, grpc_closure_create(must_succeed, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); args_finish(&args); @@ -87,7 +137,8 @@ static void test_default_port(void) { args_struct args; args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, "localhost", "1", + poll_pollset_until_request_done(&args); + grpc_resolve_address(&exec_ctx, "localhost", "1", args.pollset_set, grpc_closure_create(must_succeed, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); args_finish(&args); @@ -97,7 +148,8 @@ static void test_missing_default_port(void) { args_struct args; args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, "localhost", NULL, + poll_pollset_until_request_done(&args); + grpc_resolve_address(&exec_ctx, "localhost", NULL, args.pollset_set, grpc_closure_create(must_fail, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); args_finish(&args); @@ -107,7 +159,8 @@ static void test_ipv6_with_port(void) { args_struct args; args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, "[2001:db8::1]:1", NULL, + poll_pollset_until_request_done(&args); + grpc_resolve_address(&exec_ctx, "[2001:db8::1]:1", NULL, args.pollset_set, grpc_closure_create(must_succeed, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); args_finish(&args); @@ -122,7 +175,8 @@ static void test_ipv6_without_port(void) { args_struct args; args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, kCases[i], "80", + poll_pollset_until_request_done(&args); + grpc_resolve_address(&exec_ctx, kCases[i], "80", args.pollset_set, grpc_closure_create(must_succeed, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); args_finish(&args); @@ -138,7 +192,8 @@ static void test_invalid_ip_addresses(void) { args_struct args; args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, kCases[i], NULL, + poll_pollset_until_request_done(&args); + grpc_resolve_address(&exec_ctx, kCases[i], NULL, args.pollset_set, grpc_closure_create(must_fail, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); args_finish(&args); @@ -154,7 +209,8 @@ static void test_unparseable_hostports(void) { args_struct args; args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, kCases[i], "1", + poll_pollset_until_request_done(&args); + grpc_resolve_address(&exec_ctx, kCases[i], "1", args.pollset_set, grpc_closure_create(must_fail, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); args_finish(&args); -- cgit v1.2.3 From f62706f2060a029ff9eaf178fc32946f7feda3c3 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 17 Nov 2016 20:59:48 -0800 Subject: Add pollset_set in grpc_resolver --- src/core/ext/client_channel/resolver.c | 2 ++ src/core/ext/client_channel/resolver.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/core') diff --git a/src/core/ext/client_channel/resolver.c b/src/core/ext/client_channel/resolver.c index 2ae4fe862e..4a5e4f751b 100644 --- a/src/core/ext/client_channel/resolver.c +++ b/src/core/ext/client_channel/resolver.c @@ -36,6 +36,7 @@ void grpc_resolver_init(grpc_resolver *resolver, const grpc_resolver_vtable *vtable) { resolver->vtable = vtable; + resolver->pollset_set = grpc_pollset_set_create(); gpr_ref_init(&resolver->refs, 1); } @@ -62,6 +63,7 @@ void grpc_resolver_unref(grpc_resolver *resolver, void grpc_resolver_unref(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver) { #endif if (gpr_unref(&resolver->refs)) { + grpc_pollset_set_destroy(resolver->pollset_set); resolver->vtable->destroy(exec_ctx, resolver); } } diff --git a/src/core/ext/client_channel/resolver.h b/src/core/ext/client_channel/resolver.h index 96ece92b9d..d283120648 100644 --- a/src/core/ext/client_channel/resolver.h +++ b/src/core/ext/client_channel/resolver.h @@ -36,6 +36,7 @@ #include "src/core/ext/client_channel/subchannel.h" #include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/pollset_set.h" typedef struct grpc_resolver grpc_resolver; typedef struct grpc_resolver_vtable grpc_resolver_vtable; @@ -43,6 +44,7 @@ typedef struct grpc_resolver_vtable grpc_resolver_vtable; /** \a grpc_resolver provides \a grpc_channel_args objects to its caller */ struct grpc_resolver { const grpc_resolver_vtable *vtable; + grpc_pollset_set *pollset_set; gpr_refcount refs; }; -- cgit v1.2.3 From 426cf85a68a1033edbd100c510199b0ab00461dc Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 18 Nov 2016 01:55:50 -0800 Subject: Fix resolve_address_windows --- src/core/lib/iomgr/resolve_address_windows.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/resolve_address_windows.c b/src/core/lib/iomgr/resolve_address_windows.c index e139293c03..fada5ecbe8 100644 --- a/src/core/lib/iomgr/resolve_address_windows.c +++ b/src/core/lib/iomgr/resolve_address_windows.c @@ -169,6 +169,7 @@ void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addrs) { static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, const char *default_port, + grpc_pollset_set *interested_parties, grpc_closure *on_done, grpc_resolved_addresses **addresses) { request *r = gpr_malloc(sizeof(request)); @@ -180,9 +181,9 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, grpc_executor_push(&r->request_closure, GRPC_ERROR_NONE); } -void (*grpc_resolve_address)(grpc_exec_ctx *exec_ctx, const char *name, - const char *default_port, grpc_closure *on_done, - grpc_resolved_addresses **addresses) = - resolve_address_impl; +void (*grpc_resolve_address)( + grpc_exec_ctx *exec_ctx, const char *name, const char *default_port, + grpc_pollset_set *interested_parties, grpc_closure *on_done, + grpc_resolved_addresses **addresses) = resolve_address_impl; #endif -- cgit v1.2.3 From 63e3e3b1df2ffc212acf5114aac49c7c75987f6b Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 15 Dec 2016 12:06:33 -0800 Subject: Add grpc_pollset_set as an arg in grpc_resolver_create --- src/core/ext/client_channel/client_channel.c | 4 +++- src/core/ext/client_channel/resolver.c | 2 -- src/core/ext/client_channel/resolver.h | 2 -- src/core/ext/client_channel/resolver_factory.c | 5 +++-- src/core/ext/client_channel/resolver_factory.h | 8 ++++++-- src/core/ext/client_channel/resolver_registry.c | 9 ++++++--- src/core/ext/client_channel/resolver_registry.h | 6 ++++-- src/core/ext/resolver/dns/native/dns_resolver.c | 18 ++++++++++++++---- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 3 ++- .../resolvers/dns_resolver_connectivity_test.c | 9 ++++----- test/core/client_channel/resolvers/dns_resolver_test.c | 4 ++-- .../client_channel/resolvers/sockaddr_resolver_test.c | 4 ++-- test/core/end2end/fake_resolver.c | 3 ++- 13 files changed, 48 insertions(+), 29 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 5698d65572..9d46338428 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -526,7 +526,9 @@ static grpc_error *cc_init_channel_elem(grpc_exec_ctx *exec_ctx, arg = grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVER_URI); GPR_ASSERT(arg != NULL); GPR_ASSERT(arg->type == GRPC_ARG_STRING); - chand->resolver = grpc_resolver_create(arg->value.string, args->channel_args); + chand->resolver = + grpc_resolver_create(exec_ctx, arg->value.string, args->channel_args, + chand->interested_parties); if (chand->resolver == NULL) { return GRPC_ERROR_CREATE("resolver creation failed"); } diff --git a/src/core/ext/client_channel/resolver.c b/src/core/ext/client_channel/resolver.c index 4a5e4f751b..2ae4fe862e 100644 --- a/src/core/ext/client_channel/resolver.c +++ b/src/core/ext/client_channel/resolver.c @@ -36,7 +36,6 @@ void grpc_resolver_init(grpc_resolver *resolver, const grpc_resolver_vtable *vtable) { resolver->vtable = vtable; - resolver->pollset_set = grpc_pollset_set_create(); gpr_ref_init(&resolver->refs, 1); } @@ -63,7 +62,6 @@ void grpc_resolver_unref(grpc_resolver *resolver, void grpc_resolver_unref(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver) { #endif if (gpr_unref(&resolver->refs)) { - grpc_pollset_set_destroy(resolver->pollset_set); resolver->vtable->destroy(exec_ctx, resolver); } } diff --git a/src/core/ext/client_channel/resolver.h b/src/core/ext/client_channel/resolver.h index d283120648..96ece92b9d 100644 --- a/src/core/ext/client_channel/resolver.h +++ b/src/core/ext/client_channel/resolver.h @@ -36,7 +36,6 @@ #include "src/core/ext/client_channel/subchannel.h" #include "src/core/lib/iomgr/iomgr.h" -#include "src/core/lib/iomgr/pollset_set.h" typedef struct grpc_resolver grpc_resolver; typedef struct grpc_resolver_vtable grpc_resolver_vtable; @@ -44,7 +43,6 @@ typedef struct grpc_resolver_vtable grpc_resolver_vtable; /** \a grpc_resolver provides \a grpc_channel_args objects to its caller */ struct grpc_resolver { const grpc_resolver_vtable *vtable; - grpc_pollset_set *pollset_set; gpr_refcount refs; }; diff --git a/src/core/ext/client_channel/resolver_factory.c b/src/core/ext/client_channel/resolver_factory.c index 7c3d644257..00bbb92dd0 100644 --- a/src/core/ext/client_channel/resolver_factory.c +++ b/src/core/ext/client_channel/resolver_factory.c @@ -43,9 +43,10 @@ void grpc_resolver_factory_unref(grpc_resolver_factory* factory) { /** Create a resolver instance for a name */ grpc_resolver* grpc_resolver_factory_create_resolver( - grpc_resolver_factory* factory, grpc_resolver_args* args) { + grpc_exec_ctx* exec_ctx, grpc_resolver_factory* factory, + grpc_resolver_args* args) { if (factory == NULL) return NULL; - return factory->vtable->create_resolver(factory, args); + return factory->vtable->create_resolver(exec_ctx, factory, args); } char* grpc_resolver_factory_get_default_authority( diff --git a/src/core/ext/client_channel/resolver_factory.h b/src/core/ext/client_channel/resolver_factory.h index 4da42e84d2..3792ddca18 100644 --- a/src/core/ext/client_channel/resolver_factory.h +++ b/src/core/ext/client_channel/resolver_factory.h @@ -37,6 +37,7 @@ #include "src/core/ext/client_channel/client_channel_factory.h" #include "src/core/ext/client_channel/resolver.h" #include "src/core/ext/client_channel/uri_parser.h" +#include "src/core/lib/iomgr/pollset_set.h" typedef struct grpc_resolver_factory grpc_resolver_factory; typedef struct grpc_resolver_factory_vtable grpc_resolver_factory_vtable; @@ -48,6 +49,7 @@ struct grpc_resolver_factory { typedef struct grpc_resolver_args { grpc_uri *uri; const grpc_channel_args *args; + grpc_pollset_set *pollset_set; } grpc_resolver_args; struct grpc_resolver_factory_vtable { @@ -55,7 +57,8 @@ struct grpc_resolver_factory_vtable { void (*unref)(grpc_resolver_factory *factory); /** Implementation of grpc_resolver_factory_create_resolver */ - grpc_resolver *(*create_resolver)(grpc_resolver_factory *factory, + grpc_resolver *(*create_resolver)(grpc_exec_ctx *exec_ctx, + grpc_resolver_factory *factory, grpc_resolver_args *args); /** Implementation of grpc_resolver_factory_get_default_authority */ @@ -70,7 +73,8 @@ void grpc_resolver_factory_unref(grpc_resolver_factory *resolver); /** Create a resolver instance for a name */ grpc_resolver *grpc_resolver_factory_create_resolver( - grpc_resolver_factory *factory, grpc_resolver_args *args); + grpc_exec_ctx *exec_ctx, grpc_resolver_factory *factory, + grpc_resolver_args *args); /** Return a (freshly allocated with gpr_malloc) string representing the default authority to use for this scheme. */ diff --git a/src/core/ext/client_channel/resolver_registry.c b/src/core/ext/client_channel/resolver_registry.c index 2b62b976a9..5110a7cad9 100644 --- a/src/core/ext/client_channel/resolver_registry.c +++ b/src/core/ext/client_channel/resolver_registry.c @@ -131,8 +131,9 @@ static grpc_resolver_factory *resolve_factory(const char *target, return factory; } -grpc_resolver *grpc_resolver_create(const char *target, - const grpc_channel_args *args) { +grpc_resolver *grpc_resolver_create(grpc_exec_ctx *exec_ctx, const char *target, + const grpc_channel_args *args, + grpc_pollset_set *pollset_set) { grpc_uri *uri = NULL; char *canonical_target = NULL; grpc_resolver_factory *factory = @@ -142,7 +143,9 @@ grpc_resolver *grpc_resolver_create(const char *target, memset(&resolver_args, 0, sizeof(resolver_args)); resolver_args.uri = uri; resolver_args.args = args; - resolver = grpc_resolver_factory_create_resolver(factory, &resolver_args); + resolver_args.pollset_set = pollset_set; + resolver = + grpc_resolver_factory_create_resolver(exec_ctx, factory, &resolver_args); grpc_uri_destroy(uri); gpr_free(canonical_target); return resolver; diff --git a/src/core/ext/client_channel/resolver_registry.h b/src/core/ext/client_channel/resolver_registry.h index 24678bc05f..4fb16131db 100644 --- a/src/core/ext/client_channel/resolver_registry.h +++ b/src/core/ext/client_channel/resolver_registry.h @@ -35,6 +35,7 @@ #define GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_REGISTRY_H #include "src/core/ext/client_channel/resolver_factory.h" +#include "src/core/lib/iomgr/pollset_set.h" void grpc_resolver_registry_init(); void grpc_resolver_registry_shutdown(void); @@ -60,8 +61,9 @@ void grpc_register_resolver_type(grpc_resolver_factory *factory); If a resolver factory was not found, return NULL. \a args is a set of channel arguments to be included in the result (typically the set of arguments passed in from the client API). */ -grpc_resolver *grpc_resolver_create(const char *target, - const grpc_channel_args *args); +grpc_resolver *grpc_resolver_create(grpc_exec_ctx *exec_ctx, const char *target, + const grpc_channel_args *args, + grpc_pollset_set *pollset_set); /** Find a resolver factory given a name and return an (owned-by-the-caller) * reference to it */ diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index 688c4fa845..2675fa931f 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -61,6 +61,8 @@ typedef struct { char *default_port; /** channel args. */ grpc_channel_args *channel_args; + /** pollset_set to drive the name resolution process */ + grpc_pollset_set *interested_parties; /** mutex guarding the rest of the state */ gpr_mu mu; @@ -218,7 +220,7 @@ static void dns_start_resolving_locked(grpc_exec_ctx *exec_ctx, r->resolving = true; r->addresses = NULL; grpc_resolve_address(exec_ctx, r->name_to_resolve, r->default_port, - r->base.pollset_set, + r->interested_parties, grpc_closure_create(dns_on_resolved, r), &r->addresses); } @@ -241,13 +243,15 @@ static void dns_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *gr) { if (r->resolved_result != NULL) { grpc_channel_args_destroy(r->resolved_result); } + grpc_pollset_set_destroy(r->interested_parties); gpr_free(r->name_to_resolve); gpr_free(r->default_port); grpc_channel_args_destroy(r->channel_args); gpr_free(r); } -static grpc_resolver *dns_create(grpc_resolver_args *args, +static grpc_resolver *dns_create(grpc_exec_ctx *exec_ctx, + grpc_resolver_args *args, const char *default_port) { if (0 != strcmp(args->uri->authority, "")) { gpr_log(GPR_ERROR, "authority based dns uri's not supported"); @@ -266,6 +270,11 @@ static grpc_resolver *dns_create(grpc_resolver_args *args, r->name_to_resolve = proxy_name == NULL ? gpr_strdup(path) : proxy_name; r->default_port = gpr_strdup(default_port); r->channel_args = grpc_channel_args_copy(args->args); + r->interested_parties = grpc_pollset_set_create(); + if (args->pollset_set != NULL) { + grpc_pollset_set_add_pollset_set(exec_ctx, r->interested_parties, + args->pollset_set); + } gpr_backoff_init(&r->backoff_state, GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS, GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER, GRPC_DNS_RECONNECT_JITTER, @@ -283,8 +292,9 @@ static void dns_factory_ref(grpc_resolver_factory *factory) {} static void dns_factory_unref(grpc_resolver_factory *factory) {} static grpc_resolver *dns_factory_create_resolver( - grpc_resolver_factory *factory, grpc_resolver_args *args) { - return dns_create(args, "https"); + grpc_exec_ctx *exec_ctx, grpc_resolver_factory *factory, + grpc_resolver_args *args) { + return dns_create(exec_ctx, args, "https"); } static char *dns_factory_get_default_host_name(grpc_resolver_factory *factory, diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 0a9b1aa49a..88808c674f 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -214,7 +214,8 @@ static void sockaddr_factory_unref(grpc_resolver_factory *factory) {} #define DECL_FACTORY(name) \ static grpc_resolver *name##_factory_create_resolver( \ - grpc_resolver_factory *factory, grpc_resolver_args *args) { \ + grpc_exec_ctx *exec_ctx, grpc_resolver_factory *factory, \ + grpc_resolver_args *args) { \ return sockaddr_create(args, parse_##name); \ } \ static const grpc_resolver_factory_vtable name##_factory_vtable = { \ diff --git a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c index ffa167a0e7..b421720492 100644 --- a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c +++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c @@ -63,7 +63,8 @@ static grpc_error *my_resolve_address(const char *name, const char *addr, } } -static grpc_resolver *create_resolver(const char *name) { +static grpc_resolver *create_resolver(grpc_exec_ctx *exec_ctx, + const char *name) { grpc_resolver_factory *factory = grpc_resolver_factory_lookup("dns"); grpc_uri *uri = grpc_uri_parse(name, 0); GPR_ASSERT(uri); @@ -71,7 +72,7 @@ static grpc_resolver *create_resolver(const char *name) { memset(&args, 0, sizeof(args)); args.uri = uri; grpc_resolver *resolver = - grpc_resolver_factory_create_resolver(factory, &args); + grpc_resolver_factory_create_resolver(exec_ctx, factory, &args); grpc_resolver_factory_unref(factory); grpc_uri_destroy(uri); return resolver; @@ -101,12 +102,10 @@ int main(int argc, char **argv) { grpc_init(); gpr_mu_init(&g_mu); grpc_blocking_resolve_address = my_resolve_address; - - grpc_resolver *resolver = create_resolver("dns:test"); - grpc_channel_args *result = (grpc_channel_args *)1; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resolver *resolver = create_resolver(&exec_ctx, "dns:test"); gpr_event ev1; gpr_event_init(&ev1); grpc_resolver_next(&exec_ctx, resolver, &result, diff --git a/test/core/client_channel/resolvers/dns_resolver_test.c b/test/core/client_channel/resolvers/dns_resolver_test.c index 41a9125431..5603a57b5f 100644 --- a/test/core/client_channel/resolvers/dns_resolver_test.c +++ b/test/core/client_channel/resolvers/dns_resolver_test.c @@ -48,7 +48,7 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) { GPR_ASSERT(uri); memset(&args, 0, sizeof(args)); args.uri = uri; - resolver = grpc_resolver_factory_create_resolver(factory, &args); + resolver = grpc_resolver_factory_create_resolver(&exec_ctx, factory, &args); GPR_ASSERT(resolver != NULL); GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test_succeeds"); grpc_uri_destroy(uri); @@ -65,7 +65,7 @@ static void test_fails(grpc_resolver_factory *factory, const char *string) { GPR_ASSERT(uri); memset(&args, 0, sizeof(args)); args.uri = uri; - resolver = grpc_resolver_factory_create_resolver(factory, &args); + resolver = grpc_resolver_factory_create_resolver(&exec_ctx, factory, &args); GPR_ASSERT(resolver == NULL); grpc_uri_destroy(uri); grpc_exec_ctx_finish(&exec_ctx); diff --git a/test/core/client_channel/resolvers/sockaddr_resolver_test.c b/test/core/client_channel/resolvers/sockaddr_resolver_test.c index 5ef248f036..a9fd85aea1 100644 --- a/test/core/client_channel/resolvers/sockaddr_resolver_test.c +++ b/test/core/client_channel/resolvers/sockaddr_resolver_test.c @@ -62,7 +62,7 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) { GPR_ASSERT(uri); memset(&args, 0, sizeof(args)); args.uri = uri; - resolver = grpc_resolver_factory_create_resolver(factory, &args); + resolver = grpc_resolver_factory_create_resolver(&exec_ctx, factory, &args); GPR_ASSERT(resolver != NULL); on_resolution_arg on_res_arg; @@ -88,7 +88,7 @@ static void test_fails(grpc_resolver_factory *factory, const char *string) { GPR_ASSERT(uri); memset(&args, 0, sizeof(args)); args.uri = uri; - resolver = grpc_resolver_factory_create_resolver(factory, &args); + resolver = grpc_resolver_factory_create_resolver(&exec_ctx, factory, &args); GPR_ASSERT(resolver == NULL); grpc_uri_destroy(uri); grpc_exec_ctx_finish(&exec_ctx); diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c index 7380dccd80..ed85030797 100644 --- a/test/core/end2end/fake_resolver.c +++ b/test/core/end2end/fake_resolver.c @@ -140,7 +140,8 @@ static void fake_resolver_factory_unref(grpc_resolver_factory* factory) {} static void do_nothing(void* ignored) {} -static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory, +static grpc_resolver* fake_resolver_create(grpc_exec_ctx* exec_ctx, + grpc_resolver_factory* factory, grpc_resolver_args* args) { if (0 != strcmp(args->uri->authority, "")) { gpr_log(GPR_ERROR, "authority based uri's not supported by the %s scheme", -- cgit v1.2.3 From 855a1063ecfe777935f5d92a25a610856179a630 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 16 Dec 2016 13:11:49 -0800 Subject: grpclb: skip slash in server uri path if present --- src/core/ext/lb_policy/grpclb/grpclb.c | 10 ++++++++-- test/cpp/grpclb/grpclb_test.cc | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 38eebdc758..bed5e6c901 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -768,8 +768,14 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, arg = grpc_channel_args_find(args->args, GRPC_ARG_SERVER_URI); GPR_ASSERT(arg != NULL); GPR_ASSERT(arg->type == GRPC_ARG_STRING); - grpc_uri *uri = grpc_uri_parse(arg->value.string, 1); - glb_policy->server_name = gpr_strdup(uri->path); + grpc_uri *uri = grpc_uri_parse(arg->value.string, true); + GPR_ASSERT(uri->path[0] != '\0'); + glb_policy->server_name = + gpr_strdup(uri->path[0] == '/' ? uri->path + 1 : uri->path); + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Will use '%s' as the server name for LB request.", + glb_policy->server_name); + } grpc_uri_destroy(uri); /* All input addresses in addresses come from a resolver that claims diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index fcdcaba6a2..de304b9f89 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -659,7 +659,7 @@ static test_fixture setup_test_fixture(int lb_server_update_delay_ms) { char *server_uri; // The grpclb LB policy will be automatically selected by virtue of // the fact that the returned addresses are balancer addresses. - gpr_asprintf(&server_uri, "test:%s?lb_enabled=1", + gpr_asprintf(&server_uri, "test:///%s?lb_enabled=1", tf.lb_server.servers_hostport); setup_client(server_uri, &tf.client); gpr_free(server_uri); -- cgit v1.2.3 From b810b85e5226a9a096c7fcfbfb4bad8d70ca3e7c Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 19 Dec 2016 13:51:58 -0800 Subject: Get wrapped endpoint's fd in secure_endpoint's endpoint_get_fd --- src/core/lib/security/transport/secure_endpoint.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 1b278410e8..331a8f1835 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -372,7 +372,10 @@ static char *endpoint_get_peer(grpc_endpoint *secure_ep) { return grpc_endpoint_get_peer(ep->wrapped_ep); } -static int endpoint_get_fd(grpc_endpoint *secure_ep) { return -1; } +static int endpoint_get_fd(grpc_endpoint *secure_ep) { + secure_endpoint *ep = (secure_endpoint *)secure_ep; + return grpc_endpoint_get_fd(ep->wrapped_ep); +} static grpc_workqueue *endpoint_get_workqueue(grpc_endpoint *secure_ep) { secure_endpoint *ep = (secure_endpoint *)secure_ep; -- cgit v1.2.3