diff options
author | Vadim Rutkovsky <vrutkovs@redhat.com> | 2013-02-14 01:46:30 +0800 |
---|---|---|
committer | Vadim Rutkovsky <vrutkovs@redhat.com> | 2013-02-14 01:46:30 +0800 |
commit | da975dadf59db4410ee1796b93fd9c423958b98d (patch) | |
tree | d5b1ffc14a5b47123cb5f6f70a6fee160d9dac38 | |
parent | 3b11207dcbd01b5a18f93a406d267bb786829471 (diff) | |
download | gsoc2013-evolution-da975dadf59db4410ee1796b93fd9c423958b98d.tar gsoc2013-evolution-da975dadf59db4410ee1796b93fd9c423958b98d.tar.gz gsoc2013-evolution-da975dadf59db4410ee1796b93fd9c423958b98d.tar.bz2 gsoc2013-evolution-da975dadf59db4410ee1796b93fd9c423958b98d.tar.lz gsoc2013-evolution-da975dadf59db4410ee1796b93fd9c423958b98d.tar.xz gsoc2013-evolution-da975dadf59db4410ee1796b93fd9c423958b98d.tar.zst gsoc2013-evolution-da975dadf59db4410ee1796b93fd9c423958b98d.zip |
Replace deprecated static mutexes
-rw-r--r-- | calendar/gui/e-meeting-store.c | 6 | ||||
-rw-r--r-- | mail/em-utils.c | 6 | ||||
-rw-r--r-- | mail/mail-send-recv.c | 14 | ||||
-rw-r--r-- | plugins/mail-notification/mail-notification.c | 10 | ||||
-rw-r--r-- | plugins/publish-calendar/publish-calendar.c | 10 | ||||
-rw-r--r-- | smime/lib/e-cert-db.c | 6 |
6 files changed, 26 insertions, 26 deletions
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c index 88e4be47e1..d1f2d6acb7 100644 --- a/calendar/gui/e-meeting-store.c +++ b/calendar/gui/e-meeting-store.c @@ -1600,7 +1600,7 @@ freebusy_async (gpointer data) EMeetingAttendee *attendee = fbd->attendee; gchar *default_fb_uri = NULL; gchar *fburi = NULL; - static GStaticMutex mutex = G_STATIC_MUTEX_INIT; + static GMutex mutex; EMeetingStorePrivate *priv = fbd->store->priv; if (fbd->client) { @@ -1608,7 +1608,7 @@ freebusy_async (gpointer data) /* FIXME This a workaround for getting all the free busy * information for the users. We should be able to * get free busy asynchronously. */ - g_static_mutex_lock (&mutex); + g_mutex_lock (&mutex); priv->num_queries++; sigid = g_signal_connect ( fbd->client, "free-busy-data", @@ -1618,7 +1618,7 @@ freebusy_async (gpointer data) fbd->endt, fbd->users, NULL, NULL); g_signal_handler_disconnect (fbd->client, sigid); priv->num_queries--; - g_static_mutex_unlock (&mutex); + g_mutex_unlock (&mutex); g_slist_foreach (fbd->users, (GFunc) g_free, NULL); g_slist_free (fbd->users); diff --git a/mail/em-utils.c b/mail/em-utils.c index e215fa11e0..3a4e2289ea 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -1193,7 +1193,7 @@ em_utils_selection_get_urilist (GtkSelectionData *selection_data, /* ********************************************************************** */ static EProxy *emu_proxy = NULL; -static GStaticMutex emu_proxy_lock = G_STATIC_MUTEX_INIT; +static GMutex emu_proxy_lock; static gpointer emu_proxy_setup (gpointer data) @@ -1210,13 +1210,13 @@ emu_proxy_setup (gpointer data) EProxy * em_utils_get_proxy (void) { - g_static_mutex_lock (&emu_proxy_lock); + g_mutex_lock (&emu_proxy_lock); if (!emu_proxy) { mail_call_main (MAIL_CALL_p_p, (MailMainFunc) emu_proxy_setup, NULL); } - g_static_mutex_unlock (&emu_proxy_lock); + g_mutex_unlock (&emu_proxy_lock); return emu_proxy; } diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index bde01abd22..a11b10662d 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -281,7 +281,7 @@ dialog_response (GtkDialog *gd, } } -static GStaticMutex status_lock = G_STATIC_MUTEX_INIT; +static GMutex status_lock; static gchar *format_service_name (CamelService *service); static gint @@ -292,7 +292,7 @@ operation_status_timeout (gpointer data) if (info->progress_bar) { GtkProgressBar *progress_bar; - g_static_mutex_lock (&status_lock); + g_mutex_lock (&status_lock); progress_bar = GTK_PROGRESS_BAR (info->progress_bar); @@ -308,7 +308,7 @@ operation_status_timeout (gpointer data) g_free (tmp); } - g_static_mutex_unlock (&status_lock); + g_mutex_unlock (&status_lock); return TRUE; } @@ -321,13 +321,13 @@ set_send_status (struct _send_info *info, const gchar *desc, gint pc) { - g_static_mutex_lock (&status_lock); + g_mutex_lock (&status_lock); g_free (info->what); info->what = g_strdup (desc); info->pc = pc; - g_static_mutex_unlock (&status_lock); + g_mutex_unlock (&status_lock); } static void @@ -336,7 +336,7 @@ set_transport_service (struct _send_info *info, { CamelService *service; - g_static_mutex_lock (&status_lock); + g_mutex_lock (&status_lock); service = camel_session_ref_service (info->session, transport_uid); @@ -349,7 +349,7 @@ set_transport_service (struct _send_info *info, if (service != NULL) g_object_unref (service); - g_static_mutex_unlock (&status_lock); + g_mutex_unlock (&status_lock); } /* for camel operation status */ diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index 2c2c701d3b..99abfdec20 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -52,7 +52,7 @@ static gboolean enabled = FALSE; static GtkWidget *get_cfg_widget (void); -static GStaticMutex mlock = G_STATIC_MUTEX_INIT; +static GMutex mlock; /** * each part should "implement" its own "public" functions: @@ -833,7 +833,7 @@ org_gnome_mail_new_notify (EPlugin *ep, is_part_enabled (CONF_KEY_NOTIFY_ONLY_INBOX))) return; - g_static_mutex_lock (&mlock); + g_mutex_lock (&mlock); new_notify_dbus (t); @@ -845,7 +845,7 @@ org_gnome_mail_new_notify (EPlugin *ep, if (is_part_enabled (CONF_KEY_ENABLED_SOUND)) new_notify_sound (t); - g_static_mutex_unlock (&mlock); + g_mutex_unlock (&mlock); } void @@ -857,7 +857,7 @@ org_gnome_mail_read_notify (EPlugin *ep, if (!enabled) return; - g_static_mutex_lock (&mlock); + g_mutex_lock (&mlock); read_notify_dbus (t); @@ -869,7 +869,7 @@ org_gnome_mail_read_notify (EPlugin *ep, if (is_part_enabled (CONF_KEY_ENABLED_SOUND)) read_notify_sound (t); - g_static_mutex_unlock (&mlock); + g_mutex_unlock (&mlock); } gint diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c index cc04b2e762..51ea980eb6 100644 --- a/plugins/publish-calendar/publish-calendar.c +++ b/plugins/publish-calendar/publish-calendar.c @@ -50,7 +50,7 @@ static GSList *queued_publishes = NULL; static gint online = 0; static GSList *error_queue = NULL; -static GStaticMutex error_queue_lock = G_STATIC_MUTEX_INIT; +static GMutex error_queue_lock; static guint error_queue_show_idle_id = 0; static void error_queue_add (gchar *descriptions, GError *error); @@ -1035,7 +1035,7 @@ error_queue_show_idle (gpointer user_data) GSList *l; gboolean has_error = FALSE, has_info = FALSE; - g_static_mutex_lock (&error_queue_lock); + g_mutex_lock (&error_queue_lock); for (l = error_queue; l; l = l->next) { struct eq_data *data = l->data; @@ -1078,7 +1078,7 @@ error_queue_show_idle (gpointer user_data) error_queue = NULL; error_queue_show_idle_id = 0; - g_static_mutex_unlock (&error_queue_lock); + g_mutex_unlock (&error_queue_lock); if (info) { update_publish_notification (has_error && has_info ? GTK_MESSAGE_WARNING : has_error ? GTK_MESSAGE_ERROR : GTK_MESSAGE_INFO, info->str); @@ -1102,11 +1102,11 @@ error_queue_add (gchar *description, data->description = description; data->error = error; - g_static_mutex_lock (&error_queue_lock); + g_mutex_lock (&error_queue_lock); error_queue = g_slist_append (error_queue, data); if (error_queue_show_idle_id == 0) error_queue_show_idle_id = g_idle_add (error_queue_show_idle, NULL); - g_static_mutex_unlock (&error_queue_lock); + g_mutex_unlock (&error_queue_lock); } static void diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c index 1a5803fda1..bb4a68e61d 100644 --- a/smime/lib/e-cert-db.c +++ b/smime/lib/e-cert-db.c @@ -566,16 +566,16 @@ e_cert_db_init (ECertDB *ec) { } -GStaticMutex init_mutex = G_STATIC_MUTEX_INIT; +GMutex init_mutex; static ECertDB *cert_db = NULL; ECertDB * e_cert_db_peek (void) { - g_static_mutex_lock (&init_mutex); + g_mutex_lock (&init_mutex); if (!cert_db) cert_db = g_object_new (E_TYPE_CERT_DB, NULL); - g_static_mutex_unlock (&init_mutex); + g_mutex_unlock (&init_mutex); return cert_db; } |