mail_queue_active_queue_for_binding

March 26, 2020

Name

mail_queue_active_queue_for_binding — Returns the active queue for a binding

Synopsis

#include "mail_queue.h"

| Skiplist * **mail_queue_active_queue_for_binding** ( | mq, |   |
|   | binding, |   |
|   | create); |   |

mail_queue * <var class="pdparam">mq</var>;
int <var class="pdparam">binding</var>;
int <var class="pdparam">create</var>;

Description

Returns the active queue for a given binding.

Parameters

queue

A pointer to a mail_queue struct. For documentation of this data structure see “mail_queue”.

binding

The binding slot.

create

An integer, typically 0 or 1. If you intend to insert a new message into the queue, then pass 1 to this parameter. Alternatively, pass this parameter 0 if you are simply searching for a message in the queue.

Return Values

This function returns the address of the active queue for the binding (or NULL if it is empty). It returns a pointer to a Skiplist. For documentation of this data structure see “Skiplist”

Threading

It is only legal to call this function in the Scheduler thread.

See Also

__get_global_mail_queue, mail_queue_size, mail_queue_delayed_size, and mail_queue_purge_domain_binding.