diff options
author | kraxel <kraxel> | 2006-01-26 17:00:38 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2006-01-26 17:00:38 +0000 |
commit | 22f7a6378b21e15d6d916b97430cdb9e84e507d7 (patch) | |
tree | 1ef31de56068225c646a40fa4352fe3409f28a04 /xd_store.c | |
parent | 8cefbcf1e028004efa70f2f1956fbc9d25c8b372 (diff) | |
download | xenwatch-22f7a6378b21e15d6d916b97430cdb9e84e507d7.tar.gz |
- mdns server first cut done.
Diffstat (limited to 'xd_store.c')
-rw-r--r-- | xd_store.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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); |