aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2017-03-21 16:12:39 -0700
committerGravatar Sree Kuchibhotla <sreek@google.com>2017-03-21 16:12:39 -0700
commitadd6962d7af2fd3943c2f2d739bd13b3ce4b91d8 (patch)
tree4821fed27593e22b83386f4243059611231a4793 /src
parentbf18428740ebf0f36b68fcf9b7d427538e074a31 (diff)
Add version macro
Diffstat (limited to 'src')
-rw-r--r--src/core/lib/surface/completion_queue_factory.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/lib/surface/completion_queue_factory.c b/src/core/lib/surface/completion_queue_factory.c
index 879b456ed5..138dfeff48 100644
--- a/src/core/lib/surface/completion_queue_factory.c
+++ b/src/core/lib/surface/completion_queue_factory.c
@@ -52,7 +52,9 @@ static const grpc_completion_queue_factory g_default_cq_factory = {
const grpc_completion_queue_factory* grpc_completion_queue_factory_lookup(
const grpc_completion_queue_attributes* attributes) {
/* As we add more fields to grpc_completion_queue_attributes, we may have to
- change this assert */
+ change this assert to:
+ GPR_ASSERT (attributes->version >= 1 &&
+ attributes->version <= GRPC_CQ_CURRENT_VERSION) */
GPR_ASSERT(attributes->version == 1);
/* The default factory can handle version 1 of the attributes structure. We