[evolution-data-server/openismus-work] EBookBackendFile: Protect priv->revision with the lock when fetching backend properties.



commit 02acd3f42f5a5f331c41f10d5e3269fe36f2a575
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Tue Jan 29 15:45:49 2013 +0900

    EBookBackendFile: Protect priv->revision with the lock when fetching backend properties.

 addressbook/backends/file/e-book-backend-file.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 6b6d8da..3620548 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -1548,7 +1548,9 @@ e_book_backend_file_get_backend_property (EBookBackendSync *backend,
 	} else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS)) {
 		*prop_value = NULL;
 	} else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_REVISION)) {
+		g_rw_lock_reader_lock (&(bf->priv->lock));
 		*prop_value = g_strdup (bf->priv->revision);
+		g_rw_lock_reader_unlock (&(bf->priv->lock));
 	} else {
 		processed = FALSE;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]