chiark / gitweb /
Cope with NNTP_STRLEN abolishment (replaced with NNTP_MAXLEN_COMMAND)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 5 Dec 2015 21:23:11 +0000 (21:23 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 5 Dec 2015 21:23:11 +0000 (21:23 +0000)
conn.c

diff --git a/conn.c b/conn.c
index d20b342..7ee6aab 100644 (file)
--- a/conn.c
+++ b/conn.c
@@ -327,7 +327,7 @@ static void *connchild_event(oop_source *lp, int fd, oop_event e, void *u) {
   loop->on_fd(loop, conn->fd, OOP_EXCEPTION, conn_exception, conn);
   conn->rd= oop_rd_new_fd(loop,conn->fd, 0, 0); /* sets nonblocking, too */
   if (!conn->fd) crash("oop_rd_new_fd conn failed (fd=%d)",conn->fd);
-  int r= oop_rd_read(conn->rd, &peer_rd_style, NNTP_STRLEN,
+  int r= oop_rd_read(conn->rd, &peer_rd_style, NNTP_MAXLEN_COMMAND+1,
                     &peer_rd_ok, conn,
                     &peer_rd_err, conn);
   if (r) syscrash("oop_rd_read for peer (fd=%d)",conn->fd);
@@ -370,7 +370,7 @@ void connect_start(void) {
 
   if (!connecting_child) {
     FILE *cn_from, *cn_to;
-    char buf[NNTP_STRLEN+100];
+    char buf[NNTP_MAXLEN_COMMAND+100];
     int exitstatus= CONNCHILD_ESTATUS_NOSTREAM;
 
     xclose(socks[0], "(in child) parent's connection fdpass socket",0);