summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMadCamel <madcamel@gmail.com>2010-08-25 18:49:53 -0400
committerMadCamel <madcamel@gmail.com>2010-08-25 18:49:53 -0400
commit117ef86613f187f4afa88947f60cf4a683fb6ee7 (patch)
tree803ab5ed6f2ccf0392ac39707f7505c1a1623e1b /src
parent819525a030a1e66c9de6fe67b15f4f57ff932651 (diff)
downloadtmwa-117ef86613f187f4afa88947f60cf4a683fb6ee7.tar.gz
tmwa-117ef86613f187f4afa88947f60cf4a683fb6ee7.tar.bz2
tmwa-117ef86613f187f4afa88947f60cf4a683fb6ee7.tar.xz
tmwa-117ef86613f187f4afa88947f60cf4a683fb6ee7.zip
Revert "Fixed leaking of file descriptors in login and map server when their logfiles are too large."
This reverts commit 819525a030a1e66c9de6fe67b15f4f57ff932651.
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c3
-rw-r--r--src/login/login.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 5373bec..fefc420 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -141,8 +141,9 @@ int char_log (char *fmt, ...)
sprintf (tmpstr + 19, ".%03d: %s", (int) tv.tv_usec / 1000, fmt);
vfprintf (logfp, tmpstr, ap);
}
+ fclose_ (logfp);
}
- fclose_ (logfp);
+
va_end (ap);
return 0;
}
diff --git a/src/login/login.c b/src/login/login.c
index a0a5b30..c397212 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -157,8 +157,9 @@ int login_log (char *fmt, ...)
(int) tv.tv_usec / 1000, fmt);
vfprintf (logfp, tmpstr, ap);
}
+ fclose_ (logfp);
}
- fclose_ (logfp);
+
va_end (ap);
return 0;
}