+2010-02-20 [colin] 3.7.5cvs22
+
+ * src/imap.c
+ * src/imap.h
+ * src/main.c
+ * src/mainwindow.c
+ * src/etpan/imap-thread.c
+ * src/etpan/imap-thread.h
+ * src/etpan/nntp-thread.c
+ * src/etpan/nntp-thread.h
+ When going offline from NetworkManager, just
+ delete IMAP connections. That'll avoid timeouts
+ when coming back online in certain cases when
+ the TCP socket will have timed out.
+
2010-02-20 [holger] 3.7.5cvs21
* .cvsignore
( cvs diff -u -r 1.395.2.417 -r 1.395.2.418 src/summaryview.c; cvs diff -u -r 1.68.2.53 -r 1.68.2.54 src/summaryview.h; cvs diff -u -r 1.43.2.113 -r 1.43.2.114 src/toolbar.c; ) > 3.7.5cvs19.patchset
( cvs diff -u -r 1.395.2.418 -r 1.395.2.419 src/summaryview.c; cvs diff -u -r 1.68.2.54 -r 1.68.2.55 src/summaryview.h; cvs diff -u -r 1.43.2.114 -r 1.43.2.115 src/toolbar.c; ) > 3.7.5cvs20.patchset
( cvs diff -u -r 1.8.2.7 -r 1.8.2.8 .cvsignore; ) > 3.7.5cvs21.patchset
+( cvs diff -u -r 1.179.2.249 -r 1.179.2.250 src/imap.c; cvs diff -u -r 1.34.2.21 -r 1.34.2.22 src/imap.h; cvs diff -u -r 1.115.2.224 -r 1.115.2.225 src/main.c; cvs diff -u -r 1.274.2.306 -r 1.274.2.307 src/mainwindow.c; cvs diff -u -r 1.1.4.110 -r 1.1.4.111 src/etpan/imap-thread.c; cvs diff -u -r 1.1.4.26 -r 1.1.4.27 src/etpan/imap-thread.h; cvs diff -u -r 1.1.2.11 -r 1.1.2.12 src/etpan/nntp-thread.c; cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/etpan/nntp-thread.h; ) > 3.7.5cvs22.patchset
MICRO_VERSION=5
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=21
+EXTRA_VERSION=22
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
mailstream_network_delay.tv_usec = 0;
}
-void imap_main_done(void)
+void imap_main_done(gboolean have_connectivity)
{
- imap_disconnect_all();
+ imap_disconnect_all(have_connectivity);
etpan_thread_manager_stop(thread_manager);
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
return;
void imap_main_init(void)
{
}
-void imap_main_done(void)
+void imap_main_done(gboolean have_connectivity)
{
}
void imap_main_set_timeout(int sec)
void imap_main_set_timeout(int sec);
void imap_main_init(gboolean skip_ssl_cert_check);
-void imap_main_done(void);
+void imap_main_done(gboolean have_connectivity);
void imap_init(Folder * folder);
void imap_done(Folder * folder);
NULL);
}
-void nntp_main_done(void)
+void nntp_main_done(gboolean have_connectivity)
{
etpan_thread_manager_stop(thread_manager);
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
void nntp_main_init(void)
{
}
-void nntp_main_done(void)
+void nntp_main_done(gboolean have_connectivity)
{
}
void nntp_main_set_timeout(int sec)
void nntp_main_set_timeout(int sec);
void nntp_main_init(gboolean skip_ssl_cert_check);
-void nntp_main_done(void);
+void nntp_main_done(gboolean have_connectivity);
void nntp_init(Folder * folder);
void nntp_done(Folder * folder);
((IMAPFolder *)folder)->refcnt++;
}
-void imap_disconnect_all(void)
+void imap_disconnect_all(gboolean have_connectivity)
{
GList *list;
gboolean short_timeout;
RemoteFolder *folder = (RemoteFolder *)account->folder;
if (folder && folder->session) {
IMAPSession *session = (IMAPSession *)folder->session;
- imap_threaded_disconnect(FOLDER(folder));
+ if (have_connectivity)
+ imap_threaded_disconnect(FOLDER(folder));
SESSION(session)->state = SESSION_DISCONNECTED;
SESSION(session)->sock = NULL;
session_destroy(SESSION(session));
return &imap_class;
}
-void imap_disconnect_all(void)
+void imap_disconnect_all(gboolean have_connectivity)
{
}
void imap_folder_ref(Folder *folder);
void imap_folder_unref(Folder *folder);
gchar imap_get_path_separator_for_item (FolderItem *item);
-void imap_disconnect_all(void);
+void imap_disconnect_all(gboolean have_connectivity);
gint imap_subscribe(Folder *folder, FolderItem *item, gchar *rpath, gboolean sub);
GList *imap_scan_subtree(Folder *folder, FolderItem *item, gboolean unsubs_only, gboolean recursive);
void imap_cache_msg(FolderItem *item, gint msgnum);
static void exit_claws(MainWindow *mainwin)
{
gchar *filename;
+ gboolean have_connectivity;
sc_exiting = TRUE;
close_log_file(LOG_PROTOCOL);
close_log_file(LOG_DEBUG_FILTERING);
+#ifdef HAVE_NETWORKMANAGER_SUPPORT
+ have_connectivity = networkmanager_is_online(NULL);
+#else
+ have_connectivity = TRUE;
+#endif
#ifdef HAVE_LIBETPAN
- imap_main_done();
- nntp_main_done();
+ imap_main_done(have_connectivity);
+ nntp_main_done(have_connectivity);
#endif
/* delete crashfile */
if (!cmd.crash)
if(have_connectivity)
mainwindow_check_synchronise(mainwin, TRUE);
prefs_common.work_offline = TRUE;
- if(have_connectivity)
- imap_disconnect_all();
+ imap_disconnect_all(have_connectivity);
hooks_invoke(OFFLINE_SWITCH_HOOKLIST, NULL);
} else {
/*go online */