comparison src/lib-storage/index/dbox/dbox-save.c @ 4323:af09f5b2ce04 HEAD

Saving to multiple files within a transaction was broken.
author Timo Sirainen <tss@iki.fi>
date Thu, 08 Jun 2006 20:14:27 +0300
parents 7112aad504ae
children 36587f382562
comparison
equal deleted inserted replaced
4322:f693898fee3b 4323:af09f5b2ce04
347 347
348 DEC2HEX(hdr.uid_hex, uid); 348 DEC2HEX(hdr.uid_hex, uid);
349 349
350 file = dbox_uidlist_append_lookup_file(ctx->append_ctx, 350 file = dbox_uidlist_append_lookup_file(ctx->append_ctx,
351 file_seq); 351 file_seq);
352 if (pwrite_full(ctx->file->fd, hdr.uid_hex, 352 if (pwrite_full(file->fd, hdr.uid_hex,
353 sizeof(hdr.uid_hex), offset + 353 sizeof(hdr.uid_hex), offset +
354 offsetof(struct dbox_mail_header, 354 offsetof(struct dbox_mail_header,
355 uid_hex)) < 0) { 355 uid_hex)) < 0) {
356 mail_storage_set_critical(STORAGE(ctx->mbox->storage), 356 mail_storage_set_critical(STORAGE(ctx->mbox->storage),
357 "pwrite_full(%s) failed: %m", 357 "pwrite_full(%s) failed: %m",
358 ctx->file->path); 358 file->path);
359 ctx->failed = TRUE; 359 ctx->failed = TRUE;
360 dbox_transaction_save_rollback(ctx); 360 dbox_transaction_save_rollback(ctx);
361 return -1; 361 return -1;
362 } 362 }
363 } 363 }