pan-devel
[Top][All Lists]
Advanced

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

Re: [Pan-devel] newsrc corruption theory (Was: Pan 0.91 issues)


From: Christophe Lambin
Subject: Re: [Pan-devel] newsrc corruption theory (Was: Pan 0.91 issues)
Date: Sat, 8 Apr 2006 01:45:23 +0200
User-agent: Mutt/1.4.2.1i

On Fri, 07 Apr, 2006 at 01:38 +0200, Christophe Lambin wrote:
> Yes. Newsrc's no longer get corrupted. Getting new headers still doesn't
> show any articles I justed posted, but I'll look closer at that tomorrow.

OK. It looks like Pan simply never gets the last article when downloading
headers (i.e. the one with the highest article number on the server).

This proposed patch for TaskXOver :: on_nntp_group()  highlights the
problem:

--- task-xover.cc-orig  2006-04-08 01:40:02.000000000 +0200
+++ task-xover.cc       2006-04-08 01:39:18.000000000 +0200
@@ -171,13 +171,13 @@
     l = std::max (xh+1, low);
        std::cout << "server says highest is " << high << ". our highest
is " << xh << std::endl;
   }
-  if (l < high)
+  if (l <= high)
   {
     //std::cerr << LINE_ID << " okay, I'll try to get articles in [" <<
     //l << "..." << h << ']' << std::endl;
     add_steps (h-l);
     const int INCREMENT (1000);
     MiniTasks_t& minitasks (_server_to_minitasks[servername]);
-    for (unsigned long m=l; m<h; m+=INCREMENT) {
+    for (unsigned long m=l; m<=h; m+=INCREMENT) {
       MiniTask mt (MiniTask::XOVER, m, m+INCREMENT);
       debug ("adding MiniTask for " << servername << ": xover [" <<
mt._low << '-' << mt._high << ']');
       minitasks.push_back (mt);

There's also some inconsistent use of 'h' vs 'high' which could be
corrected.

Regards,
Christophe

Attachment: pgpmkYUOo9Ee4.pgp
Description: PGP signature


reply via email to

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