Don't create interim update entries if RADIUS accounting is disabled
This commit is contained in:
@@ -648,6 +648,7 @@ METHOD(listener_t, child_updown, bool,
|
||||
METHOD(eap_radius_accounting_t, destroy, void,
|
||||
private_eap_radius_accounting_t *this)
|
||||
{
|
||||
charon->bus->remove_listener(charon->bus, &this->public.listener);
|
||||
singleton = NULL;
|
||||
this->mutex->destroy(this->mutex);
|
||||
this->sessions->destroy(this->sessions);
|
||||
@@ -680,7 +681,12 @@ eap_radius_accounting_t *eap_radius_accounting_create()
|
||||
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
|
||||
);
|
||||
|
||||
singleton = this;
|
||||
if (lib->settings->get_bool(lib->settings,
|
||||
"%s.plugins.eap-radius.accounting", FALSE, charon->name))
|
||||
{
|
||||
singleton = this;
|
||||
charon->bus->add_listener(charon->bus, &this->public.listener);
|
||||
}
|
||||
return &this->public;
|
||||
}
|
||||
|
||||
|
||||
@@ -227,7 +227,6 @@ METHOD(plugin_t, destroy, void,
|
||||
this->configs->destroy_offset(this->configs,
|
||||
offsetof(radius_config_t, destroy));
|
||||
this->lock->destroy(this->lock);
|
||||
charon->bus->remove_listener(charon->bus, &this->accounting->listener);
|
||||
this->accounting->destroy(this->accounting);
|
||||
free(this);
|
||||
instance = NULL;
|
||||
@@ -259,11 +258,6 @@ plugin_t *eap_radius_plugin_create()
|
||||
load_configs(this);
|
||||
instance = this;
|
||||
|
||||
if (lib->settings->get_bool(lib->settings,
|
||||
"%s.plugins.eap-radius.accounting", FALSE, charon->name))
|
||||
{
|
||||
charon->bus->add_listener(charon->bus, &this->accounting->listener);
|
||||
}
|
||||
if (lib->settings->get_bool(lib->settings,
|
||||
"%s.plugins.eap-radius.dae.enable", FALSE, charon->name))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user