Skip to content

Commit

Permalink
support for large mailboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
adiel-mittmann committed Aug 1, 2015
1 parent 453fb27 commit bb9cfd5
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 63 deletions.
6 changes: 3 additions & 3 deletions mairix.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ enum data_to_rfc822_error {
DTR8_BAD_HEADERS, /* corrupt headers */
DTR8_BAD_ATTACHMENT /* corrupt attachment (e.g. no body part) */
};
struct rfc822 *data_to_rfc822(struct msg_src *src, char *data, int length, enum data_to_rfc822_error *error);
void create_ro_mapping(const char *filename, unsigned char **data, int *len);
void free_ro_mapping(unsigned char *data, int len);
struct rfc822 *data_to_rfc822(struct msg_src *src, char *data, long length, enum data_to_rfc822_error *error);
void create_ro_mapping(const char *filename, unsigned char **data, size_t *len);
void free_ro_mapping(unsigned char *data, size_t len);
char *format_msg_src(struct msg_src *src);

/* In tok.c */
Expand Down
4 changes: 2 additions & 2 deletions mbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ void build_mbox_lists(struct database *db, const char *folder_base, /*{{{*/
mb->n_old_msgs_valid = mb->n_msgs;
} else {
unsigned char *va;
int len;
size_t len;
create_ro_mapping(mb->path, &va, &len);
if (va) {
rescan_mbox(mb, (char *) va, len);
Expand Down Expand Up @@ -852,7 +852,7 @@ int add_mbox_messages(struct database *db)/*{{{*/
int any_new = 0;
int N;
unsigned char *va;
int valen;
size_t valen;
enum data_to_rfc822_error error;

for (i=0; i<db->n_mboxen; i++) {
Expand Down
Loading

0 comments on commit bb9cfd5

Please sign in to comment.