Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: tools/android/forwarder2/daemon.cc

Issue 18635005: Reland "Add --serial-id option to host_forwarder." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/forwarder.py ('k') | tools/android/forwarder2/device_forwarder_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/forwarder2/daemon.cc
diff --git a/tools/android/forwarder2/daemon.cc b/tools/android/forwarder2/daemon.cc
index d99383446c819ec4893af0b72d0adaa1a86863c3..88ec8a01ab7547210d2a995fd3891144837d6699 100644
--- a/tools/android/forwarder2/daemon.cc
+++ b/tools/android/forwarder2/daemon.cc
@@ -141,7 +141,7 @@ scoped_ptr<Socket> ConnectToUnixDomainSocket(
char buf[kBufferSize];
DCHECK(expected_welcome_message.length() + 1 <= sizeof(buf));
memset(buf, 0, sizeof(buf));
- if (socket->Read(buf, sizeof(buf)) < 0) {
+ if (socket->Read(buf, expected_welcome_message.length() + 1) < 0) {
perror("read");
continue;
}
« no previous file with comments | « build/android/pylib/forwarder.py ('k') | tools/android/forwarder2/device_forwarder_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698