dovecot-2.2: Use imap_append_astring() instead of imap_append_st...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 24 10:14:29 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/9a17faaed2eb
changeset: 15247:9a17faaed2eb
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 24 10:14:17 2012 +0300
description:
Use imap_append_astring() instead of imap_append_string() where possible.
diffstat:
src/imap/cmd-list.c | 6 +++---
src/imap/cmd-notify.c | 2 +-
src/imap/imap-fetch.c | 4 ++--
src/imap/imap-notify.c | 4 ++--
src/imap/imap-status.c | 2 +-
src/plugins/imap-acl/imap-acl-plugin.c | 10 +++++-----
src/plugins/imap-quota/imap-quota-plugin.c | 6 +++---
7 files changed, 17 insertions(+), 17 deletions(-)
diffs (161 lines):
diff -r d9c44aafd163 -r 9a17faaed2eb src/imap/cmd-list.c
--- a/src/imap/cmd-list.c Wed Oct 24 10:08:06 2012 +0300
+++ b/src/imap/cmd-list.c Wed Oct 24 10:14:17 2012 +0300
@@ -249,7 +249,7 @@
list_reply_append_ns_sep_param(str,
mail_namespace_get_sep(info->ns));
str_append_c(str, ' ');
- imap_append_string(str, str_c(mutf7_name));
+ imap_append_astring(str, str_c(mutf7_name));
mailbox_childinfo2str(ctx, str, flags);
ret = client_send_line_next(ctx->cmd->client, str_c(str));
@@ -333,7 +333,7 @@
str_printfa(str, "%c\" ", ns_sep);
if (*ns_prefix != '\0') {
/* non-hidden namespace, use it as the root name */
- imap_append_string(str, ns_prefix);
+ imap_append_astring(str, ns_prefix);
} else {
/* Hidden namespace or empty namespace prefix. We could just
return an empty root name, but it's safer to emulate what
@@ -344,7 +344,7 @@
if (p == NULL)
str_append(str, "\"\"");
else
- imap_append_string(str, t_strdup_until(ref, p + 1));
+ imap_append_astring(str, t_strdup_until(ref, p + 1));
}
client_send_line(client, str_c(str));
}
diff -r d9c44aafd163 -r 9a17faaed2eb src/imap/cmd-notify.c
--- a/src/imap/cmd-notify.c Wed Oct 24 10:08:06 2012 +0300
+++ b/src/imap/cmd-notify.c Wed Oct 24 10:14:17 2012 +0300
@@ -365,7 +365,7 @@
str_append_c(str, ns_sep);
str_append(str, "\" ");
- imap_append_string(str, mailbox_get_vname(box));
+ imap_append_astring(str, mailbox_get_vname(box));
client_send_line(client, str_c(str));
}
diff -r d9c44aafd163 -r 9a17faaed2eb src/imap/imap-fetch.c
--- a/src/imap/imap-fetch.c Wed Oct 24 10:08:06 2012 +0300
+++ b/src/imap/imap-fetch.c Wed Oct 24 10:14:17 2012 +0300
@@ -833,7 +833,7 @@
return -1;
str_append(ctx->state.cur_str, "X-GUID ");
- imap_append_string(ctx->state.cur_str, value);
+ imap_append_astring(ctx->state.cur_str, value);
str_append_c(ctx->state.cur_str, ' ');
return 1;
}
@@ -860,7 +860,7 @@
i_panic("FETCH: Mailbox name not UTF-8: %s", name);
str_append(ctx->state.cur_str, "X-MAILBOX ");
- imap_append_string(ctx->state.cur_str, str_c(mutf7_name));
+ imap_append_astring(ctx->state.cur_str, str_c(mutf7_name));
str_append_c(ctx->state.cur_str, ' ');
return 1;
}
diff -r d9c44aafd163 -r 9a17faaed2eb src/imap/imap-notify.c
--- a/src/imap/imap-notify.c Wed Oct 24 10:08:06 2012 +0300
+++ b/src/imap/imap-notify.c Wed Oct 24 10:14:17 2012 +0300
@@ -33,10 +33,10 @@
str_append_c(str, ns_sep);
str_append(str, "\" ");
- imap_append_string(str, rec->vname);
+ imap_append_astring(str, rec->vname);
if (rec->old_vname != NULL) {
str_append(str, " (\"OLDNAME\" (");
- imap_append_string(str, rec->old_vname);
+ imap_append_astring(str, rec->old_vname);
str_append(str, "))");
}
return client_send_line_next(notify_ns->ctx->client, str_c(str));
diff -r d9c44aafd163 -r 9a17faaed2eb src/imap/imap-status.c
--- a/src/imap/imap-status.c Wed Oct 24 10:08:06 2012 +0300
+++ b/src/imap/imap-status.c Wed Oct 24 10:14:17 2012 +0300
@@ -107,7 +107,7 @@
str = t_str_new(128);
str_append(str, "* STATUS ");
- imap_append_string(str, mailbox_mutf7);
+ imap_append_astring(str, mailbox_mutf7);
str_append(str, " (");
prefix_len = str_len(str);
diff -r d9c44aafd163 -r 9a17faaed2eb src/plugins/imap-acl/imap-acl-plugin.c
--- a/src/plugins/imap-acl/imap-acl-plugin.c Wed Oct 24 10:08:06 2012 +0300
+++ b/src/plugins/imap-acl/imap-acl-plugin.c Wed Oct 24 10:14:17 2012 +0300
@@ -163,7 +163,7 @@
i_unreached();
}
- imap_append_string(dest, str_c(tmp));
+ imap_append_astring(dest, str_c(tmp));
str_append_c(dest, ' ');
imap_acl_write_rights_list(dest, rights);
}
@@ -288,7 +288,7 @@
str = t_str_new(128);
str_append(str, "* ACL ");
- imap_append_string(str, mailbox);
+ imap_append_astring(str, mailbox);
ns = mailbox_get_namespace(box);
backend = acl_mailbox_list_get_backend(ns->list);
@@ -347,7 +347,7 @@
str = t_str_new(128);
str_append(str, "* MYRIGHTS ");
- imap_append_string(str, orig_mailbox);
+ imap_append_astring(str, orig_mailbox);
str_append_c(str,' ');
imap_acl_write_rights_list(str, rights);
@@ -372,9 +372,9 @@
str = t_str_new(128);
str_append(str, "* LISTRIGHTS ");
- imap_append_string(str, mailbox);
+ imap_append_astring(str, mailbox);
str_append_c(str, ' ');
- imap_append_string(str, identifier);
+ imap_append_astring(str, identifier);
str_append_c(str, ' ');
str_append(str, "\"\" l r w s t p i e k x a c d");
diff -r d9c44aafd163 -r 9a17faaed2eb src/plugins/imap-quota/imap-quota-plugin.c
--- a/src/plugins/imap-quota/imap-quota-plugin.c Wed Oct 24 10:08:06 2012 +0300
+++ b/src/plugins/imap-quota/imap-quota-plugin.c Wed Oct 24 10:14:17 2012 +0300
@@ -43,7 +43,7 @@
str_append(str, "* QUOTA ");
name = imap_quota_root_get_name(user, owner, root);
- imap_append_string(str, name);
+ imap_append_astring(str, name);
str_append(str, " (");
list = quota_root_get_resources(root);
@@ -102,13 +102,13 @@
quotaroot_reply = t_str_new(128);
quota_reply = t_str_new(256);
str_append(quotaroot_reply, "* QUOTAROOT ");
- imap_append_string(quotaroot_reply, orig_mailbox);
+ imap_append_astring(quotaroot_reply, orig_mailbox);
iter = quota_root_iter_init(box);
while ((root = quota_root_iter_next(iter)) != NULL) {
str_append_c(quotaroot_reply, ' ');
name = imap_quota_root_get_name(client->user, ns->owner, root);
- imap_append_string(quotaroot_reply, name);
+ imap_append_astring(quotaroot_reply, name);
quota_reply_write(quota_reply, client->user, ns->owner, root);
}
More information about the dovecot-cvs
mailing list