Re: NNTPC: XGTITLE works?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rrauenza@cup.hp.com (Rich Rauenzahn) writes:

> telnet> Connection closed.
> $ telnet hpvablab nntp
> Trying...
> Connected to hpvablab.cup.hp.com.
> Escape character is '^]'.
> 200 hpvablab.cup.hp.com NNTPcache server V2.2b6 [see www.nntpcache.org]
> (c) 1996-1998 Julian Assange <proff@iq.org> Jan 19 1
> 998 ready (posting ok).
> xgtitle hp.test
> 282
> hp.test 9903 9611 y
> .
> quit
> 205
> Connection closed by foreign host.
> $

This is a bug indeed. If you give an xgtitle command with a single
newsgroup you get back the active information. The same holds for
"list newsgroups". You can find my changes to list.c below.

Cheers,
Hugo

				Hugo Embrechts
------- KULeuvenNet -------------------------------------------------------
			        Ludit, W. de Croylaan 52A, B-3001 Heverlee
			        Hugo.Embrechts@kulnet.kuleuven.ac.be
    			        016 / 32 27 85 (Tel.),  32 29 99 (Fax.)





--- list.c	1997/10/28 12:07:06	1.1
+++ list.c	1998/01/13 13:32:04
@@ -544,15 +544,34 @@
 	if (group_pat && !strpbrk(group_pat, "*?[]"))
 	{
 		if ((n = newsgroup_find_add(group_pat, NULL, FALSE)))
+		{
 #ifdef READ_LOCKS
-			if (newsgroupLockRead(n))
+			if (!newsgroupLockRead(n))
+				goto end ;
+#endif
+			if (con.listSecurity && !authGroup(n->group, FALSE))
+				goto end ;
+			switch (list->type)
 			{
+			case l_active:
 				bytes+=print_active(n);
-				n->read_locks--;
+				break;
+			case l_active_times:
+				if (n->creation_time && n->creator)
+					bytes+=emitf ("%s %lu %s\r\n", n->group, n->creation_time, n->creator);
+				break;
+			case l_xgtitle:
+			case l_newsgroups:
+				if (n->desc)
+					bytes+=emitf ("%s\t%s\r\n", n->group, n->desc);
+				break;
+			default:
+				break;
 			}
-#else
-			print_active(n);
+#ifdef READ_LOCKS
+			n->read_locks--;
 #endif
+		}
 		goto end;
 	}
 	for (n=Ni->newsgroup_head; n; n=n->next)



[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux