[PATCH] small fix for nntplib.c:getserverbyfile()
Dennis Preiser <[email protected]> Fri, 16 Jul 2010 21:04:46 +0200
| Newsgroups | gmane.network.tin.devel |
|---|---|
| Message-ID | <[email protected]> |
When using tin -R (read_saved_news == TRUE) getserverbyname() has never
returned the intended string because read_news_via_nntp is FALSE and the
first check succeeds. The patch below reverses the two checks in order
to return the proper string in the "-R" case.
Dennis
--- tin-1.9.6_r3/src/nntplib.c 2010-05-14 13:33:37.000000000 +0200
+++ tin-1.9.6_r4/src/nntplib.c 2010-07-16 20:15:50.000000000 +0200
@@ -123,13 +123,13 @@ getserverbyfile(
# endif /* !HAVE_SETENV && HAVE_PUTENV */
#endif /* NNTP_ABLE */
- if (!read_news_via_nntp) {
- STRCPY(buf, "local"); /* what if a server is named "local"? */
+ if (read_saved_news) {
+ STRCPY(buf, "reading saved news");
return buf;
}
- if (read_saved_news) {
- STRCPY(buf, "reading saved news");
+ if (!read_news_via_nntp) {
+ STRCPY(buf, "local"); /* what if a server is named "local"? */
return buf;
}