[riot-notifications] [RIOT] core: priority_queue_add hangs on duplicate adds (#3132)

Ludwig Ortmann notifications at github.com
Mon Jun 1 20:13:42 CEST 2015


> @@ -55,6 +55,13 @@ void priority_queue_add(priority_queue_t *root, priority_queue_node_t *new_obj)
>      priority_queue_node_t *node = (priority_queue_node_t *) root;
>  
>      while (node->next != NULL) {
> +        if (node->next == new_obj) {
> +            /* Trying to add an item that is already in queue */
> +#if DEVELHELP
> +            core_panic(123, "priority_queue_add already existing new_obj\n");
> +#endif
> +            return;

yes

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3132/files#r31453269
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150601/c2180f1a/attachment-0001.html>


More information about the notifications mailing list