aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/channel
diff options
context:
space:
mode:
authorGravatar Julien Boeuf <jboeuf@google.com>2016-01-28 15:45:08 -0800
committerGravatar Julien Boeuf <jboeuf@google.com>2016-01-28 15:45:08 -0800
commit54cc08c216ea23a85e122ef19a30ffe3399255e9 (patch)
treea923c2e552c2827bd7491b19ff63443e7c2fdcef /src/core/channel
parenta50da4757ae7eb75b67d78b7e82fba79d2c987da (diff)
parent822602cff0f3b1f8373ac06a8ab8fe9792b1037e (diff)
Merge branch 'master' of github.com:grpc/grpc into ssl_credentials_override_default_roots
Diffstat (limited to 'src/core/channel')
-rw-r--r--src/core/channel/channel_args.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/channel/channel_args.c b/src/core/channel/channel_args.c
index 487db1119a..0427ce0b8d 100644
--- a/src/core/channel/channel_args.c
+++ b/src/core/channel/channel_args.c
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -35,6 +35,7 @@
#include "src/core/channel/channel_args.h"
#include "src/core/support/string.h"
+#include <grpc/census.h>
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
@@ -119,10 +120,10 @@ int grpc_channel_args_is_census_enabled(const grpc_channel_args *a) {
if (a == NULL) return 0;
for (i = 0; i < a->num_args; i++) {
if (0 == strcmp(a->args[i].key, GRPC_ARG_ENABLE_CENSUS)) {
- return a->args[i].value.integer != 0;
+ return a->args[i].value.integer != 0 && census_enabled();
}
}
- return 0;
+ return census_enabled();
}
grpc_compression_algorithm grpc_channel_args_get_compression_algorithm(