summaryrefslogtreecommitdiffstats
path: root/news
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2002-08-03 10:32:49 +0000
committerknu <knu@FreeBSD.org>2002-08-03 10:32:49 +0000
commita8ec02fa8c28dfee6a480981d264ee29a07861bc (patch)
treeab80819b21d9ac7518b509e2dc6375d4b772bdd3 /news
parentff1769e16e7aa1c957cb685a008fa03d2841b0ff (diff)
downloadFreeBSD-ports-a8ec02fa8c28dfee6a480981d264ee29a07861bc.zip
FreeBSD-ports-a8ec02fa8c28dfee6a480981d264ee29a07861bc.tar.gz
Transmit CR+LF instead of LF as line terminator. This fixes a problem
where it hangs when a news server to connect to is strict with the NNTP standard. PR: ports/41197 Submitted by: Nathan J. Yoder <njyoder@gummibears.nu>
Diffstat (limited to 'news')
-rw-r--r--news/newsfetch/Makefile1
-rw-r--r--news/newsfetch/files/patch-nntp.c74
2 files changed, 75 insertions, 0 deletions
diff --git a/news/newsfetch/Makefile b/news/newsfetch/Makefile
index d201bbc..5c477e5 100644
--- a/news/newsfetch/Makefile
+++ b/news/newsfetch/Makefile
@@ -7,6 +7,7 @@
PORTNAME= newsfetch
PORTVERSION= 1.21
+PORTREVISION= 1
CATEGORIES= news
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= system/news/readers
diff --git a/news/newsfetch/files/patch-nntp.c b/news/newsfetch/files/patch-nntp.c
new file mode 100644
index 0000000..19d5a9a
--- /dev/null
+++ b/news/newsfetch/files/patch-nntp.c
@@ -0,0 +1,74 @@
+--- nntp.c.orig Sat Aug 3 19:24:46 2002
++++ nntp.c Sat Aug 3 19:26:29 2002
+@@ -33,7 +33,7 @@
+ {
+ /* dummy read to flush input */
+ readNNTPdata();
+- fprintf(socket_fp[0],"MODE READER\n");
++ fprintf(socket_fp[0],"MODE READER\r\n");
+ readNNTPdata();
+ return(get_error(command_buf));
+ }
+@@ -151,7 +151,7 @@
+ int first_art, last_art, total_art, tmp ;
+
+ fprintf(stderr,"%s: ",group);
+- fprintf(socket_fp[0],"GROUP %s\n",group);
++ fprintf(socket_fp[0],"GROUP %s\r\n",group);
+ readNNTPdata();
+
+ #ifdef DEBUG
+@@ -180,7 +180,7 @@
+ first_article = last_art - max_article + 1;
+ }
+
+- fprintf(socket_fp[0],"STAT %d\n",first_article);
++ fprintf(socket_fp[0],"STAT %d\r\n",first_article);
+ readNNTPdata();
+
+ while(!get_error1(command_buf))
+@@ -196,7 +196,7 @@
+ return(0);
+ }
+
+- fprintf(socket_fp[0],"STAT %d\n",first_article);
++ fprintf(socket_fp[0],"STAT %d\r\n",first_article);
+ readNNTPdata();
+ }
+ fprintf(stderr,"articles %d to %d\n",first_article,last_art);
+@@ -256,7 +256,7 @@
+ fprintf(stderr," %c",0xd);
+ }
+
+- fprintf(socket_fp[0],"ARTICLE\n");
++ fprintf(socket_fp[0],"ARTICLE\r\n");
+ readNNTPdata();
+ if(!get_error(command_buf))
+ return(0);
+@@ -275,7 +275,7 @@
+ }
+
+ /* Make it little fast */
+- fprintf(socket_fp[0],"NEXT\n");
++ fprintf(socket_fp[0],"NEXT\r\n");
+
+ article_fetching=1;
+
+@@ -329,7 +329,7 @@
+ char groupname[100];
+
+ fprintf(stderr, "\nList of NewsGroups:\n");
+- fprintf(socket_fp[0],"LIST\n");
++ fprintf(socket_fp[0],"LIST\r\n");
+ readNNTPdata();
+ if(!get_error2(command_buf))
+ exit(1);
+@@ -348,7 +348,7 @@
+ sendQuit()
+ {
+
+- fprintf(socket_fp[0],"QUIT\n");
++ fprintf(socket_fp[0],"QUIT\r\n");
+ readNNTPdata();
+ }
+
OpenPOWER on IntegriCloud