예제 #1
0
/*
 * delete all the allocated space by eap module
 */
static int eap_detach(void *instance)
{
	rlm_eap_t *inst;
	int i;

	inst = (rlm_eap_t *)instance;

#ifdef HAVE_PTHREAD_H
	pthread_mutex_destroy(&(inst->session_mutex));
	if (inst->handler_tree) pthread_mutex_destroy(&(inst->handler_mutex));
#endif

	rbtree_free(inst->session_tree);
	if (inst->handler_tree) rbtree_free(inst->handler_tree);
	inst->session_tree = NULL;
	eaplist_free(inst);

	for (i = 0; i < PW_EAP_MAX_TYPES; i++) {
		if (inst->types[i]) eaptype_free(inst->types[i]);
		inst->types[i] = NULL;
	}

	free(inst);

	return 0;
}
예제 #2
0
/*
 * delete all the allocated space by eap module
 */
static int mod_detach(void *instance)
{
	rlm_eap_t *inst;

	inst = (rlm_eap_t *)instance;

	rbtree_free(inst->session_tree);
	inst->session_tree = NULL;
	eaplist_free(inst);
	eap_server_unregister_methods();
	tls_deinit(inst->tls_ctx);

	pthread_mutex_destroy(&(inst->session_mutex));

	return 0;
}
예제 #3
0
/*
 * delete all the allocated space by eap module
 */
static int mod_detach(void *instance)
{
	rlm_eap_t *inst;

	inst = (rlm_eap_t *)instance;

#ifdef HAVE_PTHREAD_H
	pthread_mutex_destroy(&(inst->session_mutex));
	if (inst->handler_tree) pthread_mutex_destroy(&(inst->handler_mutex));
#endif

	rbtree_free(inst->session_tree);
	if (inst->handler_tree) rbtree_free(inst->handler_tree);
	inst->session_tree = NULL;
	eaplist_free(inst);

	return 0;
}
예제 #4
0
/*
 * delete all the allocated space by eap module
 */
static int eap_detach(void *instance)
{
	rlm_eap_t *inst;
	int i;

	inst = (rlm_eap_t *)instance;

	rbtree_free(inst->session_tree);
	inst->session_tree = NULL;
	eaplist_free(inst);

	for (i = 0; i < PW_EAP_MAX_TYPES; i++) {
		if (inst->types[i]) eaptype_free(inst->types[i]);
		inst->types[i] = NULL;
	}

	pthread_mutex_destroy(&(inst->session_mutex));

	free(inst);

	return 0;
}