Removing overview lines when cancelling articles

Julien ÉLIE julien at trigofacile.com
Sat Jan 30 18:00:41 UTC 2010


Hi Lars,

>> (gdb) print groups->strings[2]
>> $7 = 0x830d4d5 "trigofacile.test:390\r\n"
>
> And there's the CR that my patch sorta fixed...  Perhaps it should check
> for NUL, "\r" or "\n"?  Probably just dropping the test is fin.

I am already using your patch.
It does not fix that CR in groups->strings; it is normal that the CR be here.
Your patch fixes the check for a proper artnum int.
I agree that the test should be dropped and that is what I did (the second
argument to strtoul() is now NULL).


    for (i = 0; i < groups->count; i++) {
        group = groups->strings[i];
        p = (char *) strchr(group, ':');
        if (p == NULL || p == group || p[1] == '-')
            continue;
        *p = '\0';
        errno = 0;
-        artnum = strtoul(p + 1, &end, 10);
-        if (artnum == 0 || *end != '\0' || errno == ERANGE)
+        artnum = strtoul(p + 1, NULL, 10);
+        if (artnum == 0 || errno == ERANGE)
            continue;

        /* Don't worry about the return status; the article may have already
           expired out of some or all of the groups. */
        (*ov.cancel)(group, artnum);
    }



> Is it possible you've posted the articles you're cancelling in the same
> nnrpd session as you're cancelling the articles, and that's why it
> hasn't updated the high water mark?  Or that the cancelling nnrpd
> session is older than the posting session?

I've just tried with different nnrpd session (spawned by innd) and also
with nnrpd running as a daemon and it does not change the behaviour.

Well, I think it is directly linked to the value of overcachesize.
If I put 1 for it (I was using 384), then the article is properly cancelled.
I post it, use a GROUP to another newsgroup and cancel it.  Then it
properly disappears.

Which does not explain why it works fine with your INN :-/
A different configuration I assume.



Anyway, it is a bug.
I suggest the following patch for tradindexed_cancel().
With that update, everything now works fine with my configuration.

--- storage/tradindexed/tradindexed.c   (révision 8880)
+++ storage/tradindexed/tradindexed.c   (copie de travail)
@@ -229,6 +229,11 @@
     data = data_cache_open(tradindexed, group, entry);
     if (data == NULL)
         return false;
+    if (artnum > data->high) {
+        data = data_cache_reopen(tradindexed, group, entry);
+        if (data == NULL)
+            return false;
+    }
     return tdx_data_cancel(data, artnum);
 }




> My inn.conf has been pretty much constant since inn 1.x days, so perhaps
> there's a new default in 2.x that my inn.conf is lacking?

If a parameter is not present in inn.conf, then its value is already the
default one.


Thanks again, Lars, for having reported the issue.  I believe that
with these two patches, cancels work better!

-- 
Julien ÉLIE

« Les mathématiques peuvent être définies comme une science
  dans laquelle on ne sait jamais de quoi on parle, ni si ce qu'on dit
  est vrai. » (Bertrand Russell)




More information about the inn-workers mailing list