Skip to content
Snippets Groups Projects
Commit 9e90d22a authored by Craig Tiller's avatar Craig Tiller
Browse files

Fixes

parent b9a5e073
No related branches found
No related tags found
No related merge requests found
...@@ -208,8 +208,7 @@ static void match_initial_magic_string(grpc_slice_buffer *buffer) { ...@@ -208,8 +208,7 @@ static void match_initial_magic_string(grpc_slice_buffer *buffer) {
size_t magic_length = strlen(magic_connect_string); size_t magic_length = strlen(magic_connect_string);
GPR_ASSERT(buffer->length >= magic_length); GPR_ASSERT(buffer->length >= magic_length);
for (i = 0, j = 0; i < state.incoming_buffer.count && j < magic_length; i++) { for (i = 0, j = 0; i < state.incoming_buffer.count && j < magic_length; i++) {
char *dump = char *dump = grpc_slice_to_c_string(state.incoming_buffer.slices[i]);
grpc_slice_to_c_string(state.incoming_buffer.slices[i]);
cmp_length = GPR_MIN(strlen(dump), magic_length - j); cmp_length = GPR_MIN(strlen(dump), magic_length - j);
GPR_ASSERT(strncmp(dump, magic_connect_string + j, cmp_length) == 0); GPR_ASSERT(strncmp(dump, magic_connect_string + j, cmp_length) == 0);
j += cmp_length; j += cmp_length;
......
...@@ -36,11 +36,14 @@ ...@@ -36,11 +36,14 @@
#include <cstring> #include <cstring>
#include <vector> #include <vector>
#include <grpc++/impl/grpc_library.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
namespace grpc { namespace grpc {
namespace testing { namespace testing {
static internal::GrpcLibraryInitializer g_initializer;
const char key1[] = "metadata-key1"; const char key1[] = "metadata-key1";
const char key2[] = "metadata-key2"; const char key2[] = "metadata-key2";
const char val1[] = "metadata-val1"; const char val1[] = "metadata-val1";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment