P2P: No duplicate AP-STA-CONNECTED/DISCONNECTED as global event

These events are sent as a special case to both the group interface and
"parent interface" (i.e., the interface that was used for managing P2P
negotiation). The latter is not really correct event, so get rid of it
with the new global control interface design where there is no need to
support legacy upper layer implementations.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-05-18 19:18:31 +03:00
parent 7793c959e6
commit c4bf83a723
4 changed files with 43 additions and 5 deletions

View file

@ -671,6 +671,29 @@ void wpa_msg_global(void *ctx, int level, const char *fmt, ...)
os_free(buf);
}
void wpa_msg_no_global(void *ctx, int level, const char *fmt, ...)
{
va_list ap;
char *buf;
const int buflen = 2048;
int len;
buf = os_malloc(buflen);
if (buf == NULL) {
wpa_printf(MSG_ERROR, "wpa_msg_no_global: Failed to allocate "
"message buffer");
return;
}
va_start(ap, fmt);
len = vsnprintf(buf, buflen, fmt, ap);
va_end(ap);
wpa_printf(level, "%s", buf);
if (wpa_msg_cb)
wpa_msg_cb(ctx, level, 2, buf, len);
os_free(buf);
}
#endif /* CONFIG_NO_WPA_MSG */