summaryrefslogtreecommitdiff
path: root/src/ipcpd/timerwheel.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2017-02-08 17:09:55 +0100
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2017-02-08 18:04:13 +0100
commit742d01a4f9a32f17561104ee7da8971c1bcdd703 (patch)
tree26a9c0b622b5bf875b783692837d1069799f8fcc /src/ipcpd/timerwheel.c
parent9117f7f6fec70f2da24e8e77256747d11d67bf8d (diff)
downloadouroboros-742d01a4f9a32f17561104ee7da8971c1bcdd703.tar.gz
ouroboros-742d01a4f9a32f17561104ee7da8971c1bcdd703.zip
lib: Log to the logging system
This removes the logfile and outputs log messages to the logging system. The creation of the logfiles (as well as the ap_init() call) were moved into ipcp_init() to simplify the IPCP creation and shutdown. Fixes #25 Fixes #27
Diffstat (limited to 'src/ipcpd/timerwheel.c')
-rw-r--r--src/ipcpd/timerwheel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ipcpd/timerwheel.c b/src/ipcpd/timerwheel.c
index bb61bd91..6e5b7da9 100644
--- a/src/ipcpd/timerwheel.c
+++ b/src/ipcpd/timerwheel.c
@@ -235,14 +235,14 @@ struct timerwheel * timerwheel_create(unsigned int resolution,
list_head_init(&tw->wq);
if (pthread_mutex_init(&tw->lock, NULL)) {
- LOG_DBG("Could not init mutex.");
+ log_dbg("Could not init mutex.");
free(tw->wheel);
free(tw);
return NULL;
}
if (pthread_mutex_init(&tw->s_lock, NULL)) {
- LOG_DBG("Could not init mutex.");
+ log_dbg("Could not init mutex.");
pthread_mutex_destroy(&tw->lock);
free(tw->wheel);
free(tw);
@@ -250,7 +250,7 @@ struct timerwheel * timerwheel_create(unsigned int resolution,
}
if (pthread_cond_init(&tw->work, NULL)) {
- LOG_DBG("Could not init cond.");
+ log_dbg("Could not init cond.");
pthread_mutex_destroy(&tw->s_lock);
pthread_mutex_destroy(&tw->lock);
free(tw->wheel);
@@ -271,7 +271,7 @@ struct timerwheel * timerwheel_create(unsigned int resolution,
}
if (pthread_create(&tw->worker, NULL, worker, (void *) tw)) {
- LOG_DBG("Could not create worker.");
+ log_dbg("Could not create worker.");
pthread_cond_destroy(&tw->work);
pthread_mutex_destroy(&tw->s_lock);
pthread_mutex_destroy(&tw->lock);
@@ -281,7 +281,7 @@ struct timerwheel * timerwheel_create(unsigned int resolution,
}
if (pthread_create(&tw->ticker, NULL, movement, (void *) tw)) {
- LOG_DBG("Could not create timer.");
+ log_dbg("Could not create timer.");
tw_set_state(tw, TW_DESTROY);
pthread_join(tw->worker, NULL);
pthread_cond_destroy(&tw->work);