X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=hal.c;h=7720d09bf2584f078d951aac85c09e840b42ff2a;hb=HEAD;hp=c55fb5ec4eab32d6b04ce2807b2179540ad3ee77;hpb=ac639792511f8baf419dd92c8a56ebfcb9b6d27c;p=mtetherd diff --git a/hal.c b/hal.c index c55fb5e..7720d09 100644 --- a/hal.c +++ b/hal.c @@ -29,7 +29,7 @@ static void mtetherd_hal_device_condition(LibHalContext *ctx, const char *udi, c MTetherDStatusPlugin *plugin = MTETHERD_STATUS_PLUGIN(libhal_ctx_get_user_data(ctx)); if (plugin) { - g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, "Got HAL condition %s on %s: %s", condition, udi, detail); + g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Got HAL condition %s on %s: %s", condition, udi, detail); if (g_strcmp0("ButtonPressed", condition) == 0) { g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "is ButtonPressed"); if (g_strcmp0(USBDEV_PATH, udi) == 0) { @@ -44,7 +44,7 @@ static void mtetherd_hal_device_added(LibHalContext *ctx, const char *udi) { MTetherDStatusPlugin *plugin = MTETHERD_STATUS_PLUGIN(libhal_ctx_get_user_data(ctx)); if (plugin) { - g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, "Got HAL device added on %s", udi); + g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Got HAL device added on %s", udi); DBusError derr; dbus_error_init(&derr); char *interface = libhal_device_get_property_string(plugin->hal_context, udi, "net.interface", &derr); @@ -66,7 +66,7 @@ static void mtetherd_hal_device_removed(LibHalContext *ctx, const char *udi) { MTetherDStatusPlugin *plugin = MTETHERD_STATUS_PLUGIN(libhal_ctx_get_user_data(ctx)); if (plugin) { - g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, "Got HAL device added on %s", udi); + g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Got HAL device removed on %s", udi); mtetherd_status_plugin_device_removed(plugin, udi); } } @@ -81,11 +81,12 @@ gboolean mtetherd_hal_init(MTetherDStatusPlugin *plugin) { err = NULL; return FALSE; } else { - g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, "Got DBUS Glib connection: %p", plugin->dbus_connection); + g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Got GDBUS connection: %p", plugin->dbus_connection); } if (plugin->dbus_connection) { plugin->hal_context = libhal_ctx_new(); if (plugin->hal_context) { + g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Got HAL context: %p", plugin->hal_context); if (libhal_ctx_set_dbus_connection(plugin->hal_context, dbus_g_connection_get_connection(plugin->dbus_connection))) { if (!libhal_ctx_set_user_data(plugin->hal_context, plugin)) { g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Can't set user data of HAL context"); @@ -123,6 +124,7 @@ gboolean mtetherd_hal_init(MTetherDStatusPlugin *plugin) { return FALSE; } } + g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "HAL context initialized and connected"); return TRUE; }