mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-11-10 15:20:58 +00:00
line safer
This commit is contained in:
parent
541bee5cf6
commit
08ad1f4151
7
lsyncd.c
7
lsyncd.c
@ -1574,13 +1574,14 @@ masterloop(lua_State *L)
|
|||||||
observance_action = true;
|
observance_action = true;
|
||||||
for(pi = 0; pi < observances_len; pi++) {
|
for(pi = 0; pi < observances_len; pi++) {
|
||||||
struct observance *obs = observances + pi;
|
struct observance *obs = observances + pi;
|
||||||
if (hup || term) {
|
if (hup || term) break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (obs->ready && FD_ISSET(obs->fd, &rfds)) {
|
if (obs->ready && FD_ISSET(obs->fd, &rfds)) {
|
||||||
obs->ready(L, obs);
|
obs->ready(L, obs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hup || term) break;
|
if (hup || term) break;
|
||||||
|
|
||||||
if (nonobservances_len > 0 &&
|
if (nonobservances_len > 0 &&
|
||||||
nonobservances[nonobservances_len-1] == obs->fd) {
|
nonobservances[nonobservances_len-1] == obs->fd) {
|
||||||
// TODO breaks if more nonobserves
|
// TODO breaks if more nonobserves
|
||||||
|
Loading…
Reference in New Issue
Block a user