"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib-storage/mail-duplicate.h" between
dovecot-2.3.16.tar.gz and dovecot-2.3.17.tar.gz

About: Dovecot is an IMAP and POP3 server, written with security primarily in mind.

mail-duplicate.h  (dovecot-2.3.16):mail-duplicate.h  (dovecot-2.3.17)
struct mail_duplicate_db; struct mail_duplicate_db;
struct mail_storage_settings;
enum mail_duplicate_check_result {
/* The ID exists. The ID is not locked. */
/* The ID doesn't exist yet. The ID gets locked. */
/* Internal I/O error (e.g. permission error) */
/* Locking timed out. */
/* Too many locks held. */
/* Locking detected a deadlock. The caller should rollback the
transaction to release all locks, do a short random sleep, retry
and hope that the next attempt succeeds. */
bool mail_duplicate_check(struct mail_duplicate_db *db, struct mail_duplicate_transaction *
const void *id, size_t id_size, const char *user); mail_duplicate_transaction_begin(struct mail_duplicate_db *db);
void mail_duplicate_mark(struct mail_duplicate_db *db, void mail_duplicate_transaction_rollback(
struct mail_duplicate_transaction **_trans);
void mail_duplicate_transaction_commit(
struct mail_duplicate_transaction **_trans);
/* Check if id exists in the duplicate database. If not, lock the id. Any
further checks for the same id in other processes will block until the first
one's transaction is finished. Because checks can be done in different order
by different processes, this can result in a deadlock. The caller should
handle it by rolling back the transaction and retrying. */
enum mail_duplicate_check_result
mail_duplicate_check(struct mail_duplicate_transaction *trans,
const void *id, size_t id_size, const char *user);
/* Add id to the duplicate database. The writing isn't done until transaction
is committed. There's no locking done by this call. If locking is needed,
mail_duplicate_check() should be called first. */
void mail_duplicate_mark(struct mail_duplicate_transaction *trans,
const void *id, size_t id_size, const void *id, size_t id_size,
const char *user, time_t timestamp); const char *user, time_t timestamp);
void mail_duplicate_db_flush(struct mail_duplicate_db *db);
struct mail_duplicate_db * struct mail_duplicate_db *
mail_duplicate_db_init(struct mail_user *user, const char *name); mail_duplicate_db_init(struct mail_user *user, const char *name);
void mail_duplicate_db_deinit(struct mail_duplicate_db **db); void mail_duplicate_db_deinit(struct mail_duplicate_db **db);
#endif #endif
 End of changes. 3 change blocks. 
6 lines changed or deleted 36 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)