diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-02-07 14:14:14 -0800 |
---|---|---|
committer | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-02-07 14:49:09 -0800 |
commit | 17ecca637df2f573edc3ecb8246c0e38a5b32465 (patch) | |
tree | bc05a46566ad888b4659b048851b1e32a9fb5b92 /android/protocol | |
parent | 9af6946145bea73b16f1a128838048b917474f27 (diff) | |
download | external_qemu-17ecca637df2f573edc3ecb8246c0e38a5b32465.zip external_qemu-17ecca637df2f573edc3ecb8246c0e38a5b32465.tar.gz external_qemu-17ecca637df2f573edc3ecb8246c0e38a5b32465.tar.bz2 |
Fix emulator core and UI on Windows
There are two parts in this CL:
1. Fixing the Windows build (missing set_fd_handler)
2. Replacing read/write with socket_recv/socket_send.
Change-Id: I5fa599774260257d481b738a892e1124135fc319
Diffstat (limited to 'android/protocol')
-rw-r--r-- | android/protocol/fb-updates-impl.c | 4 | ||||
-rw-r--r-- | android/protocol/ui-commands-impl.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/android/protocol/fb-updates-impl.c b/android/protocol/fb-updates-impl.c index fa4b304..dde79c1 100644 --- a/android/protocol/fb-updates-impl.c +++ b/android/protocol/fb-updates-impl.c @@ -113,8 +113,8 @@ _fbUpdatesImpl_io_callback(void* opaque, int fd, unsigned events) // Read updates while they are immediately available. for (;;) { // Read next chunk of data. - ret = read(fbi->sock, fbi->reader_buffer + fbi->reader_offset, - fbi->reader_bytes - fbi->reader_offset); + ret = socket_recv(fbi->sock, fbi->reader_buffer + fbi->reader_offset, + fbi->reader_bytes - fbi->reader_offset); if (ret == 0) { /* disconnection ! */ fbUpdatesImpl_destroy(); diff --git a/android/protocol/ui-commands-impl.c b/android/protocol/ui-commands-impl.c index e933d57..2ceeca1 100644 --- a/android/protocol/ui-commands-impl.c +++ b/android/protocol/ui-commands-impl.c @@ -124,8 +124,9 @@ _uiCmdImpl_io_callback(void* opaque, int fd, unsigned events) // Read requests while they are immediately available. for (;;) { // Read next chunk of data. - status = read(uicmd->sock, uicmd->reader_buffer + uicmd->reader_offset, - uicmd->reader_bytes - uicmd->reader_offset); + status = socket_recv(uicmd->sock, + uicmd->reader_buffer + uicmd->reader_offset, + uicmd->reader_bytes - uicmd->reader_offset); if (status == 0) { /* Disconnection, meaning that the core process got terminated. */ fprintf(stderr, "core-ui-control service got disconnected\n"); |