JFTR, the follwoing patch to fix this will be in the next unstable
release (1.9.6).

=== modified file 'include/proto.h'
--- include/proto.h     2010-09-12 21:11:20 +0000
+++ include/proto.h     2010-09-26 11:59:32 +0000
@@ -473,6 +473,7 @@
 #endif /* !HAVE_VSNPRINTF */
 
 /* post.c */
+extern char *backup_article_name(const char *the_article);
 extern char *checknadd_headers(const char *infile, struct t_group *group);
 extern int count_postponed_articles(void);
 extern int mail_to_author(const char *group, int respnum, t_bool copy_text, 
t_bool with_headers, t_bool raw_data);

=== modified file 'src/nntplib.c'
--- src/nntplib.c       2010-09-12 21:11:20 +0000
+++ src/nntplib.c       2010-09-26 14:11:32 +0000
@@ -829,8 +829,15 @@
         * Exit tin if the user says no to reconnect. The exit code stops tin 
from trying
         * to disconnect again - the connection is already dead
         */
-       if (!tinrc.auto_reconnect && prompt_yn(_(txt_reconnect_to_news_server), 
TRUE) != 1)
+       if (!tinrc.auto_reconnect && prompt_yn(_(txt_reconnect_to_news_server), 
TRUE) != 1) {
+               if (!strncmp("POST", last_put, 4)) {
+                       unlink(backup_article_name(article_name));
+                       rename_file(article_name, dead_article);
+                       if (tinrc.keep_dead_articles)
+                               append_file(dead_articles, dead_article);
+               }
                tin_done(NNTP_ERROR_EXIT);              /* user said no to 
reconnect */
+       }
 
        /*
         * reset signal_context
@@ -862,8 +869,15 @@
                return 0;
        }
 
-       if (--retry == 0)                                       /* No more 
tries? */
+       if (--retry == 0) {                                     /* No more 
tries? */
+               if (!strncmp("POST", buf, 4)) {
+                       unlink(backup_article_name(article_name));
+                       rename_file(article_name, dead_article);
+                       if (tinrc.keep_dead_articles)
+                               append_file(dead_articles, dead_article);
+               } 
                tin_done(NNTP_ERROR_EXIT);
+       }
 
        return retry;
 }

=== modified file 'src/post.c'
--- src/post.c  2010-09-11 16:08:21 +0000
+++ src/post.c  2010-09-26 11:58:59 +0000
@@ -129,7 +129,6 @@
 static FILE *create_mail_headers(char *filename, size_t filename_len, const 
char *suffix, const char *to, const char *subject, struct t_header *extra_hdrs);
 static char **build_nglist(char *ngs_list, int *ngcnt);
 static char **split_address_list(const char *addresses, unsigned int *cnt);
-static char *backup_article_name(const char *the_article);
 static int add_mail_quote(FILE *fp, int respnum);
 static int check_article_to_be_posted(const char *the_article, int art_type, 
struct t_group **group, t_bool art_unchanged);
 static int mail_loop(const char *filename, t_function func, char *subject, 
const char *groupname, const char *prompt, FILE *articlefp);
@@ -295,7 +294,7 @@
  * submit_news_file adds headers, does q-p conversion etc
  * TODO: why not use BACKUP_FILE_EXT like in misc.c?
  */
-static char *
+char *
 backup_article_name(
        const char *the_article)
 {



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to