/dovecot/src/lib/ |
H A D | test-llist.c | 13 struct dllist *head = NULL, *l4, *l3, *l2, *l1; local 22 DLLIST_PREPEND(&head, l4); 23 test_assert(head == l4); 25 DLLIST_PREPEND(&head, l3); 26 test_assert(head == l3); 29 DLLIST_PREPEND(&head, l2); 30 DLLIST_PREPEND(&head, l1); 32 DLLIST_REMOVE(&head, l2); 34 test_assert(head == l1); 38 /* remove from head */ 66 struct dllist *head = NULL, *tail = NULL, *l4, *l3, *l2, *l1; local [all...] |
H A D | aqueue.c | 31 i_assert(aqueue->full && aqueue->head == aqueue->tail); 39 count = I_MIN(aqueue->area_size - orig_area_size, aqueue->head); 42 aqueue->head = orig_area_size + count; 45 aqueue->head - count); 46 aqueue->head -= count; 49 i_assert(aqueue->head != aqueue->tail); 60 array_idx_set_i(aqueue->arr, aqueue->head, data); 61 aqueue->head = (aqueue->head + 1) % aqueue->area_size; 62 aqueue->full = aqueue->head [all...] |
H A D | llist.h | 30 /* Doubly linked list with head and tail */ 31 #define DLLIST2_PREPEND_FULL(head, tail, item, prev, next) STMT_START { \ 33 (item)->next = *(head); \ 34 if (*(head) != NULL) (*(head))->prev = (item); else (*tail) = (item); \ 35 *(head) = (item); \ 38 #define DLLIST2_PREPEND(head, tail, item) \ 39 DLLIST2_PREPEND_FULL(head, tail, item, prev, next) 41 #define DLLIST2_APPEND_FULL(head, tail, item, prev, next) STMT_START { \ 44 if (*(tail) != NULL) (*(tail))->next = (item); else (*head) [all...] |
H A D | aqueue.h | 15 unsigned int head, tail, area_size; member in struct:aqueue 22 /* Append item to head */
|
H A D | ostream-file.c | 26 ((fstream)->head == (fstream)->tail && !(fstream)->full) 67 if (fstream->head == fstream->tail) 69 else if (fstream->head < fstream->tail) { 71 return fstream->tail - fstream->head; 75 (fstream->buffer_size - fstream->head); 86 if (fstream->head < fstream->tail) { 88 used = fstream->tail - fstream->head; 90 fstream->head += size; 93 used = fstream->buffer_size - fstream->head; 97 fstream->head [all...] |
H A D | istream-chain.c | 18 struct istream_chain_link *head, *tail; member in struct:istream_chain 52 if (chain->head == NULL && stream != NULL) { 65 DLLIST2_APPEND(&chain->head, &chain->tail, link); 87 struct istream_chain_link *link = cstream->chain.head; 101 struct istream_chain_link *link = cstream->chain.head; 115 struct istream_chain_link *link = cstream->chain.head; 126 DLLIST2_REMOVE(&cstream->chain.head, &cstream->chain.tail, link); 131 link = cstream->chain.head; 167 struct istream_chain_link *link = cstream->chain.head; 199 struct istream_chain_link *link = cstream->chain.head; [all...] |
H A D | ostream-file-private.h | 20 size_t head, tail; /* first unsent/unused byte */ member in struct:file_ostream 22 bool full:1; /* if head == tail, is buffer empty or full? */
|
H A D | hook-build.c | 27 struct hook_stack *head, *tail; member in struct:hook_build_context 37 DLLIST2_APPEND(&ctx->head, &ctx->tail, stack);
|
H A D | test-aqueue.c | 35 aqueue->head = aqueue->tail = initial_size - 1;
|
/dovecot/src/lib-index/ |
H A D | mail-transaction-log.c | 20 i_assert(log->head != file); 23 log->head = file; 144 if (log->head != NULL) 145 log->head->refcount--; 180 if (log->head != NULL) 181 return mail_transaction_log_file_move_to_memory(log->head); 203 if (log->head != NULL && 204 log->head->hdr.indexid != log->index->indexid) { 205 if (--log->head->refcount == 0) 206 mail_transaction_log_file_free(&log->head); [all...] |
H A D | mail-transaction-log-view-private.h | 19 struct mail_transaction_log_file *cur, *head, *tail; member in struct:mail_transaction_log_view
|
H A D | test-mail-index-modseq.c | 58 test_assert(mail_transaction_log_file_lock(index->log->head) == 0); 60 mail_transaction_log_file_unlock(index->log->head, "rotating");
|
H A D | mail-transaction-log-append.c | 35 MAIL_TRANSACTION_LOG_HDR_VERSION(&ctx->log->head->hdr)); 42 struct mail_transaction_log_file *file = ctx->log->head; 64 struct mail_transaction_log_file *file = ctx->log->head; 119 struct mail_transaction_log_file *file = ctx->log->head; 178 struct mail_transaction_log_file *file = ctx->log->head; 251 mail_transaction_log_file_unlock(index->log->head, "appending");
|
H A D | mail-transaction-log-view.c | 18 i_assert(view->log->head != NULL); 20 view->head = view->tail = view->log->head; 21 view->head->refcount++; 23 array_append(&view->file_refs, &view->head, 1); 157 view->tail = view->head = file = NULL; 187 view->head == view->log->head) { 220 view->head = file; 244 if (max_file_offset < view->head [all...] |
H A D | test-mail-transaction-log-append.c | 45 struct mail_transaction_log_file *file = log->head; 94 struct mail_transaction_log_file *file = log->head; 136 log->head = file = i_new(struct mail_transaction_log_file, 1); 149 /* do this after head->buffer has already been initialized */ 162 buffer_free(&log->head->buffer); 163 i_free(log->head);
|
H A D | mail-index-write.c | 132 hdr->log_file_seq == index->log->head->hdr.file_seq && 136 index->log->head;
|
H A D | mail-transaction-log-private.h | 84 them easily. head contains a pointer to the newest log file. */ 85 struct mail_transaction_log_file *files, *head; member in struct:mail_transaction_log
|
H A D | test-mail-transaction-log-view.c | 90 log->head = file; 154 add_append_record(log->head, &append_rec);
|
/dovecot/src/director/ |
H A D | user-directory.c | 27 struct user *head, *tail; member in struct:user_directory 66 DLLIST2_REMOVE(&dir->head, &dir->tail, user); 105 while (dir->head != NULL && 106 !user_directory_user_has_connections(dir, dir->head, &expire_timestamp)) { 107 user_free(dir, dir->head); 158 DLLIST2_APPEND(&dir->head, &dir->tail, user); 174 DLLIST2_REMOVE(&dir->head, &dir->tail, user); 175 DLLIST2_APPEND(&dir->head, &dir->tail, user); 183 for (user = dir->head; user != NULL; user = next) { 210 i_assert(dir->head [all...] |
/dovecot/src/log/ |
H A D | log-error-buffer.c | 17 struct log_error_data *head, *tail; member in struct:log_error_buffer 39 i_assert(buf->head != NULL); 42 data = buf->head; 43 buf->head = data->next; 72 buf->head = data; 94 iter->cur = buf->head;
|
/dovecot/src/indexer/ |
H A D | indexer-queue.c | 15 struct indexer_request *head, *tail; member in struct:indexer_queue 116 DLLIST2_REMOVE(&queue->head, &queue->tail, request); 120 DLLIST2_APPEND(&queue->head, &queue->tail, request); 122 DLLIST2_PREPEND(&queue->head, &queue->tail, request); 161 return queue->head; 166 struct indexer_request *request = queue->head; 170 DLLIST2_REMOVE(&queue->head, &queue->tail, request); 223 DLLIST2_PREPEND(&queue->head, &queue->tail, request); 225 DLLIST2_APPEND(&queue->head, &queue->tail, request); 260 return queue->head [all...] |
/dovecot/src/lib-dns/ |
H A D | dns-lookup.c | 48 struct dns_lookup *head, *tail; member in struct:dns_client 73 lookup = client->head; 74 client->head = NULL; 142 struct dns_lookup *lookup = client->head; 225 i_assert(client->head == NULL); 237 DLLIST2_REMOVE(&client->head, &client->tail, lookup); 243 else if (client->head == NULL && client->fd != -1) { 283 i_assert(client->head == NULL); 367 DLLIST2_APPEND(&client->head, &client->tail, lookup); 402 for (lookup = client->head; looku [all...] |
/dovecot/src/lib-sql/ |
H A D | driver-pgsql.c | 899 if (ctx->ctx.head != NULL) { 900 struct sql_transaction_query *query = ctx->ctx.head; 902 ctx->ctx.head = ctx->ctx.head->next; 1007 if (ctx->failed || _ctx->head == NULL) { 1012 } else if (_ctx->head->next == NULL) { 1014 sql_query(_ctx->db, _ctx->head->query, 1015 transaction_trans_query_callback, _ctx->head); 1048 for (query = ctx->ctx.head; query != NULL; query = query->next) { 1078 if (_ctx->head [all...] |
H A D | driver-mysql.c | 590 while (_ctx->head != NULL) { 591 if (transaction_send_query(ctx, _ctx->head->query, 592 _ctx->head->affected_rows) < 0) 594 _ctx->head = _ctx->head->next; 612 if (_ctx->head != NULL) {
|
/dovecot/src/auth/ |
H A D | auth-cache.c | 16 struct auth_cache_node *head, *tail; member in struct:auth_cache 159 /* unlinking head */ 160 cache->head = node->prev; 168 node->prev = cache->head; 171 cache->head = node; 396 /* move to head */ 397 if (node != cache->head) {
|