mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-18 23:42:39 +00:00
allow fd = 0 as data source (stdin)
This commit is contained in:
parent
aac3545b0e
commit
dd487e11d2
@ -129,7 +129,7 @@ void posix_execute(void) {
|
|||||||
FD_ZERO(&descriptors);
|
FD_ZERO(&descriptors);
|
||||||
int highest_fd = 0;
|
int highest_fd = 0;
|
||||||
for (ds = (data_source_t *) data_sources; ds ; ds = (data_source_t *) ds->item.next){
|
for (ds = (data_source_t *) data_sources; ds ; ds = (data_source_t *) ds->item.next){
|
||||||
if (ds->fd) {
|
if (ds->fd >= 0) {
|
||||||
FD_SET(ds->fd, &descriptors);
|
FD_SET(ds->fd, &descriptors);
|
||||||
if (ds->fd > highest_fd) {
|
if (ds->fd > highest_fd) {
|
||||||
highest_fd = ds->fd;
|
highest_fd = ds->fd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user