2010-12-21 [colin] 3.7.8cvs18
authorColin Leroy <colin@colino.net>
Tue, 21 Dec 2010 21:31:51 +0000 (21:31 +0000)
committerColin Leroy <colin@colino.net>
Tue, 21 Dec 2010 21:31:51 +0000 (21:31 +0000)
* src/inc.c
* src/send_message.c
* src/common/session.c
* src/common/session.h
Differentiate between running sessions and connected
sessions. Fixes bug #2332, "Crash when hitting cancel
on the SMTP status window"

ChangeLog
PATCHSETS
configure.ac
src/common/session.c
src/common/session.h
src/inc.c
src/send_message.c

index 361121f..caa6465 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-21 [colin]     3.7.8cvs18
+
+       * src/inc.c
+       * src/send_message.c
+       * src/common/session.c
+       * src/common/session.h
+               Differentiate between running sessions and connected
+               sessions. Fixes bug #2332, "Crash when hitting cancel
+               on the SMTP status window"
+
 2010-12-21 [colin]     3.7.8cvs17
 
        * src/etpan/etpan-thread-manager.c
index 8d2c4ce..fab06d6 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.27.2.48 -r 1.27.2.49 src/addr_compl.c;  cvs diff -u -r -1.1.4.10 -r -1.1.4.11 src/addrcindex.c;  cvs diff -u -r -1.1.4.6 -r -1.1.4.7 src/addrcindex.h;  cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/gtk/gtkcmclist.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/gtk/gtkcmctree.c;  cvs diff -u -r 1.1.4.58 -r 1.1.4.59 src/gtk/gtksctree.c;  ) > 3.7.8cvs15.patchset
 ( cvs diff -u -r 1.96.2.225 -r 1.96.2.226 src/textview.c;  ) > 3.7.8cvs16.patchset
 ( cvs diff -u -r 1.1.4.13 -r 1.1.4.14 src/etpan/etpan-thread-manager.c;  ) > 3.7.8cvs17.patchset
+( cvs diff -u -r 1.149.2.101 -r 1.149.2.102 src/inc.c;  cvs diff -u -r 1.17.2.57 -r 1.17.2.58 src/send_message.c;  cvs diff -u -r 1.23.2.24 -r 1.23.2.25 src/common/session.c;  cvs diff -u -r 1.8.2.16 -r 1.8.2.17 src/common/session.h;  ) > 3.7.8cvs18.patchset
index a135ee5..b4f6ca0 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=17
+EXTRA_VERSION=18
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 21213f7..c79e19a 100644 (file)
@@ -227,13 +227,19 @@ void session_destroy(Session *session)
        g_free(session);
 }
 
-gboolean session_is_connected(Session *session)
+gboolean session_is_running(Session *session)
 {
        return (session->state == SESSION_READY ||
                session->state == SESSION_SEND ||
                session->state == SESSION_RECV);
 }
 
+gboolean session_is_connected(Session *session)
+{
+       return (session->state == SESSION_SEND ||
+               session->state == SESSION_RECV);
+}
+
 void session_set_access_time(Session *session)
 {
        session->last_access_time = time(NULL);
index 5f4a68f..185cfff 100644 (file)
@@ -167,6 +167,7 @@ gint session_connect                (Session        *session,
                                 gushort         port);
 gint session_disconnect                (Session        *session);
 void session_destroy           (Session        *session);
+gboolean session_is_running    (Session        *session);
 gboolean session_is_connected  (Session        *session);
 
 void session_set_access_time   (Session        *session);
index 7550600..d9f25e6 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -837,7 +837,7 @@ static IncState inc_pop3_session_do(IncSession *session)
                return INC_CONNECT_ERROR;
        }
 
-       while (session_is_connected(SESSION(pop3_session)) &&
+       while (session_is_running(SESSION(pop3_session)) &&
               session->inc_state != INC_CANCEL)
                gtk_main_iteration();
 
index faccb73..7964cec 100644 (file)
@@ -368,7 +368,7 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
                smtp_from(smtp_session);
        }
 
-       while (session_is_connected(session) && dialog->cancelled == FALSE
+       while (session_is_running(session) && dialog->cancelled == FALSE
                && SMTP_SESSION(session)->state != SMTP_MAIL_SENT_OK)
                gtk_main_iteration();