if (created) {
/* negative cache entry */
obj_cache->my_current_rights = &negative_cache_entry;
- }
+ }
}
void *acl_cache_get_validity(struct acl_cache *cache, const char *objname)
if (xdb->type == FLATCURVE_XAPIAN_DB_TYPE_CURRENT &&
fts_flatcurve_xapian_check_db_version(backend, xdb, error_r) < 0)
- return -1;
+ return -1;
e_debug(backend->event, "Opened DB (RW, %s) messages=%u version=%u",
xdb->dbpath->fname, xdb->dbw->get_doccount(),
static const enum flatcurve_xapian_db_opts opts =
(enum flatcurve_xapian_db_opts)
(FLATCURVE_XAPIAN_DB_NOCREATE_CURRENT |
- FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
+ FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
struct flatcurve_xapian *x = backend->xapian;
i_zero(check);
{
static const enum flatcurve_xapian_db_opts opts =
(enum flatcurve_xapian_db_opts)
- (FLATCURVE_XAPIAN_DB_NOCREATE_CURRENT |
- FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
+ (FLATCURVE_XAPIAN_DB_NOCREATE_CURRENT |
+ FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
struct flatcurve_xapian_db *xdb;
int ret = fts_flatcurve_xapian_write_db_current(
{
static const enum flatcurve_xapian_db_opts opts =
(enum flatcurve_xapian_db_opts)
- (FLATCURVE_XAPIAN_DB_NOCREATE_CURRENT |
- FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
+ (FLATCURVE_XAPIAN_DB_NOCREATE_CURRENT |
+ FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
struct flatcurve_xapian *x = backend->xapian;
if (x->db_read == NULL) {
{
static const enum flatcurve_xapian_db_opts opts =
(enum flatcurve_xapian_db_opts)
- (FLATCURVE_XAPIAN_DB_NOCREATE_CURRENT |
- FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
+ (FLATCURVE_XAPIAN_DB_NOCREATE_CURRENT |
+ FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
Xapian::Database *db;
Xapian::TermIterator iter, end;
if (*key == *FLATCURVE_XAPIAN_ALL_HEADERS_PREFIX)
++key;
else if (*key == *FLATCURVE_XAPIAN_BOOLEAN_FIELD_PREFIX ||
- *key == *FLATCURVE_XAPIAN_HEADER_PREFIX)
+ *key == *FLATCURVE_XAPIAN_HEADER_PREFIX)
continue;
}
if (xdb->db != NULL &&
HAS_ANY_BITS(opts, FLATCURVE_XAPIAN_DB_CLOSE_DB |
- FLATCURVE_XAPIAN_DB_CLOSE_MBOX)) {
+ FLATCURVE_XAPIAN_DB_CLOSE_MBOX)) {
delete(xdb->db);
xdb->db = NULL;
}
static const enum flatcurve_xapian_db_opts opts =
(enum flatcurve_xapian_db_opts)
(FLATCURVE_XAPIAN_DB_NOCREATE_CURRENT |
- FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
+ FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
Xapian::Database *db;
int ret = fts_flatcurve_xapian_read_db(backend, opts, &db, error_r);
static const enum flatcurve_xapian_db_opts opts =
(enum flatcurve_xapian_db_opts)
(FLATCURVE_XAPIAN_DB_NOCREATE_CURRENT |
- FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
+ FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
if (fts_flatcurve_xapian_read_db(backend, opts, NULL, error_r) <= 0)
return -1;
xdb->type = FLATCURVE_XAPIAN_DB_TYPE_OPTIMIZE;
if (fts_flatcurve_xapian_write_db_get(
- backend, xdb, FLATCURVE_XAPIAN_WDB_CREATE, error_r) < 0)
+ backend, xdb, FLATCURVE_XAPIAN_WDB_CREATE, error_r) < 0)
return -1;
Xapian::Enquire enquire(*db);
static const enum flatcurve_xapian_db_opts opts =
(enum flatcurve_xapian_db_opts)
(FLATCURVE_XAPIAN_DB_NOCREATE_CURRENT |
- FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
+ FLATCURVE_XAPIAN_DB_IGNORE_EMPTY);
Xapian::Database *db;
int ret;
if (solr_search(_backend, str, box_guid,
&result->maybe_uids, &result->scores) < 0)
return -1;
- }
+ }
result->scores_sorted = TRUE;
return 0;
}
name=$1
tempdir=`mktemp -d`
- if [ "$tempdir" = "" ]; then
+ if [ "$tempdir" = "" ]; then
exit 1
fi
trap "rm -rf $path $tempdir" 0 1 2 3 14 15
mailbox = hash_table_lookup(ctx->mailboxes, guid_p);
if (mailbox == NULL)
return FALSE;
- return seq_range_exists(&mailbox->uids, uid);
+ return seq_range_exists(&mailbox->uids, uid);
}
int fts_expunge_log_append_remove(struct fts_expunge_log_append_ctx *from,
const struct fts_expunge_log_read_record *record)
{
struct fts_user_language *user_lang;
struct fts_user *fuser = FTS_USER_CONTEXT(user);
-
+
i_assert(fuser != NULL);
array_foreach_elem(&fuser->languages, user_lang) {
if (strcmp(user_lang->lang->name, lang->name) == 0)
const struct mailbox_info *info;
struct mailbox_list_iterate_context *iter =
mailbox_list_iter_init_namespaces(user->namespaces,
- patterns,
+ patterns,
MAIL_NAMESPACE_TYPE_PRIVATE,
- MAILBOX_LIST_ITER_SKIP_ALIASES |
+ MAILBOX_LIST_ITER_SKIP_ALIASES |
MAILBOX_LIST_ITER_NO_AUTO_BOXES |
MAILBOX_LIST_ITER_RETURN_NO_FLAGS);
while((info = mailbox_list_iter_next(iter)) != NULL) {
iter = mailbox_attribute_iter_init(box,
MAIL_ATTRIBUTE_TYPE_PRIVATE,
- USER_CRYPT_PREFIX
+ USER_CRYPT_PREFIX
PRIVKEYS_PREFIX);
const char *key_id;
if (value.value == NULL)
mail_crypt_key_cache_destroy(&muser->key_cache);
test_assert(mail_crypt_user_get_private_key(test_ctx->user, NULL,
- &pair.priv, &error) > 0);
+ &pair.priv, &error) > 0);
if (error != NULL)
i_error("mail_crypt_user_get_private_key() failed: %s", error);
error = NULL;
}
static void
-mail_log_mail_update_keywords(void *txn, struct mail *mail,
+mail_log_mail_update_keywords(void *txn, struct mail *mail,
const char *const *old_keywords ATTR_UNUSED)
{
struct mail_log_mail_txn_context *ctx =
{
struct notify_context *ctx;
struct notify_mail_txn *mail_txn;
-
+
for (ctx = ctx_list; ctx != NULL; ctx = ctx->next) {
mail_txn = i_new(struct notify_mail_txn, 1);
mail_txn->parent_mailbox_txn = t;
{
struct mail_private *mail = (struct mail_private *)_mail;
union mail_module_context *lmail = NOTIFY_MAIL_CONTEXT(mail);
-
+
notify_contexts_mail_expunge(_mail);
lmail->super.expunge(_mail);
}
lmail->super.update_flags(_mail, modify_type, flags);
new_flags = mail_get_flags(_mail);
- if ((old_flags ^ new_flags) == 0)
+ if ((old_flags ^ new_flags) == 0)
return;
-
+
notify_contexts_mail_update_flags(_mail, old_flags);
}
break;
}
- if (old_keywords[i] == NULL && new_keywords[i] == NULL)
+ if (old_keywords[i] == NULL && new_keywords[i] == NULL)
return;
notify_contexts_mail_update_keywords(_mail, old_keywords);
{
union mailbox_module_context *lbox = NOTIFY_CONTEXT(box);
struct mailbox_transaction_context *t;
-
+
t = lbox->super.transaction_begin(box, flags, reason);
if ((t->flags & MAILBOX_TRANSACTION_FLAG_NO_NOTIFY) == 0)
/* These are the RFC 5423 Mail Store Events currently handled within the core
push-notification code.
-
+
@todo: These events are not currently handled:
- Login
- Logout
uint64_t *value_r,
const char **error_r);
- int (*update)(struct quota_root *root,
+ int (*update)(struct quota_root *root,
struct quota_transaction_context *ctx,
const char **error_r);
bool (*match_box)(struct quota_root *root, struct mailbox *box);
};
struct getquota_args {
- string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
+ string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
int gqa_uid; /* Inquire about quota for uid */
};
struct setquota_args {
int sqa_qcmd;
- string sqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
+ string sqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
int sqa_id; /* Set quota for uid */
sq_dqblk sqa_dqblk;
};
struct ext_getquota_args {
- string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
+ string gqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
int gqa_type; /* Type of quota info is needed about */
int gqa_id; /* Inquire about quota for id */
};
struct ext_setquota_args {
int sqa_qcmd;
- string sqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
+ string sqa_pathp<RQ_PATHLEN>; /* path to filesystem of interest */
int sqa_id; /* Set quota for id */
int sqa_type; /* Type of quota to set */
sq_dqblk sqa_dqblk;
*/
struct rquota {
int rq_bsize; /* block size for block counts */
- bool rq_active; /* indicates whether quota is active */
+ bool rq_active; /* indicates whether quota is active */
unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */
unsigned int rq_bsoftlimit; /* preferred limit on disk blks */
unsigned int rq_curblocks; /* current block count */
unsigned int rq_curfiles; /* current # allocated files */
unsigned int rq_btimeleft; /* time left for excessive disk use */
unsigned int rq_ftimeleft; /* time left for excessive files */
-};
+};
enum qr_status {
Q_OK = 1, /* quota returned */
RQUOTAPROC_GETQUOTA(getquota_args) = 1;
/*
- * Get active quotas only
+ * Get active quotas only
*/
getquota_rslt
RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2;
RQUOTAPROC_SETQUOTA(setquota_args) = 3;
/*
- * Get active quotas only
+ * Get active quotas only
*/
setquota_rslt
RQUOTAPROC_SETACTIVEQUOTA(setquota_args) = 4;
RQUOTAPROC_GETQUOTA(ext_getquota_args) = 1;
/*
- * Get active quotas only
+ * Get active quotas only
*/
getquota_rslt
RQUOTAPROC_GETACTIVEQUOTA(ext_getquota_args) = 2;
RQUOTAPROC_SETQUOTA(ext_setquota_args) = 3;
/*
- * Set active quotas only
+ * Set active quotas only
*/
setquota_rslt
RQUOTAPROC_SETACTIVEQUOTA(ext_setquota_args) = 4;
while (i < count && uids[i].real_uid < uid) i++;
if (i < count && uids[i].real_uid == uid) {
i_assert(uids[i].virtual_uid > 0);
- seq_range_array_add(virtual_uids_r,
+ seq_range_array_add(virtual_uids_r,
uids[i].virtual_uid);
i++;
}
}
}
-static void
+static void
virtual_sync_backend_add_vmsgs_results(struct virtual_sync_context *ctx,
struct virtual_backend_box *bbox,
uint32_t real_uid,
if (!array_is_created(&bbox->sync_outside_expunges))
i_array_init(&bbox->sync_outside_expunges, 32);
}
- seq_range_array_add(&bbox->sync_outside_expunges,
+ seq_range_array_add(&bbox->sync_outside_expunges,
vrec->real_uid);
}
}
i_array_init(&ctx->all_adds, 128);
bboxes = array_get(&ctx->mbox->backend_boxes, &count);
-
+
/* we have different optimizations depending on whether the virtual
mailbox consists of multiple backend boxes or just one */
if (count > 1)