[dovecot-cvs]
dovecot-lda/src deliver.c, 1.35, 1.36 duplicate.c, 1.4,
1.5 mail-send.c, 1.7, 1.8 sieve-cmu.c, 1.11, 1.12
cras at dovecot.org
cras at dovecot.org
Sun Jan 15 01:25:28 EET 2006
Update of /var/lib/cvs/dovecot-lda/src
In directory talvi:/tmp/cvs-serv20238
Modified Files:
deliver.c duplicate.c mail-send.c sieve-cmu.c
Log Message:
Fixed to work with new Dovecot APIs.
Index: deliver.c
===================================================================
RCS file: /var/lib/cvs/dovecot-lda/src/deliver.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- deliver.c 2 Jan 2006 14:05:30 -0000 1.35
+++ deliver.c 14 Jan 2006 23:25:25 -0000 1.36
@@ -79,7 +79,7 @@
ctx = mailbox_sync_init(box, 0);
while (mailbox_sync_next(ctx, &sync_rec) > 0)
;
- return mailbox_sync_deinit(ctx, &status);
+ return mailbox_sync_deinit(&ctx, &status);
}
int save_mail(struct mail_storage *storage, const char *mailbox,
@@ -94,7 +94,7 @@
box = mailbox_open(storage, mailbox, NULL, MAILBOX_OPEN_FAST |
MAILBOX_OPEN_KEEP_RECENT);
if (box == NULL) {
- int syntax, temp;
+ bool syntax, temp;
(void)mail_storage_get_last_error(storage, &syntax, &temp);
if (syntax || temp)
@@ -112,7 +112,7 @@
}
if (sync_quick(box) < 0) {
- mailbox_close(box);
+ mailbox_close(&box);
return -1;
}
@@ -122,14 +122,14 @@
mailbox_keywords_create(t, keywords);
if (mailbox_copy(t, mail, flags, kw, NULL) < 0)
ret = -1;
- mailbox_keywords_free(t, kw);
+ mailbox_keywords_free(t, &kw);
if (ret < 0)
- mailbox_transaction_rollback(t);
+ mailbox_transaction_rollback(&t);
else
- ret = mailbox_transaction_commit(t, 0);
+ ret = mailbox_transaction_commit(&t, 0);
- mailbox_close(box);
+ mailbox_close(&box);
return ret;
}
@@ -151,9 +151,9 @@
{
io_loop_stop(ioloop);
- io_remove(conn->io);
- i_stream_unref(conn->input);
- o_stream_unref(conn->output);
+ io_remove(&conn->io);
+ i_stream_unref(&conn->input);
+ o_stream_unref(&conn->output);
i_free(conn);
}
@@ -358,7 +358,7 @@
env_put(t_strconcat(t_str_ucase(key), "=", value, NULL));
}
- i_stream_unref(input);
+ i_stream_unref(&input);
t_pop();
}
@@ -441,9 +441,9 @@
input = i_stream_create_seekable(input_list, default_pool,
MAIL_MAX_MEMORY_BUFFER,
"/tmp/dovecot.deliver.");
- i_stream_unref(input_list[0]);
- i_stream_unref(input_list[1]);
- i_stream_unref(input_list[2]);
+ i_stream_unref(&input_list[0]);
+ i_stream_unref(&input_list[1]);
+ i_stream_unref(&input_list[2]);
return input;
}
@@ -681,7 +681,8 @@
i_stream_seek(input, 0);
if (save_mail(storage, mailbox, mail, 0, NULL) < 0) {
const char *error;
- int ret, syntax, temporary_error;
+ bool syntax, temporary_error;
+ int ret;
error = mail_storage_get_last_error(storage, &syntax,
&temporary_error);
@@ -695,21 +696,21 @@
/* ok, rejection sent */
}
}
- i_stream_unref(input);
+ i_stream_unref(&input);
- mail_free(mail);
- mailbox_transaction_rollback(t);
- mailbox_close(box);
+ mail_free(&mail);
+ mailbox_transaction_rollback(&t);
+ mailbox_close(&box);
duplicate_deinit();
- module_dir_unload(modules);
- mail_storage_destroy(mbox_storage);
- mail_storage_destroy(storage);
+ module_dir_unload(&modules);
+ mail_storage_destroy(&mbox_storage);
+ mail_storage_destroy(&storage);
mail_storage_deinit();
dict_client_unregister();
lib_signals_deinit();
- io_loop_destroy(ioloop);
+ io_loop_destroy(&ioloop);
lib_deinit();
return EX_OK;
Index: duplicate.c
===================================================================
RCS file: /var/lib/cvs/dovecot-lda/src/duplicate.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- duplicate.c 11 Sep 2005 11:02:55 -0000 1.4
+++ duplicate.c 14 Jan 2006 23:25:25 -0000 1.5
@@ -136,7 +136,7 @@
if (hash_size(file->hash) * COMPRESS_PERCENTAGE / 100 > change_count)
file->changed = TRUE;
- i_stream_unref(input);
+ i_stream_unref(&input);
if (close(fd) < 0)
i_error("close(%s) failed: %m", file->path);
return 0;
@@ -228,7 +228,7 @@
o_stream_send(output, d->user, user_size);
}
hash_iterate_deinit(iter);
- o_stream_unref(output);
+ o_stream_unref(&output);
file->changed = FALSE;
if (file_dotlock_replace(&file->dotlock, 0) < 0)
Index: mail-send.c
===================================================================
RCS file: /var/lib/cvs/dovecot-lda/src/mail-send.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- mail-send.c 27 Oct 2005 14:19:27 -0000 1.7
+++ mail-send.c 14 Jan 2006 23:25:25 -0000 1.8
@@ -109,7 +109,7 @@
fwrite(data, size, 1, sm);
i_stream_skip(input, size);
}
- i_stream_unref(input);
+ i_stream_unref(&input);
i_assert(ret != 0);
}
Index: sieve-cmu.c
===================================================================
RCS file: /var/lib/cvs/dovecot-lda/src/sieve-cmu.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- sieve-cmu.c 14 Oct 2005 20:26:41 -0000 1.11
+++ sieve-cmu.c 14 Jan 2006 23:25:25 -0000 1.12
@@ -585,7 +585,7 @@
if (sdata.errors != NULL) {
path = t_strconcat(script_path, ".err", NULL);
dovecot_sieve_write_error_file(&sdata, path);
- str_free(sdata.errors);
+ str_free(&sdata.errors);
}
if (ret <= 0)
return ret;
More information about the dovecot-cvs
mailing list