wpa_ctrl_request: reenterable

Huijun Gan ghjkevin
Thu Nov 10 17:24:01 PST 2011


I see. Maybe my changes in Android has damaged the single-threaded character
for the CMDs sequence.
Thanks a lot.

2011/11/11 Jouni Malinen <j at w1.fi>:
> On Thu, Nov 10, 2011 at 12:19:25PM +0800, Huijun Gan wrote:
>> For the function wpa_ctrl_request(), is it reenterable? What I mean
>> is, does it work OK, if multi threads call this function on the same
>> wpa_ctrl (i.e. the same socket fd)?
>
> Whether that function itself can handle this is one question, but even
> more important question would be to ask whether the same socket can be
> used with multiple commands that may be issue more or less concurrently.
> I've never tested this, but it sounds likely that you may hit getting
> confusing results since the command result may not show up in the
> correct thread. In other words, you'll likely better off opening
> separate socket for each thread needing to access the control interface
> or using some mechanism to enforce only a single concurrent command.
>
> --
> Jouni Malinen ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>



-- 
Best Regards,
Kevin



More information about the Hostap mailing list