path: root/base
diff options
authorSpencer Low <>2015-05-06 16:13:42 -0700
committerDan Albert <>2015-05-06 18:54:08 -0700
commit142ec75cf882bf023853f0321cd559377daccc60 (patch)
tree1fcc3791257f2708624cfcec9212a9758e1f11fb /base
parent19792a666277ce6dfaacc03162c15688e43c5421 (diff)
adb: win32: fix adb emu command
The adb emu command was never working because the socket connection to the emulator was closed without reading all of the data that the emulator sent. On Windows, this caused the emulator's recv() call to error-out, so it never got the command that was sent. Before settling on this fix, I also experimented changing the arguments to the socket shutdown() call and that didn't seem to help. I also tried removing the call to shutdown() and that didn't help. So that should rule out shutdown() as the problem. One experiment that helped was delaying before calling adb_close(), but that is of course fragile and doesn't address the real issue, which is not closing the socket until the commands have been read. Change-Id: I8fa4d740a2faa2c9922ec50792e16564a94f6eed Signed-off-by: Spencer Low <>
Diffstat (limited to 'base')
1 files changed, 2 insertions, 0 deletions
diff --git a/base/include/base/logging.h b/base/include/base/logging.h
index 84ec538a2..4a15f4305 100644
--- a/base/include/base/logging.h
+++ b/base/include/base/logging.h
@@ -23,8 +23,10 @@ including anything.
#ifdef _WIN32
+#ifndef NOGDI
#define NOGDI // Suppress the evil ERROR macro.
#include <functional>
#include <memory>