diff options
| author | JP Abgrall <jpa@google.com> | 2011-04-12 22:01:58 -0700 |
|---|---|---|
| committer | JP Abgrall <jpa@google.com> | 2011-04-12 22:01:58 -0700 |
| commit | 112445b8a752ce174f36cf853d5f1c356c3f5286 (patch) | |
| tree | 59150b2b684d0e830ec2d65b3613b708edba5043 /adb/sockets.c | |
| parent | f098c159e306105aa64977955887e687112c76c6 (diff) | |
| download | system_core-112445b8a752ce174f36cf853d5f1c356c3f5286.tar.gz system_core-112445b8a752ce174f36cf853d5f1c356c3f5286.tar.bz2 system_core-112445b8a752ce174f36cf853d5f1c356c3f5286.zip | |
adb: Don't allow a forced exit if data is still in the socket
Fixes the http://b/4271011 "adb shell cat /init.rc output gets truncated"
Change-Id: I6df64374b60789595fb18f96d429315dec032443
Signed-off-by: JP Abgrall <jpa@google.com>
Diffstat (limited to 'adb/sockets.c')
| -rw-r--r-- | adb/sockets.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/adb/sockets.c b/adb/sockets.c index c3c4ac20..45d935c0 100644 --- a/adb/sockets.c +++ b/adb/sockets.c @@ -360,8 +360,8 @@ static void local_socket_event_func(int fd, unsigned ev, void *_s) fdevent_del(&s->fde, FDE_READ); } } - - if(s->fde.force_eof || is_eof) { + /* Don't allow a forced eof if data is still there */ + if((s->fde.force_eof && !r) || is_eof) { s->close(s); } } |
