diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-10-17 05:00:59 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-10-17 05:00:59 +0800 |
commit | ff8aed099f0921cde2c5797167a476b7eb185eab (patch) | |
tree | 6cb2ee21134265507d5c7f83dc28d904fd5a5839 /camel/providers/imap/camel-imap-command.c | |
parent | 8b23fc59ea35cf92650e0d3ec5bdbf4c75b19e15 (diff) | |
download | gsoc2013-evolution-ff8aed099f0921cde2c5797167a476b7eb185eab.tar.gz gsoc2013-evolution-ff8aed099f0921cde2c5797167a476b7eb185eab.tar.zst gsoc2013-evolution-ff8aed099f0921cde2c5797167a476b7eb185eab.zip |
Only send the LOGOUT command if the store is connected. (imap_connect):
2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_disconnect): Only send
the LOGOUT command if the store is connected.
(imap_connect): Set the 'connected' state to TRUE when we
successfully connect.
(get_folder_info): if (!topfi), 'topfi' was allocated but then
'fi' was set. I think Dan meant to set topfi since fi is an
uninitialized value at this point.
* providers/imap/camel-imap-command.c (imap_read_response): Check
for the untagged BYE response and set the 'connected' state to
FALSE if we receive the BYE response. Return NULL if we get a BYE
response.
svn path=/trunk/; revision=5944
Diffstat (limited to 'camel/providers/imap/camel-imap-command.c')
-rw-r--r-- | camel/providers/imap/camel-imap-command.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index ea1f3aaccf..7a6045d16d 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -170,6 +170,15 @@ imap_read_response (CamelImapStore *store, CamelException *ex) g_free (respbuf); goto next; } + } else { + p = imap_next_word (respbuf); + if (!g_strncasecmp (p, "BYE", 3)) { + /* connection was lost, no more data to fetch */ + store->connected = FALSE; + g_free (respbuf); + respbuf = NULL; + break; + } } g_ptr_array_add (response->untagged, respbuf); @@ -187,7 +196,7 @@ imap_read_response (CamelImapStore *store, CamelException *ex) if (expunged) g_array_free (expunged, TRUE); - if (camel_exception_is_set (ex)) { + if (!respbuf || camel_exception_is_set (ex)) { camel_imap_response_free (response); return NULL; } |