2012-04-12 15:02:51

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 00/19] Fix D-Bus memory leaks, bluetooth name, double unref etc

This series of patches fixes the following issues.

Syam Sidhardhan (19):
health: Fix memory leak
avrcp: Fix the response ctype of SetPlayerApplicationSettingValue
agent: Free the agent request properly
gstavdtpsink: Fix D-Bus memory leak in audio
gateway: Fix D-Bus memory leak in audio
gateway: Fix D-Bus reply memory leak
hci: Retrieve the bluetooth name correctly
hciconfig: Remove unwanted NULL termination
agent: Fix double D-Bus message unref
sdpd-request: Fix passing zero instead of NULL
sap-u8500: Fix empty parameter list in function declaration
adapter: Remove headers declared but not defined
headset: Remove header declared but not defined
network: Remove header declared but not defined
audio: Fix newline before EOF
input: Fix newline before EOF
src: Fix newline before EOF
doc: Fix typo
Add Syam's email address

AUTHORS | 1 +
audio/avrcp.c | 2 +-
audio/gateway.c | 11 +++++++----
audio/gsta2dpsink.c | 1 -
audio/gsta2dpsink.h | 1 -
audio/gstavdtpsink.c | 4 +++-
audio/gstrtpsbcpay.c | 1 -
audio/gstsbcdec.c | 2 --
audio/gstsbcenc.c | 2 --
audio/gstsbcparse.c | 1 -
audio/gstsbcutil.c | 1 -
audio/gstsbcutil.h | 1 -
audio/headset.h | 1 -
doc/adapter-api.txt | 2 +-
doc/audio-api.txt | 2 +-
doc/device-api.txt | 2 +-
doc/health-api.txt | 6 +++---
doc/media-api.txt | 6 +++---
doc/mgmt-api.txt | 2 +-
doc/serial-api.txt | 2 +-
health/mcap.c | 1 +
input/sixpair.c | 1 -
lib/hci.c | 5 +++--
network/server.h | 2 --
sap/sap-u8500.c | 2 +-
src/adapter.h | 2 --
src/agent.c | 3 +--
src/agent.h | 1 -
src/log.h | 1 -
src/sdp-client.c | 1 -
src/sdpd-request.c | 2 +-
src/storage.h | 1 -
tools/hciconfig.c | 2 --
33 files changed, 30 insertions(+), 45 deletions(-)

--
1.7.4.1



2012-04-20 18:13:44

by Andre Guedes

[permalink] [raw]
Subject: Re: [PATCH 1/5] Bluetooth: Remove unused hci_le_ltk_reply()

Hi Syam/Gustavo,

On Fri, Apr 13, 2012 at 7:17 PM, Gustavo Padovan <[email protected]> wrote:
> Hi Syam,
>
> * Syam Sidhardhan <[email protected]> [2012-04-12 20:33:17 +0530]:
>
>> In this API, we were using sizeof operator for an array
>> given as function argument, which is invalid.
>> However this API is not used anywhere.
>>
>> Signed-off-by: Syam Sidhardhan <[email protected]>
>> ---
>> ?include/net/bluetooth/hci_core.h | ? ?1 -
>> ?net/bluetooth/hci_conn.c ? ? ? ? | ? 16 ----------------
>> ?2 files changed, 0 insertions(+), 17 deletions(-)
>>
>> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
>> index c0b232c..6e170de 100644
>> --- a/include/net/bluetooth/hci_core.h
>> +++ b/include/net/bluetooth/hci_core.h
>> @@ -1069,7 +1069,6 @@ void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? u16 latency, u16 to_multiplier);
>> ?void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? __u8 ltk[16]);
>> -void hci_le_ltk_reply(struct hci_conn *conn, u8 ltk[16]);
>
> I'll let Andre comment here, I'm not sure if this is going to be used on
> the future or not.

I'm not sure too, I think Vinicius can tell more about that.

Regarding the memcpy call, yes, it is definitely bogus.

Regards,

Andre

2012-04-14 16:29:24

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH 5/5] Bluetooth: mgmt: Remove unwanted goto statement

Hi Syam,

On Thu, Apr 12, 2012, Syam Sidhardhan wrote:
> Signed-off-by: Syam Sidhardhan <[email protected]>
> ---
> net/bluetooth/mgmt.c | 16 ++++------------
> 1 files changed, 4 insertions(+), 12 deletions(-)

This patch has also been applied (after adding a proper commit message
which is required for all kernel patches).

Johan

2012-04-13 22:27:29

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH 4/5] Bluetooth: Remove strtoba header declared but not define

Hi Syam,

* Syam Sidhardhan <[email protected]> [2012-04-12 20:33:20 +0530]:

> Signed-off-by: Syam Sidhardhan <[email protected]>
> ---
> include/net/bluetooth/bluetooth.h | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)

Patch is applied, thanks.
However I had to fix it to add commit message, we require that even for
simple patches. Keep that in mind for the next time.

Gustavo

2012-04-13 22:24:13

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH 0/5] Bluetooth: Remove unused API's and code optimization

Hi Syam,

* Syam Sidhardhan <[email protected]> [2012-04-12 20:33:16 +0530]:

> This series of patches removes various unused API's and avoid unwanted
> goto statements.

I think you did a mistake when sending these patches, userspace and
kernel patches are mixed in the same thread. when using git send-email
send one patches per project and not everything in the same batch, please.

Gustavo

2012-04-13 22:21:40

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH 3/5] Bluetooth: hci_core: Remove header declared but not define

Hi Syam,

* Syam Sidhardhan <[email protected]> [2012-04-12 20:33:19 +0530]:

> Signed-off-by: Syam Sidhardhan <[email protected]>
> ---
> include/net/bluetooth/hci_core.h | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)

This one is applied (with some changes in the commit message). Thanks.

Gustavo

2012-04-13 22:17:00

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH 1/5] Bluetooth: Remove unused hci_le_ltk_reply()

Hi Syam,

* Syam Sidhardhan <[email protected]> [2012-04-12 20:33:17 +0530]:

> In this API, we were using sizeof operator for an array
> given as function argument, which is invalid.
> However this API is not used anywhere.
>
> Signed-off-by: Syam Sidhardhan <[email protected]>
> ---
> include/net/bluetooth/hci_core.h | 1 -
> net/bluetooth/hci_conn.c | 16 ----------------
> 2 files changed, 0 insertions(+), 17 deletions(-)
>
> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> index c0b232c..6e170de 100644
> --- a/include/net/bluetooth/hci_core.h
> +++ b/include/net/bluetooth/hci_core.h
> @@ -1069,7 +1069,6 @@ void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max,
> u16 latency, u16 to_multiplier);
> void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],
> __u8 ltk[16]);
> -void hci_le_ltk_reply(struct hci_conn *conn, u8 ltk[16]);

I'll let Andre comment here, I'm not sure if this is going to be used on
the future or not.

Gustavo

2012-04-13 10:08:44

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH obexd 0/4] Fix memory leak, remove unused struct etc

Hi Syam,

On Thu, Apr 12, 2012, Syam Sidhardhan wrote:
> This series of patches fixes the following issues in obexd.
>
> Syam Sidhardhan (4):
> client: Fix memory leak during session connect
> src: Use goto for avoiding code duplication
> src: Remove headers declared but not defined
> client: Remove unused struct session_callback
>
> client/session.c | 10 ++++------
> src/manager.c | 4 ++--
> src/obex.h | 4 ----
> 3 files changed, 6 insertions(+), 12 deletions(-)

All patches in this set have been applied. Thanks.

Johan

2012-04-13 09:51:20

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH BlueZ 07/19] hci: Retrieve the bluetooth name correctly

Hi Syam,

On Thu, Apr 12, 2012, Syam Sidhardhan wrote:
> If we set the bluetooth name length as maximum 248 bytes,
> then while retrieving back we were getting only 247 bytes.
> This problem can be verified using hciconfig tool.
> ---
> lib/hci.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/lib/hci.c b/lib/hci.c
> index 269c021..9f829c9 100644
> --- a/lib/hci.c
> +++ b/lib/hci.c
> @@ -1417,8 +1417,9 @@ int hci_read_local_name(int dd, int len, char *name, int to)
> return -1;
> }
>
> - rp.name[247] = '\0';
> - strncpy(name, (char *) rp.name, len);
> + strncpy(name, (char *) rp.name, len - 1);
> + name[len - 1] = '\0';
> +
> return 0;
> }

This doesn't look quite right to me. What if the local name is not nul
terminated (exactly 248 characters) and an application passes a buffer
greater than 249 characters. It seems to me like you'd get a buffer over
flow with the strncpy call in that case.

Also, since this is a public library function we need to be very careful
not to break the ABI. Some application might be "depending" on the
brokeness of this function and break if we fix it.

Since we're planning on making almost everything of libbluetooth private
to BlueZ starting with 5.0 (I believe the socket structs and definitions
may be the only exception) I'm not sure these two patches are worth it.

Johan

2012-04-13 09:47:21

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH BlueZ 00/19] Fix D-Bus memory leaks, bluetooth name, double unref etc

Hi Syam,

On Thu, Apr 12, 2012, Syam Sidhardhan wrote:
> This series of patches fixes the following issues.
>
> Syam Sidhardhan (19):
> health: Fix memory leak
> avrcp: Fix the response ctype of SetPlayerApplicationSettingValue
> agent: Free the agent request properly
> gstavdtpsink: Fix D-Bus memory leak in audio
> gateway: Fix D-Bus memory leak in audio
> gateway: Fix D-Bus reply memory leak
> hci: Retrieve the bluetooth name correctly
> hciconfig: Remove unwanted NULL termination
> agent: Fix double D-Bus message unref
> sdpd-request: Fix passing zero instead of NULL
> sap-u8500: Fix empty parameter list in function declaration
> adapter: Remove headers declared but not defined
> headset: Remove header declared but not defined
> network: Remove header declared but not defined
> audio: Fix newline before EOF
> input: Fix newline before EOF
> src: Fix newline before EOF
> doc: Fix typo
> Add Syam's email address

Thanks a lot for these cleanups and fixes! I've applied all except the
hci & hciconfig patches regarding the adapter name since those need a
bit of discussing.

Johan

2012-04-12 20:30:02

by Lucas De Marchi

[permalink] [raw]
Subject: Re: [PATCH BlueZ 02/19] avrcp: Fix the response ctype of SetPlayerApplicationSettingValue

On Thu, Apr 12, 2012 at 12:02 PM, Syam Sidhardhan <[email protected]> wrote:
> Request ctype of "SetPlayerApplicationSettingValue" is CONTROL,
> so response should be ACCEPTED instead of STABLE.
> ---
> ?audio/avrcp.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/audio/avrcp.c b/audio/avrcp.c
> index 8eba046..70e5bbf 100644
> --- a/audio/avrcp.c
> +++ b/audio/avrcp.c
> @@ -791,7 +791,7 @@ static uint8_t avrcp_handle_set_player_value(struct avrcp_player *player,
> ? ? ? ?if (len) {
> ? ? ? ? ? ? ? ?pdu->params_len = 0;
>
> - ? ? ? ? ? ? ? return AVC_CTYPE_STABLE;
> + ? ? ? ? ? ? ? return AVC_CTYPE_ACCEPTED;

Similar to "e8e323e avrcp: Fix response ctype of AbortContinuingResponse"

Ack.


Lucas De Marchi

2012-04-12 15:03:05

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 14/19] network: Remove header declared but not defined

---
network/server.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/network/server.h b/network/server.h
index d88acab..6351f6d 100644
--- a/network/server.h
+++ b/network/server.h
@@ -25,5 +25,3 @@ int server_init(DBusConnection *conn, gboolean secure);
void server_exit(void);
int server_register(struct btd_adapter *adapter);
int server_unregister(struct btd_adapter *adapter);
-
-int server_find_data(const char *path, const char *pattern);
--
1.7.4.1


2012-04-12 15:03:02

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 11/19] sap-u8500: Fix empty parameter list in function declaration

---
sap/sap-u8500.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sap/sap-u8500.c b/sap/sap-u8500.c
index ef7d95c..2920cc7 100644
--- a/sap/sap-u8500.c
+++ b/sap/sap-u8500.c
@@ -380,7 +380,7 @@ static void simd_close(void)
u8500.sap_data = NULL;
}

-static void recv_sim_ready()
+static void recv_sim_ready(void)
{
sap_info("sim is ready. Try to connect again");

--
1.7.4.1


2012-04-12 15:03:12

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH obexd 1/4] client: Fix memory leak during session connect

---
client/session.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/client/session.c b/client/session.c
index a9883c7..0663262 100644
--- a/client/session.c
+++ b/client/session.c
@@ -407,8 +407,11 @@ static int session_connect(struct obc_session *session,
}

/* Ongoing connection */
- if (session->id > 0)
+ if (session->id > 0) {
+ obc_session_unref(callback->session);
+ g_free(callback);
return 0;
+ }

session->id = transport->connect(session->source, session->destination,
driver->uuid, session->channel,
--
1.7.4.1


2012-04-12 15:03:08

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 17/19] src: Fix newline before EOF

---
src/agent.h | 1 -
src/log.h | 1 -
src/sdp-client.c | 1 -
src/storage.h | 1 -
4 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/agent.h b/src/agent.h
index f62bf3b..063a188 100644
--- a/src/agent.h
+++ b/src/agent.h
@@ -74,4 +74,3 @@ gboolean agent_matches(struct agent *agent, const char *name, const char *path);

void agent_init(void);
void agent_exit(void);
-
diff --git a/src/log.h b/src/log.h
index b43b2b7..51c52e6 100644
--- a/src/log.h
+++ b/src/log.h
@@ -56,4 +56,3 @@ void __btd_enable_debug(struct btd_debug_desc *start,
if (__btd_debug_desc.flags & BTD_DEBUG_FLAG_PRINT) \
btd_debug("%s:%s() " fmt, __FILE__, __FUNCTION__ , ## arg); \
} while (0)
-
diff --git a/src/sdp-client.c b/src/sdp-client.c
index f119313..3e78dde 100644
--- a/src/sdp-client.c
+++ b/src/sdp-client.c
@@ -366,4 +366,3 @@ int bt_cancel_discovery(const bdaddr_t *src, const bdaddr_t *dst)

return 0;
}
-
diff --git a/src/storage.h b/src/storage.h
index 6967f97..6255ae8 100644
--- a/src/storage.h
+++ b/src/storage.h
@@ -95,4 +95,3 @@ int write_longtermkeys(bdaddr_t *local, bdaddr_t *peer, const char *key);
gboolean has_longtermkeys(bdaddr_t *local, bdaddr_t *peer);

#define PNP_UUID "00001200-0000-1000-8000-00805f9b34fb"
-
--
1.7.4.1


2012-04-12 15:03:13

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH obexd 2/4] src: Use goto for avoiding code duplication

---
src/manager.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/manager.c b/src/manager.c
index 87010c4..b9786ad 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -607,8 +607,7 @@ void manager_register_session(struct obex_session *os)
session_methods, NULL,
NULL, os, NULL)) {
error("Cannot register Session interface.");
- g_free(path);
- return;
+ goto done;
}

g_dbus_emit_signal(connection, OPENOBEX_MANAGER_PATH,
@@ -616,6 +615,7 @@ void manager_register_session(struct obex_session *os)
DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_INVALID);

+done:
g_free(path);
}

--
1.7.4.1


2012-04-12 15:03:09

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 18/19] doc: Fix typo

---
doc/adapter-api.txt | 2 +-
doc/audio-api.txt | 2 +-
doc/device-api.txt | 2 +-
doc/health-api.txt | 6 +++---
doc/media-api.txt | 6 +++---
doc/mgmt-api.txt | 2 +-
doc/serial-api.txt | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt
index 20cef03..0cded8c 100644
--- a/doc/adapter-api.txt
+++ b/doc/adapter-api.txt
@@ -261,7 +261,7 @@ Properties string Address [readonly]

The pairable timeout in seconds. A value of zero
means that the timeout is disabled and it will stay in
- pareable mode forever.
+ pairable mode forever.

uint32 DiscoverableTimeout [readwrite]

diff --git a/doc/audio-api.txt b/doc/audio-api.txt
index b85400b..02291fd 100644
--- a/doc/audio-api.txt
+++ b/doc/audio-api.txt
@@ -428,7 +428,7 @@ properties boolean Connected [readonly]

uint16 RegistrationStatus [readonly]

- Service availability indicatior of AG, where:
+ Service availability indicator of AG, where:
0 implies no service. No Home/Roam network available.
1 implies presence of service. Home/Roam network
available.
diff --git a/doc/device-api.txt b/doc/device-api.txt
index 69081d8..4a170e4 100644
--- a/doc/device-api.txt
+++ b/doc/device-api.txt
@@ -191,7 +191,7 @@ Properties string Address [readonly]
device name. Setting an empty string as alias will
convert it back to the remote device name.

- When reseting the alias with an empty string, the
+ When resetting the alias with an empty string, the
emitted PropertyChanged signal will show the remote
name again.

diff --git a/doc/health-api.txt b/doc/health-api.txt
index 3d0a717..7a000cb 100644
--- a/doc/health-api.txt
+++ b/doc/health-api.txt
@@ -82,8 +82,8 @@ Methods:
void DestroyChannel(object channel)

Destroys the data channel object. Only the creator of the
- channel or the creator of the HealtApplication that received the
- data channel will be able to destroy it
+ channel or the creator of the HealthApplication that received
+ the data channel will be able to destroy it.

Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.NotFound
@@ -131,7 +131,7 @@ Methods:
Returns all properties for the interface. See the properties
section for available properties.

- Posible errors: org.bluez.Error.NotAllowed
+ Possible errors: org.bluez.Error.NotAllowed

fd Acquire()

diff --git a/doc/media-api.txt b/doc/media-api.txt
index c53ab7b..7a593c3 100644
--- a/doc/media-api.txt
+++ b/doc/media-api.txt
@@ -25,7 +25,7 @@ Methods void RegisterEndpoint(object endpoint, dict properties)

byte Codec:

- Assigned mumber of codec that the
+ Assigned number of codec that the
endpoint implements. The values should
match the profile specification which
is indicated by the UUID.
@@ -308,7 +308,7 @@ Properties object Device [readonly]

byte Codec [readonly]

- Assigned mumber of codec that the transport support.
+ Assigned number of codec that the transport support.
The values should match the profile specification which
is indicated by the UUID.

@@ -319,7 +319,7 @@ Properties object Device [readonly]

uint16 Delay [readwrite]

- Optional. Transport delay in 1/10 of milisecond, this
+ Optional. Transport delay in 1/10 of millisecond, this
property is only writeable when the transport was
acquired by the sender.

diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index 4ede43d..51c9b46 100644
--- a/doc/mgmt-api.txt
+++ b/doc/mgmt-api.txt
@@ -347,7 +347,7 @@ Set Local Name Command
Return Parameters: Name (249 Octets)
Short_Name (11 Octets)

- The name parameters need to always end with a nul byte (failure
+ The name parameters need to always end with a null byte (failure
to do so will cause the command to fail).

This command can be used when the controller is not powered and
diff --git a/doc/serial-api.txt b/doc/serial-api.txt
index ad496d2..0bdbdcd 100644
--- a/doc/serial-api.txt
+++ b/doc/serial-api.txt
@@ -51,7 +51,7 @@ Methods fd ConnectFD(string pattern) [experimental]
timeouts in the client it is fine to call this method.

In that case one of patterns of the Connect method should
- be suplied instead of the TTY device.
+ be supplied instead of the TTY device.

Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.DoesNotExist
--
1.7.4.1


2012-04-12 15:03:16

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH 0/5] Bluetooth: Remove unused API's and code optimization

This series of patches removes various unused API's and avoid unwanted
goto statements.

Syam Sidhardhan (5):
Bluetooth: Remove unused hci_le_ltk_reply()
Bluetooth: Remove unused hci_le_ltk_neg_reply()
Bluetooth: hci_core: Remove header declared but not define
Bluetooth: Remove strtoba header declared but not define
Bluetooth: mgmt: Remove unwanted goto statement

include/net/bluetooth/bluetooth.h | 1 -
include/net/bluetooth/hci_core.h | 5 -----
net/bluetooth/hci_conn.c | 30 ------------------------------
net/bluetooth/mgmt.c | 16 ++++------------
4 files changed, 4 insertions(+), 48 deletions(-)

--
1.7.4.1


2012-04-12 15:03:11

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH obexd 0/4] Fix memory leak, remove unused struct etc

This series of patches fixes the following issues in obexd.

Syam Sidhardhan (4):
client: Fix memory leak during session connect
src: Use goto for avoiding code duplication
src: Remove headers declared but not defined
client: Remove unused struct session_callback

client/session.c | 10 ++++------
src/manager.c | 4 ++--
src/obex.h | 4 ----
3 files changed, 6 insertions(+), 12 deletions(-)

--
1.7.4.1


2012-04-12 15:03:14

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH obexd 3/4] src: Remove headers declared but not defined

---
src/obex.h | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/obex.h b/src/obex.h
index 7f07fd2..443a748 100644
--- a/src/obex.h
+++ b/src/obex.h
@@ -29,8 +29,6 @@

struct obex_session;

-void obex_connect_cb(GIOChannel *io, GError *err, void *user_data);
-
int obex_get_stream_start(struct obex_session *os, const char *filename);
int obex_put_stream_start(struct obex_session *os, const char *filename);
const char *obex_get_name(struct obex_session *os);
@@ -38,8 +36,6 @@ const char *obex_get_destname(struct obex_session *os);
void obex_set_name(struct obex_session *os, const char *name);
ssize_t obex_get_size(struct obex_session *os);
const char *obex_get_type(struct obex_session *os);
-uint16_t obex_get_service(struct obex_session *os);
-gboolean obex_get_auto_accept(struct obex_session *os);
int obex_remove(struct obex_session *os, const char *path);
int obex_copy(struct obex_session *os, const char *source,
const char *destination);
--
1.7.4.1


2012-04-12 15:03:20

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH 4/5] Bluetooth: Remove strtoba header declared but not define

Signed-off-by: Syam Sidhardhan <[email protected]>
---
include/net/bluetooth/bluetooth.h | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index f2c8bdf..d0e44a4 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -178,7 +178,6 @@ static inline void bacpy(bdaddr_t *dst, bdaddr_t *src)

void baswap(bdaddr_t *dst, bdaddr_t *src);
char *batostr(bdaddr_t *ba);
-bdaddr_t *strtoba(char *str);

/* Common socket structures and functions */

--
1.7.4.1


2012-04-12 15:03:18

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH 2/5] Bluetooth: Remove unused hci_le_ltk_neg_reply()

Signed-off-by: Syam Sidhardhan <[email protected]>
---
include/net/bluetooth/hci_core.h | 2 --
net/bluetooth/hci_conn.c | 14 --------------
2 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 6e170de..ed9eaba 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1069,8 +1069,6 @@ void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max,
u16 latency, u16 to_multiplier);
void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],
__u8 ltk[16]);
-void hci_le_ltk_neg_reply(struct hci_conn *conn);
-
int hci_do_inquiry(struct hci_dev *hdev, u8 length);
int hci_cancel_inquiry(struct hci_dev *hdev);
int hci_le_scan(struct hci_dev *hdev, u8 type, u16 interval, u16 window,
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 74418ba..43e0d49 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -224,20 +224,6 @@ void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],
}
EXPORT_SYMBOL(hci_le_start_enc);

-void hci_le_ltk_neg_reply(struct hci_conn *conn)
-{
- struct hci_dev *hdev = conn->hdev;
- struct hci_cp_le_ltk_neg_reply cp;
-
- BT_DBG("%p", conn);
-
- memset(&cp, 0, sizeof(cp));
-
- cp.handle = cpu_to_le16(conn->handle);
-
- hci_send_cmd(hdev, HCI_OP_LE_LTK_NEG_REPLY, sizeof(cp), &cp);
-}
-
/* Device _must_ be locked */
void hci_sco_setup(struct hci_conn *conn, __u8 status)
{
--
1.7.4.1


2012-04-12 15:03:21

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH 5/5] Bluetooth: mgmt: Remove unwanted goto statement

Signed-off-by: Syam Sidhardhan <[email protected]>
---
net/bluetooth/mgmt.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 4e7a01f..7bb3af8 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1247,10 +1247,8 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)

err = hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, sizeof(hci_cp),
&hci_cp);
- if (err < 0) {
+ if (err < 0)
mgmt_pending_remove(cmd);
- goto unlock;
- }

unlock:
hci_dev_unlock(hdev);
@@ -1300,10 +1298,8 @@ static int add_uuid(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
}

cmd = mgmt_pending_add(sk, MGMT_OP_ADD_UUID, hdev, data, len);
- if (!cmd) {
+ if (!cmd)
err = -ENOMEM;
- goto failed;
- }

failed:
hci_dev_unlock(hdev);
@@ -1388,10 +1384,8 @@ update_class:
}

cmd = mgmt_pending_add(sk, MGMT_OP_REMOVE_UUID, hdev, data, len);
- if (!cmd) {
+ if (!cmd)
err = -ENOMEM;
- goto unlock;
- }

unlock:
hci_dev_unlock(hdev);
@@ -1442,10 +1436,8 @@ static int set_dev_class(struct sock *sk, struct hci_dev *hdev, void *data,
}

cmd = mgmt_pending_add(sk, MGMT_OP_SET_DEV_CLASS, hdev, data, len);
- if (!cmd) {
+ if (!cmd)
err = -ENOMEM;
- goto unlock;
- }

unlock:
hci_dev_unlock(hdev);
--
1.7.4.1


2012-04-12 15:03:15

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH obexd 4/4] client: Remove unused struct session_callback

---
client/session.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/client/session.c b/client/session.c
index 0663262..51acbfa 100644
--- a/client/session.c
+++ b/client/session.c
@@ -61,11 +61,6 @@ struct callback_data {
void *data;
};

-struct session_callback {
- session_callback_t func;
- void *data;
-};
-
struct pending_request {
guint id;
guint req_id;
--
1.7.4.1


2012-04-12 15:03:19

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH 3/5] Bluetooth: hci_core: Remove header declared but not define

Signed-off-by: Syam Sidhardhan <[email protected]>
---
include/net/bluetooth/hci_core.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index ed9eaba..3d10671 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -697,8 +697,6 @@ struct adv_entry *hci_find_adv_entry(struct hci_dev *hdev, bdaddr_t *bdaddr);
int hci_add_adv_entry(struct hci_dev *hdev,
struct hci_ev_le_advertising_info *ev);

-void hci_del_off_timer(struct hci_dev *hdev);
-
void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);

int hci_recv_frame(struct sk_buff *skb);
--
1.7.4.1


2012-04-12 15:03:17

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH 1/5] Bluetooth: Remove unused hci_le_ltk_reply()

In this API, we were using sizeof operator for an array
given as function argument, which is invalid.
However this API is not used anywhere.

Signed-off-by: Syam Sidhardhan <[email protected]>
---
include/net/bluetooth/hci_core.h | 1 -
net/bluetooth/hci_conn.c | 16 ----------------
2 files changed, 0 insertions(+), 17 deletions(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index c0b232c..6e170de 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1069,7 +1069,6 @@ void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max,
u16 latency, u16 to_multiplier);
void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],
__u8 ltk[16]);
-void hci_le_ltk_reply(struct hci_conn *conn, u8 ltk[16]);
void hci_le_ltk_neg_reply(struct hci_conn *conn);

int hci_do_inquiry(struct hci_dev *hdev, u8 length);
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 947172b..74418ba 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -224,22 +224,6 @@ void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],
}
EXPORT_SYMBOL(hci_le_start_enc);

-void hci_le_ltk_reply(struct hci_conn *conn, u8 ltk[16])
-{
- struct hci_dev *hdev = conn->hdev;
- struct hci_cp_le_ltk_reply cp;
-
- BT_DBG("%p", conn);
-
- memset(&cp, 0, sizeof(cp));
-
- cp.handle = cpu_to_le16(conn->handle);
- memcpy(cp.ltk, ltk, sizeof(ltk));
-
- hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp);
-}
-EXPORT_SYMBOL(hci_le_ltk_reply);
-
void hci_le_ltk_neg_reply(struct hci_conn *conn)
{
struct hci_dev *hdev = conn->hdev;
--
1.7.4.1


2012-04-12 15:03:10

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 19/19] Add Syam's email address

---
AUTHORS | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index bd775a0..2eaa329 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -58,3 +58,4 @@ Andre Guedes <[email protected]>
Sheldon Demario <[email protected]>
Lucas De Marchi <[email protected]>
Szymon Janc <[email protected]>
+Syam Sidhardhan <[email protected]>
--
1.7.4.1


2012-04-12 15:03:06

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 15/19] audio: Fix newline before EOF

---
audio/gsta2dpsink.c | 1 -
audio/gsta2dpsink.h | 1 -
audio/gstrtpsbcpay.c | 1 -
audio/gstsbcdec.c | 2 --
audio/gstsbcenc.c | 2 --
audio/gstsbcparse.c | 1 -
audio/gstsbcutil.c | 1 -
audio/gstsbcutil.h | 1 -
8 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/audio/gsta2dpsink.c b/audio/gsta2dpsink.c
index 930d14e..c8f6346 100644
--- a/audio/gsta2dpsink.c
+++ b/audio/gsta2dpsink.c
@@ -727,4 +727,3 @@ gboolean gst_a2dp_sink_plugin_init(GstPlugin *plugin)
return gst_element_register(plugin, "a2dpsink",
GST_RANK_MARGINAL, GST_TYPE_A2DP_SINK);
}
-
diff --git a/audio/gsta2dpsink.h b/audio/gsta2dpsink.h
index 5f96a3e..1a591b2 100644
--- a/audio/gsta2dpsink.h
+++ b/audio/gsta2dpsink.h
@@ -82,4 +82,3 @@ GstCaps *gst_a2dp_sink_get_device_caps(GstA2dpSink *self);
G_END_DECLS

#endif
-
diff --git a/audio/gstrtpsbcpay.c b/audio/gstrtpsbcpay.c
index 1159bfe..11aa733 100644
--- a/audio/gstrtpsbcpay.c
+++ b/audio/gstrtpsbcpay.c
@@ -349,4 +349,3 @@ gboolean gst_rtp_sbc_pay_plugin_init(GstPlugin *plugin)
return gst_element_register(plugin, "rtpsbcpay", GST_RANK_NONE,
GST_TYPE_RTP_SBC_PAY);
}
-
diff --git a/audio/gstsbcdec.c b/audio/gstsbcdec.c
index 2e5cb0a..c52834e 100644
--- a/audio/gstsbcdec.c
+++ b/audio/gstsbcdec.c
@@ -219,5 +219,3 @@ gboolean gst_sbc_dec_plugin_init(GstPlugin *plugin)
return gst_element_register(plugin, "sbcdec", GST_RANK_PRIMARY,
GST_TYPE_SBC_DEC);
}
-
-
diff --git a/audio/gstsbcenc.c b/audio/gstsbcenc.c
index d2de4ee..8948371 100644
--- a/audio/gstsbcenc.c
+++ b/audio/gstsbcenc.c
@@ -599,5 +599,3 @@ gboolean gst_sbc_enc_plugin_init(GstPlugin *plugin)
return gst_element_register(plugin, "sbcenc",
GST_RANK_NONE, GST_TYPE_SBC_ENC);
}
-
-
diff --git a/audio/gstsbcparse.c b/audio/gstsbcparse.c
index a44b52c..bc4c0c7 100644
--- a/audio/gstsbcparse.c
+++ b/audio/gstsbcparse.c
@@ -217,4 +217,3 @@ gboolean gst_sbc_parse_plugin_init(GstPlugin *plugin)
return gst_element_register(plugin, "sbcparse", GST_RANK_NONE,
GST_TYPE_SBC_PARSE);
}
-
diff --git a/audio/gstsbcutil.c b/audio/gstsbcutil.c
index ac5fcbf..f596b41 100644
--- a/audio/gstsbcutil.c
+++ b/audio/gstsbcutil.c
@@ -518,4 +518,3 @@ gboolean gst_sbc_util_fill_sbc_params(sbc_t *sbc, GstCaps *caps)

return TRUE;
}
-
diff --git a/audio/gstsbcutil.h b/audio/gstsbcutil.h
index a7f84d5..5e47119 100644
--- a/audio/gstsbcutil.h
+++ b/audio/gstsbcutil.h
@@ -72,4 +72,3 @@ void gst_sbc_util_set_structure_string_param(GstStructure *structure,
GValue *value);

gboolean gst_sbc_util_fill_sbc_params(sbc_t *sbc, GstCaps *caps);
-
--
1.7.4.1


2012-04-12 15:03:07

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 16/19] input: Fix newline before EOF

---
input/sixpair.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/input/sixpair.c b/input/sixpair.c
index 5c58b9b..5c50a58 100644
--- a/input/sixpair.c
+++ b/input/sixpair.c
@@ -296,4 +296,3 @@ int main (int argc, char **argv)

return 0;
}
-
--
1.7.4.1


2012-04-12 15:03:04

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 13/19] headset: Remove header declared but not defined

---
audio/headset.h | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/audio/headset.h b/audio/headset.h
index 99eeca8..465c2d6 100644
--- a/audio/headset.h
+++ b/audio/headset.h
@@ -86,7 +86,6 @@ gboolean headset_get_rfcomm_initiator(struct audio_device *dev);
void headset_set_rfcomm_initiator(struct audio_device *dev,
gboolean initiator);

-void headset_set_authorized(struct audio_device *dev);
int headset_connect_rfcomm(struct audio_device *dev, GIOChannel *chan);
int headset_connect_sco(struct audio_device *dev, GIOChannel *io);

--
1.7.4.1


2012-04-12 15:03:03

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 12/19] adapter: Remove headers declared but not defined

---
src/adapter.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/adapter.h b/src/adapter.h
index c47d180..f7fb9fa 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -113,8 +113,6 @@ void adapter_set_discovering(struct btd_adapter *adapter,
uint16_t adapter_get_dev_id(struct btd_adapter *adapter);
const gchar *adapter_get_path(struct btd_adapter *adapter);
void adapter_get_address(struct btd_adapter *adapter, bdaddr_t *bdaddr);
-void adapter_set_state(struct btd_adapter *adapter, int state);
-int adapter_get_state(struct btd_adapter *adapter);
struct remote_dev_info *adapter_search_found_devices(struct btd_adapter *adapter,
bdaddr_t *bdaddr);
void adapter_update_found_devices(struct btd_adapter *adapter,
--
1.7.4.1


2012-04-12 15:02:59

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 08/19] hciconfig: Remove unwanted NULL termination

Null termination is already doing inside the function
hci_read_local_name().
---
tools/hciconfig.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index f1458b9..d618aa7 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -623,8 +623,6 @@ static void cmd_name(int ctl, int hdev, char *opt)
name[i] = '.';
}

- name[248] = '\0';
-
print_dev_hdr(&di);
printf("\tName: '%s'\n", name);
}
--
1.7.4.1


2012-04-12 15:03:01

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 10/19] sdpd-request: Fix passing zero instead of NULL

---
src/sdpd-request.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/sdpd-request.c b/src/sdpd-request.c
index ff00df7..93acb24 100644
--- a/src/sdpd-request.c
+++ b/src/sdpd-request.c
@@ -748,7 +748,7 @@ static int service_attr_req(sdp_req_t *req, sdp_buf_t *buf)
cstate_size = sdp_set_cstate_pdu(buf, &newState);
} else {
if (buf->data_size == 0)
- sdp_append_to_buf(buf, 0, 0);
+ sdp_append_to_buf(buf, NULL, 0);
cstate_size = sdp_set_cstate_pdu(buf, NULL);
}
}
--
1.7.4.1


2012-04-12 15:03:00

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 09/19] agent: Fix double D-Bus message unref

Inside the g_dbus_send_message() we are already doing the
D-BUS message unref.
---
src/agent.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/agent.c b/src/agent.c
index 363630e..8e3721c 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -692,7 +692,6 @@ int agent_display_passkey(struct agent *agent, struct btd_device *device,

if (!g_dbus_send_message(connection, message)) {
error("D-Bus send failed");
- dbus_message_unref(message);
return -1;
}

--
1.7.4.1


2012-04-12 15:02:58

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 07/19] hci: Retrieve the bluetooth name correctly

If we set the bluetooth name length as maximum 248 bytes,
then while retrieving back we were getting only 247 bytes.
This problem can be verified using hciconfig tool.
---
lib/hci.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/hci.c b/lib/hci.c
index 269c021..9f829c9 100644
--- a/lib/hci.c
+++ b/lib/hci.c
@@ -1417,8 +1417,9 @@ int hci_read_local_name(int dd, int len, char *name, int to)
return -1;
}

- rp.name[247] = '\0';
- strncpy(name, (char *) rp.name, len);
+ strncpy(name, (char *) rp.name, len - 1);
+ name[len - 1] = '\0';
+
return 0;
}

--
1.7.4.1


2012-04-12 15:02:57

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 06/19] gateway: Fix D-Bus reply memory leak

Re-arrange the code to avoid the D-Bus memory leak. Earlier if rfcomm
is not connected, then there was a reply memory leak.
---
audio/gateway.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/audio/gateway.c b/audio/gateway.c
index 19f8ce3..afd2669 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -598,13 +598,13 @@ static DBusMessage *ag_disconnect(DBusConnection *conn, DBusMessage *msg,
if (!device->conn)
return NULL;

+ if (!gw->rfcomm)
+ return btd_error_not_connected(msg);
+
reply = dbus_message_new_method_return(msg);
if (!reply)
return NULL;

- if (!gw->rfcomm)
- return btd_error_not_connected(msg);
-
gateway_close(device);
ba2str(&device->dst, gw_addr);
DBG("Disconnected from %s, %s", gw_addr, device->path);
--
1.7.4.1


2012-04-12 15:02:55

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 04/19] gstavdtpsink: Fix D-Bus memory leak in audio

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

diff --git a/audio/gstavdtpsink.c b/audio/gstavdtpsink.c
index c5392c5..b448d57 100644
--- a/audio/gstavdtpsink.c
+++ b/audio/gstavdtpsink.c
@@ -1336,6 +1336,8 @@ static gboolean gst_avdtp_sink_transport_acquire(GstAvdtpSink *self)
reply = dbus_connection_send_with_reply_and_block(self->data->conn,
msg, -1, &err);

+ dbus_message_unref(msg);
+
if (dbus_error_is_set(&err))
goto fail;

@@ -1362,7 +1364,7 @@ fail:
dbus_error_free(&err);

if (reply)
- dbus_message_unref(msg);
+ dbus_message_unref(reply);

return FALSE;
}
--
1.7.4.1


2012-04-12 15:02:56

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 05/19] gateway: Fix D-Bus memory leak in audio

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

diff --git a/audio/gateway.c b/audio/gateway.c
index 131f93f..19f8ce3 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -182,8 +182,11 @@ static gboolean agent_sendfd(struct hf_agent *agent, int fd,
DBUS_TYPE_UINT16, &gw->version,
DBUS_TYPE_INVALID);

- if (dbus_connection_send_with_reply(dev->conn, msg, &call, -1) == FALSE)
+ if (dbus_connection_send_with_reply(dev->conn, msg,
+ &call, -1) == FALSE) {
+ dbus_message_unref(msg);
return FALSE;
+ }

dbus_pending_call_set_notify(call, notify, dev, NULL);
dbus_pending_call_unref(call);
--
1.7.4.1


2012-04-12 15:02:54

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 03/19] agent: Free the agent request properly

In the case of error, Unref the req->msg which is allocated inside the
pincode_request_new()
---
src/agent.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/agent.c b/src/agent.c
index 9b942e8..363630e 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -456,7 +456,7 @@ int agent_request_pincode(struct agent *agent, struct btd_device *device,
return 0;

failed:
- g_free(req);
+ agent_request_free(req, FALSE);
return err;
}

--
1.7.4.1


2012-04-12 15:02:53

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 02/19] avrcp: Fix the response ctype of SetPlayerApplicationSettingValue

Request ctype of "SetPlayerApplicationSettingValue" is CONTROL,
so response should be ACCEPTED instead of STABLE.
---
audio/avrcp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/audio/avrcp.c b/audio/avrcp.c
index 8eba046..70e5bbf 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -791,7 +791,7 @@ static uint8_t avrcp_handle_set_player_value(struct avrcp_player *player,
if (len) {
pdu->params_len = 0;

- return AVC_CTYPE_STABLE;
+ return AVC_CTYPE_ACCEPTED;
}

err:
--
1.7.4.1


2012-04-12 15:02:52

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 01/19] health: Fix memory leak

---
health/mcap.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/health/mcap.c b/health/mcap.c
index 4c726b6..b76d88a 100644
--- a/health/mcap.c
+++ b/health/mcap.c
@@ -901,6 +901,7 @@ static gboolean parse_set_opts(struct mcap_mdl_cb *mdl_cb, GError **err,
default:
g_set_error(err, MCAP_ERROR, MCAP_ERROR_INVALID_ARGS,
"Unknown option %d", cb);
+ g_free(c);
return FALSE;
}
cb = va_arg(args, int);
--
1.7.4.1


2012-05-03 05:57:08

by Syam Sidhardhan

[permalink] [raw]
Subject: Re: [PATCH 1/5] Bluetooth: Remove unused hci_le_ltk_reply()

Hi Vinicius, Gustavo and Johan,

On Wed, May 2, 2012 at 8:28 PM, Gustavo Padovan <[email protected]> wrote:
> Hi Syam,
>
> * Syam Sidhardhan <[email protected]> [2012-04-12 20:33:17 +0530]:
>
>> In this API, we were using sizeof operator for an array
>> given as function argument, which is invalid.
>> However this API is not used anywhere.
>>
>> Signed-off-by: Syam Sidhardhan <[email protected]>
>> ---
>>  include/net/bluetooth/hci_core.h |    1 -
>>  net/bluetooth/hci_conn.c         |   16 ----------------
>>  2 files changed, 0 insertions(+), 17 deletions(-)
>
> Patch has been applied to bluetooth-next. Thanks.
>

Thanks for reviewing and applying it.

There is one more patch pending for the review in that series. [PATCH
v1 2/5] Bluetooth: Remove unused hci_le_ltk_neg_reply()

Regards,
Syam.

>        Gustavo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

2012-05-02 14:58:30

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH 1/5] Bluetooth: Remove unused hci_le_ltk_reply()

Hi Syam,

* Syam Sidhardhan <[email protected]> [2012-04-12 20:33:17 +0530]:

> In this API, we were using sizeof operator for an array
> given as function argument, which is invalid.
> However this API is not used anywhere.
>
> Signed-off-by: Syam Sidhardhan <[email protected]>
> ---
> include/net/bluetooth/hci_core.h | 1 -
> net/bluetooth/hci_conn.c | 16 ----------------
> 2 files changed, 0 insertions(+), 17 deletions(-)

Patch has been applied to bluetooth-next. Thanks.

Gustavo

2012-05-02 14:38:05

by Vinicius Costa Gomes

[permalink] [raw]
Subject: Re: [PATCH 1/5] Bluetooth: Remove unused hci_le_ltk_reply()

Hi Syam and Johan,

On 21:18 Tue 01 May, Syam Sidhardhan wrote:
> Hi,
> ----- Original Message ----- From: "Andre Guedes"
> <[email protected]>
> To: "Gustavo Padovan" <[email protected]>; "Syam Sidhardhan"
> <[email protected]>; <[email protected]>; "Vinicius
> Gomes" <[email protected]>
> Sent: Friday, April 20, 2012 11:43 PM
> Subject: Re: [PATCH 1/5] Bluetooth: Remove unused hci_le_ltk_reply()
>
>
> >Hi Syam/Gustavo,
> >
> >On Fri, Apr 13, 2012 at 7:17 PM, Gustavo Padovan
> ><[email protected]> wrote:
> >>Hi Syam,
> >>
> >>* Syam Sidhardhan <[email protected]> [2012-04-12 20:33:17 +0530]:
> >>
> >>>In this API, we were using sizeof operator for an array
> >>>given as function argument, which is invalid.
> >>>However this API is not used anywhere.
> >>>
> >>>Signed-off-by: Syam Sidhardhan <[email protected]>
> >>>---
> >>>include/net/bluetooth/hci_core.h | 1 -
> >>>net/bluetooth/hci_conn.c | 16 ----------------
> >>>2 files changed, 0 insertions(+), 17 deletions(-)
> >>>
> >>>diff --git a/include/net/bluetooth/hci_core.h
> >>>b/include/net/bluetooth/hci_core.h
> >>>index c0b232c..6e170de 100644
> >>>--- a/include/net/bluetooth/hci_core.h
> >>>+++ b/include/net/bluetooth/hci_core.h
> >>>@@ -1069,7 +1069,6 @@ void hci_le_conn_update(struct hci_conn
> >>>*conn, u16 min, u16 max,
> >>>u16 latency, u16 to_multiplier);
> >>>void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],
> >>>__u8 ltk[16]);
> >>>-void hci_le_ltk_reply(struct hci_conn *conn, u8 ltk[16]);
> >>
> >>I'll let Andre comment here, I'm not sure if this is going to be used on
> >>the future or not.
> >
> >I'm not sure too, I think Vinicius can tell more about that.

Just in case you missed what I just said on IRC: that function can be
removed.

> >
> >Regarding the memcpy call, yes, it is definitely bogus.
> >
>
> ping
>
> Regards,
> Syam
>

Cheers,
--
Vinicius

2012-05-01 15:48:28

by Syam Sidhardhan

[permalink] [raw]
Subject: Re: [PATCH 1/5] Bluetooth: Remove unused hci_le_ltk_reply()

Hi,
----- Original Message -----
From: "Andre Guedes" <[email protected]>
To: "Gustavo Padovan" <[email protected]>; "Syam Sidhardhan"
<[email protected]>; <[email protected]>; "Vinicius Gomes"
<[email protected]>
Sent: Friday, April 20, 2012 11:43 PM
Subject: Re: [PATCH 1/5] Bluetooth: Remove unused hci_le_ltk_reply()


> Hi Syam/Gustavo,
>
> On Fri, Apr 13, 2012 at 7:17 PM, Gustavo Padovan <[email protected]>
> wrote:
>> Hi Syam,
>>
>> * Syam Sidhardhan <[email protected]> [2012-04-12 20:33:17 +0530]:
>>
>>> In this API, we were using sizeof operator for an array
>>> given as function argument, which is invalid.
>>> However this API is not used anywhere.
>>>
>>> Signed-off-by: Syam Sidhardhan <[email protected]>
>>> ---
>>> include/net/bluetooth/hci_core.h | 1 -
>>> net/bluetooth/hci_conn.c | 16 ----------------
>>> 2 files changed, 0 insertions(+), 17 deletions(-)
>>>
>>> diff --git a/include/net/bluetooth/hci_core.h
>>> b/include/net/bluetooth/hci_core.h
>>> index c0b232c..6e170de 100644
>>> --- a/include/net/bluetooth/hci_core.h
>>> +++ b/include/net/bluetooth/hci_core.h
>>> @@ -1069,7 +1069,6 @@ void hci_le_conn_update(struct hci_conn *conn, u16
>>> min, u16 max,
>>> u16 latency, u16 to_multiplier);
>>> void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],
>>> __u8 ltk[16]);
>>> -void hci_le_ltk_reply(struct hci_conn *conn, u8 ltk[16]);
>>
>> I'll let Andre comment here, I'm not sure if this is going to be used on
>> the future or not.
>
> I'm not sure too, I think Vinicius can tell more about that.
>
> Regarding the memcpy call, yes, it is definitely bogus.
>

ping

Regards,
Syam