linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] Invalid file descriptor.
@ 2011-10-24 13:14 Daniel Wagner
  2011-10-24 13:19 ` Lucas De Marchi
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Wagner @ 2011-10-24 13:14 UTC (permalink / raw)
  To: linux-bluetooth

To whom it might concern,

if bluez is running without an agent and the remote device tries to 
connect to bluez you are able to trigger the "Invalid file descriptor".


bluetoothd[30869]: src/event.c:btd_event_bonding_complete() status 0x00
bluetoothd[30869]: src/adapter.c:adapter_get_device() A0:4E:04:F6:F5:05
bluetoothd[30869]: src/device.c:device_bonding_complete() bonding (nil) 
status 0x00
bluetoothd[30869]: audio/manager.c:hf_io_cb() Authorization denied!

(bluetoothd:30869): GLib-WARNING **: Invalid file descriptor.

bluetoothd[30869]: plugins/hciops.c:disconn_complete() handle 44 status 0x00
bluetoothd[30869]: src/event.c:btd_event_disconn_complete()
bluetoothd[30869]: src/adapter.c:adapter_remove_connection()


cheers,
daniel

ps: I was told to report all crashes and bugs I find. Be prepared. I am 
a very capable finding bugs :)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] Invalid file descriptor.
  2011-10-24 13:14 [BUG] Invalid file descriptor Daniel Wagner
@ 2011-10-24 13:19 ` Lucas De Marchi
  2011-10-24 13:23   ` Daniel Wagner
  0 siblings, 1 reply; 6+ messages in thread
From: Lucas De Marchi @ 2011-10-24 13:19 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: linux-bluetooth

Hi Daniel,

On Mon, Oct 24, 2011 at 11:14 AM, Daniel Wagner <wagi@monom.org> wrote:
> To whom it might concern,
>
> if bluez is running without an agent and the remote device tries to connect
> to bluez you are able to trigger the "Invalid file descriptor".
>
>
> bluetoothd[30869]: src/event.c:btd_event_bonding_complete() status 0x00
> bluetoothd[30869]: src/adapter.c:adapter_get_device() A0:4E:04:F6:F5:05
> bluetoothd[30869]: src/device.c:device_bonding_complete() bonding (nil)
> status 0x00
> bluetoothd[30869]: audio/manager.c:hf_io_cb() Authorization denied!
>
> (bluetoothd:30869): GLib-WARNING **: Invalid file descriptor.
>
> bluetoothd[30869]: plugins/hciops.c:disconn_complete() handle 44 status 0x00
> bluetoothd[30869]: src/event.c:btd_event_disconn_complete()
> bluetoothd[30869]: src/adapter.c:adapter_remove_connection()
>
>
> cheers,
> daniel
>
> ps: I was told to report all crashes and bugs I find. Be prepared. I am a
> very capable finding bugs :)

What about the patch?


Lucas De Marchi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] Invalid file descriptor.
  2011-10-24 13:19 ` Lucas De Marchi
@ 2011-10-24 13:23   ` Daniel Wagner
  2011-10-24 13:36     ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Wagner @ 2011-10-24 13:23 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-bluetooth

Hi Lucas,

On 10/24/2011 03:19 PM, Lucas De Marchi wrote:
> On Mon, Oct 24, 2011 at 11:14 AM, Daniel Wagner<wagi@monom.org>  wrote:
>> To whom it might concern,
>>
>> if bluez is running without an agent and the remote device tries to connect
>> to bluez you are able to trigger the "Invalid file descriptor".
>>
>>
>> bluetoothd[30869]: src/event.c:btd_event_bonding_complete() status 0x00
>> bluetoothd[30869]: src/adapter.c:adapter_get_device() A0:4E:04:F6:F5:05
>> bluetoothd[30869]: src/device.c:device_bonding_complete() bonding (nil)
>> status 0x00
>> bluetoothd[30869]: audio/manager.c:hf_io_cb() Authorization denied!
>>
>> (bluetoothd:30869): GLib-WARNING **: Invalid file descriptor.
>>
>> bluetoothd[30869]: plugins/hciops.c:disconn_complete() handle 44 status 0x00
>> bluetoothd[30869]: src/event.c:btd_event_disconn_complete()
>> bluetoothd[30869]: src/adapter.c:adapter_remove_connection()
>>
>>
>> cheers,
>> daniel
>>
>> ps: I was told to report all crashes and bugs I find. Be prepared. I am a
>> very capable finding bugs :)
>
> What about the patch?

Sure, I will do as soon I have fixed all outstanding ConnMan bugs I 
found just recently. In other words don't expect very soon this patch :)

cheers,
daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] Invalid file descriptor.
  2011-10-24 13:23   ` Daniel Wagner
@ 2011-10-24 13:36     ` Luiz Augusto von Dentz
  2011-10-24 13:39       ` Lucas De Marchi
  2011-10-24 13:42       ` Daniel Wagner
  0 siblings, 2 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2011-10-24 13:36 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Lucas De Marchi, linux-bluetooth

Hi Daniel,

On Mon, Oct 24, 2011 at 4:23 PM, Daniel Wagner <wagi@monom.org> wrote:
>>
>> What about the patch?
>
> Sure, I will do as soon I have fixed all outstanding ConnMan bugs I found
> just recently. In other words don't expect very soon this patch :)

Try with this:

diff --git a/audio/manager.c b/audio/manager.c
index 818451c..3103824 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -607,7 +607,6 @@ static void hf_io_cb(GIOChannel *chan, gpointer data)
        if (perr < 0) {
                DBG("Authorization denied!");
                gateway_set_state(device, GATEWAY_STATE_DISCONNECTED);
-               goto drop;
        }

        return;

-- 
Luiz Augusto von Dentz

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [BUG] Invalid file descriptor.
  2011-10-24 13:36     ` Luiz Augusto von Dentz
@ 2011-10-24 13:39       ` Lucas De Marchi
  2011-10-24 13:42       ` Daniel Wagner
  1 sibling, 0 replies; 6+ messages in thread
From: Lucas De Marchi @ 2011-10-24 13:39 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: Daniel Wagner, linux-bluetooth

Hi Luiz,

On Mon, Oct 24, 2011 at 11:36 AM, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
> Hi Daniel,
>
> On Mon, Oct 24, 2011 at 4:23 PM, Daniel Wagner <wagi@monom.org> wrote:
>>>
>>> What about the patch?
>>
>> Sure, I will do as soon I have fixed all outstanding ConnMan bugs I found
>> just recently. In other words don't expect very soon this patch :)
>
> Try with this:
>
> diff --git a/audio/manager.c b/audio/manager.c
> index 818451c..3103824 100644
> --- a/audio/manager.c
> +++ b/audio/manager.c
> @@ -607,7 +607,6 @@ static void hf_io_cb(GIOChannel *chan, gpointer data)
>        if (perr < 0) {
>                DBG("Authorization denied!");
>                gateway_set_state(device, GATEWAY_STATE_DISCONNECTED);
> -               goto drop;
>        }

It seems correct. As far as I remember there are similar problems in
other profiles like input /manager.c.


Lucas De Marchi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] Invalid file descriptor.
  2011-10-24 13:36     ` Luiz Augusto von Dentz
  2011-10-24 13:39       ` Lucas De Marchi
@ 2011-10-24 13:42       ` Daniel Wagner
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Wagner @ 2011-10-24 13:42 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: Lucas De Marchi, linux-bluetooth

On 10/24/2011 03:36 PM, Luiz Augusto von Dentz wrote:
> Hi Daniel,
>
> On Mon, Oct 24, 2011 at 4:23 PM, Daniel Wagner<wagi@monom.org>  wrote:
>>>
>>> What about the patch?
>>
>> Sure, I will do as soon I have fixed all outstanding ConnMan bugs I found
>> just recently. In other words don't expect very soon this patch :)
>
> Try with this:
>
> diff --git a/audio/manager.c b/audio/manager.c
> index 818451c..3103824 100644
> --- a/audio/manager.c
> +++ b/audio/manager.c
> @@ -607,7 +607,6 @@ static void hf_io_cb(GIOChannel *chan, gpointer data)
>          if (perr<  0) {
>                  DBG("Authorization denied!");
>                  gateway_set_state(device, GATEWAY_STATE_DISCONNECTED);
> -               goto drop;
>          }
>
>          return;
>

Yes, that fixes the error message.

Thanks,
daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-24 13:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24 13:14 [BUG] Invalid file descriptor Daniel Wagner
2011-10-24 13:19 ` Lucas De Marchi
2011-10-24 13:23   ` Daniel Wagner
2011-10-24 13:36     ` Luiz Augusto von Dentz
2011-10-24 13:39       ` Lucas De Marchi
2011-10-24 13:42       ` Daniel Wagner

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).