Excluded text/plain objects from filtering. This fixes a
[privoxy.git] / loaders.c
index 02deadf..35a910e 100644 (file)
--- a/loaders.c
+++ b/loaders.c
@@ -1,4 +1,4 @@
-const char loaders_rcs[] = "$Id: loaders.c,v 1.50.2.3 2002/11/20 17:12:30 oes Exp $";
+const char loaders_rcs[] = "$Id: loaders.c,v 1.50.2.4 2003/05/06 15:57:12 oes Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/Attic/loaders.c,v $
@@ -35,6 +35,10 @@ const char loaders_rcs[] = "$Id: loaders.c,v 1.50.2.3 2002/11/20 17:12:30 oes Ex
  *
  * Revisions   :
  *    $Log: loaders.c,v $
+ *    Revision 1.50.2.4  2003/05/06 15:57:12  oes
+ *    Bugfix: Update last_active pointer in sweep() before
+ *    leaving an active client. Closes bugs #724395, #727882
+ *
  *    Revision 1.50.2.3  2002/11/20 17:12:30  oes
  *    Ooops, forgot one change.
  *
@@ -442,17 +446,26 @@ void sweep(void)
       }
    }
 
-   for (fl = files; fl && ((nfl = fl->next) != NULL) ; fl = fl->next)
+   nfl = files;
+   fl = files->next;
+
+   while (fl != NULL)
    {
-      if ( ( 0 == nfl->active ) && ( NULL != nfl->unloader ) )
+      if ( ( 0 == fl->active ) && ( NULL != fl->unloader ) )
       {
-         fl->next = nfl->next;
+         nfl->next = fl->next;
 
-         (nfl->unloader)(nfl->f);
+         (fl->unloader)(fl->f);
 
-         freez(nfl->filename);
+         freez(fl->filename);
+         freez(fl);
 
-         freez(nfl);
+         fl = nfl->next;
+      }
+      else
+      {
+         nfl = fl;
+         fl = fl->next;
       }
    }
 
@@ -514,6 +527,7 @@ int check_file_changed(const struct file_list * current,
       return 1;
    }
 
+
    fs->filename = strdup(filename);
    fs->lastmodified = statbuf->st_mtime;