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

Jouni Malinen j
Sat Aug 4 10:36:16 PDT 2012


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.. ;-)

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list