From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkfJI-0003Yv-0M for qemu-devel@nongnu.org; Thu, 25 Feb 2010 10:07:28 -0500 Received: from [199.232.76.173] (port=38077 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkfJH-0003YX-GE for qemu-devel@nongnu.org; Thu, 25 Feb 2010 10:07:27 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NkfJG-0008Qr-Ho for qemu-devel@nongnu.org; Thu, 25 Feb 2010 10:07:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43514) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NkfJG-0008Qn-5i for qemu-devel@nongnu.org; Thu, 25 Feb 2010 10:07:26 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1PF7Pmd016148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Feb 2010 10:07:25 -0500 Received: from localhost (vpn-9-86.rdu.redhat.com [10.11.9.86]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1PF7NRv014233 for ; Thu, 25 Feb 2010 10:07:24 -0500 From: Luiz Capitulino Date: Thu, 25 Feb 2010 12:06:59 -0300 Message-Id: <1267110422-25873-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1267110422-25873-1-git-send-email-lcapitulino@redhat.com> References: <1267110422-25873-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 2/5] QMP: Move STOP event into do_vm_stop() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I've introduced the STOP event in the main loop, this is wrong as it will be only emitted if the io thread is enabled. This fixes that by moving the STOP event to do_vm_stop(). Signed-off-by: Luiz Capitulino --- vl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index db7a178..1735dd2 100644 --- a/vl.c +++ b/vl.c @@ -3106,6 +3106,7 @@ static void do_vm_stop(int reason) vm_running = 0; pause_all_vcpus(); vm_state_notify(0, reason); + monitor_protocol_event(QEVENT_STOP, NULL); } } @@ -4073,7 +4074,6 @@ static void main_loop(void) qemu_irq_raise(qemu_system_powerdown); } if ((r = qemu_vmstop_requested())) { - monitor_protocol_event(QEVENT_STOP, NULL); vm_stop(r); } } -- 1.7.0.GIT