Change the callback prototype and fix the callback registered in the process code. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_monitor.h | 10 +++++----- src/qemu/qemu_process.c | 13 ++++--------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 4ad14adb8b..caec6a424c 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -310,11 +310,11 @@ typedef void (*qemuMonitorDomainDumpCompletedCallback)(qemuMonitor *mon, const char *error, void *opaque); -typedef int (*qemuMonitorDomainPRManagerStatusChangedCallback)(qemuMonitor *mon, - virDomainObj *vm, - const char *prManager, - bool connected, - void *opaque); +typedef void (*qemuMonitorDomainPRManagerStatusChangedCallback)(qemuMonitor *mon, + virDomainObj *vm, + const char *prManager, + bool connected, + void *opaque); typedef int (*qemuMonitorDomainRdmaGidStatusChangedCallback)(qemuMonitor *mon, virDomainObj *vm, diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d7935fc03e..1c9327e179 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1703,7 +1703,7 @@ qemuProcessHandleDumpCompleted(qemuMonitor *mon G_GNUC_UNUSED, } -static int +static void qemuProcessHandlePRManagerStatusChanged(qemuMonitor *mon G_GNUC_UNUSED, virDomainObj *vm, const char *prManager, @@ -1714,24 +1714,21 @@ qemuProcessHandlePRManagerStatusChanged(qemuMonitor *mon G_GNUC_UNUSED, qemuDomainObjPrivate *priv; struct qemuProcessEvent *processEvent = NULL; const char *managedAlias = qemuDomainGetManagedPRAlias(); - int ret = -1; virObjectLock(vm); VIR_DEBUG("pr-manager %s status changed for domain %p %s connected=%d", prManager, vm, vm->def->name, connected); - if (connected) { - /* Connect events are boring. */ - ret = 0; + /* Connect events are boring. */ + if (connected) goto cleanup; - } + /* Disconnect events are more interesting. */ if (STRNEQ(prManager, managedAlias)) { VIR_DEBUG("pr-manager %s not managed, ignoring event", prManager); - ret = 0; goto cleanup; } @@ -1749,10 +1746,8 @@ qemuProcessHandlePRManagerStatusChanged(qemuMonitor *mon G_GNUC_UNUSED, goto cleanup; } - ret = 0; cleanup: virObjectUnlock(vm); - return ret; } -- 2.31.1