do not open debug file unless needed

This commit is contained in:
jakob 2004-07-23 18:30:28 +00:00
parent 8b777117a9
commit c8facac50e

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-netserver_c,v 1.1 2004/07/23 18:30:28 jakob Exp $
--- netserver.c.orig Fri Jul 23 20:23:01 2004
+++ netserver.c Fri Jul 23 20:24:52 2004
@@ -730,10 +730,12 @@ struct sockaddr name;
/* unlink(DEBUG_LOG_FILE); */
#ifndef WIN32
+if (debug) {
if ((where = fopen(DEBUG_LOG_FILE, "w")) == NULL) {
perror("netserver: debug file");
exit(1);
}
+}
#else
{
char FileName[MAX_PATH];