#define LDAP_CONN_POOL_MAX_CONNECTIONS UINT_MAX
struct ldap_client {
+ struct event *event;
struct ldap_connection_list *list;
};
ldap_conn_pool = ldap_connection_pool_init(LDAP_CONN_POOL_MAX_CONNECTIONS);
client = i_new(struct ldap_client, 1);
+ client->event = event_create(set->event_parent);
if (ldap_connection_pool_get(ldap_conn_pool, client, set,
&client->list, error_r) < 0) {
i_free(client);
*_client = NULL;
ldap_connection_pool_unref(ldap_conn_pool, &client->list);
+ event_unref(&client->event);
i_free(client);
}
+struct event *ldap_client_get_event(struct ldap_client *client)
+{
+ return client->event;
+}
+
void ldap_client_switch_ioloop(struct ldap_client *client)
{
ldap_connection_switch_ioloop(client->list->conn);
pool_t pool = pool_alloconly_create("ldap connection", 1024);
struct ldap_connection *conn = p_new(pool, struct ldap_connection, 1);
conn->pool = pool;
- conn->event = event_create(set->event_parent);
+ conn->event = event_create(ldap_client_get_event(client));
conn->client = client;
conn->set = *set;
void ldap_connection_kill(struct ldap_connection *conn);
int ldap_connection_check(struct ldap_connection *conn);
void ldap_connection_queue_request(struct ldap_connection *conn, struct ldap_op_queue_entry *req);
+struct event *ldap_client_get_event(struct ldap_client *client);
int ldap_entry_init(struct ldap_entry *obj, struct ldap_result *result, LDAPMessage *message);