nnrp answer to listgroup of empty group

Jeffrey M. Vinocur jeff at litech.org
Mon Jan 30 14:01:56 UTC 2006

On Jan 30, 2006, at 8:15 AM, Andreas Vogt wrote:

> (INN 2.4.2)
> [ LISTGROUP gives this: ]
> 411 No such group xx.yy.zz
> [ when GROUP gives: ]
> 211 0 0 0 xx.yy.zz

That certainly strikes me like a bug.

The relevant code in nnrpd/group.c is:

     if (!OVgroupstats(group, &ARTlow, &ARThigh, &count, NULL)) {
         Reply("%s %s\r\n", NOSUCHGROUP, group);
         if ((handle = OVopensearch(group, ARTlow, ARThigh)) != NULL) {
             if (count == 0)
                 Reply("%d 0 0 0 %s\r\n", NNTP_GROUPOK_VAL, group);
                 Reply("%d %d %ld %ld %s\r\n", NNTP_GROUPOK_VAL, count,
                       ARTlow, ARThigh, group);
             while (OVsearch(handle, &i, NULL, NULL, &token, NULL)) {
         } else {
             Reply("%s %s\r\n", NOSUCHGROUP, group);

And I think we should pull the count==0 test outside of the  
surrounding if block.  Except that makes it difficult to deal with a  
true error (not just empty group) returned from OVopensearch.  Ho  
hum.  I think I see how to rearrange it, but I don't seem to be able  
to compile INN at the moment so I can't test.

Jeffrey M. Vinocur
jeff at litech.org

More information about the inn-workers mailing list