From a450d0faa8851a7df8dbb52788f99fe216f57c3d Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 27 Jan 2009 19:15:51 +0300 Subject: * Add new hash for storing hash data in shared memory * Add rwlocks implementation (primitive) in memory pool library --- utils/url_extracter.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/url_extracter.c b/utils/url_extracter.c index f92c76381..ede39ec27 100644 --- a/utils/url_extracter.c +++ b/utils/url_extracter.c @@ -14,9 +14,17 @@ #include #include "../src/config.h" +#if !defined(HAVE_OWN_QUEUE_H) && defined(HAVE_SYS_QUEUE_H) +#include +#endif +#ifdef HAVE_OWN_QUEUE_H +#include "../src/queue.h" +#endif + #include "../src/main.h" #include "../src/cfg_file.h" #include "../src/url.h" +#include "../src/message.h" static void mime_foreach_callback (GMimeObject *part, gpointer user_data) @@ -72,7 +80,7 @@ mime_foreach_callback (GMimeObject *part, gpointer user_data) mime_part = g_malloc (sizeof (struct mime_part)); mime_part->type = type; mime_part->content = part_content; - TAILQ_INSERT_TAIL (&task->parts, mime_part, next); + task->parts = g_list_prepend (task->parts, mime_part); if (g_mime_content_type_is_type (type, "text", "html")) { printf ("Found text/html part\n"); url_parse_html (task, part_content); @@ -127,7 +135,6 @@ main (int argc, char **argv) task.message = message; TAILQ_INIT (&task.urls); - TAILQ_INIT (&task.parts); /* free the parser (and the stream) */ g_object_unref (parser); -- cgit v1.2.3