mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Fix PMSuspend and PMWakeup events
The unused reason parameter of PM{Suspend,Wakeup} event callbacks was completely ignored in lot of places and those events were not actually working at all.
This commit is contained in:
parent
51907779ee
commit
afab4824eb
@ -536,6 +536,7 @@ static int remoteRelayDomainEventTrayChange(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
static int remoteRelayDomainEventPMWakeup(virConnectPtr conn ATTRIBUTE_UNUSED,
|
static int remoteRelayDomainEventPMWakeup(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||||
virDomainPtr dom,
|
virDomainPtr dom,
|
||||||
|
int reason ATTRIBUTE_UNUSED,
|
||||||
void *opaque) {
|
void *opaque) {
|
||||||
virNetServerClientPtr client = opaque;
|
virNetServerClientPtr client = opaque;
|
||||||
remote_domain_event_pmwakeup_msg data;
|
remote_domain_event_pmwakeup_msg data;
|
||||||
@ -558,6 +559,7 @@ static int remoteRelayDomainEventPMWakeup(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
static int remoteRelayDomainEventPMSuspend(virConnectPtr conn ATTRIBUTE_UNUSED,
|
static int remoteRelayDomainEventPMSuspend(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||||
virDomainPtr dom,
|
virDomainPtr dom,
|
||||||
|
int reason ATTRIBUTE_UNUSED,
|
||||||
void *opaque) {
|
void *opaque) {
|
||||||
virNetServerClientPtr client = opaque;
|
virNetServerClientPtr client = opaque;
|
||||||
remote_domain_event_pmsuspend_msg data;
|
remote_domain_event_pmsuspend_msg data;
|
||||||
|
@ -377,7 +377,7 @@ static int myDomainEventPMWakeupCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
int reason ATTRIBUTE_UNUSED,
|
int reason ATTRIBUTE_UNUSED,
|
||||||
void *opaque ATTRIBUTE_UNUSED)
|
void *opaque ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
printf("%s EVENT: Domain %s(%d) system pmwakeup",
|
printf("%s EVENT: Domain %s(%d) system pmwakeup\n",
|
||||||
__func__, virDomainGetName(dom), virDomainGetID(dom));
|
__func__, virDomainGetName(dom), virDomainGetID(dom));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -387,7 +387,7 @@ static int myDomainEventPMSuspendCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
int reason ATTRIBUTE_UNUSED,
|
int reason ATTRIBUTE_UNUSED,
|
||||||
void *opaque ATTRIBUTE_UNUSED)
|
void *opaque ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
printf("%s EVENT: Domain %s(%d) system pmsuspend",
|
printf("%s EVENT: Domain %s(%d) system pmsuspend\n",
|
||||||
__func__, virDomainGetName(dom), virDomainGetID(dom));
|
__func__, virDomainGetName(dom), virDomainGetID(dom));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -5331,7 +5331,7 @@ libvirt_virConnectDomainEventPMWakeupCallback(virConnectPtr conn ATTRIBUTE_UNUSE
|
|||||||
/* Call the Callback Dispatcher */
|
/* Call the Callback Dispatcher */
|
||||||
pyobj_ret = PyObject_CallMethod(pyobj_conn,
|
pyobj_ret = PyObject_CallMethod(pyobj_conn,
|
||||||
(char*)"_dispatchDomainEventPMWakeupCallback",
|
(char*)"_dispatchDomainEventPMWakeupCallback",
|
||||||
(char*)"OO",
|
(char*)"OiO",
|
||||||
pyobj_dom,
|
pyobj_dom,
|
||||||
reason,
|
reason,
|
||||||
pyobj_cbData);
|
pyobj_cbData);
|
||||||
@ -5378,7 +5378,7 @@ libvirt_virConnectDomainEventPMSuspendCallback(virConnectPtr conn ATTRIBUTE_UNUS
|
|||||||
/* Call the Callback Dispatcher */
|
/* Call the Callback Dispatcher */
|
||||||
pyobj_ret = PyObject_CallMethod(pyobj_conn,
|
pyobj_ret = PyObject_CallMethod(pyobj_conn,
|
||||||
(char*)"_dispatchDomainEventPMSuspendCallback",
|
(char*)"_dispatchDomainEventPMSuspendCallback",
|
||||||
(char*)"OO",
|
(char*)"OiO",
|
||||||
pyobj_dom,
|
pyobj_dom,
|
||||||
reason,
|
reason,
|
||||||
pyobj_cbData);
|
pyobj_cbData);
|
||||||
|
Loading…
Reference in New Issue
Block a user