- GNUNET_STATISTICS_update (stats,
- "# messages dropped (buffer full)",
- 1, GNUNET_NO);
- /* Get the PID of the oldest message in the queue */
- for (queue = dst->queue_head; queue != NULL; queue = queue->next)
- if (queue->type == type && queue->tunnel == t)
- {
- pid_q = ntohl (((struct GNUNET_MESH_Data *)(queue->cls))->pid);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "pid: %u, pid_q: %u\n", pid, pid_q);
- break;
- }
- GNUNET_assert (NULL != queue);
-
- /* If this is an earlier message that that, give it priority:
- * - drop the newest message in the queue
- * - instert current one at the end of the queue (first to get out)
- */
- if (GNUNET_YES == t->reliable && GMC_is_pid_bigger(pid_q, pid))
+
+ /* If this isn't a retransmission, drop the message */
+ if (GNUNET_NO == t->reliable ||
+ (NULL == t->owner && GNUNET_MESSAGE_TYPE_MESH_UNICAST == type) ||
+ (NULL == t->client && GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN == type))