Rename to differentiate setup and init operations.
--- a/maildrop.c Wed Aug 27 10:36:03 2014 +0500
+++ b/maildrop.c Wed Aug 27 11:50:11 2014 +0500
@@ -48,7 +48,7 @@
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 @@
switch (code) {
case IMSGEV_IMSG:
switch (imsg->hdr.type) {
+ case IMSG_MAILDROP_INIT:
+ break;
case IMSG_MAILDROP_UPDATE:
update(iev, imsg, mb);
break;
--- a/pop3d.c Wed Aug 27 10:36:03 2014 +0500
+++ b/pop3d.c Wed Aug 27 11:50:11 2014 +0500
@@ -172,7 +172,7 @@
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;
--- a/pop3d.h Wed Aug 27 10:36:03 2014 +0500
+++ b/pop3d.h Wed Aug 27 11:50:11 2014 +0500
@@ -156,7 +156,7 @@
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);