/[mailutils]/mailutils/mailbox/mailbox.c
ViewVC logotype

Diff of /mailutils/mailbox/mailbox.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.58 by gray, Wed Sep 18 17:28:20 2002 UTC revision 1.59 by gray, Thu Nov 21 13:52:52 2002 UTC
# Line 210  mailbox_flush (mailbox_t mbox, int expun Line 210  mailbox_flush (mailbox_t mbox, int expun
210  {  {
211    size_t i, total = 0;    size_t i, total = 0;
212    int status = 0;    int status = 0;
213      
214      if (!(mbox->flags & (MU_STREAM_RDWR|MU_STREAM_WRITE|MU_STREAM_APPEND)))
215        return EACCES;
216    mailbox_messages_count (mbox, &total);    mailbox_messages_count (mbox, &total);
217    for (i = 1; i <= total; i++)    for (i = 1; i <= total; i++)
218      {      {
# Line 233  mailbox_append_message (mailbox_t mbox, Line 235  mailbox_append_message (mailbox_t mbox,
235  {  {
236    if (mbox == NULL || mbox->_append_message == NULL)    if (mbox == NULL || mbox->_append_message == NULL)
237      return MU_ERR_EMPTY_VFN;      return MU_ERR_EMPTY_VFN;
238      if (!(mbox->flags & (MU_STREAM_RDWR|MU_STREAM_WRITE|MU_STREAM_APPEND)))
239        return EACCES;
240    return mbox->_append_message (mbox, msg);    return mbox->_append_message (mbox, msg);
241  }  }
242    
# Line 272  mailbox_save_attributes (mailbox_t mbox) Line 276  mailbox_save_attributes (mailbox_t mbox)
276  {  {
277    if (mbox == NULL || mbox->_save_attributes == NULL)    if (mbox == NULL || mbox->_save_attributes == NULL)
278      return MU_ERR_EMPTY_VFN;      return MU_ERR_EMPTY_VFN;
279      if (!(mbox->flags & (MU_STREAM_RDWR|MU_STREAM_WRITE|MU_STREAM_APPEND)))
280        return EACCES;
281    return mbox->_save_attributes (mbox);    return mbox->_save_attributes (mbox);
282  }  }
283    
# Line 280  mailbox_expunge (mailbox_t mbox) Line 286  mailbox_expunge (mailbox_t mbox)
286  {  {
287    if (mbox == NULL || mbox->_expunge == NULL)    if (mbox == NULL || mbox->_expunge == NULL)
288      return MU_ERR_EMPTY_VFN;      return MU_ERR_EMPTY_VFN;
289      if (!(mbox->flags & (MU_STREAM_RDWR|MU_STREAM_WRITE|MU_STREAM_APPEND)))
290        return EACCES;
291    return mbox->_expunge (mbox);    return mbox->_expunge (mbox);
292  }  }
293    

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26