docs: update tcp_kill_prio same priority comments

tcp_kill_prio will kill the oldest active connection of same/lower
priority. Update all comments so that it's clear the same priority
can be killed
This commit is contained in:
Joel Cunningham 2017-10-25 08:55:24 -05:00
parent b18e6a8734
commit b296d2c7bb

View File

@ -1635,7 +1635,7 @@ tcp_kill_prio(u8_t prio)
mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
/* We kill the oldest active connection that has lower priority than prio. */
/* We kill the oldest active connection that has the same or lower priority than prio. */
inactivity = 0;
inactive = NULL;
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
@ -1742,8 +1742,8 @@ tcp_alloc(u8_t prio)
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
if (pcb == NULL) {
/* Try killing active connections with lower priority than the new one. */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing connection with prio lower than %d\n", prio));
/* Try killing oldest active connection with the same or lower priority than the new one. */
LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing oldest connection with prio same/lower than %d\n", prio));
tcp_kill_prio(prio);
/* Try to allocate a tcp_pcb again. */
pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);