Skip to content

Commit

Permalink
#233: fix pop3 imaptest issues (Fatal error) #235
Browse files Browse the repository at this point in the history
  • Loading branch information
jrse committed Jan 23, 2019
1 parent 957b39a commit 79aea59
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/storage-rbox/rbox-mail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,17 @@ static int rbox_mail_get_stream(struct mail *_mail, bool get_body ATTR_UNUSED, s
rados_storage->set_namespace(rados_storage->get_namespace());
}

/* Pop3 needs this. it looks like rbox_index_mail_set_seq is not called. */
if (rmail->rados_mail == nullptr) {
// make sure that mail_object is initialized,
// else create and load guid from index.
rmail->rados_mail = rados_storage->alloc_rados_mail();
if (rbox_get_index_record(_mail) < 0) {
i_error("Error rbox_get_index uid(%d)", _mail->uid);
FUNC_END();
return -1;
}
}
rmail->rados_mail->get_mail_buffer()->clear();

uint64_t psize;
Expand Down

0 comments on commit 79aea59

Please sign in to comment.