Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 156376
Collapse All | Expand All

(-)file_not_specified_in_diff (-8 / +3 lines)
Lines 409-425 Link Here
409
/* Interface */
399
/* Interface */
410
400
411
#ifdef USE_SQL
401
#ifdef USE_SQL
412
/*PRINTFLIKE2*/
413
void
402
void
414
sqllog(int status, char *msg, ...)
403
sqllog(int status, char *query)
415
{
404
{
416
        va_list ap;
417
        FILE *fp;
405
        FILE *fp;
418
        char *path;
406
        char *path;
419
        char *filename;
407
        char *filename;
420
408
421
        filename = status ? "sql-lost" : "sql.log";
409
        filename = status ? "sql-lost" : "sql.log";
422
        path = grad_mkfilename(radacct_dir, filename);
410
        path = grad_mkfilename(grad_acct_dir, filename);
423
        if ((fp = fopen(path, "a")) == NULL) {
411
        if ((fp = fopen(path, "a")) == NULL) {
424
                grad_log(L_ERR|L_PERROR,  
412
                grad_log(L_ERR|L_PERROR,  
425
                         _("could not append to file %s"), path);
413
                         _("could not append to file %s"), path);
Lines 427-436 Link Here
427
                return;
415
                return;
428
        }
416
        }
429
        grad_free(path);
417
        grad_free(path);
430
	va_start(ap, msg);
418
        fprintf(fp, "%s;\n", query);
431
        vfprintf(fp, msg, ap);
432
        fprintf(fp, ";\n");
433
        va_end(ap);
434
        fclose(fp);
419
        fclose(fp);
435
}
420
}
436
#endif
421
#endif

Return to bug 156376