4d975de libxl: queue domain event earlier in shutdown handler

Authored and Committed by Jim Fehlig 10 years ago
    libxl: queue domain event earlier in shutdown handler
    
    The shutdown handler may restart a domain when handling a reboot
    event or when <on_*> is set to 'restart'.  Restarting consists of
    calling libxlVmCleanup followed by libxlVmStart.  libxlVmStart will
    emit a VIR_DOMAIN_EVENT_STARTED event, but the SHUTDOWN event is
    not emitted until exiting the shutdown handler, after the STARTED
    event.
    
    This patch changes the logic a bit to queue the event at the start
    of the shutdown action, ensuring it is queued before any subsequent
    events that may be generated while executing the shutdown action.
    
    Signed-off-by: Jim Fehlig <jfehlig@suse.com>
    
        
file modified
+8 -0