2007-11-16 [colin] 3.0.2cvs138
authorColin Leroy <colin@colino.net>
Fri, 16 Nov 2007 17:26:14 +0000 (17:26 +0000)
committerColin Leroy <colin@colino.net>
Fri, 16 Nov 2007 17:26:14 +0000 (17:26 +0000)
* src/news.c
Fix bug 1390, 'NNTP fails after server
closed connection'

ChangeLog
PATCHSETS
configure.ac
src/news.c

index f741025..725924a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-16 [colin]     3.0.2cvs138
+
+       * src/news.c
+               Fix bug 1390, 'NNTP fails after server 
+               closed connection'
+
 2007-11-16 [colin]     3.0.2cvs137
 
        * src/prefs_display_header.c
index 50dc7af..f1024ef 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.60.2.40 -r 1.60.2.41 src/filtering.c;  ) > 3.0.2cvs135.patchset
 ( cvs diff -u -r 1.395.2.334 -r 1.395.2.335 src/summaryview.c;  cvs diff -u -r 1.1.2.81 -r 1.1.2.82 src/gtk/quicksearch.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/gtk/quicksearch.h;  ) > 3.0.2cvs136.patchset
 ( cvs diff -u -r 1.16.2.32 -r 1.16.2.33 src/prefs_display_header.c;  ) > 3.0.2cvs137.patchset
+( cvs diff -u -r 1.101.2.45 -r 1.101.2.46 src/news.c;  ) > 3.0.2cvs138.patchset
index 22f20dc..aeae213 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=137
+EXTRA_VERSION=138
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 6bd9928..10fb69a 100644 (file)
@@ -380,6 +380,8 @@ static NewsSession *news_session_get(Folder *folder)
 {
        RemoteFolder *rfolder = REMOTE_FOLDER(folder);
        struct tm lt;
+       int r;
+       
        g_return_val_if_fail(folder != NULL, NULL);
        g_return_val_if_fail(FOLDER_CLASS(folder) == &news_class, NULL);
        g_return_val_if_fail(folder->account != NULL, NULL);
@@ -401,15 +403,17 @@ static NewsSession *news_session_get(Folder *folder)
                return NEWS_SESSION(rfolder->session);
        }
 
-       if (nntp_threaded_date(folder, &lt)
-           == NEWSNNTP_ERROR_STREAM) {
-               log_warning(LOG_PROTOCOL, _("NNTP connection to %s:%d has been"
+       if ((r = nntp_threaded_date(folder, &lt)) != NEWSNNTP_NO_ERROR) {
+               if (r != NEWSNNTP_ERROR_COMMAND_NOT_SUPPORTED &&
+                   r != NEWSNNTP_ERROR_COMMAND_NOT_UNDERSTOOD) {
+                       log_warning(LOG_PROTOCOL, _("NNTP connection to %s:%d has been"
                              " disconnected. Reconnecting...\n"),
                            folder->account->nntp_server,
                            folder->account->set_nntpport ?
                            folder->account->nntpport : NNTP_PORT);
-               session_destroy(rfolder->session);
-               rfolder->session = news_session_new_for_folder(folder);
+                       session_destroy(rfolder->session);
+                       rfolder->session = news_session_new_for_folder(folder);
+               }
        }
        
        if (rfolder->session)