aboutsummaryrefslogtreecommitdiffstats
path: root/android/hw-qemud.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2011-08-12 12:15:25 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2011-08-12 12:15:25 -0700
commit5297e197c131258f3b115d1fc4ab608224b39bb9 (patch)
tree83423f8114c60c161b7b73b5085e21568c29a8df /android/hw-qemud.c
parenteef5de0efa2f00614f6d7a24cf117f677ddd3726 (diff)
downloadexternal_qemu-5297e197c131258f3b115d1fc4ab608224b39bb9.zip
external_qemu-5297e197c131258f3b115d1fc4ab608224b39bb9.tar.gz
external_qemu-5297e197c131258f3b115d1fc4ab608224b39bb9.tar.bz2
Fix fron report on unexpected qemud char channel close.
Change-Id: Ib6a1f3ff7a77ae35d6b3b264752f9f62122e60fc
Diffstat (limited to 'android/hw-qemud.c')
-rw-r--r--android/hw-qemud.c16
1 files changed, 15 insertions, 1 deletions
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");
+ }
}