diff options
author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2014-08-27 14:24:56 +0500 |
---|---|---|
committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2014-08-27 14:24:56 +0500 |
commit | b16316e3bc0bdb5be4e4a46ae405d5ee191bc080 (patch) | |
tree | d419080d5788c078cf49d18a9d2ba9f3cdb26605 /session.c | |
parent | c2736fe4b58830f0ab987e4c1f0c1eadca6d7306 (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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |