提交 de463feb 编写于 作者: C Cédric Bosdonnat 提交者: Daniel P. Berrange

virObject-ified virDomainEvent

Added a parent class virObjectEvent for future event types
上级 6893f376
......@@ -125,7 +125,6 @@ useless_free_options = \
--name=virDomainDeviceDefFree \
--name=virDomainDiskDefFree \
--name=virDomainEventCallbackListFree \
--name=virDomainEventFree \
--name=virObjectEventQueueFree \
--name=virObjectEventStateFree \
--name=virDomainFSDefFree \
......@@ -205,7 +204,6 @@ useless_free_options = \
# y virDomainDeviceDefFree
# y virDomainDiskDefFree
# y virDomainEventCallbackListFree
# y virDomainEventFree
# y virDomainEventQueueFree
# y virDomainFSDefFree
# n virDomainFree
......
此差异已折叠。
......@@ -35,6 +35,9 @@ typedef virObjectEventCallback *virObjectEventCallbackPtr;
* Dispatching domain events that come in while
* in a call / response rpc
*/
typedef struct _virObjectEvent virObjectEvent;
typedef virObjectEvent *virObjectEventPtr;
typedef struct _virDomainEvent virDomainEvent;
typedef virDomainEvent *virDomainEventPtr;
......@@ -131,8 +134,6 @@ virDomainEventPtr virDomainEventDeviceRemovedNewFromObj(virDomainObjPtr obj,
virDomainEventPtr virDomainEventDeviceRemovedNewFromDom(virDomainPtr dom,
const char *devAlias);
void virDomainEventFree(virDomainEventPtr event);
void virObjectEventStateFree(virObjectEventStatePtr state);
virObjectEventStatePtr
virObjectEventStateNew(void);
......
......@@ -424,7 +424,6 @@ virDomainEventDeviceRemovedNewFromDom;
virDomainEventDeviceRemovedNewFromObj;
virDomainEventDiskChangeNewFromDom;
virDomainEventDiskChangeNewFromObj;
virDomainEventFree;
virDomainEventGraphicsNewFromDom;
virDomainEventGraphicsNewFromObj;
virDomainEventIOErrorNewFromDom;
......
......@@ -13449,7 +13449,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
QEMU_ASYNC_JOB_NONE);
if (rc < 0)
goto endjob;
virDomainEventFree(event);
virObjectUnref(event);
event = NULL;
if (was_stopped) {
/* Transition 2 */
......
......@@ -7035,7 +7035,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
} /* else transition 6 and 9 use event as-is */
} else {
/* Transitions 2, 5, 8 */
virDomainEventFree(event);
virObjectUnref(event);
event = NULL;
if (was_stopped) {
......@@ -7089,7 +7089,7 @@ cleanup:
if (event2)
testDomainEventQueue(privconn, event2);
} else {
virDomainEventFree(event2);
virObjectUnref(event2);
}
virObjectUnlock(vm);
testDriverUnlock(privconn);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册