Chromium Code Reviews| Index: tools/battor_agent/battor_agent.cc |
| diff --git a/tools/battor_agent/battor_agent.cc b/tools/battor_agent/battor_agent.cc |
| index 2a1d7d7aa02bc67ab93cc6333410c3e9d0f46f5c..54e348dfac634176cf8de9ee255de3a5d22192ae 100644 |
| --- a/tools/battor_agent/battor_agent.cc |
| +++ b/tools/battor_agent/battor_agent.cc |
| @@ -198,7 +198,7 @@ void BattOrAgent::OnConnectionOpened(bool success) { |
| PerformAction(Action::SEND_CURRENT_SAMPLE_REQUEST); |
| return; |
| case Command::GET_FIRMWARE_GIT_HASH: |
| - PerformAction(Action::SEND_GIT_HASH_REQUEST); |
| + PerformAction(Action::SEND_INIT); |
|
charliea (OOO until 10-5)
2017/01/12 17:05:49
I think that, before this line, you want num_init_
rnephew (Reviews Here)
2017/01/12 17:53:21
Done.
|
| return; |
| case Command::INVALID: |
| NOTREACHED(); |
| @@ -305,6 +305,10 @@ void BattOrAgent::OnMessageRead(bool success, |
| switch (last_action_) { |
| case Action::READ_INIT_ACK: |
| + if (command_ == Command::GET_FIRMWARE_GIT_HASH) { |
|
charliea (OOO until 10-5)
2017/01/12 17:05:50
note that the current location of this circumvents
rnephew (Reviews Here)
2017/01/12 17:53:21
Done.
|
| + PerformAction(Action::SEND_GIT_HASH_REQUEST); |
| + return; |
| + } |
| if (!IsAckOfControlCommand(type, BATTOR_CONTROL_MESSAGE_TYPE_INIT, |
| *bytes)) { |
| if (num_init_attempts_++ < kMaxInitAttempts) { |