summaryrefslogtreecommitdiff
path: root/news/newsfetch/patches/patch-ab
blob: 81096b2b71b905fda8c3ac5a0fb28c46033e502a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
$NetBSD: patch-ab,v 1.1 2004/03/29 17:31:55 tv Exp $

--- nntp.c.orig	Mon Nov  3 08:34:59 2003
+++ nntp.c
@@ -51,7 +51,7 @@ void read_nntp_data() 
 int set_reader_mode() 
 {
 	read_nntp_data();
-	fprintf(socket_fp[0], "MODE READER\n");
+	fprintf(socket_fp[0], "MODE READER\r\n");
 	read_nntp_data();
 	return (get_error(command_buf));
 }
@@ -191,7 +191,7 @@ int check_group() 
 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);
 read_nntp_data();
 	    
 #ifdef DEBUG
@@ -220,7 +220,7 @@ read_nntp_data();
 			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);
 	read_nntp_data();
 	    
 	while (!get_error_noprint(command_buf)) {
@@ -238,7 +238,7 @@ read_nntp_data();
 			return (0);
 		}
 		    
-		fprintf(socket_fp[0], "STAT %d\n", first_article);
+		fprintf(socket_fp[0], "STAT %d\r\n", first_article);
 		read_nntp_data();
 	}
 	    
@@ -302,7 +302,7 @@ int check_header = 1;
 			fprintf(stderr, "                                    %c", 0xd);
 	}
 	    
-	fprintf(socket_fp[0], "ARTICLE\n");
+	fprintf(socket_fp[0], "ARTICLE\r\n");
 	read_nntp_data();
 	    
 	if (!get_error(command_buf))
@@ -325,7 +325,7 @@ int check_header = 1;
 	/*
 	 * Make it little fast 
 	 */ 
-	fprintf(socket_fp[0], "NEXT\n");
+	fprintf(socket_fp[0], "NEXT\r\n");
 	article_fetching = 1;
 	    
 #ifndef NO_STATUS_METER
@@ -391,7 +391,7 @@ void get_group_list() 
 	char groupname[100];
 	    
 	fprintf(stderr, "\nList of NewsGroups:\n");
-	fprintf(socket_fp[0], "LIST\n");
+	fprintf(socket_fp[0], "LIST\r\n");
 	read_nntp_data();
 	    
 	if (!get_error_strmsg(command_buf))
@@ -411,7 +411,7 @@ void get_group_list() 
 
 void send_quit() 
 {
-	fprintf(socket_fp[0], "QUIT\n");
+	fprintf(socket_fp[0], "QUIT\r\n");
 	read_nntp_data();
 }