aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-05-05 13:29:44 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-05-05 13:29:44 -0700
commita589f20d395b13b0fb4d7cca8a904b272db38f03 (patch)
treecb2f8a9bc9643411732b43f44b28bfa8e3455d20
parente634582ea3c7696e8d4e854ec379f4e367353d56 (diff)
Rename grpc_user_agent_md to make it less confusing
-rw-r--r--src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c2
-rw-r--r--src/core/ext/filters/workarounds/workaround_utils.c8
-rw-r--r--src/core/ext/filters/workarounds/workaround_utils.h6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
index 917977fbe1..41a91204b2 100644
--- a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
+++ b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
@@ -76,7 +76,7 @@ static void recv_initial_metadata_ready(grpc_exec_ctx* exec_ctx,
if (GRPC_ERROR_NONE == error) {
grpc_mdelem md;
if (get_user_agent_mdelem(calld->recv_initial_metadata, &md)) {
- grpc_user_agent_md* user_agent_md = grpc_parse_user_agent(md);
+ grpc_workaround_user_agent_md* user_agent_md = grpc_parse_user_agent(md);
if (user_agent_md
->workaround_active[GRPC_WORKAROUND_ID_CRONET_COMPRESSION]) {
calld->workaround_active = true;
diff --git a/src/core/ext/filters/workarounds/workaround_utils.c b/src/core/ext/filters/workarounds/workaround_utils.c
index 64f3590585..071e00aefd 100644
--- a/src/core/ext/filters/workarounds/workaround_utils.c
+++ b/src/core/ext/filters/workarounds/workaround_utils.c
@@ -45,15 +45,15 @@ static void destroy_user_agent_md(void *user_agent_md) {
gpr_free(user_agent_md);
}
-grpc_user_agent_md *grpc_parse_user_agent(grpc_mdelem md) {
- grpc_user_agent_md *user_agent_md =
- (grpc_user_agent_md *)grpc_mdelem_get_user_data(md,
+grpc_workaround_user_agent_md *grpc_parse_user_agent(grpc_mdelem md) {
+ grpc_workaround_user_agent_md *user_agent_md =
+ (grpc_workaround_user_agent_md *)grpc_mdelem_get_user_data(md,
destroy_user_agent_md);
if (NULL != user_agent_md) {
return user_agent_md;
}
- user_agent_md = gpr_malloc(sizeof(grpc_user_agent_md));
+ user_agent_md = gpr_malloc(sizeof(grpc_workaround_user_agent_md));
for (int i = 0; i < GRPC_MAX_WORKAROUND_ID; i++) {
if (workarounds[i].enabled && workarounds[i].ua_parser) {
user_agent_md->workaround_active[i] = workarounds[i].ua_parser(md);
diff --git a/src/core/ext/filters/workarounds/workaround_utils.h b/src/core/ext/filters/workarounds/workaround_utils.h
index dfcc73f9a5..e563f07632 100644
--- a/src/core/ext/filters/workarounds/workaround_utils.h
+++ b/src/core/ext/filters/workarounds/workaround_utils.h
@@ -41,11 +41,11 @@ typedef enum {
GRPC_MAX_WORKAROUND_ID,
} grpc_workaround_list;
-typedef struct grpc_user_agent_md {
+typedef struct grpc_workaround_user_agent_md {
bool workaround_active[GRPC_MAX_WORKAROUND_ID];
-} grpc_user_agent_md;
+} grpc_workaround_user_agent_md;
-grpc_user_agent_md *grpc_parse_user_agent(grpc_mdelem md);
+grpc_workaround_user_agent_md *grpc_parse_user_agent(grpc_mdelem md);
typedef bool (*user_agent_parser)(grpc_mdelem);