From 22f7a6378b21e15d6d916b97430cdb9e84e507d7 Mon Sep 17 00:00:00 2001 From: kraxel Date: Thu, 26 Jan 2006 17:00:38 +0000 Subject: - mdns server first cut done. --- xd_store.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'xd_store.c') diff --git a/xd_store.c b/xd_store.c index 4e892cc..0f124a0 100644 --- a/xd_store.c +++ b/xd_store.c @@ -260,7 +260,7 @@ static void watch_handle_one(XenDoms *xd) { char **vec = NULL; unsigned int count; - struct xs_transaction_handle *xst; + xs_transaction_t xst; struct xd_node *node; char *xs_value = NULL; char xs_path[256], id[32]; @@ -275,7 +275,7 @@ static void watch_handle_one(XenDoms *xd) goto out; } - if (NULL == (xst = xs_transaction_start(xd->xenstore))) + if (!(xst = xs_transaction_start(xd->xenstore))) goto out; xs_value = xs_read(xd->xenstore, xst, vec[XS_WATCH_PATH], NULL); xs_transaction_end(xd->xenstore, xst, 0); @@ -400,7 +400,7 @@ static gboolean watch_trigger(GIOChannel *source, GIOCondition condition, static void xen_doms_init(XenDoms *xd) { - struct xs_transaction_handle *xst; + xs_transaction_t xst; unsigned int i, num; char **list; char path[256]; @@ -431,7 +431,7 @@ xen_doms_init(XenDoms *xd) xd->ch = g_io_channel_unix_new(xs_fileno(xd->xenstore)); xd->id = g_io_add_watch(xd->ch, G_IO_IN, watch_trigger, xd); - if (NULL == (xst = xs_transaction_start(xd->xenstore))) + if (!(xst = xs_transaction_start(xd->xenstore))) return; list = xs_directory(xd->xenstore, xst, XS_DOM_WATCH , &num); xs_transaction_end(xd->xenstore, xst, 0); @@ -547,7 +547,7 @@ static int xen_doms_xs_path(XenDoms *xd, char *path, int len, struct xs_data *field, struct xd_node *node) { - struct xs_transaction_handle *xst; + xs_transaction_t xst; switch (field->mode) { case DOM: @@ -556,7 +556,7 @@ xen_doms_xs_path(XenDoms *xd, char *path, int len, case VM: if (NULL == node->xs_vm_path) { snprintf(path, len, "%s/%s", node->xs_dom_path, "vm"); - if (NULL == (xst = xs_transaction_start(xd->xenstore))) + if (!(xst = xs_transaction_start(xd->xenstore))) return -1; node->xs_vm_path = xs_read(xd->xenstore, xst, path, NULL); xs_transaction_end(xd->xenstore, xst, 0); @@ -576,7 +576,7 @@ xen_doms_get_value(GtkTreeModel *tree_model, { XenDoms *xd = XEN_DOMS(tree_model); enum xen_doms_cols column = index; - struct xs_transaction_handle *xst; + xs_transaction_t xst; struct xd_node *node = iter->user_data; char *xs_value; char path[256]; @@ -593,7 +593,7 @@ xen_doms_get_value(GtkTreeModel *tree_model, default: if (0 != xen_doms_xs_path(xd, path, sizeof(path), xs_fields+column, node)) break; - if (NULL == (xst = xs_transaction_start(xd->xenstore))) + if (!(xst = xs_transaction_start(xd->xenstore))) break; xs_value = xs_read(xd->xenstore, xst, path, NULL); xs_transaction_end(xd->xenstore, xst, 0); -- cgit