Re: 0.3.4.a snget -m again
Patrik Rådman <[email protected]>
| Newsgroups | gmane.network.sn |
|---|---|
| Message-ID | <[email protected]> |
Patrik Rådman <[email protected]> wrote: > Eric Wick <[email protected]> wrote: > [snip] > > snget -m500 > > > > The fetch runs into chaos, i got over 25000 articles per group cause > > the option -m was ignored. Only the .max per groupdirectory protect a > > system from megafetch. > > "-m" works just fine if you create new groups with snnewgroup, but I just > noticed that it doesn't seem to work if you just delete the article > files and the .serial file... Sigh. I'll look into it, but the quick fix is > to make sure that .serial contains a zero if you manually empty some groups. The patch below should fix this. I'd appreciate it if you would apply it and check that -m and/or .max still works for you... --- ../sn-0.3.4a/get.c Sun Oct 7 03:21:53 2001 +++ get.c Wed Apr 24 01:10:23 2002 @@ -737,12 +737,13 @@ readfile(".", ".serial", serialbuf); argv_snfetch[argc_snfetch++] = serialbuf; - if (!strcmp(serialbuf, "0")) /* Bugfix: It's a string, not an int... */ + if (*serialbuf == '\0') { LOG3("sow:couldn't get a value from %s/.serial:%m?", jp->group); strcpy(serialbuf, "0"); - argv_snfetch[argc_snfetch++] = (optmax ? optmax : "200"); } + if (strcmp(serialbuf, "0") == 0) + argv_snfetch[argc_snfetch++] = (optmax ? optmax : "200"); else { readfile(".", ".max", maxbuf); -- Patrik Rådman · patrik at iki dot fi · http://www.iki.fi/patrik/ "Now, where was I?"