mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-25 23:21:33 +03:00
network: set/unset enumerating flag before/after loop
This commit is contained in:
parent
2aaf6d407e
commit
a6b084234c
@ -667,15 +667,13 @@ static int manager_enumerate_internal(
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
m->enumerating = true;
|
||||||
for (sd_netlink_message *reply_one = reply; reply_one; reply_one = sd_netlink_message_next(reply_one)) {
|
for (sd_netlink_message *reply_one = reply; reply_one; reply_one = sd_netlink_message_next(reply_one)) {
|
||||||
m->enumerating = true;
|
|
||||||
|
|
||||||
k = process(nl, reply_one, m);
|
k = process(nl, reply_one, m);
|
||||||
if (k < 0 && r >= 0)
|
if (k < 0 && r >= 0)
|
||||||
r = k;
|
r = k;
|
||||||
|
|
||||||
m->enumerating = false;
|
|
||||||
}
|
}
|
||||||
|
m->enumerating = false;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user