Lines Matching refs:node

37 	struct dsync_mailbox_node *node;
39 node = dsync_mailbox_tree_get(tree, name);
40 memcpy(node->mailbox_guid, &counter, sizeof(counter));
41 node->uid_validity = counter;
42 node->existence = DSYNC_MAILBOX_NODE_EXISTS;
43 node->last_renamed_or_created = last_renamed_or_created;
44 return node;
66 struct dsync_mailbox_node *node;
70 node = node_create(tree, *counter, *names, 0);
71 node->existence = DSYNC_MAILBOX_NODE_DELETED;
112 struct dsync_mailbox_node *node;
114 for (node = *pos; node != NULL; node = node->next) {
115 if (node->sync_delayed_guid_change) {
119 memcpy(node->mailbox_guid, newguid_counter,
121 node->uid_validity = *newguid_counter;
124 if (node->existence == DSYNC_MAILBOX_NODE_DELETED)
125 node->existence = DSYNC_MAILBOX_NODE_NONEXISTENT;
126 test_tree_nodes_fixup(&node->first_child, newguid_counter);
127 if (node->existence != DSYNC_MAILBOX_NODE_EXISTS &&
128 node->first_child == NULL) {
129 /* nonexistent node, drop it */
130 *pos = node->next;
132 pos = &node->next;
144 static void nodes_dump(const struct dsync_mailbox_node *node, unsigned int depth)
148 for (; node != NULL; node = node->next) {
150 printf("%-*s guid:%.5s uidv:%u %d%d %ld\n", 40-depth, node->name,
151 guid_128_to_string(node->mailbox_guid), node->uid_validity,
152 node->existence, node->subscribed ? 1 : 0,
153 (long)node->last_renamed_or_created);
154 nodes_dump(node->first_child, depth+1);
222 test_tree_nodes_add_namespace(struct dsync_mailbox_node *node,
225 for (; node != NULL; node = node->next) {
226 node->ns = ns;
227 test_tree_nodes_add_namespace(node->first_child, ns);
235 struct dsync_mailbox_node *node, *n;
237 node = dsync_mailbox_tree_get(tree, TEST_NAMESPACE_NAME);
238 node->existence = DSYNC_MAILBOX_NODE_EXISTS;
239 i_assert(tree->root.first_child == node);
240 i_assert(node->first_child == NULL);
241 node->first_child = node->next;
242 for (n = node->first_child; n != NULL; n = n->next)
243 n->parent = node;
244 node->next = NULL;
310 struct dsync_mailbox_node *node;
318 node = dsync_mailbox_tree_get(tree1, "1");
319 node->name = "a";
320 node->last_renamed_or_created = 1000;
321 node = dsync_mailbox_tree_get(tree2, "2");
322 node->name = "b";
323 node->last_renamed_or_created = 1000;
325 node = dsync_mailbox_tree_get(tree1, "3/s3");
326 node->name = "z";
327 node->last_renamed_or_created = 1000;
328 dsync_mailbox_tree_node_detach(node);
329 dsync_mailbox_tree_node_attach(node, &tree1->root);