summaryrefslogtreecommitdiff
path: root/news/nn/patches/patch-ae
blob: f8af95d1305eb77d0bba47fe4d289e39af65e495 (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
--- inews/clientlib.c.orig	Thu Nov 25 10:28:59 1993
+++ inews/clientlib.c	Thu May 21 11:20:24 1998
@@ -56,6 +56,8 @@
 FILE	*ser_rd_fp = NULL;
 FILE	*ser_wr_fp = NULL;
 
+void put_server(char *);
+
 /*
  * getserverbyfile	Get the name of a server from a named file.
  *			Handle white space and comments.
@@ -124,7 +126,7 @@
 server_init(machine)
 char	*machine;
 {
-	int	sockt_rd, sockt_wr;
+	int	sockt_rd, sockt_wr, result[2];
 	char	line[256];
 	char	*index();
 #ifdef DECNET
@@ -166,7 +168,13 @@
 	/* Now get the server's signon message */
 
 	(void) get_server(line, sizeof(line));
-	return (atoi(line));
+	result[0] = atoi(line);
+
+	put_server("MODE READER");
+	(void) get_server(line, sizeof(line));
+	result[1] = atoi(line);
+
+	return ((result[1] != ERR_COMMAND) ? result[1] : result[0]);
 }