clang-format

reviewable/pr14886/r7
Mark D. Roth 7 years ago
parent d0bb3c88c8
commit 7d92def915
  1. 6
      src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
  2. 30
      src/core/ext/filters/client_channel/lb_policy/subchannel_list.h

@ -384,9 +384,9 @@ void PickFirst::PickFirstSubchannelData::ProcessConnectivityChangeLocked(
"), subchannel_list %p: state=%s p->shutdown_=%d " "), subchannel_list %p: state=%s p->shutdown_=%d "
"sd->subchannel_list->shutting_down=%d error=%s", "sd->subchannel_list->shutting_down=%d error=%s",
p, subchannel(), Index(), subchannel_list()->num_subchannels(), p, subchannel(), Index(), subchannel_list()->num_subchannels(),
subchannel_list(), subchannel_list(), grpc_connectivity_state_name(connectivity_state),
grpc_connectivity_state_name(connectivity_state), p->shutdown_, p->shutdown_, subchannel_list()->shutting_down(),
subchannel_list()->shutting_down(), grpc_error_string(error)); grpc_error_string(error));
} }
// The notification must be for a subchannel in either the current or // The notification must be for a subchannel in either the current or
// latest pending subchannel lists. // latest pending subchannel lists.

@ -358,8 +358,8 @@ void SubchannelData<SubchannelListType, SubchannelDataType>::
} }
template <typename SubchannelListType, typename SubchannelDataType> template <typename SubchannelListType, typename SubchannelDataType>
bool SubchannelData<SubchannelListType, SubchannelDataType>:: bool SubchannelData<SubchannelListType,
UpdateConnectedSubchannelLocked() { SubchannelDataType>::UpdateConnectedSubchannelLocked() {
// If the subchannel is READY, take a ref to the connected subchannel. // If the subchannel is READY, take a ref to the connected subchannel.
if (pending_connectivity_state_unsafe_ == GRPC_CHANNEL_READY) { if (pending_connectivity_state_unsafe_ == GRPC_CHANNEL_READY) {
connected_subchannel_ = connected_subchannel_ =
@ -381,9 +381,9 @@ bool SubchannelData<SubchannelListType, SubchannelDataType>::
"[%s %p] subchannel list %p index %" PRIuPTR " of %" PRIuPTR "[%s %p] subchannel list %p index %" PRIuPTR " of %" PRIuPTR
" (subchannel %p): state is READY but connected subchannel is " " (subchannel %p): state is READY but connected subchannel is "
"null; moving to state IDLE", "null; moving to state IDLE",
subchannel_list_->tracer()->name(), subchannel_list_->tracer()->name(), subchannel_list_->policy(),
subchannel_list_->policy(), subchannel_list_, Index(), subchannel_list_, Index(), subchannel_list_->num_subchannels(),
subchannel_list_->num_subchannels(), subchannel_); subchannel_);
} }
pending_connectivity_state_unsafe_ = GRPC_CHANNEL_IDLE; pending_connectivity_state_unsafe_ = GRPC_CHANNEL_IDLE;
return false; return false;
@ -400,16 +400,16 @@ void SubchannelData<SubchannelListType, SubchannelDataType>::
OnConnectivityChangedLocked(void* arg, grpc_error* error) { OnConnectivityChangedLocked(void* arg, grpc_error* error) {
SubchannelData* sd = static_cast<SubchannelData*>(arg); SubchannelData* sd = static_cast<SubchannelData*>(arg);
if (sd->subchannel_list_->tracer()->enabled()) { if (sd->subchannel_list_->tracer()->enabled()) {
gpr_log(GPR_INFO, gpr_log(
"[%s %p] subchannel list %p index %" PRIuPTR " of %" PRIuPTR GPR_INFO,
" (subchannel %p): connectivity changed: state=%s, error=%s, " "[%s %p] subchannel list %p index %" PRIuPTR " of %" PRIuPTR
"shutting_down=%d", " (subchannel %p): connectivity changed: state=%s, error=%s, "
sd->subchannel_list_->tracer()->name(), "shutting_down=%d",
sd->subchannel_list_->policy(), sd->subchannel_list_, sd->Index(), sd->subchannel_list_->tracer()->name(), sd->subchannel_list_->policy(),
sd->subchannel_list_->num_subchannels(), sd->subchannel_, sd->subchannel_list_, sd->Index(),
grpc_connectivity_state_name( sd->subchannel_list_->num_subchannels(), sd->subchannel_,
sd->pending_connectivity_state_unsafe_), grpc_connectivity_state_name(sd->pending_connectivity_state_unsafe_),
grpc_error_string(error), sd->subchannel_list_->shutting_down()); grpc_error_string(error), sd->subchannel_list_->shutting_down());
} }
// If shutting down, unref subchannel and stop watching. // If shutting down, unref subchannel and stop watching.
if (sd->subchannel_list_->shutting_down() || error == GRPC_ERROR_CANCELLED) { if (sd->subchannel_list_->shutting_down() || error == GRPC_ERROR_CANCELLED) {

Loading…
Cancel
Save