commit | 255f56554aff1873065b4dc16a7b96f0f862f4fa | [log] [tgz] |
---|---|---|
author | Ben Chan <benchan@chromium.org> | Tue Jun 03 22:14:15 2014 -0700 |
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | Wed Jun 04 21:01:40 2014 +0000 |
tree | 573acc5c826858e1cbe08b834d5226db84309b2d | |
parent | 584677bdef52b69a63cb21a74f767be80f79205f [diff] |
shill: Fix a remove-while-iterating issue in HookTable. HookTable::Run() previously iterated through the list of actions and invoked the start callback of each action, which was not safe because an action that completes inline could call HookTable::Remove() to remove itself from the list. This CL fixes the issue by iterating through a list of start callback of each action. BUG=chromium:380526 TEST=Tested the following: 1. FEATURES=test emerge-$BOARD platform2` 2. Verify that shill executes the termination action upon suspend on a DUT with a cellular device. Change-Id: Ie32a567d8de1017ff1262ba5e625e5a7a00cf01f Reviewed-on: https://chromium-review.googlesource.com/202538 Tested-by: Ben Chan <benchan@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Queue: Ben Chan <benchan@chromium.org>