nnrpd: single line response when client expecting multi-line response

David Canzi dmcanzi at ist.uwaterloo.ca
Fri Aug 11 15:02:56 UTC 2006

A news client, trn, hangs on entry to a newly created and still
empty newsgroup.  It appears to be expecting a multi-line response
from "LISTGROUP" and nnrpd is sending it a single-line response.
When I modified nnrpd/group.c to supply the ".\r\n" for terminating
a multi-line response, trn, no longer hanged.

Patch below applies to nnrpd/group.c from a recent stable snapshot.

*** group.c	Fri Aug 11 05:07:12 2006
--- group.c.fixed	Fri Aug 11 10:30:49 2006
*** 149,158 ****
--- 149,159 ----
             something bland here ("Article list follows"), but reference NNTP
             returns the same data as GROUP does and since we have it all
             available it shouldn't hurt to return the same thing. */
          if (count == 0) {
              Reply("%d 0 0 0 %s\r\n", NNTP_GROUPOK_VAL, group);
+             Printf(".\r\n");
          } else if ((handle = OVopensearch(group, ARTlow, ARThigh)) != NULL) {
              Reply("%d %d %ld %ld %s\r\n", NNTP_GROUPOK_VAL, count, ARTlow,
                    ARThigh, group);
  	    while (OVsearch(handle, &i, NULL, NULL, &token, NULL)) {
  		if (PERMaccessconf->nnrpdcheckart && !ARTinstorebytoken(token))

More information about the inn-bugs mailing list