Commit 7dc6bca6 7dc6bca632a27e932c72f419fed77a43cb677920 by Alain Magloire

fix bug.

1 parent 89c7c751
......@@ -25,7 +25,7 @@
int
mbox_set_progress_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg)
{
if (mbox)
if (mbox == NULL)
return MU_ERROR_INVALID_PARAMETER;
mbox->progress.cb = cb;
mbox->progress.arg = arg;
......@@ -35,7 +35,7 @@ mbox_set_progress_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg)
int
mbox_set_newmsg_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg)
{
if (mbox)
if (mbox == NULL)
return MU_ERROR_INVALID_PARAMETER;
mbox->newmsg.cb = cb;
mbox->newmsg.arg = arg;
......@@ -45,7 +45,7 @@ mbox_set_newmsg_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg)
int
mbox_set_error_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg)
{
if (mbox)
if (mbox == NULL)
return MU_ERROR_INVALID_PARAMETER;
mbox->error.cb = cb;
mbox->error.arg = arg;
......@@ -55,7 +55,7 @@ mbox_set_error_cb (mbox_t mbox, int (*cb) __P ((int, void *)), void *arg)
int
mbox_newmsg_cb (mbox_t mbox, int info)
{
if (mbox)
if (mbox == NULL)
return MU_ERROR_INVALID_PARAMETER;
if (mbox->newmsg.cb)
return mbox->newmsg.cb (info, mbox->newmsg.arg);
......@@ -65,7 +65,7 @@ mbox_newmsg_cb (mbox_t mbox, int info)
int
mbox_progress_cb (mbox_t mbox, int info)
{
if (mbox)
if (mbox == NULL)
return MU_ERROR_INVALID_PARAMETER;
if (mbox->progress.cb)
return mbox->progress.cb (info, mbox->progress.arg);
......@@ -75,7 +75,7 @@ mbox_progress_cb (mbox_t mbox, int info)
int
mbox_error_cb (mbox_t mbox, int info)
{
if (mbox)
if (mbox == NULL)
return MU_ERROR_INVALID_PARAMETER;
if (mbox->error.cb)
return mbox->error.cb (info, mbox->error.arg);
......
......@@ -176,6 +176,8 @@ mbox_scan0 (mbox_t mbox, unsigned int msgno, unsigned int *pcount,
else
status = MU_ERROR_IO;
}
else
status = MU_ERROR_IO;
/* Move along, move along nothing to see. */
if (!mbox_has_newmail (mbox) && mbox->size == file_size)
......