diff --git a/data/nstats.db b/data/nstats.db index c1017292..5b5cffea 100644 --- a/data/nstats.db +++ b/data/nstats.db @@ -1 +1 @@ -6 10 5 1016714859 1016714859 1016714859 292 3 1017291542 +7 332 12 1017420793 1017420830 1017420784 667 102 1017420793 diff --git a/dl/statserv/database.c b/dl/statserv/database.c index f801daf9..c56aef93 100644 --- a/dl/statserv/database.c +++ b/dl/statserv/database.c @@ -81,6 +81,8 @@ void LoadStats() lnode_t *cn; int count; strcpy(segv_location, "StatServ-LoadStats"); + Chead = list_create(C_TABLE_SIZE); + Shead = hash_create(S_TABLE_SIZE,0,0); if (fp) { @@ -113,9 +115,8 @@ void LoadStats() } fclose(fp); } - Shead = hash_create(S_TABLE_SIZE,0,0); if ((fp = fopen("data/stats.db", "r")) == NULL) - return; + return; memset(buf, '\0', BUFSIZE); while (fgets(buf, BUFSIZE, fp)) { @@ -163,7 +164,6 @@ void LoadStats() } } fclose(fp); - Chead = list_create(C_TABLE_SIZE); if ((fp = fopen("data/cstats.db", "r")) == NULL) return; memset(buf, '\0', BUFSIZE); diff --git a/sock.c b/sock.c index 36754bf6..77f5d416 100755 --- a/sock.c +++ b/sock.c @@ -5,7 +5,7 @@ ** Based from GeoStats 1.1.0 by Johnathan George net@lite.net * ** NetStats CVS Identification -** $Id: sock.c,v 1.16 2002/03/25 08:13:52 fishwaldo Exp $ +** $Id: sock.c,v 1.17 2002/03/29 17:03:24 fishwaldo Exp $ */ #include "stats.h" @@ -173,7 +173,7 @@ void ResetLogs() strcpy(segv_location, "ResetLogs"); strftime(tmp, 25, "logs/stats-%m-%d.log", localtime(&t)); - rename("stats.log", tmp); + rename("logs/stats.log", tmp); log("Started fresh logfile."); }