diff options
author | Dan Winship <danw@src.gnome.org> | 2000-11-01 07:44:46 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-11-01 07:44:46 +0800 |
commit | 517db3b21fece8d8616620ff299689699b62b277 (patch) | |
tree | 0417ff14f0fa20967aba0580e48d8668050ad07b /camel/providers/nntp | |
parent | 1d60c5cc024dd69b2f0d776bd0f48d1af7fef08b (diff) | |
download | gsoc2013-evolution-517db3b21fece8d8616620ff299689699b62b277.tar.gz gsoc2013-evolution-517db3b21fece8d8616620ff299689699b62b277.tar.zst gsoc2013-evolution-517db3b21fece8d8616620ff299689699b62b277.zip |
Add a new argument, clean, that says whether or not to try to disconnect
* camel-service.c (service_disconnect): Add a new argument, clean,
that says whether or not to try to disconnect cleanly.
* camel-remote-store.c (remote_send_string, remote_send_stream,
remote_recv_line): disconnect uncleanly on failure to prevent
infinite loops when providers would normally send commands from
disconnect(). Remove some unneeded CamelException goo.
* providers/smtp/camel-smtp-transport.c (smtp_disconnect):
* providers/pop3/camel-pop3-store.c (pop3_disconnect):
* providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
* providers/imap/camel-imap-store.c (imap_disconnect): Don't send
QUIT/LOGOUT if !clean.
svn path=/trunk/; revision=6303
Diffstat (limited to 'camel/providers/nntp')
-rw-r--r-- | camel/providers/nntp/camel-nntp-store.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c index dbba4356be..41466fe06c 100644 --- a/camel/providers/nntp/camel-nntp-store.c +++ b/camel/providers/nntp/camel-nntp-store.c @@ -263,16 +263,17 @@ nntp_store_connect (CamelService *service, CamelException *ex) } static gboolean -nntp_store_disconnect (CamelService *service, CamelException *ex) +nntp_store_disconnect (CamelService *service, gboolean clean, CamelException *ex) { CamelNNTPStore *store = CAMEL_NNTP_STORE (service); - camel_nntp_command (store, ex, NULL, "QUIT"); + if (clean) + camel_nntp_command (store, ex, NULL, "QUIT"); if (store->newsrc) camel_nntp_newsrc_write (store->newsrc); - if (!service_class->disconnect (service, ex)) + if (!service_class->disconnect (service, clean, ex)) return FALSE; return TRUE; |