search for: xs_count_str

Displaying 2 results from an estimated 2 matches for "xs_count_str".

2012 Sep 19
5
[PATCH] libxenstore: filter watch events in libxenstore when we unwatch
..._lock(&h->watch_mutex); + + if (list_empty(&h->watch_list)) { + mutex_unlock(&h->watch_mutex); + return res; + } + + list_for_each_entry_safe(msg, tmsg, &h->watch_list, list) { + assert(msg->hdr.type == XS_WATCH_EVENT); + + strings = msg->body; + num_strings = xs_count_strings(strings, msg->hdr.len); + + for (i = 0; i < num_strings; i++) { + if (i == XS_WATCH_TOKEN && !strcmp (token, strings)) { + list_del(&msg->list); + free(msg); + break; + } + strings = strings + strlen (strings) + 1; + } + } + + /* Clear the pipe token if the...
2005 Aug 04
0
[PATCH 6/11] Xenstore watch rework
...rms(struct connection *conn, struct buffered_data *in) + send_error(conn, errno); + else + send_reply(conn, XS_GET_PERMS, strings, len); +} + +static void do_set_perms(struct connection *conn, struct buffered_data *in) { unsigned int num; char *node; struct xs_permissions *perms; num = xs_count_strings(in->buffer, in->used); - if (num < 2) - return send_error(conn, EINVAL); + if (num < 2) { + send_error(conn, EINVAL); + return; + } /* First arg is node name. */ node = canonicalize(conn, in->buffer); in->buffer += strlen(in->buffer) + 1; num--; - if (!within...