[PATCH 1/7] supplicant: Make unix socket non-blocking.

Ben Greear greearb at candelatech.com
Sat Aug 4 15:48:06 EDT 2012


On 08/04/2012 10:36 AM, Jouni Malinen wrote:
> On Fri, Jul 06, 2012 at 09:52:35AM -0700, greearb at candelatech.com wrote:
>> This keeps wpa_cli from hanging forever if the other end of the
>> socket dies.
>
> Thanks, applied with some cleanup.
>
>>   	if (send(ctrl->s, _cmd, _cmd_len, 0) < 0) {
>> +		if ((errno == EAGAIN) || (errno = EBUSY)
>> +		    || (errno == EWOULDBLOCK)) {
>
> Especially that 'errno = EBUSY' part required something.. ;-)

Eww..thanks for catching that!

Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com




More information about the HostAP mailing list