[libgda] Misc. corrections



commit 21c7e661dd0aa961b4f474cccecf0ea8d6395a52
Author: Vivien Malerba <malerba gnome-db org>
Date:   Thu Sep 26 21:29:57 2013 +0200

    Misc. corrections

 libgda/gda-data-model-bdb.c        |    2 +-
 libgda/gda-server-provider-extra.c |   15 +++++++++++----
 libgda/gda-sql-builder.c           |    4 ++--
 libgda/gda-value.c                 |    2 +-
 testing/gda-provider-status.c      |    6 ++----
 5 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/libgda/gda-data-model-bdb.c b/libgda/gda-data-model-bdb.c
index a76adb5..1561a6f 100644
--- a/libgda/gda-data-model-bdb.c
+++ b/libgda/gda-data-model-bdb.c
@@ -492,7 +492,7 @@ gda_data_model_bdb_new (const gchar *filename, const gchar *db_name)
  *
  * Get the list of errors which have occurred while using @model
  *
- * Returns: (element-type GObject.Error) (transfer none): a read-only list of #GError pointers, or %NULL if 
no error has occurred
+ * Returns: (element-type GError) (transfer none): a read-only list of #GError pointers, or %NULL if no 
error has occurred
  */
 const GSList *
 gda_data_model_bdb_get_errors (GdaDataModelBdb *model)
diff --git a/libgda/gda-server-provider-extra.c b/libgda/gda-server-provider-extra.c
index 4644277..943e97a 100644
--- a/libgda/gda-server-provider-extra.c
+++ b/libgda/gda-server-provider-extra.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2006 - 2008 Murray Cumming <murrayc murrayc com>
  * Copyright (C) 2006 Rodrigo Moya <rodrigo gnome-db org>
- * Copyright (C) 2006 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2006 - 2013 Vivien Malerba <malerba gnome-db org>
  * Copyright (C) 2007 Armin Burgmeier <armin openismus com>
  * Copyright (C) 2007 Daniel Espinosa <esodan gmail com>
  * Copyright (C) 2010 David King <davidk openismus com>
@@ -292,8 +292,8 @@ gda_select_alter_select_for_empty (GdaStatement *stmt, G_GNUC_UNUSED GError **er
  * @g_type: a #GType
  * @dbms_type: (allow-none): a database type
  *
- * reserved to database provider's implementations: get the #GdaDataHandler associated to @prov
- * for connection @cnc.
+ * Reserved to database provider's implementations: get the #GdaDataHandler associated to @prov
+ * for connection @cnc. You probably want to use gda_server_provider_get_data_handler_g_type().
  *
  * Returns: (transfer none): the requested #GdaDataHandler, or %NULL if none found
  */
@@ -302,6 +302,8 @@ gda_server_provider_handler_find (GdaServerProvider *prov, GdaConnection *cnc,
                                  GType g_type, const gchar *dbms_type)
 {
        g_return_val_if_fail (GDA_IS_SERVER_PROVIDER (prov), NULL);
+       if (cnc)
+               g_return_val_if_fail (GDA_IS_CONNECTION (cnc), NULL);
 
        GdaDataHandler *dh;
        GdaServerProviderHandlerInfo info;
@@ -309,8 +311,13 @@ gda_server_provider_handler_find (GdaServerProvider *prov, GdaConnection *cnc,
        info.cnc = cnc;
        info.g_type = g_type;
        info.dbms_type = (gchar *) dbms_type;
-
        dh = g_hash_table_lookup (prov->priv->data_handlers, &info);
+       if (!dh) {
+               /* try without the connection specification */
+               info.cnc = NULL;
+               dh = g_hash_table_lookup (prov->priv->data_handlers, &info);
+       }
+
        return dh;
 }
 
diff --git a/libgda/gda-sql-builder.c b/libgda/gda-sql-builder.c
index 00af1eb..5eda90f 100644
--- a/libgda/gda-sql-builder.c
+++ b/libgda/gda-sql-builder.c
@@ -1681,9 +1681,9 @@ gda_sql_builder_add_function (GdaSqlBuilder *builder, const gchar *func_name, ..
  *
  * Returns: the ID of the new expression, or %0 if there was an error
  *
- * Since: 4.2
- *
  * Rename to: gda_sql_builder_add_function
+ *
+ * Since: 4.2
  */
 GdaSqlBuilderId
 gda_sql_builder_add_function_v (GdaSqlBuilder *builder, const gchar *func_name,
diff --git a/libgda/gda-value.c b/libgda/gda-value.c
index 73cb5b7..7ad6e58 100644
--- a/libgda/gda-value.c
+++ b/libgda/gda-value.c
@@ -1424,7 +1424,7 @@ gda_timestamp_valid (const GdaTimestamp *timestamp)
 
 /**
  * gda_timestamp_change_timezone:
- * @time: a valid #GdaTimestamp
+ * @ts: a valid #GdaTimestamp
  * @ntz: a new timezone to use, in seconds added to GMT
  *
  * This function is similar to gda_time_change_timezone() but operates on time stamps.
diff --git a/testing/gda-provider-status.c b/testing/gda-provider-status.c
index 4606fb0..9ade4c5 100644
--- a/testing/gda-provider-status.c
+++ b/testing/gda-provider-status.c
@@ -482,7 +482,6 @@ report_provider_status (GdaServerProvider *prov, GdaConnection *cnc)
                GSList *list;
                td = xmlNewChild (tr, NULL, BAD_CAST "td", NULL);
                for (list = pinfo->dsn_params->holders; list; list = list->next) {
-                       xmlNodePtr div;
                        gchar *str, *descr;
                        GdaHolder *holder = GDA_HOLDER (list->data);
                        g_object_get (G_OBJECT (holder), "description", &descr, NULL);
@@ -491,7 +490,7 @@ report_provider_status (GdaServerProvider *prov, GdaConnection *cnc)
                        else
                                str = g_strdup (gda_holder_get_id (holder));
                        g_free (descr);
-                       div = xmlNewTextChild (td, NULL, BAD_CAST "div", BAD_CAST str);
+                       xmlNewTextChild (td, NULL, BAD_CAST "div", BAD_CAST str);
                        g_free (str);
                }
        }
@@ -505,7 +504,6 @@ report_provider_status (GdaServerProvider *prov, GdaConnection *cnc)
                if (pinfo->auth_params->holders) {
                        td = xmlNewChild (tr, NULL, BAD_CAST "td", NULL);
                        for (list = pinfo->auth_params->holders; list; list = list->next) {
-                               xmlNodePtr div;
                                gchar *str, *descr;
                                GdaHolder *holder = GDA_HOLDER (list->data);
                                g_object_get (G_OBJECT (holder), "description", &descr, NULL);
@@ -514,7 +512,7 @@ report_provider_status (GdaServerProvider *prov, GdaConnection *cnc)
                                else
                                        str = g_strdup (gda_holder_get_id (holder));
                                g_free (descr);
-                               div = xmlNewTextChild (td, NULL, BAD_CAST "div", BAD_CAST str);
+                               xmlNewTextChild (td, NULL, BAD_CAST "div", BAD_CAST str);
                                g_free (str);
                        }
                }


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