52 lines
1.3 KiB
Text
52 lines
1.3 KiB
Text
$NetBSD: patch-ab,v 1.3 2005/04/01 03:28:36 kim Exp $
|
|
|
|
--- nntpclnt.c.orig 1994-08-11 17:37:51.000000000 -0400
|
|
+++ nntpclnt.c 2005-03-31 22:25:28.000000000 -0500
|
|
@@ -24,6 +24,11 @@
|
|
* Include configuration parameters only if we're made in the nntp tree.
|
|
*/
|
|
|
|
+#if defined(USG) || defined(MSDOS)
|
|
+#include <string.h>
|
|
+#else
|
|
+#include <strings.h>
|
|
+#endif
|
|
#ifdef NNTPSRC
|
|
#include "config.h"
|
|
#endif /* NNTPSRC */
|
|
@@ -64,11 +69,6 @@
|
|
#define net_read(a,b,c,d,e) soread(a,b,c)
|
|
#define net_write(a,b,c,d) sowrite(a,b,c)
|
|
#endif
|
|
-#if defined(USG) || defined(MSDOS)
|
|
-#include <string.h>
|
|
-#else
|
|
-#include <strings.h>
|
|
-#endif
|
|
#include "nntpclnt.h"
|
|
#ifdef NONETDB
|
|
# define IPPORT_NNTP ((unsigned short) 119)
|
|
@@ -199,7 +199,7 @@
|
|
server_init(machine)
|
|
char *machine;
|
|
{
|
|
- int sockt_rd, sockt_wr;
|
|
+ int sockt_rd, sockt_wr, result[2];
|
|
char line[256];
|
|
char *index();
|
|
#if defined(DECNET) || defined(SGI4DDN)
|
|
@@ -248,7 +248,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]);
|
|
}
|
|
|
|
#ifdef DATAKIT
|