Lines Matching refs:entry

15 /*	void	qmgr_entry_done(entry, which)
16 /* QMGR_ENTRY *entry;
22 /* void qmgr_entry_unselect(queue, entry)
24 /* QMGR_ENTRY *entry;
26 /* void qmgr_entry_move_todo(dst, entry)
28 /* QMGR_ENTRY *entry;
33 /* qmgr_entry_create() creates an entry for the named queue and
34 /* message, and appends the entry to the queue's todo list.
38 /* qmgr_entry_done() discards a per-site queue entry. The
39 /* \fIwhich\fR argument is either QMGR_QUEUE_BUSY for an entry
41 /* selected for actual delivery), or QMGR_QUEUE_TODO for an entry
51 /* queue entry for a message is done with: either read more
56 /* qmgr_entry_select() selects the next entry from the named
57 /* per-site queue's `todo' list for actual delivery. The entry is
61 /* qmgr_entry_unselect() takes the named entry off the named
65 /* qmgr_entry_move_todo() moves the specified "todo" queue entry
102 /* qmgr_entry_select - select queue entry for delivery */
107 QMGR_ENTRY *entry;
109 if ((entry = queue->todo.prev) != 0) {
110 QMGR_LIST_UNLINK(queue->todo, QMGR_ENTRY *, entry);
112 QMGR_LIST_APPEND(queue->busy, entry);
167 return (entry);
170 /* qmgr_entry_unselect - unselect queue entry for delivery */
172 void qmgr_entry_unselect(QMGR_QUEUE *queue, QMGR_ENTRY *entry)
174 QMGR_LIST_UNLINK(queue->busy, QMGR_ENTRY *, entry);
176 QMGR_LIST_APPEND(queue->todo, entry);
180 /* qmgr_entry_move_todo - move entry between todo queues */
182 void qmgr_entry_move_todo(QMGR_QUEUE *dst, QMGR_ENTRY *entry)
185 QMGR_MESSAGE *message = entry->message;
186 QMGR_QUEUE *src = entry->queue;
189 if (entry->stream != 0)
190 msg_panic("%s: queue %s entry is busy", myname, src->name);
198 * Create new entry, swap the recipients between the old and new entries,
199 * then dispose of the old entry. This gives us any end-game actions that
203 * XXX This does not enforce the per-entry recipient limit, but that is not
208 recipient_list_swap(&entry->rcpt_list, &new_entry->rcpt_list);
209 qmgr_entry_done(entry, QMGR_QUEUE_TODO);
212 /* qmgr_entry_done - dispose of queue entry */
214 void qmgr_entry_done(QMGR_ENTRY *entry, int which)
217 QMGR_QUEUE *queue = entry->queue;
218 QMGR_MESSAGE *message = entry->message;
222 * Take this entry off the in-core queue.
224 if (entry->stream != 0)
227 QMGR_LIST_UNLINK(queue->busy, QMGR_ENTRY *, entry);
230 QMGR_LIST_UNLINK(queue->todo, QMGR_ENTRY *, entry);
240 qmgr_recipient_count -= entry->rcpt_list.len;
241 recipient_list_free(&entry->rcpt_list);
243 myfree((void *) entry);
304 /* qmgr_entry_create - create queue todo entry */
308 QMGR_ENTRY *entry;
319 entry = (QMGR_ENTRY *) mymalloc(sizeof(QMGR_ENTRY));
320 entry->stream = 0;
321 entry->message = message;
322 recipient_list_init(&entry->rcpt_list, RCPT_LIST_INIT_QUEUE);
324 entry->queue = queue;
325 QMGR_LIST_APPEND(queue->todo, entry);
392 return (entry);