Remove stale nodeinuse files
This commit is contained in:
parent
6e567179ba
commit
d170675f21
11
main.c
11
main.c
@ -914,6 +914,7 @@ void server(int port) {
|
||||
int i;
|
||||
int on = 1;
|
||||
char str[INET6_ADDRSTRLEN];
|
||||
struct stat s;
|
||||
#if defined(ENABLE_WWW)
|
||||
www_daemon = NULL;
|
||||
#endif
|
||||
@ -922,6 +923,16 @@ void server(int port) {
|
||||
printf("Magicka BBS Server Starting....\n");
|
||||
}
|
||||
|
||||
for (i=1;i<=conf.nodes;i++) {
|
||||
snprintf(buffer, 1024, "%s/nodeinuse.%d", conf.bbs_path, i);
|
||||
if (stat(buffer, &s) == 0) {
|
||||
if (!conf.fork) {
|
||||
printf(" - Removing stale file: nodeinuse.%d\n", i);
|
||||
}
|
||||
unlink(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
if (conf.ipguard_enable) {
|
||||
|
||||
ip_guard_map = hashmap_new();
|
||||
|
Reference in New Issue
Block a user