Implement optional mailbox-independent locking for pop3d and imap4d.
* lib/manlock.c: New file. * lib/Makefile.am (libmuaux_a_SOURCES): Add manlock.c. * lib/muaux.h (manlock_mandatory_locking) (manlock_lock_dir): New externs. (manlock_open_mailbox, manlock_lock) (manlock_touchlock, manlock_unlock): New protos. * libmailutils/base/amd.c (amd_cleanup): Remove unbalanced call to mu_locker_unlock. * libmailutils/base/locker.c (mu_locker_create): Bugfixes. * imap4d/imap4d.c (imap4d_cfg_param): Add mandatory-locking construct. (main): Call manlock_cfg_init. * imap4d/select.c (imap4d_select0): Use mandatory locking if the mailbox is to be opened r/w. * imap4d/rename.c (imap4d_rename): Note FIXME! * imap4d/bye.c: Call manlock_unlock after closing the mailbox. * imap4d/close.c: Likewise. * imap4d/sync.c (imap4d_sync): Call manlock_touchlock. * pop3d/lock.c: Remove. * pop3d/Makefile.am (pop3d_SOURCES): Remove lock.c * pop3d/extra.c (pop3d_abquit): Unlock mailbox. * pop3d/pop3d.c (pop3d_cfg_param): Add mandatory-locking construct. (main): Call manlock_cfg_init. (pop3d_mainloop): Call manlock_touchlock. * pop3d/pop3d.h (pop3d_lock) (pop3d_touchlock, pop3d_unlock): Remove. * pop3d/quit.c (pop3d_quit): Unlock the mailbox. * pop3d/user.c (pop3d_begin_session): Use manlock_open_mailbox.
Showing
18 changed files
with
319 additions
and
100 deletions
lib/manlock.c
0 → 100644
pop3d/lock.c
deleted
100644 → 0
-
Please register or sign in to post a comment