locker_lock() api changed. pop3d uses MU_LOCKER_PID.
Showing
1 changed file
with
5 additions
and
3 deletions
... | @@ -23,14 +23,16 @@ pop3d_lock () | ... | @@ -23,14 +23,16 @@ pop3d_lock () |
23 | url_t url = NULL; | 23 | url_t url = NULL; |
24 | locker_t lock = NULL; | 24 | locker_t lock = NULL; |
25 | const char *name; | 25 | const char *name; |
26 | int status; | ||
26 | 27 | ||
27 | mailbox_get_url (mbox, &url); | 28 | mailbox_get_url (mbox, &url); |
28 | name = url_to_string (url); | 29 | name = url_to_string (url); |
29 | mailbox_get_locker (mbox, &lock); | 30 | mailbox_get_locker (mbox, &lock); |
30 | if (locker_lock (lock, MU_LOCKER_WRLOCK)) | 31 | locker_set_flags (lock, MU_LOCKER_PID); |
32 | if ((status = locker_lock (lock))) | ||
31 | { | 33 | { |
32 | syslog (LOG_NOTICE, "mailbox '%s' locked by another session", | 34 | syslog (LOG_NOTICE, "mailbox '%s' lock failed: %s", |
33 | (name) ? name : "?"); | 35 | (name) ? name : "?", mu_errstring(status)); |
34 | return ERR_MBOX_LOCK; | 36 | return ERR_MBOX_LOCK; |
35 | } | 37 | } |
36 | return 0; | 38 | return 0; | ... | ... |
-
Please register or sign in to post a comment