summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-03-15 19:32:12 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-03-15 19:32:12 +0000
commitdb787728ab081e9d84b26e1a98431526e1420c27 (patch)
tree007e0982bc7220c430950974142d89decb587d7a
parentb6b944aa351d07fa3a8e68b0f477b46eac779338 (diff)
since we are going to share code in smtp sessions and mta sessions, we need
to also share the statistics structure, still being worked on
-rw-r--r--usr.sbin/smtpd/smtp.c4
-rw-r--r--usr.sbin/smtpd/smtp_session.c4
-rw-r--r--usr.sbin/smtpd/smtpctl.c6
-rw-r--r--usr.sbin/smtpd/smtpd.h7
-rw-r--r--usr.sbin/smtpd/ssl.c4
5 files changed, 13 insertions, 12 deletions
diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c
index bbc9ac54615..66e77c7d7e1 100644
--- a/usr.sbin/smtpd/smtp.c
+++ b/usr.sbin/smtpd/smtp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp.c,v 1.30 2009/03/15 18:12:15 gilles Exp $ */
+/* $OpenBSD: smtp.c,v 1.31 2009/03/15 19:32:10 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -50,7 +50,7 @@ void smtp_accept(int, short, void *);
void session_timeout(int, short, void *);
void session_auth_pickup(struct session *, char *, size_t);
-struct s_smtp s_smtp;
+struct s_session s_smtp;
void
smtp_sig_handler(int sig, short event, void *p)
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c
index 4c1ee204c3f..0e448304811 100644
--- a/usr.sbin/smtpd/smtp_session.c
+++ b/usr.sbin/smtpd/smtp_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp_session.c,v 1.62 2009/03/15 18:12:15 gilles Exp $ */
+/* $OpenBSD: smtp_session.c,v 1.63 2009/03/15 19:32:10 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -73,7 +73,7 @@ int session_set_path(struct path *, char *);
void session_timeout(int, short, void *);
void session_cleanup(struct session *);
-extern struct s_smtp s_smtp;
+extern struct s_session s_smtp;
struct session_timeout {
enum session_state state;
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c
index 6698641904c..c7f93a82532 100644
--- a/usr.sbin/smtpd/smtpctl.c
+++ b/usr.sbin/smtpd/smtpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpctl.c,v 1.16 2009/03/01 12:12:58 jacekm Exp $ */
+/* $OpenBSD: smtpctl.c,v 1.17 2009/03/15 19:32:10 gilles Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -261,7 +261,7 @@ show_stats_output(struct imsg *imsg)
static struct s_parent s_parent;
static struct s_queue s_queue;
static struct s_runner s_runner;
- static struct s_smtp s_smtp;
+ static struct s_session s_smtp;
switch (imsg->hdr.type) {
case IMSG_PARENT_STATS:
@@ -274,7 +274,7 @@ show_stats_output(struct imsg *imsg)
s_runner = *(struct s_runner *)imsg->data;
break;
case IMSG_SMTP_STATS:
- s_smtp = *(struct s_smtp *)imsg->data;
+ s_smtp = *(struct s_session *)imsg->data;
break;
default:
errx(1, "show_stats_output: bad hdr type (%d)", imsg->hdr.type);
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 9cd19ee4789..de160ccd98f 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.93 2009/03/15 19:15:25 gilles Exp $ */
+/* $OpenBSD: smtpd.h,v 1.94 2009/03/15 19:32:11 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -663,7 +663,7 @@ struct s_runner {
size_t active;
};
-struct s_smtp {
+struct s_session {
size_t sessions;
size_t sessions_active;
@@ -682,7 +682,8 @@ struct stats {
struct s_parent parent;
struct s_queue queue;
struct s_runner runner;
- struct s_smtp smtp;
+ struct s_session smtp;
+ struct s_session mta;
} u;
};
diff --git a/usr.sbin/smtpd/ssl.c b/usr.sbin/smtpd/ssl.c
index 16813e2e4c4..f151a94af75 100644
--- a/usr.sbin/smtpd/ssl.c
+++ b/usr.sbin/smtpd/ssl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.c,v 1.10 2009/02/05 21:25:19 gilles Exp $ */
+/* $OpenBSD: ssl.c,v 1.11 2009/03/15 19:32:11 gilles Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -55,7 +55,7 @@ void ssl_client_init(struct session *);
extern void bufferevent_read_pressure_cb(struct evbuffer *, size_t,
size_t, void *);
-extern struct s_smtp s_smtp;
+extern struct s_session s_smtp;
void
ssl_connect(int fd, short event, void *p)