• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/postfix-255/postfix/src/qmgr/

Lines Matching defs:entry

13 /*	void	qmgr_entry_done(entry, which)
14 /* QMGR_ENTRY *entry;
20 /* void qmgr_entry_unselect(queue, entry)
22 /* QMGR_ENTRY *entry;
24 /* void qmgr_entry_move_todo(dst, entry)
26 /* QMGR_ENTRY *entry;
31 /* qmgr_entry_create() creates an entry for the named peer and message,
32 /* and appends the entry to the peer's list and its queue's todo list.
36 /* qmgr_entry_done() discards a per-site queue entry. The
37 /* \fIwhich\fR argument is either QMGR_QUEUE_BUSY for an entry
39 /* selected for actual delivery), or QMGR_QUEUE_TODO for an entry
52 /* queue entry for a message is done with: either read more
57 /* qmgr_entry_select() selects first entry from the named
58 /* per-site queue's `todo' list for actual delivery. The entry is
60 /* delivered. The entry is also removed from its peer list.
62 /* qmgr_entry_unselect() takes the named entry off the named
64 /* `todo' list. The entry is also prepended to its peer list again.
66 /* qmgr_entry_move_todo() moves the specified "todo" queue entry
108 /* qmgr_entry_select - select queue entry for delivery */
113 QMGR_ENTRY *entry;
116 if ((entry = peer->entry_list.next) != 0) {
117 queue = entry->queue;
118 QMGR_LIST_UNLINK(queue->todo, QMGR_ENTRY *, entry, queue_peers);
120 QMGR_LIST_APPEND(queue->busy, entry, queue_peers);
122 QMGR_LIST_UNLINK(peer->entry_list, QMGR_ENTRY *, entry, peer_peers);
177 return (entry);
180 /* qmgr_entry_unselect - unselect queue entry for delivery */
182 void qmgr_entry_unselect(QMGR_ENTRY *entry)
184 QMGR_PEER *peer = entry->peer;
185 QMGR_QUEUE *queue = entry->queue;
188 * Move the entry back to the todo lists. In case of the peer list, put
193 QMGR_LIST_UNLINK(queue->busy, QMGR_ENTRY *, entry, queue_peers);
195 QMGR_LIST_APPEND(queue->todo, entry, queue_peers);
197 QMGR_LIST_PREPEND(peer->entry_list, entry, peer_peers);
201 /* qmgr_entry_move_todo - move entry between todo queues */
203 void qmgr_entry_move_todo(QMGR_QUEUE *dst_queue, QMGR_ENTRY *entry)
207 QMGR_MESSAGE *message = entry->message;
208 QMGR_QUEUE *src_queue = entry->queue;
209 QMGR_PEER *dst_peer, *src_peer = entry->peer;
212 int rcpt_count = entry->rcpt_list.len;
214 if (entry->stream != 0)
215 msg_panic("%s: queue %s entry is busy", myname, src_queue->name);
223 * Create new entry, swap the recipients between the two entries,
224 * adjusting the job counters accordingly, then dispose of the old entry.
230 * XXX This does not enforce the per-entry recipient limit, but that is not
239 recipient_list_swap(&entry->rcpt_list, &new_entry->rcpt_list);
244 qmgr_entry_done(entry, QMGR_QUEUE_TODO);
247 /* qmgr_entry_done - dispose of queue entry */
249 void qmgr_entry_done(QMGR_ENTRY *entry, int which)
252 QMGR_QUEUE *queue = entry->queue;
253 QMGR_MESSAGE *message = entry->message;
254 QMGR_PEER *peer = entry->peer;
259 * Take this entry off the in-core queue.
261 if (entry->stream != 0)
264 QMGR_LIST_UNLINK(queue->busy, QMGR_ENTRY *, entry, queue_peers);
267 QMGR_LIST_UNLINK(peer->entry_list, QMGR_ENTRY *, entry, peer_peers);
269 QMGR_LIST_UNLINK(queue->todo, QMGR_ENTRY *, entry, queue_peers);
279 job->rcpt_count -= entry->rcpt_list.len;
280 message->rcpt_count -= entry->rcpt_list.len;
281 qmgr_recipient_count -= entry->rcpt_list.len;
282 recipient_list_free(&entry->rcpt_list);
283 myfree((char *) entry);
358 /* qmgr_entry_create - create queue todo entry */
362 QMGR_ENTRY *entry;
374 entry = (QMGR_ENTRY *) mymalloc(sizeof(QMGR_ENTRY));
375 entry->stream = 0;
376 entry->message = message;
377 recipient_list_init(&entry->rcpt_list, RCPT_LIST_INIT_QUEUE);
379 entry->peer = peer;
380 QMGR_LIST_APPEND(peer->entry_list, entry, peer_peers);
382 entry->queue = queue;
383 QMGR_LIST_APPEND(queue->todo, entry, queue_peers);
451 return (entry);