OSDN Git Service

adb: fix adbd feature parsing for no features.
authorDavid Pursell <dpursell@google.com>
Fri, 25 Sep 2015 20:04:21 +0000 (13:04 -0700)
committerDavid Pursell <dpursell@google.com>
Fri, 25 Sep 2015 20:10:17 +0000 (13:10 -0700)
commitd2b588e23901538f4b459a71fefdac6fc2748f7e
tree9bb9524fafe904a16187c5eb8c42b8d663544cfc
parentfca4821e05f1d4684185b559d177ffde6937bf61
adb: fix adbd feature parsing for no features.

Previously the transport features list was only overwritten if a
new feature list was found. However, adbd can reuse the same atransport
object even if the adb server is killed and restarted, so the feature
list was not cleared properly if the newly started adb server didn't
provide one.

This CL fixes the bug by clearing the transport features list whenever
a connection banner is parsed.

Bug: http://b/24405971
Change-Id: Ia6ee6c9a46a621534681f6d4d7df77156b885eb9
adb/adb.cpp
adb/transport.cpp
adb/transport_test.cpp