From: Jouni Malinen Date: Sun, 17 Oct 2010 18:30:25 +0000 (+0300) Subject: WPS UPnP: Add more priority for queuing EAP events X-Git-Tag: hostap-1-bp~958 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f30e698c0861e6b3f58253850f150345421c146c;p=thirdparty%2Fhostap.git WPS UPnP: Add more priority for queuing EAP events --- diff --git a/src/wps/wps_upnp_event.c b/src/wps/wps_upnp_event.c index 8c3ded8d7..2c8ed4f13 100644 --- a/src/wps/wps_upnp_event.c +++ b/src/wps/wps_upnp_event.c @@ -381,7 +381,14 @@ int event_add(struct subscription *s, const struct wpabuf *data, int probereq) if (len >= MAX_EVENTS_QUEUED) { wpa_printf(MSG_DEBUG, "WPS UPnP: Too many events queued for " "subscriber %p", s); - return 1; + if (probereq) + return 1; + + /* Drop oldest entry to allow EAP event to be stored. */ + e = event_dequeue(s); + if (!e) + return 1; + event_delete(e); } if (s->last_event_failed && probereq && len > 0) {