Re: [PATCH BlueZ v1] gdbus: Fix incorrectly discarded signals

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

 



On Tue, May 22, 2012 at 11:58 AM, Mikel Astiz <mikel.astiz.oss@xxxxxxxxx> wrote:
> From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx>
>
> Signals with no arguments were incorrectly filtered out due to the NULL
> inequality check.
> ---
>  gdbus/object.c |   10 +++-------
>  1 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/gdbus/object.c b/gdbus/object.c
> index 2dd7c0e..900e7ab 100644
> --- a/gdbus/object.c
> +++ b/gdbus/object.c
> @@ -612,16 +612,12 @@ static gboolean check_signal(DBusConnection *conn, const char *path,
>        for (signal = iface->signals; signal && signal->name; signal++) {
>                if (!strcmp(signal->name, name)) {
>                        *args = signal->args;
> -                       break;
> +                       return TRUE;
>                }
>        }
>
> -       if (*args == NULL) {
> -               error("No signal named %s on interface %s", name, interface);
> -               return FALSE;
> -       }
> -
> -       return TRUE;
> +       error("No signal named %s on interface %s", name, interface);
> +       return FALSE;
>  }

Ack.

Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux