summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@nimmagadda.net>2014-08-27 14:24:56 +0500
committerSunil Nimmagadda <sunil@nimmagadda.net>2014-08-27 14:24:56 +0500
commitb16316e3bc0bdb5be4e4a46ae405d5ee191bc080 (patch)
treed419080d5788c078cf49d18a9d2ba9f3cdb26605 /session.c
parentc2736fe4b58830f0ab987e4c1f0c1eadca6d7306 (diff)
Give session a chance to init its imsgev. Let session initiate the
process of MAILDROP_INIT. Maildrop now sets up itself and waits for MAILDROP_INIT from session. This would now eliminate the doubt in the earlier setup when priv process forks and the child gets cpu slice first before parent which sends MAILDROP_INIT to an uninitialized imsgev.
Diffstat (limited to 'session.c')
-rw-r--r--session.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/session.c b/session.c
index da90c78..102c1ef 100644
--- a/session.c
+++ b/session.c
@@ -436,7 +436,9 @@ get_list(struct session *s, unsigned int i, int uidl)
void
session_imsgev_init(struct session *s, int fd)
{
- imsgev_init(&s->iev_maildrop, fd, s, maildrop_imsgev, needfd);
+ imsgev_init(&s->iev_maildrop, fd, NULL, maildrop_imsgev, needfd);
+ imsgev_xcompose(&s->iev_maildrop, IMSG_MAILDROP_INIT, s->id, 0,
+ -1, s->user, sizeof(s->user), "session_imsgev_init");
}
static void