summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@nimmagadda.net>2014-08-27 11:49:41 +0500
committerSunil Nimmagadda <sunil@nimmagadda.net>2014-08-27 11:49:41 +0500
commit3dc10527bb9d7d8b22369260976a897222e4297c (patch)
treea2aacc954d89ed8bb573bfaeabcb601e8ee74d71
parentbf0ea9ea9efb05be1e6cbb23574b001fd0372b79 (diff)
Rename to differentiate setup and init operations.
-rw-r--r--maildrop.c4
-rw-r--r--pop3d.c2
-rw-r--r--pop3d.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/maildrop.c b/maildrop.c
index 12861f7..5562195 100644
--- a/maildrop.c
+++ b/maildrop.c
@@ -48,7 +48,7 @@ static size_t expand(char *, const char *, size_t, struct passwd *);
static struct mdrop m;
pid_t
-maildrop_init(uint32_t session_id, int pair[2], struct passwd *pw,
+maildrop_setup(uint32_t session_id, int pair[2], struct passwd *pw,
int type, const char *path)
{
struct imsgev iev_session;
@@ -176,6 +176,8 @@ session_imsgev(struct imsgev *iev, int code, struct imsg *imsg)
switch (code) {
case IMSGEV_IMSG:
switch (imsg->hdr.type) {
+ case IMSG_MAILDROP_INIT:
+ break;
case IMSG_MAILDROP_UPDATE:
update(iev, imsg, mb);
break;
diff --git a/pop3d.c b/pop3d.c
index cbd3ea3..26d048c 100644
--- a/pop3d.c
+++ b/pop3d.c
@@ -172,7 +172,7 @@ authenticate(struct imsgev *iev, struct imsg *imsg)
if ((pw = getpwnam(req->user)) == NULL)
fatalx("authenticate: getpwnam");
- if (maildrop_init(imsg->hdr.peerid, pair, pw, mtype, mpath) == -1) {
+ if (maildrop_setup(imsg->hdr.peerid, pair, pw, mtype, mpath) == -1) {
logit(LOG_INFO, "%u: unable to fork maildrop process",
imsg->hdr.peerid);
pair[0] = -1;
diff --git a/pop3d.h b/pop3d.h
index 1b70163..9d74961 100644
--- a/pop3d.h
+++ b/pop3d.h
@@ -156,7 +156,7 @@ int session_cmp(struct session *, struct session *);
SPLAY_PROTOTYPE(session_tree, session, entry, session_cmp);
/* maildrop.c */
-pid_t maildrop_init(uint32_t, int [2], struct passwd *, int, const char *);
+pid_t maildrop_setup(uint32_t, int [2], struct passwd *, int, const char *);
/* util.c */
void set_nonblocking(int);