]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: agent: Fix incorrect and weird debug/warning log entries
authorPeter Krempa <pkrempa@redhat.com>
Fri, 8 Apr 2016 08:08:37 +0000 (10:08 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 11 Apr 2016 07:48:13 +0000 (09:48 +0200)
Replace the nonsensical debug statement by adding the expected event
code into the existing debug statement.

Since the monitor code always notifies the agent on guest
reboot/shutdown even if that was not initiated by the agent the warning
emitted later is bogus and pollutes the logs in such cases. Delete it
and keep just the original debug message where this info can be
inferred.

src/qemu/qemu_agent.c

index bee8d4ca74dc2e2bbd8d73941a7adcd7eb38eb8e..559d79fc0a52405f7f503920a711aac38a40dfdc 100644 (file)
@@ -1230,19 +1230,14 @@ qemuAgentMakeStringsArray(const char **strings, unsigned int len)
 void qemuAgentNotifyEvent(qemuAgentPtr mon,
                           qemuAgentEvent event)
 {
-    VIR_DEBUG("mon=%p event=%d", mon, event);
+    VIR_DEBUG("mon=%p event=%d await_event=%d", mon, event, mon->await_event);
     if (mon->await_event == event) {
-        VIR_DEBUG("Waking up a tragedian");
         mon->await_event = QEMU_AGENT_EVENT_NONE;
         /* somebody waiting for this event, wake him up. */
         if (mon->msg && !mon->msg->finished) {
             mon->msg->finished = 1;
             virCondSignal(&mon->notify);
         }
-    } else {
-        /* shouldn't happen but one never knows */
-        VIR_WARN("Received unexpected event %d (expected %d)",
-                 event, mon->await_event);
     }
 }