2011-01-24 20:58:39

by Chuck Crisler

[permalink] [raw]
Subject: problem calling the supplicant

I have found a problem that is causing my communication with the supplicant
to get confused. I call the supplicant via wpa_ctrl_request(). Sometimes the
commands actually timeout. When that happens, the call to select() returns 0
which causes the wpa_ctrl_request to return -2. From then onward, the
response to all commands is the actual response to the previous command.
That causes my state machine to fail. What should I be doing when this
timeout situation occurs? It looks like I could simply make a subsequent
call into the ctrl_request with a NULL command (with length == 0) to get it
to execute the select() again, though I may want to modify
wpa_ctrl_request() to skip the send() if there is a NULL command. I know
that my missing response will ultimately be returned. Has anyone else seen
anything like this?

Thank you,
Chuck Crisler