mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-26 16:12:55 +00:00
Fix bug #52189: list add and remove bug in <lwiperf.c>
Apply patch from xuyao hong
This commit is contained in:
parent
8fc69c9858
commit
856b0c3260
@ -167,11 +167,8 @@ static void lwiperf_tcp_err(void *arg, err_t err);
|
|||||||
static void
|
static void
|
||||||
lwiperf_list_add(lwiperf_state_base_t *item)
|
lwiperf_list_add(lwiperf_state_base_t *item)
|
||||||
{
|
{
|
||||||
if (lwiperf_all_connections == NULL) {
|
item->next = lwiperf_all_connections;
|
||||||
lwiperf_all_connections = item;
|
lwiperf_all_connections = item;
|
||||||
} else {
|
|
||||||
item = lwiperf_all_connections;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Remove an iperf session from the 'active' list */
|
/** Remove an iperf session from the 'active' list */
|
||||||
@ -185,7 +182,7 @@ lwiperf_list_remove(lwiperf_state_base_t *item)
|
|||||||
if (prev == NULL) {
|
if (prev == NULL) {
|
||||||
lwiperf_all_connections = iter->next;
|
lwiperf_all_connections = iter->next;
|
||||||
} else {
|
} else {
|
||||||
prev->next = item;
|
prev->next = iter->next;
|
||||||
}
|
}
|
||||||
/* @debug: ensure this item is listed only once */
|
/* @debug: ensure this item is listed only once */
|
||||||
for (iter = iter->next; iter != NULL; iter = iter->next) {
|
for (iter = iter->next; iter != NULL; iter = iter->next) {
|
||||||
|
Loading…
Reference in New Issue
Block a user