Re: mgmt_new_default sometimes fail

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

 



Hi Ordit,

> On our application we used the code sample btmgmt.c
> which uses mgmt_new_default, this function will fail if
> fd >127 (because mainloop_add_fd will fail in io_new function).
> 
> mgmt_new_default:
> fd = socket(PF_BLUETOOTH, SOCK_RAW | SOCK_CLOEXEC | SOCK_NONBLOCK, BTPROTO_HCI);
> 
> what is the best way to workaround this issue assuming I have only
> btmgmt.c code and would rather not change other files?

because we have #define MAX_MAINLOOP_ENTRIES 128 in the mainloop.c code. I assumed that 127 file descriptors is plenty for what any BlueZ application is doing.

Regards

Marcel




[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