mirror of
https://github.com/jrbrtsn/ban2fail
synced 2024-06-16 03:48:03 +00:00
moved file unlock to a safer place
This commit is contained in:
parent
ac58f5463b
commit
3389f9802b
@ -290,10 +290,6 @@ main(int argc, char **argv)
|
|||||||
* don't need to be copied.
|
* don't need to be copied.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* We're done with disk I/O, so release lock */
|
|
||||||
flock(lock_fd, LOCK_UN);
|
|
||||||
ez_close(lock_fd);
|
|
||||||
lock_fd= -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{ /* Check cache for logType directories not in our current map */
|
{ /* Check cache for logType directories not in our current map */
|
||||||
@ -321,6 +317,11 @@ main(int argc, char **argv)
|
|||||||
ez_closedir(dir);
|
ez_closedir(dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We're done with disk I/O, so release lock */
|
||||||
|
flock(lock_fd, LOCK_UN);
|
||||||
|
ez_close(lock_fd);
|
||||||
|
lock_fd= -1;
|
||||||
|
|
||||||
unsigned nFound= 0;
|
unsigned nFound= 0;
|
||||||
MAP_visitAllEntries(&G.logType_map, (int(*)(void*,void*))LOGTYPE_offenseCount, &nFound);
|
MAP_visitAllEntries(&G.logType_map, (int(*)(void*,void*))LOGTYPE_offenseCount, &nFound);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user