Re: [gnome-db] PATCH: Fix return value for gda_drop_table()
- From: "Vivien Malerba" <vmalerba gmail com>
- To: "Phil Longstaff" <plongstaff rogers com>
- Cc: gnome-db list <gnome-db-list gnome org>
- Subject: Re: [gnome-db] PATCH: Fix return value for gda_drop_table()
- Date: Mon, 10 Mar 2008 11:47:41 +0100
2008/3/9 Phil Longstaff <plongstaff rogers com>:
> The convenience function gda_drop_table() returns the wrong value.
> First, there are braces missing on an if-then-else, so that even if the
> operation is successful, the error path is taken. Secondly,
> gda_server_provider_perform_operation() returns TRUE if the operation
> has no error, so the sense of the test needs to be reversed.
>
> I've attached a patch to the libgda 3.0.2 source to fix these problems.
>
> Phil
>
>
> --- ../../libgda-3.0.2/libgda/gda-init.c 2008-01-28 11:17:26.000000000 -0500
> +++ ./gda-init.c 2008-03-09 16:41:01.000000000 -0400
> @@ -442,11 +442,12 @@
> retval = FALSE;
> }
> else {
> - if (gda_server_provider_perform_operation (server, cnn, op, error))
> + if (!gda_server_provider_perform_operation (server, cnn, op, error)) {
> /* error */
> g_object_unref (op);
> xmlFreeDoc(parameters);
> - return FALSE;
> + return FALSE;
> + }
> }
> g_object_unref (op);
> xmlFreeDoc(parameters);
Thanks for the patch, I'll apply to the V3 and trunk (future V4) branches.
Cheers,
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]