@@ -409,17 +399,15 @@ /* Interface */ #ifdef USE_SQL -/*PRINTFLIKE2*/ void -sqllog(int status, char *msg, ...) +sqllog(int status, char *query) { - va_list ap; FILE *fp; char *path; char *filename; filename = status ? "sql-lost" : "sql.log"; - path = grad_mkfilename(radacct_dir, filename); + path = grad_mkfilename(grad_acct_dir, filename); if ((fp = fopen(path, "a")) == NULL) { grad_log(L_ERR|L_PERROR, _("could not append to file %s"), path); @@ -427,10 +415,7 @@ return; } grad_free(path); - va_start(ap, msg); - vfprintf(fp, msg, ap); - fprintf(fp, ";\n"); - va_end(ap); + fprintf(fp, "%s;\n", query); fclose(fp); } #endif