mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2025-12-10 07:44:41 +01:00
Fix loop over RPC list
This commit is contained in:
parent
492e8a720c
commit
816033a146
1 changed files with 4 additions and 2 deletions
|
|
@ -312,8 +312,10 @@ void remove_inform_getrpc()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!list_empty(&(cwmp_main->session->head_rpc_acs))) {
|
if (!list_empty(&(cwmp_main->session->head_rpc_acs))) {
|
||||||
while (cwmp_main->session->head_rpc_acs.next != &(cwmp_main->session->head_rpc_acs)) {
|
struct list_head *ilist, *q;
|
||||||
struct rpc *rpc = list_entry(cwmp_main->session->head_rpc_acs.next, struct rpc, list);
|
|
||||||
|
list_for_each_safe (ilist, q, &(cwmp_main->session->head_rpc_acs)) {
|
||||||
|
struct rpc *rpc = list_entry(ilist, struct rpc, list);
|
||||||
if (!rpc)
|
if (!rpc)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue