[Gurlchecker-commits] r749 - in trunk: . src

esaracco at users.labs.libre-entreprise.org esaracco at users.labs.libre-entreprise.org
Tue Jan 26 23:03:40 CET 2010


Author: esaracco
Date: 2010-01-26 22:03:40 +0000 (Tue, 26 Jan 2010)
New Revision: 749

Modified:
   trunk/configure.in
   trunk/src/bookmarks.c
   trunk/src/check.c
   trunk/src/check.h
   trunk/src/web_site.c
Log:
Fixed a regression in check scope.


Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2010-01-26 21:27:58 UTC (rev 748)
+++ trunk/configure.in	2010-01-26 22:03:40 UTC (rev 749)
@@ -2,7 +2,7 @@
 AC_PREREQ(2.54)
 
 AC_INIT(configure.in)
-AM_INIT_AUTOMAKE(gurlchecker, 0.11.2svn2010012602)
+AM_INIT_AUTOMAKE(gurlchecker, 0.11.2svn2010012603)
 AM_CONFIG_HEADER(config.h)
 AC_CONFIG_MACRO_DIR([m4])
 

Modified: trunk/src/bookmarks.c
===================================================================
--- trunk/src/bookmarks.c	2010-01-26 21:27:58 UTC (rev 748)
+++ trunk/src/bookmarks.c	2010-01-26 22:03:40 UTC (rev 749)
@@ -418,7 +418,7 @@
                    LINK_TYPE_FILE_HREF : LINK_TYPE_HREF;
     g_free (proto), proto = NULL;
   
-    uc_check_currentitem_init (NULL, "", tag, value);
+    uc_check_currentitem_init (NULL, "", tag, value, FALSE);
   
     hostname = uc_url_get_hostname ("", tag->value);
   
@@ -721,7 +721,7 @@
                         LINK_TYPE_FILE_HREF : LINK_TYPE_HREF;
           g_free (proto), proto = NULL;
 
-	  uc_check_currentitem_init (NULL, "", tag, (gchar *) value);
+	  uc_check_currentitem_init (NULL, "", tag, (gchar *) value, FALSE);
 
 	  hostname = uc_url_get_hostname ("", tag->value);
 

Modified: trunk/src/check.c
===================================================================
--- trunk/src/check.c	2010-01-26 21:27:58 UTC (rev 748)
+++ trunk/src/check.c	2010-01-26 22:03:40 UTC (rev 749)
@@ -82,6 +82,7 @@
   UCHTMLTag *tag;
   UCLinkProperties *parent;
   gchar *url;
+  gboolean is_first;
 }
 currentItem;
 
@@ -2038,8 +2039,9 @@
  */
 void
 uc_check_currentitem_init (UCLinkProperties * parent, gchar * current_host,
-			   UCHTMLTag * tag, gchar * url)
+			   UCHTMLTag * tag, gchar * url, gboolean is_first)
 {
+  currentItem.is_first = is_first;
   currentItem.parent = parent;
   currentItem.current_host = current_host;
   currentItem.tag = tag;
@@ -2565,7 +2567,7 @@
 			   &prop->args);
 
   // If we chroot the check, initialize the directory to chroot in
-  if (depth == 0)
+  if (currentItem.is_first)
   {
     // Set project main hostname
     uc_project_set_current_host (prop->h_name);
@@ -2617,7 +2619,8 @@
             normalized_url = uc_url_normalize (current_host,
                                                current_path, tag->value);
             uc_check_currentitem_init (currentItem.parent, current_host,
-                                       tag, normalized_url);
+                                       tag, normalized_url,
+                                       currentItem.is_first);
 
             uc_lists_checked_links_node_free (NULL, &prop);
 

Modified: trunk/src/check.h
===================================================================
--- trunk/src/check.h	2010-01-26 21:27:58 UTC (rev 748)
+++ trunk/src/check.h	2010-01-26 22:03:40 UTC (rev 749)
@@ -100,7 +100,7 @@
 					const gchar * proto);
 void uc_check_currentitem_init (UCLinkProperties * parent,
                                 gchar * current_host, UCHTMLTag * tag,
-                                gchar * url);
+                                gchar * url, gboolean is_first);
 void uc_check_wait (void);
 gboolean uc_check_link_already_checked_with_insert (UCLinkProperties * prop,
 						    gchar * url);

Modified: trunk/src/web_site.c
===================================================================
--- trunk/src/web_site.c	2010-01-26 21:27:58 UTC (rev 748)
+++ trunk/src/web_site.c	2010-01-26 22:03:40 UTC (rev 749)
@@ -90,7 +90,8 @@
       normalized_url = uc_url_normalize (current_host,
                                          current_path, tag->value);
 
-      uc_check_currentitem_init (prop, current_host, tag, normalized_url);
+      uc_check_currentitem_init (prop, current_host, tag, normalized_url,
+                                 FALSE);
 
       if (uc_check_refresh_link_get_value ())
         old_prop = uc_web_site_get_old_child (normalized_url);
@@ -335,7 +336,7 @@
   uc_lists_already_checked_links_remove_items (prop);
 
   uc_check_currentitem_init (NULL, prop->h_name, prop->tag,
-                             prop->normalized_url);
+                             prop->normalized_url, FALSE);
 
   uc_lists_refresh_preserved_links_reset ();
 
@@ -603,7 +604,7 @@
 		      parent->path, ((UCHTMLTag *) prop->tag)->value);
 
   uc_check_currentitem_init (prop, uc_project_get_current_host (), prop->tag,
-                             normalized_url);
+                             normalized_url, FALSE);
 
   /* remove links in already checked list to check them
    * again */
@@ -834,7 +835,7 @@
 
   /* get properties for the main page */
   uc_check_currentitem_init (NULL, uc_project_get_current_host (), tag,
-                             uc_project_get_url ());
+                             uc_project_get_url (), TRUE);
   prop = uc_check_link_get_properties (0, uc_project_get_current_host (), "",
 				       (UCHTMLTag *) tag, NULL, &accept, 0);
 



More information about the Gurlchecker-commits mailing list