2012-07-27 07:44:12

by Jaganath Kanakkassery

[permalink] [raw]
Subject: [PATCH BlueZ] audio: Remove redundant variable gerr

---
audio/gateway.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/audio/gateway.c b/audio/gateway.c
index 6162948..1c45753 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -381,7 +381,6 @@ static void get_incoming_record_cb(sdp_list_t *recs, int err,
{
struct audio_device *dev = user_data;
struct gateway *gw = dev->gateway;
- GError *gerr = NULL;

if (err < 0) {
error("Unable to get service record: %s (%d)", strerror(-err),
@@ -398,7 +397,7 @@ static void get_incoming_record_cb(sdp_list_t *recs, int err,
if (gw->version == 0)
goto fail;

- rfcomm_connect_cb(gw->incoming, gerr, dev);
+ rfcomm_connect_cb(gw->incoming, NULL, dev);
return;

fail:
--
1.7.1



2012-07-27 12:58:52

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH BlueZ] gdbus: Fix compilation error if macro "error" is defined

Hi Jaganath,

On Fri, Jul 27, 2012 at 3:25 PM, Lucas De Marchi
<[email protected]> wrote:
> On Fri, Jul 27, 2012 at 4:44 AM, Jaganath Kanakkassery
> <[email protected]> wrote:
>> The variable "signature" used in error is not defined.
>> ---
>> gdbus/object.c | 3 +--
>> 1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/gdbus/object.c b/gdbus/object.c
>> index 900e7ab..0f05234 100644
>> --- a/gdbus/object.c
>> +++ b/gdbus/object.c
>> @@ -645,8 +645,7 @@ static dbus_bool_t emit_signal_valist(DBusConnection *conn,
>> goto fail;
>>
>> if (g_dbus_args_have_signature(args, signal) == FALSE) {
>> - error("%s.%s: expected signature'%s' but got '%s'",
>> - interface, name, args, signature);
>> + error("signature does not match");
>
> argh... indeed.
>
> However I'd rather fix it by letting a similar message (without args,
> which have a different type):
>
> error("%s.%s: got unexpected signature '%s'",
> interface, name,
> dbus_message_get_signature(signal));

Yep, the message itself can be keep, just fix what is broken.


--
Luiz Augusto von Dentz

2012-07-27 12:25:53

by Lucas De Marchi

[permalink] [raw]
Subject: Re: [PATCH BlueZ] gdbus: Fix compilation error if macro "error" is defined

On Fri, Jul 27, 2012 at 4:44 AM, Jaganath Kanakkassery
<[email protected]> wrote:
> The variable "signature" used in error is not defined.
> ---
> gdbus/object.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/gdbus/object.c b/gdbus/object.c
> index 900e7ab..0f05234 100644
> --- a/gdbus/object.c
> +++ b/gdbus/object.c
> @@ -645,8 +645,7 @@ static dbus_bool_t emit_signal_valist(DBusConnection *conn,
> goto fail;
>
> if (g_dbus_args_have_signature(args, signal) == FALSE) {
> - error("%s.%s: expected signature'%s' but got '%s'",
> - interface, name, args, signature);
> + error("signature does not match");

argh... indeed.

However I'd rather fix it by letting a similar message (without args,
which have a different type):

error("%s.%s: got unexpected signature '%s'",
interface, name,
dbus_message_get_signature(signal));


thanks
Lucas De Marchi

2012-07-27 07:44:13

by Jaganath Kanakkassery

[permalink] [raw]
Subject: [PATCH BlueZ] gdbus: Fix compilation error if macro "error" is defined

The variable "signature" used in error is not defined.
---
gdbus/object.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 900e7ab..0f05234 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -645,8 +645,7 @@ static dbus_bool_t emit_signal_valist(DBusConnection *conn,
goto fail;

if (g_dbus_args_have_signature(args, signal) == FALSE) {
- error("%s.%s: expected signature'%s' but got '%s'",
- interface, name, args, signature);
+ error("signature does not match");
ret = FALSE;
goto fail;
}
--
1.7.1


2012-08-01 10:17:23

by Jaganath Kanakkassery

[permalink] [raw]
Subject: Re: [PATCH BlueZ] gdbus: Fix compilation error if macro "error" is defined

Hi Lucas,

--------------------------------------------------
From: "Lucas De Marchi" <[email protected]>
Sent: Friday, July 27, 2012 5:55 PM
To: "Jaganath Kanakkassery" <[email protected]>
Cc: <[email protected]>
Subject: Re: [PATCH BlueZ] gdbus: Fix compilation error if macro "error" is
defined

> On Fri, Jul 27, 2012 at 4:44 AM, Jaganath Kanakkassery
> <[email protected]> wrote:
>> The variable "signature" used in error is not defined.
>> ---
>> gdbus/object.c | 3 +--
>> 1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/gdbus/object.c b/gdbus/object.c
>> index 900e7ab..0f05234 100644
>> --- a/gdbus/object.c
>> +++ b/gdbus/object.c
>> @@ -645,8 +645,7 @@ static dbus_bool_t emit_signal_valist(DBusConnection
>> *conn,
>> goto fail;
>>
>> if (g_dbus_args_have_signature(args, signal) == FALSE) {
>> - error("%s.%s: expected signature'%s' but got '%s'",
>> - interface, name, args, signature);
>> + error("signature does not match");
>
> argh... indeed.
>
> However I'd rather fix it by letting a similar message (without args,
> which have a different type):
>
> error("%s.%s: got unexpected signature '%s'",
> interface, name,
> dbus_message_get_signature(signal));
>

Ok, I will raise patch.

Thanks,
Jaganath