Hello,

This patch updates a problem when a requesting client did a HEAD only
request. Which resulted in a g_assert causing gtkg to stop.

The X-Queued header is now as expected with PARQ behaviour. 

There is an extra file attached, parq009b.diff. This disables fuzzy
filtering in dmesh. If you get segfaults when using gtkg, or get
problems / g_asserts in parq code please apply this diff too. It
probably is only a temporary solution to avoid memory corruption.
(Unrelated to the PARQ code)

If you want to file a bug report regarding the PARQ patch, please also
tell me if you also applied the parq009b patch (which I think is
recommended).

- Jeroen

Attachment: parq009.diff.gz
Description: GNU Zip compressed data

Index: src/dmesh.c
===================================================================
RCS file: /cvsroot/gtk-gnutella/gtk-gnutella-current/src/dmesh.c,v
retrieving revision 1.44
diff -u -r1.44 dmesh.c
--- src/dmesh.c	20 Feb 2003 23:52:33 -0000	1.44
+++ src/dmesh.c	9 Mar 2003 17:37:53 -0000
@@ -44,6 +44,8 @@
 
 RCSID("$Id: dmesh.c,v 1.44 2003/02/20 23:52:33 rmanfredi Exp $");
 
+#undef ENABLEFUZZY
+
 extern cqueue_t *callout_queue;
 
 /* made visible for us by atoms.c */
@@ -1224,14 +1226,16 @@
 		if (dbg > 4)
 			printf("Checking deferred url 0x%lx (str=0x%lx:%s)\n",
 				(glong) d, (glong) d->dmesh_url->name, d->dmesh_url->name);
-
+#ifdef ENABLEFUZZY
 		for (ex = existing_urls; ex; ex = ex->next) {
 			struct dmesh_entry *dme = ex->data;
 			score = fuzzy_compare(dme->url.name, d->dmesh_url->name);
 			if (score > FUZZY_MATCH)
 				matches++;
 		}
-
+#else
+		matches = threshold;
+#endif
 		/*
 		 * We can't add the entry in the mesh in the middle of the
 		 * traversal: if we reach the max amount of entries in the mesh,
@@ -1299,7 +1303,7 @@
 				first->dmesh_url->name);
 		return;
 	}
-    
+#ifdef ENABLEFUZZY
 	for (/*empty */; l; l = g_slist_next(l)) {
 		current = l->data;
 		score = fuzzy_compare(first->dmesh_url->name, current->dmesh_url->name);
@@ -1314,7 +1318,7 @@
 			return;
 		}
 	}
-
+#endif
     /* We made it this far, they must all match, lets add them to the dmesh */
 	for (l = deferred_urls; l; l = l->next) {
 		dmesh_deferred_url_t *def = l->data;

Reply via email to