pull/10473/head
Craig Tiller 8 years ago
parent 08aea10d02
commit 12d716c88c
  1. 1
      src/core/ext/transport/chttp2/transport/http2_settings.c
  2. 6
      tools/codegen/core/gen_settings_ids.py

@ -54,6 +54,7 @@ bool grpc_wire_id_to_setting_id(uint32_t wire_id, grpc_chttp2_setting_id *out) {
return h < GPR_ARRAY_SIZE(grpc_setting_id_to_wire_id) && return h < GPR_ARRAY_SIZE(grpc_setting_id_to_wire_id) &&
grpc_setting_id_to_wire_id[h] == wire_id; grpc_setting_id_to_wire_id[h] == wire_id;
} }
const grpc_chttp2_setting_parameters const grpc_chttp2_setting_parameters
grpc_chttp2_settings_parameters[GRPC_CHTTP2_NUM_SETTINGS] = { grpc_chttp2_settings_parameters[GRPC_CHTTP2_NUM_SETTINGS] = {
{"HEADER_TABLE_SIZE", 4096u, 0u, 4294967295u, {"HEADER_TABLE_SIZE", 4096u, 0u, 4294967295u,

@ -140,7 +140,8 @@ print >>C, """
} }
*out = (grpc_chttp2_setting_id)h; *out = (grpc_chttp2_setting_id)h;
return h < GPR_ARRAY_SIZE(grpc_setting_id_to_wire_id) && grpc_setting_id_to_wire_id[h] == wire_id; return h < GPR_ARRAY_SIZE(grpc_setting_id_to_wire_id) && grpc_setting_id_to_wire_id[h] == wire_id;
}""" % cgargs }
""" % cgargs
print >>H, """ print >>H, """
typedef enum { typedef enum {
@ -156,8 +157,9 @@ typedef struct {
grpc_chttp2_invalid_value_behavior invalid_value_behavior; grpc_chttp2_invalid_value_behavior invalid_value_behavior;
uint32_t error_value; uint32_t error_value;
} grpc_chttp2_setting_parameters; } grpc_chttp2_setting_parameters;
extern const grpc_chttp2_setting_parameters grpc_chttp2_settings_parameters[GRPC_CHTTP2_NUM_SETTINGS];
""" """
print >>H, "extern const grpc_chttp2_setting_parameters grpc_chttp2_settings_parameters[GRPC_CHTTP2_NUM_SETTINGS];"
print >>C, "const grpc_chttp2_setting_parameters grpc_chttp2_settings_parameters[GRPC_CHTTP2_NUM_SETTINGS] = {" print >>C, "const grpc_chttp2_setting_parameters grpc_chttp2_settings_parameters[GRPC_CHTTP2_NUM_SETTINGS] = {"
i = 0 i = 0
for decorated_setting in sorted(decorated_settings): for decorated_setting in sorted(decorated_settings):

Loading…
Cancel
Save