Fix crash in frequently rotate

This commit is contained in:
Zhiyong Zhao 2016-01-08 16:30:05 +08:00
parent 8e974a3679
commit 112f190571

View File

@ -1628,6 +1628,7 @@ filesDisplay(); // TODO: remove after initial unstable release(s)
uchar statefile[MAXFNAME];
uchar toDel[MAXFNAME];
int bDoRMState;
int wd;
uchar *statefn;
DBGPRINTF("imfile: remove listener '%s', wd %d\n",
pLstn->pszFileName, ev->wd);
@ -1653,6 +1654,8 @@ filesDisplay(); // TODO: remove after initial unstable release(s)
"file \"%s\": %s", toDel, errStr);
}
}
wd = wdmapLookupListner(pLstn);
wdmapDel(wd);
}
static void
@ -1738,7 +1741,6 @@ in_processEvent(struct inotify_event *ev)
DBGPRINTF("DDDD: imfile: in_processEvent (wd=%d) event Mask='0x%.8X'\n", ev->wd, ev->mask);
if (ev->mask & IN_IGNORED) {
wdmapDel(ev->wd);
goto done;
} else if (ev->mask & IN_MOVED_FROM) {
/* Find wd entry and remove it */