[tracker/collation-gconf-locale: 13/28] tracker-locale: New log added when looping subscriber list
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/collation-gconf-locale: 13/28] tracker-locale: New log added when looping subscriber list
- Date: Tue, 16 Nov 2010 18:25:38 +0000 (UTC)
commit 674aaeb012cfa8aebdde045d05024cad9c437970
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Oct 28 18:07:48 2010 +0200
tracker-locale: New log added when looping subscriber list
src/libtracker-common/tracker-locale.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-common/tracker-locale.c b/src/libtracker-common/tracker-locale.c
index b4c0dfb..cc0a7b2 100644
--- a/src/libtracker-common/tracker-locale.c
+++ b/src/libtracker-common/tracker-locale.c
@@ -198,13 +198,20 @@ tracker_locale_gconf_notify_cb (GConfClient *client,
tracker_locale_set (i, gconf_value_get_string (value));
UNLOCK_LOCALES;
- /* Now, if any subscriber, notify the locale change */
+ /* Now, if any subscriber, notify the locale change.
+ * NOTE!!!! The callback MUST NOT perform any action
+ * that may change the list of subscribers, or the
+ * program will get locked. */
LOCK_SUBSCRIBERS;
for (li = subscribers; li; li = g_slist_next (li)) {
TrackerLocaleNotification *data = li->data;
- if (i == data->id)
+ if (i == data->id) {
+ g_debug ("Notifying locale '%s' change to subscriber '%p'",
+ locale_names[i],
+ data);
data->func (i, data->user_data);
+ }
}
UNLOCK_SUBSCRIBERS;
}
@@ -389,7 +396,7 @@ tracker_locale_notify_remove (gpointer notification_id)
/* Remove item from list of subscribers */
subscribers = g_slist_delete_link (subscribers, li);
- /* Call the provided destroy_notify if any */
+ /* Call the provided destroy_notify if any. */
if (data->destroy_notify)
data->destroy_notify (data->user_data);
/* And fully dispose the notification data */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]