64 lines
1.8 KiB
Diff
64 lines
1.8 KiB
Diff
From b5fb9ec54cbf38b5dd3f1e1e8bc80dc84a7aa460 Mon Sep 17 00:00:00 2001
|
|
From: Hans de Goede <hdegoede@redhat.com>
|
|
Date: Sat, 10 Jul 2021 13:30:47 +0200
|
|
Subject: [PATCH 1/3] mdb-provider: Remove no-op mdb_init() and mdb_exit()
|
|
calls
|
|
|
|
According to the mdbtools NEWS file for the 0.9.0 these functions have
|
|
always been no-ops:
|
|
|
|
"The previously-deprecated functions mdb_init() and mdb_exit() have been
|
|
removed. These functions did nothing; any calls to them should be excised with
|
|
prejudice."
|
|
|
|
And now they have been removed completely, since these were already
|
|
no-ops in older mdbtools versions we can safely drop them without
|
|
loosing compatibility with older mdbtools releases.
|
|
---
|
|
providers/mdb/gda-mdb-provider.c | 15 ---------------
|
|
1 file changed, 15 deletions(-)
|
|
|
|
diff --git a/providers/mdb/gda-mdb-provider.c b/providers/mdb/gda-mdb-provider.c
|
|
index 10bdc809d..82b085ca7 100644
|
|
--- a/providers/mdb/gda-mdb-provider.c
|
|
+++ b/providers/mdb/gda-mdb-provider.c
|
|
@@ -63,8 +63,6 @@ static const gchar *gda_mdb_provider_get_database (GdaServerProvider *provider,
|
|
|
|
|
|
static GObjectClass *parent_class = NULL;
|
|
-static GMutex mdb_init_mutex;
|
|
-static gint loaded_providers = 0;
|
|
char *g_input_ptr;
|
|
|
|
/*
|
|
@@ -107,13 +105,6 @@ gda_mdb_provider_finalize (GObject *object)
|
|
|
|
/* chain to parent class */
|
|
parent_class->finalize (object);
|
|
-
|
|
- /* call MDB exit function if there are no more providers */
|
|
- g_mutex_lock (&mdb_init_mutex);
|
|
- loaded_providers--;
|
|
- if (loaded_providers == 0)
|
|
- mdb_exit ();
|
|
- g_mutex_unlock (&mdb_init_mutex);
|
|
}
|
|
|
|
GType
|
|
@@ -148,12 +139,6 @@ gda_mdb_provider_new (void)
|
|
{
|
|
GdaMdbProvider *provider;
|
|
|
|
- g_mutex_lock (&mdb_init_mutex);
|
|
- if (loaded_providers == 0)
|
|
- mdb_init ();
|
|
- loaded_providers++;
|
|
- g_mutex_unlock (&mdb_init_mutex);
|
|
-
|
|
provider = g_object_new (gda_mdb_provider_get_type (), NULL);
|
|
return GDA_SERVER_PROVIDER (provider);
|
|
}
|
|
--
|
|
2.31.1
|
|
|