提交 d51638d0 编写于 作者: D Daniel P. Berrange

Rename domain lifecycle event message

To avoid confusion, rename the current REMOTE_PROC_DOMAIN_EVENT
message to REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE. This does not
cause ABI problems, since the names are only relevant at the source
code level. On the wire they encoding is a plain integer whose
value does not change

* src/remote/remote_protocol.x: Rename REMOTE_PROC_DOMAIN_EVENT
  to REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE.
* daemon/remote.c, src/remote/remote_driver.c: Update code for
  renamed event
上级 6bae6677
......@@ -105,7 +105,7 @@ static int remoteRelayDomainEventLifecycle(virConnectPtr conn ATTRIBUTE_UNUSED,
void *opaque)
{
struct qemud_client *client = opaque;
remote_domain_event_msg data;
remote_domain_event_lifecycle_msg data;
if (!client)
return -1;
......@@ -121,8 +121,8 @@ static int remoteRelayDomainEventLifecycle(virConnectPtr conn ATTRIBUTE_UNUSED,
data.detail = detail;
remoteDispatchDomainEventSend (client,
REMOTE_PROC_DOMAIN_EVENT,
(xdrproc_t)xdr_remote_domain_event_msg, &data);
REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE,
(xdrproc_t)xdr_remote_domain_event_lifecycle_msg, &data);
virMutexUnlock(&client->lock);
......
......@@ -537,7 +537,7 @@
.args_filter = (xdrproc_t) xdr_void,
.ret_filter = (xdrproc_t) xdr_remote_domain_events_deregister_ret,
},
{ /* Async event DomainEvent => 107 */
{ /* Async event DomainEventLifecycle => 107 */
.fn = NULL,
.args_filter = (xdrproc_t) xdr_void,
.ret_filter = (xdrproc_t) xdr_void,
......
......@@ -6889,13 +6889,13 @@ done:
static virDomainEventPtr
remoteDomainReadEventLifecycle(virConnectPtr conn, XDR *xdr)
{
remote_domain_event_msg msg;
remote_domain_event_lifecycle_msg msg;
virDomainPtr dom;
virDomainEventPtr event = NULL;
memset (&msg, 0, sizeof msg);
/* unmarshall parameters, and process it*/
if (! xdr_remote_domain_event_msg(xdr, &msg) ) {
if (! xdr_remote_domain_event_lifecycle_msg(xdr, &msg) ) {
error (conn, VIR_ERR_RPC,
_("unable to demarshall lifecycle event"));
return NULL;
......@@ -6906,7 +6906,7 @@ remoteDomainReadEventLifecycle(virConnectPtr conn, XDR *xdr)
return NULL;
event = virDomainEventNewFromDom(dom, msg.event, msg.detail);
xdr_free ((xdrproc_t) &xdr_remote_domain_event_msg, (char *) &msg);
xdr_free ((xdrproc_t) &xdr_remote_domain_event_lifecycle_msg, (char *) &msg);
virDomainFree(dom);
return event;
......@@ -8452,7 +8452,7 @@ processCallDispatchMessage(virConnectPtr conn, struct private_data *priv,
}
switch (hdr->proc) {
case REMOTE_PROC_DOMAIN_EVENT:
case REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE:
event = remoteDomainReadEventLifecycle(conn, xdr);
break;
......
......@@ -2571,7 +2571,7 @@ xdr_remote_domain_events_deregister_ret (XDR *xdrs, remote_domain_events_deregis
}
bool_t
xdr_remote_domain_event_msg (XDR *xdrs, remote_domain_event_msg *objp)
xdr_remote_domain_event_lifecycle_msg (XDR *xdrs, remote_domain_event_lifecycle_msg *objp)
{
if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
......
......@@ -1456,12 +1456,12 @@ struct remote_domain_events_deregister_ret {
};
typedef struct remote_domain_events_deregister_ret remote_domain_events_deregister_ret;
struct remote_domain_event_msg {
struct remote_domain_event_lifecycle_msg {
remote_nonnull_domain dom;
int event;
int detail;
};
typedef struct remote_domain_event_msg remote_domain_event_msg;
typedef struct remote_domain_event_lifecycle_msg remote_domain_event_lifecycle_msg;
struct remote_domain_xml_from_native_args {
remote_nonnull_string nativeFormat;
......@@ -1837,7 +1837,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_MEMORY_PEEK = 104,
REMOTE_PROC_DOMAIN_EVENTS_REGISTER = 105,
REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER = 106,
REMOTE_PROC_DOMAIN_EVENT = 107,
REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE = 107,
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2 = 108,
REMOTE_PROC_DOMAIN_MIGRATE_FINISH2 = 109,
REMOTE_PROC_GET_URI = 110,
......@@ -2166,7 +2166,7 @@ extern bool_t xdr_remote_node_device_create_xml_ret (XDR *, remote_node_device_
extern bool_t xdr_remote_node_device_destroy_args (XDR *, remote_node_device_destroy_args*);
extern bool_t xdr_remote_domain_events_register_ret (XDR *, remote_domain_events_register_ret*);
extern bool_t xdr_remote_domain_events_deregister_ret (XDR *, remote_domain_events_deregister_ret*);
extern bool_t xdr_remote_domain_event_msg (XDR *, remote_domain_event_msg*);
extern bool_t xdr_remote_domain_event_lifecycle_msg (XDR *, remote_domain_event_lifecycle_msg*);
extern bool_t xdr_remote_domain_xml_from_native_args (XDR *, remote_domain_xml_from_native_args*);
extern bool_t xdr_remote_domain_xml_from_native_ret (XDR *, remote_domain_xml_from_native_ret*);
extern bool_t xdr_remote_domain_xml_to_native_args (XDR *, remote_domain_xml_to_native_args*);
......@@ -2453,7 +2453,7 @@ extern bool_t xdr_remote_node_device_create_xml_ret ();
extern bool_t xdr_remote_node_device_destroy_args ();
extern bool_t xdr_remote_domain_events_register_ret ();
extern bool_t xdr_remote_domain_events_deregister_ret ();
extern bool_t xdr_remote_domain_event_msg ();
extern bool_t xdr_remote_domain_event_lifecycle_msg ();
extern bool_t xdr_remote_domain_xml_from_native_args ();
extern bool_t xdr_remote_domain_xml_from_native_ret ();
extern bool_t xdr_remote_domain_xml_to_native_args ();
......
......@@ -1304,7 +1304,7 @@ struct remote_domain_events_deregister_ret {
int cb_registered;
};
struct remote_domain_event_msg {
struct remote_domain_event_lifecycle_msg {
remote_nonnull_domain dom;
int event;
int detail;
......@@ -1660,7 +1660,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_MEMORY_PEEK = 104,
REMOTE_PROC_DOMAIN_EVENTS_REGISTER = 105,
REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER = 106,
REMOTE_PROC_DOMAIN_EVENT = 107,
REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE = 107,
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2 = 108,
REMOTE_PROC_DOMAIN_MIGRATE_FINISH2 = 109,
REMOTE_PROC_GET_URI = 110,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册