maybe there is an select problem

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Sat Jan 23 09:51:26 UTC 2010


Hi Andreas,

sorry for the late response, I'm mostly busy with hacking phones right now ;)

> the unix select function returns a set of file descriptors to be
> handled. the result-loop (the loop after the select()) is called again,
> if more than one descriptor is removed by the callback funtion. this may
> lead to a another call to the callback function, because the bits of the
> FD_SETs do not change and still set.
>  
> i think we must clear these bits, if they are handled, so the handler
> will not be called twice in case of a "restart" of that loop.

You are absolutely right.  Thanks for spotting this!

-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)




More information about the OpenBSC mailing list