diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-02-25 22:12:34 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-02-25 22:12:34 +0200 |
commit | 27d1256d331d45bf68d96e9a8aa8175df2584978 (patch) | |
tree | d4e28ce067fa001b7aff5a470c146a6d04eead96 /src/pidfile.c | |
parent | c9178a6fef0184baed0e8456bb6c6d4091b4997c (diff) | |
download | wydawca-27d1256d331d45bf68d96e9a8aa8175df2584978.tar.gz wydawca-27d1256d331d45bf68d96e9a8aa8175df2584978.tar.bz2 |
Check incoming connections using libwrap; various bugfixes.
* configure.ac: Check for libwrap.
* src/tcpwrap.c: New file.
* src/Makefile.am (wydawca_SOURCES): Add tcpwrap.c
* src/builtin.c, src/job.c, src/pidfile.c: Minor fixes.
* src/config.c (assert_string_arg): Change to extern.
(wydawca_kw): New block statement "tcp-wrapper"
* src/net.c (wydawca_listener): Check fd using libwrap.
* src/triplet.c (DECL_EXPAND_TIMER): Add missing return statement.
Diffstat (limited to 'src/pidfile.c')
-rw-r--r-- | src/pidfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pidfile.c b/src/pidfile.c index 6da84f1..afbcb87 100644 --- a/src/pidfile.c +++ b/src/pidfile.c @@ -34,7 +34,7 @@ check_pidfile () if (fp) { unsigned long pid; - if (fscanf (fp, "%ul\n", &pid) != 1) + if (fscanf (fp, "%lu\n", &pid) != 1) { logmsg (LOG_ERR, _("malformed pidfile %s"), pidfile); if (!force_startup) @@ -82,7 +82,7 @@ check_pidfile () exit (EX_UNAVAILABLE); } } - fprintf (fp, "%lu\n", getpid ()); + fprintf (fp, "%lu\n", (unsigned long) getpid ()); fclose (fp); atexit (remove_pidfile); } |