From 742d01a4f9a32f17561104ee7da8971c1bcdd703 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 8 Feb 2017 17:09:55 +0100 Subject: 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 --- src/irmd/registry.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/irmd/registry.c') diff --git a/src/irmd/registry.c b/src/irmd/registry.c index fec69cfa..d22c1be3 100644 --- a/src/irmd/registry.c +++ b/src/irmd/registry.c @@ -189,13 +189,13 @@ int reg_entry_add_apn(struct reg_entry * e, struct apn_entry * a) struct str_el * n; if (reg_entry_has_apn(e, a->apn)) { - LOG_WARN("AP %s already accepting flows for %s.", + log_warn("AP %s already accepting flows for %s.", a->apn, e->name); return 0; } if (!(a->flags & BIND_AP_AUTO)) { - LOG_DBG("AP %s cannot be auto-instantiated.", a->apn); + log_dbg("AP %s cannot be auto-instantiated.", a->apn); return -EINVAL; } @@ -265,12 +265,12 @@ int reg_entry_add_api(struct reg_entry * e, pid_t api) return -EINVAL; if (reg_entry_has_api(e, api)) { - LOG_DBG("Instance already registered with this name."); + log_dbg("Instance already registered with this name."); return -EPERM; } if (e->state == REG_NAME_NULL) { - LOG_DBG("Tried to add instance in NULL state."); + log_dbg("Tried to add instance in NULL state."); return -EPERM; } @@ -418,19 +418,19 @@ struct reg_entry * registry_add_name(struct list_head * registry, return NULL; if (registry_has_name(registry, name)) { - LOG_DBG("Name %s already registered.", name); + log_dbg("Name %s already registered.", name); return NULL; } e = reg_entry_create(); if (e == NULL) { - LOG_DBG("Could not create registry entry."); + log_dbg("Could not create registry entry."); return NULL; } e = reg_entry_init(e, name); if (e == NULL) { - LOG_DBG("Could not initialize registry entry."); + log_dbg("Could not initialize registry entry."); reg_entry_destroy(e); return NULL; } -- cgit v1.2.3