diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-02-08 17:09:55 +0100 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-02-08 18:04:13 +0100 |
commit | 742d01a4f9a32f17561104ee7da8971c1bcdd703 (patch) | |
tree | 26a9c0b622b5bf875b783692837d1069799f8fcc /src/ipcpd/normal/frct.c | |
parent | 9117f7f6fec70f2da24e8e77256747d11d67bf8d (diff) | |
download | ouroboros-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/normal/frct.c')
-rw-r--r-- | src/ipcpd/normal/frct.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ipcpd/normal/frct.c b/src/ipcpd/normal/frct.c index ce316ca2..915feaf8 100644 --- a/src/ipcpd/normal/frct.c +++ b/src/ipcpd/normal/frct.c @@ -225,7 +225,7 @@ int frct_nm1_post_sdu(struct pci * pci, buf.data = shm_du_buff_head(sdb); if (fmgr_np1_post_buf(id, &buf)) { - LOG_ERR("Failed to hand buffer to FMGR."); + log_err("Failed to hand buffer to FMGR."); free(pci); return -1; } @@ -244,14 +244,14 @@ int frct_nm1_post_sdu(struct pci * pci, buf.data = shm_du_buff_head(sdb); if (fmgr_np1_post_buf(pci->dst_cep_id, &buf)) { - LOG_ERR("Failed to hand buffer to Flow Manager."); + log_err("Failed to hand buffer to Flow Manager."); free(pci); return -1; } } else { /* FIXME: Known cep-ids are delivered to FMGR (minimal DTP) */ if (fmgr_np1_post_sdu(pci->dst_cep_id, sdb)) { - LOG_ERR("Failed to hand SDU to FMGR."); + log_err("Failed to hand SDU to FMGR."); free(pci); return -1; } @@ -293,7 +293,7 @@ cep_id_t frct_i_create(uint64_t address, if (fmgr_nm1_write_buf(&pci, buf)) { free(instance); - LOG_ERR("Failed to hand PDU to FMGR."); + log_err("Failed to hand PDU to FMGR."); return INVALID_CEP_ID; } @@ -315,7 +315,7 @@ int frct_i_accept(cep_id_t id, instance = frct.instances[id]; if (instance == NULL) { pthread_mutex_unlock(&frct.instances_lock); - LOG_ERR("Invalid instance."); + log_err("Invalid instance."); return -1; } @@ -355,7 +355,7 @@ int frct_i_destroy(cep_id_t id, instance = frct.instances[id]; if (instance == NULL) { pthread_mutex_unlock(&frct.instances_lock); - LOG_ERR("Invalid instance."); + log_err("Invalid instance."); return -1; } @@ -401,13 +401,13 @@ int frct_i_write_sdu(cep_id_t id, instance = frct.instances[id]; if (instance == NULL) { pthread_mutex_unlock(&frct.instances_lock); - LOG_ERR("Invalid instance."); + log_err("Invalid instance."); return -1; } if (instance->state != CONN_ESTABLISHED) { pthread_mutex_unlock(&frct.instances_lock); - LOG_ERR("Connection is not established."); + log_err("Connection is not established."); return -1; } @@ -421,7 +421,7 @@ int frct_i_write_sdu(cep_id_t id, if (fmgr_nm1_write_sdu(&pci, sdb)) { pthread_mutex_unlock(&frct.instances_lock); - LOG_ERR("Failed to hand SDU to FMGR."); + log_err("Failed to hand SDU to FMGR."); return -1; } |