struct timeval last_connect;
unsigned int reconnect_count;
- struct imapc_client_mailbox *selecting_box, *selected_box;
+ struct imapc_client_mailbox *qresync_selecting_box, *selected_box;
enum imapc_connection_state state;
char *disconnect_reason;
conn->idle_stopping = FALSE;
conn->select_waiting_reply = FALSE;
- conn->selecting_box = NULL;
+ conn->qresync_selecting_box = NULL;
conn->selected_box = NULL;
/* fall through */
case IMAPC_CONNECTION_STATE_DONE:
}
if (strcasecmp(key, "CLOSED") == 0) {
/* QRESYNC: SELECTing another mailbox */
- if (conn->selecting_box != NULL) {
- conn->selected_box = conn->selecting_box;
- conn->selecting_box = NULL;
+ if (conn->qresync_selecting_box != NULL) {
+ conn->selected_box = conn->qresync_selecting_box;
+ conn->qresync_selecting_box = NULL;
}
}
return 0;
{
struct imapc_connection *conn = box->conn;
- i_assert(conn->selecting_box == NULL);
+ i_assert(conn->qresync_selecting_box == NULL);
if (conn->selected_box != NULL &&
(conn->capabilities & IMAPC_CAPABILITY_QRESYNC) != 0) {
/* server will send a [CLOSED] once selected mailbox is
closed */
- conn->selecting_box = box;
+ conn->qresync_selecting_box = box;
} else {
/* we'll have to assume that all the future untagged messages
are for the mailbox we're selecting */
bool imapc_command_connection_is_selected(struct imapc_command *cmd)
{
return cmd->conn->selected_box != NULL ||
- cmd->conn->selecting_box != NULL;
+ cmd->conn->qresync_selecting_box != NULL;
}
void imapc_command_send(struct imapc_command *cmd, const char *cmd_str)
{
struct imapc_connection *conn = box->conn;
- if (conn->selected_box != NULL || conn->selecting_box != NULL) {
+ if (conn->selected_box != NULL || conn->qresync_selecting_box != NULL) {
i_assert(conn->selected_box == box ||
- conn->selecting_box == box);
+ conn->qresync_selecting_box == box);
conn->selected_box = NULL;
- conn->selecting_box = NULL;
+ conn->qresync_selecting_box = NULL;
}
imapc_connection_send_idle_done(conn);
imapc_connection_abort_commands(conn, box, FALSE);
struct imapc_client_mailbox *
imapc_connection_get_mailbox(struct imapc_connection *conn)
{
- if (conn->selecting_box != NULL)
- return conn->selecting_box;
+ if (conn->qresync_selecting_box != NULL)
+ return conn->qresync_selecting_box;
return conn->selected_box;
}