aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_event.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2012-10-18 09:35:09 +0100
committerIan Campbell <ian.campbell@citrix.com>2012-10-18 09:35:09 +0100
commitb3b123b5a943cd2e289c6cb429836f6b16648771 (patch)
tree292d5282b3a330887a69287562cfe0824c806e23 /tools/libxl/libxl_event.c
parent191e485a1929a02706ec3301f3185b2b89c3253f (diff)
downloadxen-b3b123b5a943cd2e289c6cb429836f6b16648771.tar.gz
xen-b3b123b5a943cd2e289c6cb429836f6b16648771.tar.bz2
xen-b3b123b5a943cd2e289c6cb429836f6b16648771.zip
libxl: propagate user supplied values into event for_user field.
This was ommited in the majority of cases. Add as a parameter to libxl__event_new and the NEW_EVENT wrapper to help prevent it being forgotten in the future. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_event.c')
-rw-r--r--tools/libxl/libxl_event.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c
index aea58bbb6e..e9e2fdc277 100644
--- a/tools/libxl/libxl_event.c
+++ b/tools/libxl/libxl_event.c
@@ -1157,7 +1157,8 @@ void libxl_event_free(libxl_ctx *ctx, libxl_event *event)
}
libxl_event *libxl__event_new(libxl__egc *egc,
- libxl_event_type type, uint32_t domid)
+ libxl_event_type type, uint32_t domid,
+ libxl_ev_user for_user)
{
EGC_GC;
libxl_event *ev;
@@ -1168,6 +1169,7 @@ libxl_event *libxl__event_new(libxl__egc *egc,
libxl_event_init_type(ev, type);
ev->domid = domid;
+ ev->for_user = for_user;
return ev;
}
@@ -1528,9 +1530,8 @@ void libxl__ao_complete_check_progress_reports(libxl__egc *egc, libxl__ao *ao)
LIBXL_TAILQ_INSERT_TAIL(&egc->aos_for_callback, ao, entry_for_callback);
} else {
libxl_event *ev;
- ev = NEW_EVENT(egc, OPERATION_COMPLETE, ao->domid);
+ ev = NEW_EVENT(egc, OPERATION_COMPLETE, ao->domid, ao->how.u.for_event);
if (ev) {
- ev->for_user = ao->how.u.for_event;
ev->u.operation_complete.rc = ao->rc;
libxl__event_occurred(egc, ev);
}
@@ -1662,7 +1663,6 @@ void libxl__ao_progress_report(libxl__egc *egc, libxl__ao *ao,
const libxl_asyncprogress_how *how, libxl_event *ev)
{
AO_GC;
- ev->for_user = how->for_event;
if (how->callback == dummy_asyncprogress_callback_ignore) {
LOG(DEBUG,"ao %p: progress report: ignored",ao);
libxl_event_free(CTX,ev);