Mercurial > dovecot > original-hg > dovecot-1.2
comparison src/lib-storage/index/index-storage.c @ 939:24b64302f59c HEAD
index_storage_sync_and_lock() didn't set lock notify function.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 10 Jan 2003 13:29:24 +0200 |
parents | fd8888f6f037 |
children | 8028c4dcf38f |
comparison
equal
deleted
inserted
replaced
938:54e2ef691f93 | 939:24b64302f59c |
---|---|
183 storage->callback_context); | 183 storage->callback_context); |
184 break; | 184 break; |
185 } | 185 } |
186 } | 186 } |
187 | 187 |
188 void index_storage_init_lock_notify(struct index_mailbox *ibox) | |
189 { | |
190 ibox->next_lock_notify = time(NULL) + LOCK_NOTIFY_INTERVAL; | |
191 ibox->index->set_lock_notify_callback(ibox->index, lock_notify, ibox); | |
192 } | |
193 | |
188 int index_storage_lock(struct index_mailbox *ibox, | 194 int index_storage_lock(struct index_mailbox *ibox, |
189 enum mail_lock_type lock_type) | 195 enum mail_lock_type lock_type) |
190 { | 196 { |
191 int ret; | 197 int ret; |
192 | 198 |
193 ibox->next_lock_notify = time(NULL) + LOCK_NOTIFY_INTERVAL; | |
194 | |
195 /* we have to set/reset this every time, because the same index | 199 /* we have to set/reset this every time, because the same index |
196 may be used by multiple IndexMailboxes. */ | 200 may be used by multiple IndexMailboxes. */ |
197 ibox->index->set_lock_notify_callback(ibox->index, lock_notify, ibox); | 201 index_storage_init_lock_notify(ibox); |
198 ret = ibox->index->set_lock(ibox->index, lock_type); | 202 ret = ibox->index->set_lock(ibox->index, lock_type); |
199 ibox->index->set_lock_notify_callback(ibox->index, NULL, NULL); | 203 ibox->index->set_lock_notify_callback(ibox->index, NULL, NULL); |
200 | 204 |
201 if (!ret) | 205 if (!ret) |
202 return mail_storage_set_index_error(ibox); | 206 return mail_storage_set_index_error(ibox); |