^ appears to work now though, probably because of the added syncing stuff..
- use backup index in mail_index_fsck()
- - proxying: support fallbacking to local (or other?) server if the first
+ - proxying: support falling back to local (or other?) server if the first
one is down
- virtual: If last message matching INTHREAD rule gets expunged, the rest of
the thread doesn't go away
# Uncomment to allow Dovecot daemons to produce core dumps.
#ulimit -c unlimited
-# RedHat config
+# Red Hat config
[ -e /etc/sysconfig/dovecot ] && . /etc/sysconfig/dovecot
# Debian config
ldap_iter = db_ldap_result_iterate_init(conn, ldap_request, res,
skip_null_values);
while (db_ldap_result_iterate_next(ldap_iter, &name, &values)) {
- /* normalize to lower case, as ldap names are case insensitive. */
+ /* normalize to lower case, as ldap names are case-insensitive. */
name = t_str_lcase(name);
auth_fields_add(fields, name, values[0], 0);
if (values[0] != NULL && values[1] != NULL) {
const char *active_attribute;
/* expected active value for active attribute, optional */
const char *active_value;
- /* client identificator for oauth2 server */
+ /* client identifier for oauth2 server */
const char *client_id;
/* not really used, but have to present by oauth2 specs */
const char *client_secret;
the parsing code sees a filter that includes groups, it immediately
processes all the group filters and applies any matches. This is needed,
because group includes can exist hierarchically so that the most specific
- (innermost filter) includes are fully applied before the less epecific
+ (innermost filter) includes are fully applied before the less specific
(outermost filter / global) includes. So if there is e.g. a global
@group=foo and namespace { @group=bar } which both modify the same setting,
the @group=bar must be applied first to get the expected value. If the same
struct dict_connection *conn =
container_of(_conn, struct dict_connection, conn);
- /* protocol handshake is Hmajor minor value_type */
+ /* protocol handshake is 'H' major <tab> minor <tab> value_type */
if (str_array_length(args) < 5 || **args != 'H')
return -1;
i_assert(array_count(&conn->cmds) == 0);
/* we should have only transactions that haven't been committed or
- rollbacked yet. close those before dict is deinitialized. */
+ rolled back yet. close those before dict is deinitialized. */
if (array_is_created(&conn->transactions)) {
array_foreach_modifiable(&conn->transactions, transaction)
dict_transaction_rollback(&transaction->ctx);
/* If non-NULL, we're syncing within the dsync process using ibc-pipe.
This mail can be used to mailbox_copy() the mail. */
struct mail *input_mail;
- /* Verify that this equals to input_mail->uid */
+ /* Verify that this equals input_mail->uid */
uint32_t input_mail_uid;
/* TRUE if the following fields aren't set, because minimal_fill=TRUE
exporter->box, &mail_error);
/* Unavailable can come from imapc attributes
- when backand doesn't offer the capability,
+ when backend doesn't offer the capability,
just ignore the error in this case */
if (mail_error == MAIL_ERROR_UNAVAILABLE)
continue;
exporter->box, &mail_error);
/* Unavailable can come from imapc attributes
- when backand doesn't offer the capability,
+ when backend doesn't offer the capability,
just ignore the error in this case */
if (mail_error == MAIL_ERROR_UNAVAILABLE)
continue;
and remote_node2. They have identical names. We also know that
local_node1&remote_node1 and local_node2&remote_node2 are "the same"
either because their GUIDs or (in case of one being a directory)
- their childrens' GUIDs match. We don't know where local_node2 or
+ their children's GUIDs match. We don't know where local_node2 or
remote_node1 are located in the mailbox tree, or if they exist
at all. Note that node1 and node2 may be the same node pointers. */
i_assert(strcmp(local_node1->name, remote_node2->name) == 0);
/* The name is currently <oldname>-<temp>. Both sides need to
use equivalent names, so we'll replace the <temp> if possible
- with a) mailbox GUID, b) sha1 of childrens' (GUID|name)s. In the
+ with a) mailbox GUID, b) sha1 of children's (GUID|name)s. In the
very unlikely case of such name already existing, just increase
the last letters until it's not found. */
new_suffix = mailbox_node_generate_suffix(node);
This is the login service which operates identical to imap-login and
pop3-login equivalents, except for the fact that only token authentication is
allowed. It verifies that the connecting client is an IMAP service acting on
- behaf of an authenticated user.
+ behalf of an authenticated user.
- imap-urlauth:
Once the client is authenticated, the connection gets passed to the
mail_set = mail_user_set_get_storage_set(user);
/* NOTIFY is enabled only when mailbox list indexes are enabled,
- althoaugh even that doesn't necessarily guarantee it always */
+ although even that doesn't necessarily guarantee it always */
if (!mail_set->mailbox_list_index)
imap_unset_capability(set_instance, "NOTIFY");
struct imap_client_vfuncs {
/* Perform client initialization. This is called when client creation is
- finished completely. Particulary, at this point the namespaces are
+ finished completely. Particularly, at this point the namespaces are
fully initialized, which is not the case for the client create hook.
*/
void (*init)(struct client *client);
base64_encode(str_data(resp), str_len(resp), resp_b64);
info.initial_resp_base64 = str_c(resp_b64);
} else if (strcasecmp(mech, "LOGIN") == 0) {
- /* no intial response */
+ /* no initial response */
} else {
i_unreached();
}
const unsigned char *data;
size_t size;
- /* Peek in to the stream and see if it looks like it's compressed
+ /* Peek into the stream and see if it looks like it's compressed
(based on its header). This also means that users can try to exploit
security holes in the uncompression library by APPENDing a specially
crafted mail. So let's hope zlib is free of holes. */
if (zstream->starting_concated_output) {
/* make sure there actually is something in parent stream.
we don't want to reset the stream unless we actually see
- some concated output. */
+ some concatenated output. */
ret = i_stream_read_more(stream->parent, &data, &size);
if (ret <= 0) {
if (ret == 0)
buffer_t *buf = t_buffer_create(512);
if (compression_lookup_handler("gz", &gz) <= 0 )
- return; /* not compiled in or unkown*/
+ return; /* not compiled in or unknown */
- /* write concated output */
+ /* write concatenated output */
buf_output = o_stream_create_buffer(buf);
o_stream_set_finish_via_child(buf_output, FALSE);
o_stream_destroy(&buf_output);
- /* read concated input */
+ /* read concatenated input */
const unsigned char *data;
size_t size;
test_input = test_istream_create_data(buf->data, buf->used);
};
struct istream *file_input, *input;
if (compression_lookup_handler("gz", &gz) <= 0 )
- return; /* not compiled in or unkown*/
+ return; /* not compiled in or unknown */
test_begin(t_strdup_printf(
"gz header (autodetect=%s)", autodetect ? "yes" : "no"));
size_t i;
if (compression_lookup_handler("gz", &gz) <= 0 )
- return; /* not compiled in or unkown*/
+ return; /* not compiled in or unknown */
test_begin(t_strdup_printf(
"gz large header (autodetect=%s)", autodetect ? "yes" : "no"));
struct istream *file_input, *input;
if (compression_lookup_handler("lz4", &lz4) <= 0)
- return; /* not compiled in or unkown */
+ return; /* not compiled in or unknown */
test_begin("lz4 small header");
const unsigned char *ptr = iov[i].iov_base;
while(len > 0) {
buffer_clear_safe(&buf);
- /* update can emite twice the size of input */
+ /* update can emit twice the size of input */
bl = I_MIN(sizeof(ciphertext)/2, len);
if (!dcrypt_ctx_sym_update(estream->ctx_sym, ptr + off,
static struct fs_file *fs_file_get_error_file(struct fs_file *file)
{
- /* the error is always kept in the parentmost file */
+ /* the error is always kept in the parent-most file */
while (file->parent != NULL)
file = file->parent;
return file;
conn->incoming_payload = NULL;
/* Input stream may have pending input. make sure input handler
- gets called (but don't do it directly, since we get get here
+ gets called (but don't do it directly, since we get here
somewhere from the API user's code, which we can't really know what
state it is in). this call also triggers sending a new request if
necessary. */
case HTTP_CLIENT_PEER_ADDR_HTTPS_TUNNEL:
/* Queues are created with peer addresses that have an
uninitialized IP value, because that is assigned later when
- the host lookup completes. In all other other contexts, the
+ the host lookup completes. In all other contexts, the
IP is always initialized, so we do not compare IPs when one
of them is unassigned. */
if (peer1->a.tcp.ip.family != 0 &&
peer->connect_failed = TRUE;
- /* Make a copy of the queue array; queues get linked/unlinged while the
+ /* Make a copy of the queue array; queues get linked/unlinked while the
connection failure is handled */
t_array_init(&queues, array_count(&peer->queues));
array_copy(&queues.arr, 0, &peer->queues.arr, 0,
return;
}
- /* If our our previous connection attempt takes longer than the
+ /* If our previous connection attempt takes longer than the
soft_connect_timeout, we start a connection attempt to the next IP in
parallel */
https_name = http_client_peer_addr_get_https_name(addr);
if (http_client_host_ready(host) &&
queue->addr.type != HTTP_CLIENT_PEER_ADDR_UNIX) {
- /* We achieved at least one connection the the addr->ip */
+ /* We achieved at least one connection the addr->ip */
if (!http_client_host_get_ip_idx(
host, &addr->a.tcp.ip, &queue->ips_connect_start_idx)) {
/* list of IPs changed during connect */
bool http_client_request_try_retry(struct http_client_request *req);
/* Fail the request. This can also be used instead of submitting the request to
- cause the request callback to be called later on with the spcified error. */
+ cause the request callback to be called later on with the specified error. */
void http_client_request_error(struct http_client_request **req,
unsigned int status, const char *error);
/* Abort the request immediately. It may still linger for a while when it is
filled manually. */
void http_client_settings_init(pool_t pool, struct http_client_settings *set_r);
/* Create a client using the global shared client context. The parent event can
- be overriden for specific requests with http_client_request_set_event(). */
+ be overridden for specific requests with http_client_request_set_event(). */
struct http_client *http_client_init(const struct http_client_settings *set,
struct event *event_parent);
/* Same as http_client_init(), but pull settings automatically. */
p_strdup(pool, params->temp_path_prefix);
client->params.flags = params->flags;
- /* Set the overriden parameter only if it is set. */
+ /* Set the overridden parameter only if it is set. */
client->dns_client_socket_path =
(params->override_dns_client_socket_path != NULL) ?
p_strdup(pool, params->override_dns_client_socket_path) :
if ((ret = imapc_connection_read_line(conn, &imap_args)) <= 0)
return ret;
- /* we already verified that the banner beigns with OK */
+ /* we already verified that the banner begins with OK */
i_assert(imap_arg_atom_equals(imap_args, "OK"));
imap_args++;
#include "imap-envelope.h"
#include "imap-bodystructure.h"
-/* The max level of lists nesting inside the parhentesised representation of a
+/* The max level of lists nesting inside the parenthesised representation of a
single part with no other parts inside, i.e. the max level of list nesting
in representing a single part. According to RFC-3501, this should be in the
order of a couple of nestings only, let's keep some margin just in case. */
return -1;
}
if (part != NULL) {
- /* parsing with pre-existing message_part tree */
+ /* parsing with preexisting message_part tree */
parsing_tree = FALSE;
} else {
/* parsing message_part tree from BODYSTRUCTURE as well */
an uncommitted transaction. */
uint32_t offset;
- /* Used to loop through all changes in the uncommited transaction,
+ /* Used to loop through all changes in the uncommitted transaction,
in case there are multiple changes to the same message. */
unsigned int trans_next_idx;
bool disk_appends_checked:1;
/* TRUE if the field index numbers in rec as the internal
mail_cache_field.idx (instead of the file-specific indexes).
- This indicates that the rec points to uncommited transaction's
+ This indicates that the rec points to uncommitted transaction's
in-memory buffer. */
bool inmemory_field_idx:1;
};
struct mail_index_error last_error;
/* Timestamp when mmap() failure was logged the last time. This is used
to prevent logging the same error too rapidly. This could happen
- e.g. if mmap()ing a large cache file that exceeeds process's
+ e.g. if mmap()ing a large cache file that exceeds process's
VSZ limit. */
time_t last_mmap_error_time;
/* If non-NULL, dovecot.index should be recreated as soon as possible.
enum mail_index_header_compat_flags {
/* All fields in these index files are in little-endian format.
- If the current CPU endianess doesn't match this, the indexes can't
- be used. There is currently no support to translate endianess. */
+ If the current CPU endianness doesn't match this, the indexes can't
+ be used. There is currently no support to translate endianness. */
MAIL_INDEX_COMPAT_LITTLE_ENDIAN = 0x01
};
void mail_index_append(struct mail_index_transaction *t, uint32_t uid,
uint32_t *seq_r);
/* Assign new UIDs for mails with uid=0 or uid<min_allowed_uid. All the new
- UIDs are >= first_new_uid, an also higher than the highest seen uid (i.e. it
+ UIDs are >= first_new_uid, and also higher than the highest seen uid (i.e. it
doesn't try to fill UID gaps). Assumes that mailbox is locked in a way that
UIDs can be safely assigned. Returns UIDs for all assigned messages, in
their sequence order (so UIDs are not necessary ascending). */
if (file == NULL || file->hdr.file_seq != seq) {
/* see if we could find the missing file. if we know
- the max. file sequence or we don't have the the min.
+ the max. file sequence or we don't have the min.
file, make sure NFS attribute cache gets flushed if
necessary. */
bool nfs_flush = seq == min_file_seq ||
These are mainly useful to optimize syncing when the start position
is (prev_file_seq, prev_file_offset). Then it's it's already known
- that the syncing can be started from this log file wihtout having
+ that the syncing can be started from this log file without having
to open the previous log file only to realize that there is nothing
to sync. (Which could have also lead to an error if the .log.2 was
already deleted.) */
i_assert(generator->value_input == NULL);
i_assert(generator->state == JSON_GENERATOR_STATE_STRING);
if (generator->write_state != JSON_GENERATOR_STATE_STRING) {
- /* This function does not flush first before changing state, nor
- does the string_open() function. So, we need to remember
- closing the an empty string, because otherwise nothing will
+ /* Neither this nor the string_open() function flushes
+ first before changing state. So, we need to remember
+ closing the empty string, because otherwise nothing will
be emitted. */
generator->string_empty = TRUE;
}
remainder of the JSON input, an error will occur. This function returns -1
upon error, 0 when more input is needed to finish and 1 when finishing the
input was successful. The error_r parameter will be set when the return value
- is -1 and will return any (pre-existing or final) error in the stream. The
+ is -1 and will return any (preexisting or final) error in the stream. The
provided stream is dereferenced implicitly when the return value is not 0. */
int json_istream_finish(struct json_istream **_stream,
const char **error_r);
void json_ostream_ndescend_array(struct json_ostream *stream,
const char *name);
-/* Try to ascend from a JSON arrayh by writing ']' to the output stream.
+/* Try to ascend from a JSON array by writing ']' to the output stream.
Returns 1 if buffered, 0 if not, -1 if error. */
int json_ostream_ascend_array(struct json_ostream *stream);
void json_ostream_nascend_array(struct json_ostream *stream);
/* Parsed to end of currently buffered data */
JSON_PARSE_NO_DATA = -4,
/* Prevent call stack overflow
- (to support arbitrarely deeply nested input) */
+ (to support arbitrarily deeply nested input) */
JSON_PARSE_CALL_STACK_OVERFLOW = -3,
/* Encountered invalid/unexpected syntax */
JSON_PARSE_UNEXPECTED_EOF = -2,
if (parser->str_stream == NULL &&
parser->str_stream_max_buffer_size > 0 &&
max_size > parser->str_stream_threshold) {
- /* Return string stream immediately once the treshold is
+ /* Return string stream immediately once the threshold is
crossed */
max_size = parser->str_stream_threshold;
}
.input = "[\"\\",
},
{
- // n_string_unescaped_crtl_char.json
+ // n_string_unescaped_ctrl_char.json
.input = "[\"a\x00a\"]",
},
{
extern const struct lang_filter *lang_filter_stemmer_snowball;
/*
- Settings: "id", description of the normalizing/translitterating rules
+ Settings: "id", description of the normalizing/transliterating rules
to use. See
http://userguide.icu-project.org/transforms/general#TOC-Transliterator-Identifiers
for syntax. Defaults to "Any-Lower; NFKD; [: Nonspacing Mark :] Remove; NFC"
return TRUE;
}
-/* Used to rewind past characters that can not be the start of a new localpart.
+/* Used to rewind past characters that cannot be the start of a new localpart.
Returns size that can be skipped. */
static size_t skip_nonlocal_part(const unsigned char *data, size_t size)
{
return 1;
break;
case EMAIL_ADDRESS_PARSER_STATE_SKIP:
- /* The curernt token is too large to determine if it's
+ /* The current token is too large to determine if it's
an email address or not. The address-tokenizer is
simply skipping over it, but the input is being
passed to the parent tokenizer. */
into U+0027 earlier. There can be only a single such
apostrophe, because otherwise the token would have already
been split. We also want to remove the trailing apostrophe
- only if it's the the last character in the nontruncated
+ only if it's the last character in the nontruncated
token - a truncated token may end with apostrophe. */
if (len > 0 && data[len-1] == '\'') {
len--;
}
/* So far the following rule seems give good results in avoid indexing base64
- as keywords. It also seems to run well against against base64 embedded
+ as keywords. It also seems to run well against base64 embedded
headers, like ARC-Seal, DKIM-Signature, X-SG-EID, X-SG-ID, including
encoded parts (e.g. =?us-ascii?Q?...?= sequences).
apostrophe = IS_APOSTROPHE(c);
if ((tok->prefixsplat && IS_PREFIX_SPLAT(c)) &&
(tok->prev_type == LETTER_TYPE_ALETTER)) {
- /* this might be a prefix-mathing query */
+ /* this might be a prefix-matching query */
shift_prev_type(tok, LETTER_TYPE_PREFIXSPLAT);
} else if ((break_type = lang_simple_is_word_break(tok, c, apostrophe))
!= LANG_WORD_TO_WORD) {
#ifndef HAVE_LUA_ISINTEGER
/*
- * Lua 5.3 can actually keep track of intergers vs. numbers. As a
+ * Lua 5.3 can actually keep track of integers vs. numbers. As a
* consequence, lua_isinteger() tells us if the internal representation of
* the number is an integer (vs. a number). In previous versions, there was
* no way to check for this and our compatibility wrapper is not quite
#if LUA_VERSION_NUM > 501 && LUA_VERSION_NUM < 504
/*
* lua_resume() compatibility function. Lua 5.4 expects an extra "nresults"
- * argeument.
+ * argument.
*/
# define lua_resume(L, from, nargs, nresults) \
lua_resume_compat(L, from, nargs, nresults)
* In a couple of places we need to adjust the passed in index to reflect
* additional items pushed onto the stack. We cannot blindly adjust the
* index because the index could be one of three things and only one of them
- * is supposed to be ajusted:
+ * is supposed to be adjusted:
*
* 1. negative number: index relative to top of stack, adjust
* 2. positive number: absolute index, don't adjust
/*
* Pushes onto the stack the value t[k], where t is the value at the given
* index and k is the value at the top of the stack. Unlike lua_gettable(),
- * this function checks the type of the retreived value against the passed
+ * this function checks the type of the retrieved value against the passed
* in type. [-1,+0..1,e]
*
* Return value:
enum dot_state state;
/* state didn't actually start with \r */
bool state_no_cr:1;
- /* state didn't contain \n either (only at the beginnign of stream) */
+ /* state didn't contain \n either (only at the beginning of stream) */
bool state_no_lf:1;
/* we've seen the "." line, keep returning EOF */
bool dot_eof:1;
line_len_left -= n_out;
}
- /* Determine whether a repacement character needs to be written
+ /* Determine whether a replacement character needs to be written
and how much space there is left for it on the current line.
*/
space = 0;
/* extra whitespace */
"Zm9v\n Zm9v\n",
"Zm9v \nZm9v\n",
- /* mixed LF vs CRLFs */
+ /* mixed LF vs CR LF */
"Zm9vYmFy\r\nZm9vYmFy\n",
"Zm9vYmFy\nZm9vYmFy\r\n",
/* line length increases */
}
test_assert(ret == -1);
/* If there is no error still assume that the result is valid
- * till artifical eof. */
+ * till artificial eof. */
if (input->stream_errno == 0) {
unsigned int encoding_margin =
get_encoding_size_diff(qp_input, eof);
if (dlen < SIZEOF_PP2_TLV_SSL)
return -1;
kv->client = kvdata[0];
- /* spec does not specify the endianess of this field */
+ /* spec does not specify the endianness of this field */
kv->verify = cpu32_to_cpu_unaligned(kvdata+1);
kv->data = kvdata+SIZEOF_PP2_TLV_SSL;
kv->len = dlen - SIZEOF_PP2_TLV_SSL;
/* We're in a signal handler: Close listeners immediately so master
can successfully restart. We can safely close only those listeners
that don't have an io, but this shouldn't be a big problem. If there
- is an active io, the service is unlikely to be unresposive for
+ is an active io, the service is unlikely to be unresponsive for
longer periods of time, so the listener gets closed soon enough via
master_status_error().
}
if (service->master_status.available_count == 0) {
/* Client was destroyed, but restart_request_count is now 0.
- The servive was already stopped, so the process will
+ The service was already stopped, so the process will
shutdown and a new process can handle the waiting client
connection. */
i_assert(service->restart_request_count_left == 0);
timeval_diff_msecs(&ioloop_timeval,
&conn->connect_finished);
if (msecs_since_connected >= STATS_CLIENT_RECONNECT_INTERVAL_MSECS) {
- /* reconnect immdiately */
+ /* reconnect immediately */
reconnect_msecs = 0;
} else {
/* wait for reconnect interval since we last
const char *introspection_url;
/* POST refresh here, needs refresh token and client_* settings */
const char *refresh_url;
- /* client identificator for oauth2 server */
+ /* client identifier for oauth2 server */
const char *client_id;
/* client secret for oauth2 server */
const char *client_secret;
SET_ENUM,
SET_FILE, /* string: <path> [<LF> file contents] */
SET_STRLIST, /* of type ARRAY_TYPE(const_string) */
- SET_BOOLLIST, /* of type ARRAY_TYPE(const_string) - guaranteed NULL-terminted */
+ SET_BOOLLIST, /* of type ARRAY_TYPE(const_string) - guaranteed NULL-terminated */
SET_ALIAS, /* alias name for above setting definition */
SET_FILTER_NAME,
SET_FILTER_ARRAY,
.type = LOG_TYPE_DEBUG,
};
- /* So through the filters in reverse sorted order, so we always set the
+ /* Go through the filters in reverse sorted order, so we always set the
setting just once, never overriding anything. A filter for the base
settings is expected to always exist. */
struct event *event = ctx->event;
qtextSMTP = %d32-33 / %d35-91 / %d93-126
; i.e., within a quoted string, any
; ASCII graphic or space is permitted
- ; without blackslash-quoting except
+ ; without backslash-quoting except
; double-quote and the backslash itself.
*/
i_assert(smtp_ehlo_keyword_is_valid(cap->name));
i_assert(smtp_ehlo_params_are_valid(cap->params));
- /* Cannot override standard capabiltiies */
+ /* Cannot override standard capabilities */
i_assert(smtp_capability_find_by_name(cap->name)
== SMTP_CAPABILITY_NONE);
case 5:
test_assert(reply->status ==
SMTP_CLIENT_COMMAND_ERROR_BAD_REPLY);
- /* Don't bother continueing with this test. Second try after
+ /* Don't bother continuing with this test. Second try after
smtp_client_transaction_start() will have the same result. */
smtp_client_transaction_abort(pctx->trans);
break;
struct sql_transaction_context *_ctx = &ctx->ctx;
bool multi = _ctx->head != NULL && _ctx->head->next != NULL;
- /* wrap in BEGIN/COMMIT only if transaction has mutiple statements. */
+ /* wrap in BEGIN/COMMIT only if transaction has multiple statements. */
if (multi && transaction_send_query(ctx, "BEGIN", NULL) < 0) {
if (_ctx->db->state != SQL_DB_STATE_DISCONNECTED)
return -1;
char *peername;
int check_res;
- /* First check DNS name agains CommonName or SubjectAltNames.
+ /* First check DNS name against CommonName or SubjectAltNames.
If failed, check IP addresses. */
if ((check_res = X509_check_host(cert, verify_name, strlen(verify_name),
X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS,
if (fetch_uid != 0 && mbox->state_fetched_success &&
(IMAPC_BOX_HAS_FEATURE(mbox, IMAPC_FEATURE_FETCH_MSN_WORKAROUNDS) ||
IMAPC_BOX_HAS_FEATURE(mbox, IMAPC_FEATURE_NO_MSN_UPDATES))) {
- /* if we know the UID, use own own generated rseq instead of
+ /* if we know the UID, use own generated rseq instead of
the potentially broken rseq that the server sent.
Skip this during the initial FETCH 1:* (UID ..) handling,
or we can't detect duplicate UIDs and will instead
uid < mail_index_get_header(mbox->delayed_sync_view)->next_uid) {
/* message is already added to index */
} else if (mbox->state_fetching_uid1) {
- /* Initial fetching, allow messages to be appened to
+ /* Initial fetching, allow messages to be appended to
index directly */
mail_index_append(mbox->delayed_sync_trans,
uid, lseq_r);
str_append(store_cmd, " +FLAGS (\\Deleted)");
str_append(expunge_cmd, "UID EXPUNGE ");
str_append_str(expunge_cmd, uids);
- /* Clear already appened uids */
+ /* Clear already appended uids */
str_truncate(uids, 0);
}
}
if ((mbox->box.flags & MAILBOX_FLAG_SAVEONLY) != 0) {
/* The mailbox is opened only for saving there is no need to
- expect initial fetchting do be done. */
+ expect initial fetching do be done. */
return FALSE;
}
return TRUE;
/* If uid == 0 but seq != 0, we came here from saving a (non-mbox)
message. If that happens, don't bother checking if anything should
be cached since it was already checked. Also by now the transaction
- may have already been rollbacked and seq point to a nonexistent
+ may have already been rolled back and seq point to a nonexistent
message. */
if (mail->mail.mail.uid != 0) {
index_mail_cache_sizes(mail);
enum mail_index_open_flags open_flags = MAIL_INDEX_OPEN_FLAG_READONLY;
/* Rebuilding really should be done locked so multiple processes won't
- try to rebuild concurrently. Also at the end of rebiuld cache
+ try to rebuild concurrently. Also at the end of rebuild cache
purging requires this lock. */
i_assert(mail_index_is_locked(view->index));
we don't keep rewriting the name just in case some backend switches
between separators when accessed different ways. */
- /* Get the current mailbox name with \0 separators and unesacped. */
+ /* Get the current mailbox name with \0 separators and unescaped. */
size_t box_name_len;
const unsigned char *box_zerosep_name =
mailbox_name_hdr_encode(box->list, box->name, &box_name_len);
}
/* do a second scan to create the actual mailbox tree hierarchy.
- this is needed because the parent_uid may be smaller or higher than
+ this is needed because the parent_uid may be greater than or less than
the current node's uid */
if (*error_r != NULL && ilist->has_backing_store)
count = 0;
A + (A.B) = (A.1) + (A.B) = A(1 + B) = A (OR Absorption Law)
A(A + B) = (A + 0).(A + B) = A + (0.B) = A (AND Absorption Law)
- Cases with multiple shared terms (duals appy as well)
+ Cases with multiple shared terms (duals apply as well)
A + B + (A.C) + (B.C) = (A + (A.C)) + (B + B.C)) (apply law to sides of external sum))
= A + B
struct mail_search_mime_arg *parent;
};
-/* Start building a new MIMPART search key. Use mail_search_mime_args_unref()
+/* Start building a new MIMEPART search key. Use mail_search_mime_args_unref()
to free it. */
struct mail_search_mime_part *mail_search_mime_build_init(void);
/* Get the next string. Returns 0 if ok, -1 if parsing error. */
int mail_search_parse_string(struct mail_search_parser *parser,
const char **value_r);
-/* If next parameter equals to the given string case-insensitively, skip over
+/* If next parameter equals the given string case-insensitively, skip over
it and return TRUE. Otherwise do nothing and return FALSE. */
bool mail_search_parse_skip_next(struct mail_search_parser *parser,
const char *str);
!str_begins_with(vname, "INBOX")) {
/* make sure INBOX shows up in uppercase everywhere. do this
regardless of whether we're in inbox=yes namespace, because
- clients expect INBOX to be case insensitive regardless of
+ clients expect INBOX to be case-insensitive regardless of
server's internal configuration. */
if (suffix[0] == '\0')
vname = "INBOX";
/* If some operation is taking long, call notify_ok every n seconds. */
#define MAIL_STORAGE_NOTIFY_INTERVAL_SECS 10
-/* Expunge transactions are to be commited after
+/* Expunge transactions are to be committed after
every MAIL_EXPUNGE_BATCH_SIZE mails */
#define MAIL_EXPUNGE_BATCH_SIZE 1000
void var_expand_crypt_init(struct module *module ATTR_UNUSED)
{
- /* do not initialize dcrypt here - saves alot of memory
+ /* do not initialize dcrypt here - saves a lot of memory
to not load openssl every time. Only load it if
needed */
# of lex and yacc (or bison in yacc-compatibility mode). Both flex and
# bison can handle properly naming the generated files, and it is simpler
# and cleaner to make this rule ourselves instead of working around ylwrap
-# and yywrap's antiquated notion of what is hapenning.
+# and yywrap's antiquated notion of what is happening.
.l.c:
$(AM_V_GEN)$(FLEX) -o $@ $<
ret = (*fn)(stmt, state, &error);
} T_END_PASS_STR_IF(ret < 0, &error);
i_free(delayed_error);
- /* this is to allow e.g. defaut to work correctly */
+ /* this is to allow e.g. default to work correctly */
if (ret < 0) {
var_expand_state_unset_transfer(state);
if (state->delayed_error != NULL) {
# of lex and yacc (or bison in yacc-compatibility mode). Both flex and
# bison can handle properly naming the generated files, and it is simpler
# and cleaner to make this rule ourselves instead of working around ylwrap
-# and yywrap's antiquated notion of what is hapenning.
+# and yywrap's antiquated notion of what is happening.
.l.c:
$(AM_V_GEN)$(FLEX) -o $@ $<
struct hash_format;
/* Initialize formatting hash. Format can contain text with %{sha1} style
- variables. Each hash hash can be also truncated by specifying the number
+ variables. Each hash can be also truncated by specifying the number
of bits to truncate to, such as %{sha1:80}. */
int hash_format_init(const char *format_string, struct hash_format **format_r,
const char **error_r);
struct hook_stack *prev, *next;
/* Pointer to vfuncs struct. This assumes that a struct containing
- function pointers equals to an array of function pointers. Not
+ function pointers equals an array of function pointers. Not
ANSI-C, but should work in all OSes supported by Dovecot. Much
easier anyway than doing this work manually.. */
void (**vfuncs)();
The ioloop context is a global state, so only a single context can be active
at a time. The callbacks are guaranteed to be called only at their proper
states, i.e. activate() callback is called only when switching from
- no context to the active context, and deactive() is called only when
+ no context to the active context, and deactivate() is called only when
switching from previously activated context into no context. No context is
active at a time when the ioloop is destroyed. */
void io_loop_context_add_callbacks(struct ioloop_context *ctx,
completion callback is called with success parameter to
indicate whether it ended with error.
-The istreams and ostreams are reffed on creation and unreffed
+The istreams and ostreams are reffed on creation and unrefed
on unref.
**/
callback is called with success parameter to indicate whether it ended
with error.
- The istream and ostream are reffed on creation and unreffed
+ The istream and ostream are reffed on creation and unrefed
on unref.
*/
indicated limit. Use this function to prevent growing the stream buffer
beyond what the application is willing to read immediately. Since this
function doesn't fully prevent buffering beyond the limit, the amount of data
- actually buffered can exceed the limit. However, *size_r will allways be <=
+ actually buffered can exceed the limit. However, *size_r will always be <=
limit to avoid confusion. */
int i_stream_read_limited(struct istream *stream, const unsigned char **data_r,
size_t *size_r, size_t limit);
struct event_internal_category {
/* More than one category can be represented by the internal state.
To give consumers a unique but consistent category pointer, we
- return a pointer to this 'represetative' category structure.
+ return a pointer to this 'representative' category structure.
Because we allocated it, we know that it will live exactly as
long as we need it to. */
struct event_category representative;
* G -> E -> F
*
* where G contains the fields and categories of A, B, and C (and trivially
- * D beacuse D was empty).
+ * D because D was empty).
*
* Note that even though F has not yet been sent out, we send it now because
* it is part of the "rest" range.
}
/* For allocfree and system pools you can use SIZE_MAX
- to indicate that you have no knowlege of the old size. */
+ to indicate that you have no knowledge of the old size. */
static inline void * ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
p_realloc(pool_t pool, void *mem, size_t old_size, size_t new_size)
{
return FALSE;
/* If the file was already locked, we'll just get the same lock
- again. It should succeed just fine. If was was unlocked, we'll
+ again. It should succeed just fine. If was unlocked, we'll
have to get a lock and then unlock it. Linux 2.6 flushes read cache
only when read/write locking succeeded. */
fl.l_type = F_RDLCK;
bool output_started:1;
/* Output was finished (output_finish() vfunc was called). */
bool output_finished:1;
- /* Output was was closed somehow. This means that the output is no
+ /* Output was closed somehow. This means that the output is no
longer available. This is not the same as the ostream close flag. */
bool output_closed:1;
/* Output was closed directly or indirectly by the application action.
#include "unichar.h"
#include "punycode.h"
-/* Bootstring parameters for Punycode */
+/* Boot string parameters for Punycode */
static const unsigned int base = 36; /* maximum basic code point */
static const unsigned int tmin = 1;
{
i_info("Random numbers are PRNG using kiss, as per DOVECOT_SRAND=%u", seed);
kiss_seed = seed;
- kiss_jsr = 0x5eed5eed; /* simply musn't be 0 */
+ kiss_jsr = 0x5eed5eed; /* simply mustn't be 0 */
kiss_z = 1 ^ (kiss_w = kiss_jcong = seed); /* w=z=0 is bad, see Rose */
kiss_in_use = TRUE;
}
void seqset_builder_add(struct seqset_builder *builder, uint32_t seq)
{
if (builder->last_seq == 0) {
- /* No seq was yet appened so just append this one */
+ /* No seq was yet appended so just append this one */
seqset_builder_append_one(builder, seq);
} else if (builder->last_seq + 1 == seq) {
/* This seq is following directly on the previous one
void seqset_builder_deinit(struct seqset_builder **builder)
{
- /* If anything was appened to the string remove the trailing ',' */
+ /* If anything was appended to the string remove the trailing ',' */
if ((*builder)->last_seq != 0)
str_truncate((*builder)->str, str_len((*builder)->str) - 1);
i_free(*builder);
}
/* This macro ensures we add unsigned char to str to avoid
implicit casts which cause errors with clang's implicit integer truncation
- sanitizier. Issues caught by these sanitizers are not undefined behavior,
+ sanitizer. Issues caught by these sanitizers are not undefined behavior,
but are often unintentional.
We also need to check that the type we are adding is compatible with char,
so that we don't end up doing a narrowing cast. */
int str_parse_uintmax(const char *str, uintmax_t *num_r,
const char **endp_r) ATTR_WARN_UNUSED_RESULT ATTR_NULL(3);
-/* Returns TRUE if str is a valid unsigned number that equals to num. */
+/* Returns TRUE if str is a valid unsigned number that equals num. */
bool str_uint_equals(const char *str, uintmax_t num);
/*
* - numbers 5, 6, and 7 are equivalent
* - numbers 9, 10, and 11 are equivalent
*
- * The truth arugments specify the expected truth-iness of the
+ * The truth arguments specify the expected truth-iness of the
* passed in expressions.
*/
#define BINARY(opstr, op) \
test_assert(s1 == NULL);
test_assert(s2 == NULL);
- /* allcating new memory with realloc */
+ /* allocating new memory with realloc */
s1 = i_realloc_type(NULL, struct test_struct, 0, 2);
s2 = i_realloc(NULL, 0, sizeof(struct test_struct) * 2);
s1[0] = ab; s2[0] = ab;
i_stream_ref(sinput3);
}
- /* Create second deoder stream */
+ /* Create second decoder stream */
input5 = i_stream_create_base64_decoder(sinput3);
i_stream_set_name(input5, "[base64_decoder #2]");
test_assert(!tctx.signal_handled);
tctx.timed_out = FALSE;
- /* run inner ioloop, which triggers the signal but musn't handle it */
+ /* run inner ioloop, which triggers the signal but mustn't handle it */
ioloop2 = io_loop_create();
to_kill = timeout_add_short(200, kill_timeout, &tctx);
to_test = timeout_add_short(400, test_timeout, &tctx);
character is returned in ch_r upon success. */
int uri_parse_pct_encoded(struct uri_parser *parser, unsigned char *ch_r);
-/* Parse characters as long as these comply with the the 'unreserved' syntax.
+/* Parse characters as long as these comply with the 'unreserved' syntax.
Returns 1 if characters were found, 0 if none were found, and -1 if there was
an error. */
int uri_parse_unreserved(struct uri_parser *parser, string_t *part);
processes that were already running for a while.
Try to avoid failure storms at Dovecot startup by throttling
the service if it only keeps failing rapidly. This is no
- longer done after the service looks to be generailly working,
+ longer done after the service looks to be generally working,
in case an attacker finds a way to quickly crash their own
session. */
if (service->exit_failure_last != ioloop_time) {
idle_start == 0. */
struct service_process *busy_processes;
/* linked list of processes belonging to this service, which have
- ldle_start != 0. */
+ idle_start != 0. */
struct service_process *idle_processes_head, *idle_processes_tail;
/* number of processes currently created for this service */
struct io *io_master;
int master_fd;
- /* nonblocking log fds usd by master */
+ /* nonblocking log fds used by master */
int master_log_fd[2];
struct service_process_notify *log_byes;
the list pattern? */
if (ctx->lookup_boxes != NULL) {
/* we have a list of mailboxes with LOOKUP rights. before
- starting the slow list iteration, check check first
+ starting the slow list iteration, check first
if there even are any children with LOOKUP rights. */
struct mailbox_node *node;
iter_mailbox_has_visible_children(_ctx, TRUE, FALSE)) {
/* no child mailboxes match the list pattern(s), but mailbox
has visible children. we'll need to show this as
- non-existent. */
+ nonexistent. */
info->flags = MAILBOX_NONEXISTENT | MAILBOX_CHILDREN |
(info->flags & PRESERVE_MAILBOX_FLAGS);
return 1;
#define FLATCURVE_XAPIAN_DB_CURRENT_PREFIX "current."
/* These are temporary data types that may appear in the fts directory. They
- * are not intended to perservere between sessions. */
+ * are not intended to persist between sessions. */
#define FLATCURVE_XAPIAN_DB_OPTIMIZE "optimize"
/* Xapian "recommendations" are that you begin your local prefix identifier
* "convention". However, this recommendation is for maintaining
* compatability with the search front-end (Omega) that they provide. We don't
* care about compatability, so save storage space by using single letter
- * prefixes. Bodytext is stored without prefixes, as it is expected to be the
+ * prefixes. Body text is stored without prefixes, as it is expected to be the
* single largest storage pool. */
/* Caution: the code below expects these prefix to be 1-char long */
file_lock_free(&backend->xapian->lock);
}
-/* Returns: 0 if read DB is null, 1 if database has been addeds, -1 on error */
+/* Returns: 0 if read DB is null, 1 if database has been added, -1 on error */
static int
fts_flatcurve_xapian_db_read_add(struct flatcurve_fts_backend *backend,
struct flatcurve_xapian_db *xdb,
FLATCURVE_XAPIAN_DB_CLOSE_MBOX)) {
int ret = 0;
try {
- /* even if xapian documetation states that close
+ /* even if xapian documentation states that close
auto-commits, GlassWritableDatabase::close() can
fail to actually close the db if commit fails.
We explicitly commit before invoking close to
{
/* Headers that don't contain any human language will only be
translated to lowercase - no stemming or other filtering. There's
- unfortunately no pefect way of detecting which headers contain
+ unfortunately no perfect way of detecting which headers contain
human languages, so we check with fts_header_has_language if the
header is something that's supposed to containing human text. */
if (fts_header_has_language(hdr->name))
} T_END;
if (fts_parser_init(&parser_context, &ctx->body_parser)) {
- /* extract text using the the returned parser */
+ /* extract text using the returned parser */
*binary_body_r = TRUE;
key.type = FTS_BACKEND_BUILD_KEY_BODY_PART;
} else if (str_begins_with(parser_context.content_type, "text/") ||
doveadm_print("");
} else {
/* this is to make it more compatible with openssl cli
- as it expects BEGIN on it's own line */
+ as it expects BEGIN on its own line */
doveadm_print(t_strdup_printf("\n%s", str_c(out)));
}
dcrypt_key_unref_private(&pkey);
} else {
/* This is a shared mailbox. The quota user is the actual owner
of the mailbox, but the mailbox is accessed via another
- user. Currently each shared namepace gets its own owner
+ user. Currently each shared namespace gets its own owner
mail_user, even when the same user has multiple shared
namespaces. So we don't need to verify whether the namespace
matches - there is always only one. */
/* append category names using 'append' function pointer, separated by 'separator' arg
The result has no duplicates regardless of if the array has any or if any
- of the categories' ancestors are implictly or explicitly duplicated. */
+ of the categories' ancestors are implicitly or explicitly duplicated. */
void event_export_helper_fmt_categories(string_t *dest,
const struct event *event,
void (*append)(string_t *, const char *),
struct metric *const *first = array_idx(&root_metric->sub_metrics, 0);
- /* examime each sub-metric */
+ /* examine each sub-metric */
for (i = 0; i < test->num_values; i++) {
test_stats_metrics_group_by_check_one(first[i],
test->values_first[i],
/* nothing to do */
}
- /* NOTE: actually, pipelining the AUTH command is stricly
+ /* NOTE: actually, pipelining the AUTH command is strictly
speaking not allowed, but we support it anyway.
*/
}
{
struct client_extra_capability cap;
- /* Don't add capabilties handled by lib-smtp here */
+ /* Don't add capabilities handled by lib-smtp here */
i_assert(smtp_capability_find_by_name(capability)
== SMTP_CAPABILITY_NONE);