summaryrefslogtreecommitdiff
path: root/libmailutils/base/amd.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-10-28 23:18:33 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-10-29 18:41:21 +0300
commit5f796a9c31d4ab9c281af3a072ae4d150fd2a1fb (patch)
tree4743c983c1653a3b1cb132539b52d0390a3aff82 /libmailutils/base/amd.c
parentfb994e0a85011d050eb6e3e166018a5625118c20 (diff)
downloadmailutils-5f796a9c31d4ab9c281af3a072ae4d150fd2a1fb.tar.gz
mailutils-5f796a9c31d4ab9c281af3a072ae4d150fd2a1fb.tar.bz2
Reorganize error codes.
* libmailutils/diag/errors (MU_ERR_TCP_NO_HOST) (MU_ERR_TCP_NO_PORT): Change wording. (MU_ERR_UNSAFE_PERMS): Remove error code. (MU_ERR_NO_HANDLER): Remove. All uses replaced by ENOSYS. (MU_ERR_OUT_NULL): Remove. MU_ERR_OUT_PTR_NULL is used instead. (MU_ERR_MBX_NULL): Remove. Use EINVAL instead. (MU_ERR_BAD_822_FORMAT): Rename to MU_ERR_INVALID_EMAIL. Change wording. (MU_ERR_REPLY): Change wording. * libmailutils/url/create.c: Remove misguiding comments * libmailutils/url/set-service.c: Likewise. * libmailutils/mailbox/mailbox.c (mu_mailbox_open): Return EACCES if trying to update quick-access mailboxes. (mu_mailbox_get_stream): Mark for deletion. * libmailutils/stream/fltstream.c (filter_read) (filter_write_internal): Return MU_ERR_BUFSPACE if requested more space than available in I/O buffers. * libproto/mbox/mbox.c (mbox_expunge_unlocked): Send MU_EVT_MAILBOX_CORRUPT event if the mailbox shrunk. * libproto/mbox/mboxscan.c (mbox_scan_internal): Return MU_ERR_NOENT if unable to locate message in quick-access mode.
Diffstat (limited to 'libmailutils/base/amd.c')
-rw-r--r--libmailutils/base/amd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libmailutils/base/amd.c b/libmailutils/base/amd.c
index d60903fa8..bf08f50a1 100644
--- a/libmailutils/base/amd.c
+++ b/libmailutils/base/amd.c
@@ -409,7 +409,7 @@ amd_init_mailbox (mu_mailbox_t mailbox, size_t amd_size,
struct _amd_data *amd;
if (mailbox == NULL)
- return MU_ERR_MBX_NULL;
+ return EINVAL;
if (amd_size < sizeof (*amd))
return EINVAL;
@@ -533,7 +533,7 @@ amd_close (mu_mailbox_t mailbox)
int i;
if (!mailbox)
- return MU_ERR_MBX_NULL;
+ return EINVAL;
amd = mailbox->data;
@@ -1018,9 +1018,7 @@ amd_append_message (mu_mailbox_t mailbox, mu_message_t msg)
struct _amd_data *amd = mailbox->data;
struct _amd_message *mhm;
- if (!mailbox)
- return MU_ERR_MBX_NULL;
- if (!msg)
+ if (!mailbox || !msg)
return EINVAL;
mhm = calloc (1, amd->msg_size);

Return to:

Send suggestions and report system problems to the System administrator.