[gnome-software] appstream plugin: Add locking to one more place
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] appstream plugin: Add locking to one more place
- Date: Sat, 6 Jun 2015 23:01:43 +0000 (UTC)
commit 23ee17f2bfba1b8a788f53533869a2d0efc62b8d
Author: Kalev Lember <kalevlember gmail com>
Date: Sat Jun 6 22:55:20 2015 +0200
appstream plugin: Add locking to one more place
Missed it in the previous commit.
src/plugins/gs-plugin-appstream.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 441d3dd..608ba42 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -187,6 +187,8 @@ gs_plugin_startup (GsPlugin *plugin, GError **error)
guint i;
_cleanup_hashtable_unref_ GHashTable *origins = NULL;
+ g_mutex_lock (&plugin->priv->store_mutex);
+
/* clear all existing applications if the store was invalidated */
as_store_remove_all (plugin->priv->store);
@@ -247,6 +249,7 @@ gs_plugin_startup (GsPlugin *plugin, GError **error)
}
}
out:
+ g_mutex_unlock (&plugin->priv->store_mutex);
gs_profile_stop (plugin->profile, "appstream::startup");
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]