* [PATCH BlueZ] lib: Populate response status field with rigth error code value taken from command status event.
@ 2012-03-09 11:12 Arek Lichwa
2012-04-04 10:24 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Arek Lichwa @ 2012-03-09 11:12 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Arek Lichwa
---
lib/hci.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/hci.c b/lib/hci.c
index 269c021..186d408 100644
--- a/lib/hci.c
+++ b/lib/hci.c
@@ -1156,6 +1156,7 @@ int hci_send_req(int dd, struct hci_request *r, int to)
if (r->event != EVT_CMD_STATUS) {
if (cs->status) {
+ memcpy(r->rparam, &cs->status, 1);
errno = EIO;
goto failed;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] lib: Populate response status field with rigth error code value taken from command status event.
2012-03-09 11:12 [PATCH BlueZ] lib: Populate response status field with rigth error code value taken from command status event Arek Lichwa
@ 2012-04-04 10:24 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-04-04 10:24 UTC (permalink / raw)
To: Arek Lichwa; +Cc: linux-bluetooth
Hi Arek,
On Fri, Mar 09, 2012, Arek Lichwa wrote:
> ---
> lib/hci.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/lib/hci.c b/lib/hci.c
> index 269c021..186d408 100644
> --- a/lib/hci.c
> +++ b/lib/hci.c
> @@ -1156,6 +1156,7 @@ int hci_send_req(int dd, struct hci_request *r, int to)
>
> if (r->event != EVT_CMD_STATUS) {
> if (cs->status) {
> + memcpy(r->rparam, &cs->status, 1);
> errno = EIO;
> goto failed;
> }
I don't think we can apply this since it breaks the way that the library
function works (guaranteeing that rparam isn't touched if the function
returns an error).
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-04 10:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-09 11:12 [PATCH BlueZ] lib: Populate response status field with rigth error code value taken from command status event Arek Lichwa
2012-04-04 10:24 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).