Fixed one last bug in the request logger.
[doldaconnect.git] / daemon / reqstat.c
index 9813000..838f611 100644 (file)
@@ -56,7 +56,7 @@ void filelog(char *format, ...)
     t = ctime(&now);
     if((p = strchr(t, '\n')) != NULL)
        *p = 0;
-    fprintf(out, "%s: %s\n", p, b);
+    fprintf(out, "%s: %s\n", t, b);
     free(b);
     fclose(out);
 }
@@ -130,6 +130,7 @@ static int init(int hup)
 {
     if(!hup) {
        GCBREG(newtransfercb, reg, NULL);
+       chfile(confgetvar("reqstat", "file"), NULL);
        CBREG(confgetvar("reqstat", "file"), conf_update, chfile, NULL, NULL);
     }
     return(0);