projects
/
libeap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1f1d4df
)
WPS: Convert assert() to error return
author
Jouni Malinen
<j@w1.fi>
Sun, 17 Oct 2010 17:23:51 +0000
(20:23 +0300)
committer
Jouni Malinen
<j@w1.fi>
Sun, 17 Oct 2010 17:23:51 +0000
(20:23 +0300)
src/wps/wps_upnp_event.c
patch
|
blob
|
history
diff --git
a/src/wps/wps_upnp_event.c
b/src/wps/wps_upnp_event.c
index
635deea
..
f3a2d43
100644
(file)
--- a/
src/wps/wps_upnp_event.c
+++ b/
src/wps/wps_upnp_event.c
@@
-238,9
+238,12
@@
static int event_send_start(struct subscription *s)
* Assume we are called ONLY with no current event and ONLY with
* nonempty event queue and ONLY with at least one address to send to.
*/
* Assume we are called ONLY with no current event and ONLY with
* nonempty event queue and ONLY with at least one address to send to.
*/
- assert(!dl_list_empty(&s->addr_list));
- assert(s->current_event == NULL);
- assert(!dl_list_empty(&s->event_queue));
+ if (dl_list_empty(&s->addr_list))
+ return -1;
+ if (s->current_event)
+ return -1;
+ if (dl_list_empty(&s->event_queue))
+ return -1;
s->current_event = e = event_dequeue(s);
s->current_event = e = event_dequeue(s);