aboutsummaryrefslogtreecommitdiffstats
path: root/android/console.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2011-01-20 11:22:32 -0800
committerVladimir Chtchetkine <vchtchetkine@google.com>2011-01-20 11:22:32 -0800
commit6ee1c4edbd30b7c7aff9d6e13793207278aa1660 (patch)
tree6b0c00f806dfb8432cb7468bc725f9698d6b617b /android/console.c
parenta228e1347525147daa619b99ad4f832b78788cd1 (diff)
downloadexternal_qemu-6ee1c4edbd30b7c7aff9d6e13793207278aa1660.zip
external_qemu-6ee1c4edbd30b7c7aff9d6e13793207278aa1660.tar.gz
external_qemu-6ee1c4edbd30b7c7aff9d6e13793207278aa1660.tar.bz2
Fix framebuffer and user events service disconnection bug.
FB and UE services overwrite the socket's read callbacks, making the console unavare of the fact that console client gets disconnected. As the result, console clients for FB and UE stays alive after UI has exited, making it impossible to attach another UI. To fix this, we add socket read callbacks to the FB and UE service that monitor the disconnection event and destroy their console clients on such events. Change-Id: I82e714f33ccc81bc04ca47eda6fbb8fab4a313f9
Diffstat (limited to 'android/console.c')
-rw-r--r--android/console.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/android/console.c b/android/console.c
index 6f9e26b..4c3548a 100644
--- a/android/console.c
+++ b/android/console.c
@@ -2550,6 +2550,14 @@ do_create_framebuffer_service( ControlClient client, char* args )
return 0;
}
+void
+destroy_control_fb_client(void)
+{
+ if (framebuffer_client != NULL) {
+ control_client_destroy(framebuffer_client);
+ }
+}
+
static int
do_create_user_events_service( ControlClient client, char* args )
{
@@ -2575,6 +2583,14 @@ do_create_user_events_service( ControlClient client, char* args )
return 0;
}
+
+void
+destroy_control_ue_client(void)
+{
+ if (user_events_client != NULL) {
+ control_client_destroy(user_events_client);
+ }
+}
#endif // CONFIG_STANDALONE_CORE
static const CommandDefRec qemu_commands[] =