aboutsummaryrefslogtreecommitdiffstats
path: root/android/protocol
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-03-17 14:57:51 +0100
committerDavid 'Digit' Turner <digit@android.com>2011-04-11 18:08:11 +0200
commitf9e333ade2529f257ced6bcff8e5824cb07eacf9 (patch)
treec3ea65717a284ae744764b4ecf8c5b745ea3415d /android/protocol
parent2086c639648ccecc9081705a279249ce939d818b (diff)
downloadexternal_qemu-f9e333ade2529f257ced6bcff8e5824cb07eacf9.zip
external_qemu-f9e333ade2529f257ced6bcff8e5824cb07eacf9.tar.gz
external_qemu-f9e333ade2529f257ced6bcff8e5824cb07eacf9.tar.bz2
Simplify async utils by removing extra LoopIo parameter.
This patch removes the LoopIo parameter from asyncReader_run() by storing the initial pointer passed to asyncReader_init() inside the object itself. Same treatment is performed for: - AsyncReader - AsyncWriter - AsyncLineReader - AsyncConnector - AsyncConsoleConnect Change-Id: Ic74b817e4c326230ca1d38b3a5d8c4790c4f90c1
Diffstat (limited to 'android/protocol')
-rw-r--r--android/protocol/attach-ui-proxy.c2
-rw-r--r--android/protocol/core-commands-impl.c2
-rw-r--r--android/protocol/fb-updates-proxy.c6
-rw-r--r--android/protocol/ui-commands-proxy.c2
-rw-r--r--android/protocol/user-events-impl.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/android/protocol/attach-ui-proxy.c b/android/protocol/attach-ui-proxy.c
index 191b36d..a0bc7fc 100644
--- a/android/protocol/attach-ui-proxy.c
+++ b/android/protocol/attach-ui-proxy.c
@@ -67,7 +67,7 @@ _attachUiProxy_io_func(void* opaque, int fd, unsigned events)
// Try to read
asyncReader_init(&reader, read_buf, sizeof(read_buf), &uicmd->io);
- status = asyncReader_read(&reader, &uicmd->io);
+ status = asyncReader_read(&reader);
// We expect only error status here.
if (status != ASYNC_ERROR) {
derror("Unexpected read status %d in _attachUiProxy_io_func\n", status);
diff --git a/android/protocol/core-commands-impl.c b/android/protocol/core-commands-impl.c
index 7fa2a0b..4366529 100644
--- a/android/protocol/core-commands-impl.c
+++ b/android/protocol/core-commands-impl.c
@@ -345,7 +345,7 @@ _coreCmdImpl_io_func(void* opaque, int fd, unsigned events)
corecmd = (CoreCmdImpl*)opaque;
// Read whatever is expected from the socket.
- status = asyncReader_read(&corecmd->async_reader, &corecmd->io);
+ status = asyncReader_read(&corecmd->async_reader);
switch (status) {
case ASYNC_COMPLETE:
switch (corecmd->cmd_state) {
diff --git a/android/protocol/fb-updates-proxy.c b/android/protocol/fb-updates-proxy.c
index ec7414d..c1b431e 100644
--- a/android/protocol/fb-updates-proxy.c
+++ b/android/protocol/fb-updates-proxy.c
@@ -156,7 +156,7 @@ _proxyFb_io_write(ProxyFramebuffer* proxy_fb)
FBUpdateNotify* current_update = proxy_fb->fb_update_head;
// Lets continue writing of the current notification.
const AsyncStatus status =
- asyncWriter_write(&proxy_fb->fb_update_writer, &proxy_fb->io);
+ asyncWriter_write(&proxy_fb->fb_update_writer);
switch (status) {
case ASYNC_COMPLETE:
// Done with the current update. Move on to the next one.
@@ -202,7 +202,7 @@ _proxyFb_io_read(ProxyFramebuffer* proxy_fb)
// Read the request header.
DisplaySurface* dsu;
const AsyncStatus status =
- asyncReader_read(&proxy_fb->fb_req_reader, &proxy_fb->io);
+ asyncReader_read(&proxy_fb->fb_req_reader);
switch (status) {
case ASYNC_COMPLETE:
// Request header is received
@@ -320,7 +320,7 @@ proxyFb_update(void* opaque, int x, int y, int w, int h)
asyncWriter_init(&proxy_fb->fb_update_writer,
&proxy_fb->fb_update_head->message,
proxy_fb->fb_update_head->message_size, &proxy_fb->io);
- status = asyncWriter_write(&proxy_fb->fb_update_writer, &proxy_fb->io);
+ status = asyncWriter_write(&proxy_fb->fb_update_writer);
switch (status) {
case ASYNC_COMPLETE:
fbupdatenotify_delete(descr);
diff --git a/android/protocol/ui-commands-proxy.c b/android/protocol/ui-commands-proxy.c
index 76bf883..1aedc62 100644
--- a/android/protocol/ui-commands-proxy.c
+++ b/android/protocol/ui-commands-proxy.c
@@ -116,7 +116,7 @@ _uiCmdProxy_io_func(void* opaque, int fd, unsigned events)
// Try to read
asyncReader_init(&reader, read_buf, sizeof(read_buf), &uicmd->io);
- status = asyncReader_read(&reader, &uicmd->io);
+ status = asyncReader_read(&reader);
// We expect only error status here.
if (status != ASYNC_ERROR) {
derror("Unexpected read status %d in _uiCmdProxy_io_func\n", status);
diff --git a/android/protocol/user-events-impl.c b/android/protocol/user-events-impl.c
index 5c9525e..7df820e 100644
--- a/android/protocol/user-events-impl.c
+++ b/android/protocol/user-events-impl.c
@@ -90,7 +90,7 @@ _userEventsImpl_io_func(void* opaque, int fd, unsigned events)
ueimpl = (UserEventsImpl*)opaque;
// Read whatever is expected from the socket.
- status = asyncReader_read(&ueimpl->user_events_reader, &ueimpl->io);
+ status = asyncReader_read(&ueimpl->user_events_reader);
switch (status) {