view src/lib-index/maildir/maildir-update.c @ 363:567e932cdc66 HEAD

Added autoclose_fd-flag for io_buffer_create_file() and io_buffer_create_mmap().
author Timo Sirainen <tss@iki.fi>
date Sun, 06 Oct 2002 06:09:36 +0300
parents cf4d065f2f85
children ea958a5b9de1
line wrap: on
line source

/* Copyright (C) 2002 Timo Sirainen */

#include "lib.h"
#include "iobuffer.h"
#include "maildir-index.h"

int maildir_record_update(MailIndexUpdate *update, int fd, const char *path)
{
	IOBuffer *inbuf;

	i_assert(path != NULL);

	inbuf = io_buffer_create_mmap(fd, default_pool,
				      MAIL_MMAP_BLOCK_SIZE, 0, FALSE);
	mail_index_update_headers(update, inbuf, 0, NULL, NULL);
	io_buffer_destroy(inbuf);
	return TRUE;
}