* Copyright © 2006-2007 Pierre Habouzit
*/
-#ifndef POSTLICYD_BUFFER_H
-#define POSTLICYD_BUFFER_H
+#ifndef PFIXTOOLS_BUFFER_H
+#define PFIXTOOLS_BUFFER_H
#include "mem.h"
#include "str.h"
ssize_t buffer_read(buffer_t *buf, int fd, ssize_t count);
-#endif /* POSTLICYD_BUFFER_H */
+#endif /* PFIXTOOLS_BUFFER_H */
#include "common.h"
-sig_atomic_t cleanexit = false;
sig_atomic_t sigint = false;
sig_atomic_t sighup = false;
* Copyright © 2007 Pierre Habouzit
*/
-#ifndef POSTLICYD_H
-#define POSTLICYD_H
+#ifndef PFIXTOOLS_H
+#define PFIXTOOLS_H
#include <errno.h>
#include <limits.h>
#define module_exit(fn) static exitcall_t __exit_##fn __exit = fn;
/* common.c */
-extern sig_atomic_t cleanexit;
extern sig_atomic_t sigint;
extern sig_atomic_t sighup;
#include "common.h"
-volatile int nbthreads = 0;
+/* administrivia {{{ */
static int main_initialize(void)
{
return 0;
}
+static void main_shutdown(void)
+{
+ closelog();
+}
+
+module_init(main_initialize);
+module_exit(main_shutdown);
+
+/* }}} */
+
void *job_run(void *_fd)
{
int fd = (intptr_t)_fd;
close(sock);
}
-static void main_shutdown(void)
-{
- closelog();
-}
-
-module_init(main_initialize);
-module_exit(main_shutdown);
-
int main(void)
{
if (atexit(common_shutdown)) {
common_initialize();
main_loop();
- syslog(LOG_INFO, cleanexit ? "Stopping..." : "Unclean exit...");
+ syslog(LOG_INFO, "Stopping...");
return EXIT_SUCCESS;
}
* Copyright © 2006 Pierre Habouzit
*/
-#ifndef POSTLICYD_MEM_H
-#define POSTLICYD_MEM_H
+#ifndef PFIXTOOLS_MEM_H
+#define PFIXTOOLS_MEM_H
#include <assert.h>
#include <ctype.h>
} \
}
-#endif /* POSTLICYD_MEM_H */
+#endif /* PFIXTOOLS_MEM_H */
* Copyright © 2006-2007 Pierre Habouzit
*/
-#ifndef POSTLICYD_POSTFIX_H
-#define POSTLICYD_POSTFIX_H
+#ifndef PFIXTOOLS_POSTFIX_H
+#define PFIXTOOLS_POSTFIX_H
#include <stddef.h>
* Copyright © 2007 Pierre Habouzit
*/
-#ifndef POSTLICYD_RBL_H
-#define POSTLICYD_RBL_H
+#ifndef PFIXTOOLS_RBL_H
+#define PFIXTOOLS_RBL_H
typedef struct rbldb_t rbldb_t;
* Copyright © 2006 Pierre Habouzit
*/
-#ifndef POSTLICYD_STR_H
-#define POSTLICYD_STR_H
+#ifndef PFIXTOOLS_STR_H
+#define PFIXTOOLS_STR_H
#include "mem.h"
}
/*@}*/
-#endif /* POSTLICYD_STR_H */
+#endif /* PFIXTOOLS_STR_H */
do_h() {
do_hdr
cat <<EOF
-#ifndef POSTLICYD_TOKENS_H
-#define POSTLICYD_TOKENS_H
+#ifndef PFIXTOOLS_TOKENS_H
+#define PFIXTOOLS_TOKENS_H
typedef enum postlicyd_token {
PTK_UNKNOWN = -1,