comparison src/master/login-process.c @ 2097:4e77cb0aff21 HEAD

Added %l, %r and %P variables and mail_log_prefix setting.
author Timo Sirainen <tss@iki.fi>
date Mon, 31 May 2004 21:04:46 +0300
parents 6ae973f60f43
children 8690d2000e33
comparison
equal deleted inserted replaced
2096:7e46cf0f3522 2097:4e77cb0aff21
37 unsigned int tag; 37 unsigned int tag;
38 38
39 unsigned int login_tag; 39 unsigned int login_tag;
40 int fd; 40 int fd;
41 41
42 struct ip_addr ip; 42 struct ip_addr local_ip, remote_ip;
43 }; 43 };
44 44
45 static unsigned int auth_id_counter, login_pid_counter; 45 static unsigned int auth_id_counter, login_pid_counter;
46 static struct timeout *to; 46 static struct timeout *to;
47 static struct io *io_listen; 47 static struct io *io_listen;
80 if (reply == NULL || !reply->success) 80 if (reply == NULL || !reply->success)
81 master_reply.success = FALSE; 81 master_reply.success = FALSE;
82 else { 82 else {
83 struct login_group *group = request->process->group; 83 struct login_group *group = request->process->group;
84 84
85 t_push();
85 master_reply.success = 86 master_reply.success =
86 create_mail_process(group, request->fd, &request->ip, 87 create_mail_process(group, request->fd,
88 &request->local_ip,
89 &request->remote_ip,
87 reply, (const char *) data); 90 reply, (const char *) data);
91 t_pop();
88 } 92 }
89 93
90 /* reply to login */ 94 /* reply to login */
91 master_reply.tag = request->login_tag; 95 master_reply.tag = request->login_tag;
92 96
266 p->refcount++; 270 p->refcount++;
267 authreq->process = p; 271 authreq->process = p;
268 authreq->tag = ++auth_id_counter; 272 authreq->tag = ++auth_id_counter;
269 authreq->login_tag = req.tag; 273 authreq->login_tag = req.tag;
270 authreq->fd = client_fd; 274 authreq->fd = client_fd;
271 authreq->ip = req.ip; 275 authreq->local_ip = req.local_ip;
276 authreq->remote_ip = req.remote_ip;
272 277
273 auth_process = auth_process_find(req.auth_pid); 278 auth_process = auth_process_find(req.auth_pid);
274 if (auth_process == NULL) { 279 if (auth_process == NULL) {
275 i_error("login: Authentication process %u doesn't exist", 280 i_error("login: Authentication process %u doesn't exist",
276 req.auth_pid); 281 req.auth_pid);