(unsigned long long)peer_st.st_ino);
}
- if (client->session_id != NULL) {
- str_append(cmd, "\tsession=");
- str_append_tabescaped(cmd, client->session_id);
- }
+ str_append(cmd, "\tsession=");
+ str_append_tabescaped(cmd, user->session_id);
if (user->session_create_time != 0) {
str_printfa(cmd, "\tsession_created=%s",
dec2str(user->session_create_time));
config.url_port = client->set->imap_urlauth_port;
config.socket_path = t_strconcat(client->user->set->base_dir,
"/"IMAP_URLAUTH_SOCKET_NAME, NULL);
- config.session_id = client->session_id;
+ config.session_id = client->user->session_id;
config.access_user = client->user->username;
config.access_service = "imap";
config.access_anonymous = client->user->anonymous;
return FALSE;
}
-struct client *client_create(int fd_in, int fd_out, const char *session_id,
+struct client *client_create(int fd_in, int fd_out,
struct event *event, struct mail_user *user,
struct mail_storage_service_user *service_user,
const struct imap_settings *set,
client->set = set;
client->smtp_set = smtp_set;
client->service_user = service_user;
- client->session_id = p_strdup(pool, session_id);
client->fd_in = fd_in;
client->fd_out = fd_out;
client->input = i_stream_create_fd(fd_in,
const struct var_expand_table logout_tab[] = {
{ 'i', dec2str(i_stream_get_absolute_offset(client->input)), "input" },
{ 'o', dec2str(client->output->offset), "output" },
- { '\0', client->session_id, "session" },
+ { '\0', client->user->session_id, "session" },
{ '\0', dec2str(client->fetch_hdr_count), "fetch_hdr_count" },
{ '\0', dec2str(client->fetch_hdr_bytes), "fetch_hdr_bytes" },
{ '\0', dec2str(client->fetch_body_count), "fetch_body_count" },
struct imap_client_vfuncs v;
struct event *event;
- const char *session_id;
const char *const *userdb_fields; /* for internal session saving/restoring */
int fd_in, fd_out;
/* Create new client with specified input/output handles. socket specifies
if the handle is a socket. */
-struct client *client_create(int fd_in, int fd_out, const char *session_id,
+struct client *client_create(int fd_in, int fd_out,
struct event *event, struct mail_user *user,
struct mail_storage_service_user *service_user,
const struct imap_settings *set,
return -1;
}
- client = client_create(fd_in, fd_out, input->session_id,
+ client = client_create(fd_in, fd_out,
event, mail_user, user, imap_set, smtp_set);
client->userdb_fields = input->userdb_fields == NULL ? NULL :
p_strarray_dup(client->pool, input->userdb_fields);