struct ostream *output;
struct io *io;
- unsigned int version_received:1;
- unsigned int handshaked:1;
- unsigned int master:1;
- unsigned int fifo:1;
+ bool version_received:1;
+ bool handshaked:1;
+ bool master:1;
+ bool fifo:1;
};
static struct anvil_connection *anvil_connections = NULL;
unsigned int penalty:16;
unsigned int last_update:LAST_UPDATE_BITS; /* last_penalty + n */
- unsigned int checksum_is_pointer:1;
+ bool checksum_is_pointer:1;
/* we use value up to two different checksums.
after that switch to pointer. */
union {
uint8_t cookie[MASTER_AUTH_COOKIE_SIZE];
struct auth_request_handler *request_handler;
- unsigned int login_requests:1;
- unsigned int version_received:1;
- unsigned int token_auth:1;
+ bool login_requests:1;
+ bool version_received:1;
+ bool token_auth:1;
};
void auth_client_connection_create(struct auth *auth, int fd,
this uid. Don't allow LIST/PASS lookups. */
uid_t userdb_restricted_uid;
- unsigned int version_received:1;
- unsigned int destroyed:1;
- unsigned int userdb_only:1;
+ bool version_received:1;
+ bool destroyed:1;
+ bool userdb_only:1;
};
struct auth_master_connection *
struct auth_penalty {
struct anvil_client *client;
- unsigned int disabled:1;
+ bool disabled:1;
};
struct auth_penalty *auth_penalty_init(const char *path)
struct ostream *output;
struct io *io;
- unsigned int destroyed:1;
+ bool destroyed:1;
};
static void postfix_input(struct auth_postfix_connection *conn);
auth_master_request_callback_t *master_callback;
- unsigned int destroyed:1;
- unsigned int token_auth:1;
+ bool destroyed:1;
+ bool token_auth:1;
};
static ARRAY(struct auth_request *) auth_failures_arr;
/* this is a lookup on auth socket (not login socket).
skip any proxying stuff if enabled. */
- unsigned int auth_only:1;
+ bool auth_only:1;
/* we're doing a userdb lookup now (we may have done passdb lookup
earlier) */
- unsigned int userdb_lookup:1;
+ bool userdb_lookup:1;
/* DIGEST-MD5 kludge */
- unsigned int domain_is_realm:1;
+ bool domain_is_realm:1;
/* auth_debug is enabled for this request */
- unsigned int debug:1;
+ bool debug:1;
/* flags received from auth client: */
- unsigned int secured:1;
- unsigned int final_resp_ok:1;
- unsigned int no_penalty:1;
- unsigned int valid_client_cert:1;
- unsigned int cert_username:1;
- unsigned int request_auth_token:1;
+ bool secured:1;
+ bool final_resp_ok:1;
+ bool no_penalty:1;
+ bool valid_client_cert:1;
+ bool cert_username:1;
+ bool request_auth_token:1;
/* success/failure states: */
- unsigned int successful:1;
- unsigned int failed:1; /* overrides any other success */
- unsigned int internal_failure:1;
- unsigned int passdbs_seen_user_unknown:1;
- unsigned int passdbs_seen_internal_failure:1;
- unsigned int userdbs_seen_internal_failure:1;
+ bool successful:1;
+ bool failed:1; /* overrides any other success */
+ bool internal_failure:1;
+ bool passdbs_seen_user_unknown:1;
+ bool passdbs_seen_internal_failure:1;
+ bool userdbs_seen_internal_failure:1;
/* current state: */
- unsigned int accept_cont_input:1;
- unsigned int skip_password_check:1;
- unsigned int prefer_plain_credentials:1;
- unsigned int in_delayed_failure_queue:1;
- unsigned int removed_from_handler:1;
- unsigned int snapshot_have_userdb_prefetch_set:1;
+ bool accept_cont_input:1;
+ bool skip_password_check:1;
+ bool prefer_plain_credentials:1;
+ bool in_delayed_failure_queue:1;
+ bool removed_from_handler:1;
+ bool snapshot_have_userdb_prefetch_set:1;
/* each passdb lookup can update the current success-status using the
result_* rules. the authentication succeeds only if this is TRUE
at the end. mechanisms that don't require passdb, but do a passdb
lookup anyway (e.g. GSSAPI) need to set this to TRUE by default. */
- unsigned int passdb_success:1;
+ bool passdb_success:1;
/* userdb equivalent of passdb_success */
- unsigned int userdb_success:1;
+ bool userdb_success:1;
/* the last userdb lookup failed either due to "tempfail" extra field
or because one of the returned uid/gid fields couldn't be translated
to a number */
- unsigned int userdb_lookup_tempfailed:1;
+ bool userdb_lookup_tempfailed:1;
/* userdb_* fields have been set by the passdb lookup, userdb prefetch
will work. */
- unsigned int userdb_prefetch_set:1;
- unsigned int stats_sent:1;
+ bool userdb_prefetch_set:1;
+ bool stats_sent:1;
/* ... mechanism specific data ... */
};
struct timeout *to_idle;
time_t cmd_start;
- unsigned int version_received:1;
- unsigned int dbhash_received:1;
- unsigned int error_sent:1;
+ bool version_received:1;
+ bool dbhash_received:1;
+ bool error_sent:1;
};
struct auth_worker_list_context {
struct auth_worker_request *request;
unsigned int id_counter;
- unsigned int received_error:1;
- unsigned int restart:1;
- unsigned int shutdown:1;
- unsigned int timeout_pending_resume:1;
- unsigned int resuming:1;
+ bool received_error:1;
+ bool restart:1;
+ bool shutdown:1;
+ bool timeout_pending_resume:1;
+ bool resuming:1;
};
static ARRAY(struct auth_worker_connection *) connections = ARRAY_INIT;
unsigned int output_pos, output_len;
int exit_status;
- unsigned int exited:1;
+ bool exited:1;
};
struct db_checkpassword {
HASH_TABLE(char *, struct passwd_file *) files;
struct passwd_file *default_file;
- unsigned int vars:1;
- unsigned int userdb:1;
- unsigned int userdb_warn_missing:1;
- unsigned int debug:1;
+ bool vars:1;
+ bool userdb:1;
+ bool userdb_warn_missing:1;
+ bool debug:1;
};
struct passwd_user *
struct sql_settings set;
struct sql_db *db;
- unsigned int default_password_query:1;
- unsigned int default_user_query:1;
- unsigned int default_update_query:1;
- unsigned int default_iterate_query:1;
- unsigned int userdb_used:1;
+ bool default_password_query:1;
+ bool default_user_query:1;
+ bool default_update_query:1;
+ bool default_iterate_query:1;
+ bool userdb_used:1;
};
struct sql_connection *db_sql_init(const char *config_path, bool userdb);
char *authzid; /* may be NULL, authorization ID */
unsigned char response[32];
unsigned long maxbuf;
- unsigned int nonce_found:1;
+ bool nonce_found:1;
/* final reply: */
char *rspauth;
const char *service_name, *pam_cache_key;
unsigned int requests_left;
- unsigned int pam_setcred:1;
- unsigned int pam_session:1;
- unsigned int failure_show_msg:1;
+ bool pam_setcred:1;
+ bool pam_session:1;
+ bool failure_show_msg:1;
};
struct pam_conv_context {
struct userdb_template *tmpl;
unsigned int fast_count, slow_count;
- unsigned int slow_warned:1;
+ bool slow_warned:1;
};
struct passwd_userdb_iterate_context {
struct sql_userdb_iterate_context {
struct userdb_iterate_context ctx;
struct sql_result *result;
- unsigned int freed:1;
- unsigned int call_iter:1;
+ bool freed:1;
+ bool call_iter:1;
};
static void userdb_sql_iterate_next(struct userdb_iterate_context *_ctx);
struct userdb_module module;
struct userdb_template *tmpl;
- unsigned int allow_all_users:1;
+ bool allow_all_users:1;
};
static void static_lookup_real(struct auth_request *auth_request,
struct ostream *output;
struct io *io;
- unsigned int version_received:1;
- unsigned int handshaked:1;
+ bool version_received:1;
+ bool handshaked:1;
};
static struct config_connection *config_connections = NULL;
HASH_TABLE(const char *, const char *) seen_settings;
struct config_filter_context *filter;
- unsigned int expand_values:1;
- unsigned int hide_errors:1;
+ bool expand_values:1;
+ bool hide_errors:1;
};
extern void (*hook_config_parser_begin)(struct config_parser_context *ctx);
ARRAY_TYPE(const_string) errors;
struct config_export_context *export_ctx;
- unsigned int list_prefix_sent:1;
+ bool list_prefix_sent:1;
};
#define LIST_KEY_PREFIX "\001"
ARRAY(struct dict_connection_transaction) transactions;
ARRAY(struct dict_connection_cmd *) cmds;
- unsigned int destroyed:1;
+ bool destroyed:1;
};
struct dict_connection *dict_connection_create(int fd);
/* set during command execution */
const char *cur_cmd, *cur_line;
- unsigned int in:1;
- unsigned int connected:1;
- unsigned int version_received:1;
- unsigned int me_received:1;
- unsigned int handshake_received:1;
- unsigned int ignore_host_events:1;
- unsigned int handshake_sending_hosts:1;
- unsigned int ping_waiting:1;
- unsigned int synced:1;
- unsigned int wrong_host:1;
- unsigned int verifying_left:1;
- unsigned int users_unsorted:1;
- unsigned int done_pending:1;
+ bool in:1;
+ bool connected:1;
+ bool version_received:1;
+ bool me_received:1;
+ bool handshake_received:1;
+ bool ignore_host_events:1;
+ bool handshake_sending_hosts:1;
+ bool ping_waiting:1;
+ bool synced:1;
+ bool wrong_host:1;
+ bool verifying_left:1;
+ bool users_unsorted:1;
+ bool done_pending:1;
};
static void director_connection_disconnected(struct director_connection **conn,
time_t last_network_failure;
time_t last_protocol_failure;
/* we are this director */
- unsigned int self:1;
- unsigned int removed:1;
+ bool self:1;
+ bool removed:1;
};
struct director_host *
/* director ring handshaking is complete.
director can start serving clients. */
- unsigned int ring_handshaked:1;
- unsigned int ring_handshake_warning_sent:1;
- unsigned int ring_synced:1;
- unsigned int sync_frozen:1;
- unsigned int sync_pending:1;
+ bool ring_handshaked:1;
+ bool ring_handshake_warning_sent:1;
+ bool ring_synced:1;
+ bool sync_frozen:1;
+ bool sync_pending:1;
};
extern bool director_debug;
struct ostream *output;
struct director *dir;
- unsigned int handshaked:1;
+ bool handshaked:1;
};
static struct doveadm_connection *doveadm_connections;
struct auth_connection *auth;
struct director *dir;
- unsigned int handshaked:1;
- unsigned int destroyed:1;
+ bool handshaked:1;
+ bool destroyed:1;
};
struct login_host_request {
struct mail_tag *tag;
/* host was recently changed and ring hasn't synced yet since */
- unsigned int desynced:1;
+ bool desynced:1;
};
ARRAY_DEFINE_TYPE(mail_host, struct mail_host *);
/* TRUE, if the user's timestamp was close to being expired and we're
now doing a ring-wide sync for this user to make sure we don't
assign conflicting hosts to it */
- unsigned int weak:1;
+ bool weak:1;
};
/* Create a new directory. Users are dropped if their time gets older
in_port_t local_port, remote_port;
const struct doveadm_settings *set;
- unsigned int handshaked:1;
- unsigned int authenticated:1;
+ bool handshaked:1;
+ bool authenticated:1;
};
struct client_connection *
unsigned int lock_timeout;
- unsigned int lock:1;
- unsigned int purge_remote:1;
- unsigned int sync_visible_namespaces:1;
- unsigned int default_replica_location:1;
- unsigned int oneway:1;
- unsigned int backup:1;
- unsigned int reverse_backup:1;
- unsigned int remote_user_prefix:1;
- unsigned int no_mail_sync:1;
- unsigned int no_mailbox_renames:1;
- unsigned int local_location_from_arg:1;
- unsigned int replicator_notify:1;
- unsigned int exited:1;
+ bool lock:1;
+ bool purge_remote:1;
+ bool sync_visible_namespaces:1;
+ bool default_replica_location:1;
+ bool oneway:1;
+ bool backup:1;
+ bool reverse_backup:1;
+ bool remote_user_prefix:1;
+ bool no_mail_sync:1;
+ bool no_mailbox_renames:1;
+ bool local_location_from_arg:1;
+ bool replicator_notify:1;
+ bool exited:1;
};
static bool legacy_dsync = FALSE;
int queue_fd;
unsigned int max_recent_msgs;
- unsigned int queue:1;
- unsigned int have_wildcards:1;
+ bool queue:1;
+ bool have_wildcards:1;
};
static int cmd_index_box_precache(struct mailbox *box)
struct mailbox_status total_status;
struct mailbox_metadata total_metadata;
- unsigned int total_sum:1;
+ bool total_sum:1;
};
static void status_parse_fields(struct status_cmd_context *ctx,
int exit_code;
/* This command is being called by a remote doveadm client. */
- unsigned int proxying:1;
+ bool proxying:1;
/* We're handling only a single user */
- unsigned int iterate_single_user:1;
+ bool iterate_single_user:1;
/* We're going through all users (not set for wildcard usernames) */
- unsigned int iterate_all_users:1;
+ bool iterate_all_users:1;
/* Running from CLI doveadm (not doveadm-server) */
- unsigned int cli:1;
+ bool cli:1;
};
struct doveadm_mail_cmd {
ARRAY(struct doveadm_print_flow_header) headers;
unsigned int header_idx;
- unsigned int streaming:1;
+ bool streaming:1;
};
static struct doveadm_print_flow_context *ctx;
ARRAY(struct doveadm_print_pager_header) headers;
unsigned int header_idx;
- unsigned int streaming:1;
- unsigned int first_page:1;
+ bool streaming:1;
+ bool first_page:1;
};
static struct doveadm_print_pager_context *ctx;
struct doveadm_print_tab_context {
unsigned int header_idx, header_count;
- unsigned int header_written:1;
+ bool header_written:1;
};
static struct doveadm_print_tab_context ctx;
unsigned int hdr_idx;
unsigned int columns;
- unsigned int lengths_set:1;
+ bool lengths_set:1;
};
static struct doveadm_print_table_context *ctx;
/* [headers_count] */
const char **prev_values, **cur_values;
- unsigned int flip:1;
+ bool flip:1;
};
struct top_context {
unsigned int last_update_idx, user_idx;
unsigned int sort_idx1, sort_idx2;
- unsigned int flip:1;
+ bool flip:1;
};
static struct top_context *sort_ctx = NULL;
enum mail_error mail_error;
- unsigned int master_brain:1;
- unsigned int mail_requests:1;
- unsigned int backup_send:1;
- unsigned int backup_recv:1;
- unsigned int purge:1;
- unsigned int debug:1;
- unsigned int sync_visible_namespaces:1;
- unsigned int no_mail_sync:1;
- unsigned int no_backup_overwrite:1;
- unsigned int no_mail_prefetch:1;
- unsigned int no_mailbox_renames:1;
- unsigned int changes_during_sync:1;
- unsigned int require_full_resync:1;
- unsigned int verbose_proctitle:1;
- unsigned int no_notify:1;
- unsigned int hdr_hash_v2:1;
- unsigned int failed:1;
+ bool master_brain:1;
+ bool mail_requests:1;
+ bool backup_send:1;
+ bool backup_recv:1;
+ bool purge:1;
+ bool debug:1;
+ bool sync_visible_namespaces:1;
+ bool no_mail_sync:1;
+ bool no_backup_overwrite:1;
+ bool no_mail_prefetch:1;
+ bool no_mailbox_renames:1;
+ bool changes_during_sync:1;
+ bool require_full_resync:1;
+ bool verbose_proctitle:1;
+ bool no_notify:1;
+ bool hdr_hash_v2:1;
+ bool failed:1;
};
extern const char *dsync_box_state_names[DSYNC_BOX_STATE_DONE+1];
io_callback_t *io_callback;
void *io_context;
- unsigned int failed:1;
- unsigned int timeout:1;
+ bool failed:1;
+ bool timeout:1;
};
#endif
char value_output_last;
enum item_type last_recv_item, last_sent_item;
- unsigned int last_recv_item_eol:1;
- unsigned int last_sent_item_eol:1;
-
- unsigned int version_received:1;
- unsigned int handshake_received:1;
- unsigned int has_pending_data:1;
- unsigned int finish_received:1;
- unsigned int done_received:1;
- unsigned int stopped:1;
+ bool last_recv_item_eol:1;
+ bool last_sent_item_eol:1;
+
+ bool version_received:1;
+ bool handshake_received:1;
+ bool has_pending_data:1;
+ bool finish_received:1;
+ bool done_received:1;
+ bool stopped:1;
};
static const char *dsync_ibc_stream_get_state(struct dsync_ibc_stream *ibc)
const char *error;
enum mail_error mail_error;
- unsigned int body_search_initialized:1;
- unsigned int auto_export_mails:1;
- unsigned int mails_have_guids:1;
- unsigned int minimal_dmail_fill:1;
- unsigned int return_all_mails:1;
- unsigned int export_received_timestamps:1;
- unsigned int no_hdr_hashes:1;
+ bool body_search_initialized:1;
+ bool auto_export_mails:1;
+ bool mails_have_guids:1;
+ bool minimal_dmail_fill:1;
+ bool return_all_mails:1;
+ bool export_received_timestamps:1;
+ bool no_hdr_hashes:1;
};
static int dsync_mail_error(struct dsync_mailbox_exporter *exporter,
/* UID for the mail in the virtual \All mailbox */
uint32_t virtual_all_uid;
- unsigned int uid_in_local:1;
- unsigned int uid_is_usable:1;
- unsigned int skip:1;
- unsigned int expunged:1;
- unsigned int copy_failed:1;
+ bool uid_in_local:1;
+ bool uid_is_usable:1;
+ bool skip:1;
+ bool expunged:1;
+ bool copy_failed:1;
};
/* for quickly testing that two-way sync doesn't actually do any unexpected
enum mail_error mail_error;
- unsigned int failed:1;
- unsigned int require_full_resync:1;
- unsigned int debug:1;
- unsigned int stateful_import:1;
- unsigned int last_common_uid_found:1;
- unsigned int cur_uid_has_change:1;
- unsigned int cur_mail_skip:1;
- unsigned int local_expunged_guids_set:1;
- unsigned int new_uids_assigned:1;
- unsigned int want_mail_requests:1;
- unsigned int master_brain:1;
- unsigned int revert_local_changes:1;
- unsigned int mails_have_guids:1;
- unsigned int mails_use_guid128:1;
- unsigned int delete_mailbox:1;
+ bool failed:1;
+ bool require_full_resync:1;
+ bool debug:1;
+ bool stateful_import:1;
+ bool last_common_uid_found:1;
+ bool cur_uid_has_change:1;
+ bool cur_mail_skip:1;
+ bool local_expunged_guids_set:1;
+ bool new_uids_assigned:1;
+ bool want_mail_requests:1;
+ bool master_brain:1;
+ bool revert_local_changes:1;
+ bool mails_have_guids:1;
+ bool mails_use_guid128:1;
+ bool delete_mailbox:1;
};
static const char *dsync_mail_change_type_names[] = {
/* last time the subscription state was changed, 0 if not known */
time_t last_subscription_change;
/* is this mailbox or directory subscribed? */
- unsigned int subscribed:1;
+ bool subscribed:1;
/* Internal syncing flags: */
- unsigned int sync_delayed_guid_change:1;
- unsigned int sync_temporary_name:1;
+ bool sync_delayed_guid_change:1;
+ bool sync_temporary_name:1;
};
ARRAY_DEFINE_TYPE(dsync_mailbox_node, struct dsync_mailbox_node *);
enum server_reply_state state;
- unsigned int handshaked:1;
- unsigned int authenticated:1;
- unsigned int streaming:1;
+ bool handshaked:1;
+ bool authenticated:1;
+ bool streaming:1;
};
static struct server_connection *printing_conn = NULL;
const char *cmd_tag, *cmd_name;
struct imap_client_cmd_id *cmd_id;
- unsigned int cmd_finished:1;
- unsigned int proxy_sasl_ir:1;
- unsigned int proxy_logindisabled:1;
- unsigned int proxy_seen_banner:1;
- unsigned int skip_line:1;
- unsigned int id_logged:1;
- unsigned int proxy_capability_request_sent:1;
- unsigned int client_ignores_capability_resp_code:1;
- unsigned int auth_mech_name_parsed:1;
+ bool cmd_finished:1;
+ bool proxy_sasl_ir:1;
+ bool proxy_logindisabled:1;
+ bool proxy_seen_banner:1;
+ bool skip_line:1;
+ bool id_logged:1;
+ bool proxy_capability_request_sent:1;
+ bool client_ignores_capability_resp_code:1;
+ bool auth_mech_name_parsed:1;
};
bool client_skip_line(struct imap_client *client);
enum imap_urlauth_worker_state worker_state;
- unsigned int disconnected:1;
+ bool disconnected:1;
};
extern struct client *imap_urlauth_clients;
const struct imap_urlauth_login_settings *set;
- unsigned int version_received:1;
+ bool version_received:1;
};
static void
const struct imap_urlauth_worker_settings *set;
const struct mail_storage_settings *mail_set;
- unsigned int debug:1;
- unsigned int finished:1;
- unsigned int waiting_input:1;
- unsigned int version_received:1;
- unsigned int access_received:1;
- unsigned int access_anonymous:1;
+ bool debug:1;
+ bool finished:1;
+ bool waiting_input:1;
+ bool version_received:1;
+ bool access_received:1;
+ bool access_anonymous:1;
};
static bool verbose_proctitle = FALSE;
struct mail_save_context *save_ctx;
unsigned int count;
- unsigned int message_input:1;
- unsigned int binary_input:1;
- unsigned int catenate:1;
- unsigned int failed:1;
+ bool message_input:1;
+ bool binary_input:1;
+ bool catenate:1;
+ bool failed:1;
};
static void cmd_append_finish(struct cmd_append_context *ctx);
struct imap_sync_context *sync_ctx;
struct timeout *keepalive_to, *to_hibernate;
- unsigned int manual_cork:1;
- unsigned int sync_pending:1;
+ bool manual_cork:1;
+ bool sync_pending:1;
};
static void idle_add_keepalive_timeout(struct cmd_idle_context *ctx);
struct mailbox_list_iterate_context *list_iter;
- unsigned int lsub:1;
- unsigned int lsub_no_unsubscribed:1;
- unsigned int used_listext:1;
- unsigned int used_status:1;
+ bool lsub:1;
+ bool lsub_no_unsubscribed:1;
+ bool used_listext:1;
+ bool used_status:1;
};
static void
ARRAY_TYPE(uint32_t) qresync_sample_seqset;
ARRAY_TYPE(uint32_t) qresync_sample_uidset;
- unsigned int condstore:1;
+ bool condstore:1;
};
static int select_qresync_get_uids(struct imap_select_context *ctx,
struct imap_urlauth_fetch *ufetch;
struct istream *input;
- unsigned int failed:1;
- unsigned int finished:1;
- unsigned int extended:1;
- unsigned int in_io_handler:1;
+ bool failed:1;
+ bool finished:1;
+ bool extended:1;
+ bool in_io_handler:1;
};
struct cmd_urlfetch_url {
struct client_sync_context *sync;
- unsigned int uid:1; /* used UID command */
- unsigned int cancel:1; /* command is wanted to be cancelled */
- unsigned int param_error:1;
- unsigned int search_save_result:1; /* search result is being updated */
- unsigned int search_save_result_used:1; /* command uses search save */
- unsigned int temp_executed:1; /* temporary execution state tracking */
- unsigned int tagline_sent:1;
- unsigned int executing:1;
+ bool uid:1; /* used UID command */
+ bool cancel:1; /* command is wanted to be cancelled */
+ bool param_error:1;
+ bool search_save_result:1; /* search result is being updated */
+ bool search_save_result_used:1; /* command uses search save */
+ bool temp_executed:1; /* temporary execution state tracking */
+ bool tagline_sent:1;
+ bool executing:1;
};
struct imap_client_vfuncs {
/* syncing marks this TRUE when it sees \Deleted flags. this is by
EXPUNGE for Outlook-workaround. */
- unsigned int sync_seen_deletes:1;
- unsigned int disconnected:1;
- unsigned int destroyed:1;
- unsigned int handling_input:1;
- unsigned int syncing:1;
- unsigned int id_logged:1;
- unsigned int mailbox_examined:1;
- unsigned int anvil_sent:1;
- unsigned int tls_compression:1;
- unsigned int input_skip_line:1; /* skip all the data until we've
+ bool sync_seen_deletes:1;
+ bool disconnected:1;
+ bool destroyed:1;
+ bool handling_input:1;
+ bool syncing:1;
+ bool id_logged:1;
+ bool mailbox_examined:1;
+ bool anvil_sent:1;
+ bool tls_compression:1;
+ bool input_skip_line:1; /* skip all the data until we've
found a new line */
- unsigned int modseqs_sent_since_sync:1;
- unsigned int notify_immediate_expunges:1;
- unsigned int notify_count_changes:1;
- unsigned int notify_flag_changes:1;
- unsigned int imap_metadata_enabled:1;
- unsigned int nonpermanent_modseqs:1;
- unsigned int state_import_bad_idle_done:1;
- unsigned int state_import_idle_continue:1;
+ bool modseqs_sent_since_sync:1;
+ bool notify_immediate_expunges:1;
+ bool notify_count_changes:1;
+ bool notify_flag_changes:1;
+ bool imap_metadata_enabled:1;
+ bool nonpermanent_modseqs:1;
+ bool state_import_bad_idle_done:1;
+ bool state_import_idle_continue:1;
};
struct imap_module_register {
const char *section; /* NOTE: always uppercased */
struct imap_msgpart *msgpart;
- unsigned int partial:1;
- unsigned int binary:1;
- unsigned int binary_size:1;
+ bool partial:1;
+ bool binary:1;
+ bool binary_size:1;
};
static void fetch_read_error(struct imap_fetch_context *ctx,
const char *name;
const char *nil_reply;
- unsigned int buffered:1;
- unsigned int want_deinit:1;
+ bool buffered:1;
+ bool want_deinit:1;
};
struct imap_fetch_qresync_args {
int (*cont_handler)(struct imap_fetch_context *ctx);
uint64_t *cur_stats_sizep;
- unsigned int fetching:1;
- unsigned int seen_flags_changed:1;
- unsigned int cur_first:1;
- unsigned int cur_flushed:1;
- unsigned int line_partial:1;
- unsigned int line_finished:1;
- unsigned int skipped_expunged_msgs:1;
- unsigned int failed:1;
+ bool fetching:1;
+ bool seen_flags_changed:1;
+ bool cur_first:1;
+ bool cur_flushed:1;
+ bool line_partial:1;
+ bool line_finished:1;
+ bool skipped_expunged_msgs:1;
+ bool failed:1;
};
struct imap_fetch_context {
struct imap_fetch_state state;
- unsigned int initialized:1;
- unsigned int flags_have_handler:1;
- unsigned int flags_update_seen:1;
- unsigned int flags_show_only_seen_changes:1;
+ bool initialized:1;
+ bool flags_have_handler:1;
+ bool flags_update_seen:1;
+ bool flags_show_only_seen_changes:1;
};
void imap_fetch_handlers_register(const struct imap_fetch_handler *handlers,
struct imap_fetch_context *fetch_ctx;
struct timeout *to_watch;
- unsigned int have_subscriptions:1;
- unsigned int selected_set:1;
- unsigned int selected_immediate_expunges:1;
- unsigned int send_immediate_status:1;
- unsigned int watching_mailbox:1;
- unsigned int notifying:1;
+ bool have_subscriptions:1;
+ bool selected_set:1;
+ bool selected_immediate_expunges:1;
+ bool send_immediate_status:1;
+ bool watching_mailbox:1;
+ bool notifying:1;
};
bool imap_notify_match_mailbox(struct imap_notify_namespace *notify_ns,
uint64_t highest_seen_modseq;
- unsigned int have_seqsets:1;
- unsigned int have_modseqs:1;
- unsigned int sorting:1;
+ bool have_seqsets:1;
+ bool have_modseqs:1;
+ bool sorting:1;
};
int cmd_search_parse_return_if_found(struct imap_search_context *ctx,
unsigned int messages_count;
- unsigned int failed:1;
- unsigned int finished:1;
- unsigned int no_newmail:1;
- unsigned int have_new_mails:1;
- unsigned int search_update_notifying:1;
+ bool failed:1;
+ bool finished:1;
+ bool no_newmail:1;
+ bool have_new_mails:1;
+ bool search_update_notifying:1;
};
static void uids_to_seqs(struct mailbox *box, ARRAY_TYPE(seq_range) *uids)
struct ostream *output;
struct io *io;
- unsigned int version_received:1;
- unsigned int handshaked:1;
- unsigned int destroyed:1;
+ bool version_received:1;
+ bool handshaked:1;
+ bool destroyed:1;
};
struct indexer_client_request {
unsigned int max_recent_msgs;
/* index messages in this mailbox */
- unsigned int index:1;
+ bool index:1;
/* optimize this mailbox */
- unsigned int optimize:1;
+ bool optimize:1;
/* currently indexing this mailbox */
- unsigned int working:1;
+ bool working:1;
/* after indexing is finished, add this request back to the queue and
reindex it (i.e. a new indexing request came while we were
working.) */
- unsigned int reindex_head:1;
- unsigned int reindex_tail:1;
+ bool reindex_head:1;
+ bool reindex_tail:1;
/* when working finished, call this number of contexts and leave the
rest to the reindexing. */
struct istream *input;
struct ostream *output;
- unsigned int version_received:1;
+ bool version_received:1;
};
static void ATTR_NULL(1, 2)
struct aqueue *request_queue;
unsigned int process_limit;
- unsigned int version_received:1;
+ bool version_received:1;
};
struct worker_connection *
/* running commands */
ARRAY(struct ipc_connection_cmd *) cmds;
- unsigned int version_received:1;
- unsigned int handshake_received:1;
+ bool version_received:1;
+ bool handshake_received:1;
};
struct ipc_connection *ipc_connection_create(int listen_fd, int fd);
unsigned int request_id_counter;
- unsigned int debug:1;
+ bool debug:1;
};
#endif
void *context);
void *reply_context;
- unsigned int sent_handshake:1;
- unsigned int handshaked:1;
- unsigned int aborted:1;
+ bool sent_handshake:1;
+ bool handshaked:1;
+ bool aborted:1;
};
struct auth_master_lookup_ctx {
gid_t gid;
const char *home, *chroot;
ARRAY_TYPE(const_string) extra_fields;
- unsigned int anonymous:1;
+ bool anonymous:1;
};
struct auth_master_connection *
/* id => request */
HASH_TABLE(void *, struct auth_client_request *) requests;
- unsigned int version_received:1;
- unsigned int handshake_received:1;
- unsigned int has_plain_mech:1;
+ bool version_received:1;
+ bool handshake_received:1;
+ bool has_plain_mech:1;
};
struct auth_server_connection *
size_t high_pos;
struct stat last_parent_statbuf;
- unsigned int log_errors:1;
- unsigned int marked:1;
- unsigned int zs_closed:1;
+ bool log_errors:1;
+ bool marked:1;
+ bool zs_closed:1;
};
static void i_stream_bzlib_close(struct iostream_private *stream,
buffer_t *chunk_buf;
uint32_t chunk_size, chunk_left, max_uncompressed_chunk_size;
- unsigned int log_errors:1;
- unsigned int marked:1;
- unsigned int header_read:1;
+ bool log_errors:1;
+ bool marked:1;
+ bool header_read:1;
};
static void i_stream_lz4_close(struct iostream_private *stream,
size_t high_pos;
struct stat last_parent_statbuf;
- unsigned int log_errors:1;
- unsigned int marked:1;
- unsigned int strm_closed:1;
+ bool log_errors:1;
+ bool marked:1;
+ bool strm_closed:1;
};
static void i_stream_lzma_close(struct iostream_private *stream,
uint32_t crc32;
struct stat last_parent_statbuf;
- unsigned int gz:1;
- unsigned int log_errors:1;
- unsigned int marked:1;
- unsigned int header_read:1;
- unsigned int trailer_read:1;
- unsigned int zs_closed:1;
+ bool gz:1;
+ bool log_errors:1;
+ bool marked:1;
+ bool header_read:1;
+ bool trailer_read:1;
+ bool zs_closed:1;
};
static void i_stream_zlib_init(struct zlib_istream *zstream);
char outbuf[CHUNK_SIZE];
unsigned int outbuf_offset, outbuf_used;
- unsigned int flushed:1;
+ bool flushed:1;
};
static void o_stream_bzlib_close(struct iostream_private *stream,
unsigned char outbuf[CHUNK_SIZE];
unsigned int outbuf_offset, outbuf_used;
- unsigned int flushed:1;
+ bool flushed:1;
};
static void o_stream_lzma_close(struct iostream_private *stream,
uint32_t crc, bytes32;
- unsigned int gz:1;
- unsigned int header_sent:1;
- unsigned int flushed:1;
+ bool gz:1;
+ bool header_sent:1;
+ bool flushed:1;
};
static void o_stream_zlib_close(struct iostream_private *stream,
unsigned int async_commits;
unsigned int iter_replies_skip;
- unsigned int in_iteration:1;
- unsigned int handshaked:1;
+ bool in_iteration:1;
+ bool handshaked:1;
};
struct client_dict_iterate_context {
unsigned int id;
unsigned int connect_counter;
- unsigned int sent_begin:1;
- unsigned int async:1;
- unsigned int committed:1;
+ bool sent_begin:1;
+ bool async:1;
+ bool committed:1;
};
static int client_dict_connect(struct client_dict *dict, const char **error_r);
dict_iterate_callback_t *async_callback;
void *async_context;
- unsigned int has_more:1;
+ bool has_more:1;
};
struct dict_transaction_context {
struct dict *dict;
- unsigned int changed:1;
+ bool changed:1;
};
extern struct dict dict_driver_client;
const char *username;
const struct dict_sql_settings *set;
- unsigned int has_on_duplicate_key:1;
+ bool has_on_duplicate_key:1;
};
struct sql_dict_iterate_context {
struct timeval timing_start[FS_OP_COUNT];
- unsigned int write_pending:1;
- unsigned int writing_stream:1;
- unsigned int metadata_changed:1;
-
- unsigned int read_or_prefetch_counted:1;
- unsigned int lookup_metadata_counted:1;
- unsigned int stat_counted:1;
- unsigned int istream_open:1;
+ bool write_pending:1;
+ bool writing_stream:1;
+ bool metadata_changed:1;
+
+ bool read_or_prefetch_counted:1;
+ bool lookup_metadata_counted:1;
+ bool stat_counted:1;
+ bool istream_open:1;
};
struct fs_lock {
enum http_request_state state;
- unsigned int have_hdr_authorization:1;
- unsigned int have_hdr_body_spec:1;
- unsigned int have_hdr_connection:1;
- unsigned int have_hdr_date:1;
- unsigned int have_hdr_expect:1;
- unsigned int have_hdr_host:1;
- unsigned int have_hdr_user_agent:1;
-
- unsigned int payload_sync:1;
- unsigned int payload_sync_continue:1;
- unsigned int payload_chunked:1;
- unsigned int payload_wait:1;
- unsigned int urgent:1;
- unsigned int submitted:1;
- unsigned int listed:1;
- unsigned int connect_tunnel:1;
- unsigned int connect_direct:1;
- unsigned int ssl_tunnel:1;
- unsigned int preserve_exact_reason:1;
+ bool have_hdr_authorization:1;
+ bool have_hdr_body_spec:1;
+ bool have_hdr_connection:1;
+ bool have_hdr_date:1;
+ bool have_hdr_expect:1;
+ bool have_hdr_host:1;
+ bool have_hdr_user_agent:1;
+
+ bool payload_sync:1;
+ bool payload_sync_continue:1;
+ bool payload_chunked:1;
+ bool payload_wait:1;
+ bool urgent:1;
+ bool submitted:1;
+ bool listed:1;
+ bool connect_tunnel:1;
+ bool connect_direct:1;
+ bool ssl_tunnel:1;
+ bool preserve_exact_reason:1;
};
struct http_client_connection {
/* requests that have been sent, waiting for response */
ARRAY_TYPE(http_client_request) request_wait_list;
- unsigned int connected:1; /* connection is connected */
- unsigned int tunneling:1; /* last sent request turns this
+ bool connected:1; /* connection is connected */
+ bool tunneling:1; /* last sent request turns this
connection into tunnel */
- unsigned int connect_initialized:1; /* connection was initialized */
- unsigned int connect_succeeded:1;
- unsigned int closing:1;
- unsigned int disconnected:1;
- unsigned int close_indicated:1;
- unsigned int output_locked:1; /* output is locked; no pipelining */
- unsigned int output_broken:1; /* output is broken; no more requests */
- unsigned int in_req_callback:1; /* performin request callback (busy) */
+ bool connect_initialized:1; /* connection was initialized */
+ bool connect_succeeded:1;
+ bool closing:1;
+ bool disconnected:1;
+ bool close_indicated:1;
+ bool output_locked:1; /* output is locked; no pipelining */
+ bool output_broken:1; /* output is broken; no more requests */
+ bool in_req_callback:1; /* performin request callback (busy) */
};
struct http_client_peer {
struct timeout *to_backoff;
unsigned int backoff_time_msecs;
- unsigned int disconnected:1; /* peer is already disconnected */
- unsigned int no_payload_sync:1; /* expect: 100-continue failed before */
- unsigned int seen_100_response:1;/* expect: 100-continue succeeded before */
- unsigned int allows_pipelining:1;/* peer is known to allow persistent
+ bool disconnected:1; /* peer is already disconnected */
+ bool no_payload_sync:1; /* expect: 100-continue failed before */
+ bool seen_100_response:1;/* expect: 100-continue succeeded before */
+ bool allows_pipelining:1;/* peer is known to allow persistent
connections */
- unsigned int handling_requests:1;/* currently running request handler */
+ bool handling_requests:1;/* currently running request handler */
};
struct http_client_queue {
/* active DNS lookup */
struct dns_lookup *dns_lookup;
- unsigned int unix_local:1;
+ bool unix_local:1;
};
struct http_client {
enum http_header_parse_state state;
- unsigned int lenient:1;
+ bool lenient:1;
};
struct http_header_parser *
ARRAY_TYPE(http_transfer_coding) transfer_encoding;
ARRAY_TYPE(const_string) connection_options;
- unsigned int connection_close:1;
- unsigned int have_content_length:1;
+ bool connection_close:1;
+ bool have_content_length:1;
};
struct http_message_parser {
pool_t msg_pool;
struct http_message msg;
- unsigned int lenient:1;
+ bool lenient:1;
};
void http_message_parser_init(struct http_message_parser *parser,
const char *request_method;
const char *request_target;
- unsigned int skipping_line:1;
+ bool skipping_line:1;
};
struct http_request_parser *
ARRAY_TYPE(const_string) connection_options;
- unsigned int connection_close:1;
- unsigned int expect_100_continue:1;
+ bool connection_close:1;
+ bool expect_100_continue:1;
};
static inline bool
ARRAY_TYPE(const_string) connection_options;
- unsigned int connection_close:1;
+ bool connection_close:1;
};
void
http_server_tunnel_callback_t tunnel_callback;
void *tunnel_context;
- unsigned int have_hdr_connection:1;
- unsigned int have_hdr_date:1;
- unsigned int have_hdr_body_spec:1;
-
- unsigned int payload_chunked:1;
- unsigned int payload_blocking:1;
- unsigned int payload_direct:1;
- unsigned int payload_corked:1;
- unsigned int close:1;
- unsigned int submitted:1;
+ bool have_hdr_connection:1;
+ bool have_hdr_date:1;
+ bool have_hdr_body_spec:1;
+
+ bool payload_chunked:1;
+ bool payload_blocking:1;
+ bool payload_direct:1;
+ bool payload_corked:1;
+ bool close:1;
+ bool submitted:1;
};
struct http_server_request {
void (*destroy_callback)(void *);
void *destroy_context;
- unsigned int payload_halted:1;
- unsigned int sent_100_continue:1;
- unsigned int delay_destroy:1;
- unsigned int destroy_pending:1;
- unsigned int failed:1;
+ bool payload_halted:1;
+ bool sent_100_continue:1;
+ bool delay_destroy:1;
+ bool destroy_pending:1;
+ bool failed:1;
};
struct http_server_connection {
struct http_server_stats stats;
- unsigned int ssl:1;
- unsigned int closed:1;
- unsigned int close_indicated:1;
- unsigned int input_broken:1;
- unsigned int output_locked:1;
- unsigned int in_req_callback:1; /* performing request callback (busy) */
- unsigned int switching_ioloop:1; /* in the middle of switching ioloop */
+ bool ssl:1;
+ bool closed:1;
+ bool close_indicated:1;
+ bool input_broken:1;
+ bool output_locked:1;
+ bool in_req_callback:1; /* performing request callback (busy) */
+ bool switching_ioloop:1; /* in the middle of switching ioloop */
};
struct http_server {
struct connection_list *conn_list;
- unsigned int shutting_down:1; /* shutting down server */
+ bool shutting_down:1; /* shutting down server */
};
static inline const char *
struct http_header_parser *header_parser;
- unsigned int finished:1;
+ bool finished:1;
};
/* Chunk parser */
size_t chunk_size, chunk_pos;
- unsigned int chunk_active:1;
+ bool chunk_active:1;
};
static size_t _log16(size_t in)
enum http_request_target_format req_format;
- unsigned int relative:1;
- unsigned int request_target:1;
+ bool relative:1;
+ bool request_target:1;
};
static bool http_url_parse_authority(struct http_url_parser *url_parser)
/* #fragment (still encoded) */
const char *enc_fragment;
- unsigned int have_ssl:1;
+ bool have_ssl:1;
};
/*
void *context;
/* This is the AUTHENTICATE command */
- unsigned int authenticate:1;
+ bool authenticate:1;
/* This is the IDLE command */
- unsigned int idle:1;
+ bool idle:1;
/* Waiting for '+' literal reply before we can continue */
- unsigned int wait_for_literal:1;
+ bool wait_for_literal:1;
};
ARRAY_DEFINE_TYPE(imapc_command, struct imapc_command *);
struct timeval throttle_end_timeval;
struct timeout *to_throttle, *to_throttle_shrink;
- unsigned int reconnecting:1;
- unsigned int idling:1;
- unsigned int idle_stopping:1;
- unsigned int idle_plus_waiting:1;
+ bool reconnecting:1;
+ bool idling:1;
+ bool idle_stopping:1;
+ bool idle_plus_waiting:1;
};
static void imapc_connection_capability_cb(const struct imapc_command_reply *reply,
enum mail_error error;
char *error_string;
- unsigned int server:1;
+ bool server:1;
};
bool imap_metadata_verify_entry_name(const char *name, const char **error_r)
struct imap_msgpart_open_result result;
- unsigned int decode_cte_to_binary:1;
+ bool decode_cte_to_binary:1;
};
int imap_msgpart_url_create(struct mail_user *user, const struct imap_url *url,
/* which part of the message part to fetch (default: 0..(uoff_t)-1) */
uoff_t partial_offset, partial_size;
- unsigned int decode_cte_to_binary:1;
+ bool decode_cte_to_binary:1;
};
struct imap_msgpart_open_ctx {
/* userid => target struct */
struct imap_urlauth_target *targets_head, *targets_tail;
- unsigned int reading_literal:1;
+ bool reading_literal:1;
};
#define IMAP_URLAUTH_RECONNECT_MIN_SECS 2
char *bodypartstruct;
char *error;
- unsigned int succeeded:1;
- unsigned int binary_has_nuls:1;
+ bool succeeded:1;
+ bool binary_has_nuls:1;
} pending_reply;
- unsigned int failed:1;
- unsigned int waiting_local:1;
- unsigned int waiting_service:1;
+ bool failed:1;
+ bool waiting_local:1;
+ bool waiting_service:1;
};
static void imap_urlauth_fetch_abort_local(struct imap_urlauth_fetch *ufetch)
const char *bodypartstruct;
const char *error;
- unsigned int succeeded:1;
- unsigned int binary_has_nuls:1;
+ bool succeeded:1;
+ bool binary_has_nuls:1;
};
/* Callback to handle fetch reply. Returns 1 if handled completely and ready
char *access_user;
const char **access_applications;
- unsigned int access_anonymous:1;
+ bool access_anonymous:1;
};
#endif
uoff_t literal_size;
ARRAY_TYPE(imap_arg_list) list;
} _data;
- unsigned int literal8:1; /* BINARY literal8 used */
+ bool literal8:1; /* BINARY literal8 used */
};
/* RFC 3501's astring type. Note that this doesn't return TRUE for
enum imap_parser_error error;
const char *error_msg;
- unsigned int literal_minus:1;
- unsigned int literal_skip_crlf:1;
- unsigned int literal_nonsync:1;
- unsigned int literal8:1;
- unsigned int literal_size_return:1;
- unsigned int eol:1;
- unsigned int args_added_extra_eol:1;
- unsigned int fatal_error:1;
+ bool literal_minus:1;
+ bool literal_skip_crlf:1;
+ bool literal_nonsync:1;
+ bool literal8:1;
+ bool literal_size_return:1;
+ bool eol:1;
+ bool args_added_extra_eol:1;
+ bool fatal_error:1;
};
struct imap_parser *
struct imap_url *url;
const struct imap_url *base;
- unsigned int relative:1;
+ bool relative:1;
};
static int
size_t uauth_token_size;
time_t uauth_expire; /* (time_t)-1 if not set */
- unsigned int have_partial:1;
+ bool have_partial:1;
};
/*
uint32_t uid_highwater;
/* Unused fields aren't written to cache file */
- unsigned int used:1;
- unsigned int adding:1;
- unsigned int decision_dirty:1;
+ bool used:1;
+ bool adding:1;
+ bool decision_dirty:1;
};
struct mail_cache {
unsigned int *file_field_map;
unsigned int file_fields_count;
- unsigned int opened:1;
- unsigned int locked:1;
- unsigned int last_lock_failed:1;
- unsigned int hdr_modified:1;
- unsigned int field_header_write_pending:1;
- unsigned int compressing:1;
- unsigned int map_with_read:1;
+ bool opened:1;
+ bool locked:1;
+ bool last_lock_failed:1;
+ bool hdr_modified:1;
+ bool field_header_write_pending:1;
+ bool compressing:1;
+ bool map_with_read:1;
};
struct mail_cache_loop_track {
uint8_t cached_exists_value;
uint32_t cached_exists_seq;
- unsigned int no_decision_updates:1;
+ bool no_decision_updates:1;
};
struct mail_cache_iterate_field {
unsigned int trans_next_idx;
- unsigned int stop:1;
- unsigned int failed:1;
- unsigned int memory_appends_checked:1;
- unsigned int disk_appends_checked:1;
+ bool stop:1;
+ bool failed:1;
+ bool memory_appends_checked:1;
+ bool disk_appends_checked:1;
};
/* Explicitly lock the cache file. Returns -1 if error / timed out,
unsigned int records_written;
- unsigned int tried_compression:1;
- unsigned int changes:1;
+ bool tried_compression:1;
+ bool changes:1;
};
static MODULE_CONTEXT_DEFINE_INIT(cache_mail_index_transaction_module,
mail_index_expunge_handler_t *expunge_handler;
void *expunge_context;
- unsigned int expunge_handler_call_always:1;
+ bool expunge_handler_call_always:1;
};
struct mail_index_record_map {
ARRAY(union mail_index_module_context *) module_contexts;
char *error;
- unsigned int nodiskspace:1;
- unsigned int index_lock_timeout:1;
-
- unsigned int index_delete_requested:1; /* next sync sets it deleted */
- unsigned int index_deleted:1; /* no changes allowed anymore */
- unsigned int log_sync_locked:1;
- unsigned int readonly:1;
- unsigned int mapping:1;
- unsigned int syncing:1;
- unsigned int need_recreate:1;
- unsigned int index_min_write:1;
- unsigned int modseqs_enabled:1;
- unsigned int initial_create:1;
- unsigned int initial_mapped:1;
- unsigned int fscked:1;
+ bool nodiskspace:1;
+ bool index_lock_timeout:1;
+
+ bool index_delete_requested:1; /* next sync sets it deleted */
+ bool index_deleted:1; /* no changes allowed anymore */
+ bool log_sync_locked:1;
+ bool readonly:1;
+ bool mapping:1;
+ bool syncing:1;
+ bool need_recreate:1;
+ bool index_min_write:1;
+ bool modseqs_enabled:1;
+ bool initial_create:1;
+ bool initial_mapped:1;
+ bool fscked:1;
};
extern struct mail_index_module_register mail_index_module_register;
uint32_t next_str_idx;
uint32_t lost_expunged_uid;
- unsigned int desynced:1;
+ bool desynced:1;
};
struct mail_index_strmap_read_context {
uint32_t next_ref_index;
unsigned int rec_size;
- unsigned int too_large_uids:1;
+ bool too_large_uids:1;
};
struct mail_index_strmap_view_sync {
const ARRAY_TYPE(uid_range) *array;
unsigned int idx;
unsigned int keyword_idx:31;
- unsigned int keyword_remove:1;
+ bool keyword_remove:1;
};
struct mail_index_expunge_handler {
enum mail_index_sync_handler_type type;
- unsigned int sync_handlers_initialized:1;
- unsigned int expunge_handlers_set:1;
- unsigned int expunge_handlers_used:1;
- unsigned int cur_ext_ignore:1;
- unsigned int internal_update:1; /* used by keywords for ext_intro */
- unsigned int errors:1;
+ bool sync_handlers_initialized:1;
+ bool expunge_handlers_set:1;
+ bool expunge_handlers_used:1;
+ bool cur_ext_ignore:1;
+ bool internal_update:1; /* used by keywords for ext_intro */
+ bool errors:1;
};
extern struct mail_transaction_map_functions mail_index_map_sync_funcs;
ARRAY(struct mail_index_sync_list) sync_list;
uint32_t next_uid;
- unsigned int no_warning:1;
- unsigned int seen_nonexternal_transactions:1;
+ bool no_warning:1;
+ bool seen_nonexternal_transactions:1;
};
static void mail_index_sync_add_expunge(struct mail_index_sync_ctx *ctx)
/* Module-specific contexts. */
ARRAY(union mail_index_transaction_module_context *) module_contexts;
- unsigned int no_appends:1;
-
- unsigned int sync_transaction:1;
- unsigned int appends_nonsorted:1;
- unsigned int expunges_nonsorted:1;
- unsigned int drop_unnecessary_flag_updates:1;
- unsigned int pre_hdr_changed:1;
- unsigned int post_hdr_changed:1;
- unsigned int reset:1;
- unsigned int index_deleted:1;
- unsigned int index_undeleted:1;
- unsigned int commit_deleted_index:1;
- unsigned int tail_offset_changed:1;
+ bool no_appends:1;
+
+ bool sync_transaction:1;
+ bool appends_nonsorted:1;
+ bool expunges_nonsorted:1;
+ bool drop_unnecessary_flag_updates:1;
+ bool pre_hdr_changed:1;
+ bool post_hdr_changed:1;
+ bool reset:1;
+ bool index_deleted:1;
+ bool index_undeleted:1;
+ bool commit_deleted_index:1;
+ bool tail_offset_changed:1;
/* non-extension updates. flag updates don't change this because
they may be added and removed, so be sure to check that the updates
array is non-empty also. */
- unsigned int log_updates:1;
+ bool log_updates:1;
/* extension updates */
- unsigned int log_ext_updates:1;
+ bool log_ext_updates:1;
};
#define MAIL_INDEX_TRANSACTION_HAS_CHANGES(t) \
struct mail_index_transaction *transactions_list;
int transactions;
- unsigned int inconsistent:1;
+ bool inconsistent:1;
/* this view was created by mail_index_sync_begin() */
- unsigned int index_sync_view:1;
+ bool index_sync_view:1;
/* this view is being synced */
- unsigned int syncing:1;
+ bool syncing:1;
};
struct mail_index_view *
unsigned int lost_flag_idx;
size_t data_offset;
- unsigned int failed:1;
- unsigned int sync_map_update:1;
- unsigned int skipped_expunges:1;
- unsigned int last_read:1;
- unsigned int log_was_lost:1;
- unsigned int hidden:1;
+ bool failed:1;
+ bool sync_map_update:1;
+ bool skipped_expunges:1;
+ bool last_read:1;
+ bool log_was_lost:1;
+ bool hidden:1;
};
static int
enum mail_index_view_sync_type type;
/* TRUE if this was a hidden transaction. */
- unsigned int hidden:1;
+ bool hidden:1;
};
struct mail_index_transaction_commit_result {
struct file_lock *file_lock;
time_t lock_created;
- unsigned int locked:1;
- unsigned int locked_sync_offset_updated:1;
- unsigned int corrupted:1;
+ bool locked:1;
+ bool locked_sync_offset_updated:1;
+ bool corrupted:1;
};
struct mail_transaction_log {
unsigned int dotlock_count;
struct dotlock *dotlock;
- unsigned int nfs_flush:1;
- unsigned int log_2_unlink_checked:1;
+ bool nfs_flush:1;
+ bool log_2_unlink_checked:1;
};
void
uoff_t mark_offset, mark_next_offset;
uint64_t mark_modseq;
- unsigned int broken:1;
+ bool broken:1;
};
#endif
unsigned int transaction_count;
/* same as mail_index_transaction->sync_transaction */
- unsigned int index_sync_transaction:1;
+ bool index_sync_transaction:1;
/* same as mail_index_transaction->tail_offset_changed */
- unsigned int tail_offset_changed:1;
- unsigned int sync_includes_this:1;
- unsigned int want_fsync:1;
+ bool tail_offset_changed:1;
+ bool sync_includes_this:1;
+ bool want_fsync:1;
};
#define LOG_IS_BEFORE(seq1, offset1, seq2, offset2) \
int new_fd;
struct dotlock *dotlock;
- unsigned int changed:1;
+ bool changed:1;
};
struct duplicate_context {
struct lmtp_recipient_params params;
- unsigned int data_called:1;
- unsigned int failed:1;
+ bool data_called:1;
+ bool failed:1;
};
struct lmtp_client {
unsigned char output_last;
struct lmtp_client_times times;
- unsigned int running:1;
- unsigned int xclient_sent:1;
- unsigned int rcpt_to_successes:1;
- unsigned int output_finished:1;
- unsigned int finish_called:1;
- unsigned int global_remote_failure:1;
+ bool running:1;
+ bool xclient_sent:1;
+ bool rcpt_to_successes:1;
+ bool output_finished:1;
+ bool finish_called:1;
+ bool global_remote_failure:1;
};
static void lmtp_client_send_rcpts(struct lmtp_client *client);
buffer_t *hdr_buf;
unsigned int cte_header_len;
- unsigned int content_type_seen:1;
+ bool content_type_seen:1;
};
static void stream_add_data(struct binary_converter_istream *bstream,
/* how far in string "\r\n.\r" are we */
unsigned int state;
/* state didn't actually start with \r */
- unsigned int state_no_cr:1;
+ bool state_no_cr:1;
/* state didn't contain \n either (only at the beginnign of stream) */
- unsigned int state_no_lf:1;
+ bool state_no_lf:1;
/* we've seen the "." line, keep returning EOF */
- unsigned int dot_eof:1;
+ bool dot_eof:1;
- unsigned int send_last_lf:1;
+ bool send_last_lf:1;
};
static int i_stream_dot_read_some(struct dot_istream *dstream)
unsigned int cur_line, parsed_lines;
ARRAY(unsigned int) match_change_lines;
- unsigned int header_read:1;
- unsigned int seen_eoh:1;
- unsigned int header_parsed:1;
- unsigned int headers_edited:1;
- unsigned int exclude:1;
- unsigned int crlf:1;
- unsigned int crlf_preserve:1;
- unsigned int hide_body:1;
- unsigned int add_missing_eoh:1;
- unsigned int end_body_with_lf:1;
- unsigned int last_lf_added:1;
- unsigned int last_orig_crlf:1;
- unsigned int last_added_newline:1;
- unsigned int eoh_not_matched:1;
- unsigned int callbacks_called:1;
- unsigned int prev_matched:1;
+ bool header_read:1;
+ bool seen_eoh:1;
+ bool header_parsed:1;
+ bool headers_edited:1;
+ bool exclude:1;
+ bool crlf:1;
+ bool crlf_preserve:1;
+ bool hide_body:1;
+ bool add_missing_eoh:1;
+ bool end_body_with_lf:1;
+ bool last_lf_added:1;
+ bool last_orig_crlf:1;
+ bool last_added_newline:1;
+ bool eoh_not_matched:1;
+ bool callbacks_called:1;
+ bool prev_matched:1;
};
header_filter_callback *null_header_filter_callback = NULL;
char *content_type, *content_charset;
enum message_cte message_cte;
- unsigned int binary_input:1;
+ bool binary_input:1;
};
static void
struct decode_utf8_context {
buffer_t *dest;
normalizer_func_t *normalizer;
- unsigned int changed:1;
+ bool changed:1;
};
static bool
buffer_t *value_buf;
enum message_header_parser_flags flags;
- unsigned int skip_line:1;
- unsigned int has_nuls:1;
+ bool skip_line:1;
+ bool has_nuls:1;
};
struct message_header_parser_ctx *
uoff_t name_offset, full_value_offset;
- unsigned int continues:1; /* multiline header, continues in next line */
- unsigned int continued:1; /* multiline header, continues */
- unsigned int eoh:1; /* "end of headers" line */
- unsigned int no_newline:1; /* no \n after this line */
- unsigned int crlf_newline:1; /* newline was \r\n */
- unsigned int use_full_value:1; /* set if you want full_value */
+ bool continues:1; /* multiline header, continues in next line */
+ bool continued:1; /* multiline header, continues */
+ bool eoh:1; /* "end of headers" line */
+ bool no_newline:1; /* no \n after this line */
+ bool crlf_newline:1; /* newline was \r\n */
+ bool use_full_value:1; /* set if you want full_value */
};
/* called once with hdr = NULL at the end of headers */
const char *boundary;
size_t len;
- unsigned int epilogue_found:1;
+ bool epilogue_found:1;
};
struct message_parser_ctx {
int (*parse_next_block)(struct message_parser_ctx *ctx,
struct message_block *block_r);
- unsigned int part_seen_content_type:1;
- unsigned int multipart:1;
- unsigned int preparsed:1;
- unsigned int eof:1;
+ bool part_seen_content_type:1;
+ bool multipart:1;
+ bool preparsed:1;
+ bool eof:1;
};
message_part_header_callback_t *null_message_part_header_callback = NULL;
struct message_part *prev_part;
struct message_decoder_context *decoder;
- unsigned int content_type_text:1; /* text/any or message/any */
+ bool content_type_text:1; /* text/any or message/any */
};
struct message_search_context *
struct istream *input;
struct ostream *output;
- unsigned int version_received:1;
+ bool version_received:1;
};
static void ipc_server_disconnect(struct ipc_server *server);
ARRAY(struct master_instance) instances;
- unsigned int locked:1;
- unsigned int config_paths_changed:1;
+ bool locked:1;
+ bool config_paths_changed:1;
};
struct master_instance_list_iter {
master_login_auth_request_callback_t *callback;
void *context;
- unsigned int aborted:1;
+ bool aborted:1;
};
struct master_login_auth {
pid_t auth_server_pid;
- unsigned int request_auth_token:1;
- unsigned int version_received:1;
- unsigned int spid_received:1;
+ bool request_auth_token:1;
+ bool version_received:1;
+ bool spid_received:1;
};
static void master_login_auth_set_timeout(struct master_login_auth *auth);
struct io *io;
struct ostream *output;
- unsigned int login_success:1;
+ bool login_success:1;
};
struct master_login_postlogin {
char *postlogin_socket_path;
unsigned int postlogin_timeout_secs;
- unsigned int stopping:1;
+ bool stopping:1;
};
static void master_login_conn_close(struct master_login_connection *conn);
master_login_callback_t *callback;
master_login_failure_callback_t *failure_callback;
- unsigned int request_auth_token:1;
+ bool request_auth_token:1;
};
struct master_login *
struct master_service_haproxy_conn *haproxy_conns;
- unsigned int killed:1;
- unsigned int stopping:1;
- unsigned int keep_environment:1;
- unsigned int log_directly:1;
- unsigned int initial_status_sent:1;
- unsigned int die_with_master:1;
- unsigned int call_avail_overflow:1;
- unsigned int config_path_changed_with_param:1;
- unsigned int want_ssl_settings:1;
- unsigned int ssl_ctx_initialized:1;
- unsigned int config_path_from_master:1;
+ bool killed:1;
+ bool stopping:1;
+ bool keep_environment:1;
+ bool log_directly:1;
+ bool initial_status_sent:1;
+ bool die_with_master:1;
+ bool call_avail_overflow:1;
+ bool config_path_changed_with_param:1;
+ bool want_ssl_settings:1;
+ bool ssl_ctx_initialized:1;
+ bool config_path_from_master:1;
};
void master_service_io_listeners_add(struct master_service *service);
(doesn't count memory used by hash table or global sets) */
size_t cache_malloc_size;
- unsigned int done_initial_lookup:1;
- unsigned int service_uses_local:1;
- unsigned int service_uses_remote:1;
+ bool done_initial_lookup:1;
+ bool service_uses_local:1;
+ bool service_uses_remote:1;
};
struct master_service_settings_cache *
/* some settings for this service (or if service was not given,
all services) contain local/remote ip/host specific settings
(but this lookup didn't necessarily return any of them). */
- unsigned int service_uses_local:1;
- unsigned int service_uses_remote:1;
+ bool service_uses_local:1;
+ bool service_uses_remote:1;
/* returned settings contain settings specific to given
local/remote ip/host */
- unsigned int used_local:1;
- unsigned int used_remote:1;
+ bool used_local:1;
+ bool used_remote:1;
/* Config couldn't be read because we don't have enough permissions.
The process probably should be restarted and the settings read
before dropping privileges. */
- unsigned int permission_denied:1;
+ bool permission_denied:1;
};
extern const struct setting_parser_info master_service_setting_parser_info;
struct ip_addr real_remote_ip, real_local_ip;
in_port_t real_remote_port, real_local_port;
- unsigned int fifo:1;
- unsigned int ssl:1;
+ bool fifo:1;
+ bool ssl:1;
- unsigned int accepted:1;
+ bool accepted:1;
};
typedef void
struct master_settings *master_set;
enum service_type parsed_type;
enum service_user_default user_default;
- unsigned int login_dump_core:1;
+ bool login_dump_core:1;
/* -- flags that can be set internally -- */
/* process_limit must not be higher than 1 */
- unsigned int process_limit_1:1;
+ bool process_limit_1:1;
};
ARRAY_DEFINE_TYPE(service_settings, struct service_settings *);
sql_query_callback_t *callback;
void *context;
- unsigned int query_sent:1;
- unsigned int finished:1;
+ bool query_sent:1;
+ bool finished:1;
};
struct cassandra_transaction_context {
pool_t query_pool;
char *error;
- unsigned int begin_succeeded:1;
- unsigned int begin_failed:1;
- unsigned int failed:1;
+ bool begin_succeeded:1;
+ bool begin_failed:1;
+ bool failed:1;
};
extern const struct sql_db driver_cassandra_db;
MYSQL *mysql;
unsigned int next_query_connection;
- unsigned int ssl_set:1;
+ bool ssl_set:1;
};
struct mysql_result {
pool_t query_pool;
const char *error;
- unsigned int failed:1;
+ bool failed:1;
};
extern const struct sql_db driver_mysql_db;
char *error;
const char *connect_state;
- unsigned int fatal_error:1;
+ bool fatal_error:1;
};
struct pgsql_binary_value {
sql_query_callback_t *callback;
void *context;
- unsigned int timeout:1;
+ bool timeout:1;
};
struct pgsql_transaction_context {
pool_t query_pool;
const char *error;
- unsigned int failed:1;
+ bool failed:1;
};
extern const struct sql_db driver_pgsql_db;
pool_t pool;
const char *dbfile;
sqlite3 *sqlite;
- unsigned int connected:1;
+ bool connected:1;
int rc;
};
struct sqlite_transaction_context {
struct sql_transaction_context ctx;
- unsigned int failed:1;
+ bool failed:1;
};
extern const struct sql_db driver_sqlite_db;
unsigned int connect_failure_count;
struct timeout *to_reconnect;
- unsigned int no_reconnect:1;
+ bool no_reconnect:1;
};
struct sql_result_vfuncs {
void *fetch_dest;
size_t fetch_dest_size;
- unsigned int failed:1;
- unsigned int failed_try_retry:1;
- unsigned int callback:1;
+ bool failed:1;
+ bool failed_try_retry:1;
+ bool callback:1;
};
struct sql_transaction_context {
DH *dh_512, *dh_default;
int username_nid;
- unsigned int client_ctx:1;
+ bool client_ctx:1;
};
struct ssl_iostream {
ssl_iostream_handshake_callback_t *handshake_callback;
void *handshake_context;
- unsigned int handshaked:1;
- unsigned int handshake_failed:1;
- unsigned int cert_received:1;
- unsigned int cert_broken:1;
- unsigned int want_read:1;
- unsigned int input_handler:1;
- unsigned int ostream_flush_waiting_input:1;
- unsigned int closed:1;
+ bool handshaked:1;
+ bool handshake_failed:1;
+ bool cert_received:1;
+ bool cert_broken:1;
+ bool want_read:1;
+ bool input_handler:1;
+ bool ostream_flush_waiting_input:1;
+ bool closed:1;
};
extern int dovecot_ssl_extdata_index;
struct mail *mail;
int fd;
- unsigned int failed:1;
- unsigned int finished:1;
+ bool failed:1;
+ bool finished:1;
};
static char *cydir_generate_tmp_filename(void)
ARRAY(const char *) metadata;
uoff_t metadata_read_offset;
- unsigned int appending:1;
- unsigned int corrupted:1;
+ bool appending:1;
+ bool corrupted:1;
};
struct dbox_file_append_context {
struct ostream *dbox_output;
- unsigned int failed:1;
- unsigned int finished:1;
- unsigned int have_pop3_uidls:1;
- unsigned int have_pop3_orders:1;
+ bool failed:1;
+ bool finished:1;
+ bool have_pop3_uidls:1;
+ bool have_pop3_orders:1;
};
void dbox_save_begin(struct dbox_save_context *ctx, struct istream *input);
struct mailbox_list *root_list;
- unsigned int verify_existing_file_ids:1;
+ bool verify_existing_file_ids:1;
};
struct mdbox_map_append {
unsigned int files_nonappendable_count;
- unsigned int failed:1;
+ bool failed:1;
};
struct mdbox_map_atomic_context {
struct mail_index_sync_ctx *sync_ctx;
struct mail_index_view *sync_view;
- unsigned int map_refreshed:1;
- unsigned int locked:1;
- unsigned int success:1;
- unsigned int failed:1;
+ bool map_refreshed:1;
+ bool locked:1;
+ bool success:1;
+ bool failed:1;
};
int mdbox_map_view_lookup_rec(struct mdbox_map *map,
struct mdbox_map_atomic_context *atomic;
struct mail_index_transaction *trans;
- unsigned int changed:1;
- unsigned int committed:1;
+ bool changed:1;
+ bool committed:1;
};
static int mdbox_map_generate_uid_validity(struct mdbox_map *map);
uint32_t map_uid;
uint16_t refcount;
- unsigned int seen_zero_ref_in_map:1;
+ bool seen_zero_ref_in_map:1;
};
struct rebuild_msg_mailbox {
struct rebuild_msg_mailbox prev_msg;
- unsigned int have_pop3_uidls:1;
- unsigned int have_pop3_orders:1;
+ bool have_pop3_uidls:1;
+ bool have_pop3_orders:1;
};
static struct mdbox_storage_rebuild_context *
has changed from this value) */
uint32_t corrupted_rebuild_count;
- unsigned int corrupted:1;
- unsigned int rebuilding_storage:1;
- unsigned int preallocate_space:1;
+ bool corrupted:1;
+ bool rebuilding_storage:1;
+ bool preallocate_space:1;
};
struct mdbox_mail_index_record {
uint32_t map_uid_validity;
uint32_t ext_id, hdr_ext_id, guid_ext_id;
- unsigned int mdbox_deleted_synced:1;
- unsigned int creating:1;
+ bool mdbox_deleted_synced:1;
+ bool creating:1;
};
extern struct dbox_storage_vfuncs mdbox_dbox_storage_vfuncs;
/* mailboxes/subscriptions are fully refreshed only during
mailbox list iteration. */
- unsigned int refreshed_subscriptions:1;
- unsigned int refreshed_mailboxes:1;
+ bool refreshed_subscriptions:1;
+ bool refreshed_mailboxes:1;
/* mailbox list's "recently refreshed" state is reset by syncing a
mailbox. mainly we use this to cache mailboxes' existence to avoid
issuing a LIST command every time. */
- unsigned int refreshed_mailboxes_recently:1;
- unsigned int index_list_failed:1;
- unsigned int root_sep_pending:1;
- unsigned int root_sep_lookup_failed:1;
+ bool refreshed_mailboxes_recently:1;
+ bool index_list_failed:1;
+ bool root_sep_pending:1;
+ bool root_sep_lookup_failed:1;
};
int imapc_list_get_mailbox_flags(struct mailbox_list *list, const char *name,
ARRAY_TYPE(seq_range) dest_saved_uids;
unsigned int save_count;
- unsigned int failed:1;
- unsigned int finished:1;
+ bool failed:1;
+ bool finished:1;
};
struct imapc_save_cmd_context {
ARRAY(struct imapc_storage_event_callback) untagged_callbacks;
- unsigned int auth_failed:1;
- unsigned int destroying:1;
+ bool auth_failed:1;
+ bool destroying:1;
};
struct imapc_storage {
ARRAY(struct imapc_namespace) remote_namespaces;
- unsigned int namespaces_requested:1;
+ bool namespaces_requested:1;
};
struct imapc_mail_cache {
const char *guid_fetch_field_name;
struct imapc_search_context *search_ctx;
- unsigned int selecting:1;
- unsigned int syncing:1;
- unsigned int initial_sync_done:1;
- unsigned int selected:1;
- unsigned int exists_received:1;
+ bool selecting:1;
+ bool syncing:1;
+ bool initial_sync_done:1;
+ bool selected:1;
+ bool exists_received:1;
};
struct imapc_simple_context {
ARRAY_TYPE(seq_range) expunged_uids;
unsigned int sync_command_count;
- unsigned int failed:1;
+ bool failed:1;
};
struct mailbox_sync_context *
ARRAY_TYPE(keywords) keywords;
ARRAY_TYPE(keyword_indexes) keyword_indexes;
- unsigned int initialized:1;
- unsigned int save_sent_date:1;
- unsigned int sent_date_parsed:1;
- unsigned int save_envelope:1;
- unsigned int save_bodystructure_header:1;
- unsigned int save_bodystructure_body:1;
- unsigned int save_message_parts:1;
- unsigned int save_body_snippet:1;
- unsigned int stream_has_only_header:1;
- unsigned int parsed_bodystructure:1;
- unsigned int hdr_size_set:1;
- unsigned int body_size_set:1;
- unsigned int messageparts_saved_to_cache:1;
- unsigned int header_parsed:1;
- unsigned int no_caching:1;
- unsigned int forced_no_caching:1;
- unsigned int destroying_stream:1;
- unsigned int initialized_wrapper_stream:1;
- unsigned int destroy_callback_set:1;
- unsigned int prefetch_sent:1;
- unsigned int header_parser_initialized:1;
+ bool initialized:1;
+ bool save_sent_date:1;
+ bool sent_date_parsed:1;
+ bool save_envelope:1;
+ bool save_bodystructure_header:1;
+ bool save_bodystructure_body:1;
+ bool save_message_parts:1;
+ bool save_body_snippet:1;
+ bool stream_has_only_header:1;
+ bool parsed_bodystructure:1;
+ bool hdr_size_set:1;
+ bool body_size_set:1;
+ bool messageparts_saved_to_cache:1;
+ bool header_parsed:1;
+ bool no_caching:1;
+ bool forced_no_caching:1;
+ bool destroying_stream:1;
+ bool initialized_wrapper_stream:1;
+ bool destroy_callback_set:1;
+ bool prefetch_sent:1;
+ bool header_parser_initialized:1;
};
struct index_mail {
ARRAY(unsigned int) header_match_lines;
uint8_t header_match_value;
- unsigned int pop3_state_set:1;
+ bool pop3_state_set:1;
/* mail created by mailbox_search_*() */
- unsigned int search_mail:1;
+ bool search_mail:1;
/* close() is being called from mail_free() */
- unsigned int freeing:1;
+ bool freeing:1;
};
struct mail *
struct mail_index *backup_index;
struct mail_index_view *backup_view;
- unsigned int cache_used:1;
+ bool cache_used:1;
};
typedef unsigned int
struct timeval last_nonblock_timeval;
unsigned long long cost, next_time_check_cost;
- unsigned int failed:1;
- unsigned int sorted:1;
- unsigned int have_seqsets:1;
- unsigned int have_index_args:1;
- unsigned int have_mailbox_args:1;
+ bool failed:1;
+ bool sorted:1;
+ bool have_seqsets:1;
+ bool have_index_args:1;
+ bool have_mailbox_args:1;
};
struct mail *index_search_get_mail(struct index_search_context *ctx);
struct message_header_line *hdr;
- unsigned int parse_headers:1;
- unsigned int custom_header:1;
- unsigned int threading:1;
+ bool parse_headers:1;
+ bool custom_header:1;
+ bool threading:1;
};
struct search_body_context {
uint32_t ext_id, last_seq, highest_reset_id, prev_seq;
uint32_t lowest_nonexpunged_zero;
- unsigned int regetting:1;
- unsigned int have_all_wanted:1;
- unsigned int no_writing:1;
- unsigned int reverse:1;
- unsigned int seqs_nonsorted:1;
- unsigned int broken:1;
+ bool regetting:1;
+ bool have_all_wanted:1;
+ bool no_writing:1;
+ bool reverse:1;
+ bool seqs_nonsorted:1;
+ bool broken:1;
};
static char expunged_msg;
uint32_t parent_root_idx1;
/* subject contained a Re: or Fwd: */
- unsigned int reply_or_forward:1;
+ bool reply_or_forward:1;
/* a dummy node */
- unsigned int dummy:1;
+ bool dummy:1;
/* ignore this node - it's a dummy without children */
- unsigned int ignore:1;
+ bool ignore:1;
};
struct thread_finish_context {
ARRAY(struct mail_thread_shadow_node) shadow_nodes;
unsigned int next_new_root_idx;
- unsigned int use_sent_date:1;
- unsigned int return_seqs:1;
+ bool use_sent_date:1;
+ bool return_seqs:1;
};
struct mail_thread_iterate_context {
from our parent. */
unsigned int parent_link_refcount:30;
/* If uid is expunged, rebuild the thread tree. */
- unsigned int expunge_rebuilds:1;
+ bool expunge_rebuilds:1;
/* If a link between this node and its child gets unreferenced,
rebuild the thread tree. */
- unsigned int child_unref_rebuilds:1;
+ bool child_unref_rebuilds:1;
};
ARRAY_DEFINE_TYPE(mail_thread_node, struct mail_thread_node);
#define MAIL_THREAD_NODE_EXISTS(node) \
struct mail_search_args *search_args;
ARRAY_TYPE(seq_range) added_uids;
- unsigned int failed:1;
- unsigned int corrupted:1;
+ bool failed:1;
+ bool corrupted:1;
};
struct mail_thread_mailbox {
struct mail *mail;
uoff_t expected_size;
- unsigned int files_read_increased:1;
- unsigned int input_has_body:1;
+ bool files_read_increased:1;
+ bool input_has_body:1;
};
static bool i_stream_mail_try_get_cached_size(struct mail_istream *mstream)
struct hardlink_ctx {
const char *dest_path;
- unsigned int success:1;
+ bool success:1;
};
static int do_hardlink(struct maildir_mailbox *mbox, const char *path,
struct dotlock_settings dotlock_settings;
time_t synced_mtime;
- unsigned int synced:1;
- unsigned int changed:1;
+ bool synced:1;
+ bool changed:1;
};
struct maildir_keywords_sync_ctx {
uoff_t size, vsize;
enum mail_flags flags;
unsigned int pop3_order;
- unsigned int preserve_filename:1;
+ bool preserve_filename:1;
unsigned int keywords_count;
/* unsigned int keywords[]; */
};
int fd;
uint32_t first_seq, seq, last_nonrecent_uid;
- unsigned int have_keywords:1;
- unsigned int have_preserved_filenames:1;
- unsigned int locked:1;
- unsigned int failed:1;
- unsigned int last_save_finished:1;
- unsigned int locked_uidlist_refresh:1;
+ bool have_keywords:1;
+ bool have_preserved_filenames:1;
+ bool locked:1;
+ bool failed:1;
+ bool last_save_finished:1;
+ bool locked_uidlist_refresh:1;
};
static int maildir_file_move(struct maildir_save_context *ctx,
uint32_t maildir_ext_id;
uint32_t maildir_list_index_ext_id;
- unsigned int synced:1;
- unsigned int syncing_commit:1;
- unsigned int private_flags_mask_set:1;
- unsigned int backend_readonly:1;
- unsigned int backend_readonly_set:1;
- unsigned int sync_uidlist_refreshed:1;
+ bool synced:1;
+ bool syncing_commit:1;
+ bool private_flags_mask_set:1;
+ bool backend_readonly:1;
+ bool backend_readonly_set:1;
+ bool sync_uidlist_refreshed:1;
};
extern struct mail_vfuncs maildir_mail_vfuncs;
struct maildir_uidlist_sync_ctx *uidlist_sync_ctx;
struct maildir_index_sync_context *index_sync_ctx;
- unsigned int partial:1;
- unsigned int locked:1;
- unsigned int racing:1;
+ bool partial:1;
+ bool locked:1;
+ bool racing:1;
};
void maildir_sync_set_racing(struct maildir_sync_context *ctx)
guid_128_t mailbox_guid;
- unsigned int recreate:1;
- unsigned int recreate_on_change:1;
- unsigned int initial_read:1;
- unsigned int initial_hdr_read:1;
- unsigned int retry_rewind:1;
- unsigned int locked_refresh:1;
- unsigned int unsorted:1;
- unsigned int have_mailbox_guid:1;
- unsigned int opened_readonly:1;
+ bool recreate:1;
+ bool recreate_on_change:1;
+ bool initial_read:1;
+ bool initial_hdr_read:1;
+ bool retry_rewind:1;
+ bool locked_refresh:1;
+ bool unsorted:1;
+ bool have_mailbox_guid:1;
+ bool opened_readonly:1;
};
struct maildir_uidlist_sync_ctx {
unsigned int new_files_count;
unsigned int finish_change_counter;
- unsigned int partial:1;
- unsigned int finished:1;
- unsigned int changed:1;
- unsigned int failed:1;
- unsigned int locked:1;
+ bool partial:1;
+ bool finished:1;
+ bool changed:1;
+ bool failed:1;
+ bool locked:1;
};
struct maildir_uidlist_iter_ctx {
uoff_t from_offset, hdr_offset, body_offset, mail_size;
uoff_t input_peak_offset;
- unsigned int locked:1;
- unsigned int seeked:1;
- unsigned int crlf_ending:1;
- unsigned int corrupted:1;
- unsigned int mail_size_forced:1;
- unsigned int eof:1;
- unsigned int header_missing_eoh:1;
+ bool locked:1;
+ bool seeked:1;
+ bool crlf_ending:1;
+ bool corrupted:1;
+ bool mail_size_forced:1;
+ bool eof:1;
+ bool header_missing_eoh:1;
};
static void i_stream_raw_mbox_destroy(struct iostream_private *stream)
struct mbox_md5_context *mbox_md5_ctx;
char *x_delivery_id_header;
- unsigned int synced:1;
- unsigned int failed:1;
- unsigned int finished:1;
+ bool synced:1;
+ bool failed:1;
+ bool finished:1;
};
static void write_error(struct mbox_save_context *ctx)
const struct mbox_settings *set;
enum mbox_lock_type *read_locks;
enum mbox_lock_type *write_locks;
- unsigned int lock_settings_initialized:1;
+ bool lock_settings_initialized:1;
};
struct mbox_mailbox {
struct mbox_md5_vfuncs md5_v;
- unsigned int no_mbox_file:1;
- unsigned int invalid_mbox_file:1;
- unsigned int mbox_broken_offsets:1;
- unsigned int mbox_save_md5:1;
- unsigned int mbox_dotlocked:1;
- unsigned int mbox_used_privileges:1;
- unsigned int mbox_privileged_locking:1;
- unsigned int syncing:1;
- unsigned int backend_readonly:1;
- unsigned int backend_readonly_set:1;
+ bool no_mbox_file:1;
+ bool invalid_mbox_file:1;
+ bool mbox_broken_offsets:1;
+ bool mbox_save_md5:1;
+ bool mbox_dotlocked:1;
+ bool mbox_used_privileges:1;
+ bool mbox_privileged_locking:1;
+ bool syncing:1;
+ bool backend_readonly:1;
+ bool backend_readonly_set:1;
};
struct mbox_transaction_context {
ARRAY_TYPE(keyword_indexes) keywords;
uint8_t flags;
- unsigned int uid_broken:1;
- unsigned int expunged:1;
- unsigned int pseudo:1;
- unsigned int status_broken:1;
- unsigned int xstatus_broken:1;
+ bool uid_broken:1;
+ bool expunged:1;
+ bool pseudo:1;
+ bool status_broken:1;
+ bool xstatus_broken:1;
uoff_t from_offset;
uoff_t body_size;
uint32_t parsed_uid, last_uid_updated_value;
unsigned int last_uid_value_start_pos;
- unsigned int have_eoh:1;
- unsigned int need_rewrite:1;
- unsigned int seen_imapbase:1;
- unsigned int updated:1;
- unsigned int recent:1;
- unsigned int dirty:1;
- unsigned int imapbase_rewrite:1;
- unsigned int imapbase_updated:1;
+ bool have_eoh:1;
+ bool need_rewrite:1;
+ bool seen_imapbase:1;
+ bool updated:1;
+ bool recent:1;
+ bool dirty:1;
+ bool imapbase_rewrite:1;
+ bool imapbase_updated:1;
};
struct mbox_sync_context {
uint32_t last_nonrecent_uid;
off_t expunged_space, space_diff;
- unsigned int dest_first_mail:1;
- unsigned int first_mail_crlf_expunged:1;
+ bool dest_first_mail:1;
+ bool first_mail_crlf_expunged:1;
/* global flags: */
- unsigned int keep_recent:1;
- unsigned int readonly:1;
- unsigned int delay_writes:1;
- unsigned int renumber_uids:1;
- unsigned int moved_offsets:1;
- unsigned int ext_modified:1;
- unsigned int index_reset:1;
- unsigned int errors:1;
+ bool keep_recent:1;
+ bool readonly:1;
+ bool delay_writes:1;
+ bool renumber_uids:1;
+ bool moved_offsets:1;
+ bool ext_modified:1;
+ bool index_reset:1;
+ bool errors:1;
};
int mbox_sync_header_refresh(struct mbox_mailbox *mbox);
const char *input_line;
struct istream *dot_input;
- unsigned int running:1;
+ bool running:1;
};
static void
the UID may not exist for the entire session */
uint32_t *msg_uids;
- unsigned int logged_in:1;
+ bool logged_in:1;
};
struct pop3c_mail {
struct index_mail imail;
struct istream *prefetch_stream;
- unsigned int prefetching:1;
- unsigned int prefetching_body:1;
+ bool prefetching:1;
+ bool prefetching_body:1;
};
struct mail *
uoff_t size;
const char *envelope_sender;
- unsigned int synced:1;
- unsigned int have_filename:1;
+ bool synced:1;
+ bool have_filename:1;
};
extern struct mail_vfuncs raw_mail_vfuncs;
/* current directory we're handling */
struct list_dir_context *dir;
- unsigned int inbox_found:1;
- unsigned int inbox_has_children:1;
- unsigned int list_inbox_inbox:1;
+ bool inbox_found:1;
+ bool inbox_has_children:1;
+ bool list_inbox_inbox:1;
};
static int
char *list_log_path, *inbox_log_path;
struct stat list_last_st, inbox_last_st;
- unsigned int initialized:1;
- unsigned int read_failed:1;
- unsigned int inbox_event_pending:1;
+ bool initialized:1;
+ bool read_failed:1;
+ bool inbox_event_pending:1;
};
int mailbox_list_index_notify_init(struct mailbox_list *list,
struct mail_index_view *view;
struct mail_index_transaction *trans;
- unsigned int syncing_list:1;
+ bool syncing_list:1;
};
int mailbox_list_index_sync_begin(struct mailbox_list *list,
HASH_TABLE(void *, struct mailbox_list_index_node *) mailbox_hash;
struct mailbox_list_index_node *mailbox_tree;
- unsigned int pending_init:1;
- unsigned int opened:1;
- unsigned int syncing:1;
- unsigned int updating_status:1;
- unsigned int has_backing_store:1;
- unsigned int index_last_check_changed:1;
+ bool pending_init:1;
+ bool opened:1;
+ bool syncing:1;
+ bool updating_status:1;
+ bool has_backing_store:1;
+ bool index_last_check_changed:1;
};
struct mailbox_list_index_iterate_context {
string_t *path;
struct mailbox_list_index_node *next_node;
- unsigned int failed:1;
+ bool failed:1;
};
extern MODULE_CONTEXT_DEFINE(mailbox_list_index_module,
struct mailbox_info inbox_info;
const struct mailbox_info *pending_backend_info;
- unsigned int cur_ns_prefix_sent:1;
- unsigned int inbox_list:1;
- unsigned int inbox_listed:1;
+ bool cur_ns_prefix_sent:1;
+ bool inbox_list:1;
+ bool inbox_listed:1;
};
static bool ns_match_next(struct ns_list_iterate_context *ctx,
struct noop_list_iterate_context {
struct mailbox_list_iterate_context ctx;
struct mailbox_info inbox_info;
- unsigned int list_inbox:1;
+ bool list_inbox:1;
};
extern struct mailbox_list none_mailbox_list;
const struct mail_namespace_settings *set, *unexpanded_set;
const struct mail_storage_settings *mail_set;
- unsigned int special_use_mailboxes:1;
- unsigned int destroyed:1;
+ bool special_use_mailboxes:1;
+ bool destroyed:1;
};
int mail_namespaces_init(struct mail_user *user, const char **error_r);
ARRAY(struct mail_search_register_arg) args;
mail_search_register_fallback_t *fallback;
- unsigned int args_sorted:1;
+ bool args_sorted:1;
};
struct mail_search_register *mail_search_register_init(void)
void *context;
const char *hdr_field_name; /* for SEARCH_HEADER* */
- unsigned int match_not:1; /* result = !result */
- unsigned int match_always:1; /* result = 1 always */
- unsigned int nonmatch_always:1; /* result = 0 always */
- unsigned int fuzzy:1; /* use fuzzy matching for this arg */
- unsigned int no_fts:1; /* do NOT call FTS */
+ bool match_not:1; /* result = !result */
+ bool match_always:1; /* result = 1 always */
+ bool nonmatch_always:1; /* result = 0 always */
+ bool fuzzy:1; /* use fuzzy matching for this arg */
+ bool no_fts:1; /* do NOT call FTS */
int result; /* -1 = unknown, 0 = unmatched, 1 = matched */
};
struct mailbox *box;
struct mail_search_arg *args;
- unsigned int simplified:1;
- unsigned int have_inthreads:1;
+ bool simplified:1;
+ bool have_inthreads:1;
/* Stop mail_search_next() when finding a non-matching mail.
(Could be useful when wanting to find only the oldest mails.) */
- unsigned int stop_on_nonmatch:1;
+ bool stop_on_nonmatch:1;
/* fts plugin has already expanded the search args - no need to do
it again. */
- unsigned int fts_expanded:1;
+ bool fts_expanded:1;
};
#define ARG_SET_RESULT(arg, res) \
ARRAY(union mail_storage_module_context *) module_contexts;
/* Failed to create shared attribute dict, don't try again */
- unsigned int shared_attr_dict_failed:1;
+ bool shared_attr_dict_failed:1;
};
struct mail_attachment_part {
/* When FAST open flag is used, the mailbox isn't actually opened until
it's synced for the first time. */
- unsigned int opened:1;
+ bool opened:1;
/* Mailbox was deleted while we had it open. */
- unsigned int mailbox_deleted:1;
+ bool mailbox_deleted:1;
/* Mailbox is being created */
- unsigned int creating:1;
+ bool creating:1;
/* Mailbox is being deleted */
- unsigned int deleting:1;
+ bool deleting:1;
/* Don't use MAIL_INDEX_SYNC_FLAG_DELETING_INDEX for sync flag */
- unsigned int delete_sync_check:1;
+ bool delete_sync_check:1;
/* Delete mailbox only if it's empty */
- unsigned int deleting_must_be_empty:1;
+ bool deleting_must_be_empty:1;
/* The backend wants to skip checking if there are 0 messages before
calling mailbox_list.delete_mailbox() */
- unsigned int delete_skip_empty_check:1;
+ bool delete_skip_empty_check:1;
/* Mailbox was already marked as deleted within this allocation. */
- unsigned int marked_deleted:1;
+ bool marked_deleted:1;
/* TRUE if this is an INBOX for this user */
- unsigned int inbox_user:1;
+ bool inbox_user:1;
/* TRUE if this is an INBOX for this namespace (user or shared) */
- unsigned int inbox_any:1;
+ bool inbox_any:1;
/* When copying to this mailbox, require that mailbox_copy() uses
mailbox_save_*() to actually save a new physical copy rather than
simply incrementing a reference count (e.g. via hard link) */
- unsigned int disable_reflink_copy_to:1;
+ bool disable_reflink_copy_to:1;
/* Don't allow creating any new keywords */
- unsigned int disallow_new_keywords:1;
+ bool disallow_new_keywords:1;
/* Mailbox has been synced at least once */
- unsigned int synced:1;
+ bool synced:1;
/* Updating cache file is disabled */
- unsigned int mail_cache_disabled:1;
+ bool mail_cache_disabled:1;
/* Update first_saved field to mailbox list index. */
- unsigned int update_first_saved:1;
+ bool update_first_saved:1;
/* mailbox_verify_create_name() only checks for mailbox_verify_name() */
- unsigned int skip_create_name_restrictions:1;
+ bool skip_create_name_restrictions:1;
};
struct mail_vfuncs {
/* these statistics are never reset by mail-storage API: */
struct mailbox_transaction_stats stats;
/* Set to TRUE to update stats_* fields */
- unsigned int stats_track:1;
+ bool stats_track:1;
/* We've done some non-transactional (e.g. dovecot-uidlist updates) */
- unsigned int nontransactional_changes:1;
+ bool nontransactional_changes:1;
/* FIXME: v2.3: this should be in attribute_get/set() parameters */
- unsigned int internal_attribute:1;
+ bool internal_attribute:1;
};
union mail_search_module_context {
ARRAY(union mail_search_module_context *) module_contexts;
- unsigned int seen_lost_data:1;
- unsigned int progress_hidden:1;
+ bool seen_lost_data:1;
+ bool progress_hidden:1;
};
struct mail_save_data {
/* mailbox_save_alloc() called, but finish/cancel not.
the same context is usually returned by the backends for reuse. */
- unsigned int unfinished:1;
+ bool unfinished:1;
/* mailbox_save_finish() or mailbox_copy() is being called. */
- unsigned int finishing:1;
+ bool finishing:1;
/* mail was copied using saving */
- unsigned int copying_via_save:1;
+ bool copying_via_save:1;
/* mail is being saved, not copied */
- unsigned int saving:1;
+ bool saving:1;
/* mail is being moved - ignore quota */
- unsigned int moving:1;
+ bool moving:1;
};
struct mailbox_sync_context {
pool_t userdb_next_pool;
const char *const **userdb_next_fieldsp;
- unsigned int debug:1;
- unsigned int log_initialized:1;
- unsigned int config_permission_denied:1;
+ bool debug:1;
+ bool log_initialized:1;
+ bool config_permission_denied:1;
};
struct mail_storage_service_user {
unsigned int session_id_counter;
- unsigned int anonymous:1;
- unsigned int admin:1;
+ bool anonymous:1;
+ bool admin:1;
};
struct module *mail_storage_service_modules = NULL;
enum mail_storage_service_flags flags_override_remove;
/* override MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP for this lookup */
- unsigned int no_userdb_lookup:1;
+ bool no_userdb_lookup:1;
/* Enable auth_debug=yes for this lookup */
- unsigned int debug:1;
+ bool debug:1;
};
extern struct module *mail_storage_service_modules;
enum mail_flags permanent_flags;
/* All keywords can be permanently modified (STATUS_PERMANENT_FLAGS) */
- unsigned int permanent_keywords:1;
+ bool permanent_keywords:1;
/* More keywords can be created (STATUS_PERMANENT_FLAGS) */
- unsigned int allow_new_keywords:1;
+ bool allow_new_keywords:1;
/* Modseqs aren't permanent (index is in memory) (STATUS_HIGHESTMODSEQ) */
- unsigned int nonpermanent_modseqs:1;
+ bool nonpermanent_modseqs:1;
/* Modseq tracking has never been enabled for this mailbox
yet. (STATUS_HIGHESTMODSEQ) */
- unsigned int no_modseq_tracking:1;
+ bool no_modseq_tracking:1;
/* Messages have GUIDs (always set) */
- unsigned int have_guids:1;
+ bool have_guids:1;
/* mailbox_save_set_guid() works (always set) */
- unsigned int have_save_guids:1;
+ bool have_save_guids:1;
/* GUIDs are always 128bit (always set) */
- unsigned int have_only_guid128:1;
+ bool have_only_guid128:1;
};
struct mailbox_cache_field {
};
struct mailbox_sync_status {
/* There are expunges that haven't been synced yet */
- unsigned int sync_delayed_expunges:1;
+ bool sync_delayed_expunges:1;
};
struct mailbox_expunge_rec {
struct mailbox_transaction_context *transaction;
uint32_t seq, uid;
- unsigned int expunged:1;
- unsigned int saving:1; /* This mail is still being saved */
- unsigned int has_nuls:1; /* message data is known to contain NULs */
- unsigned int has_no_nuls:1; /* -''- known to not contain NULs */
+ bool expunged:1;
+ bool saving:1; /* This mail is still being saved */
+ bool has_nuls:1; /* message data is known to contain NULs */
+ bool has_no_nuls:1; /* -''- known to not contain NULs */
/* If the lookup is aborted, error is set to MAIL_ERROR_NOTPOSSIBLE */
enum mail_lookup_abort lookup_abort;
/* User doesn't exist (as reported by userdb lookup when looking
up home) */
- unsigned int nonexistent:1;
+ bool nonexistent:1;
/* Either home is set or there is no home for the user. */
- unsigned int home_looked_up:1;
+ bool home_looked_up:1;
/* User is anonymous */
- unsigned int anonymous:1;
+ bool anonymous:1;
/* This is an autocreated user (e.g. for shared namespace or
lda raw storage) */
- unsigned int autocreated:1;
+ bool autocreated:1;
/* mail_user_init() has been called */
- unsigned int initialized:1;
+ bool initialized:1;
/* SET_STR_VARS in user's all settings have been expanded.
This happens near the beginning of the user initialization,
so this is rarely needed to be checked. */
- unsigned int settings_expanded:1;
+ bool settings_expanded:1;
/* Shortcut to mail_storage_settings.mail_debug */
- unsigned int mail_debug:1;
+ bool mail_debug:1;
/* If INBOX can't be opened, log an error, but only once. */
- unsigned int inbox_open_error_logged:1;
+ bool inbox_open_error_logged:1;
/* Fuzzy search works for this user (FTS enabled) */
- unsigned int fuzzy_search:1;
+ bool fuzzy_search:1;
/* We're running dsync */
- unsigned int dsyncing:1;
+ bool dsyncing:1;
/* Failed to create attribute dict, don't try again */
- unsigned int attr_dict_failed:1;
+ bool attr_dict_failed:1;
/* We're deinitializing the user */
- unsigned int deinitializing:1;
+ bool deinitializing:1;
/* Enable administrator user commands for the user */
- unsigned int admin:1;
+ bool admin:1;
/* Enable all statistics gathering */
- unsigned int stats_enabled:1;
+ bool stats_enabled:1;
/* Enable autoexpunging at deinit. */
- unsigned int autoexpunge_enabled:1;
+ bool autoexpunge_enabled:1;
};
struct mail_user_module_register {
ARRAY(union mailbox_list_module_context *) module_contexts;
- unsigned int index_root_dir_created:1;
- unsigned int guid_cache_updated:1;
- unsigned int guid_cache_invalidated:1;
+ bool index_root_dir_created:1;
+ bool guid_cache_updated:1;
+ bool guid_cache_invalidated:1;
};
union mailbox_list_iterate_module_context {
struct imap_match_glob *glob;
enum mailbox_info_flags leaf_flags, parent_flags;
- unsigned int update_only:1;
- unsigned int match_parents:1;
+ bool update_only:1;
+ bool match_parents:1;
};
/* Modules should use do "my_id = mailbox_list_module_id++" and
ARRAY_TYPE(seq_range) never_uids;
ARRAY_TYPE(seq_range) removed_uids, added_uids;
- unsigned int args_have_flags:1;
- unsigned int args_have_keywords:1;
- unsigned int args_have_modseq:1;
+ bool args_have_flags:1;
+ bool args_have_keywords:1;
+ bool args_have_modseq:1;
};
struct mail_search_result *
string_t *path_str;
size_t parent_pos;
- unsigned int first_child:1;
+ bool first_child:1;
};
struct mailbox_tree_context *mailbox_tree_init(char separator)
pool_t pool;
- unsigned int alloced:1;
- unsigned int dynamic:1;
+ bool alloced:1;
+ bool dynamic:1;
};
typedef int buffer_check_sizes[COMPILE_ERROR_IF_TRUE(sizeof(struct real_buffer) > sizeof(buffer_t)) ?1:1];
enum connection_disconnect_reason disconnect_reason;
- unsigned int version_received:1;
+ bool version_received:1;
};
struct connection_list {
time_t last_change;
unsigned int wait_usecs;
- unsigned int have_pid:1;
- unsigned int pid_read:1;
- unsigned int use_io_notify:1;
- unsigned int lock_stated:1;
+ bool have_pid:1;
+ bool pid_read:1;
+ bool use_io_notify:1;
+ bool lock_stated:1;
};
static struct dotlock *
/* Rely on O_EXCL locking to work instead of using hardlinks.
It's faster, but doesn't work with all NFS implementations. */
- unsigned int use_excl_lock:1;
+ bool use_excl_lock:1;
/* Flush NFS attribute cache before stating files. */
- unsigned int nfs_flush:1;
+ bool nfs_flush:1;
/* Use io_add_notify() to speed up finding out when an existing
dotlock is deleted */
- unsigned int use_io_notify:1;
+ bool use_io_notify:1;
};
enum dotlock_create_flags {
unsigned int io_pending_count;
- unsigned int running:1;
- unsigned int iolooping:1;
+ bool running:1;
+ bool iolooping:1;
};
struct io {
struct ioloop *ioloop;
struct ioloop_context *ctx;
- unsigned int one_shot:1;
+ bool one_shot:1;
};
struct ioloop_context_callback {
struct crlf_istream {
struct istream_private istream;
- unsigned int pending_cr:1;
- unsigned int last_cr:1;
+ bool pending_cr:1;
+ bool last_cr:1;
};
static int i_stream_crlf_read_common(struct crlf_istream *cstream)
uoff_t skip_left;
- unsigned int file:1;
- unsigned int autoclose_fd:1;
- unsigned int seen_eof:1;
+ bool file:1;
+ bool autoclose_fd:1;
+ bool seen_eof:1;
};
struct istream *
struct istream_private istream;
/* The end '"' was found */
- unsigned int str_end:1;
+ bool str_end:1;
};
static int
off_t mmap_offset;
uoff_t v_size;
- unsigned int autoclose_fd:1;
+ bool autoclose_fd:1;
};
static size_t mmap_pagemask = 0;
unsigned int access_counter;
string_t *line_str; /* for i_stream_next_line() if w_buffer == NULL */
- unsigned int line_crlf:1;
- unsigned int return_nolf_line:1;
- unsigned int stream_size_passthrough:1; /* stream is parent's size */
- unsigned int nonpersistent_buffers:1;
+ bool line_crlf:1;
+ bool return_nolf_line:1;
+ bool stream_size_passthrough:1; /* stream is parent's size */
+ bool nonpersistent_buffers:1;
};
struct istream * ATTR_NOWARN_UNUSED_RESULT
struct tee_istream *tee;
struct tee_child_istream *next;
- unsigned int last_read_waiting:1;
+ bool last_read_waiting:1;
};
static void tee_streams_update_buffer(struct tee_istream *tee)
uoff_t v_offset;
int stream_errno;
- unsigned int mmaped:1; /* be careful when copying data */
- unsigned int blocking:1; /* read() shouldn't return 0 */
- unsigned int closed:1;
- unsigned int readable_fd:1; /* fd can be read directly if necessary
+ bool mmaped:1; /* be careful when copying data */
+ bool blocking:1; /* read() shouldn't return 0 */
+ bool closed:1;
+ bool readable_fd:1; /* fd can be read directly if necessary
(for sendfile()) */
- unsigned int seekable:1; /* we can seek() backwards */
- unsigned int eof:1; /* read() has reached to end of file
+ bool seekable:1; /* we can seek() backwards */
+ bool eof:1; /* read() has reached to end of file
(but may still be data available in buffer) */
struct istream_private *real_stream;
struct pool {
const struct pool_vfuncs *v;
- unsigned int alloconly_pool:1;
- unsigned int datastack_pool:1;
+ bool alloconly_pool:1;
+ bool datastack_pool:1;
};
/* system_pool uses calloc() + realloc() + free() */
void *filter_context;
/* Require all plugins to have <plugin_name>_init() function */
- unsigned int require_init_funcs:1;
+ bool require_init_funcs:1;
/* Enable debug logging */
- unsigned int debug:1;
+ bool debug:1;
/* If dlopen() fails for some modules, silently skip it. */
- unsigned int ignore_dlopen_errors:1;
+ bool ignore_dlopen_errors:1;
/* Don't fail if some specified modules weren't found */
- unsigned int ignore_missing:1;
+ bool ignore_missing:1;
};
struct module {
void (*init)(struct module *module);
void (*deinit)(void);
- unsigned int initialized:1;
+ bool initialized:1;
struct module *next;
};
size_t buffer_size, optimal_block_size;
size_t head, tail; /* first unsent/unused byte */
- unsigned int full:1; /* if head == tail, is buffer empty or full? */
- unsigned int file:1;
- unsigned int flush_pending:1;
- unsigned int socket_cork_set:1;
- unsigned int no_socket_cork:1;
- unsigned int no_sendfile:1;
- unsigned int autoclose_fd:1;
+ bool full:1; /* if head == tail, is buffer empty or full? */
+ bool file:1;
+ bool flush_pending:1;
+ bool socket_cork_set:1;
+ bool no_socket_cork:1;
+ bool no_sendfile:1;
+ bool autoclose_fd:1;
};
struct ostream *
stream_flush_callback_t *callback;
void *context;
- unsigned int corked:1;
- unsigned int closing:1;
- unsigned int last_errors_not_checked:1;
- unsigned int error_handling_disabled:1;
- unsigned int noverflow:1;
+ bool corked:1;
+ bool closing:1;
+ bool last_errors_not_checked:1;
+ bool error_handling_disabled:1;
+ bool noverflow:1;
};
struct ostream *
/* overflow is set when some of the data given to send()
functions was neither sent nor buffered. It's never unset inside
ostream code. */
- unsigned int overflow:1;
+ bool overflow:1;
/* o_stream_send() writes all the data or returns failure */
- unsigned int blocking:1;
- unsigned int closed:1;
+ bool blocking:1;
+ bool closed:1;
struct ostream_private *real_stream;
};
struct mail_user *dest_user;
struct mail *first_saved_mail;
- unsigned int mail_body_7bit:1;
- unsigned int mail_body_8bitmime:1;
+ bool mail_body_7bit:1;
+ bool mail_body_8bitmime:1;
};
struct client {
unsigned int proxy_ttl;
unsigned int proxy_timeout_secs;
- unsigned int disconnected:1;
+ bool disconnected:1;
};
extern unsigned int clients_count;
const char *reply;
unsigned int idx;
- unsigned int rcpt_to_failed:1;
- unsigned int data_reply_received:1;
+ bool rcpt_to_failed:1;
+ bool data_reply_received:1;
};
struct lmtp_proxy_connection {
struct istream *data_input;
struct timeout *to;
- unsigned int finished:1;
- unsigned int failed:1;
+ bool finished:1;
+ bool failed:1;
};
struct lmtp_proxy {
lmtp_proxy_finish_callback_t *finish_callback;
void *finish_context;
- unsigned int finished:1;
+ bool finished:1;
};
static void lmtp_conn_finish(void *context);
struct log_client {
struct ip_addr ip;
char *prefix;
- unsigned int fatal_logged:1;
+ bool fatal_logged:1;
};
struct log_connection {
unsigned int pending_count;
- unsigned int master:1;
- unsigned int handshaked:1;
+ bool master:1;
+ bool handshaked:1;
};
static struct log_connection *log_connections = NULL;
/* all the key=value fields returned by passdb */
const char *const *all_fields;
- unsigned int proxy:1;
- unsigned int proxy_nopipelining:1;
- unsigned int temp:1;
- unsigned int nologin:1;
- unsigned int authz_failure:1;
+ bool proxy:1;
+ bool proxy_nopipelining:1;
+ bool temp:1;
+ bool nologin:1;
+ bool authz_failure:1;
};
struct client_vfuncs {
ARRAY(union login_client_module_context *) module_contexts;
char *virtual_user, *virtual_user_orig, *virtual_auth_user;
- unsigned int destroyed:1;
- unsigned int input_blocked:1;
- unsigned int login_success:1;
- unsigned int starttls:1;
- unsigned int tls:1;
- unsigned int secured:1;
- unsigned int trusted:1;
- unsigned int ssl_servername_settings_read:1;
- unsigned int authenticating:1;
- unsigned int auth_tried_disabled_plaintext:1;
- unsigned int auth_tried_unsupported_mech:1;
- unsigned int auth_try_aborted:1;
- unsigned int auth_initializing:1;
- unsigned int auth_process_comm_fail:1;
- unsigned int proxy_auth_failed:1;
- unsigned int proxy_nopipelining:1;
- unsigned int auth_waiting:1;
- unsigned int auth_user_disabled:1;
- unsigned int auth_pass_expired:1;
- unsigned int notified_auth_ready:1;
- unsigned int notified_disconnect:1;
+ bool destroyed:1;
+ bool input_blocked:1;
+ bool login_success:1;
+ bool starttls:1;
+ bool tls:1;
+ bool secured:1;
+ bool trusted:1;
+ bool ssl_servername_settings_read:1;
+ bool authenticating:1;
+ bool auth_tried_disabled_plaintext:1;
+ bool auth_tried_unsupported_mech:1;
+ bool auth_try_aborted:1;
+ bool auth_initializing:1;
+ bool auth_process_comm_fail:1;
+ bool proxy_auth_failed:1;
+ bool proxy_nopipelining:1;
+ bool auth_waiting:1;
+ bool auth_user_disabled:1;
+ bool auth_pass_expired:1;
+ bool notified_auth_ready:1;
+ bool notified_disconnect:1;
/* ... */
};
proxy_callback_t *callback;
- unsigned int connected:1;
- unsigned int destroying:1;
- unsigned int disconnecting:1;
- unsigned int delayed_disconnect:1;
- unsigned int num_waiting_connections_updated:1;
+ bool connected:1;
+ bool destroying:1;
+ bool disconnecting:1;
+ bool delayed_disconnect:1;
+ bool num_waiting_connections_updated:1;
};
static struct login_proxy_state *proxy_state;
const char *cert_error;
char *last_error;
- unsigned int handshaked:1;
- unsigned int destroyed:1;
- unsigned int cert_received:1;
- unsigned int cert_broken:1;
- unsigned int client_proxy:1;
- unsigned int flushing:1;
- unsigned int failed:1;
+ bool handshaked:1;
+ bool destroyed:1;
+ bool cert_received:1;
+ bool cert_broken:1;
+ bool client_proxy:1;
+ bool flushing:1;
+ bool failed:1;
};
struct ssl_parameters {
/* kill the process if it doesn't send initial status notification */
struct timeout *to_status;
- unsigned int destroyed:1;
+ bool destroyed:1;
};
#define SERVICE_PROCESS_IS_INITIALIZED(process) \
time_t last_drop_warning;
/* all processes are in use and new connections are coming */
- unsigned int listen_pending:1;
+ bool listen_pending:1;
/* service is currently listening for new connections */
- unsigned int listening:1;
+ bool listening:1;
/* TRUE if service has at least one inet_listener */
- unsigned int have_inet_listeners:1;
+ bool have_inet_listeners:1;
/* service_login_notify()'s last notification state */
- unsigned int last_login_full_notify:1;
+ bool last_login_full_notify:1;
/* service has exited at least once with exit code 0 */
- unsigned int have_successful_exits:1;
+ bool have_successful_exits:1;
};
struct service_list {
ARRAY(struct service *) services;
- unsigned int destroying:1;
- unsigned int destroyed:1;
- unsigned int sigterm_sent:1;
- unsigned int sigterm_sent_to_log:1;
+ bool destroying:1;
+ bool destroyed:1;
+ bool sigterm_sent:1;
+ bool sigterm_sent_to_log:1;
};
HASH_TABLE_DEFINE_TYPE(pid_process, void *, struct service_process *);
struct acl_backend_vfuncs v;
- unsigned int owner:1;
- unsigned int debug:1;
+ bool owner:1;
+ bool debug:1;
};
struct acl_mailbox_list_context {
struct acl_rights *rights;
unsigned int idx, count;
- unsigned int failed:1;
+ bool failed:1;
};
extern const char *const all_mailbox_rights[];
const char *const *neg_rights;
/* These rights are global for all users */
- unsigned int global:1;
+ bool global:1;
};
ARRAY_DEFINE_TYPE(acl_rights, struct acl_rights);
unsigned int acllist_change_counter;
unsigned int cache_secs;
- unsigned int rebuilding_acllist:1;
- unsigned int iterating_acllist:1;
+ bool rebuilding_acllist:1;
+ bool iterating_acllist:1;
};
void acl_vfile_write_rights_list(string_t *dest, const char *const *rights);
ARRAY_TYPE(const_string) iter_values;
unsigned int iter_idx, iter_value_idx;
- unsigned int failed:1;
+ bool failed:1;
};
struct acl_lookup_dict *acl_lookup_dict_init(struct mail_user *user)
struct mailbox_info info;
char sep;
- unsigned int hide_nonlistable_subscriptions:1;
- unsigned int simple_star_glob:1;
+ bool hide_nonlistable_subscriptions:1;
+ bool simple_star_glob:1;
};
static const char *acl_storage_right_names[ACL_STORAGE_RIGHT_COUNT] = {
struct expire_transaction_context {
union mailbox_transaction_module_context module_ctx;
- unsigned int saves:1;
- unsigned int first_expunged:1;
+ bool saves:1;
+ bool first_expunged:1;
};
const char *expire_plugin_version = DOVECOT_ABI_VERSION;
struct fts_expunge_log *expunge_log;
- unsigned int dir_created:1;
- unsigned int updating:1;
+ bool dir_created:1;
+ bool updating:1;
};
struct lucene_fts_backend_update_context {
uint32_t last_indexed_uid;
unsigned int mails_since_flush;
- unsigned int tokenized_input:1;
- unsigned int last_indexed_uid_set:1;
- unsigned int body_open:1;
- unsigned int documents_added:1;
- unsigned int expunges:1;
- unsigned int truncate_header:1;
+ bool tokenized_input:1;
+ bool last_indexed_uid_set:1;
+ bool body_open:1;
+ bool documents_added:1;
+ bool expunges:1;
+ bool truncate_header:1;
};
static const char *solr_escape_chars = "+-&|!(){}[]^\"~*?:\\/ ";
struct http_client_request *http_req;
- unsigned int failed:1;
+ bool failed:1;
};
struct solr_connection {
struct istream *payload;
struct io *io;
- unsigned int debug:1;
- unsigned int posting:1;
- unsigned int xml_failed:1;
- unsigned int http_ssl:1;
+ bool debug:1;
+ bool posting:1;
+ bool xml_failed:1;
+ bool http_ssl:1;
};
static int solr_xml_parse(struct solr_connection *conn,
/* TRUE = children.data contains our children.
FALSE = children.offset contains offset to our children in the
index file. */
- unsigned int children_not_mapped:1;
+ bool children_not_mapped:1;
/* When allocating our children, use a sequential array. */
- unsigned int want_sequential:1;
+ bool want_sequential:1;
/* This node's children are in a sequential array, meaning that the
first SEQUENTIAL_COUNT children have chars[n] = n. */
- unsigned int have_sequential:1;
+ bool have_sequential:1;
/* Number of UIDs that exists in parent node but not in this one
(i.e. number of UIDs [0..next_uid-1] not in this node's uidlist).
unsigned int default_partial_len;
unsigned int default_full_len;
- unsigned int corrupted:1;
+ bool corrupted:1;
};
#define SQUAT_PACK_MAX_SIZE ((sizeof(uint32_t) * 8 + 7) / 7)
struct dotlock *dotlock;
uint32_t first_uid;
- unsigned int compress_nodes:1;
+ bool compress_nodes:1;
};
struct squat_trie_iterate_node {
struct uidlist_list {
unsigned int uid_count:31;
- unsigned int uid_begins_with_pointer:1;
+ bool uid_begins_with_pointer:1;
uint32_t uid_list[UIDLIST_LIST_SIZE];
};
const uint32_t *cur_block_end_indexes;
size_t max_size;
- unsigned int corrupted:1;
- unsigned int building:1;
+ bool corrupted:1;
+ bool building:1;
};
struct squat_uidlist_build_context {
uint32_t list_start_idx;
struct squat_uidlist_file_header build_hdr;
- unsigned int need_reopen:1;
+ bool need_reopen:1;
};
struct squat_uidlist_rebuild_context {
struct fts_backend_vfuncs v;
struct mail_namespace *ns;
- unsigned int updating:1;
+ bool updating:1;
};
struct fts_backend_update_context {
struct mailbox *cur_box, *backend_box;
- unsigned int build_key_open:1;
- unsigned int failed:1;
+ bool build_key_open:1;
+ bool failed:1;
};
struct fts_index_header {
int fd;
struct istream *input;
- unsigned int notified:1;
- unsigned int failed:1;
+ bool notified:1;
+ bool failed:1;
};
int fts_indexer_cmd(struct mail_user *user, const char *cmd,
uint32_t next_index_seq;
uint32_t highest_virtual_uid;
- unsigned int precached:1;
- unsigned int mails_saved:1;
- unsigned int failed:1;
+ bool precached:1;
+ bool mails_saved:1;
+ bool failed:1;
};
struct fts_mail {
union mail_module_context module_ctx;
char score[30];
- unsigned int virtual_mail:1;
+ bool virtual_mail:1;
};
static MODULE_CONTEXT_DEFINE_INIT(fts_storage_module,
struct fts_indexer_context *indexer_ctx;
- unsigned int virtual_mailbox:1;
- unsigned int fts_lookup_success:1;
- unsigned int indexing_timed_out:1;
- unsigned int enforced:1;
+ bool virtual_mailbox:1;
+ bool fts_lookup_success:1;
+ bool indexing_timed_out:1;
+ bool enforced:1;
};
/* Figure out if we want to use full text search indexes and update
struct lazy_expunge_mailbox_list {
union mailbox_list_module_context module_ctx;
- unsigned int allow_rename:1;
- unsigned int internal_namespace:1;
+ bool allow_rename:1;
+ bool internal_namespace:1;
};
struct lazy_expunge_transaction {
struct msg_map_common {
/* sha1(header) - set only when needed */
unsigned char hdr_sha1[SHA1_RESULTLEN];
- unsigned int hdr_sha1_set:1;
+ bool hdr_sha1_set:1;
};
struct pop3_uidl_map {
const char *pop3_box_vname;
ARRAY(struct pop3_uidl_map) pop3_uidl_map;
- unsigned int all_mailboxes:1;
- unsigned int pop3_all_hdr_sha1_set:1;
- unsigned int ignore_missing_uidls:1;
- unsigned int skip_size_check:1;
+ bool all_mailboxes:1;
+ bool pop3_all_hdr_sha1_set:1;
+ bool ignore_missing_uidls:1;
+ bool skip_size_check:1;
};
struct pop3_migration_mailbox {
struct mail_cache_field cache_field;
- unsigned int cache_field_registered:1;
- unsigned int uidl_synced:1;
- unsigned int uidl_sync_failed:1;
- unsigned int uidl_ordered:1;
+ bool cache_field_registered:1;
+ bool uidl_synced:1;
+ bool uidl_sync_failed:1;
+ bool uidl_ordered:1;
};
/* NOTE: these headers must be sorted */
gid_t gid;
struct fs_quota_mountpoint *mount;
- unsigned int inode_per_mail:1;
- unsigned int user_disabled:1;
- unsigned int group_disabled:1;
+ bool inode_per_mail:1;
+ bool user_disabled:1;
+ bool group_disabled:1;
#ifdef FS_QUOTA_NETBSD
struct quotahandle *qh;
#endif
time_t recalc_last_stamp;
off_t last_size;
- unsigned int limits_initialized:1;
+ bool limits_initialized:1;
};
struct maildir_list_context {
uoff_t size, bool *too_large_r);
const char *quota_exceeded_msg;
- unsigned int debug:1;
- unsigned int initialized:1;
- unsigned int vsizes:1;
+ bool debug:1;
+ bool initialized:1;
+ bool vsizes:1;
};
struct quota_rule {
int bytes_percent, count_percent;
/* Don't include this mailbox in quota */
- unsigned int ignore:1;
+ bool ignore:1;
};
struct quota_warning_rule {
struct quota_rule rule;
const char *command;
- unsigned int reverse:1;
+ bool reverse:1;
};
struct quota_backend_vfuncs {
struct quota_rule grace_rule;
/* Limits in default_rule override backend's quota limits */
- unsigned int force_default_rule:1;
+ bool force_default_rule:1;
};
struct quota_root {
const char *quota_over_flag;
/* don't enforce quota when saving */
- unsigned int no_enforcing:1;
+ bool no_enforcing:1;
/* quota is automatically updated. update() should be called but the
bytes/count won't be used. */
- unsigned int auto_updating:1;
+ bool auto_updating:1;
/* If user has unlimited quota, disable quota tracking */
- unsigned int disable_unlimited_tracking:1;
+ bool disable_unlimited_tracking:1;
/* Set while quota is being recalculated to avoid recursion. */
- unsigned int recounting:1;
+ bool recounting:1;
/* Quota root is hidden (to e.g. IMAP GETQUOTAROOT) */
- unsigned int hidden:1;
+ bool hidden:1;
/* Is quota_over_flag* initialized yet? */
- unsigned int quota_over_flag_initialized:1;
+ bool quota_over_flag_initialized:1;
/* Is user currently over quota? */
- unsigned int quota_over_flag_status:1;
+ bool quota_over_flag_status:1;
/* Did we already check quota_over_flag correctness? */
- unsigned int quota_over_flag_checked:1;
+ bool quota_over_flag_checked:1;
};
struct quota_transaction_context {
struct mail *tmp_mail;
enum quota_recalculate recalculate;
- unsigned int limits_set:1;
- unsigned int failed:1;
- unsigned int sync_transaction:1;
+ bool limits_set:1;
+ bool failed:1;
+ bool sync_transaction:1;
/* TRUE if all roots have auto_updating=TRUE */
- unsigned int auto_updating:1;
+ bool auto_updating:1;
};
/* Register storage to all user's quota roots. */
ARRAY(uoff_t) expunge_sizes;
unsigned int prev_idx;
- unsigned int recalculate:1;
- unsigned int sync_transaction_expunge:1;
+ bool recalculate:1;
+ bool sync_transaction_expunge:1;
};
struct quota_user_module quota_user_module =
ARRAY(struct mail *) backend_mails;
/* mail is lost if backend_mail doesn't point to correct mail */
- unsigned int cur_lost:1;
+ bool cur_lost:1;
};
struct mail *
/* mailbox metadata matching */
const char *metadata_entry, *metadata_value;
- unsigned int open_tracked:1;
- unsigned int open_failed:1;
- unsigned int sync_seen:1;
- unsigned int wildcard:1;
- unsigned int clear_recent:1;
- unsigned int negative_match:1;
- unsigned int uids_nonsorted:1;
- unsigned int search_args_initialized:1;
- unsigned int deleted:1;
+ bool open_tracked:1;
+ bool open_failed:1;
+ bool sync_seen:1;
+ bool wildcard:1;
+ bool clear_recent:1;
+ bool negative_match:1;
+ bool uids_nonsorted:1;
+ bool search_args_initialized:1;
+ bool deleted:1;
};
ARRAY_DEFINE_TYPE(virtual_backend_box, struct virtual_backend_box *);
ARRAY_TYPE(mailbox_virtual_patterns) list_include_patterns;
ARRAY_TYPE(mailbox_virtual_patterns) list_exclude_patterns;
- unsigned int uids_mapped:1;
- unsigned int sync_initialized:1;
- unsigned int inconsistent:1;
- unsigned int have_guid_flags_set:1;
- unsigned int have_guids:1;
- unsigned int have_save_guids:1;
+ bool uids_mapped:1;
+ bool sync_initialized:1;
+ bool inconsistent:1;
+ bool have_guid_flags_set:1;
+ bool have_guids:1;
+ bool have_save_guids:1;
};
extern MODULE_CONTEXT_DEFINE(virtual_storage_module,
enum mailbox_sync_flags flags;
uint32_t uid_validity;
- unsigned int ext_header_changed:1;
- unsigned int ext_header_rewrite:1;
- unsigned int expunge_removed:1;
- unsigned int index_broken:1;
+ bool ext_header_changed:1;
+ bool ext_header_rewrite:1;
+ bool expunge_removed:1;
+ bool index_broken:1;
};
static void virtual_sync_backend_box_deleted(struct virtual_sync_context *ctx,
/* Module-specific contexts. */
ARRAY(union pop3_module_context *) module_contexts;
- unsigned int disconnected:1;
- unsigned int deleted:1;
- unsigned int waiting_input:1;
- unsigned int anvil_sent:1;
- unsigned int message_uidls_save:1;
- unsigned int delete_success:1;
+ bool disconnected:1;
+ bool deleted:1;
+ bool waiting_input:1;
+ bool anvil_sent:1;
+ bool message_uidls_save:1;
+ bool delete_success:1;
};
struct pop3_module_register {
void *context;
time_t last_connect_failure;
- unsigned int handshaked:1;
- unsigned int cmd_sent:1;
+ bool handshaked:1;
+ bool cmd_sent:1;
};
struct dsync_client *
struct replicator_queue *queue;
- unsigned int version_received:1;
- unsigned int destroyed:1;
+ bool version_received:1;
+ bool destroyed:1;
};
struct notify_sync_request {
ARRAY_TYPE(dsync_client) dsync_clients;
- unsigned int deinitializing:1;
+ bool deinitializing:1;
};
static void replicator_brain_fill(struct replicator_brain *brain);
enum replication_priority priority;
/* User isn't currently in replication queue */
- unsigned int popped:1;
+ bool popped:1;
/* Last replication sync failed */
- unsigned int last_sync_failed:1;
+ bool last_sync_failed:1;
/* Force a full sync on the next replication */
- unsigned int force_full_sync:1;
+ bool force_full_sync:1;
};
typedef void replicator_sync_callback_t(bool success, void *context);