🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #74889

Re: [slrn] Problems with O'Reilly WebBoard

#74889
From: Alex Chiang
Date: Sun, 01 Apr 2001 00:14
97 lines
4515 bytes
* Thomas Schultz <tststs@gmx.de>:
> * Alex Chiang [2001-03-28 04:29] :
> 
> > My problem is that slrn will not stay subscribed to any groups. I
> > think what's happening is that WebBoard is issuing a newgroup command
> > (or something (I am unfamiliar with NNTP)) every time a new post or
> > followup is made to the group. [...]
> 
> You could try to find out whether this problem is really caused by an
> incorrect implementation of the NEWGROUPS command by telling slrn not
> to request a list of new groups (either by using the command line
> switch "-n" or by setting "check_new_groups" to 0 in your slrnrc file).

Hi Thomas,

I did try giving the '-n' option, and now my subscribed groups
appear correctly. This leads me to believe that WebBoard has a
buggy implementation of NEWGROUPS.

I spent some time looking through the source, and I think I
understand why I was seeing the behavior. Inside of
read_and_parse_newsrc_file, we insert_new_groups before parsing
the .newsrc file.

Upon insertion of new groups, we call add_group, and in there, we
set a GROUP_PROCESSED flag. 

After we are done inserting all new groups, we then try to insert
groups from the .newsrc file. So if the server says that one of
our subscribed groups is new, it will have already been inserted
into the current group list and its processed flag will be set by
the time that we are ready to go through the .newsrc.

I made a small fix to change the order -- parse through .newsrc
first, and then insert new groups. It seems to be working, but I
can't tell if actual new groups will be inserted correctly or
not. Also, since I'm not too familiar with slrn codebase, I can't
tell what side effects it may have.

It does fix my problem of the server's buggy NEWGROUPS
command, though. 

Below is a diff for group.c. I don't know whether you would like
this change or not, but if you do, feel free to use it (or at
least use the idea and have a better implementation ;)

/Alex

*** group.c	Sat Mar 31 17:31:50 2001
--- ../../slrn-0.9.7.0a/src/group.c	Tue Mar 27 08:33:51 2001
***************
*** 665,672 ****
  /*}}}*/
  static Slrn_Group_Type *insert_new_groups (void) /*{{{*/
  {
!    Slrn_Group_Type *last_group = NULL; 
!    last_group = Slrn_Group_Current_Group;
     
     if (Unsubscribed_Groups != NULL)
       {
--- 665,671 ----
  /*}}}*/
  static Slrn_Group_Type *insert_new_groups (void) /*{{{*/
  {
!    Slrn_Group_Type *last_group = NULL;
     
     if (Unsubscribed_Groups != NULL)
       {
***************
*** 2384,2391 ****
     char *vline;
     unsigned int vlen;
     char file[SLRN_MAX_PATH_LEN];
!    /* Slrn_Group_Type *last_group = insert_new_groups (); */
!    Slrn_Group_Type *last_group =  NULL;
  
     if ((NULL == (vp = slrn_open_home_vfile (Slrn_Newsrc_File, file,
  					    sizeof (file))))
--- 2383,2389 ----
     char *vline;
     unsigned int vlen;
     char file[SLRN_MAX_PATH_LEN];
!    Slrn_Group_Type *last_group = insert_new_groups ();
  
     if ((NULL == (vp = slrn_open_home_vfile (Slrn_Newsrc_File, file,
  					    sizeof (file))))
***************
*** 2419,2425 ****
  	  last_group = place_group_in_newsrc_order (last_group);
       }
     vclose (vp);
-    last_group = insert_new_groups (); 
     return 0;
  }
     
--- 2417,2422 ----
Technical Details
Message-ID: <slrn9ccsmo.aj3.achiang@nyx10.nyx.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!hub.org!hub.org!hermes2.visi.com!news-out.visi.com!news-out.visi.com!hermes.visi.com!pulsar.dimensional.com!dimensional.com!wormhole.dimensional.com!achiang
References: <slrn9c2q4c.bt3.achiang@nyx10.nyx.net> <slrn9c9rlr.qg.tststs@starflower.tststs.ddns.org>

Show Full Headers
Complete Article Headers
Message-ID: <slrn9ccsmo.aj3.achiang@nyx10.nyx.net>
Subject: Re: [slrn] Problems with O'Reilly WebBoard
Date: Sun, 01 Apr 2001 00:14:24 GMT
From: achiang@nyx.net.invalid (Alex Chiang)
References: <slrn9c2q4c.bt3.achiang@nyx10.nyx.net> <slrn9c9rlr.qg.tststs@starflower.tststs.ddns.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!hub.org!hub.org!hermes2.visi.com!news-out.visi.com!news-out.visi.com!hermes.visi.com!pulsar.dimensional.com!dimensional.com!wormhole.dimensional.com!achiang
Newsgroups: news.software.readers
Organization: Nyx Net
Reply-To: achiang@nyx.net
User-Agent: slrn/0.9.6.3 (SunOS)
Cache-Post-Path: irys.nyx.net!achiang@nyx10.nyx.net
X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/)
Lines: 96
NNTP-Posting-Host: 206.124.29.6
X-Trace: wormhole.dimensional.com 986084064 206.124.29.6 (Sat, 31 Mar 2001 17:14:24 MST)
NNTP-Posting-Date: Sat, 31 Mar 2001 17:14:24 MST