Re: at kill all

"Alexander V. Lukyanov" <[email protected]> Thu, 6 Oct 2005 18:04:47 +0400
Newsgroups gmane.network.lftp.devel
Message-ID <[email protected]>
On Thu, Oct 06, 2005 at 02:48:07PM +0200, Michael Petuschak wrote:
> Hi Alexander,
>
>  > Probably this bug is fixed in 3.3.1rc2, please test.
>
> Unfortunatelly, it's not:

Ok, it is another problem. Here is a patch, please test.
BTW, ElectricFence is invaluable for finding such bugs.

--
   Alexander.
diff (text/plain, 754 B)
Index: Job.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/Job.cc,v
retrieving revision 1.30
diff -u -p -r1.30 Job.cc
--- Job.cc	5 Oct 2005 11:12:17 -0000	1.30
+++ Job.cc	6 Oct 2005 14:01:04 -0000
@@ -62,20 +62,14 @@ Job::~Job()
 	 if(scan->parent==this)
 	 {
 	    if(scan->jobno!=-1 && this->parent)
-	    {
 	       scan->parent=this->parent;
-	       scan=scan->next;
-	    }
-	    else if(!scan->deleting)
+	    else
 	    {
-	       Delete(scan);
-	       scan=chain;
+	       scan->parent=0;
+	       scan->deleting=true;
 	    }
-	    else
-	       scan=scan->next;
 	 }
-	 else
-	    scan=scan->next;
+	 scan=scan->next;
       }
    }
    // if parent waits for the job, make it stop