From 8c50bd085c0efe5fde354deee2c8118887aae29d Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 18 Sep 2009 12:35:34 +0200 Subject: Use syslog for logging error conditions in SSSD This is just a band-aid until ELAPI is fully functional and ready to use. --- server/sbus/sssd_dbus_common.c | 8 ++++---- server/sbus/sssd_dbus_connection.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'server/sbus') diff --git a/server/sbus/sssd_dbus_common.c b/server/sbus/sssd_dbus_common.c index e5970a3eb..8ec152152 100644 --- a/server/sbus/sssd_dbus_common.c +++ b/server/sbus/sssd_dbus_common.c @@ -130,7 +130,7 @@ dbus_bool_t sbus_add_watch(DBusWatch *dbus_watch, void *data) /* does not exist, allocate new one */ watch = talloc_zero(conn, struct sbus_watch_ctx); if (!watch) { - DEBUG(0, ("Out of Memory!\n")); + SYSLOG_ERROR("Out of Memory!\n"); return FALSE; } watch->conn = conn; @@ -170,7 +170,7 @@ dbus_bool_t sbus_add_watch(DBusWatch *dbus_watch, void *data) watch, fd, event_flags, sbus_watch_handler, watch); if (!watch->fde) { - DEBUG(0, ("Failed to set up fd event!\n")); + SYSLOG_ERROR("Failed to set up fd event!\n"); talloc_zfree(watch); return FALSE; } @@ -323,7 +323,7 @@ dbus_bool_t sbus_add_timeout(DBusTimeout *dbus_timeout, void *data) timeout = talloc_zero(conn, struct sbus_timeout_ctx); if (!timeout) { - DEBUG(0, ("Out of Memory!\n")); + SYSLOG_ERROR("Out of Memory!\n"); return FALSE; } timeout->dbus_timeout = dbus_timeout; @@ -332,7 +332,7 @@ dbus_bool_t sbus_add_timeout(DBusTimeout *dbus_timeout, void *data) timeout->te = tevent_add_timer(conn->ev, timeout, tv, sbus_timeout_handler, timeout); if (!timeout->te) { - DEBUG(0, ("Failed to set up timeout event!\n")); + SYSLOG_ERROR("Failed to set up timeout event!\n"); return FALSE; } diff --git a/server/sbus/sssd_dbus_connection.c b/server/sbus/sssd_dbus_connection.c index 1953ee590..907194f84 100644 --- a/server/sbus/sssd_dbus_connection.c +++ b/server/sbus/sssd_dbus_connection.c @@ -61,7 +61,7 @@ static void sbus_dispatch(struct tevent_context *ev, /* Currently trying to reconnect, defer dispatch */ new_event = tevent_add_timer(ev, conn, tv, sbus_dispatch, conn); if (new_event == NULL) { - DEBUG(0,("Could not defer dispatch!\n")); + SYSLOG_ERROR("Could not defer dispatch!\n"); } return; } @@ -75,7 +75,7 @@ static void sbus_dispatch(struct tevent_context *ev, return; } - DEBUG(0, ("Cannot start auto-reconnection.\n")); + SYSLOG_ERROR("Cannot start auto-reconnection.\n"); conn->reconnect_callback(conn, SBUS_RECONNECT_ERROR, conn->reconnect_pvt); @@ -483,7 +483,7 @@ int sbus_conn_add_interface(struct sbus_connection *conn, path = intf->path; if (path_in_interface_list(conn->intf_list, path)) { - DEBUG(0, ("Cannot add method context with identical path.\n")); + SYSLOG_ERROR("Cannot add method context with identical path.\n"); return EINVAL; } @@ -499,7 +499,7 @@ int sbus_conn_add_interface(struct sbus_connection *conn, dbret = dbus_connection_register_object_path(conn->dbus.conn, path, &intf->vtable, intf_p); if (!dbret) { - DEBUG(0, ("Could not register object path to the connection.\n")); + SYSLOG_ERROR("Could not register object path to the connection.\n"); return ENOMEM; } @@ -580,7 +580,7 @@ static void sbus_reconnect(struct tevent_context *ev, &iter->intf->vtable, iter); if (!dbret) { - DEBUG(0, ("Could not register object path.\n")); + SYSLOG_ERROR("Could not register object path.\n"); dbus_connection_unref(conn->dbus.conn); goto failed; } -- cgit