Adding DBG_LIB to all calls of libstrongswan's version of DBG*.
This commit is contained in:
@@ -108,7 +108,7 @@ static void lock(private_mutex_t *this)
|
||||
err = pthread_mutex_lock(&this->mutex);
|
||||
if (err)
|
||||
{
|
||||
DBG1("!!! MUTEX LOCK ERROR: %s !!!", strerror(err));
|
||||
DBG1(DBG_LIB, "!!! MUTEX LOCK ERROR: %s !!!", strerror(err));
|
||||
}
|
||||
profiler_end(&this->profile);
|
||||
}
|
||||
@@ -123,7 +123,7 @@ static void unlock(private_mutex_t *this)
|
||||
err = pthread_mutex_unlock(&this->mutex);
|
||||
if (err)
|
||||
{
|
||||
DBG1("!!! MUTEX UNLOCK ERROR: %s !!!", strerror(err));
|
||||
DBG1(DBG_LIB, "!!! MUTEX UNLOCK ERROR: %s !!!", strerror(err));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ static void read_lock(private_rwlock_t *this)
|
||||
err = pthread_rwlock_rdlock(&this->rwlock);
|
||||
if (err != 0)
|
||||
{
|
||||
DBG1("!!! RWLOCK READ LOCK ERROR: %s !!!", strerror(err));
|
||||
DBG1(DBG_LIB, "!!! RWLOCK READ LOCK ERROR: %s !!!", strerror(err));
|
||||
}
|
||||
profiler_end(&this->profile);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ static void write_lock(private_rwlock_t *this)
|
||||
err = pthread_rwlock_wrlock(&this->rwlock);
|
||||
if (err != 0)
|
||||
{
|
||||
DBG1("!!! RWLOCK WRITE LOCK ERROR: %s !!!", strerror(err));
|
||||
DBG1(DBG_LIB, "!!! RWLOCK WRITE LOCK ERROR: %s !!!", strerror(err));
|
||||
}
|
||||
profiler_end(&this->profile);
|
||||
}
|
||||
@@ -137,7 +137,7 @@ static void rw_unlock(private_rwlock_t *this)
|
||||
err = pthread_rwlock_unlock(&this->rwlock);
|
||||
if (err != 0)
|
||||
{
|
||||
DBG1("!!! RWLOCK UNLOCK ERROR: %s !!!", strerror(err));
|
||||
DBG1(DBG_LIB, "!!! RWLOCK UNLOCK ERROR: %s !!!", strerror(err));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ static void cancel(private_thread_t *this)
|
||||
if (pthread_equal(this->thread_id, pthread_self()))
|
||||
{
|
||||
this->mutex->unlock(this->mutex);
|
||||
DBG1("!!! CANNOT CANCEL CURRENT THREAD !!!");
|
||||
DBG1(DBG_LIB, "!!! CANNOT CANCEL CURRENT THREAD !!!");
|
||||
return;
|
||||
}
|
||||
#ifdef HAVE_PTHREAD_CANCEL
|
||||
@@ -180,7 +180,7 @@ static void _kill(private_thread_t *this, int sig)
|
||||
* returned, so depending on the signal, the lock might not get
|
||||
* unlocked. */
|
||||
this->mutex->unlock(this->mutex);
|
||||
DBG1("!!! CANNOT SEND SIGNAL TO CURRENT THREAD !!!");
|
||||
DBG1(DBG_LIB, "!!! CANNOT SEND SIGNAL TO CURRENT THREAD !!!");
|
||||
return;
|
||||
}
|
||||
pthread_kill(this->thread_id, sig);
|
||||
@@ -209,13 +209,13 @@ static void *join(private_thread_t *this)
|
||||
if (pthread_equal(this->thread_id, pthread_self()))
|
||||
{
|
||||
this->mutex->unlock(this->mutex);
|
||||
DBG1("!!! CANNOT JOIN CURRENT THREAD !!!");
|
||||
DBG1(DBG_LIB, "!!! CANNOT JOIN CURRENT THREAD !!!");
|
||||
return NULL;
|
||||
}
|
||||
if (this->detached_or_joined)
|
||||
{
|
||||
this->mutex->unlock(this->mutex);
|
||||
DBG1("!!! CANNOT JOIN DETACHED THREAD !!!");
|
||||
DBG1(DBG_LIB, "!!! CANNOT JOIN DETACHED THREAD !!!");
|
||||
return NULL;
|
||||
}
|
||||
thread_id = this->thread_id;
|
||||
@@ -299,7 +299,7 @@ thread_t *thread_create(thread_main_t main, void *arg)
|
||||
this->arg = arg;
|
||||
if (pthread_create(&this->thread_id, NULL, (void*)thread_main, this) != 0)
|
||||
{
|
||||
DBG1("failed to create thread!");
|
||||
DBG1(DBG_LIB, "failed to create thread!");
|
||||
thread_destroy(this);
|
||||
return NULL;
|
||||
}
|
||||
@@ -354,7 +354,7 @@ void thread_cleanup_pop(bool execute)
|
||||
(void**)&handler) != SUCCESS)
|
||||
{
|
||||
this->mutex->unlock(this->mutex);
|
||||
DBG1("!!! THREAD CLEANUP ERROR !!!");
|
||||
DBG1(DBG_LIB, "!!! THREAD CLEANUP ERROR !!!");
|
||||
return;
|
||||
}
|
||||
this->mutex->unlock(this->mutex);
|
||||
|
||||
Reference in New Issue
Block a user