Andrew Sutton wrote :
> i'm working on a piece of code that selects between 2 sockets, one irda,
> one inet.
>
> sockIrDA = ...
> sockInet = ...
> sockMax = max( sockIrDA, sockInet ) + 1;
>
> FD_ZERO( &fds );
> FD_SET( sockIrDA, &fds );
> FD_SET( sockInet, &fds );
> select( sockMax, &fds, ... );
>
> something like that. however, select always returns immediately and
> always returns, reporting that the IrDA socket has data available to be
> read:
>
> FD_ISSET( sockIrDA, &fds ) == 1
>
> anyway, i've been struggling to track down the cause for this - since
> there just isn't any data available on the socket after it's been
> accepted, but i don't really know how select ties into the irda kernel
> module.
>
> any help would be greatly appreciated... oh. i'm using 2.4.3 with irtty
> and an esi dongle if that helps :)
I have some select between various IrDA sockets in the
e-Squirt code and it works like a charm. The selector is set only when
data is available. I don't understand why having a Inet socket would
be different.
First, make sure that you check the return value of the
select. Common mistake.
Also, I never tested 2.4.3, there might be some unwelcomed
changes in there. Ask Dag for the latest status.
Then, the code that deal with the select is irda_poll(). Just
add a bunch of printk's to see what's happening...
Regards,
Jean
_______________________________________________
Linux-IrDA mailing list - [EMAIL PROTECTED]
http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda