7 /* enable dead transports or sites
11 /* void qmgr_enable_queue(queue)
14 /* QMGR_QUEUE *qmgr_enable_transport(transport)
15 /* QMGR_TRANSPORT *transport;
17 /* void qmgr_enable_all(void)
19 /* This module purges dead in-core state information, effectively
20 /* re-enabling delivery.
22 /* qmgr_enable_queue() enables deliveries to the named dead site.
23 /* Empty queues are destroyed. The existed solely to indicate that
26 /* qmgr_enable_transport() enables deliveries via the specified
27 /* transport, and calls qmgr_enable_queue() for each destination
28 /* on that transport. Empty queues are destroyed.
30 /* qmgr_enable_all() enables all transports and queues.
31 /* See above for the side effects caused by doing this.
33 /* The side effects of calling this module can be quite dramatic.
35 /* Panic: consistency check failure. Fatal: out of memory.
39 /* The Secure Mailer license must be distributed with this software.
42 /* IBM T.J. Watson Research
44 /* Yorktown Heights, NY 10598, USA
51 /* Utility library. */
56 /* Application-specific. */
60 /* qmgr_enable_all - enable transports and queues */
62 void qmgr_enable_all(void)
64 QMGR_TRANSPORT
*xport
;
67 msg_info("qmgr_enable_all");
70 * The number of transports does not change as a side effect, so this can
71 * be a straightforward loop.
73 for (xport
= qmgr_transport_list
.next
; xport
; xport
= xport
->peers
.next
)
74 qmgr_enable_transport(xport
);
77 /* qmgr_enable_transport - defer todo entries for named transport */
79 void qmgr_enable_transport(QMGR_TRANSPORT
*transport
)
85 * Proceed carefully. Queues may disappear as a side effect.
87 if (transport
->flags
& QMGR_TRANSPORT_STAT_DEAD
) {
89 msg_info("enable transport %s", transport
->name
);
90 qmgr_transport_unthrottle(transport
);
92 for (queue
= transport
->queue_list
.next
; queue
; queue
= next
) {
93 next
= queue
->peers
.next
;
94 qmgr_enable_queue(queue
);
98 /* qmgr_enable_queue - enable and possibly delete queue */
100 void qmgr_enable_queue(QMGR_QUEUE
*queue
)
102 if (QMGR_QUEUE_THROTTLED(queue
)) {
104 msg_info("enable site %s/%s", queue
->transport
->name
, queue
->name
);
105 qmgr_queue_unthrottle(queue
);
107 if (QMGR_QUEUE_READY(queue
) && queue
->todo
.next
== 0 && queue
->busy
.next
== 0)
108 qmgr_queue_done(queue
);