summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtp.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2011-04-17 13:36:08 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2011-04-17 13:36:08 +0000
commit66e06ec8570a0086ca9fdce67a3b30be7c9deb8e (patch)
treeae96e9b08c418e3f55a5c6b2a3cafb7296ef65f4 /usr.sbin/smtpd/smtp.c
parentbfb477fad35115cd1bcaf0720f4fe0914c80cda4 (diff)
cleanups, cosmethic changes, functions that should be static are now static
no functionnal change
Diffstat (limited to 'usr.sbin/smtpd/smtp.c')
-rw-r--r--usr.sbin/smtpd/smtp.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c
index 2164f8bc6c3..883a1dd103a 100644
--- a/usr.sbin/smtpd/smtp.c
+++ b/usr.sbin/smtpd/smtp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp.c,v 1.83 2011/04/17 11:39:23 gilles Exp $ */
+/* $OpenBSD: smtp.c,v 1.84 2011/04/17 13:36:07 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -37,18 +37,19 @@
#include "smtpd.h"
#include "log.h"
-void smtp_imsg(struct smtpd *, struct imsgev *, struct imsg *);
-__dead void smtp_shutdown(void);
-void smtp_sig_handler(int, short, void *);
-void smtp_setup_events(struct smtpd *);
-void smtp_disable_events(struct smtpd *);
-void smtp_pause(struct smtpd *);
-int smtp_enqueue(struct smtpd *, uid_t *);
-void smtp_accept(int, short, void *);
-struct session *smtp_new(struct listener *);
-struct session *session_lookup(struct smtpd *, u_int64_t);
+static void smtp_imsg(struct smtpd *, struct imsgev *, struct imsg *);
+static void smtp_shutdown(void);
+static void smtp_sig_handler(int, short, void *);
+static void smtp_setup_events(struct smtpd *);
+static void smtp_disable_events(struct smtpd *);
+static void smtp_pause(struct smtpd *);
+static int smtp_enqueue(struct smtpd *, uid_t *);
+static void smtp_accept(int, short, void *);
+static struct session *smtp_new(struct listener *);
+static struct session *session_lookup(struct smtpd *, u_int64_t);
-void
+
+static void
smtp_imsg(struct smtpd *env, struct imsgev *iev, struct imsg *imsg)
{
struct session skey;
@@ -282,7 +283,7 @@ smtp_imsg(struct smtpd *env, struct imsgev *iev, struct imsg *imsg)
fatalx("smtp_imsg: unexpected imsg");
}
-void
+static void
smtp_sig_handler(int sig, short event, void *p)
{
switch (sig) {
@@ -295,7 +296,7 @@ smtp_sig_handler(int sig, short event, void *p)
}
}
-void
+static void
smtp_shutdown(void)
{
log_info("smtp server exiting");
@@ -370,7 +371,7 @@ smtp(struct smtpd *env)
return (0);
}
-void
+static void
smtp_setup_events(struct smtpd *env)
{
struct listener *l;
@@ -398,7 +399,7 @@ smtp_setup_events(struct smtpd *env)
log_debug("smtp: will accept at most %d clients", env->sc_maxconn);
}
-void
+static void
smtp_disable_events(struct smtpd *env)
{
struct listener *l;
@@ -415,7 +416,7 @@ smtp_disable_events(struct smtpd *env)
env->sc_maxconn = 0;
}
-void
+static void
smtp_pause(struct smtpd *env)
{
struct listener *l;
@@ -439,7 +440,7 @@ smtp_resume(struct smtpd *env)
event_add(&l->ev, NULL);
}
-int
+static int
smtp_enqueue(struct smtpd *env, uid_t *euid)
{
static struct listener local, *l;
@@ -498,7 +499,7 @@ smtp_enqueue(struct smtpd *env, uid_t *euid)
return (fd[1]);
}
-void
+static void
smtp_accept(int fd, short event, void *p)
{
struct listener *l = p;
@@ -521,7 +522,7 @@ smtp_accept(int fd, short event, void *p)
}
-struct session *
+static struct session *
smtp_new(struct listener *l)
{
struct smtpd *env = l->env;
@@ -564,7 +565,7 @@ smtp_new(struct listener *l)
/*
* Helper function for handling IMSG replies.
*/
-struct session *
+static struct session *
session_lookup(struct smtpd *env, u_int64_t id)
{
struct session key;