<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Droid Sans">I am using the wpa_supplicant control
interface (wpa_ctrl) for an native </font><font face="Droid Sans"><font
face="Droid Sans">nodejs</font> addon implementation.<br>
<br>
The documentation for wpa_ctrl_recv
(<a class="moz-txt-link-freetext" href="http://w1.fi/wpa_supplicant/devel/wpa__ctrl_8h.html">http://w1.fi/wpa_supplicant/devel/wpa__ctrl_8h.html</a>) says that it
will block if no messages are available.<br>
<br>
Looking at the source code of wpa_ctrl.c shows this is not true
for linux sockets. In wpa_ctrl_open() the unix socket is set as
non-blocking and that's why wpa_ctrl_receive(), which calls
recv(), returns immediatly with -1.<br>
<br>
Maybe the documentation needs an update since there was a patch in
2012 which introduced the non-blocking sockets?<br>
</font>
</body>
</html>