comparison src/lib-storage/index/mbox/mbox-save.c @ 13:bb294faf7379 HEAD

"Critical errors" aren't displayed to users anymore, ie. anything that is not a predefined human readable error message is written into log file and user gets only "Internal error [timestamp]".
author Timo Sirainen <tss@iki.fi>
date Thu, 22 Aug 2002 17:50:16 +0300
parents 1b34ec11fff8
children a946ce1f09b7
comparison
equal deleted inserted replaced
12:a4423c83b2b0 13:bb294faf7379
27 return mail_storage_set_index_error(ibox); 27 return mail_storage_set_index_error(ibox);
28 28
29 /* append the data into mbox file */ 29 /* append the data into mbox file */
30 fd = open(ibox->index->mbox_path, O_RDWR | O_CREAT); 30 fd = open(ibox->index->mbox_path, O_RDWR | O_CREAT);
31 if (fd == -1) { 31 if (fd == -1) {
32 mail_storage_set_error(box->storage, "Can't open mbox file " 32 mail_storage_set_critical(box->storage, "Can't open mbox file "
33 "%s: %m", ibox->index->mbox_path); 33 "%s: %m", ibox->index->mbox_path);
34 return FALSE; 34 return FALSE;
35 } 35 }
36 36
37 if (!mbox_lock(ibox->index, ibox->index->mbox_path, fd)) { 37 if (!mbox_lock(ibox->index, ibox->index->mbox_path, fd)) {
38 (void)close(fd); 38 (void)close(fd);
41 41
42 failed = FALSE; 42 failed = FALSE;
43 43
44 pos = lseek(fd, 0, SEEK_END); 44 pos = lseek(fd, 0, SEEK_END);
45 if (pos == -1) { 45 if (pos == -1) {
46 mail_storage_set_error(box->storage, "lseek() failed for mbox " 46 mail_storage_set_critical(box->storage,
47 "file %s: %m", ibox->index->mbox_path); 47 "lseek() failed for mbox file %s: %m",
48 ibox->index->mbox_path);
48 failed = TRUE; 49 failed = TRUE;
49 } 50 }
50 51
51 if (!failed && !index_storage_save_into_fd(box->storage, fd, 52 if (!failed && !index_storage_save_into_fd(box->storage, fd,
52 ibox->index->mbox_path, 53 ibox->index->mbox_path,