summaryrefslogtreecommitdiff
path: root/pop3d.h
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@nimmagadda.net>2014-09-05 10:23:50 +0500
committerSunil Nimmagadda <sunil@nimmagadda.net>2014-09-05 10:23:50 +0500
commit5307391aa9ef1188cc872aede5bdbf9e977fb75f (patch)
tree5de905ba946c54107ca565a78c15bae94fa76668 /pop3d.h
parent3b17edbbcaaa631c631453276c58bdc9a8773f58 (diff)
The sockaddr_storage returned by accept(2) belongs to session and
not the listener. Move it to a place where it belongs: struct session.
Diffstat (limited to 'pop3d.h')
-rw-r--r--pop3d.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/pop3d.h b/pop3d.h
index 72f50e5..7e3b47f 100644
--- a/pop3d.h
+++ b/pop3d.h
@@ -114,7 +114,6 @@ struct auth_req {
};
struct listener {
- struct sockaddr_storage ss;
struct event ev;
struct event pause;
int flags;
@@ -129,14 +128,15 @@ enum state {
struct session {
SPLAY_ENTRY(session) entry;
- struct imsgev *iev_maildrop;
struct iobuf iobuf;
struct io io;
+ struct sockaddr_storage ss;
char user[ARGLEN];
char pass[ARGLEN];
size_t m_sz;
size_t nmsgs;
struct listener *l;
+ struct imsgev *iev_maildrop;
uint32_t id;
int flags;
enum state state;
@@ -146,7 +146,7 @@ struct session {
void pop3_main(int [2], struct passwd *);
/* session.c */
-void session_init(struct listener *, int);
+void session_init(struct listener *, int, const struct sockaddr_storage *);
void session_close(struct session *, int);
void session_reply(struct session *, char *, ...);
void session_set_state(struct session *, enum state);