libcharon: Remove unused charon->name

This commit is contained in:
Tobias Brunner
2014-02-12 14:34:33 +01:00
parent 9222bfc695
commit 1c306c0ee9
10 changed files with 13 additions and 21 deletions
+3 -5
View File
@@ -473,7 +473,6 @@ static void destroy(private_daemon_t *this)
DESTROY_IF(this->public.bus);
this->loggers->destroy_function(this->loggers, (void*)logger_entry_destroy);
this->mutex->destroy(this->mutex);
free((void*)this->public.name);
free(this);
}
@@ -558,7 +557,7 @@ METHOD(daemon_t, initialize, bool,
/**
* Create the daemon.
*/
private_daemon_t *daemon_create(const char *name)
private_daemon_t *daemon_create()
{
private_daemon_t *this;
@@ -569,7 +568,6 @@ private_daemon_t *daemon_create(const char *name)
.load_loggers = _load_loggers,
.set_level = _set_level,
.bus = bus_create(),
.name = strdup(name ?: "libcharon"),
},
.loggers = linked_list_create(),
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
@@ -607,7 +605,7 @@ void libcharon_deinit()
/**
* Described in header.
*/
bool libcharon_init(const char *name)
bool libcharon_init()
{
private_daemon_t *this;
@@ -618,7 +616,7 @@ bool libcharon_init(const char *name)
return !this->integrity_failed;
}
this = daemon_create(name);
this = daemon_create();
/* for uncritical pseudo random numbers */
srandom(time(NULL) + getpid());
+2 -8
View File
@@ -271,11 +271,6 @@ struct daemon_t {
mediation_manager_t *mediation_manager;
#endif /* ME */
/**
* Name of the binary that uses the library (used for settings etc.)
*/
const char *name;
/**
* Initialize the daemon.
*
@@ -324,12 +319,11 @@ extern daemon_t *charon;
* calling initialize().
*
* libcharon_init() may be called multiple times in a single process, but each
* caller should call libcharon_deinit() for each call to libcharon_init().
* caller must call libcharon_deinit() for each call to libcharon_init().
*
* @param name name of the binary that uses the library
* @return FALSE if integrity check failed
*/
bool libcharon_init(const char *name);
bool libcharon_init();
/**
* Deinitialize libcharon and destroy the "charon" instance of daemon_t.