You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Issue two or more CoAP requests for valid resources before the first
resource's second half splitphase is run.
2. Have the second request's second half splitphase complete before the first.
3. Issue another CoAP request.
What is the expected output?
Two properly processed CoAP requests.
What do you see instead?
An infinite loop.
What version of the product are you using? On what operating system?
TinyOS-2.x trunk.
Please provide any additional information below.
The queue handling in CoapUdpServerP.nc is broken. While it can happily insert
and find nodes at any point in the queue, it always removes the head of the
queue when it takes something off it, regardless of whether that was the
correct node or not! When requests complete out-of-order, this in very short
order then leads to a loop at the queue tail, and all attempts at traversing
the queue to its end result in an infinite loop (e.g. via
coap_find_transaction()).
Attached is a patch to properly extract the processed node from the queue. This
functionality is not needed for the general libcoap queues as they're always
processed in order, so I put the new coap_extract_node() function into
CoapUdpServerP.nc rather than libcoap's net.c, even though it provides symmetry
to coap_insert_node() which resides in net.c.
Original issue reported on code.google.com by jmatts...@dius.com.au on 1 Sep 2011 at 4:11
Original issue reported on code.google.com by
jmatts...@dius.com.au
on 1 Sep 2011 at 4:11Attachments:
The text was updated successfully, but these errors were encountered: