Skip to content
Snippets Groups Projects
Commit aff40667 authored by Bogdan Drutu's avatar Bogdan Drutu
Browse files

Update copyrights and add change the client to enable census if census initialized.

parent 3bbf1332
No related branches found
No related tags found
No related merge requests found
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <grpc/census.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/slice.h> #include <grpc/support/slice.h>
#include <grpc/support/slice_buffer.h> #include <grpc/support/slice_buffer.h>
...@@ -200,7 +201,7 @@ grpc_channel *grpc_insecure_channel_create(const char *target, ...@@ -200,7 +201,7 @@ grpc_channel *grpc_insecure_channel_create(const char *target,
"grpc_insecure_channel_create(target=%p, args=%p, reserved=%p)", 3, "grpc_insecure_channel_create(target=%p, args=%p, reserved=%p)", 3,
(target, args, reserved)); (target, args, reserved));
GPR_ASSERT(!reserved); GPR_ASSERT(!reserved);
if (grpc_channel_args_is_census_enabled(args)) { if (grpc_channel_args_is_census_enabled(args) || census_enabled()) {
filters[n++] = &grpc_client_census_filter; filters[n++] = &grpc_client_census_filter;
} }
filters[n++] = &grpc_compress_filter; filters[n++] = &grpc_compress_filter;
......
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <grpc/census.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/slice.h> #include <grpc/support/slice.h>
#include <grpc/support/slice_buffer.h> #include <grpc/support/slice_buffer.h>
...@@ -295,7 +296,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, ...@@ -295,7 +296,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds,
args_copy = grpc_channel_args_copy_and_add( args_copy = grpc_channel_args_copy_and_add(
new_args_from_connector != NULL ? new_args_from_connector : args, new_args_from_connector != NULL ? new_args_from_connector : args,
&connector_arg, 1); &connector_arg, 1);
if (grpc_channel_args_is_census_enabled(args)) { if (grpc_channel_args_is_census_enabled(args) || census_enabled()) {
filters[n++] = &grpc_client_census_filter; filters[n++] = &grpc_client_census_filter;
} }
filters[n++] = &grpc_compress_filter; filters[n++] = &grpc_compress_filter;
......
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
......
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include "src/core/surface/server.h" #include "src/core/surface/server.h"
grpc_server *grpc_server_create(const grpc_channel_args *args, void *reserved) { grpc_server *grpc_server_create(const grpc_channel_args *args, void *reserved) {
const grpc_channel_filter *filters[2]; const grpc_channel_filter *filters[3];
size_t num_filters = 0; size_t num_filters = 0;
filters[num_filters++] = &grpc_compress_filter; filters[num_filters++] = &grpc_compress_filter;
GRPC_API_TRACE("grpc_server_create(%p, %p)", 2, (args, reserved)); GRPC_API_TRACE("grpc_server_create(%p, %p)", 2, (args, reserved));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment