diff options
author | Not Zed <NotZed@Ximian.com> | 2002-05-07 15:31:26 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-05-07 15:31:26 +0800 |
commit | 4655d888677e71962722ad86f255a27386e1e621 (patch) | |
tree | a72629c9b63c2b16ca71fc3b666735cfd14b6bef /camel/providers/imap/camel-imap-command.c | |
parent | 1acd03710d50072259f91bae1a9e2395c6bdfac7 (diff) | |
download | gsoc2013-evolution-4655d888677e71962722ad86f255a27386e1e621.tar gsoc2013-evolution-4655d888677e71962722ad86f255a27386e1e621.tar.gz gsoc2013-evolution-4655d888677e71962722ad86f255a27386e1e621.tar.bz2 gsoc2013-evolution-4655d888677e71962722ad86f255a27386e1e621.tar.lz gsoc2013-evolution-4655d888677e71962722ad86f255a27386e1e621.tar.xz gsoc2013-evolution-4655d888677e71962722ad86f255a27386e1e621.tar.zst gsoc2013-evolution-4655d888677e71962722ad86f255a27386e1e621.zip |
Check for LOGIN xxxx as well if debug is on, so we dont print passwords to
2002-05-07 Not Zed <NotZed@Ximian.com>
* camel-remote-store.c (remote_send_string): Check for LOGIN xxxx
as well if debug is on, so we dont print passwords to evolution
logs.
* providers/imap/camel-imap-utils.c (imap_is_atom_char): This was
really broken. 1. isprint() is locale dependent, and 2. it looked
up an 8 bit value in a 7 bit table without truncating it. I've
removed the isprint() stuff and just put it directly into the
special table, which i've expanded to the right size too.
* providers/imap/*: Applied patch from Preston Elder
<prez@magick.tm> to make camel only use literals if it needs to
for simple strings. Changed slightly to use imap_is_atom() and
more consistent formatting.
providers/imap/camel-imap-utils.c (imap_is_atom): Chagned from
imap_needs_quoting().
** Merged in camel-object2 branch. Simpler camelobject
implementation + object args interface.
* camel.c (camel_init): Call camel_object_get_type() to make sure
camel_object_type is initialised.
* camel-object.h (CAMEL_OBJECT_TYPE): Changed to return global
camel_object_type pointer, not call camel_object_get_type.
svn path=/trunk/; revision=16701
Diffstat (limited to 'camel/providers/imap/camel-imap-command.c')
-rw-r--r-- | camel/providers/imap/camel-imap-command.c | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index 6a2382b3c8..f8ea456439 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -696,10 +696,14 @@ imap_command_strdup_vprintf (CamelImapStore *store, const char *fmt, arglen += strlen (store->namespace) + 1; } g_ptr_array_add (args, string); - if (store->capabilities & IMAP_CAPABILITY_LITERALPLUS) - len += arglen + 15; - else - len += arglen * 2; + if (imap_is_atom(string)) { + len += arglen; + } else { + if (store->capabilities & IMAP_CAPABILITY_LITERALPLUS) + len += arglen + 15; + else + len += arglen * 2; + } start = p + 1; break; @@ -750,16 +754,21 @@ imap_command_strdup_vprintf (CamelImapStore *store, const char *fmt, string = imap_mailbox_encode (mailbox, strlen (mailbox)); g_free (mailbox); } - - if (store->capabilities & IMAP_CAPABILITY_LITERALPLUS) { - op += sprintf (op, "{%d+}\r\n%s", - strlen (string), string); + + if (imap_is_atom(string)) { + op += sprintf(op, "%s", string); } else { - char *quoted = imap_quote_string (string); - - op += sprintf (op, "%s", quoted); - g_free (quoted); + if (store->capabilities & IMAP_CAPABILITY_LITERALPLUS) { + op += sprintf (op, "{%d+}\r\n%s", + strlen (string), string); + } else { + char *quoted = imap_quote_string (string); + + op += sprintf (op, "%s", quoted); + g_free (quoted); + } } + if (*p == 'F') g_free (string); break; |