summaryrefslogtreecommitdiff
path: root/base/errors_unix.cpp
diff options
context:
space:
mode:
authorSnild Dolkow <snild.dolkow@sonymobile.com>2014-01-30 10:08:38 +0100
committerJohan Redestig <johan.redestig@sonymobile.com>2014-02-21 14:57:02 +0100
commit2264e7cfef6b1236a90a13b1d99abb4aadcb0b93 (patch)
tree4c893e05b20f21dbafb54238b64ce12d31c2c6a3 /base/errors_unix.cpp
parent536dce31d35e9411c03102d6abd837cd4d54ce55 (diff)
Fix adb forward --list when forwarding a lot
The list action had some problems with large numbers of forwards: * adb_query() limited replies to 1024 B (and the print was useless) * the reply header's length could overflow (also in other commands) * ...and the client had no way of detecting it * writex() didn't retry on EAGAIN ("Resource temporarily unavailable") This patch makes all "OKAY%04x" replies use a common function which checks the length and limits it to 0xffff. This means that the client can easily check for truncated replies. Before: forward --list starts failing at 15-30 forwards (depending on device serial and forward spec lengths). After: no problems with forward --list. Change-Id: Ie1e82c4d622f5c56e51abb26533ba17d40459914
Diffstat (limited to 'base/errors_unix.cpp')
0 files changed, 0 insertions, 0 deletions