aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-10-06 16:30:12 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2017-10-06 16:30:12 -0700
commit412e7ca6e713cfbce3db09e22c3ca185f4f09460 (patch)
tree16c55a945ae5f50241714a4cfbbc1c1b0005b812 /src/core
parent03bd5daf5cd36373152cb6b06a5f259db1331e87 (diff)
Adding PR #12882 changes
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ext/transport/chttp2/transport/flow_control.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/core/ext/transport/chttp2/transport/flow_control.cc b/src/core/ext/transport/chttp2/transport/flow_control.cc
index 639e51da70..2428e2526d 100644
--- a/src/core/ext/transport/chttp2/transport/flow_control.cc
+++ b/src/core/ext/transport/chttp2/transport/flow_control.cc
@@ -399,15 +399,16 @@ static double get_pid_controller_guess(grpc_exec_ctx* exec_ctx,
if (!tfc->pid_controller_initialized) {
tfc->last_pid_update = now;
tfc->pid_controller_initialized = true;
- grpc_pid_controller_init(
- &tfc->pid_controller,
- (grpc_pid_controller_args){.gain_p = 4,
- .gain_i = 8,
- .gain_d = 0,
- .initial_control_value = target,
- .min_control_value = -1,
- .max_control_value = 25,
- .integral_range = 10});
+ grpc_pid_controller_args args;
+ memset(&args, 0, sizeof(args));
+ args.gain_p = 4;
+ args.gain_i = 8;
+ args.gain_d = 0;
+ args.initial_control_value = target;
+ args.min_control_value = -1;
+ args.max_control_value = 25;
+ args.integral_range = 10;
+ grpc_pid_controller_init(&tfc->pid_controller, args);
return pow(2, target);
}
double bdp_error = target - grpc_pid_controller_last(&tfc->pid_controller);