[libgda] GdaServerOperation usage corrections



commit 403975d2ebc173201e492f85e90dba74e2dce0fa
Author: Vivien Malerba <malerba gnome-db org>
Date:   Wed Nov 23 21:31:45 2011 +0100

    GdaServerOperation usage corrections

 libgda/gda-server-operation.c |    1 +
 tests/test-cnc-utils.c        |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libgda/gda-server-operation.c b/libgda/gda-server-operation.c
index 5375f98..1a0fe1d 100644
--- a/libgda/gda-server-operation.c
+++ b/libgda/gda-server-operation.c
@@ -2625,6 +2625,7 @@ gda_server_operation_perform_drop_database (GdaServerOperation *op, const gchar
 	GdaServerProvider *prov;
 
 	g_return_val_if_fail (GDA_IS_SERVER_OPERATION (op), FALSE);
+	g_return_val_if_fail (gda_server_operation_get_op_type (op) == GDA_SERVER_OPERATION_DROP_DB, FALSE);
 	if (provider)
 		prov = gda_config_get_provider (provider, error);
 	else
diff --git a/tests/test-cnc-utils.c b/tests/test-cnc-utils.c
index 457b1fd..a917254 100644
--- a/tests/test-cnc-utils.c
+++ b/tests/test-cnc-utils.c
@@ -134,7 +134,7 @@ test_cnc_setup_connection (const gchar *provider, const gchar *dbname, GError **
 		GdaServerOperation *op;
 
 		db_quark_list = gda_quark_list_new_from_string (db_params);
-		op = gda_server_operation_prepare_create_database (prov_info->id, dbname, NULL);
+		op = gda_server_operation_prepare_drop_database (prov_info->id, dbname, NULL);
 		gda_quark_list_foreach (db_quark_list, (GHFunc) db_create_quark_foreach_func, op);
 		gda_server_operation_perform_drop_database (op, NULL, NULL);
 		g_object_unref (op);



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