[libgda] GdaVConnectionDataModel: fix lock issue
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] GdaVConnectionDataModel: fix lock issue
- Date: Mon, 11 Feb 2019 23:25:25 +0000 (UTC)
commit ad908fb95f446d6e5ed79067c09eacb6a729a88f
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date: Mon Feb 11 09:27:31 2019 -0600
GdaVConnectionDataModel: fix lock issue
libgda/sqlite/virtual/gda-vconnection-data-model.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgda/sqlite/virtual/gda-vconnection-data-model.c
b/libgda/sqlite/virtual/gda-vconnection-data-model.c
index 69b767167..29ff07824 100644
--- a/libgda/sqlite/virtual/gda-vconnection-data-model.c
+++ b/libgda/sqlite/virtual/gda-vconnection-data-model.c
@@ -623,9 +623,9 @@ vcontext_free (VContext *context)
void
_gda_vconnection_set_working_obj (GdaVconnectionDataModel *cnc, GObject *obj)
{
+ g_mutex_lock (& (cnc->priv->lock_context));
GSList *list;
if (obj) {
- g_mutex_lock (& (cnc->priv->lock_context));
for (list = cnc->priv->table_data_list; list; list = list->next) {
GdaVConnectionTableData *td = (GdaVConnectionTableData*) list->data;
VContext *vc = NULL;
@@ -660,8 +660,8 @@ _gda_vconnection_set_working_obj (GdaVconnectionDataModel *cnc, GObject *obj)
* an exception already occurred */
td->context.current_vcontext = NULL;
}
- g_mutex_unlock (& (cnc->priv->lock_context));
}
+ g_mutex_unlock (& (cnc->priv->lock_context));
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]