[Cvs-nserver-commits] CVS: cvs-nserver/src audit.c,1.1.2.1,1.1.2.2
Brought to you by:
tyranny
From: Alexey M. <ty...@us...> - 2002-05-29 05:08:54
|
Update of /cvsroot/cvs-nserver/cvs-nserver/src In directory usw-pr-cvs1:/tmp/cvs-serv19590 Modified Files: Tag: NCLI-1-11-1 audit.c Log Message: Do not log if the logging is not active Index: audit.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/src/Attic/audit.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- audit.c 25 May 2002 20:47:04 -0000 1.1.2.1 +++ audit.c 29 May 2002 05:08:52 -0000 1.1.2.2 @@ -26,20 +26,22 @@ operation_audit_log(const char* operation, struct file_info* finfo, const char* branch, const char* rev) { - if (!start_audit_log_line(operation)) { - error(1, 0, "Out of memory"); + if (audit_log_active()) { + if (!start_audit_log_line(operation)) { + error(1, 0, "Out of memory"); + } + append_audit_log_line(finfo->repository + Pserver_Repos_len + 1); + append_audit_log_line(finfo->file); + if (branch == NULL) + append_audit_log_line(""); + else + append_audit_log_line(branch); + if (rev == NULL) + append_audit_log_line(""); + else + append_audit_log_line(rev); + log_audit_event(); } - append_audit_log_line(finfo->repository + Pserver_Repos_len + 1); - append_audit_log_line(finfo->file); - if (branch == NULL) - append_audit_log_line(""); - else - append_audit_log_line(branch); - if (rev == NULL) - append_audit_log_line(""); - else - append_audit_log_line(rev); - log_audit_event(); return 1; } |