libgda r3249 - in trunk: . libgda providers/skel-implementation/capi testing



Author: vivien
Date: Wed Nov  5 13:41:38 2008
New Revision: 3249
URL: http://svn.gnome.org/viewvc/libgda?rev=3249&view=rev

Log:
2008-11-05  Vivien Malerba <malerba gnome-db org>

	* libgda/gda-config.c: don't try to load a shared library if
	it does not have the "plugin_init" symbol
	* providers/skel-implementation/capi/libgda-capi-4.0.pc.in: typo error
	* testing/gda-provider-status.c: small pointer error correction (Daniel Espinosa)

2008-11-05  Massimo Cora'  <maxcvs email it>

	* libgda/gda-holder.c (real_gda_holder_set_const_value):
	fixed a bug in returning wrong static values.


Modified:
   trunk/ChangeLog
   trunk/libgda/gda-config.c
   trunk/libgda/gda-holder.c
   trunk/providers/skel-implementation/capi/libgda-capi-4.0.pc.in
   trunk/testing/gda-provider-status.c

Modified: trunk/libgda/gda-config.c
==============================================================================
--- trunk/libgda/gda-config.c	(original)
+++ trunk/libgda/gda-config.c	Wed Nov  5 13:41:38 2008
@@ -1292,6 +1292,10 @@
 
 		if (g_module_symbol (handle, "plugin_init", (gpointer *) &plugin_init))
 			plugin_init (dirname);
+		else {
+			g_module_close (handle);
+			continue;
+		}
 		g_module_symbol (handle, "plugin_get_name", (gpointer *) &plugin_get_name);
 		g_module_symbol (handle, "plugin_get_description", (gpointer *) &plugin_get_description);
 		g_module_symbol (handle, "plugin_get_dsn_spec", (gpointer *) &plugin_get_dsn_spec);
@@ -1335,6 +1339,7 @@
 				   forget about that provider... */
 				internal_provider_free (ip);
 				ip = NULL;
+				g_module_close (handle);
 				continue;
 			}
 		}
@@ -1364,6 +1369,7 @@
 				   forget about that provider... */
 				internal_provider_free (ip);
 				ip = NULL;
+				g_module_close (handle);
 				continue;
 			}
 		}

Modified: trunk/libgda/gda-holder.c
==============================================================================
--- trunk/libgda/gda-holder.c	(original)
+++ trunk/libgda/gda-holder.c	Wed Nov  5 13:41:38 2008
@@ -1053,12 +1053,10 @@
 		holder->priv->invalid_forced = FALSE;
 		holder->priv->valid = newvalid;
 #ifdef DEBUG_HOLDER		
-		g_print ("Holder is not changed, returning %p\n", holder->priv->value);
+		g_print ("Holder is not changed");
 #endif		
-
 		/* set the changed status */
 		*value_changed = FALSE;
-		return holder->priv->value;
 	}
 	else {
 		*value_changed = TRUE;
@@ -1104,8 +1102,11 @@
 	}
 	else {
 		if (holder->priv->value) {
-			value_to_return = holder->priv->value;
-			holder->priv->value = NULL;
+			if (G_IS_VALUE (holder->priv->value))
+				value_to_return = holder->priv->value;
+			else
+				value_to_return = NULL;
+			holder->priv->value = NULL;			
 		}
 
 		if (value) {
@@ -1117,6 +1118,11 @@
 		g_signal_emit (holder, gda_holder_signals[CHANGED], 0);
 	}
 
+#ifdef DEBUG_HOLDER	
+	g_print ("returning %p, wannabe was %p\n", value_to_return,
+			 value);
+#endif	
+	
 	return value_to_return;
 }
 

Modified: trunk/providers/skel-implementation/capi/libgda-capi-4.0.pc.in
==============================================================================
--- trunk/providers/skel-implementation/capi/libgda-capi-4.0.pc.in	(original)
+++ trunk/providers/skel-implementation/capi/libgda-capi-4.0.pc.in	Wed Nov  5 13:41:38 2008
@@ -3,7 +3,7 @@
 libdir= libdir@
 includedir= includedir@
 
-Name: libgda-postgres- GDA_ABI_MAJOR_VERSION@  GDA_ABI_MINOR_VERSION@
+Name: libgda-capi- GDA_ABI_MAJOR_VERSION@  GDA_ABI_MINOR_VERSION@
 Description: GDA (GNOME Data Access) Capi provider
 Requires: libgda- GDA_ABI_MAJOR_VERSION@  GDA_ABI_MINOR_VERSION@
 Version: @VERSION@

Modified: trunk/testing/gda-provider-status.c
==============================================================================
--- trunk/testing/gda-provider-status.c	(original)
+++ trunk/testing/gda-provider-status.c	Wed Nov  5 13:41:38 2008
@@ -106,7 +106,7 @@
 				const gchar *pname;
 				const GValue *cvalue;
 
-				cvalue = gda_data_model_get_value_at (providers, 0, i, error);
+				cvalue = gda_data_model_get_value_at (providers, 0, i, &error);
 				if (!cvalue) 
 					g_error ("Can't load the '%s' provider: %s\n", pname,
 						 error && error->message ? error->message : "No detail");



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