c->c_sasl_bind_mech = NULL;
c->c_sasl_context = NULL;
+ c->c_sasl_extra = NULL;
c->c_sb = ber_sockbuf_alloc( );
c->c_currentber = NULL;
assert( c->c_pending_ops == NULL );
assert( c->c_sasl_bind_mech == NULL );
assert( c->c_sasl_context == NULL );
+ assert( c->c_sasl_extra == NULL );
assert( c->c_currentber == NULL );
c->c_listener_url = ch_strdup( url );
#ifdef HAVE_CYRUS_SASL
sasl_conn_t *ctx = NULL;
- sasl_callback_t *session_callbacks =
+ sasl_callback_t *session_callbacks;
+
+ assert( conn->c_sasl_context == NULL );
+ assert( conn->c_sasl_extra == NULL );
+
+ session_callbacks =
ch_calloc( 3, sizeof(sasl_callback_t));
+ conn->c_sasl_extra = session_callbacks;
session_callbacks[0].id = SASL_CB_LOG;
session_callbacks[0].proc = &sasl_cb_log;
}
conn->c_sasl_context = NULL;
+
+ free( conn->c_sasl_extra );
+ conn->c_sasl_extra = NULL;
#endif
return LDAP_SUCCESS;
}
int c_needs_tls_accept; /* true if SSL_accept should be called */
#endif
void *c_sasl_context; /* SASL session context */
+ void *c_sasl_extra; /* SASL session extra stuff */
long c_n_ops_received; /* num of ops received (next op_id) */
long c_n_ops_executing; /* num of ops currently executing */