eloop_register_read_sock() data argument order - BUG or just inconsistency or nothing?
Fri Mar 26 15:21:18 PDT 2010
On Thu, 2010-03-25 at 16:20 -0400, Patrik Lahti wrote:
> I think driver_bsd.c is correct, or am I missing something? Maybe it
> doesn't matter...? It seems the eloop_data is conceptually the global
> context and user_data is the local context. And it would make sense that
> the drv is passed to eloop_register_read_sock() as the local context
> like driver_bsd.c does.
> This is in 0.6.10.
The same code exists in the current git.
I don't think it's a problem. Both arguments are supplied to the
callback function, and it can do whatever it wants with them.
Sure, it would be nice to avoid void pointers to make the compile check
for possible errors. Perhaps at least one of the pointers could be
given a specific type. You are welcome to try. You are better off
working on the current git version.
More information about the Hostap