From 5297e197c131258f3b115d1fc4ab608224b39bb9 Mon Sep 17 00:00:00 2001 From: Vladimir Chtchetkine Date: Fri, 12 Aug 2011 12:15:25 -0700 Subject: Fix fron report on unexpected qemud char channel close. Change-Id: Ib6a1f3ff7a77ae35d6b3b264752f9f62122e60fc --- android/hw-qemud.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'android/hw-qemud.c') diff --git a/android/hw-qemud.c b/android/hw-qemud.c index 9bfeaff..7020723 100644 --- a/android/hw-qemud.c +++ b/android/hw-qemud.c @@ -2124,8 +2124,22 @@ _qemud_char_client_recv( void* opaque, uint8_t* msg, int msglen, */ static void _qemud_char_client_close( void* opaque ) + { - derror("unexpected qemud char. channel close"); + QemudClient* client = opaque; + + /* At this point modem driver still uses char pipe to communicate with + * hw-qemud, while communication with the guest is done over qemu pipe. + * So, when guest disconnects from the qemu pipe, and emulator-side client + * goes through the disconnection process, this routine is called, since it + * has been set to called during service registration. Unless modem driver + * is changed to drop char pipe communication, this routine will be called + * due to guest disconnection. As long as the client was a qemu pipe - based + * client, it's fine, since we don't really need to do anything in this case. + */ + if (!_is_pipe_client(client)) { + derror("unexpected qemud char. channel close"); + } } -- cgit v1.1