pan-devel
[Top][All Lists]
Advanced

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

Re: [Pan-devel] Pan 0.91 issues


From: Charles Kerr
Subject: Re: [Pan-devel] Pan 0.91 issues
Date: Thu, 6 Apr 2006 10:16:51 -0500 (CDT)
User-agent: SquirrelMail/1.4.6 [CVS]

> Christophe Lambin wrote:
>> It can also affect newsgroups.xov:
>>
>> $ grep 4294967295 newsgroups.xov
>> newsgroups.xov:dsm.network 0 4294967295
>> newsgroups.xov:easynet.adverts 0 4294967295
>> newsgroups.xov:easynet.fr.adsl 0 4294967295
>> newsgroups.xov:easynet.fr.support 0 4294967295
>> (etc.)
>>
>> That bug would also explain two other things I've seen:
>> a) get new headers stops working (is based on newsrc, I guess)
>> b) getting all headers will show new headers is read
>>
> I haven't found the exact source yet, but here is what I'm seeing for
> this.  I open a small group and some articles show as unread but the
> unread count is 0.  I read those articles so the unread count is
> decremented resulting in a very big number.  I don't know if these
> article are new & not being added to the unread count, or if they're
> just being marked as unread for some reason.

I've got a partial fix for the underflow.  In data-impl/headers.cc,
in mark_read() and delete_articles(), if an article is crossposted
to a group we haven't fetched headers for, then the "_unread_count -="
and "_article_count -=" calls in those functions can cause an underflow.
Checking for this, a la "if (lhs>decrement) lhs-=decrement; else lhs=0;"
there should do the trick.

_unread_count and _article_count are recalculated for a group when we load
it, so we shouldn't have to worry about a crossposted article read in
group A throwing off the counts for group B.

I don't know what's causing Chris' newsrc underflow though.



> P.S.  There appears to be a typo in data-impl/groups.cc line 346, I
> think it should be
> bool is_xgroup=(group._article_count || group._unread_count);
> The = was missing in my source.

That's a C++ism to instantiate with an initial value, rather than
instantiating and then applying the assignment operator.  AFAIK it's
no better on bulitin types than assignment, so I just use it for
consistency with the rest of the code.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]