From 765920803744c6b1326ed44894f73cb9b7481e38 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sun, 31 Jan 2010 12:00:26 -0800 Subject: [PATCH] core: log when unlock state changes --- src/mm-modem-base.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mm-modem-base.c b/src/mm-modem-base.c index 44f4b0ec..6e9ee75f 100644 --- a/src/mm-modem-base.c +++ b/src/mm-modem-base.c @@ -173,6 +173,7 @@ mm_modem_base_get_valid (MMModemBase *self) void mm_modem_base_set_unlock_required (MMModemBase *self, const char *unlock_required) { MMModemBasePrivate *priv; + const char *dbus_path; g_return_if_fail (self != NULL); g_return_if_fail (MM_IS_MODEM_BASE (self)); @@ -188,6 +189,15 @@ void mm_modem_base_set_unlock_required (MMModemBase *self, const char *unlock_re g_free (priv->unlock_required); priv->unlock_required = g_strdup (unlock_required); + + dbus_path = (const char *) g_object_get_data (G_OBJECT (self), DBUS_PATH_TAG); + if (dbus_path) { + if (priv->unlock_required) + g_message ("Modem %s: unlock required (%s)", dbus_path, priv->unlock_required); + else + g_message ("Modem %s: unlock no longer required", dbus_path); + } + g_object_notify (G_OBJECT (self), MM_MODEM_UNLOCK_REQUIRED); }